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