2019-03-20 13:47:59 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 12:08:49 -07:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2019-03-20 13:47:59 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
|
*/
|
2020-04-29 21:28:17 +03:00
|
|
|
import {AbsoluteFsPath} from '../../../src/ngtsc/file_system';
|
|
|
|
|
import {EntryPoint, EntryPointJsonProperty} from '../packages/entry_point';
|
2019-03-20 13:47:59 +00:00
|
|
|
import {EntryPointBundle} from '../packages/entry_point_bundle';
|
2019-04-28 20:48:35 +01:00
|
|
|
import {FileToWrite} from '../rendering/utils';
|
2019-03-20 13:47:59 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Responsible for writing out the transformed files to disk.
|
|
|
|
|
*/
|
|
|
|
|
export interface FileWriter {
|
2019-08-08 02:19:52 +03:00
|
|
|
writeBundle(
|
2019-08-08 02:35:22 +03:00
|
|
|
bundle: EntryPointBundle, transformedFiles: FileToWrite[],
|
2019-08-08 03:23:46 +03:00
|
|
|
formatProperties: EntryPointJsonProperty[]): void;
|
2020-04-29 21:28:17 +03:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Revert the changes to an entry-point processed for the specified format-properties by the same
|
|
|
|
|
* `FileWriter` implementation.
|
|
|
|
|
*
|
|
|
|
|
* @param entryPoint The entry-point to revert.
|
|
|
|
|
* @param transformedFilePaths The original paths of the transformed files. (The transformed files
|
|
|
|
|
* may be written at the same or a different location, depending on the `FileWriter`
|
|
|
|
|
* implementation.)
|
|
|
|
|
* @param formatProperties The format-properties pointing to the entry-point.
|
|
|
|
|
*/
|
|
|
|
|
revertBundle(
|
|
|
|
|
entryPoint: EntryPoint, transformedFilePaths: AbsoluteFsPath[],
|
|
|
|
|
formatProperties: EntryPointJsonProperty[]): void;
|
2019-03-20 13:47:59 +00:00
|
|
|
}
|