|
1 | 1 | export declare class Architect { |
2 | | - constructor(_workspace: experimental.workspace.Workspace); |
3 | | - getBuilder<OptionsT>(builderDescription: BuilderDescription, context: BuilderContext): Builder<OptionsT>; |
4 | | - getBuilderConfiguration<OptionsT>(targetSpec: TargetSpecifier): BuilderConfiguration<OptionsT>; |
5 | | - getBuilderDescription<OptionsT>(builderConfig: BuilderConfiguration<OptionsT>): Observable<BuilderDescription>; |
6 | | - listProjectTargets(projectName: string): string[]; |
7 | | - loadArchitect(): Observable<this>; |
8 | | - run<OptionsT>(builderConfig: BuilderConfiguration<OptionsT>, partialContext?: Partial<BuilderContext>): Observable<BuildEvent>; |
9 | | - validateBuilderOptions<OptionsT>(builderConfig: BuilderConfiguration<OptionsT>, builderDescription: BuilderDescription): Observable<BuilderConfiguration<OptionsT>>; |
| 2 | + constructor(_host: ArchitectHost, _registry?: json.schema.SchemaRegistry, additionalJobRegistry?: experimental.jobs.Registry); |
| 3 | + has(name: experimental.jobs.JobName): Observable<boolean>; |
| 4 | + scheduleBuilder(name: string, options: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>; |
| 5 | + scheduleTarget(target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>; |
10 | 6 | } |
11 | 7 |
|
12 | | -export declare class ArchitectNotYetLoadedException extends BaseException { |
13 | | - constructor(); |
14 | | -} |
15 | | - |
16 | | -export interface Builder<OptionsT> { |
17 | | - run(builderConfig: BuilderConfiguration<Partial<OptionsT>>): Observable<BuildEvent>; |
18 | | -} |
19 | | - |
20 | | -export declare class BuilderCannotBeResolvedException extends BaseException { |
21 | | - constructor(builder: string); |
22 | | -} |
23 | | - |
24 | | -export interface BuilderConfiguration<OptionsT = {}> { |
25 | | - builder: string; |
26 | | - options: OptionsT; |
27 | | - projectType: string; |
28 | | - root: Path; |
29 | | - sourceRoot?: Path; |
30 | | -} |
31 | | - |
32 | | -export interface BuilderConstructor<OptionsT> { |
33 | | - new (context: BuilderContext): Builder<OptionsT>; |
34 | | -} |
35 | | - |
36 | | -export interface BuilderContext { |
37 | | - architect: Architect; |
38 | | - host: virtualFs.Host<{}>; |
39 | | - logger: logging.Logger; |
40 | | - targetSpecifier?: TargetSpecifier; |
41 | | - workspace: experimental.workspace.Workspace; |
42 | | -} |
43 | | - |
44 | | -export interface BuilderDescription { |
45 | | - description: string; |
46 | | - name: string; |
47 | | - schema: JsonObject; |
48 | | -} |
49 | | - |
50 | | -export declare class BuilderNotFoundException extends BaseException { |
51 | | - constructor(builder: string); |
52 | | -} |
53 | | - |
54 | | -export interface BuilderPaths { |
55 | | - class: Path; |
56 | | - description: string; |
57 | | - schema: Path; |
58 | | -} |
59 | | - |
60 | | -export interface BuilderPathsMap { |
61 | | - builders: { |
62 | | - [k: string]: BuilderPaths; |
63 | | - }; |
64 | | -} |
65 | | - |
66 | | -export interface BuildEvent<BuildResultT = any> { |
67 | | - result?: BuildResultT; |
68 | | - success: boolean; |
69 | | -} |
70 | | - |
71 | | -export declare class ConfigurationNotFoundException extends BaseException { |
72 | | - constructor(projectName: string, configurationName: string); |
73 | | -} |
74 | | - |
75 | | -export declare class ProjectNotFoundException extends BaseException { |
76 | | - constructor(projectName: string); |
77 | | -} |
78 | | - |
79 | | -export interface Target<T = JsonObject> { |
80 | | - builder: string; |
81 | | - configurations?: { |
82 | | - [k: string]: TargetConfiguration<T>; |
83 | | - }; |
84 | | - options: TargetOptions<T>; |
85 | | -} |
86 | | - |
87 | | -export declare type TargetConfiguration<T = JsonObject> = Partial<T>; |
88 | | - |
89 | | -export interface TargetMap { |
90 | | - [k: string]: Target; |
91 | | -} |
92 | | - |
93 | | -export declare class TargetNotFoundException extends BaseException { |
94 | | - constructor(projectName: string, targetName: string); |
95 | | -} |
96 | | - |
97 | | -export declare type TargetOptions<T = JsonObject> = T; |
| 8 | +export declare function createBuilder<OptT extends json.JsonObject, OutT extends BuilderOutput = BuilderOutput>(fn: BuilderHandlerFn<OptT>): Builder<OptT>; |
98 | 9 |
|
99 | | -export interface TargetSpecifier<OptionsT = {}> { |
100 | | - configuration?: string; |
101 | | - overrides?: Partial<OptionsT>; |
102 | | - project: string; |
103 | | - target: string; |
| 10 | +export interface ScheduleOptions { |
| 11 | + analytics?: analytics.Analytics; |
| 12 | + logger?: logging.Logger; |
104 | 13 | } |
0 commit comments