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 { Observable } from 'rxjs';
|
---|
10 | import { Url } from 'url';
|
---|
11 | import { CollectionDescription, EngineHost, RuleFactory, SchematicDescription, Source, TaskExecutor, TypedSchematicContext } from '../src';
|
---|
12 | export declare type FallbackCollectionDescription = {
|
---|
13 | host: EngineHost<{}, {}>;
|
---|
14 | description: CollectionDescription<{}>;
|
---|
15 | };
|
---|
16 | export declare type FallbackSchematicDescription = {
|
---|
17 | description: SchematicDescription<{}, {}>;
|
---|
18 | };
|
---|
19 | export declare type FallbackContext = TypedSchematicContext<FallbackCollectionDescription, FallbackSchematicDescription>;
|
---|
20 | /**
|
---|
21 | * An EngineHost that support multiple hosts in a fallback configuration. If a host does not
|
---|
22 | * have a collection/schematics, use the following host before giving up.
|
---|
23 | */
|
---|
24 | export declare class FallbackEngineHost implements EngineHost<{}, {}> {
|
---|
25 | private _hosts;
|
---|
26 | addHost<CollectionT extends object, SchematicT extends object>(host: EngineHost<CollectionT, SchematicT>): void;
|
---|
27 | createCollectionDescription(name: string, requester?: CollectionDescription<{}>): CollectionDescription<FallbackCollectionDescription>;
|
---|
28 | createSchematicDescription(name: string, collection: CollectionDescription<FallbackCollectionDescription>): SchematicDescription<FallbackCollectionDescription, FallbackSchematicDescription> | null;
|
---|
29 | getSchematicRuleFactory<OptionT extends object>(schematic: SchematicDescription<FallbackCollectionDescription, FallbackSchematicDescription>, collection: CollectionDescription<FallbackCollectionDescription>): RuleFactory<OptionT>;
|
---|
30 | createSourceFromUrl(url: Url, context: FallbackContext): Source | null;
|
---|
31 | transformOptions<OptionT extends object, ResultT extends object>(schematic: SchematicDescription<FallbackCollectionDescription, FallbackSchematicDescription>, options: OptionT, context?: FallbackContext): Observable<ResultT>;
|
---|
32 | transformContext(context: FallbackContext): FallbackContext;
|
---|
33 | listSchematicNames(collection: CollectionDescription<FallbackCollectionDescription>): string[];
|
---|
34 | createTaskExecutor(name: string): Observable<TaskExecutor>;
|
---|
35 | hasTaskExecutor(name: string): boolean;
|
---|
36 | }
|
---|