refactor(@angular-devkit/architect): remove _registry from being a private (#14182)

This commit is contained in:
Alan Agius 2019-05-07 20:31:45 +02:00 committed by Alex Eagle
parent 1f92015863
commit 968204fa2a
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
export declare class Architect { export declare class Architect {
constructor(_host: ArchitectHost, _registry?: json.schema.SchemaRegistry, additionalJobRegistry?: experimental.jobs.Registry); constructor(_host: ArchitectHost, registry?: json.schema.SchemaRegistry, additionalJobRegistry?: experimental.jobs.Registry);
has(name: experimental.jobs.JobName): Observable<boolean>; has(name: experimental.jobs.JobName): Observable<boolean>;
scheduleBuilder(name: string, options: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>; scheduleBuilder(name: string, options: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>;
scheduleTarget(target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>; scheduleTarget(target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>;

View File

@ -309,23 +309,23 @@ export class Architect {
constructor( constructor(
private _host: ArchitectHost, private _host: ArchitectHost,
private _registry: json.schema.SchemaRegistry = new json.schema.CoreSchemaRegistry(), registry: json.schema.SchemaRegistry = new json.schema.CoreSchemaRegistry(),
additionalJobRegistry?: experimental.jobs.Registry, additionalJobRegistry?: experimental.jobs.Registry,
) { ) {
const privateArchitectJobRegistry = new experimental.jobs.SimpleJobRegistry(); const privateArchitectJobRegistry = new experimental.jobs.SimpleJobRegistry();
// Create private jobs. // Create private jobs.
privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host)); privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host));
privateArchitectJobRegistry.register(_getBuilderNameForTargetFactory(_host)); privateArchitectJobRegistry.register(_getBuilderNameForTargetFactory(_host));
privateArchitectJobRegistry.register(_validateOptionsFactory(_host, _registry)); privateArchitectJobRegistry.register(_validateOptionsFactory(_host, registry));
const jobRegistry = new experimental.jobs.FallbackRegistry([ const jobRegistry = new experimental.jobs.FallbackRegistry([
new ArchitectTargetJobRegistry(_host, _registry, this._jobCache, this._infoCache), new ArchitectTargetJobRegistry(_host, registry, this._jobCache, this._infoCache),
new ArchitectBuilderJobRegistry(_host, _registry, this._jobCache, this._infoCache), new ArchitectBuilderJobRegistry(_host, registry, this._jobCache, this._infoCache),
privateArchitectJobRegistry, privateArchitectJobRegistry,
...(additionalJobRegistry ? [additionalJobRegistry] : []), ...(additionalJobRegistry ? [additionalJobRegistry] : []),
] as experimental.jobs.Registry[]); ] as experimental.jobs.Registry[]);
this._scheduler = new experimental.jobs.SimpleScheduler(jobRegistry, _registry); this._scheduler = new experimental.jobs.SimpleScheduler(jobRegistry, registry);
} }
has(name: experimental.jobs.JobName) { has(name: experimental.jobs.JobName) {