1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { BaseException } from '@angular-devkit/core';
|
9 | import { Observable } from 'rxjs';
|
10 | import { Url } from 'url';
|
11 | import { MergeStrategy } from '../tree/interface';
|
12 | import { Workflow } from '../workflow/interface';
|
13 | import { Collection, CollectionDescription, Engine, EngineHost, ExecutionOptions, Schematic, SchematicContext, SchematicDescription, Source, TaskConfiguration, TaskId, TaskInfo, TypedSchematicContext } from './interface';
|
14 | export declare class UnknownUrlSourceProtocol extends BaseException {
|
15 | constructor(url: string);
|
16 | }
|
17 | export declare class UnknownCollectionException extends BaseException {
|
18 | constructor(name: string);
|
19 | }
|
20 | export declare class CircularCollectionException extends BaseException {
|
21 | constructor(name: string);
|
22 | }
|
23 | export declare class UnknownSchematicException extends BaseException {
|
24 | constructor(name: string, collection: CollectionDescription<{}>);
|
25 | }
|
26 | export declare class PrivateSchematicException extends BaseException {
|
27 | constructor(name: string, collection: CollectionDescription<{}>);
|
28 | }
|
29 | export declare class SchematicEngineConflictingException extends BaseException {
|
30 | constructor();
|
31 | }
|
32 | export declare class UnregisteredTaskException extends BaseException {
|
33 | constructor(name: string, schematic?: SchematicDescription<{}, {}>);
|
34 | }
|
35 | export declare class UnknownTaskDependencyException extends BaseException {
|
36 | constructor(id: TaskId);
|
37 | }
|
38 | export declare class CollectionImpl<CollectionT extends object, SchematicT extends object> implements Collection<CollectionT, SchematicT> {
|
39 | private _description;
|
40 | private _engine;
|
41 | readonly baseDescriptions?: Array<CollectionDescription<CollectionT>> | undefined;
|
42 | constructor(_description: CollectionDescription<CollectionT>, _engine: SchematicEngine<CollectionT, SchematicT>, baseDescriptions?: Array<CollectionDescription<CollectionT>> | undefined);
|
43 | get description(): CollectionDescription<CollectionT>;
|
44 | get name(): string;
|
45 | createSchematic(name: string, allowPrivate?: boolean): Schematic<CollectionT, SchematicT>;
|
46 | listSchematicNames(includeHidden?: boolean): string[];
|
47 | }
|
48 | export declare class TaskScheduler {
|
49 | private _context;
|
50 | private _queue;
|
51 | private _taskIds;
|
52 | private static _taskIdCounter;
|
53 | constructor(_context: SchematicContext);
|
54 | private _calculatePriority;
|
55 | private _mapDependencies;
|
56 | schedule<T extends object>(taskConfiguration: TaskConfiguration<T>): TaskId;
|
57 | finalize(): ReadonlyArray<TaskInfo>;
|
58 | }
|
59 | export declare class SchematicEngine<CollectionT extends object, SchematicT extends object> implements Engine<CollectionT, SchematicT> {
|
60 | private _host;
|
61 | protected _workflow?: Workflow | undefined;
|
62 | private _collectionCache;
|
63 | private _schematicCache;
|
64 | private _taskSchedulers;
|
65 | constructor(_host: EngineHost<CollectionT, SchematicT>, _workflow?: Workflow | undefined);
|
66 | get workflow(): Workflow | null;
|
67 | get defaultMergeStrategy(): MergeStrategy;
|
68 | createCollection(name: string, requester?: Collection<CollectionT, SchematicT>): Collection<CollectionT, SchematicT>;
|
69 | private _createCollectionDescription;
|
70 | createContext(schematic: Schematic<CollectionT, SchematicT>, parent?: Partial<TypedSchematicContext<CollectionT, SchematicT>>, executionOptions?: Partial<ExecutionOptions>): TypedSchematicContext<CollectionT, SchematicT>;
|
71 | createSchematic(name: string, collection: Collection<CollectionT, SchematicT>, allowPrivate?: boolean): Schematic<CollectionT, SchematicT>;
|
72 | listSchematicNames(collection: Collection<CollectionT, SchematicT>, includeHidden?: boolean): string[];
|
73 | transformOptions<OptionT extends object, ResultT extends object>(schematic: Schematic<CollectionT, SchematicT>, options: OptionT, context?: TypedSchematicContext<CollectionT, SchematicT>): Observable<ResultT>;
|
74 | createSourceFromUrl(url: Url, context: TypedSchematicContext<CollectionT, SchematicT>): Source;
|
75 | executePostTasks(): Observable<void>;
|
76 | }
|