@storm-software/workspace-tools 1.60.4 → 1.60.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -170026,6 +170026,1714 @@ var require_invoke_nx_generator = __commonJS({
170026
170026
  }
170027
170027
  });
170028
170028
 
170029
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/api.js
170030
+ var require_api = __commonJS({
170031
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/api.js"(exports2) {
170032
+ "use strict";
170033
+ Object.defineProperty(exports2, "__esModule", { value: true });
170034
+ exports2.isJobHandler = exports2.JobState = exports2.JobOutboundMessageKind = exports2.JobInboundMessageKind = void 0;
170035
+ var JobInboundMessageKind;
170036
+ (function(JobInboundMessageKind2) {
170037
+ JobInboundMessageKind2["Ping"] = "ip";
170038
+ JobInboundMessageKind2["Stop"] = "is";
170039
+ JobInboundMessageKind2["Input"] = "in";
170040
+ })(JobInboundMessageKind || (exports2.JobInboundMessageKind = JobInboundMessageKind = {}));
170041
+ var JobOutboundMessageKind;
170042
+ (function(JobOutboundMessageKind2) {
170043
+ JobOutboundMessageKind2["OnReady"] = "c";
170044
+ JobOutboundMessageKind2["Start"] = "s";
170045
+ JobOutboundMessageKind2["End"] = "e";
170046
+ JobOutboundMessageKind2["Pong"] = "p";
170047
+ JobOutboundMessageKind2["Output"] = "o";
170048
+ JobOutboundMessageKind2["ChannelCreate"] = "cn";
170049
+ JobOutboundMessageKind2["ChannelMessage"] = "cm";
170050
+ JobOutboundMessageKind2["ChannelError"] = "ce";
170051
+ JobOutboundMessageKind2["ChannelComplete"] = "cc";
170052
+ })(JobOutboundMessageKind || (exports2.JobOutboundMessageKind = JobOutboundMessageKind = {}));
170053
+ var JobState;
170054
+ (function(JobState2) {
170055
+ JobState2["Queued"] = "queued";
170056
+ JobState2["Ready"] = "ready";
170057
+ JobState2["Started"] = "started";
170058
+ JobState2["Ended"] = "ended";
170059
+ JobState2["Errored"] = "errored";
170060
+ })(JobState || (exports2.JobState = JobState = {}));
170061
+ function isJobHandler(value) {
170062
+ const job = value;
170063
+ return typeof job == "function" && typeof job.jobDescription == "object" && job.jobDescription !== null;
170064
+ }
170065
+ exports2.isJobHandler = isJobHandler;
170066
+ }
170067
+ });
170068
+
170069
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/strategy.js
170070
+ var require_strategy = __commonJS({
170071
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/strategy.js"(exports2) {
170072
+ "use strict";
170073
+ Object.defineProperty(exports2, "__esModule", { value: true });
170074
+ exports2.memoize = exports2.reuse = exports2.serialize = void 0;
170075
+ var core_1 = require_src2();
170076
+ var rxjs_1 = require_cjs();
170077
+ var api_1 = require_api();
170078
+ function serialize() {
170079
+ let latest = (0, rxjs_1.of)();
170080
+ return (handler, options8) => {
170081
+ const newHandler = (argument, context) => {
170082
+ const previous = latest;
170083
+ latest = (0, rxjs_1.concat)(previous.pipe((0, rxjs_1.ignoreElements)()), new rxjs_1.Observable((o2) => handler(argument, context).subscribe(o2))).pipe((0, rxjs_1.shareReplay)(0));
170084
+ return latest;
170085
+ };
170086
+ return Object.assign(newHandler, {
170087
+ jobDescription: Object.assign({}, handler.jobDescription, options8)
170088
+ });
170089
+ };
170090
+ }
170091
+ exports2.serialize = serialize;
170092
+ function reuse(replayMessages = false) {
170093
+ let inboundBus = new rxjs_1.Subject();
170094
+ let run2 = null;
170095
+ let state = null;
170096
+ return (handler, options8) => {
170097
+ const newHandler = (argument, context) => {
170098
+ const subscription = context.inboundBus.subscribe(inboundBus);
170099
+ if (run2) {
170100
+ return (0, rxjs_1.concat)(
170101
+ // Update state.
170102
+ (0, rxjs_1.of)(state),
170103
+ run2
170104
+ ).pipe((0, rxjs_1.finalize)(() => subscription.unsubscribe()));
170105
+ }
170106
+ run2 = handler(argument, { ...context, inboundBus: inboundBus.asObservable() }).pipe((0, rxjs_1.tap)((message) => {
170107
+ if (message.kind == api_1.JobOutboundMessageKind.Start || message.kind == api_1.JobOutboundMessageKind.OnReady || message.kind == api_1.JobOutboundMessageKind.End) {
170108
+ state = message;
170109
+ }
170110
+ }, void 0, () => {
170111
+ subscription.unsubscribe();
170112
+ inboundBus = new rxjs_1.Subject();
170113
+ run2 = null;
170114
+ }), replayMessages ? (0, rxjs_1.shareReplay)() : (0, rxjs_1.share)());
170115
+ return run2;
170116
+ };
170117
+ return Object.assign(newHandler, handler, options8 || {});
170118
+ };
170119
+ }
170120
+ exports2.reuse = reuse;
170121
+ function memoize(replayMessages = false) {
170122
+ const runs = /* @__PURE__ */ new Map();
170123
+ return (handler, options8) => {
170124
+ const newHandler = (argument, context) => {
170125
+ const argumentJson = JSON.stringify((0, core_1.isJsonObject)(argument) ? Object.keys(argument).sort().reduce((result, key2) => {
170126
+ result[key2] = argument[key2];
170127
+ return result;
170128
+ }, {}) : argument);
170129
+ const maybeJob = runs.get(argumentJson);
170130
+ if (maybeJob) {
170131
+ return maybeJob;
170132
+ }
170133
+ const run2 = handler(argument, context).pipe(replayMessages ? (0, rxjs_1.shareReplay)() : (0, rxjs_1.share)());
170134
+ runs.set(argumentJson, run2);
170135
+ return run2;
170136
+ };
170137
+ return Object.assign(newHandler, handler, options8 || {});
170138
+ };
170139
+ }
170140
+ exports2.memoize = memoize;
170141
+ }
170142
+ });
170143
+
170144
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js
170145
+ var require_create_job_handler = __commonJS({
170146
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js"(exports2) {
170147
+ "use strict";
170148
+ Object.defineProperty(exports2, "__esModule", { value: true });
170149
+ exports2.createLoggerJob = exports2.createJobFactory = exports2.createJobHandler = exports2.ChannelAlreadyExistException = void 0;
170150
+ var core_1 = require_src2();
170151
+ var rxjs_1 = require_cjs();
170152
+ var api_1 = require_api();
170153
+ var ChannelAlreadyExistException = class extends core_1.BaseException {
170154
+ constructor(name) {
170155
+ super(`Channel ${JSON.stringify(name)} already exist.`);
170156
+ }
170157
+ };
170158
+ exports2.ChannelAlreadyExistException = ChannelAlreadyExistException;
170159
+ function createJobHandler(fn6, options8 = {}) {
170160
+ const handler = (argument, context) => {
170161
+ const description = context.description;
170162
+ const inboundBus = context.inboundBus;
170163
+ const inputChannel = new rxjs_1.Subject();
170164
+ let subscription;
170165
+ const teardownLogics = [];
170166
+ let tearingDown = false;
170167
+ return new rxjs_1.Observable((subject) => {
170168
+ function complete() {
170169
+ if (subscription) {
170170
+ subscription.unsubscribe();
170171
+ }
170172
+ subject.next({ kind: api_1.JobOutboundMessageKind.End, description });
170173
+ subject.complete();
170174
+ inputChannel.complete();
170175
+ }
170176
+ const inboundSub = inboundBus.subscribe((message) => {
170177
+ switch (message.kind) {
170178
+ case api_1.JobInboundMessageKind.Ping:
170179
+ subject.next({ kind: api_1.JobOutboundMessageKind.Pong, description, id: message.id });
170180
+ break;
170181
+ case api_1.JobInboundMessageKind.Stop:
170182
+ tearingDown = true;
170183
+ if (teardownLogics.length) {
170184
+ Promise.all(teardownLogics.map((fn7) => fn7())).then(() => complete(), () => complete());
170185
+ } else {
170186
+ complete();
170187
+ }
170188
+ break;
170189
+ case api_1.JobInboundMessageKind.Input:
170190
+ if (!tearingDown) {
170191
+ inputChannel.next(message.value);
170192
+ }
170193
+ break;
170194
+ }
170195
+ });
170196
+ const channels = /* @__PURE__ */ new Map();
170197
+ const newContext = {
170198
+ ...context,
170199
+ input: inputChannel.asObservable(),
170200
+ addTeardown(teardown) {
170201
+ teardownLogics.push(teardown);
170202
+ },
170203
+ createChannel(name) {
170204
+ if (channels.has(name)) {
170205
+ throw new ChannelAlreadyExistException(name);
170206
+ }
170207
+ const channelSubject = new rxjs_1.Subject();
170208
+ const channelSub = channelSubject.subscribe((message) => {
170209
+ subject.next({
170210
+ kind: api_1.JobOutboundMessageKind.ChannelMessage,
170211
+ description,
170212
+ name,
170213
+ message
170214
+ });
170215
+ }, (error) => {
170216
+ subject.next({ kind: api_1.JobOutboundMessageKind.ChannelError, description, name, error });
170217
+ channels.delete(name);
170218
+ }, () => {
170219
+ subject.next({ kind: api_1.JobOutboundMessageKind.ChannelComplete, description, name });
170220
+ channels.delete(name);
170221
+ });
170222
+ channels.set(name, channelSubject);
170223
+ if (subscription) {
170224
+ subscription.add(channelSub);
170225
+ }
170226
+ return channelSubject;
170227
+ }
170228
+ };
170229
+ subject.next({ kind: api_1.JobOutboundMessageKind.Start, description });
170230
+ let result = fn6(argument, newContext);
170231
+ if ((0, core_1.isPromise)(result)) {
170232
+ result = (0, rxjs_1.from)(result);
170233
+ } else if (!(0, rxjs_1.isObservable)(result)) {
170234
+ result = (0, rxjs_1.of)(result);
170235
+ }
170236
+ subscription = result.subscribe((value) => subject.next({ kind: api_1.JobOutboundMessageKind.Output, description, value }), (error) => subject.error(error), () => complete());
170237
+ subscription.add(inboundSub);
170238
+ return subscription;
170239
+ });
170240
+ };
170241
+ return Object.assign(handler, { jobDescription: options8 });
170242
+ }
170243
+ exports2.createJobHandler = createJobHandler;
170244
+ function createJobFactory(loader2, options8 = {}) {
170245
+ const handler = (argument, context) => {
170246
+ return (0, rxjs_1.from)(loader2()).pipe((0, rxjs_1.switchMap)((fn6) => fn6(argument, context)));
170247
+ };
170248
+ return Object.assign(handler, { jobDescription: options8 });
170249
+ }
170250
+ exports2.createJobFactory = createJobFactory;
170251
+ function createLoggerJob(job, logger) {
170252
+ const handler = (argument, context) => {
170253
+ context.inboundBus.pipe((0, rxjs_1.tap)((message) => logger.info(`Input: ${JSON.stringify(message)}`))).subscribe();
170254
+ return job(argument, context).pipe((0, rxjs_1.tap)((message) => logger.info(`Message: ${JSON.stringify(message)}`), (error) => logger.warn(`Error: ${JSON.stringify(error)}`), () => logger.info(`Completed`)));
170255
+ };
170256
+ return Object.assign(handler, job);
170257
+ }
170258
+ exports2.createLoggerJob = createLoggerJob;
170259
+ }
170260
+ });
170261
+
170262
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/exception.js
170263
+ var require_exception3 = __commonJS({
170264
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/exception.js"(exports2) {
170265
+ "use strict";
170266
+ Object.defineProperty(exports2, "__esModule", { value: true });
170267
+ exports2.JobDoesNotExistException = exports2.JobNameAlreadyRegisteredException = void 0;
170268
+ var core_1 = require_src2();
170269
+ var JobNameAlreadyRegisteredException = class extends core_1.BaseException {
170270
+ constructor(name) {
170271
+ super(`Job named ${JSON.stringify(name)} already exists.`);
170272
+ }
170273
+ };
170274
+ exports2.JobNameAlreadyRegisteredException = JobNameAlreadyRegisteredException;
170275
+ var JobDoesNotExistException = class extends core_1.BaseException {
170276
+ constructor(name) {
170277
+ super(`Job name ${JSON.stringify(name)} does not exist.`);
170278
+ }
170279
+ };
170280
+ exports2.JobDoesNotExistException = JobDoesNotExistException;
170281
+ }
170282
+ });
170283
+
170284
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/dispatcher.js
170285
+ var require_dispatcher = __commonJS({
170286
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/dispatcher.js"(exports2) {
170287
+ "use strict";
170288
+ Object.defineProperty(exports2, "__esModule", { value: true });
170289
+ exports2.createDispatcher = void 0;
170290
+ var api_1 = require_api();
170291
+ var exception_1 = require_exception3();
170292
+ function createDispatcher(options8 = {}) {
170293
+ let defaultDelegate = null;
170294
+ const conditionalDelegateList = [];
170295
+ const job = Object.assign((argument, context) => {
170296
+ const maybeDelegate = conditionalDelegateList.find(([predicate]) => predicate(argument));
170297
+ let delegate = null;
170298
+ if (maybeDelegate) {
170299
+ delegate = context.scheduler.schedule(maybeDelegate[1], argument);
170300
+ } else if (defaultDelegate) {
170301
+ delegate = context.scheduler.schedule(defaultDelegate, argument);
170302
+ } else {
170303
+ throw new exception_1.JobDoesNotExistException("<null>");
170304
+ }
170305
+ context.inboundBus.subscribe(delegate.inboundBus);
170306
+ return delegate.outboundBus;
170307
+ }, {
170308
+ jobDescription: options8
170309
+ });
170310
+ return Object.assign(job, {
170311
+ setDefaultJob(name) {
170312
+ if ((0, api_1.isJobHandler)(name)) {
170313
+ name = name.jobDescription.name === void 0 ? null : name.jobDescription.name;
170314
+ }
170315
+ defaultDelegate = name;
170316
+ },
170317
+ addConditionalJob(predicate, name) {
170318
+ conditionalDelegateList.push([predicate, name]);
170319
+ }
170320
+ // TODO: Remove return-only generic from createDispatcher() API.
170321
+ });
170322
+ }
170323
+ exports2.createDispatcher = createDispatcher;
170324
+ }
170325
+ });
170326
+
170327
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/fallback-registry.js
170328
+ var require_fallback_registry = __commonJS({
170329
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/fallback-registry.js"(exports2) {
170330
+ "use strict";
170331
+ Object.defineProperty(exports2, "__esModule", { value: true });
170332
+ exports2.FallbackRegistry = void 0;
170333
+ var rxjs_1 = require_cjs();
170334
+ var FallbackRegistry = class {
170335
+ _fallbacks;
170336
+ constructor(_fallbacks = []) {
170337
+ this._fallbacks = _fallbacks;
170338
+ }
170339
+ addFallback(registry) {
170340
+ this._fallbacks.push(registry);
170341
+ }
170342
+ get(name) {
170343
+ return (0, rxjs_1.from)(this._fallbacks).pipe((0, rxjs_1.concatMap)((fb) => fb.get(name)), (0, rxjs_1.first)((x5) => x5 !== null, null));
170344
+ }
170345
+ };
170346
+ exports2.FallbackRegistry = FallbackRegistry;
170347
+ }
170348
+ });
170349
+
170350
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-registry.js
170351
+ var require_simple_registry = __commonJS({
170352
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-registry.js"(exports2) {
170353
+ "use strict";
170354
+ Object.defineProperty(exports2, "__esModule", { value: true });
170355
+ exports2.SimpleJobRegistry = void 0;
170356
+ var core_1 = require_src2();
170357
+ var rxjs_1 = require_cjs();
170358
+ var api_1 = require_api();
170359
+ var exception_1 = require_exception3();
170360
+ var SimpleJobRegistry = class {
170361
+ _jobNames = /* @__PURE__ */ new Map();
170362
+ get(name) {
170363
+ return (0, rxjs_1.of)(this._jobNames.get(name) || null);
170364
+ }
170365
+ register(nameOrHandler, handlerOrOptions = {}, options8 = {}) {
170366
+ if (typeof nameOrHandler == "string") {
170367
+ if (!(0, api_1.isJobHandler)(handlerOrOptions)) {
170368
+ throw new TypeError("Expected a JobHandler as second argument.");
170369
+ }
170370
+ this._register(nameOrHandler, handlerOrOptions, options8);
170371
+ } else if ((0, api_1.isJobHandler)(nameOrHandler)) {
170372
+ if (typeof handlerOrOptions !== "object") {
170373
+ throw new TypeError("Expected an object options as second argument.");
170374
+ }
170375
+ const name = options8.name || nameOrHandler.jobDescription.name || handlerOrOptions.name;
170376
+ if (name === void 0) {
170377
+ throw new TypeError("Expected name to be a string.");
170378
+ }
170379
+ this._register(name, nameOrHandler, options8);
170380
+ } else {
170381
+ throw new TypeError("Unrecognized arguments.");
170382
+ }
170383
+ }
170384
+ _register(name, handler, options8) {
170385
+ if (this._jobNames.has(name)) {
170386
+ throw new exception_1.JobNameAlreadyRegisteredException(name);
170387
+ }
170388
+ const argument = core_1.schema.mergeSchemas(handler.jobDescription.argument, options8.argument);
170389
+ const input = core_1.schema.mergeSchemas(handler.jobDescription.input, options8.input);
170390
+ const output = core_1.schema.mergeSchemas(handler.jobDescription.output, options8.output);
170391
+ const jobDescription = {
170392
+ name,
170393
+ argument,
170394
+ output,
170395
+ input
170396
+ };
170397
+ const jobHandler = Object.assign(handler.bind(void 0), {
170398
+ jobDescription
170399
+ });
170400
+ this._jobNames.set(name, jobHandler);
170401
+ }
170402
+ /**
170403
+ * Returns the job names of all jobs.
170404
+ */
170405
+ getJobNames() {
170406
+ return [...this._jobNames.keys()];
170407
+ }
170408
+ };
170409
+ exports2.SimpleJobRegistry = SimpleJobRegistry;
170410
+ }
170411
+ });
170412
+
170413
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-scheduler.js
170414
+ var require_simple_scheduler = __commonJS({
170415
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-scheduler.js"(exports2) {
170416
+ "use strict";
170417
+ Object.defineProperty(exports2, "__esModule", { value: true });
170418
+ exports2.SimpleScheduler = exports2.JobOutputSchemaValidationError = exports2.JobInboundMessageSchemaValidationError = exports2.JobArgumentSchemaValidationError = void 0;
170419
+ var core_1 = require_src2();
170420
+ var rxjs_1 = require_cjs();
170421
+ var api_1 = require_api();
170422
+ var exception_1 = require_exception3();
170423
+ var JobArgumentSchemaValidationError = class extends core_1.schema.SchemaValidationException {
170424
+ constructor(errors) {
170425
+ super(errors, "Job Argument failed to validate. Errors: ");
170426
+ }
170427
+ };
170428
+ exports2.JobArgumentSchemaValidationError = JobArgumentSchemaValidationError;
170429
+ var JobInboundMessageSchemaValidationError = class extends core_1.schema.SchemaValidationException {
170430
+ constructor(errors) {
170431
+ super(errors, "Job Inbound Message failed to validate. Errors: ");
170432
+ }
170433
+ };
170434
+ exports2.JobInboundMessageSchemaValidationError = JobInboundMessageSchemaValidationError;
170435
+ var JobOutputSchemaValidationError = class extends core_1.schema.SchemaValidationException {
170436
+ constructor(errors) {
170437
+ super(errors, "Job Output failed to validate. Errors: ");
170438
+ }
170439
+ };
170440
+ exports2.JobOutputSchemaValidationError = JobOutputSchemaValidationError;
170441
+ function _jobShare() {
170442
+ return (source2) => {
170443
+ let refCount = 0;
170444
+ let subject;
170445
+ let hasError = false;
170446
+ let isComplete = false;
170447
+ let subscription;
170448
+ return new rxjs_1.Observable((subscriber) => {
170449
+ let innerSub;
170450
+ refCount++;
170451
+ if (!subject) {
170452
+ subject = new rxjs_1.Subject();
170453
+ innerSub = subject.subscribe(subscriber);
170454
+ subscription = source2.subscribe({
170455
+ next(value) {
170456
+ subject.next(value);
170457
+ },
170458
+ error(err) {
170459
+ hasError = true;
170460
+ subject.error(err);
170461
+ },
170462
+ complete() {
170463
+ isComplete = true;
170464
+ subject.complete();
170465
+ }
170466
+ });
170467
+ } else {
170468
+ innerSub = subject.subscribe(subscriber);
170469
+ }
170470
+ return () => {
170471
+ refCount--;
170472
+ innerSub.unsubscribe();
170473
+ if (subscription && refCount === 0 && (isComplete || hasError)) {
170474
+ subscription.unsubscribe();
170475
+ }
170476
+ };
170477
+ });
170478
+ };
170479
+ }
170480
+ var SimpleScheduler = class {
170481
+ _jobRegistry;
170482
+ _schemaRegistry;
170483
+ _internalJobDescriptionMap = /* @__PURE__ */ new Map();
170484
+ _queue = [];
170485
+ _pauseCounter = 0;
170486
+ constructor(_jobRegistry, _schemaRegistry = new core_1.schema.CoreSchemaRegistry()) {
170487
+ this._jobRegistry = _jobRegistry;
170488
+ this._schemaRegistry = _schemaRegistry;
170489
+ }
170490
+ _getInternalDescription(name) {
170491
+ const maybeHandler = this._internalJobDescriptionMap.get(name);
170492
+ if (maybeHandler !== void 0) {
170493
+ return (0, rxjs_1.of)(maybeHandler);
170494
+ }
170495
+ const handler = this._jobRegistry.get(name);
170496
+ return handler.pipe((0, rxjs_1.switchMap)((handler2) => {
170497
+ if (handler2 === null) {
170498
+ return (0, rxjs_1.of)(null);
170499
+ }
170500
+ const description = {
170501
+ // Make a copy of it to be sure it's proper JSON.
170502
+ ...JSON.parse(JSON.stringify(handler2.jobDescription)),
170503
+ name: handler2.jobDescription.name || name,
170504
+ argument: handler2.jobDescription.argument || true,
170505
+ input: handler2.jobDescription.input || true,
170506
+ output: handler2.jobDescription.output || true,
170507
+ channels: handler2.jobDescription.channels || {}
170508
+ };
170509
+ const handlerWithExtra = Object.assign(handler2.bind(void 0), {
170510
+ jobDescription: description,
170511
+ argumentV: this._schemaRegistry.compile(description.argument),
170512
+ inputV: this._schemaRegistry.compile(description.input),
170513
+ outputV: this._schemaRegistry.compile(description.output)
170514
+ });
170515
+ this._internalJobDescriptionMap.set(name, handlerWithExtra);
170516
+ return (0, rxjs_1.of)(handlerWithExtra);
170517
+ }));
170518
+ }
170519
+ /**
170520
+ * Get a job description for a named job.
170521
+ *
170522
+ * @param name The name of the job.
170523
+ * @returns A description, or null if the job is not registered.
170524
+ */
170525
+ getDescription(name) {
170526
+ return (0, rxjs_1.concat)(this._getInternalDescription(name).pipe((0, rxjs_1.map)((x5) => x5 && x5.jobDescription)), (0, rxjs_1.of)(null)).pipe((0, rxjs_1.first)());
170527
+ }
170528
+ /**
170529
+ * Returns true if the job name has been registered.
170530
+ * @param name The name of the job.
170531
+ * @returns True if the job exists, false otherwise.
170532
+ */
170533
+ has(name) {
170534
+ return this.getDescription(name).pipe((0, rxjs_1.map)((x5) => x5 !== null));
170535
+ }
170536
+ /**
170537
+ * Pause the scheduler, temporary queueing _new_ jobs. Returns a resume function that should be
170538
+ * used to resume execution. If multiple `pause()` were called, all their resume functions must
170539
+ * be called before the Scheduler actually starts new jobs. Additional calls to the same resume
170540
+ * function will have no effect.
170541
+ *
170542
+ * Jobs already running are NOT paused. This is pausing the scheduler only.
170543
+ */
170544
+ pause() {
170545
+ let called = false;
170546
+ this._pauseCounter++;
170547
+ return () => {
170548
+ if (!called) {
170549
+ called = true;
170550
+ if (--this._pauseCounter == 0) {
170551
+ const q9 = this._queue;
170552
+ this._queue = [];
170553
+ q9.forEach((fn6) => fn6());
170554
+ }
170555
+ }
170556
+ };
170557
+ }
170558
+ /**
170559
+ * Schedule a job to be run, using its name.
170560
+ * @param name The name of job to be run.
170561
+ * @param argument The argument to send to the job when starting it.
170562
+ * @param options Scheduling options.
170563
+ * @returns The Job being run.
170564
+ */
170565
+ schedule(name, argument, options8) {
170566
+ if (this._pauseCounter > 0) {
170567
+ const waitable = new rxjs_1.Subject();
170568
+ this._queue.push(() => waitable.complete());
170569
+ return this._scheduleJob(name, argument, options8 || {}, waitable);
170570
+ }
170571
+ return this._scheduleJob(name, argument, options8 || {}, rxjs_1.EMPTY);
170572
+ }
170573
+ /**
170574
+ * Filter messages.
170575
+ * @private
170576
+ */
170577
+ _filterJobOutboundMessages(message, state) {
170578
+ switch (message.kind) {
170579
+ case api_1.JobOutboundMessageKind.OnReady:
170580
+ return state == api_1.JobState.Queued;
170581
+ case api_1.JobOutboundMessageKind.Start:
170582
+ return state == api_1.JobState.Ready;
170583
+ case api_1.JobOutboundMessageKind.End:
170584
+ return state == api_1.JobState.Started || state == api_1.JobState.Ready;
170585
+ }
170586
+ return true;
170587
+ }
170588
+ /**
170589
+ * Return a new state. This is just to simplify the reading of the _createJob method.
170590
+ * @private
170591
+ */
170592
+ _updateState(message, state) {
170593
+ switch (message.kind) {
170594
+ case api_1.JobOutboundMessageKind.OnReady:
170595
+ return api_1.JobState.Ready;
170596
+ case api_1.JobOutboundMessageKind.Start:
170597
+ return api_1.JobState.Started;
170598
+ case api_1.JobOutboundMessageKind.End:
170599
+ return api_1.JobState.Ended;
170600
+ }
170601
+ return state;
170602
+ }
170603
+ /**
170604
+ * Create the job.
170605
+ * @private
170606
+ */
170607
+ // eslint-disable-next-line max-lines-per-function
170608
+ _createJob(name, argument, handler, inboundBus, outboundBus) {
170609
+ const schemaRegistry = this._schemaRegistry;
170610
+ const channelsSubject = /* @__PURE__ */ new Map();
170611
+ const channels = /* @__PURE__ */ new Map();
170612
+ let state = api_1.JobState.Queued;
170613
+ let pingId = 0;
170614
+ const input = new rxjs_1.Subject();
170615
+ input.pipe((0, rxjs_1.concatMap)((message) => handler.pipe((0, rxjs_1.switchMap)(async (handler2) => {
170616
+ if (handler2 === null) {
170617
+ throw new exception_1.JobDoesNotExistException(name);
170618
+ }
170619
+ const validator = await handler2.inputV;
170620
+ return validator(message);
170621
+ }))), (0, rxjs_1.filter)((result) => result.success), (0, rxjs_1.map)((result) => result.data)).subscribe((value) => inboundBus.next({ kind: api_1.JobInboundMessageKind.Input, value }));
170622
+ outboundBus = (0, rxjs_1.concat)(
170623
+ outboundBus,
170624
+ // Add an End message at completion. This will be filtered out if the job actually send an
170625
+ // End.
170626
+ handler.pipe((0, rxjs_1.switchMap)((handler2) => {
170627
+ if (handler2) {
170628
+ return (0, rxjs_1.of)({
170629
+ kind: api_1.JobOutboundMessageKind.End,
170630
+ description: handler2.jobDescription
170631
+ });
170632
+ } else {
170633
+ return rxjs_1.EMPTY;
170634
+ }
170635
+ }))
170636
+ ).pipe(
170637
+ (0, rxjs_1.filter)((message) => this._filterJobOutboundMessages(message, state)),
170638
+ // Update internal logic and Job<> members.
170639
+ (0, rxjs_1.tap)((message) => {
170640
+ state = this._updateState(message, state);
170641
+ switch (message.kind) {
170642
+ case api_1.JobOutboundMessageKind.ChannelCreate: {
170643
+ const maybeSubject = channelsSubject.get(message.name);
170644
+ if (!maybeSubject) {
170645
+ const s = new rxjs_1.Subject();
170646
+ channelsSubject.set(message.name, s);
170647
+ channels.set(message.name, s.asObservable());
170648
+ }
170649
+ break;
170650
+ }
170651
+ case api_1.JobOutboundMessageKind.ChannelMessage: {
170652
+ const maybeSubject = channelsSubject.get(message.name);
170653
+ if (maybeSubject) {
170654
+ maybeSubject.next(message.message);
170655
+ }
170656
+ break;
170657
+ }
170658
+ case api_1.JobOutboundMessageKind.ChannelComplete: {
170659
+ const maybeSubject = channelsSubject.get(message.name);
170660
+ if (maybeSubject) {
170661
+ maybeSubject.complete();
170662
+ channelsSubject.delete(message.name);
170663
+ }
170664
+ break;
170665
+ }
170666
+ case api_1.JobOutboundMessageKind.ChannelError: {
170667
+ const maybeSubject = channelsSubject.get(message.name);
170668
+ if (maybeSubject) {
170669
+ maybeSubject.error(message.error);
170670
+ channelsSubject.delete(message.name);
170671
+ }
170672
+ break;
170673
+ }
170674
+ }
170675
+ }, () => {
170676
+ state = api_1.JobState.Errored;
170677
+ }),
170678
+ // Do output validation (might include default values so this might have side
170679
+ // effects). We keep all messages in order.
170680
+ (0, rxjs_1.concatMap)((message) => {
170681
+ if (message.kind !== api_1.JobOutboundMessageKind.Output) {
170682
+ return (0, rxjs_1.of)(message);
170683
+ }
170684
+ return handler.pipe((0, rxjs_1.switchMap)(async (handler2) => {
170685
+ if (handler2 === null) {
170686
+ throw new exception_1.JobDoesNotExistException(name);
170687
+ }
170688
+ const validate = await handler2.outputV;
170689
+ const output2 = await validate(message.value);
170690
+ if (!output2.success) {
170691
+ throw new JobOutputSchemaValidationError(output2.errors);
170692
+ }
170693
+ return {
170694
+ ...message,
170695
+ output: output2.data
170696
+ };
170697
+ }));
170698
+ }),
170699
+ _jobShare()
170700
+ );
170701
+ const output = outboundBus.pipe((0, rxjs_1.filter)((x5) => x5.kind == api_1.JobOutboundMessageKind.Output), (0, rxjs_1.map)((x5) => x5.value), (0, rxjs_1.shareReplay)(1));
170702
+ return {
170703
+ get state() {
170704
+ return state;
170705
+ },
170706
+ argument,
170707
+ description: handler.pipe((0, rxjs_1.switchMap)((handler2) => {
170708
+ if (handler2 === null) {
170709
+ throw new exception_1.JobDoesNotExistException(name);
170710
+ } else {
170711
+ return (0, rxjs_1.of)(handler2.jobDescription);
170712
+ }
170713
+ })),
170714
+ output,
170715
+ getChannel(name2, schema2 = true) {
170716
+ let maybeObservable = channels.get(name2);
170717
+ if (!maybeObservable) {
170718
+ const s = new rxjs_1.Subject();
170719
+ channelsSubject.set(name2, s);
170720
+ channels.set(name2, s.asObservable());
170721
+ maybeObservable = s.asObservable();
170722
+ }
170723
+ return maybeObservable.pipe(
170724
+ // Keep the order of messages.
170725
+ (0, rxjs_1.concatMap)((message) => {
170726
+ return (0, rxjs_1.from)(schemaRegistry.compile(schema2)).pipe((0, rxjs_1.switchMap)((validate) => validate(message)), (0, rxjs_1.filter)((x5) => x5.success), (0, rxjs_1.map)((x5) => x5.data));
170727
+ })
170728
+ );
170729
+ },
170730
+ ping() {
170731
+ const id = pingId++;
170732
+ inboundBus.next({ kind: api_1.JobInboundMessageKind.Ping, id });
170733
+ return outboundBus.pipe((0, rxjs_1.filter)((x5) => x5.kind === api_1.JobOutboundMessageKind.Pong && x5.id == id), (0, rxjs_1.first)(), (0, rxjs_1.ignoreElements)());
170734
+ },
170735
+ stop() {
170736
+ inboundBus.next({ kind: api_1.JobInboundMessageKind.Stop });
170737
+ },
170738
+ input,
170739
+ inboundBus,
170740
+ outboundBus
170741
+ };
170742
+ }
170743
+ _scheduleJob(name, argument, options8, waitable) {
170744
+ const handler = this._getInternalDescription(name);
170745
+ const optionsDeps = options8 && options8.dependencies || [];
170746
+ const dependencies = Array.isArray(optionsDeps) ? optionsDeps : [optionsDeps];
170747
+ const inboundBus = new rxjs_1.Subject();
170748
+ const outboundBus = (0, rxjs_1.concat)(
170749
+ // Wait for dependencies, make sure to not report messages from dependencies. Subscribe to
170750
+ // all dependencies at the same time so they run concurrently.
170751
+ (0, rxjs_1.merge)(...dependencies.map((x5) => x5.outboundBus)).pipe((0, rxjs_1.ignoreElements)()),
170752
+ // Wait for pause() to clear (if necessary).
170753
+ waitable,
170754
+ (0, rxjs_1.from)(handler).pipe((0, rxjs_1.switchMap)((handler2) => new rxjs_1.Observable((subscriber) => {
170755
+ if (!handler2) {
170756
+ throw new exception_1.JobDoesNotExistException(name);
170757
+ }
170758
+ return (0, rxjs_1.from)(handler2.argumentV).pipe((0, rxjs_1.switchMap)((validate) => validate(argument)), (0, rxjs_1.switchMap)((output) => {
170759
+ if (!output.success) {
170760
+ throw new JobArgumentSchemaValidationError(output.errors);
170761
+ }
170762
+ const argument2 = output.data;
170763
+ const description = handler2.jobDescription;
170764
+ subscriber.next({ kind: api_1.JobOutboundMessageKind.OnReady, description });
170765
+ const context = {
170766
+ description,
170767
+ dependencies: [...dependencies],
170768
+ inboundBus: inboundBus.asObservable(),
170769
+ scheduler: this
170770
+ };
170771
+ return handler2(argument2, context);
170772
+ })).subscribe(subscriber);
170773
+ })))
170774
+ );
170775
+ return this._createJob(name, argument, handler, inboundBus, outboundBus);
170776
+ }
170777
+ };
170778
+ exports2.SimpleScheduler = SimpleScheduler;
170779
+ }
170780
+ });
170781
+
170782
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/index.js
170783
+ var require_jobs = __commonJS({
170784
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/index.js"(exports2) {
170785
+ "use strict";
170786
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o2, m2, k6, k23) {
170787
+ if (k23 === void 0)
170788
+ k23 = k6;
170789
+ var desc = Object.getOwnPropertyDescriptor(m2, k6);
170790
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
170791
+ desc = { enumerable: true, get: function() {
170792
+ return m2[k6];
170793
+ } };
170794
+ }
170795
+ Object.defineProperty(o2, k23, desc);
170796
+ } : function(o2, m2, k6, k23) {
170797
+ if (k23 === void 0)
170798
+ k23 = k6;
170799
+ o2[k23] = m2[k6];
170800
+ });
170801
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o2, v5) {
170802
+ Object.defineProperty(o2, "default", { enumerable: true, value: v5 });
170803
+ } : function(o2, v5) {
170804
+ o2["default"] = v5;
170805
+ });
170806
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
170807
+ if (mod && mod.__esModule)
170808
+ return mod;
170809
+ var result = {};
170810
+ if (mod != null) {
170811
+ for (var k6 in mod)
170812
+ if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6))
170813
+ __createBinding2(result, mod, k6);
170814
+ }
170815
+ __setModuleDefault2(result, mod);
170816
+ return result;
170817
+ };
170818
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
170819
+ for (var p4 in m2)
170820
+ if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4))
170821
+ __createBinding2(exports3, m2, p4);
170822
+ };
170823
+ Object.defineProperty(exports2, "__esModule", { value: true });
170824
+ exports2.strategy = void 0;
170825
+ var strategy = __importStar2(require_strategy());
170826
+ exports2.strategy = strategy;
170827
+ __exportStar2(require_api(), exports2);
170828
+ __exportStar2(require_create_job_handler(), exports2);
170829
+ __exportStar2(require_exception3(), exports2);
170830
+ __exportStar2(require_dispatcher(), exports2);
170831
+ __exportStar2(require_fallback_registry(), exports2);
170832
+ __exportStar2(require_simple_registry(), exports2);
170833
+ __exportStar2(require_simple_scheduler(), exports2);
170834
+ }
170835
+ });
170836
+
170837
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.js
170838
+ var require_progress_schema = __commonJS({
170839
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.js"(exports2) {
170840
+ "use strict";
170841
+ Object.defineProperty(exports2, "__esModule", { value: true });
170842
+ exports2.State = void 0;
170843
+ var State;
170844
+ (function(State2) {
170845
+ State2["Error"] = "error";
170846
+ State2["Running"] = "running";
170847
+ State2["Stopped"] = "stopped";
170848
+ State2["Waiting"] = "waiting";
170849
+ })(State || (exports2.State = State = {}));
170850
+ }
170851
+ });
170852
+
170853
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/api.js
170854
+ var require_api2 = __commonJS({
170855
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/api.js"(exports2) {
170856
+ "use strict";
170857
+ Object.defineProperty(exports2, "__esModule", { value: true });
170858
+ exports2.scheduleTargetAndForget = exports2.targetFromTargetString = exports2.targetStringFromTarget = exports2.fromAsyncIterable = exports2.isBuilderOutput = exports2.BuilderProgressState = void 0;
170859
+ var rxjs_1 = require_cjs();
170860
+ var progress_schema_1 = require_progress_schema();
170861
+ Object.defineProperty(exports2, "BuilderProgressState", { enumerable: true, get: function() {
170862
+ return progress_schema_1.State;
170863
+ } });
170864
+ function isBuilderOutput(obj) {
170865
+ if (!obj || typeof obj.then === "function" || typeof obj.subscribe === "function") {
170866
+ return false;
170867
+ }
170868
+ if (typeof obj[Symbol.asyncIterator] === "function") {
170869
+ return false;
170870
+ }
170871
+ return typeof obj.success === "boolean";
170872
+ }
170873
+ exports2.isBuilderOutput = isBuilderOutput;
170874
+ function fromAsyncIterable(iterable) {
170875
+ return new rxjs_1.Observable((subscriber) => {
170876
+ handleAsyncIterator(subscriber, iterable[Symbol.asyncIterator]()).then(() => subscriber.complete(), (error) => subscriber.error(error));
170877
+ });
170878
+ }
170879
+ exports2.fromAsyncIterable = fromAsyncIterable;
170880
+ async function handleAsyncIterator(subscriber, iterator) {
170881
+ const teardown = new Promise((resolve3) => subscriber.add(() => resolve3()));
170882
+ try {
170883
+ while (!subscriber.closed) {
170884
+ const result = await Promise.race([teardown, iterator.next()]);
170885
+ if (!result || result.done) {
170886
+ break;
170887
+ }
170888
+ subscriber.next(result.value);
170889
+ }
170890
+ } finally {
170891
+ await iterator.return?.();
170892
+ }
170893
+ }
170894
+ function targetStringFromTarget({ project, target, configuration }) {
170895
+ return `${project}:${target}${configuration !== void 0 ? ":" + configuration : ""}`;
170896
+ }
170897
+ exports2.targetStringFromTarget = targetStringFromTarget;
170898
+ function targetFromTargetString(specifier, abbreviatedProjectName, abbreviatedTargetName) {
170899
+ const tuple = specifier.split(":", 3);
170900
+ if (tuple.length < 2) {
170901
+ throw new Error("Invalid target string: " + JSON.stringify(specifier));
170902
+ }
170903
+ return {
170904
+ project: tuple[0] || abbreviatedProjectName || "",
170905
+ target: tuple[1] || abbreviatedTargetName || "",
170906
+ ...tuple[2] !== void 0 && { configuration: tuple[2] }
170907
+ };
170908
+ }
170909
+ exports2.targetFromTargetString = targetFromTargetString;
170910
+ function scheduleTargetAndForget(context, target, overrides, scheduleOptions) {
170911
+ let resolve3 = null;
170912
+ const promise = new Promise((r4) => resolve3 = r4);
170913
+ context.addTeardown(() => promise);
170914
+ return (0, rxjs_1.from)(context.scheduleTarget(target, overrides, scheduleOptions)).pipe((0, rxjs_1.switchMap)((run2) => new rxjs_1.Observable((observer) => {
170915
+ const subscription = run2.output.subscribe(observer);
170916
+ return () => {
170917
+ subscription.unsubscribe();
170918
+ run2.stop().then(resolve3);
170919
+ };
170920
+ })));
170921
+ }
170922
+ exports2.scheduleTargetAndForget = scheduleTargetAndForget;
170923
+ }
170924
+ });
170925
+
170926
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.json
170927
+ var require_progress_schema2 = __commonJS({
170928
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.json"(exports2, module2) {
170929
+ module2.exports = {
170930
+ $schema: "http://json-schema.org/draft-07/schema",
170931
+ $id: "BuilderProgressSchema",
170932
+ title: "Progress schema for builders.",
170933
+ type: "object",
170934
+ allOf: [
170935
+ {
170936
+ type: "object",
170937
+ oneOf: [
170938
+ {
170939
+ type: "object",
170940
+ properties: {
170941
+ state: {
170942
+ type: "string",
170943
+ enum: ["stopped"]
170944
+ }
170945
+ },
170946
+ required: ["state"]
170947
+ },
170948
+ {
170949
+ type: "object",
170950
+ properties: {
170951
+ state: {
170952
+ type: "string",
170953
+ enum: ["waiting"]
170954
+ },
170955
+ status: {
170956
+ type: "string"
170957
+ }
170958
+ },
170959
+ required: ["state"]
170960
+ },
170961
+ {
170962
+ type: "object",
170963
+ properties: {
170964
+ state: {
170965
+ type: "string",
170966
+ enum: ["running"]
170967
+ },
170968
+ current: {
170969
+ type: "number",
170970
+ minimum: 0
170971
+ },
170972
+ total: {
170973
+ type: "number",
170974
+ minimum: 0
170975
+ },
170976
+ status: {
170977
+ type: "string"
170978
+ }
170979
+ },
170980
+ required: ["state"]
170981
+ },
170982
+ {
170983
+ type: "object",
170984
+ properties: {
170985
+ state: {
170986
+ type: "string",
170987
+ enum: ["error"]
170988
+ },
170989
+ error: true
170990
+ },
170991
+ required: ["state"]
170992
+ }
170993
+ ]
170994
+ },
170995
+ {
170996
+ type: "object",
170997
+ properties: {
170998
+ builder: {
170999
+ type: "object"
171000
+ },
171001
+ target: {
171002
+ type: "object"
171003
+ },
171004
+ id: {
171005
+ type: "number"
171006
+ }
171007
+ },
171008
+ required: ["builder", "id"]
171009
+ }
171010
+ ]
171011
+ };
171012
+ }
171013
+ });
171014
+
171015
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/schedule-by-name.js
171016
+ var require_schedule_by_name = __commonJS({
171017
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/schedule-by-name.js"(exports2) {
171018
+ "use strict";
171019
+ Object.defineProperty(exports2, "__esModule", { value: true });
171020
+ exports2.scheduleByTarget = exports2.scheduleByName = void 0;
171021
+ var rxjs_1 = require_cjs();
171022
+ var api_1 = require_api2();
171023
+ var jobs_1 = require_jobs();
171024
+ var progressSchema = require_progress_schema2();
171025
+ var _uniqueId = 0;
171026
+ async function scheduleByName(name, buildOptions, options8) {
171027
+ const childLoggerName = options8.target ? `{${(0, api_1.targetStringFromTarget)(options8.target)}}` : name;
171028
+ const logger = options8.logger.createChild(childLoggerName);
171029
+ const job = options8.scheduler.schedule(name, {});
171030
+ let stateSubscription;
171031
+ const workspaceRoot = await options8.workspaceRoot;
171032
+ const currentDirectory = await options8.currentDirectory;
171033
+ const description = await (0, rxjs_1.firstValueFrom)(job.description);
171034
+ const info = description.info;
171035
+ const id = ++_uniqueId;
171036
+ const message = {
171037
+ id,
171038
+ currentDirectory,
171039
+ workspaceRoot,
171040
+ info,
171041
+ options: buildOptions,
171042
+ ...options8.target ? { target: options8.target } : {}
171043
+ };
171044
+ if (job.state !== jobs_1.JobState.Started) {
171045
+ stateSubscription = job.outboundBus.subscribe({
171046
+ next: (event) => {
171047
+ if (event.kind === jobs_1.JobOutboundMessageKind.Start) {
171048
+ job.input.next(message);
171049
+ }
171050
+ },
171051
+ error: () => {
171052
+ }
171053
+ });
171054
+ } else {
171055
+ job.input.next(message);
171056
+ }
171057
+ const logChannelSub = job.getChannel("log").subscribe({
171058
+ next: (entry) => {
171059
+ logger.next(entry);
171060
+ },
171061
+ error: () => {
171062
+ }
171063
+ });
171064
+ const outboundBusSub = job.outboundBus.subscribe({
171065
+ error() {
171066
+ },
171067
+ complete() {
171068
+ outboundBusSub.unsubscribe();
171069
+ logChannelSub.unsubscribe();
171070
+ stateSubscription.unsubscribe();
171071
+ }
171072
+ });
171073
+ const output = job.output.pipe((0, rxjs_1.map)((output2) => ({
171074
+ ...output2,
171075
+ ...options8.target ? { target: options8.target } : 0,
171076
+ info
171077
+ })), (0, rxjs_1.shareReplay)());
171078
+ output.pipe((0, rxjs_1.first)()).subscribe({
171079
+ error: () => {
171080
+ }
171081
+ });
171082
+ return {
171083
+ id,
171084
+ info,
171085
+ // This is a getter so that it always returns the next output, and not the same one.
171086
+ get result() {
171087
+ return (0, rxjs_1.firstValueFrom)(output);
171088
+ },
171089
+ get lastOutput() {
171090
+ return (0, rxjs_1.lastValueFrom)(output);
171091
+ },
171092
+ output,
171093
+ progress: job.getChannel("progress", progressSchema).pipe((0, rxjs_1.shareReplay)(1)),
171094
+ stop() {
171095
+ job.stop();
171096
+ return job.outboundBus.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.catchError)(() => rxjs_1.EMPTY)).toPromise();
171097
+ }
171098
+ };
171099
+ }
171100
+ exports2.scheduleByName = scheduleByName;
171101
+ async function scheduleByTarget(target, overrides, options8) {
171102
+ return scheduleByName(`{${(0, api_1.targetStringFromTarget)(target)}}`, overrides, {
171103
+ ...options8,
171104
+ target,
171105
+ logger: options8.logger
171106
+ });
171107
+ }
171108
+ exports2.scheduleByTarget = scheduleByTarget;
171109
+ }
171110
+ });
171111
+
171112
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/input-schema.json
171113
+ var require_input_schema = __commonJS({
171114
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/input-schema.json"(exports2, module2) {
171115
+ module2.exports = {
171116
+ $schema: "http://json-schema.org/draft-07/schema",
171117
+ $id: "BuilderInputSchema",
171118
+ title: "Input schema for builders.",
171119
+ type: "object",
171120
+ properties: {
171121
+ workspaceRoot: {
171122
+ type: "string"
171123
+ },
171124
+ currentDirectory: {
171125
+ type: "string"
171126
+ },
171127
+ id: {
171128
+ type: "number"
171129
+ },
171130
+ target: {
171131
+ type: "object",
171132
+ properties: {
171133
+ project: {
171134
+ type: "string"
171135
+ },
171136
+ target: {
171137
+ type: "string"
171138
+ },
171139
+ configuration: {
171140
+ type: "string"
171141
+ }
171142
+ },
171143
+ required: ["project", "target"]
171144
+ },
171145
+ info: {
171146
+ type: "object"
171147
+ },
171148
+ options: {
171149
+ type: "object"
171150
+ }
171151
+ },
171152
+ required: ["currentDirectory", "id", "info", "workspaceRoot"]
171153
+ };
171154
+ }
171155
+ });
171156
+
171157
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/output-schema.json
171158
+ var require_output_schema = __commonJS({
171159
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/output-schema.json"(exports2, module2) {
171160
+ module2.exports = {
171161
+ $schema: "http://json-schema.org/draft-07/schema",
171162
+ $id: "BuilderOutputSchema",
171163
+ title: "Output schema for builders.",
171164
+ type: "object",
171165
+ properties: {
171166
+ success: {
171167
+ type: "boolean"
171168
+ },
171169
+ error: {
171170
+ type: "string"
171171
+ },
171172
+ target: {
171173
+ type: "object",
171174
+ properties: {
171175
+ project: {
171176
+ type: "string"
171177
+ },
171178
+ target: {
171179
+ type: "string"
171180
+ },
171181
+ configuration: {
171182
+ type: "string"
171183
+ }
171184
+ }
171185
+ },
171186
+ info: {
171187
+ type: "object"
171188
+ }
171189
+ },
171190
+ additionalProperties: true,
171191
+ required: ["success"]
171192
+ };
171193
+ }
171194
+ });
171195
+
171196
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/architect.js
171197
+ var require_architect = __commonJS({
171198
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/architect.js"(exports2) {
171199
+ "use strict";
171200
+ Object.defineProperty(exports2, "__esModule", { value: true });
171201
+ exports2.Architect = void 0;
171202
+ var core_1 = require_src2();
171203
+ var rxjs_1 = require_cjs();
171204
+ var api_1 = require_api2();
171205
+ var jobs_1 = require_jobs();
171206
+ var schedule_by_name_1 = require_schedule_by_name();
171207
+ var inputSchema = require_input_schema();
171208
+ var outputSchema = require_output_schema();
171209
+ function _createJobHandlerFromBuilderInfo(info, target, host, registry, baseOptions) {
171210
+ const jobDescription = {
171211
+ name: target ? `{${(0, api_1.targetStringFromTarget)(target)}}` : info.builderName,
171212
+ argument: { type: "object" },
171213
+ input: inputSchema,
171214
+ output: outputSchema,
171215
+ info
171216
+ };
171217
+ function handler(argument, context) {
171218
+ const inboundBusWithInputValidation = context.inboundBus.pipe(
171219
+ (0, rxjs_1.concatMap)(async (message) => {
171220
+ if (message.kind === jobs_1.JobInboundMessageKind.Input) {
171221
+ const v5 = message.value;
171222
+ const options8 = {
171223
+ ...baseOptions,
171224
+ ...v5.options
171225
+ };
171226
+ const validation = await registry.compile(info.optionSchema);
171227
+ const validationResult = await validation(options8);
171228
+ const { data, success, errors } = validationResult;
171229
+ if (!success) {
171230
+ throw new core_1.json.schema.SchemaValidationException(errors);
171231
+ }
171232
+ return { ...message, value: { ...v5, options: data } };
171233
+ } else {
171234
+ return message;
171235
+ }
171236
+ }),
171237
+ // Using a share replay because the job might be synchronously sending input, but
171238
+ // asynchronously listening to it.
171239
+ (0, rxjs_1.shareReplay)(1)
171240
+ );
171241
+ const inboundBus = (0, rxjs_1.onErrorResumeNext)(inboundBusWithInputValidation);
171242
+ const output = (0, rxjs_1.from)(host.loadBuilder(info)).pipe(
171243
+ (0, rxjs_1.concatMap)((builder) => {
171244
+ if (builder === null) {
171245
+ throw new Error(`Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}`);
171246
+ }
171247
+ return builder.handler(argument, { ...context, inboundBus }).pipe((0, rxjs_1.map)((output2) => {
171248
+ if (output2.kind === jobs_1.JobOutboundMessageKind.Output) {
171249
+ return {
171250
+ ...output2,
171251
+ value: {
171252
+ ...output2.value,
171253
+ ...target ? { target } : 0
171254
+ }
171255
+ };
171256
+ } else {
171257
+ return output2;
171258
+ }
171259
+ }));
171260
+ }),
171261
+ // Share subscriptions to the output, otherwise the handler will be re-run.
171262
+ (0, rxjs_1.shareReplay)()
171263
+ );
171264
+ const inboundBusErrors = inboundBusWithInputValidation.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.takeUntil)((0, rxjs_1.onErrorResumeNext)(output.pipe((0, rxjs_1.last)()))));
171265
+ return (0, rxjs_1.merge)(inboundBusErrors, output);
171266
+ }
171267
+ return (0, rxjs_1.of)(Object.assign(handler, { jobDescription }));
171268
+ }
171269
+ var ArchitectBuilderJobRegistry = class {
171270
+ _host;
171271
+ _registry;
171272
+ _jobCache;
171273
+ _infoCache;
171274
+ constructor(_host, _registry, _jobCache, _infoCache) {
171275
+ this._host = _host;
171276
+ this._registry = _registry;
171277
+ this._jobCache = _jobCache;
171278
+ this._infoCache = _infoCache;
171279
+ }
171280
+ _resolveBuilder(name) {
171281
+ const cache3 = this._infoCache;
171282
+ if (cache3) {
171283
+ const maybeCache = cache3.get(name);
171284
+ if (maybeCache !== void 0) {
171285
+ return maybeCache;
171286
+ }
171287
+ const info = (0, rxjs_1.from)(this._host.resolveBuilder(name)).pipe((0, rxjs_1.shareReplay)(1));
171288
+ cache3.set(name, info);
171289
+ return info;
171290
+ }
171291
+ return (0, rxjs_1.from)(this._host.resolveBuilder(name));
171292
+ }
171293
+ _createBuilder(info, target, options8) {
171294
+ const cache3 = this._jobCache;
171295
+ if (target) {
171296
+ const maybeHit = cache3 && cache3.get((0, api_1.targetStringFromTarget)(target));
171297
+ if (maybeHit) {
171298
+ return maybeHit;
171299
+ }
171300
+ } else {
171301
+ const maybeHit = cache3 && cache3.get(info.builderName);
171302
+ if (maybeHit) {
171303
+ return maybeHit;
171304
+ }
171305
+ }
171306
+ const result = _createJobHandlerFromBuilderInfo(info, target, this._host, this._registry, options8 || {});
171307
+ if (cache3) {
171308
+ if (target) {
171309
+ cache3.set((0, api_1.targetStringFromTarget)(target), result.pipe((0, rxjs_1.shareReplay)(1)));
171310
+ } else {
171311
+ cache3.set(info.builderName, result.pipe((0, rxjs_1.shareReplay)(1)));
171312
+ }
171313
+ }
171314
+ return result;
171315
+ }
171316
+ get(name) {
171317
+ const m2 = name.match(/^([^:]+):([^:]+)$/i);
171318
+ if (!m2) {
171319
+ return (0, rxjs_1.of)(null);
171320
+ }
171321
+ return (0, rxjs_1.from)(this._resolveBuilder(name)).pipe((0, rxjs_1.concatMap)((builderInfo) => builderInfo ? this._createBuilder(builderInfo) : (0, rxjs_1.of)(null)), (0, rxjs_1.first)(null, null));
171322
+ }
171323
+ };
171324
+ var ArchitectTargetJobRegistry = class extends ArchitectBuilderJobRegistry {
171325
+ get(name) {
171326
+ const m2 = name.match(/^{([^:]+):([^:]+)(?::([^:]*))?}$/i);
171327
+ if (!m2) {
171328
+ return (0, rxjs_1.of)(null);
171329
+ }
171330
+ const target = {
171331
+ project: m2[1],
171332
+ target: m2[2],
171333
+ configuration: m2[3]
171334
+ };
171335
+ return (0, rxjs_1.from)(Promise.all([
171336
+ this._host.getBuilderNameForTarget(target),
171337
+ this._host.getOptionsForTarget(target)
171338
+ ])).pipe((0, rxjs_1.concatMap)(([builderStr, options8]) => {
171339
+ if (builderStr === null || options8 === null) {
171340
+ return (0, rxjs_1.of)(null);
171341
+ }
171342
+ return this._resolveBuilder(builderStr).pipe((0, rxjs_1.concatMap)((builderInfo) => {
171343
+ if (builderInfo === null) {
171344
+ return (0, rxjs_1.of)(null);
171345
+ }
171346
+ return this._createBuilder(builderInfo, target, options8);
171347
+ }));
171348
+ }), (0, rxjs_1.first)(null, null));
171349
+ }
171350
+ };
171351
+ function _getTargetOptionsFactory(host) {
171352
+ return (0, jobs_1.createJobHandler)((target) => {
171353
+ return host.getOptionsForTarget(target).then((options8) => {
171354
+ if (options8 === null) {
171355
+ throw new Error(`Invalid target: ${JSON.stringify(target)}.`);
171356
+ }
171357
+ return options8;
171358
+ });
171359
+ }, {
171360
+ name: "..getTargetOptions",
171361
+ output: { type: "object" },
171362
+ argument: inputSchema.properties.target
171363
+ });
171364
+ }
171365
+ function _getProjectMetadataFactory(host) {
171366
+ return (0, jobs_1.createJobHandler)((target) => {
171367
+ return host.getProjectMetadata(target).then((options8) => {
171368
+ if (options8 === null) {
171369
+ throw new Error(`Invalid target: ${JSON.stringify(target)}.`);
171370
+ }
171371
+ return options8;
171372
+ });
171373
+ }, {
171374
+ name: "..getProjectMetadata",
171375
+ output: { type: "object" },
171376
+ argument: {
171377
+ oneOf: [{ type: "string" }, inputSchema.properties.target]
171378
+ }
171379
+ });
171380
+ }
171381
+ function _getBuilderNameForTargetFactory(host) {
171382
+ return (0, jobs_1.createJobHandler)(async (target) => {
171383
+ const builderName = await host.getBuilderNameForTarget(target);
171384
+ if (!builderName) {
171385
+ throw new Error(`No builder were found for target ${(0, api_1.targetStringFromTarget)(target)}.`);
171386
+ }
171387
+ return builderName;
171388
+ }, {
171389
+ name: "..getBuilderNameForTarget",
171390
+ output: { type: "string" },
171391
+ argument: inputSchema.properties.target
171392
+ });
171393
+ }
171394
+ function _validateOptionsFactory(host, registry) {
171395
+ return (0, jobs_1.createJobHandler)(async ([builderName, options8]) => {
171396
+ const builderInfo = await host.resolveBuilder(builderName);
171397
+ if (!builderInfo) {
171398
+ throw new Error(`No builder info were found for builder ${JSON.stringify(builderName)}.`);
171399
+ }
171400
+ const validation = await registry.compile(builderInfo.optionSchema);
171401
+ const { data, success, errors } = await validation(options8);
171402
+ if (!success) {
171403
+ throw new core_1.json.schema.SchemaValidationException(errors);
171404
+ }
171405
+ return data;
171406
+ }, {
171407
+ name: "..validateOptions",
171408
+ output: { type: "object" },
171409
+ argument: {
171410
+ type: "array",
171411
+ items: [{ type: "string" }, { type: "object" }]
171412
+ }
171413
+ });
171414
+ }
171415
+ var Architect = class {
171416
+ _host;
171417
+ _scheduler;
171418
+ _jobCache = /* @__PURE__ */ new Map();
171419
+ _infoCache = /* @__PURE__ */ new Map();
171420
+ constructor(_host, registry = new core_1.json.schema.CoreSchemaRegistry(), additionalJobRegistry) {
171421
+ this._host = _host;
171422
+ const privateArchitectJobRegistry = new jobs_1.SimpleJobRegistry();
171423
+ privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host));
171424
+ privateArchitectJobRegistry.register(_getBuilderNameForTargetFactory(_host));
171425
+ privateArchitectJobRegistry.register(_validateOptionsFactory(_host, registry));
171426
+ privateArchitectJobRegistry.register(_getProjectMetadataFactory(_host));
171427
+ const jobRegistry = new jobs_1.FallbackRegistry([
171428
+ new ArchitectTargetJobRegistry(_host, registry, this._jobCache, this._infoCache),
171429
+ new ArchitectBuilderJobRegistry(_host, registry, this._jobCache, this._infoCache),
171430
+ privateArchitectJobRegistry,
171431
+ ...additionalJobRegistry ? [additionalJobRegistry] : []
171432
+ ]);
171433
+ this._scheduler = new jobs_1.SimpleScheduler(jobRegistry, registry);
171434
+ }
171435
+ has(name) {
171436
+ return this._scheduler.has(name);
171437
+ }
171438
+ scheduleBuilder(name, options8, scheduleOptions = {}) {
171439
+ if (!/^[^:]+:[^:]+(:[^:]+)?$/.test(name)) {
171440
+ throw new Error("Invalid builder name: " + JSON.stringify(name));
171441
+ }
171442
+ return (0, schedule_by_name_1.scheduleByName)(name, options8, {
171443
+ scheduler: this._scheduler,
171444
+ logger: scheduleOptions.logger || new core_1.logging.NullLogger(),
171445
+ currentDirectory: this._host.getCurrentDirectory(),
171446
+ workspaceRoot: this._host.getWorkspaceRoot()
171447
+ });
171448
+ }
171449
+ scheduleTarget(target, overrides = {}, scheduleOptions = {}) {
171450
+ return (0, schedule_by_name_1.scheduleByTarget)(target, overrides, {
171451
+ scheduler: this._scheduler,
171452
+ logger: scheduleOptions.logger || new core_1.logging.NullLogger(),
171453
+ currentDirectory: this._host.getCurrentDirectory(),
171454
+ workspaceRoot: this._host.getWorkspaceRoot()
171455
+ });
171456
+ }
171457
+ };
171458
+ exports2.Architect = Architect;
171459
+ }
171460
+ });
171461
+
171462
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/internal.js
171463
+ var require_internal = __commonJS({
171464
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/internal.js"(exports2) {
171465
+ "use strict";
171466
+ Object.defineProperty(exports2, "__esModule", { value: true });
171467
+ exports2.BuilderVersionSymbol = exports2.BuilderSymbol = void 0;
171468
+ exports2.BuilderSymbol = Symbol.for("@angular-devkit/architect:builder");
171469
+ exports2.BuilderVersionSymbol = Symbol.for("@angular-devkit/architect:version");
171470
+ }
171471
+ });
171472
+
171473
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/package.json
171474
+ var require_package3 = __commonJS({
171475
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/package.json"(exports2, module2) {
171476
+ module2.exports = {
171477
+ name: "@angular-devkit/architect",
171478
+ version: "0.1702.0",
171479
+ description: "Angular Build Facade",
171480
+ experimental: true,
171481
+ main: "src/index.js",
171482
+ typings: "src/index.d.ts",
171483
+ dependencies: {
171484
+ "@angular-devkit/core": "17.2.0",
171485
+ rxjs: "7.8.1"
171486
+ },
171487
+ builders: "./builders/builders.json",
171488
+ keywords: [
171489
+ "Angular CLI",
171490
+ "Angular DevKit",
171491
+ "angular",
171492
+ "devkit",
171493
+ "sdk"
171494
+ ],
171495
+ repository: {
171496
+ type: "git",
171497
+ url: "https://github.com/angular/angular-cli.git"
171498
+ },
171499
+ engines: {
171500
+ node: "^18.13.0 || >=20.9.0",
171501
+ npm: "^6.11.0 || ^7.5.6 || >=8.0.0",
171502
+ yarn: ">= 1.13.0"
171503
+ },
171504
+ author: "Angular Authors",
171505
+ license: "MIT",
171506
+ bugs: {
171507
+ url: "https://github.com/angular/angular-cli/issues"
171508
+ },
171509
+ homepage: "https://github.com/angular/angular-cli"
171510
+ };
171511
+ }
171512
+ });
171513
+
171514
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/create-builder.js
171515
+ var require_create_builder = __commonJS({
171516
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/create-builder.js"(exports2) {
171517
+ "use strict";
171518
+ Object.defineProperty(exports2, "__esModule", { value: true });
171519
+ exports2.createBuilder = void 0;
171520
+ var core_1 = require_src2();
171521
+ var rxjs_1 = require_cjs();
171522
+ var api_1 = require_api2();
171523
+ var internal_1 = require_internal();
171524
+ var jobs_1 = require_jobs();
171525
+ var schedule_by_name_1 = require_schedule_by_name();
171526
+ function createBuilder2(fn6) {
171527
+ const cjh = jobs_1.createJobHandler;
171528
+ const handler = cjh((options8, context) => {
171529
+ const scheduler = context.scheduler;
171530
+ const progressChannel = context.createChannel("progress");
171531
+ const logChannel = context.createChannel("log");
171532
+ const addTeardown = context.addTeardown.bind(context);
171533
+ let currentState = api_1.BuilderProgressState.Stopped;
171534
+ let current = 0;
171535
+ let status = "";
171536
+ let total = 1;
171537
+ function log(entry) {
171538
+ logChannel.next(entry);
171539
+ }
171540
+ function progress(progress2, context2) {
171541
+ currentState = progress2.state;
171542
+ if (progress2.state === api_1.BuilderProgressState.Running) {
171543
+ current = progress2.current;
171544
+ total = progress2.total !== void 0 ? progress2.total : total;
171545
+ if (progress2.status === void 0) {
171546
+ progress2.status = status;
171547
+ } else {
171548
+ status = progress2.status;
171549
+ }
171550
+ }
171551
+ progressChannel.next({
171552
+ ...progress2,
171553
+ ...context2.target && { target: context2.target },
171554
+ ...context2.builder && { builder: context2.builder },
171555
+ id: context2.id
171556
+ });
171557
+ }
171558
+ return new rxjs_1.Observable((observer) => {
171559
+ const subscriptions = [];
171560
+ const inputSubscription = context.inboundBus.subscribe((i3) => {
171561
+ switch (i3.kind) {
171562
+ case jobs_1.JobInboundMessageKind.Input:
171563
+ onInput(i3.value);
171564
+ break;
171565
+ }
171566
+ });
171567
+ function onInput(i3) {
171568
+ const builder = i3.info;
171569
+ const loggerName = i3.target ? (0, api_1.targetStringFromTarget)(i3.target) : builder.builderName;
171570
+ const logger = new core_1.logging.Logger(loggerName);
171571
+ subscriptions.push(logger.subscribe((entry) => log(entry)));
171572
+ const context2 = {
171573
+ builder,
171574
+ workspaceRoot: i3.workspaceRoot,
171575
+ currentDirectory: i3.currentDirectory,
171576
+ target: i3.target,
171577
+ logger,
171578
+ id: i3.id,
171579
+ async scheduleTarget(target, overrides = {}, scheduleOptions = {}) {
171580
+ const run2 = await (0, schedule_by_name_1.scheduleByTarget)(target, overrides, {
171581
+ scheduler,
171582
+ logger: scheduleOptions.logger || logger.createChild(""),
171583
+ workspaceRoot: i3.workspaceRoot,
171584
+ currentDirectory: i3.currentDirectory
171585
+ });
171586
+ subscriptions.push(run2.progress.subscribe((event) => progressChannel.next(event)));
171587
+ return run2;
171588
+ },
171589
+ async scheduleBuilder(builderName, options9 = {}, scheduleOptions = {}) {
171590
+ const run2 = await (0, schedule_by_name_1.scheduleByName)(builderName, options9, {
171591
+ scheduler,
171592
+ target: scheduleOptions.target,
171593
+ logger: scheduleOptions.logger || logger.createChild(""),
171594
+ workspaceRoot: i3.workspaceRoot,
171595
+ currentDirectory: i3.currentDirectory
171596
+ });
171597
+ subscriptions.push(run2.progress.subscribe((event) => progressChannel.next(event)));
171598
+ return run2;
171599
+ },
171600
+ async getTargetOptions(target) {
171601
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getTargetOptions", target).output);
171602
+ },
171603
+ async getProjectMetadata(target) {
171604
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getProjectMetadata", target).output);
171605
+ },
171606
+ async getBuilderNameForTarget(target) {
171607
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getBuilderNameForTarget", target).output);
171608
+ },
171609
+ async validateOptions(options9, builderName) {
171610
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..validateOptions", [builderName, options9]).output);
171611
+ },
171612
+ reportRunning() {
171613
+ switch (currentState) {
171614
+ case api_1.BuilderProgressState.Waiting:
171615
+ case api_1.BuilderProgressState.Stopped:
171616
+ progress({ state: api_1.BuilderProgressState.Running, current: 0, total }, context2);
171617
+ break;
171618
+ }
171619
+ },
171620
+ reportStatus(status2) {
171621
+ switch (currentState) {
171622
+ case api_1.BuilderProgressState.Running:
171623
+ progress({ state: currentState, status: status2, current, total }, context2);
171624
+ break;
171625
+ case api_1.BuilderProgressState.Waiting:
171626
+ progress({ state: currentState, status: status2 }, context2);
171627
+ break;
171628
+ }
171629
+ },
171630
+ reportProgress(current2, total2, status2) {
171631
+ switch (currentState) {
171632
+ case api_1.BuilderProgressState.Running:
171633
+ progress({ state: currentState, current: current2, total: total2, status: status2 }, context2);
171634
+ }
171635
+ },
171636
+ addTeardown
171637
+ };
171638
+ context2.reportRunning();
171639
+ let result;
171640
+ try {
171641
+ result = fn6(i3.options, context2);
171642
+ if ((0, api_1.isBuilderOutput)(result)) {
171643
+ result = (0, rxjs_1.of)(result);
171644
+ } else if (!(0, rxjs_1.isObservable)(result) && isAsyncIterable(result)) {
171645
+ result = (0, api_1.fromAsyncIterable)(result);
171646
+ } else {
171647
+ result = (0, rxjs_1.from)(result);
171648
+ }
171649
+ } catch (e3) {
171650
+ result = (0, rxjs_1.throwError)(e3);
171651
+ }
171652
+ progress({ state: api_1.BuilderProgressState.Running, current: 0, total: 1 }, context2);
171653
+ subscriptions.push(result.pipe((0, rxjs_1.defaultIfEmpty)({ success: false }), (0, rxjs_1.tap)(() => {
171654
+ progress({ state: api_1.BuilderProgressState.Running, current: total }, context2);
171655
+ progress({ state: api_1.BuilderProgressState.Stopped }, context2);
171656
+ }), (0, rxjs_1.mergeMap)(async (value) => {
171657
+ await new Promise(setImmediate);
171658
+ return value;
171659
+ })).subscribe((message) => observer.next(message), (error) => observer.error(error), () => observer.complete()));
171660
+ }
171661
+ return () => {
171662
+ subscriptions.forEach((x5) => x5.unsubscribe());
171663
+ inputSubscription.unsubscribe();
171664
+ };
171665
+ });
171666
+ });
171667
+ return {
171668
+ handler,
171669
+ [internal_1.BuilderSymbol]: true,
171670
+ [internal_1.BuilderVersionSymbol]: require_package3().version
171671
+ };
171672
+ }
171673
+ exports2.createBuilder = createBuilder2;
171674
+ function isAsyncIterable(obj) {
171675
+ return !!obj && typeof obj[Symbol.asyncIterator] === "function";
171676
+ }
171677
+ }
171678
+ });
171679
+
171680
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/index.js
171681
+ var require_src4 = __commonJS({
171682
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/index.js"(exports2) {
171683
+ "use strict";
171684
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o2, m2, k6, k23) {
171685
+ if (k23 === void 0)
171686
+ k23 = k6;
171687
+ var desc = Object.getOwnPropertyDescriptor(m2, k6);
171688
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
171689
+ desc = { enumerable: true, get: function() {
171690
+ return m2[k6];
171691
+ } };
171692
+ }
171693
+ Object.defineProperty(o2, k23, desc);
171694
+ } : function(o2, m2, k6, k23) {
171695
+ if (k23 === void 0)
171696
+ k23 = k6;
171697
+ o2[k23] = m2[k6];
171698
+ });
171699
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o2, v5) {
171700
+ Object.defineProperty(o2, "default", { enumerable: true, value: v5 });
171701
+ } : function(o2, v5) {
171702
+ o2["default"] = v5;
171703
+ });
171704
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
171705
+ if (mod && mod.__esModule)
171706
+ return mod;
171707
+ var result = {};
171708
+ if (mod != null) {
171709
+ for (var k6 in mod)
171710
+ if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6))
171711
+ __createBinding2(result, mod, k6);
171712
+ }
171713
+ __setModuleDefault2(result, mod);
171714
+ return result;
171715
+ };
171716
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
171717
+ for (var p4 in m2)
171718
+ if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4))
171719
+ __createBinding2(exports3, m2, p4);
171720
+ };
171721
+ Object.defineProperty(exports2, "__esModule", { value: true });
171722
+ exports2.jobs = exports2.createBuilder = exports2.Architect = void 0;
171723
+ var jobs = __importStar2(require_jobs());
171724
+ exports2.jobs = jobs;
171725
+ __exportStar2(require_api2(), exports2);
171726
+ var architect_1 = require_architect();
171727
+ Object.defineProperty(exports2, "Architect", { enumerable: true, get: function() {
171728
+ return architect_1.Architect;
171729
+ } });
171730
+ var create_builder_1 = require_create_builder();
171731
+ Object.defineProperty(exports2, "createBuilder", { enumerable: true, get: function() {
171732
+ return create_builder_1.createBuilder;
171733
+ } });
171734
+ }
171735
+ });
171736
+
170029
171737
  // node_modules/.pnpm/@nx+devkit@18.0.4_nx@18.0.4/node_modules/@nx/devkit/src/utils/convert-nx-executor.js
170030
171738
  var require_convert_nx_executor = __commonJS({
170031
171739
  "node_modules/.pnpm/@nx+devkit@18.0.4_nx@18.0.4/node_modules/@nx/devkit/src/utils/convert-nx-executor.js"(exports2) {
@@ -170068,7 +171776,7 @@ var require_convert_nx_executor = __commonJS({
170068
171776
  };
170069
171777
  return toObservable(promise());
170070
171778
  };
170071
- return require("@angular-devkit/architect").createBuilder(builderFunction);
171779
+ return require_src4().createBuilder(builderFunction);
170072
171780
  }
170073
171781
  exports2.convertNxExecutor = convertNxExecutor;
170074
171782
  function toObservable(promiseOrAsyncIterator) {
@@ -173553,7 +175261,7 @@ var require_common4 = __commonJS({
173553
175261
  });
173554
175262
 
173555
175263
  // node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js
173556
- var require_exception3 = __commonJS({
175264
+ var require_exception4 = __commonJS({
173557
175265
  "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js"(exports2, module2) {
173558
175266
  "use strict";
173559
175267
  function formatError2(exception2, compact) {
@@ -173682,7 +175390,7 @@ var require_snippet = __commonJS({
173682
175390
  var require_type = __commonJS({
173683
175391
  "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js"(exports2, module2) {
173684
175392
  "use strict";
173685
- var YAMLException = require_exception3();
175393
+ var YAMLException = require_exception4();
173686
175394
  var TYPE_CONSTRUCTOR_OPTIONS2 = [
173687
175395
  "kind",
173688
175396
  "multi",
@@ -173746,7 +175454,7 @@ var require_type = __commonJS({
173746
175454
  var require_schema3 = __commonJS({
173747
175455
  "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js"(exports2, module2) {
173748
175456
  "use strict";
173749
- var YAMLException = require_exception3();
175457
+ var YAMLException = require_exception4();
173750
175458
  var Type = require_type();
173751
175459
  function compileList2(schema2, name) {
173752
175460
  var result = [];
@@ -174526,7 +176234,7 @@ var require_loader = __commonJS({
174526
176234
  "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js"(exports2, module2) {
174527
176235
  "use strict";
174528
176236
  var common2 = require_common4();
174529
- var YAMLException = require_exception3();
176237
+ var YAMLException = require_exception4();
174530
176238
  var makeSnippet2 = require_snippet();
174531
176239
  var DEFAULT_SCHEMA = require_default();
174532
176240
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -175694,7 +177402,7 @@ var require_dumper = __commonJS({
175694
177402
  "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js"(exports2, module2) {
175695
177403
  "use strict";
175696
177404
  var common2 = require_common4();
175697
- var YAMLException = require_exception3();
177405
+ var YAMLException = require_exception4();
175698
177406
  var DEFAULT_SCHEMA = require_default();
175699
177407
  var _toString = Object.prototype.toString;
175700
177408
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -176349,7 +178057,7 @@ var require_js_yaml = __commonJS({
176349
178057
  module2.exports.load = loader2.load;
176350
178058
  module2.exports.loadAll = loader2.loadAll;
176351
178059
  module2.exports.dump = dumper.dump;
176352
- module2.exports.YAMLException = require_exception3();
178060
+ module2.exports.YAMLException = require_exception4();
176353
178061
  module2.exports.types = {
176354
178062
  binary: require_binary(),
176355
178063
  float: require_float(),
@@ -389598,7 +391306,7 @@ var require_project_name_and_root_utils = __commonJS({
389598
391306
  });
389599
391307
 
389600
391308
  // node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.8__oaspw4qzot3q5cbpg4tbrofywy/node_modules/@nx/js/package.json
389601
- var require_package3 = __commonJS({
391309
+ var require_package4 = __commonJS({
389602
391310
  "node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.8__oaspw4qzot3q5cbpg4tbrofywy/node_modules/@nx/js/package.json"(exports2, module2) {
389603
391311
  module2.exports = {
389604
391312
  name: "@nx/js",
@@ -389685,7 +391393,7 @@ var require_versions2 = __commonJS({
389685
391393
  "use strict";
389686
391394
  Object.defineProperty(exports2, "__esModule", { value: true });
389687
391395
  exports2.supportedTypescriptVersions = exports2.typescriptVersion = exports2.verdaccioVersion = exports2.typesNodeVersion = exports2.tsLibVersion = exports2.swcNodeVersion = exports2.swcHelpersVersion = exports2.swcCoreVersion = exports2.swcCliVersion = exports2.prettierVersion = exports2.esbuildVersion = exports2.nxVersion = void 0;
389688
- exports2.nxVersion = require_package3().version;
391396
+ exports2.nxVersion = require_package4().version;
389689
391397
  exports2.esbuildVersion = "^0.19.2";
389690
391398
  exports2.prettierVersion = "^2.6.2";
389691
391399
  exports2.swcCliVersion = "~0.1.62";
@@ -397226,7 +398934,7 @@ var require_library = __commonJS({
397226
398934
  });
397227
398935
 
397228
398936
  // node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.8__oaspw4qzot3q5cbpg4tbrofywy/node_modules/@nx/js/src/index.js
397229
- var require_src4 = __commonJS({
398937
+ var require_src5 = __commonJS({
397230
398938
  "node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.8__oaspw4qzot3q5cbpg4tbrofywy/node_modules/@nx/js/src/index.js"(exports2) {
397231
398939
  "use strict";
397232
398940
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -398387,7 +400095,7 @@ var require_update_package_scripts = __commonJS({
398387
400095
  });
398388
400096
 
398389
400097
  // node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_7aktmktxtgbbkeb4gyh2xljcra/node_modules/@nx/eslint/package.json
398390
- var require_package4 = __commonJS({
400098
+ var require_package5 = __commonJS({
398391
400099
  "node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_7aktmktxtgbbkeb4gyh2xljcra/node_modules/@nx/eslint/package.json"(exports2, module2) {
398392
400100
  module2.exports = {
398393
400101
  name: "@nx/eslint",
@@ -398450,7 +400158,7 @@ var require_versions3 = __commonJS({
398450
400158
  "use strict";
398451
400159
  Object.defineProperty(exports2, "__esModule", { value: true });
398452
400160
  exports2.typescriptESLintVersion = exports2.eslintConfigPrettierVersion = exports2.eslintrcVersion = exports2.eslintVersion = exports2.nxVersion = void 0;
398453
- exports2.nxVersion = require_package4().version;
400161
+ exports2.nxVersion = require_package5().version;
398454
400162
  exports2.eslintVersion = "~8.48.0";
398455
400163
  exports2.eslintrcVersion = "^2.1.1";
398456
400164
  exports2.eslintConfigPrettierVersion = "^9.0.0";
@@ -399245,7 +400953,7 @@ ${Object.keys(options8).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2
399245
400953
  // packages/workspace-tools/src/base/typescript-library-generator.ts
399246
400954
  var import_devkit = __toESM(require_devkit());
399247
400955
  var import_project_name_and_root_utils = __toESM(require_project_name_and_root_utils());
399248
- var import_js = __toESM(require_src4());
400956
+ var import_js = __toESM(require_src5());
399249
400957
  var import_init = __toESM(require_init());
399250
400958
  var import_generator = __toESM(require_generator());
399251
400959
 
@@ -400672,6 +402380,141 @@ safe-buffer/index.js:
400672
402380
  * found in the LICENSE file at https://angular.io/license
400673
402381
  *)
400674
402382
 
402383
+ @angular-devkit/architect/src/jobs/api.js:
402384
+ (**
402385
+ * @license
402386
+ * Copyright Google LLC All Rights Reserved.
402387
+ *
402388
+ * Use of this source code is governed by an MIT-style license that can be
402389
+ * found in the LICENSE file at https://angular.io/license
402390
+ *)
402391
+
402392
+ @angular-devkit/architect/src/jobs/strategy.js:
402393
+ (**
402394
+ * @license
402395
+ * Copyright Google LLC All Rights Reserved.
402396
+ *
402397
+ * Use of this source code is governed by an MIT-style license that can be
402398
+ * found in the LICENSE file at https://angular.io/license
402399
+ *)
402400
+
402401
+ @angular-devkit/architect/src/jobs/create-job-handler.js:
402402
+ (**
402403
+ * @license
402404
+ * Copyright Google LLC All Rights Reserved.
402405
+ *
402406
+ * Use of this source code is governed by an MIT-style license that can be
402407
+ * found in the LICENSE file at https://angular.io/license
402408
+ *)
402409
+
402410
+ @angular-devkit/architect/src/jobs/exception.js:
402411
+ (**
402412
+ * @license
402413
+ * Copyright Google LLC All Rights Reserved.
402414
+ *
402415
+ * Use of this source code is governed by an MIT-style license that can be
402416
+ * found in the LICENSE file at https://angular.io/license
402417
+ *)
402418
+
402419
+ @angular-devkit/architect/src/jobs/dispatcher.js:
402420
+ (**
402421
+ * @license
402422
+ * Copyright Google LLC All Rights Reserved.
402423
+ *
402424
+ * Use of this source code is governed by an MIT-style license that can be
402425
+ * found in the LICENSE file at https://angular.io/license
402426
+ *)
402427
+
402428
+ @angular-devkit/architect/src/jobs/fallback-registry.js:
402429
+ (**
402430
+ * @license
402431
+ * Copyright Google LLC All Rights Reserved.
402432
+ *
402433
+ * Use of this source code is governed by an MIT-style license that can be
402434
+ * found in the LICENSE file at https://angular.io/license
402435
+ *)
402436
+
402437
+ @angular-devkit/architect/src/jobs/simple-registry.js:
402438
+ (**
402439
+ * @license
402440
+ * Copyright Google LLC All Rights Reserved.
402441
+ *
402442
+ * Use of this source code is governed by an MIT-style license that can be
402443
+ * found in the LICENSE file at https://angular.io/license
402444
+ *)
402445
+
402446
+ @angular-devkit/architect/src/jobs/simple-scheduler.js:
402447
+ (**
402448
+ * @license
402449
+ * Copyright Google LLC All Rights Reserved.
402450
+ *
402451
+ * Use of this source code is governed by an MIT-style license that can be
402452
+ * found in the LICENSE file at https://angular.io/license
402453
+ *)
402454
+
402455
+ @angular-devkit/architect/src/jobs/index.js:
402456
+ (**
402457
+ * @license
402458
+ * Copyright Google LLC All Rights Reserved.
402459
+ *
402460
+ * Use of this source code is governed by an MIT-style license that can be
402461
+ * found in the LICENSE file at https://angular.io/license
402462
+ *)
402463
+
402464
+ @angular-devkit/architect/src/api.js:
402465
+ (**
402466
+ * @license
402467
+ * Copyright Google LLC All Rights Reserved.
402468
+ *
402469
+ * Use of this source code is governed by an MIT-style license that can be
402470
+ * found in the LICENSE file at https://angular.io/license
402471
+ *)
402472
+
402473
+ @angular-devkit/architect/src/schedule-by-name.js:
402474
+ (**
402475
+ * @license
402476
+ * Copyright Google LLC All Rights Reserved.
402477
+ *
402478
+ * Use of this source code is governed by an MIT-style license that can be
402479
+ * found in the LICENSE file at https://angular.io/license
402480
+ *)
402481
+
402482
+ @angular-devkit/architect/src/architect.js:
402483
+ (**
402484
+ * @license
402485
+ * Copyright Google LLC All Rights Reserved.
402486
+ *
402487
+ * Use of this source code is governed by an MIT-style license that can be
402488
+ * found in the LICENSE file at https://angular.io/license
402489
+ *)
402490
+
402491
+ @angular-devkit/architect/src/internal.js:
402492
+ (**
402493
+ * @license
402494
+ * Copyright Google LLC All Rights Reserved.
402495
+ *
402496
+ * Use of this source code is governed by an MIT-style license that can be
402497
+ * found in the LICENSE file at https://angular.io/license
402498
+ *)
402499
+
402500
+ @angular-devkit/architect/src/create-builder.js:
402501
+ (**
402502
+ * @license
402503
+ * Copyright Google LLC All Rights Reserved.
402504
+ *
402505
+ * Use of this source code is governed by an MIT-style license that can be
402506
+ * found in the LICENSE file at https://angular.io/license
402507
+ *)
402508
+
402509
+ @angular-devkit/architect/src/index.js:
402510
+ (**
402511
+ * @license
402512
+ * Copyright Google LLC All Rights Reserved.
402513
+ *
402514
+ * Use of this source code is governed by an MIT-style license that can be
402515
+ * found in the LICENSE file at https://angular.io/license
402516
+ *)
402517
+
400675
402518
  typescript/lib/typescript.js:
400676
402519
  (*! *****************************************************************************
400677
402520
  Copyright (c) Microsoft Corporation. All rights reserved.