@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.
package/index.js CHANGED
@@ -384528,6 +384528,1714 @@ var require_invoke_nx_generator = __commonJS({
384528
384528
  }
384529
384529
  });
384530
384530
 
384531
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/api.js
384532
+ var require_api = __commonJS({
384533
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/api.js"(exports2) {
384534
+ "use strict";
384535
+ Object.defineProperty(exports2, "__esModule", { value: true });
384536
+ exports2.isJobHandler = exports2.JobState = exports2.JobOutboundMessageKind = exports2.JobInboundMessageKind = void 0;
384537
+ var JobInboundMessageKind;
384538
+ (function(JobInboundMessageKind2) {
384539
+ JobInboundMessageKind2["Ping"] = "ip";
384540
+ JobInboundMessageKind2["Stop"] = "is";
384541
+ JobInboundMessageKind2["Input"] = "in";
384542
+ })(JobInboundMessageKind || (exports2.JobInboundMessageKind = JobInboundMessageKind = {}));
384543
+ var JobOutboundMessageKind;
384544
+ (function(JobOutboundMessageKind2) {
384545
+ JobOutboundMessageKind2["OnReady"] = "c";
384546
+ JobOutboundMessageKind2["Start"] = "s";
384547
+ JobOutboundMessageKind2["End"] = "e";
384548
+ JobOutboundMessageKind2["Pong"] = "p";
384549
+ JobOutboundMessageKind2["Output"] = "o";
384550
+ JobOutboundMessageKind2["ChannelCreate"] = "cn";
384551
+ JobOutboundMessageKind2["ChannelMessage"] = "cm";
384552
+ JobOutboundMessageKind2["ChannelError"] = "ce";
384553
+ JobOutboundMessageKind2["ChannelComplete"] = "cc";
384554
+ })(JobOutboundMessageKind || (exports2.JobOutboundMessageKind = JobOutboundMessageKind = {}));
384555
+ var JobState;
384556
+ (function(JobState2) {
384557
+ JobState2["Queued"] = "queued";
384558
+ JobState2["Ready"] = "ready";
384559
+ JobState2["Started"] = "started";
384560
+ JobState2["Ended"] = "ended";
384561
+ JobState2["Errored"] = "errored";
384562
+ })(JobState || (exports2.JobState = JobState = {}));
384563
+ function isJobHandler(value) {
384564
+ const job = value;
384565
+ return typeof job == "function" && typeof job.jobDescription == "object" && job.jobDescription !== null;
384566
+ }
384567
+ exports2.isJobHandler = isJobHandler;
384568
+ }
384569
+ });
384570
+
384571
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/strategy.js
384572
+ var require_strategy = __commonJS({
384573
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/strategy.js"(exports2) {
384574
+ "use strict";
384575
+ Object.defineProperty(exports2, "__esModule", { value: true });
384576
+ exports2.memoize = exports2.reuse = exports2.serialize = void 0;
384577
+ var core_1 = require_src2();
384578
+ var rxjs_1 = require_cjs();
384579
+ var api_1 = require_api();
384580
+ function serialize() {
384581
+ let latest = (0, rxjs_1.of)();
384582
+ return (handler, options8) => {
384583
+ const newHandler = (argument, context) => {
384584
+ const previous = latest;
384585
+ 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));
384586
+ return latest;
384587
+ };
384588
+ return Object.assign(newHandler, {
384589
+ jobDescription: Object.assign({}, handler.jobDescription, options8)
384590
+ });
384591
+ };
384592
+ }
384593
+ exports2.serialize = serialize;
384594
+ function reuse(replayMessages = false) {
384595
+ let inboundBus = new rxjs_1.Subject();
384596
+ let run2 = null;
384597
+ let state = null;
384598
+ return (handler, options8) => {
384599
+ const newHandler = (argument, context) => {
384600
+ const subscription = context.inboundBus.subscribe(inboundBus);
384601
+ if (run2) {
384602
+ return (0, rxjs_1.concat)(
384603
+ // Update state.
384604
+ (0, rxjs_1.of)(state),
384605
+ run2
384606
+ ).pipe((0, rxjs_1.finalize)(() => subscription.unsubscribe()));
384607
+ }
384608
+ run2 = handler(argument, { ...context, inboundBus: inboundBus.asObservable() }).pipe((0, rxjs_1.tap)((message) => {
384609
+ if (message.kind == api_1.JobOutboundMessageKind.Start || message.kind == api_1.JobOutboundMessageKind.OnReady || message.kind == api_1.JobOutboundMessageKind.End) {
384610
+ state = message;
384611
+ }
384612
+ }, void 0, () => {
384613
+ subscription.unsubscribe();
384614
+ inboundBus = new rxjs_1.Subject();
384615
+ run2 = null;
384616
+ }), replayMessages ? (0, rxjs_1.shareReplay)() : (0, rxjs_1.share)());
384617
+ return run2;
384618
+ };
384619
+ return Object.assign(newHandler, handler, options8 || {});
384620
+ };
384621
+ }
384622
+ exports2.reuse = reuse;
384623
+ function memoize(replayMessages = false) {
384624
+ const runs = /* @__PURE__ */ new Map();
384625
+ return (handler, options8) => {
384626
+ const newHandler = (argument, context) => {
384627
+ const argumentJson = JSON.stringify((0, core_1.isJsonObject)(argument) ? Object.keys(argument).sort().reduce((result, key2) => {
384628
+ result[key2] = argument[key2];
384629
+ return result;
384630
+ }, {}) : argument);
384631
+ const maybeJob = runs.get(argumentJson);
384632
+ if (maybeJob) {
384633
+ return maybeJob;
384634
+ }
384635
+ const run2 = handler(argument, context).pipe(replayMessages ? (0, rxjs_1.shareReplay)() : (0, rxjs_1.share)());
384636
+ runs.set(argumentJson, run2);
384637
+ return run2;
384638
+ };
384639
+ return Object.assign(newHandler, handler, options8 || {});
384640
+ };
384641
+ }
384642
+ exports2.memoize = memoize;
384643
+ }
384644
+ });
384645
+
384646
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js
384647
+ var require_create_job_handler = __commonJS({
384648
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js"(exports2) {
384649
+ "use strict";
384650
+ Object.defineProperty(exports2, "__esModule", { value: true });
384651
+ exports2.createLoggerJob = exports2.createJobFactory = exports2.createJobHandler = exports2.ChannelAlreadyExistException = void 0;
384652
+ var core_1 = require_src2();
384653
+ var rxjs_1 = require_cjs();
384654
+ var api_1 = require_api();
384655
+ var ChannelAlreadyExistException = class extends core_1.BaseException {
384656
+ constructor(name) {
384657
+ super(`Channel ${JSON.stringify(name)} already exist.`);
384658
+ }
384659
+ };
384660
+ exports2.ChannelAlreadyExistException = ChannelAlreadyExistException;
384661
+ function createJobHandler(fn6, options8 = {}) {
384662
+ const handler = (argument, context) => {
384663
+ const description = context.description;
384664
+ const inboundBus = context.inboundBus;
384665
+ const inputChannel = new rxjs_1.Subject();
384666
+ let subscription;
384667
+ const teardownLogics = [];
384668
+ let tearingDown = false;
384669
+ return new rxjs_1.Observable((subject) => {
384670
+ function complete() {
384671
+ if (subscription) {
384672
+ subscription.unsubscribe();
384673
+ }
384674
+ subject.next({ kind: api_1.JobOutboundMessageKind.End, description });
384675
+ subject.complete();
384676
+ inputChannel.complete();
384677
+ }
384678
+ const inboundSub = inboundBus.subscribe((message) => {
384679
+ switch (message.kind) {
384680
+ case api_1.JobInboundMessageKind.Ping:
384681
+ subject.next({ kind: api_1.JobOutboundMessageKind.Pong, description, id: message.id });
384682
+ break;
384683
+ case api_1.JobInboundMessageKind.Stop:
384684
+ tearingDown = true;
384685
+ if (teardownLogics.length) {
384686
+ Promise.all(teardownLogics.map((fn7) => fn7())).then(() => complete(), () => complete());
384687
+ } else {
384688
+ complete();
384689
+ }
384690
+ break;
384691
+ case api_1.JobInboundMessageKind.Input:
384692
+ if (!tearingDown) {
384693
+ inputChannel.next(message.value);
384694
+ }
384695
+ break;
384696
+ }
384697
+ });
384698
+ const channels = /* @__PURE__ */ new Map();
384699
+ const newContext = {
384700
+ ...context,
384701
+ input: inputChannel.asObservable(),
384702
+ addTeardown(teardown) {
384703
+ teardownLogics.push(teardown);
384704
+ },
384705
+ createChannel(name) {
384706
+ if (channels.has(name)) {
384707
+ throw new ChannelAlreadyExistException(name);
384708
+ }
384709
+ const channelSubject = new rxjs_1.Subject();
384710
+ const channelSub = channelSubject.subscribe((message) => {
384711
+ subject.next({
384712
+ kind: api_1.JobOutboundMessageKind.ChannelMessage,
384713
+ description,
384714
+ name,
384715
+ message
384716
+ });
384717
+ }, (error) => {
384718
+ subject.next({ kind: api_1.JobOutboundMessageKind.ChannelError, description, name, error });
384719
+ channels.delete(name);
384720
+ }, () => {
384721
+ subject.next({ kind: api_1.JobOutboundMessageKind.ChannelComplete, description, name });
384722
+ channels.delete(name);
384723
+ });
384724
+ channels.set(name, channelSubject);
384725
+ if (subscription) {
384726
+ subscription.add(channelSub);
384727
+ }
384728
+ return channelSubject;
384729
+ }
384730
+ };
384731
+ subject.next({ kind: api_1.JobOutboundMessageKind.Start, description });
384732
+ let result = fn6(argument, newContext);
384733
+ if ((0, core_1.isPromise)(result)) {
384734
+ result = (0, rxjs_1.from)(result);
384735
+ } else if (!(0, rxjs_1.isObservable)(result)) {
384736
+ result = (0, rxjs_1.of)(result);
384737
+ }
384738
+ subscription = result.subscribe((value) => subject.next({ kind: api_1.JobOutboundMessageKind.Output, description, value }), (error) => subject.error(error), () => complete());
384739
+ subscription.add(inboundSub);
384740
+ return subscription;
384741
+ });
384742
+ };
384743
+ return Object.assign(handler, { jobDescription: options8 });
384744
+ }
384745
+ exports2.createJobHandler = createJobHandler;
384746
+ function createJobFactory(loader2, options8 = {}) {
384747
+ const handler = (argument, context) => {
384748
+ return (0, rxjs_1.from)(loader2()).pipe((0, rxjs_1.switchMap)((fn6) => fn6(argument, context)));
384749
+ };
384750
+ return Object.assign(handler, { jobDescription: options8 });
384751
+ }
384752
+ exports2.createJobFactory = createJobFactory;
384753
+ function createLoggerJob(job, logger) {
384754
+ const handler = (argument, context) => {
384755
+ context.inboundBus.pipe((0, rxjs_1.tap)((message) => logger.info(`Input: ${JSON.stringify(message)}`))).subscribe();
384756
+ 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`)));
384757
+ };
384758
+ return Object.assign(handler, job);
384759
+ }
384760
+ exports2.createLoggerJob = createLoggerJob;
384761
+ }
384762
+ });
384763
+
384764
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/exception.js
384765
+ var require_exception4 = __commonJS({
384766
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/exception.js"(exports2) {
384767
+ "use strict";
384768
+ Object.defineProperty(exports2, "__esModule", { value: true });
384769
+ exports2.JobDoesNotExistException = exports2.JobNameAlreadyRegisteredException = void 0;
384770
+ var core_1 = require_src2();
384771
+ var JobNameAlreadyRegisteredException = class extends core_1.BaseException {
384772
+ constructor(name) {
384773
+ super(`Job named ${JSON.stringify(name)} already exists.`);
384774
+ }
384775
+ };
384776
+ exports2.JobNameAlreadyRegisteredException = JobNameAlreadyRegisteredException;
384777
+ var JobDoesNotExistException = class extends core_1.BaseException {
384778
+ constructor(name) {
384779
+ super(`Job name ${JSON.stringify(name)} does not exist.`);
384780
+ }
384781
+ };
384782
+ exports2.JobDoesNotExistException = JobDoesNotExistException;
384783
+ }
384784
+ });
384785
+
384786
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/dispatcher.js
384787
+ var require_dispatcher = __commonJS({
384788
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/dispatcher.js"(exports2) {
384789
+ "use strict";
384790
+ Object.defineProperty(exports2, "__esModule", { value: true });
384791
+ exports2.createDispatcher = void 0;
384792
+ var api_1 = require_api();
384793
+ var exception_1 = require_exception4();
384794
+ function createDispatcher(options8 = {}) {
384795
+ let defaultDelegate = null;
384796
+ const conditionalDelegateList = [];
384797
+ const job = Object.assign((argument, context) => {
384798
+ const maybeDelegate = conditionalDelegateList.find(([predicate]) => predicate(argument));
384799
+ let delegate = null;
384800
+ if (maybeDelegate) {
384801
+ delegate = context.scheduler.schedule(maybeDelegate[1], argument);
384802
+ } else if (defaultDelegate) {
384803
+ delegate = context.scheduler.schedule(defaultDelegate, argument);
384804
+ } else {
384805
+ throw new exception_1.JobDoesNotExistException("<null>");
384806
+ }
384807
+ context.inboundBus.subscribe(delegate.inboundBus);
384808
+ return delegate.outboundBus;
384809
+ }, {
384810
+ jobDescription: options8
384811
+ });
384812
+ return Object.assign(job, {
384813
+ setDefaultJob(name) {
384814
+ if ((0, api_1.isJobHandler)(name)) {
384815
+ name = name.jobDescription.name === void 0 ? null : name.jobDescription.name;
384816
+ }
384817
+ defaultDelegate = name;
384818
+ },
384819
+ addConditionalJob(predicate, name) {
384820
+ conditionalDelegateList.push([predicate, name]);
384821
+ }
384822
+ // TODO: Remove return-only generic from createDispatcher() API.
384823
+ });
384824
+ }
384825
+ exports2.createDispatcher = createDispatcher;
384826
+ }
384827
+ });
384828
+
384829
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/fallback-registry.js
384830
+ var require_fallback_registry = __commonJS({
384831
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/fallback-registry.js"(exports2) {
384832
+ "use strict";
384833
+ Object.defineProperty(exports2, "__esModule", { value: true });
384834
+ exports2.FallbackRegistry = void 0;
384835
+ var rxjs_1 = require_cjs();
384836
+ var FallbackRegistry = class {
384837
+ _fallbacks;
384838
+ constructor(_fallbacks = []) {
384839
+ this._fallbacks = _fallbacks;
384840
+ }
384841
+ addFallback(registry) {
384842
+ this._fallbacks.push(registry);
384843
+ }
384844
+ get(name) {
384845
+ return (0, rxjs_1.from)(this._fallbacks).pipe((0, rxjs_1.concatMap)((fb) => fb.get(name)), (0, rxjs_1.first)((x5) => x5 !== null, null));
384846
+ }
384847
+ };
384848
+ exports2.FallbackRegistry = FallbackRegistry;
384849
+ }
384850
+ });
384851
+
384852
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-registry.js
384853
+ var require_simple_registry = __commonJS({
384854
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-registry.js"(exports2) {
384855
+ "use strict";
384856
+ Object.defineProperty(exports2, "__esModule", { value: true });
384857
+ exports2.SimpleJobRegistry = void 0;
384858
+ var core_1 = require_src2();
384859
+ var rxjs_1 = require_cjs();
384860
+ var api_1 = require_api();
384861
+ var exception_1 = require_exception4();
384862
+ var SimpleJobRegistry = class {
384863
+ _jobNames = /* @__PURE__ */ new Map();
384864
+ get(name) {
384865
+ return (0, rxjs_1.of)(this._jobNames.get(name) || null);
384866
+ }
384867
+ register(nameOrHandler, handlerOrOptions = {}, options8 = {}) {
384868
+ if (typeof nameOrHandler == "string") {
384869
+ if (!(0, api_1.isJobHandler)(handlerOrOptions)) {
384870
+ throw new TypeError("Expected a JobHandler as second argument.");
384871
+ }
384872
+ this._register(nameOrHandler, handlerOrOptions, options8);
384873
+ } else if ((0, api_1.isJobHandler)(nameOrHandler)) {
384874
+ if (typeof handlerOrOptions !== "object") {
384875
+ throw new TypeError("Expected an object options as second argument.");
384876
+ }
384877
+ const name = options8.name || nameOrHandler.jobDescription.name || handlerOrOptions.name;
384878
+ if (name === void 0) {
384879
+ throw new TypeError("Expected name to be a string.");
384880
+ }
384881
+ this._register(name, nameOrHandler, options8);
384882
+ } else {
384883
+ throw new TypeError("Unrecognized arguments.");
384884
+ }
384885
+ }
384886
+ _register(name, handler, options8) {
384887
+ if (this._jobNames.has(name)) {
384888
+ throw new exception_1.JobNameAlreadyRegisteredException(name);
384889
+ }
384890
+ const argument = core_1.schema.mergeSchemas(handler.jobDescription.argument, options8.argument);
384891
+ const input = core_1.schema.mergeSchemas(handler.jobDescription.input, options8.input);
384892
+ const output = core_1.schema.mergeSchemas(handler.jobDescription.output, options8.output);
384893
+ const jobDescription = {
384894
+ name,
384895
+ argument,
384896
+ output,
384897
+ input
384898
+ };
384899
+ const jobHandler = Object.assign(handler.bind(void 0), {
384900
+ jobDescription
384901
+ });
384902
+ this._jobNames.set(name, jobHandler);
384903
+ }
384904
+ /**
384905
+ * Returns the job names of all jobs.
384906
+ */
384907
+ getJobNames() {
384908
+ return [...this._jobNames.keys()];
384909
+ }
384910
+ };
384911
+ exports2.SimpleJobRegistry = SimpleJobRegistry;
384912
+ }
384913
+ });
384914
+
384915
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-scheduler.js
384916
+ var require_simple_scheduler = __commonJS({
384917
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-scheduler.js"(exports2) {
384918
+ "use strict";
384919
+ Object.defineProperty(exports2, "__esModule", { value: true });
384920
+ exports2.SimpleScheduler = exports2.JobOutputSchemaValidationError = exports2.JobInboundMessageSchemaValidationError = exports2.JobArgumentSchemaValidationError = void 0;
384921
+ var core_1 = require_src2();
384922
+ var rxjs_1 = require_cjs();
384923
+ var api_1 = require_api();
384924
+ var exception_1 = require_exception4();
384925
+ var JobArgumentSchemaValidationError = class extends core_1.schema.SchemaValidationException {
384926
+ constructor(errors) {
384927
+ super(errors, "Job Argument failed to validate. Errors: ");
384928
+ }
384929
+ };
384930
+ exports2.JobArgumentSchemaValidationError = JobArgumentSchemaValidationError;
384931
+ var JobInboundMessageSchemaValidationError = class extends core_1.schema.SchemaValidationException {
384932
+ constructor(errors) {
384933
+ super(errors, "Job Inbound Message failed to validate. Errors: ");
384934
+ }
384935
+ };
384936
+ exports2.JobInboundMessageSchemaValidationError = JobInboundMessageSchemaValidationError;
384937
+ var JobOutputSchemaValidationError = class extends core_1.schema.SchemaValidationException {
384938
+ constructor(errors) {
384939
+ super(errors, "Job Output failed to validate. Errors: ");
384940
+ }
384941
+ };
384942
+ exports2.JobOutputSchemaValidationError = JobOutputSchemaValidationError;
384943
+ function _jobShare() {
384944
+ return (source2) => {
384945
+ let refCount = 0;
384946
+ let subject;
384947
+ let hasError = false;
384948
+ let isComplete = false;
384949
+ let subscription;
384950
+ return new rxjs_1.Observable((subscriber) => {
384951
+ let innerSub;
384952
+ refCount++;
384953
+ if (!subject) {
384954
+ subject = new rxjs_1.Subject();
384955
+ innerSub = subject.subscribe(subscriber);
384956
+ subscription = source2.subscribe({
384957
+ next(value) {
384958
+ subject.next(value);
384959
+ },
384960
+ error(err) {
384961
+ hasError = true;
384962
+ subject.error(err);
384963
+ },
384964
+ complete() {
384965
+ isComplete = true;
384966
+ subject.complete();
384967
+ }
384968
+ });
384969
+ } else {
384970
+ innerSub = subject.subscribe(subscriber);
384971
+ }
384972
+ return () => {
384973
+ refCount--;
384974
+ innerSub.unsubscribe();
384975
+ if (subscription && refCount === 0 && (isComplete || hasError)) {
384976
+ subscription.unsubscribe();
384977
+ }
384978
+ };
384979
+ });
384980
+ };
384981
+ }
384982
+ var SimpleScheduler = class {
384983
+ _jobRegistry;
384984
+ _schemaRegistry;
384985
+ _internalJobDescriptionMap = /* @__PURE__ */ new Map();
384986
+ _queue = [];
384987
+ _pauseCounter = 0;
384988
+ constructor(_jobRegistry, _schemaRegistry = new core_1.schema.CoreSchemaRegistry()) {
384989
+ this._jobRegistry = _jobRegistry;
384990
+ this._schemaRegistry = _schemaRegistry;
384991
+ }
384992
+ _getInternalDescription(name) {
384993
+ const maybeHandler = this._internalJobDescriptionMap.get(name);
384994
+ if (maybeHandler !== void 0) {
384995
+ return (0, rxjs_1.of)(maybeHandler);
384996
+ }
384997
+ const handler = this._jobRegistry.get(name);
384998
+ return handler.pipe((0, rxjs_1.switchMap)((handler2) => {
384999
+ if (handler2 === null) {
385000
+ return (0, rxjs_1.of)(null);
385001
+ }
385002
+ const description = {
385003
+ // Make a copy of it to be sure it's proper JSON.
385004
+ ...JSON.parse(JSON.stringify(handler2.jobDescription)),
385005
+ name: handler2.jobDescription.name || name,
385006
+ argument: handler2.jobDescription.argument || true,
385007
+ input: handler2.jobDescription.input || true,
385008
+ output: handler2.jobDescription.output || true,
385009
+ channels: handler2.jobDescription.channels || {}
385010
+ };
385011
+ const handlerWithExtra = Object.assign(handler2.bind(void 0), {
385012
+ jobDescription: description,
385013
+ argumentV: this._schemaRegistry.compile(description.argument),
385014
+ inputV: this._schemaRegistry.compile(description.input),
385015
+ outputV: this._schemaRegistry.compile(description.output)
385016
+ });
385017
+ this._internalJobDescriptionMap.set(name, handlerWithExtra);
385018
+ return (0, rxjs_1.of)(handlerWithExtra);
385019
+ }));
385020
+ }
385021
+ /**
385022
+ * Get a job description for a named job.
385023
+ *
385024
+ * @param name The name of the job.
385025
+ * @returns A description, or null if the job is not registered.
385026
+ */
385027
+ getDescription(name) {
385028
+ 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)());
385029
+ }
385030
+ /**
385031
+ * Returns true if the job name has been registered.
385032
+ * @param name The name of the job.
385033
+ * @returns True if the job exists, false otherwise.
385034
+ */
385035
+ has(name) {
385036
+ return this.getDescription(name).pipe((0, rxjs_1.map)((x5) => x5 !== null));
385037
+ }
385038
+ /**
385039
+ * Pause the scheduler, temporary queueing _new_ jobs. Returns a resume function that should be
385040
+ * used to resume execution. If multiple `pause()` were called, all their resume functions must
385041
+ * be called before the Scheduler actually starts new jobs. Additional calls to the same resume
385042
+ * function will have no effect.
385043
+ *
385044
+ * Jobs already running are NOT paused. This is pausing the scheduler only.
385045
+ */
385046
+ pause() {
385047
+ let called = false;
385048
+ this._pauseCounter++;
385049
+ return () => {
385050
+ if (!called) {
385051
+ called = true;
385052
+ if (--this._pauseCounter == 0) {
385053
+ const q9 = this._queue;
385054
+ this._queue = [];
385055
+ q9.forEach((fn6) => fn6());
385056
+ }
385057
+ }
385058
+ };
385059
+ }
385060
+ /**
385061
+ * Schedule a job to be run, using its name.
385062
+ * @param name The name of job to be run.
385063
+ * @param argument The argument to send to the job when starting it.
385064
+ * @param options Scheduling options.
385065
+ * @returns The Job being run.
385066
+ */
385067
+ schedule(name, argument, options8) {
385068
+ if (this._pauseCounter > 0) {
385069
+ const waitable = new rxjs_1.Subject();
385070
+ this._queue.push(() => waitable.complete());
385071
+ return this._scheduleJob(name, argument, options8 || {}, waitable);
385072
+ }
385073
+ return this._scheduleJob(name, argument, options8 || {}, rxjs_1.EMPTY);
385074
+ }
385075
+ /**
385076
+ * Filter messages.
385077
+ * @private
385078
+ */
385079
+ _filterJobOutboundMessages(message, state) {
385080
+ switch (message.kind) {
385081
+ case api_1.JobOutboundMessageKind.OnReady:
385082
+ return state == api_1.JobState.Queued;
385083
+ case api_1.JobOutboundMessageKind.Start:
385084
+ return state == api_1.JobState.Ready;
385085
+ case api_1.JobOutboundMessageKind.End:
385086
+ return state == api_1.JobState.Started || state == api_1.JobState.Ready;
385087
+ }
385088
+ return true;
385089
+ }
385090
+ /**
385091
+ * Return a new state. This is just to simplify the reading of the _createJob method.
385092
+ * @private
385093
+ */
385094
+ _updateState(message, state) {
385095
+ switch (message.kind) {
385096
+ case api_1.JobOutboundMessageKind.OnReady:
385097
+ return api_1.JobState.Ready;
385098
+ case api_1.JobOutboundMessageKind.Start:
385099
+ return api_1.JobState.Started;
385100
+ case api_1.JobOutboundMessageKind.End:
385101
+ return api_1.JobState.Ended;
385102
+ }
385103
+ return state;
385104
+ }
385105
+ /**
385106
+ * Create the job.
385107
+ * @private
385108
+ */
385109
+ // eslint-disable-next-line max-lines-per-function
385110
+ _createJob(name, argument, handler, inboundBus, outboundBus) {
385111
+ const schemaRegistry = this._schemaRegistry;
385112
+ const channelsSubject = /* @__PURE__ */ new Map();
385113
+ const channels = /* @__PURE__ */ new Map();
385114
+ let state = api_1.JobState.Queued;
385115
+ let pingId = 0;
385116
+ const input = new rxjs_1.Subject();
385117
+ input.pipe((0, rxjs_1.concatMap)((message) => handler.pipe((0, rxjs_1.switchMap)(async (handler2) => {
385118
+ if (handler2 === null) {
385119
+ throw new exception_1.JobDoesNotExistException(name);
385120
+ }
385121
+ const validator = await handler2.inputV;
385122
+ return validator(message);
385123
+ }))), (0, rxjs_1.filter)((result) => result.success), (0, rxjs_1.map)((result) => result.data)).subscribe((value) => inboundBus.next({ kind: api_1.JobInboundMessageKind.Input, value }));
385124
+ outboundBus = (0, rxjs_1.concat)(
385125
+ outboundBus,
385126
+ // Add an End message at completion. This will be filtered out if the job actually send an
385127
+ // End.
385128
+ handler.pipe((0, rxjs_1.switchMap)((handler2) => {
385129
+ if (handler2) {
385130
+ return (0, rxjs_1.of)({
385131
+ kind: api_1.JobOutboundMessageKind.End,
385132
+ description: handler2.jobDescription
385133
+ });
385134
+ } else {
385135
+ return rxjs_1.EMPTY;
385136
+ }
385137
+ }))
385138
+ ).pipe(
385139
+ (0, rxjs_1.filter)((message) => this._filterJobOutboundMessages(message, state)),
385140
+ // Update internal logic and Job<> members.
385141
+ (0, rxjs_1.tap)((message) => {
385142
+ state = this._updateState(message, state);
385143
+ switch (message.kind) {
385144
+ case api_1.JobOutboundMessageKind.ChannelCreate: {
385145
+ const maybeSubject = channelsSubject.get(message.name);
385146
+ if (!maybeSubject) {
385147
+ const s = new rxjs_1.Subject();
385148
+ channelsSubject.set(message.name, s);
385149
+ channels.set(message.name, s.asObservable());
385150
+ }
385151
+ break;
385152
+ }
385153
+ case api_1.JobOutboundMessageKind.ChannelMessage: {
385154
+ const maybeSubject = channelsSubject.get(message.name);
385155
+ if (maybeSubject) {
385156
+ maybeSubject.next(message.message);
385157
+ }
385158
+ break;
385159
+ }
385160
+ case api_1.JobOutboundMessageKind.ChannelComplete: {
385161
+ const maybeSubject = channelsSubject.get(message.name);
385162
+ if (maybeSubject) {
385163
+ maybeSubject.complete();
385164
+ channelsSubject.delete(message.name);
385165
+ }
385166
+ break;
385167
+ }
385168
+ case api_1.JobOutboundMessageKind.ChannelError: {
385169
+ const maybeSubject = channelsSubject.get(message.name);
385170
+ if (maybeSubject) {
385171
+ maybeSubject.error(message.error);
385172
+ channelsSubject.delete(message.name);
385173
+ }
385174
+ break;
385175
+ }
385176
+ }
385177
+ }, () => {
385178
+ state = api_1.JobState.Errored;
385179
+ }),
385180
+ // Do output validation (might include default values so this might have side
385181
+ // effects). We keep all messages in order.
385182
+ (0, rxjs_1.concatMap)((message) => {
385183
+ if (message.kind !== api_1.JobOutboundMessageKind.Output) {
385184
+ return (0, rxjs_1.of)(message);
385185
+ }
385186
+ return handler.pipe((0, rxjs_1.switchMap)(async (handler2) => {
385187
+ if (handler2 === null) {
385188
+ throw new exception_1.JobDoesNotExistException(name);
385189
+ }
385190
+ const validate = await handler2.outputV;
385191
+ const output2 = await validate(message.value);
385192
+ if (!output2.success) {
385193
+ throw new JobOutputSchemaValidationError(output2.errors);
385194
+ }
385195
+ return {
385196
+ ...message,
385197
+ output: output2.data
385198
+ };
385199
+ }));
385200
+ }),
385201
+ _jobShare()
385202
+ );
385203
+ 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));
385204
+ return {
385205
+ get state() {
385206
+ return state;
385207
+ },
385208
+ argument,
385209
+ description: handler.pipe((0, rxjs_1.switchMap)((handler2) => {
385210
+ if (handler2 === null) {
385211
+ throw new exception_1.JobDoesNotExistException(name);
385212
+ } else {
385213
+ return (0, rxjs_1.of)(handler2.jobDescription);
385214
+ }
385215
+ })),
385216
+ output,
385217
+ getChannel(name2, schema2 = true) {
385218
+ let maybeObservable = channels.get(name2);
385219
+ if (!maybeObservable) {
385220
+ const s = new rxjs_1.Subject();
385221
+ channelsSubject.set(name2, s);
385222
+ channels.set(name2, s.asObservable());
385223
+ maybeObservable = s.asObservable();
385224
+ }
385225
+ return maybeObservable.pipe(
385226
+ // Keep the order of messages.
385227
+ (0, rxjs_1.concatMap)((message) => {
385228
+ 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));
385229
+ })
385230
+ );
385231
+ },
385232
+ ping() {
385233
+ const id = pingId++;
385234
+ inboundBus.next({ kind: api_1.JobInboundMessageKind.Ping, id });
385235
+ 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)());
385236
+ },
385237
+ stop() {
385238
+ inboundBus.next({ kind: api_1.JobInboundMessageKind.Stop });
385239
+ },
385240
+ input,
385241
+ inboundBus,
385242
+ outboundBus
385243
+ };
385244
+ }
385245
+ _scheduleJob(name, argument, options8, waitable) {
385246
+ const handler = this._getInternalDescription(name);
385247
+ const optionsDeps = options8 && options8.dependencies || [];
385248
+ const dependencies = Array.isArray(optionsDeps) ? optionsDeps : [optionsDeps];
385249
+ const inboundBus = new rxjs_1.Subject();
385250
+ const outboundBus = (0, rxjs_1.concat)(
385251
+ // Wait for dependencies, make sure to not report messages from dependencies. Subscribe to
385252
+ // all dependencies at the same time so they run concurrently.
385253
+ (0, rxjs_1.merge)(...dependencies.map((x5) => x5.outboundBus)).pipe((0, rxjs_1.ignoreElements)()),
385254
+ // Wait for pause() to clear (if necessary).
385255
+ waitable,
385256
+ (0, rxjs_1.from)(handler).pipe((0, rxjs_1.switchMap)((handler2) => new rxjs_1.Observable((subscriber) => {
385257
+ if (!handler2) {
385258
+ throw new exception_1.JobDoesNotExistException(name);
385259
+ }
385260
+ return (0, rxjs_1.from)(handler2.argumentV).pipe((0, rxjs_1.switchMap)((validate) => validate(argument)), (0, rxjs_1.switchMap)((output) => {
385261
+ if (!output.success) {
385262
+ throw new JobArgumentSchemaValidationError(output.errors);
385263
+ }
385264
+ const argument2 = output.data;
385265
+ const description = handler2.jobDescription;
385266
+ subscriber.next({ kind: api_1.JobOutboundMessageKind.OnReady, description });
385267
+ const context = {
385268
+ description,
385269
+ dependencies: [...dependencies],
385270
+ inboundBus: inboundBus.asObservable(),
385271
+ scheduler: this
385272
+ };
385273
+ return handler2(argument2, context);
385274
+ })).subscribe(subscriber);
385275
+ })))
385276
+ );
385277
+ return this._createJob(name, argument, handler, inboundBus, outboundBus);
385278
+ }
385279
+ };
385280
+ exports2.SimpleScheduler = SimpleScheduler;
385281
+ }
385282
+ });
385283
+
385284
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/index.js
385285
+ var require_jobs = __commonJS({
385286
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/index.js"(exports2) {
385287
+ "use strict";
385288
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o2, m2, k6, k23) {
385289
+ if (k23 === void 0)
385290
+ k23 = k6;
385291
+ var desc = Object.getOwnPropertyDescriptor(m2, k6);
385292
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
385293
+ desc = { enumerable: true, get: function() {
385294
+ return m2[k6];
385295
+ } };
385296
+ }
385297
+ Object.defineProperty(o2, k23, desc);
385298
+ } : function(o2, m2, k6, k23) {
385299
+ if (k23 === void 0)
385300
+ k23 = k6;
385301
+ o2[k23] = m2[k6];
385302
+ });
385303
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o2, v5) {
385304
+ Object.defineProperty(o2, "default", { enumerable: true, value: v5 });
385305
+ } : function(o2, v5) {
385306
+ o2["default"] = v5;
385307
+ });
385308
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
385309
+ if (mod && mod.__esModule)
385310
+ return mod;
385311
+ var result = {};
385312
+ if (mod != null) {
385313
+ for (var k6 in mod)
385314
+ if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6))
385315
+ __createBinding2(result, mod, k6);
385316
+ }
385317
+ __setModuleDefault2(result, mod);
385318
+ return result;
385319
+ };
385320
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
385321
+ for (var p4 in m2)
385322
+ if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4))
385323
+ __createBinding2(exports3, m2, p4);
385324
+ };
385325
+ Object.defineProperty(exports2, "__esModule", { value: true });
385326
+ exports2.strategy = void 0;
385327
+ var strategy = __importStar2(require_strategy());
385328
+ exports2.strategy = strategy;
385329
+ __exportStar2(require_api(), exports2);
385330
+ __exportStar2(require_create_job_handler(), exports2);
385331
+ __exportStar2(require_exception4(), exports2);
385332
+ __exportStar2(require_dispatcher(), exports2);
385333
+ __exportStar2(require_fallback_registry(), exports2);
385334
+ __exportStar2(require_simple_registry(), exports2);
385335
+ __exportStar2(require_simple_scheduler(), exports2);
385336
+ }
385337
+ });
385338
+
385339
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.js
385340
+ var require_progress_schema = __commonJS({
385341
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.js"(exports2) {
385342
+ "use strict";
385343
+ Object.defineProperty(exports2, "__esModule", { value: true });
385344
+ exports2.State = void 0;
385345
+ var State;
385346
+ (function(State2) {
385347
+ State2["Error"] = "error";
385348
+ State2["Running"] = "running";
385349
+ State2["Stopped"] = "stopped";
385350
+ State2["Waiting"] = "waiting";
385351
+ })(State || (exports2.State = State = {}));
385352
+ }
385353
+ });
385354
+
385355
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/api.js
385356
+ var require_api2 = __commonJS({
385357
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/api.js"(exports2) {
385358
+ "use strict";
385359
+ Object.defineProperty(exports2, "__esModule", { value: true });
385360
+ exports2.scheduleTargetAndForget = exports2.targetFromTargetString = exports2.targetStringFromTarget = exports2.fromAsyncIterable = exports2.isBuilderOutput = exports2.BuilderProgressState = void 0;
385361
+ var rxjs_1 = require_cjs();
385362
+ var progress_schema_1 = require_progress_schema();
385363
+ Object.defineProperty(exports2, "BuilderProgressState", { enumerable: true, get: function() {
385364
+ return progress_schema_1.State;
385365
+ } });
385366
+ function isBuilderOutput(obj) {
385367
+ if (!obj || typeof obj.then === "function" || typeof obj.subscribe === "function") {
385368
+ return false;
385369
+ }
385370
+ if (typeof obj[Symbol.asyncIterator] === "function") {
385371
+ return false;
385372
+ }
385373
+ return typeof obj.success === "boolean";
385374
+ }
385375
+ exports2.isBuilderOutput = isBuilderOutput;
385376
+ function fromAsyncIterable(iterable) {
385377
+ return new rxjs_1.Observable((subscriber) => {
385378
+ handleAsyncIterator(subscriber, iterable[Symbol.asyncIterator]()).then(() => subscriber.complete(), (error) => subscriber.error(error));
385379
+ });
385380
+ }
385381
+ exports2.fromAsyncIterable = fromAsyncIterable;
385382
+ async function handleAsyncIterator(subscriber, iterator) {
385383
+ const teardown = new Promise((resolve3) => subscriber.add(() => resolve3()));
385384
+ try {
385385
+ while (!subscriber.closed) {
385386
+ const result = await Promise.race([teardown, iterator.next()]);
385387
+ if (!result || result.done) {
385388
+ break;
385389
+ }
385390
+ subscriber.next(result.value);
385391
+ }
385392
+ } finally {
385393
+ await iterator.return?.();
385394
+ }
385395
+ }
385396
+ function targetStringFromTarget({ project, target, configuration }) {
385397
+ return `${project}:${target}${configuration !== void 0 ? ":" + configuration : ""}`;
385398
+ }
385399
+ exports2.targetStringFromTarget = targetStringFromTarget;
385400
+ function targetFromTargetString(specifier, abbreviatedProjectName, abbreviatedTargetName) {
385401
+ const tuple = specifier.split(":", 3);
385402
+ if (tuple.length < 2) {
385403
+ throw new Error("Invalid target string: " + JSON.stringify(specifier));
385404
+ }
385405
+ return {
385406
+ project: tuple[0] || abbreviatedProjectName || "",
385407
+ target: tuple[1] || abbreviatedTargetName || "",
385408
+ ...tuple[2] !== void 0 && { configuration: tuple[2] }
385409
+ };
385410
+ }
385411
+ exports2.targetFromTargetString = targetFromTargetString;
385412
+ function scheduleTargetAndForget(context, target, overrides, scheduleOptions) {
385413
+ let resolve3 = null;
385414
+ const promise = new Promise((r4) => resolve3 = r4);
385415
+ context.addTeardown(() => promise);
385416
+ return (0, rxjs_1.from)(context.scheduleTarget(target, overrides, scheduleOptions)).pipe((0, rxjs_1.switchMap)((run2) => new rxjs_1.Observable((observer) => {
385417
+ const subscription = run2.output.subscribe(observer);
385418
+ return () => {
385419
+ subscription.unsubscribe();
385420
+ run2.stop().then(resolve3);
385421
+ };
385422
+ })));
385423
+ }
385424
+ exports2.scheduleTargetAndForget = scheduleTargetAndForget;
385425
+ }
385426
+ });
385427
+
385428
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.json
385429
+ var require_progress_schema2 = __commonJS({
385430
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.json"(exports2, module2) {
385431
+ module2.exports = {
385432
+ $schema: "http://json-schema.org/draft-07/schema",
385433
+ $id: "BuilderProgressSchema",
385434
+ title: "Progress schema for builders.",
385435
+ type: "object",
385436
+ allOf: [
385437
+ {
385438
+ type: "object",
385439
+ oneOf: [
385440
+ {
385441
+ type: "object",
385442
+ properties: {
385443
+ state: {
385444
+ type: "string",
385445
+ enum: ["stopped"]
385446
+ }
385447
+ },
385448
+ required: ["state"]
385449
+ },
385450
+ {
385451
+ type: "object",
385452
+ properties: {
385453
+ state: {
385454
+ type: "string",
385455
+ enum: ["waiting"]
385456
+ },
385457
+ status: {
385458
+ type: "string"
385459
+ }
385460
+ },
385461
+ required: ["state"]
385462
+ },
385463
+ {
385464
+ type: "object",
385465
+ properties: {
385466
+ state: {
385467
+ type: "string",
385468
+ enum: ["running"]
385469
+ },
385470
+ current: {
385471
+ type: "number",
385472
+ minimum: 0
385473
+ },
385474
+ total: {
385475
+ type: "number",
385476
+ minimum: 0
385477
+ },
385478
+ status: {
385479
+ type: "string"
385480
+ }
385481
+ },
385482
+ required: ["state"]
385483
+ },
385484
+ {
385485
+ type: "object",
385486
+ properties: {
385487
+ state: {
385488
+ type: "string",
385489
+ enum: ["error"]
385490
+ },
385491
+ error: true
385492
+ },
385493
+ required: ["state"]
385494
+ }
385495
+ ]
385496
+ },
385497
+ {
385498
+ type: "object",
385499
+ properties: {
385500
+ builder: {
385501
+ type: "object"
385502
+ },
385503
+ target: {
385504
+ type: "object"
385505
+ },
385506
+ id: {
385507
+ type: "number"
385508
+ }
385509
+ },
385510
+ required: ["builder", "id"]
385511
+ }
385512
+ ]
385513
+ };
385514
+ }
385515
+ });
385516
+
385517
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/schedule-by-name.js
385518
+ var require_schedule_by_name = __commonJS({
385519
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/schedule-by-name.js"(exports2) {
385520
+ "use strict";
385521
+ Object.defineProperty(exports2, "__esModule", { value: true });
385522
+ exports2.scheduleByTarget = exports2.scheduleByName = void 0;
385523
+ var rxjs_1 = require_cjs();
385524
+ var api_1 = require_api2();
385525
+ var jobs_1 = require_jobs();
385526
+ var progressSchema = require_progress_schema2();
385527
+ var _uniqueId = 0;
385528
+ async function scheduleByName(name, buildOptions, options8) {
385529
+ const childLoggerName = options8.target ? `{${(0, api_1.targetStringFromTarget)(options8.target)}}` : name;
385530
+ const logger = options8.logger.createChild(childLoggerName);
385531
+ const job = options8.scheduler.schedule(name, {});
385532
+ let stateSubscription;
385533
+ const workspaceRoot = await options8.workspaceRoot;
385534
+ const currentDirectory = await options8.currentDirectory;
385535
+ const description = await (0, rxjs_1.firstValueFrom)(job.description);
385536
+ const info = description.info;
385537
+ const id = ++_uniqueId;
385538
+ const message = {
385539
+ id,
385540
+ currentDirectory,
385541
+ workspaceRoot,
385542
+ info,
385543
+ options: buildOptions,
385544
+ ...options8.target ? { target: options8.target } : {}
385545
+ };
385546
+ if (job.state !== jobs_1.JobState.Started) {
385547
+ stateSubscription = job.outboundBus.subscribe({
385548
+ next: (event) => {
385549
+ if (event.kind === jobs_1.JobOutboundMessageKind.Start) {
385550
+ job.input.next(message);
385551
+ }
385552
+ },
385553
+ error: () => {
385554
+ }
385555
+ });
385556
+ } else {
385557
+ job.input.next(message);
385558
+ }
385559
+ const logChannelSub = job.getChannel("log").subscribe({
385560
+ next: (entry) => {
385561
+ logger.next(entry);
385562
+ },
385563
+ error: () => {
385564
+ }
385565
+ });
385566
+ const outboundBusSub = job.outboundBus.subscribe({
385567
+ error() {
385568
+ },
385569
+ complete() {
385570
+ outboundBusSub.unsubscribe();
385571
+ logChannelSub.unsubscribe();
385572
+ stateSubscription.unsubscribe();
385573
+ }
385574
+ });
385575
+ const output = job.output.pipe((0, rxjs_1.map)((output2) => ({
385576
+ ...output2,
385577
+ ...options8.target ? { target: options8.target } : 0,
385578
+ info
385579
+ })), (0, rxjs_1.shareReplay)());
385580
+ output.pipe((0, rxjs_1.first)()).subscribe({
385581
+ error: () => {
385582
+ }
385583
+ });
385584
+ return {
385585
+ id,
385586
+ info,
385587
+ // This is a getter so that it always returns the next output, and not the same one.
385588
+ get result() {
385589
+ return (0, rxjs_1.firstValueFrom)(output);
385590
+ },
385591
+ get lastOutput() {
385592
+ return (0, rxjs_1.lastValueFrom)(output);
385593
+ },
385594
+ output,
385595
+ progress: job.getChannel("progress", progressSchema).pipe((0, rxjs_1.shareReplay)(1)),
385596
+ stop() {
385597
+ job.stop();
385598
+ return job.outboundBus.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.catchError)(() => rxjs_1.EMPTY)).toPromise();
385599
+ }
385600
+ };
385601
+ }
385602
+ exports2.scheduleByName = scheduleByName;
385603
+ async function scheduleByTarget(target, overrides, options8) {
385604
+ return scheduleByName(`{${(0, api_1.targetStringFromTarget)(target)}}`, overrides, {
385605
+ ...options8,
385606
+ target,
385607
+ logger: options8.logger
385608
+ });
385609
+ }
385610
+ exports2.scheduleByTarget = scheduleByTarget;
385611
+ }
385612
+ });
385613
+
385614
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/input-schema.json
385615
+ var require_input_schema = __commonJS({
385616
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/input-schema.json"(exports2, module2) {
385617
+ module2.exports = {
385618
+ $schema: "http://json-schema.org/draft-07/schema",
385619
+ $id: "BuilderInputSchema",
385620
+ title: "Input schema for builders.",
385621
+ type: "object",
385622
+ properties: {
385623
+ workspaceRoot: {
385624
+ type: "string"
385625
+ },
385626
+ currentDirectory: {
385627
+ type: "string"
385628
+ },
385629
+ id: {
385630
+ type: "number"
385631
+ },
385632
+ target: {
385633
+ type: "object",
385634
+ properties: {
385635
+ project: {
385636
+ type: "string"
385637
+ },
385638
+ target: {
385639
+ type: "string"
385640
+ },
385641
+ configuration: {
385642
+ type: "string"
385643
+ }
385644
+ },
385645
+ required: ["project", "target"]
385646
+ },
385647
+ info: {
385648
+ type: "object"
385649
+ },
385650
+ options: {
385651
+ type: "object"
385652
+ }
385653
+ },
385654
+ required: ["currentDirectory", "id", "info", "workspaceRoot"]
385655
+ };
385656
+ }
385657
+ });
385658
+
385659
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/output-schema.json
385660
+ var require_output_schema = __commonJS({
385661
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/output-schema.json"(exports2, module2) {
385662
+ module2.exports = {
385663
+ $schema: "http://json-schema.org/draft-07/schema",
385664
+ $id: "BuilderOutputSchema",
385665
+ title: "Output schema for builders.",
385666
+ type: "object",
385667
+ properties: {
385668
+ success: {
385669
+ type: "boolean"
385670
+ },
385671
+ error: {
385672
+ type: "string"
385673
+ },
385674
+ target: {
385675
+ type: "object",
385676
+ properties: {
385677
+ project: {
385678
+ type: "string"
385679
+ },
385680
+ target: {
385681
+ type: "string"
385682
+ },
385683
+ configuration: {
385684
+ type: "string"
385685
+ }
385686
+ }
385687
+ },
385688
+ info: {
385689
+ type: "object"
385690
+ }
385691
+ },
385692
+ additionalProperties: true,
385693
+ required: ["success"]
385694
+ };
385695
+ }
385696
+ });
385697
+
385698
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/architect.js
385699
+ var require_architect = __commonJS({
385700
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/architect.js"(exports2) {
385701
+ "use strict";
385702
+ Object.defineProperty(exports2, "__esModule", { value: true });
385703
+ exports2.Architect = void 0;
385704
+ var core_1 = require_src2();
385705
+ var rxjs_1 = require_cjs();
385706
+ var api_1 = require_api2();
385707
+ var jobs_1 = require_jobs();
385708
+ var schedule_by_name_1 = require_schedule_by_name();
385709
+ var inputSchema = require_input_schema();
385710
+ var outputSchema = require_output_schema();
385711
+ function _createJobHandlerFromBuilderInfo(info, target, host, registry, baseOptions) {
385712
+ const jobDescription = {
385713
+ name: target ? `{${(0, api_1.targetStringFromTarget)(target)}}` : info.builderName,
385714
+ argument: { type: "object" },
385715
+ input: inputSchema,
385716
+ output: outputSchema,
385717
+ info
385718
+ };
385719
+ function handler(argument, context) {
385720
+ const inboundBusWithInputValidation = context.inboundBus.pipe(
385721
+ (0, rxjs_1.concatMap)(async (message) => {
385722
+ if (message.kind === jobs_1.JobInboundMessageKind.Input) {
385723
+ const v5 = message.value;
385724
+ const options8 = {
385725
+ ...baseOptions,
385726
+ ...v5.options
385727
+ };
385728
+ const validation = await registry.compile(info.optionSchema);
385729
+ const validationResult = await validation(options8);
385730
+ const { data, success, errors } = validationResult;
385731
+ if (!success) {
385732
+ throw new core_1.json.schema.SchemaValidationException(errors);
385733
+ }
385734
+ return { ...message, value: { ...v5, options: data } };
385735
+ } else {
385736
+ return message;
385737
+ }
385738
+ }),
385739
+ // Using a share replay because the job might be synchronously sending input, but
385740
+ // asynchronously listening to it.
385741
+ (0, rxjs_1.shareReplay)(1)
385742
+ );
385743
+ const inboundBus = (0, rxjs_1.onErrorResumeNext)(inboundBusWithInputValidation);
385744
+ const output = (0, rxjs_1.from)(host.loadBuilder(info)).pipe(
385745
+ (0, rxjs_1.concatMap)((builder) => {
385746
+ if (builder === null) {
385747
+ throw new Error(`Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}`);
385748
+ }
385749
+ return builder.handler(argument, { ...context, inboundBus }).pipe((0, rxjs_1.map)((output2) => {
385750
+ if (output2.kind === jobs_1.JobOutboundMessageKind.Output) {
385751
+ return {
385752
+ ...output2,
385753
+ value: {
385754
+ ...output2.value,
385755
+ ...target ? { target } : 0
385756
+ }
385757
+ };
385758
+ } else {
385759
+ return output2;
385760
+ }
385761
+ }));
385762
+ }),
385763
+ // Share subscriptions to the output, otherwise the handler will be re-run.
385764
+ (0, rxjs_1.shareReplay)()
385765
+ );
385766
+ const inboundBusErrors = inboundBusWithInputValidation.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.takeUntil)((0, rxjs_1.onErrorResumeNext)(output.pipe((0, rxjs_1.last)()))));
385767
+ return (0, rxjs_1.merge)(inboundBusErrors, output);
385768
+ }
385769
+ return (0, rxjs_1.of)(Object.assign(handler, { jobDescription }));
385770
+ }
385771
+ var ArchitectBuilderJobRegistry = class {
385772
+ _host;
385773
+ _registry;
385774
+ _jobCache;
385775
+ _infoCache;
385776
+ constructor(_host, _registry, _jobCache, _infoCache) {
385777
+ this._host = _host;
385778
+ this._registry = _registry;
385779
+ this._jobCache = _jobCache;
385780
+ this._infoCache = _infoCache;
385781
+ }
385782
+ _resolveBuilder(name) {
385783
+ const cache3 = this._infoCache;
385784
+ if (cache3) {
385785
+ const maybeCache = cache3.get(name);
385786
+ if (maybeCache !== void 0) {
385787
+ return maybeCache;
385788
+ }
385789
+ const info = (0, rxjs_1.from)(this._host.resolveBuilder(name)).pipe((0, rxjs_1.shareReplay)(1));
385790
+ cache3.set(name, info);
385791
+ return info;
385792
+ }
385793
+ return (0, rxjs_1.from)(this._host.resolveBuilder(name));
385794
+ }
385795
+ _createBuilder(info, target, options8) {
385796
+ const cache3 = this._jobCache;
385797
+ if (target) {
385798
+ const maybeHit = cache3 && cache3.get((0, api_1.targetStringFromTarget)(target));
385799
+ if (maybeHit) {
385800
+ return maybeHit;
385801
+ }
385802
+ } else {
385803
+ const maybeHit = cache3 && cache3.get(info.builderName);
385804
+ if (maybeHit) {
385805
+ return maybeHit;
385806
+ }
385807
+ }
385808
+ const result = _createJobHandlerFromBuilderInfo(info, target, this._host, this._registry, options8 || {});
385809
+ if (cache3) {
385810
+ if (target) {
385811
+ cache3.set((0, api_1.targetStringFromTarget)(target), result.pipe((0, rxjs_1.shareReplay)(1)));
385812
+ } else {
385813
+ cache3.set(info.builderName, result.pipe((0, rxjs_1.shareReplay)(1)));
385814
+ }
385815
+ }
385816
+ return result;
385817
+ }
385818
+ get(name) {
385819
+ const m2 = name.match(/^([^:]+):([^:]+)$/i);
385820
+ if (!m2) {
385821
+ return (0, rxjs_1.of)(null);
385822
+ }
385823
+ 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));
385824
+ }
385825
+ };
385826
+ var ArchitectTargetJobRegistry = class extends ArchitectBuilderJobRegistry {
385827
+ get(name) {
385828
+ const m2 = name.match(/^{([^:]+):([^:]+)(?::([^:]*))?}$/i);
385829
+ if (!m2) {
385830
+ return (0, rxjs_1.of)(null);
385831
+ }
385832
+ const target = {
385833
+ project: m2[1],
385834
+ target: m2[2],
385835
+ configuration: m2[3]
385836
+ };
385837
+ return (0, rxjs_1.from)(Promise.all([
385838
+ this._host.getBuilderNameForTarget(target),
385839
+ this._host.getOptionsForTarget(target)
385840
+ ])).pipe((0, rxjs_1.concatMap)(([builderStr, options8]) => {
385841
+ if (builderStr === null || options8 === null) {
385842
+ return (0, rxjs_1.of)(null);
385843
+ }
385844
+ return this._resolveBuilder(builderStr).pipe((0, rxjs_1.concatMap)((builderInfo) => {
385845
+ if (builderInfo === null) {
385846
+ return (0, rxjs_1.of)(null);
385847
+ }
385848
+ return this._createBuilder(builderInfo, target, options8);
385849
+ }));
385850
+ }), (0, rxjs_1.first)(null, null));
385851
+ }
385852
+ };
385853
+ function _getTargetOptionsFactory(host) {
385854
+ return (0, jobs_1.createJobHandler)((target) => {
385855
+ return host.getOptionsForTarget(target).then((options8) => {
385856
+ if (options8 === null) {
385857
+ throw new Error(`Invalid target: ${JSON.stringify(target)}.`);
385858
+ }
385859
+ return options8;
385860
+ });
385861
+ }, {
385862
+ name: "..getTargetOptions",
385863
+ output: { type: "object" },
385864
+ argument: inputSchema.properties.target
385865
+ });
385866
+ }
385867
+ function _getProjectMetadataFactory(host) {
385868
+ return (0, jobs_1.createJobHandler)((target) => {
385869
+ return host.getProjectMetadata(target).then((options8) => {
385870
+ if (options8 === null) {
385871
+ throw new Error(`Invalid target: ${JSON.stringify(target)}.`);
385872
+ }
385873
+ return options8;
385874
+ });
385875
+ }, {
385876
+ name: "..getProjectMetadata",
385877
+ output: { type: "object" },
385878
+ argument: {
385879
+ oneOf: [{ type: "string" }, inputSchema.properties.target]
385880
+ }
385881
+ });
385882
+ }
385883
+ function _getBuilderNameForTargetFactory(host) {
385884
+ return (0, jobs_1.createJobHandler)(async (target) => {
385885
+ const builderName = await host.getBuilderNameForTarget(target);
385886
+ if (!builderName) {
385887
+ throw new Error(`No builder were found for target ${(0, api_1.targetStringFromTarget)(target)}.`);
385888
+ }
385889
+ return builderName;
385890
+ }, {
385891
+ name: "..getBuilderNameForTarget",
385892
+ output: { type: "string" },
385893
+ argument: inputSchema.properties.target
385894
+ });
385895
+ }
385896
+ function _validateOptionsFactory(host, registry) {
385897
+ return (0, jobs_1.createJobHandler)(async ([builderName, options8]) => {
385898
+ const builderInfo = await host.resolveBuilder(builderName);
385899
+ if (!builderInfo) {
385900
+ throw new Error(`No builder info were found for builder ${JSON.stringify(builderName)}.`);
385901
+ }
385902
+ const validation = await registry.compile(builderInfo.optionSchema);
385903
+ const { data, success, errors } = await validation(options8);
385904
+ if (!success) {
385905
+ throw new core_1.json.schema.SchemaValidationException(errors);
385906
+ }
385907
+ return data;
385908
+ }, {
385909
+ name: "..validateOptions",
385910
+ output: { type: "object" },
385911
+ argument: {
385912
+ type: "array",
385913
+ items: [{ type: "string" }, { type: "object" }]
385914
+ }
385915
+ });
385916
+ }
385917
+ var Architect = class {
385918
+ _host;
385919
+ _scheduler;
385920
+ _jobCache = /* @__PURE__ */ new Map();
385921
+ _infoCache = /* @__PURE__ */ new Map();
385922
+ constructor(_host, registry = new core_1.json.schema.CoreSchemaRegistry(), additionalJobRegistry) {
385923
+ this._host = _host;
385924
+ const privateArchitectJobRegistry = new jobs_1.SimpleJobRegistry();
385925
+ privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host));
385926
+ privateArchitectJobRegistry.register(_getBuilderNameForTargetFactory(_host));
385927
+ privateArchitectJobRegistry.register(_validateOptionsFactory(_host, registry));
385928
+ privateArchitectJobRegistry.register(_getProjectMetadataFactory(_host));
385929
+ const jobRegistry = new jobs_1.FallbackRegistry([
385930
+ new ArchitectTargetJobRegistry(_host, registry, this._jobCache, this._infoCache),
385931
+ new ArchitectBuilderJobRegistry(_host, registry, this._jobCache, this._infoCache),
385932
+ privateArchitectJobRegistry,
385933
+ ...additionalJobRegistry ? [additionalJobRegistry] : []
385934
+ ]);
385935
+ this._scheduler = new jobs_1.SimpleScheduler(jobRegistry, registry);
385936
+ }
385937
+ has(name) {
385938
+ return this._scheduler.has(name);
385939
+ }
385940
+ scheduleBuilder(name, options8, scheduleOptions = {}) {
385941
+ if (!/^[^:]+:[^:]+(:[^:]+)?$/.test(name)) {
385942
+ throw new Error("Invalid builder name: " + JSON.stringify(name));
385943
+ }
385944
+ return (0, schedule_by_name_1.scheduleByName)(name, options8, {
385945
+ scheduler: this._scheduler,
385946
+ logger: scheduleOptions.logger || new core_1.logging.NullLogger(),
385947
+ currentDirectory: this._host.getCurrentDirectory(),
385948
+ workspaceRoot: this._host.getWorkspaceRoot()
385949
+ });
385950
+ }
385951
+ scheduleTarget(target, overrides = {}, scheduleOptions = {}) {
385952
+ return (0, schedule_by_name_1.scheduleByTarget)(target, overrides, {
385953
+ scheduler: this._scheduler,
385954
+ logger: scheduleOptions.logger || new core_1.logging.NullLogger(),
385955
+ currentDirectory: this._host.getCurrentDirectory(),
385956
+ workspaceRoot: this._host.getWorkspaceRoot()
385957
+ });
385958
+ }
385959
+ };
385960
+ exports2.Architect = Architect;
385961
+ }
385962
+ });
385963
+
385964
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/internal.js
385965
+ var require_internal = __commonJS({
385966
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/internal.js"(exports2) {
385967
+ "use strict";
385968
+ Object.defineProperty(exports2, "__esModule", { value: true });
385969
+ exports2.BuilderVersionSymbol = exports2.BuilderSymbol = void 0;
385970
+ exports2.BuilderSymbol = Symbol.for("@angular-devkit/architect:builder");
385971
+ exports2.BuilderVersionSymbol = Symbol.for("@angular-devkit/architect:version");
385972
+ }
385973
+ });
385974
+
385975
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/package.json
385976
+ var require_package3 = __commonJS({
385977
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/package.json"(exports2, module2) {
385978
+ module2.exports = {
385979
+ name: "@angular-devkit/architect",
385980
+ version: "0.1702.0",
385981
+ description: "Angular Build Facade",
385982
+ experimental: true,
385983
+ main: "src/index.js",
385984
+ typings: "src/index.d.ts",
385985
+ dependencies: {
385986
+ "@angular-devkit/core": "17.2.0",
385987
+ rxjs: "7.8.1"
385988
+ },
385989
+ builders: "./builders/builders.json",
385990
+ keywords: [
385991
+ "Angular CLI",
385992
+ "Angular DevKit",
385993
+ "angular",
385994
+ "devkit",
385995
+ "sdk"
385996
+ ],
385997
+ repository: {
385998
+ type: "git",
385999
+ url: "https://github.com/angular/angular-cli.git"
386000
+ },
386001
+ engines: {
386002
+ node: "^18.13.0 || >=20.9.0",
386003
+ npm: "^6.11.0 || ^7.5.6 || >=8.0.0",
386004
+ yarn: ">= 1.13.0"
386005
+ },
386006
+ author: "Angular Authors",
386007
+ license: "MIT",
386008
+ bugs: {
386009
+ url: "https://github.com/angular/angular-cli/issues"
386010
+ },
386011
+ homepage: "https://github.com/angular/angular-cli"
386012
+ };
386013
+ }
386014
+ });
386015
+
386016
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/create-builder.js
386017
+ var require_create_builder = __commonJS({
386018
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/create-builder.js"(exports2) {
386019
+ "use strict";
386020
+ Object.defineProperty(exports2, "__esModule", { value: true });
386021
+ exports2.createBuilder = void 0;
386022
+ var core_1 = require_src2();
386023
+ var rxjs_1 = require_cjs();
386024
+ var api_1 = require_api2();
386025
+ var internal_1 = require_internal();
386026
+ var jobs_1 = require_jobs();
386027
+ var schedule_by_name_1 = require_schedule_by_name();
386028
+ function createBuilder2(fn6) {
386029
+ const cjh = jobs_1.createJobHandler;
386030
+ const handler = cjh((options8, context) => {
386031
+ const scheduler = context.scheduler;
386032
+ const progressChannel = context.createChannel("progress");
386033
+ const logChannel = context.createChannel("log");
386034
+ const addTeardown = context.addTeardown.bind(context);
386035
+ let currentState = api_1.BuilderProgressState.Stopped;
386036
+ let current = 0;
386037
+ let status = "";
386038
+ let total = 1;
386039
+ function log(entry) {
386040
+ logChannel.next(entry);
386041
+ }
386042
+ function progress(progress2, context2) {
386043
+ currentState = progress2.state;
386044
+ if (progress2.state === api_1.BuilderProgressState.Running) {
386045
+ current = progress2.current;
386046
+ total = progress2.total !== void 0 ? progress2.total : total;
386047
+ if (progress2.status === void 0) {
386048
+ progress2.status = status;
386049
+ } else {
386050
+ status = progress2.status;
386051
+ }
386052
+ }
386053
+ progressChannel.next({
386054
+ ...progress2,
386055
+ ...context2.target && { target: context2.target },
386056
+ ...context2.builder && { builder: context2.builder },
386057
+ id: context2.id
386058
+ });
386059
+ }
386060
+ return new rxjs_1.Observable((observer) => {
386061
+ const subscriptions = [];
386062
+ const inputSubscription = context.inboundBus.subscribe((i3) => {
386063
+ switch (i3.kind) {
386064
+ case jobs_1.JobInboundMessageKind.Input:
386065
+ onInput(i3.value);
386066
+ break;
386067
+ }
386068
+ });
386069
+ function onInput(i3) {
386070
+ const builder = i3.info;
386071
+ const loggerName = i3.target ? (0, api_1.targetStringFromTarget)(i3.target) : builder.builderName;
386072
+ const logger = new core_1.logging.Logger(loggerName);
386073
+ subscriptions.push(logger.subscribe((entry) => log(entry)));
386074
+ const context2 = {
386075
+ builder,
386076
+ workspaceRoot: i3.workspaceRoot,
386077
+ currentDirectory: i3.currentDirectory,
386078
+ target: i3.target,
386079
+ logger,
386080
+ id: i3.id,
386081
+ async scheduleTarget(target, overrides = {}, scheduleOptions = {}) {
386082
+ const run2 = await (0, schedule_by_name_1.scheduleByTarget)(target, overrides, {
386083
+ scheduler,
386084
+ logger: scheduleOptions.logger || logger.createChild(""),
386085
+ workspaceRoot: i3.workspaceRoot,
386086
+ currentDirectory: i3.currentDirectory
386087
+ });
386088
+ subscriptions.push(run2.progress.subscribe((event) => progressChannel.next(event)));
386089
+ return run2;
386090
+ },
386091
+ async scheduleBuilder(builderName, options9 = {}, scheduleOptions = {}) {
386092
+ const run2 = await (0, schedule_by_name_1.scheduleByName)(builderName, options9, {
386093
+ scheduler,
386094
+ target: scheduleOptions.target,
386095
+ logger: scheduleOptions.logger || logger.createChild(""),
386096
+ workspaceRoot: i3.workspaceRoot,
386097
+ currentDirectory: i3.currentDirectory
386098
+ });
386099
+ subscriptions.push(run2.progress.subscribe((event) => progressChannel.next(event)));
386100
+ return run2;
386101
+ },
386102
+ async getTargetOptions(target) {
386103
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getTargetOptions", target).output);
386104
+ },
386105
+ async getProjectMetadata(target) {
386106
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getProjectMetadata", target).output);
386107
+ },
386108
+ async getBuilderNameForTarget(target) {
386109
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getBuilderNameForTarget", target).output);
386110
+ },
386111
+ async validateOptions(options9, builderName) {
386112
+ return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..validateOptions", [builderName, options9]).output);
386113
+ },
386114
+ reportRunning() {
386115
+ switch (currentState) {
386116
+ case api_1.BuilderProgressState.Waiting:
386117
+ case api_1.BuilderProgressState.Stopped:
386118
+ progress({ state: api_1.BuilderProgressState.Running, current: 0, total }, context2);
386119
+ break;
386120
+ }
386121
+ },
386122
+ reportStatus(status2) {
386123
+ switch (currentState) {
386124
+ case api_1.BuilderProgressState.Running:
386125
+ progress({ state: currentState, status: status2, current, total }, context2);
386126
+ break;
386127
+ case api_1.BuilderProgressState.Waiting:
386128
+ progress({ state: currentState, status: status2 }, context2);
386129
+ break;
386130
+ }
386131
+ },
386132
+ reportProgress(current2, total2, status2) {
386133
+ switch (currentState) {
386134
+ case api_1.BuilderProgressState.Running:
386135
+ progress({ state: currentState, current: current2, total: total2, status: status2 }, context2);
386136
+ }
386137
+ },
386138
+ addTeardown
386139
+ };
386140
+ context2.reportRunning();
386141
+ let result;
386142
+ try {
386143
+ result = fn6(i3.options, context2);
386144
+ if ((0, api_1.isBuilderOutput)(result)) {
386145
+ result = (0, rxjs_1.of)(result);
386146
+ } else if (!(0, rxjs_1.isObservable)(result) && isAsyncIterable(result)) {
386147
+ result = (0, api_1.fromAsyncIterable)(result);
386148
+ } else {
386149
+ result = (0, rxjs_1.from)(result);
386150
+ }
386151
+ } catch (e3) {
386152
+ result = (0, rxjs_1.throwError)(e3);
386153
+ }
386154
+ progress({ state: api_1.BuilderProgressState.Running, current: 0, total: 1 }, context2);
386155
+ subscriptions.push(result.pipe((0, rxjs_1.defaultIfEmpty)({ success: false }), (0, rxjs_1.tap)(() => {
386156
+ progress({ state: api_1.BuilderProgressState.Running, current: total }, context2);
386157
+ progress({ state: api_1.BuilderProgressState.Stopped }, context2);
386158
+ }), (0, rxjs_1.mergeMap)(async (value) => {
386159
+ await new Promise(setImmediate);
386160
+ return value;
386161
+ })).subscribe((message) => observer.next(message), (error) => observer.error(error), () => observer.complete()));
386162
+ }
386163
+ return () => {
386164
+ subscriptions.forEach((x5) => x5.unsubscribe());
386165
+ inputSubscription.unsubscribe();
386166
+ };
386167
+ });
386168
+ });
386169
+ return {
386170
+ handler,
386171
+ [internal_1.BuilderSymbol]: true,
386172
+ [internal_1.BuilderVersionSymbol]: require_package3().version
386173
+ };
386174
+ }
386175
+ exports2.createBuilder = createBuilder2;
386176
+ function isAsyncIterable(obj) {
386177
+ return !!obj && typeof obj[Symbol.asyncIterator] === "function";
386178
+ }
386179
+ }
386180
+ });
386181
+
386182
+ // node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/index.js
386183
+ var require_src4 = __commonJS({
386184
+ "node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/index.js"(exports2) {
386185
+ "use strict";
386186
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o2, m2, k6, k23) {
386187
+ if (k23 === void 0)
386188
+ k23 = k6;
386189
+ var desc = Object.getOwnPropertyDescriptor(m2, k6);
386190
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
386191
+ desc = { enumerable: true, get: function() {
386192
+ return m2[k6];
386193
+ } };
386194
+ }
386195
+ Object.defineProperty(o2, k23, desc);
386196
+ } : function(o2, m2, k6, k23) {
386197
+ if (k23 === void 0)
386198
+ k23 = k6;
386199
+ o2[k23] = m2[k6];
386200
+ });
386201
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o2, v5) {
386202
+ Object.defineProperty(o2, "default", { enumerable: true, value: v5 });
386203
+ } : function(o2, v5) {
386204
+ o2["default"] = v5;
386205
+ });
386206
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
386207
+ if (mod && mod.__esModule)
386208
+ return mod;
386209
+ var result = {};
386210
+ if (mod != null) {
386211
+ for (var k6 in mod)
386212
+ if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6))
386213
+ __createBinding2(result, mod, k6);
386214
+ }
386215
+ __setModuleDefault2(result, mod);
386216
+ return result;
386217
+ };
386218
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
386219
+ for (var p4 in m2)
386220
+ if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4))
386221
+ __createBinding2(exports3, m2, p4);
386222
+ };
386223
+ Object.defineProperty(exports2, "__esModule", { value: true });
386224
+ exports2.jobs = exports2.createBuilder = exports2.Architect = void 0;
386225
+ var jobs = __importStar2(require_jobs());
386226
+ exports2.jobs = jobs;
386227
+ __exportStar2(require_api2(), exports2);
386228
+ var architect_1 = require_architect();
386229
+ Object.defineProperty(exports2, "Architect", { enumerable: true, get: function() {
386230
+ return architect_1.Architect;
386231
+ } });
386232
+ var create_builder_1 = require_create_builder();
386233
+ Object.defineProperty(exports2, "createBuilder", { enumerable: true, get: function() {
386234
+ return create_builder_1.createBuilder;
386235
+ } });
386236
+ }
386237
+ });
386238
+
384531
386239
  // node_modules/.pnpm/@nx+devkit@18.0.4_nx@18.0.4/node_modules/@nx/devkit/src/utils/convert-nx-executor.js
384532
386240
  var require_convert_nx_executor = __commonJS({
384533
386241
  "node_modules/.pnpm/@nx+devkit@18.0.4_nx@18.0.4/node_modules/@nx/devkit/src/utils/convert-nx-executor.js"(exports2) {
@@ -384570,7 +386278,7 @@ var require_convert_nx_executor = __commonJS({
384570
386278
  };
384571
386279
  return toObservable(promise());
384572
386280
  };
384573
- return require("@angular-devkit/architect").createBuilder(builderFunction);
386281
+ return require_src4().createBuilder(builderFunction);
384574
386282
  }
384575
386283
  exports2.convertNxExecutor = convertNxExecutor;
384576
386284
  function toObservable(promiseOrAsyncIterator) {
@@ -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";
@@ -399321,7 +401029,7 @@ var require_esbuild_decorators = __commonJS({
399321
401029
  });
399322
401030
 
399323
401031
  // node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.19.12/node_modules/@anatine/esbuild-decorators/src/index.js
399324
- var require_src5 = __commonJS({
401032
+ var require_src6 = __commonJS({
399325
401033
  "node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.19.12/node_modules/@anatine/esbuild-decorators/src/index.js"(exports2) {
399326
401034
  "use strict";
399327
401035
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -481546,7 +483254,7 @@ var require_update_lock_file = __commonJS({
481546
483254
  });
481547
483255
 
481548
483256
  // 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/generators/release-version/utils/package.js
481549
- var require_package5 = __commonJS({
483257
+ var require_package6 = __commonJS({
481550
483258
  "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/generators/release-version/utils/package.js"(exports2) {
481551
483259
  "use strict";
481552
483260
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -483852,7 +485560,7 @@ var require_resolve_local_package_dependencies = __commonJS({
483852
485560
  exports2.resolveLocalPackageDependencies = void 0;
483853
485561
  var devkit_1 = require_devkit();
483854
485562
  var semver_1 = require_semver3();
483855
- var package_1 = require_package5();
485563
+ var package_1 = require_package6();
483856
485564
  var resolve_version_spec_1 = require_resolve_version_spec();
483857
485565
  function resolveLocalPackageDependencies2(tree, projectGraph, filteredProjects, projectNameToPackageRootMap, resolvePackageRoot, includeAll = false) {
483858
485566
  const localPackageDependencies = {};
@@ -484373,7 +486081,7 @@ var outExtension = ({ format: format3 }) => {
484373
486081
  // packages/workspace-tools/src/base/typescript-library-generator.ts
484374
486082
  var import_devkit2 = __toESM(require_devkit());
484375
486083
  var import_project_name_and_root_utils = __toESM(require_project_name_and_root_utils());
484376
- var import_js = __toESM(require_src4());
486084
+ var import_js = __toESM(require_src5());
484377
486085
  var import_init = __toESM(require_init());
484378
486086
  var import_generator = __toESM(require_generator());
484379
486087
 
@@ -484763,7 +486471,7 @@ ${commentStart} ----------------------------------------------------------------
484763
486471
 
484764
486472
  // packages/workspace-tools/src/utils/run-tsup-build.ts
484765
486473
  var import_node_path5 = require("node:path");
484766
- var import_esbuild_decorators = __toESM(require_src5());
486474
+ var import_esbuild_decorators = __toESM(require_src6());
484767
486475
  var import_devkit3 = __toESM(require_devkit());
484768
486476
  var import_get_custom_transformers_factory = __toESM(require_get_custom_transformers_factory());
484769
486477
  var import_normalize_options = __toESM(require_normalize_options());
@@ -485020,7 +486728,7 @@ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
485020
486728
  // packages/workspace-tools/src/executors/tsup/executor.ts
485021
486729
  var import_node_fs3 = require("node:fs");
485022
486730
  var import_devkit4 = __toESM(require_devkit());
485023
- var import_js2 = __toESM(require_src4());
486731
+ var import_js2 = __toESM(require_src5());
485024
486732
  init_src2();
485025
486733
  var import_fs_extra = __toESM(require_lib());
485026
486734
 
@@ -491200,7 +492908,6 @@ glob.glob = glob;
491200
492908
 
491201
492909
  // packages/workspace-tools/src/executors/tsup/executor.ts
491202
492910
  var import_fileutils = require("nx/src/utils/fileutils.js");
491203
- init_prettier();
491204
492911
 
491205
492912
  // packages/workspace-tools/src/utils/get-project-configurations.ts
491206
492913
  var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
@@ -491390,6 +493097,7 @@ ${externalDependencies.map((dep) => {
491390
493097
  return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
491391
493098
  }).join("\n")}`
491392
493099
  );
493100
+ const prettier = await Promise.resolve().then(() => (init_prettier(), prettier_exports));
491393
493101
  const prettierOptions = {
491394
493102
  plugins: ["prettier-plugin-packagejson"],
491395
493103
  trailingComma: "none",
@@ -491547,7 +493255,7 @@ ${externalDependencies.map((dep) => {
491547
493255
  writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
491548
493256
  (0, import_node_fs3.writeFileSync)(
491549
493257
  packageJsonPath,
491550
- await format2(JSON.stringify(packageJson), {
493258
+ await prettier.format(JSON.stringify(packageJson), {
491551
493259
  ...prettierOptions,
491552
493260
  parser: "json"
491553
493261
  })
@@ -491566,7 +493274,7 @@ ${externalDependencies.map((dep) => {
491566
493274
  files.map(
491567
493275
  async (file) => (0, import_fs_extra.writeFile)(
491568
493276
  file,
491569
- await format2(
493277
+ await prettier.format(
491570
493278
  `${options8.banner ? options8.banner.startsWith("//") ? options8.banner : `// ${options8.banner}` : ""}
491571
493279
 
491572
493280
  ${(0, import_node_fs3.readFileSync)(file, "utf-8")}`,
@@ -494963,6 +496671,141 @@ safe-buffer/index.js:
494963
496671
  * found in the LICENSE file at https://angular.io/license
494964
496672
  *)
494965
496673
 
496674
+ @angular-devkit/architect/src/jobs/api.js:
496675
+ (**
496676
+ * @license
496677
+ * Copyright Google LLC All Rights Reserved.
496678
+ *
496679
+ * Use of this source code is governed by an MIT-style license that can be
496680
+ * found in the LICENSE file at https://angular.io/license
496681
+ *)
496682
+
496683
+ @angular-devkit/architect/src/jobs/strategy.js:
496684
+ (**
496685
+ * @license
496686
+ * Copyright Google LLC All Rights Reserved.
496687
+ *
496688
+ * Use of this source code is governed by an MIT-style license that can be
496689
+ * found in the LICENSE file at https://angular.io/license
496690
+ *)
496691
+
496692
+ @angular-devkit/architect/src/jobs/create-job-handler.js:
496693
+ (**
496694
+ * @license
496695
+ * Copyright Google LLC All Rights Reserved.
496696
+ *
496697
+ * Use of this source code is governed by an MIT-style license that can be
496698
+ * found in the LICENSE file at https://angular.io/license
496699
+ *)
496700
+
496701
+ @angular-devkit/architect/src/jobs/exception.js:
496702
+ (**
496703
+ * @license
496704
+ * Copyright Google LLC All Rights Reserved.
496705
+ *
496706
+ * Use of this source code is governed by an MIT-style license that can be
496707
+ * found in the LICENSE file at https://angular.io/license
496708
+ *)
496709
+
496710
+ @angular-devkit/architect/src/jobs/dispatcher.js:
496711
+ (**
496712
+ * @license
496713
+ * Copyright Google LLC All Rights Reserved.
496714
+ *
496715
+ * Use of this source code is governed by an MIT-style license that can be
496716
+ * found in the LICENSE file at https://angular.io/license
496717
+ *)
496718
+
496719
+ @angular-devkit/architect/src/jobs/fallback-registry.js:
496720
+ (**
496721
+ * @license
496722
+ * Copyright Google LLC All Rights Reserved.
496723
+ *
496724
+ * Use of this source code is governed by an MIT-style license that can be
496725
+ * found in the LICENSE file at https://angular.io/license
496726
+ *)
496727
+
496728
+ @angular-devkit/architect/src/jobs/simple-registry.js:
496729
+ (**
496730
+ * @license
496731
+ * Copyright Google LLC All Rights Reserved.
496732
+ *
496733
+ * Use of this source code is governed by an MIT-style license that can be
496734
+ * found in the LICENSE file at https://angular.io/license
496735
+ *)
496736
+
496737
+ @angular-devkit/architect/src/jobs/simple-scheduler.js:
496738
+ (**
496739
+ * @license
496740
+ * Copyright Google LLC All Rights Reserved.
496741
+ *
496742
+ * Use of this source code is governed by an MIT-style license that can be
496743
+ * found in the LICENSE file at https://angular.io/license
496744
+ *)
496745
+
496746
+ @angular-devkit/architect/src/jobs/index.js:
496747
+ (**
496748
+ * @license
496749
+ * Copyright Google LLC All Rights Reserved.
496750
+ *
496751
+ * Use of this source code is governed by an MIT-style license that can be
496752
+ * found in the LICENSE file at https://angular.io/license
496753
+ *)
496754
+
496755
+ @angular-devkit/architect/src/api.js:
496756
+ (**
496757
+ * @license
496758
+ * Copyright Google LLC All Rights Reserved.
496759
+ *
496760
+ * Use of this source code is governed by an MIT-style license that can be
496761
+ * found in the LICENSE file at https://angular.io/license
496762
+ *)
496763
+
496764
+ @angular-devkit/architect/src/schedule-by-name.js:
496765
+ (**
496766
+ * @license
496767
+ * Copyright Google LLC All Rights Reserved.
496768
+ *
496769
+ * Use of this source code is governed by an MIT-style license that can be
496770
+ * found in the LICENSE file at https://angular.io/license
496771
+ *)
496772
+
496773
+ @angular-devkit/architect/src/architect.js:
496774
+ (**
496775
+ * @license
496776
+ * Copyright Google LLC All Rights Reserved.
496777
+ *
496778
+ * Use of this source code is governed by an MIT-style license that can be
496779
+ * found in the LICENSE file at https://angular.io/license
496780
+ *)
496781
+
496782
+ @angular-devkit/architect/src/internal.js:
496783
+ (**
496784
+ * @license
496785
+ * Copyright Google LLC All Rights Reserved.
496786
+ *
496787
+ * Use of this source code is governed by an MIT-style license that can be
496788
+ * found in the LICENSE file at https://angular.io/license
496789
+ *)
496790
+
496791
+ @angular-devkit/architect/src/create-builder.js:
496792
+ (**
496793
+ * @license
496794
+ * Copyright Google LLC All Rights Reserved.
496795
+ *
496796
+ * Use of this source code is governed by an MIT-style license that can be
496797
+ * found in the LICENSE file at https://angular.io/license
496798
+ *)
496799
+
496800
+ @angular-devkit/architect/src/index.js:
496801
+ (**
496802
+ * @license
496803
+ * Copyright Google LLC All Rights Reserved.
496804
+ *
496805
+ * Use of this source code is governed by an MIT-style license that can be
496806
+ * found in the LICENSE file at https://angular.io/license
496807
+ *)
496808
+
494966
496809
  queue-microtask/index.js:
494967
496810
  (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
494968
496811