@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/CHANGELOG.md +47 -0
- package/index.js +1858 -15
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +1850 -7
- package/src/executors/design-tokens/executor.js +1854 -11
- package/src/executors/npm-publish/executor.js +1844 -1
- package/src/executors/tsup/executor.js +1859 -16
- package/src/executors/tsup-browser/executor.js +1851 -8
- package/src/executors/tsup-neutral/executor.js +1851 -8
- package/src/executors/tsup-node/executor.js +1851 -8
- package/src/generators/browser-library/generator.js +1856 -13
- package/src/generators/config-schema/generator.js +1850 -7
- package/src/generators/init/init.js +1844 -1
- package/src/generators/neutral-library/generator.js +1856 -13
- package/src/generators/node-library/generator.js +1856 -13
- package/src/generators/preset/generator.js +1850 -7
- package/src/generators/release-version/generator.js +1852 -9
- package/src/utils/index.js +1844 -1
|
@@ -384760,6 +384760,1714 @@ var require_invoke_nx_generator = __commonJS({
|
|
|
384760
384760
|
}
|
|
384761
384761
|
});
|
|
384762
384762
|
|
|
384763
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/api.js
|
|
384764
|
+
var require_api = __commonJS({
|
|
384765
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/api.js"(exports2) {
|
|
384766
|
+
"use strict";
|
|
384767
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
384768
|
+
exports2.isJobHandler = exports2.JobState = exports2.JobOutboundMessageKind = exports2.JobInboundMessageKind = void 0;
|
|
384769
|
+
var JobInboundMessageKind;
|
|
384770
|
+
(function(JobInboundMessageKind2) {
|
|
384771
|
+
JobInboundMessageKind2["Ping"] = "ip";
|
|
384772
|
+
JobInboundMessageKind2["Stop"] = "is";
|
|
384773
|
+
JobInboundMessageKind2["Input"] = "in";
|
|
384774
|
+
})(JobInboundMessageKind || (exports2.JobInboundMessageKind = JobInboundMessageKind = {}));
|
|
384775
|
+
var JobOutboundMessageKind;
|
|
384776
|
+
(function(JobOutboundMessageKind2) {
|
|
384777
|
+
JobOutboundMessageKind2["OnReady"] = "c";
|
|
384778
|
+
JobOutboundMessageKind2["Start"] = "s";
|
|
384779
|
+
JobOutboundMessageKind2["End"] = "e";
|
|
384780
|
+
JobOutboundMessageKind2["Pong"] = "p";
|
|
384781
|
+
JobOutboundMessageKind2["Output"] = "o";
|
|
384782
|
+
JobOutboundMessageKind2["ChannelCreate"] = "cn";
|
|
384783
|
+
JobOutboundMessageKind2["ChannelMessage"] = "cm";
|
|
384784
|
+
JobOutboundMessageKind2["ChannelError"] = "ce";
|
|
384785
|
+
JobOutboundMessageKind2["ChannelComplete"] = "cc";
|
|
384786
|
+
})(JobOutboundMessageKind || (exports2.JobOutboundMessageKind = JobOutboundMessageKind = {}));
|
|
384787
|
+
var JobState;
|
|
384788
|
+
(function(JobState2) {
|
|
384789
|
+
JobState2["Queued"] = "queued";
|
|
384790
|
+
JobState2["Ready"] = "ready";
|
|
384791
|
+
JobState2["Started"] = "started";
|
|
384792
|
+
JobState2["Ended"] = "ended";
|
|
384793
|
+
JobState2["Errored"] = "errored";
|
|
384794
|
+
})(JobState || (exports2.JobState = JobState = {}));
|
|
384795
|
+
function isJobHandler(value) {
|
|
384796
|
+
const job = value;
|
|
384797
|
+
return typeof job == "function" && typeof job.jobDescription == "object" && job.jobDescription !== null;
|
|
384798
|
+
}
|
|
384799
|
+
exports2.isJobHandler = isJobHandler;
|
|
384800
|
+
}
|
|
384801
|
+
});
|
|
384802
|
+
|
|
384803
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/strategy.js
|
|
384804
|
+
var require_strategy = __commonJS({
|
|
384805
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/strategy.js"(exports2) {
|
|
384806
|
+
"use strict";
|
|
384807
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
384808
|
+
exports2.memoize = exports2.reuse = exports2.serialize = void 0;
|
|
384809
|
+
var core_1 = require_src3();
|
|
384810
|
+
var rxjs_1 = require_cjs();
|
|
384811
|
+
var api_1 = require_api();
|
|
384812
|
+
function serialize() {
|
|
384813
|
+
let latest = (0, rxjs_1.of)();
|
|
384814
|
+
return (handler, options8) => {
|
|
384815
|
+
const newHandler = (argument, context) => {
|
|
384816
|
+
const previous = latest;
|
|
384817
|
+
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));
|
|
384818
|
+
return latest;
|
|
384819
|
+
};
|
|
384820
|
+
return Object.assign(newHandler, {
|
|
384821
|
+
jobDescription: Object.assign({}, handler.jobDescription, options8)
|
|
384822
|
+
});
|
|
384823
|
+
};
|
|
384824
|
+
}
|
|
384825
|
+
exports2.serialize = serialize;
|
|
384826
|
+
function reuse(replayMessages = false) {
|
|
384827
|
+
let inboundBus = new rxjs_1.Subject();
|
|
384828
|
+
let run2 = null;
|
|
384829
|
+
let state = null;
|
|
384830
|
+
return (handler, options8) => {
|
|
384831
|
+
const newHandler = (argument, context) => {
|
|
384832
|
+
const subscription = context.inboundBus.subscribe(inboundBus);
|
|
384833
|
+
if (run2) {
|
|
384834
|
+
return (0, rxjs_1.concat)(
|
|
384835
|
+
// Update state.
|
|
384836
|
+
(0, rxjs_1.of)(state),
|
|
384837
|
+
run2
|
|
384838
|
+
).pipe((0, rxjs_1.finalize)(() => subscription.unsubscribe()));
|
|
384839
|
+
}
|
|
384840
|
+
run2 = handler(argument, { ...context, inboundBus: inboundBus.asObservable() }).pipe((0, rxjs_1.tap)((message) => {
|
|
384841
|
+
if (message.kind == api_1.JobOutboundMessageKind.Start || message.kind == api_1.JobOutboundMessageKind.OnReady || message.kind == api_1.JobOutboundMessageKind.End) {
|
|
384842
|
+
state = message;
|
|
384843
|
+
}
|
|
384844
|
+
}, void 0, () => {
|
|
384845
|
+
subscription.unsubscribe();
|
|
384846
|
+
inboundBus = new rxjs_1.Subject();
|
|
384847
|
+
run2 = null;
|
|
384848
|
+
}), replayMessages ? (0, rxjs_1.shareReplay)() : (0, rxjs_1.share)());
|
|
384849
|
+
return run2;
|
|
384850
|
+
};
|
|
384851
|
+
return Object.assign(newHandler, handler, options8 || {});
|
|
384852
|
+
};
|
|
384853
|
+
}
|
|
384854
|
+
exports2.reuse = reuse;
|
|
384855
|
+
function memoize(replayMessages = false) {
|
|
384856
|
+
const runs = /* @__PURE__ */ new Map();
|
|
384857
|
+
return (handler, options8) => {
|
|
384858
|
+
const newHandler = (argument, context) => {
|
|
384859
|
+
const argumentJson = JSON.stringify((0, core_1.isJsonObject)(argument) ? Object.keys(argument).sort().reduce((result, key2) => {
|
|
384860
|
+
result[key2] = argument[key2];
|
|
384861
|
+
return result;
|
|
384862
|
+
}, {}) : argument);
|
|
384863
|
+
const maybeJob = runs.get(argumentJson);
|
|
384864
|
+
if (maybeJob) {
|
|
384865
|
+
return maybeJob;
|
|
384866
|
+
}
|
|
384867
|
+
const run2 = handler(argument, context).pipe(replayMessages ? (0, rxjs_1.shareReplay)() : (0, rxjs_1.share)());
|
|
384868
|
+
runs.set(argumentJson, run2);
|
|
384869
|
+
return run2;
|
|
384870
|
+
};
|
|
384871
|
+
return Object.assign(newHandler, handler, options8 || {});
|
|
384872
|
+
};
|
|
384873
|
+
}
|
|
384874
|
+
exports2.memoize = memoize;
|
|
384875
|
+
}
|
|
384876
|
+
});
|
|
384877
|
+
|
|
384878
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js
|
|
384879
|
+
var require_create_job_handler = __commonJS({
|
|
384880
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js"(exports2) {
|
|
384881
|
+
"use strict";
|
|
384882
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
384883
|
+
exports2.createLoggerJob = exports2.createJobFactory = exports2.createJobHandler = exports2.ChannelAlreadyExistException = void 0;
|
|
384884
|
+
var core_1 = require_src3();
|
|
384885
|
+
var rxjs_1 = require_cjs();
|
|
384886
|
+
var api_1 = require_api();
|
|
384887
|
+
var ChannelAlreadyExistException = class extends core_1.BaseException {
|
|
384888
|
+
constructor(name) {
|
|
384889
|
+
super(`Channel ${JSON.stringify(name)} already exist.`);
|
|
384890
|
+
}
|
|
384891
|
+
};
|
|
384892
|
+
exports2.ChannelAlreadyExistException = ChannelAlreadyExistException;
|
|
384893
|
+
function createJobHandler(fn6, options8 = {}) {
|
|
384894
|
+
const handler = (argument, context) => {
|
|
384895
|
+
const description = context.description;
|
|
384896
|
+
const inboundBus = context.inboundBus;
|
|
384897
|
+
const inputChannel = new rxjs_1.Subject();
|
|
384898
|
+
let subscription;
|
|
384899
|
+
const teardownLogics = [];
|
|
384900
|
+
let tearingDown = false;
|
|
384901
|
+
return new rxjs_1.Observable((subject) => {
|
|
384902
|
+
function complete() {
|
|
384903
|
+
if (subscription) {
|
|
384904
|
+
subscription.unsubscribe();
|
|
384905
|
+
}
|
|
384906
|
+
subject.next({ kind: api_1.JobOutboundMessageKind.End, description });
|
|
384907
|
+
subject.complete();
|
|
384908
|
+
inputChannel.complete();
|
|
384909
|
+
}
|
|
384910
|
+
const inboundSub = inboundBus.subscribe((message) => {
|
|
384911
|
+
switch (message.kind) {
|
|
384912
|
+
case api_1.JobInboundMessageKind.Ping:
|
|
384913
|
+
subject.next({ kind: api_1.JobOutboundMessageKind.Pong, description, id: message.id });
|
|
384914
|
+
break;
|
|
384915
|
+
case api_1.JobInboundMessageKind.Stop:
|
|
384916
|
+
tearingDown = true;
|
|
384917
|
+
if (teardownLogics.length) {
|
|
384918
|
+
Promise.all(teardownLogics.map((fn7) => fn7())).then(() => complete(), () => complete());
|
|
384919
|
+
} else {
|
|
384920
|
+
complete();
|
|
384921
|
+
}
|
|
384922
|
+
break;
|
|
384923
|
+
case api_1.JobInboundMessageKind.Input:
|
|
384924
|
+
if (!tearingDown) {
|
|
384925
|
+
inputChannel.next(message.value);
|
|
384926
|
+
}
|
|
384927
|
+
break;
|
|
384928
|
+
}
|
|
384929
|
+
});
|
|
384930
|
+
const channels = /* @__PURE__ */ new Map();
|
|
384931
|
+
const newContext = {
|
|
384932
|
+
...context,
|
|
384933
|
+
input: inputChannel.asObservable(),
|
|
384934
|
+
addTeardown(teardown) {
|
|
384935
|
+
teardownLogics.push(teardown);
|
|
384936
|
+
},
|
|
384937
|
+
createChannel(name) {
|
|
384938
|
+
if (channels.has(name)) {
|
|
384939
|
+
throw new ChannelAlreadyExistException(name);
|
|
384940
|
+
}
|
|
384941
|
+
const channelSubject = new rxjs_1.Subject();
|
|
384942
|
+
const channelSub = channelSubject.subscribe((message) => {
|
|
384943
|
+
subject.next({
|
|
384944
|
+
kind: api_1.JobOutboundMessageKind.ChannelMessage,
|
|
384945
|
+
description,
|
|
384946
|
+
name,
|
|
384947
|
+
message
|
|
384948
|
+
});
|
|
384949
|
+
}, (error) => {
|
|
384950
|
+
subject.next({ kind: api_1.JobOutboundMessageKind.ChannelError, description, name, error });
|
|
384951
|
+
channels.delete(name);
|
|
384952
|
+
}, () => {
|
|
384953
|
+
subject.next({ kind: api_1.JobOutboundMessageKind.ChannelComplete, description, name });
|
|
384954
|
+
channels.delete(name);
|
|
384955
|
+
});
|
|
384956
|
+
channels.set(name, channelSubject);
|
|
384957
|
+
if (subscription) {
|
|
384958
|
+
subscription.add(channelSub);
|
|
384959
|
+
}
|
|
384960
|
+
return channelSubject;
|
|
384961
|
+
}
|
|
384962
|
+
};
|
|
384963
|
+
subject.next({ kind: api_1.JobOutboundMessageKind.Start, description });
|
|
384964
|
+
let result = fn6(argument, newContext);
|
|
384965
|
+
if ((0, core_1.isPromise)(result)) {
|
|
384966
|
+
result = (0, rxjs_1.from)(result);
|
|
384967
|
+
} else if (!(0, rxjs_1.isObservable)(result)) {
|
|
384968
|
+
result = (0, rxjs_1.of)(result);
|
|
384969
|
+
}
|
|
384970
|
+
subscription = result.subscribe((value) => subject.next({ kind: api_1.JobOutboundMessageKind.Output, description, value }), (error) => subject.error(error), () => complete());
|
|
384971
|
+
subscription.add(inboundSub);
|
|
384972
|
+
return subscription;
|
|
384973
|
+
});
|
|
384974
|
+
};
|
|
384975
|
+
return Object.assign(handler, { jobDescription: options8 });
|
|
384976
|
+
}
|
|
384977
|
+
exports2.createJobHandler = createJobHandler;
|
|
384978
|
+
function createJobFactory(loader2, options8 = {}) {
|
|
384979
|
+
const handler = (argument, context) => {
|
|
384980
|
+
return (0, rxjs_1.from)(loader2()).pipe((0, rxjs_1.switchMap)((fn6) => fn6(argument, context)));
|
|
384981
|
+
};
|
|
384982
|
+
return Object.assign(handler, { jobDescription: options8 });
|
|
384983
|
+
}
|
|
384984
|
+
exports2.createJobFactory = createJobFactory;
|
|
384985
|
+
function createLoggerJob(job, logger) {
|
|
384986
|
+
const handler = (argument, context) => {
|
|
384987
|
+
context.inboundBus.pipe((0, rxjs_1.tap)((message) => logger.info(`Input: ${JSON.stringify(message)}`))).subscribe();
|
|
384988
|
+
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`)));
|
|
384989
|
+
};
|
|
384990
|
+
return Object.assign(handler, job);
|
|
384991
|
+
}
|
|
384992
|
+
exports2.createLoggerJob = createLoggerJob;
|
|
384993
|
+
}
|
|
384994
|
+
});
|
|
384995
|
+
|
|
384996
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/exception.js
|
|
384997
|
+
var require_exception4 = __commonJS({
|
|
384998
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/exception.js"(exports2) {
|
|
384999
|
+
"use strict";
|
|
385000
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385001
|
+
exports2.JobDoesNotExistException = exports2.JobNameAlreadyRegisteredException = void 0;
|
|
385002
|
+
var core_1 = require_src3();
|
|
385003
|
+
var JobNameAlreadyRegisteredException = class extends core_1.BaseException {
|
|
385004
|
+
constructor(name) {
|
|
385005
|
+
super(`Job named ${JSON.stringify(name)} already exists.`);
|
|
385006
|
+
}
|
|
385007
|
+
};
|
|
385008
|
+
exports2.JobNameAlreadyRegisteredException = JobNameAlreadyRegisteredException;
|
|
385009
|
+
var JobDoesNotExistException = class extends core_1.BaseException {
|
|
385010
|
+
constructor(name) {
|
|
385011
|
+
super(`Job name ${JSON.stringify(name)} does not exist.`);
|
|
385012
|
+
}
|
|
385013
|
+
};
|
|
385014
|
+
exports2.JobDoesNotExistException = JobDoesNotExistException;
|
|
385015
|
+
}
|
|
385016
|
+
});
|
|
385017
|
+
|
|
385018
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/dispatcher.js
|
|
385019
|
+
var require_dispatcher = __commonJS({
|
|
385020
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/dispatcher.js"(exports2) {
|
|
385021
|
+
"use strict";
|
|
385022
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385023
|
+
exports2.createDispatcher = void 0;
|
|
385024
|
+
var api_1 = require_api();
|
|
385025
|
+
var exception_1 = require_exception4();
|
|
385026
|
+
function createDispatcher(options8 = {}) {
|
|
385027
|
+
let defaultDelegate = null;
|
|
385028
|
+
const conditionalDelegateList = [];
|
|
385029
|
+
const job = Object.assign((argument, context) => {
|
|
385030
|
+
const maybeDelegate = conditionalDelegateList.find(([predicate]) => predicate(argument));
|
|
385031
|
+
let delegate = null;
|
|
385032
|
+
if (maybeDelegate) {
|
|
385033
|
+
delegate = context.scheduler.schedule(maybeDelegate[1], argument);
|
|
385034
|
+
} else if (defaultDelegate) {
|
|
385035
|
+
delegate = context.scheduler.schedule(defaultDelegate, argument);
|
|
385036
|
+
} else {
|
|
385037
|
+
throw new exception_1.JobDoesNotExistException("<null>");
|
|
385038
|
+
}
|
|
385039
|
+
context.inboundBus.subscribe(delegate.inboundBus);
|
|
385040
|
+
return delegate.outboundBus;
|
|
385041
|
+
}, {
|
|
385042
|
+
jobDescription: options8
|
|
385043
|
+
});
|
|
385044
|
+
return Object.assign(job, {
|
|
385045
|
+
setDefaultJob(name) {
|
|
385046
|
+
if ((0, api_1.isJobHandler)(name)) {
|
|
385047
|
+
name = name.jobDescription.name === void 0 ? null : name.jobDescription.name;
|
|
385048
|
+
}
|
|
385049
|
+
defaultDelegate = name;
|
|
385050
|
+
},
|
|
385051
|
+
addConditionalJob(predicate, name) {
|
|
385052
|
+
conditionalDelegateList.push([predicate, name]);
|
|
385053
|
+
}
|
|
385054
|
+
// TODO: Remove return-only generic from createDispatcher() API.
|
|
385055
|
+
});
|
|
385056
|
+
}
|
|
385057
|
+
exports2.createDispatcher = createDispatcher;
|
|
385058
|
+
}
|
|
385059
|
+
});
|
|
385060
|
+
|
|
385061
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/fallback-registry.js
|
|
385062
|
+
var require_fallback_registry = __commonJS({
|
|
385063
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/fallback-registry.js"(exports2) {
|
|
385064
|
+
"use strict";
|
|
385065
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385066
|
+
exports2.FallbackRegistry = void 0;
|
|
385067
|
+
var rxjs_1 = require_cjs();
|
|
385068
|
+
var FallbackRegistry = class {
|
|
385069
|
+
_fallbacks;
|
|
385070
|
+
constructor(_fallbacks = []) {
|
|
385071
|
+
this._fallbacks = _fallbacks;
|
|
385072
|
+
}
|
|
385073
|
+
addFallback(registry) {
|
|
385074
|
+
this._fallbacks.push(registry);
|
|
385075
|
+
}
|
|
385076
|
+
get(name) {
|
|
385077
|
+
return (0, rxjs_1.from)(this._fallbacks).pipe((0, rxjs_1.concatMap)((fb) => fb.get(name)), (0, rxjs_1.first)((x5) => x5 !== null, null));
|
|
385078
|
+
}
|
|
385079
|
+
};
|
|
385080
|
+
exports2.FallbackRegistry = FallbackRegistry;
|
|
385081
|
+
}
|
|
385082
|
+
});
|
|
385083
|
+
|
|
385084
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-registry.js
|
|
385085
|
+
var require_simple_registry = __commonJS({
|
|
385086
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-registry.js"(exports2) {
|
|
385087
|
+
"use strict";
|
|
385088
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385089
|
+
exports2.SimpleJobRegistry = void 0;
|
|
385090
|
+
var core_1 = require_src3();
|
|
385091
|
+
var rxjs_1 = require_cjs();
|
|
385092
|
+
var api_1 = require_api();
|
|
385093
|
+
var exception_1 = require_exception4();
|
|
385094
|
+
var SimpleJobRegistry = class {
|
|
385095
|
+
_jobNames = /* @__PURE__ */ new Map();
|
|
385096
|
+
get(name) {
|
|
385097
|
+
return (0, rxjs_1.of)(this._jobNames.get(name) || null);
|
|
385098
|
+
}
|
|
385099
|
+
register(nameOrHandler, handlerOrOptions = {}, options8 = {}) {
|
|
385100
|
+
if (typeof nameOrHandler == "string") {
|
|
385101
|
+
if (!(0, api_1.isJobHandler)(handlerOrOptions)) {
|
|
385102
|
+
throw new TypeError("Expected a JobHandler as second argument.");
|
|
385103
|
+
}
|
|
385104
|
+
this._register(nameOrHandler, handlerOrOptions, options8);
|
|
385105
|
+
} else if ((0, api_1.isJobHandler)(nameOrHandler)) {
|
|
385106
|
+
if (typeof handlerOrOptions !== "object") {
|
|
385107
|
+
throw new TypeError("Expected an object options as second argument.");
|
|
385108
|
+
}
|
|
385109
|
+
const name = options8.name || nameOrHandler.jobDescription.name || handlerOrOptions.name;
|
|
385110
|
+
if (name === void 0) {
|
|
385111
|
+
throw new TypeError("Expected name to be a string.");
|
|
385112
|
+
}
|
|
385113
|
+
this._register(name, nameOrHandler, options8);
|
|
385114
|
+
} else {
|
|
385115
|
+
throw new TypeError("Unrecognized arguments.");
|
|
385116
|
+
}
|
|
385117
|
+
}
|
|
385118
|
+
_register(name, handler, options8) {
|
|
385119
|
+
if (this._jobNames.has(name)) {
|
|
385120
|
+
throw new exception_1.JobNameAlreadyRegisteredException(name);
|
|
385121
|
+
}
|
|
385122
|
+
const argument = core_1.schema.mergeSchemas(handler.jobDescription.argument, options8.argument);
|
|
385123
|
+
const input = core_1.schema.mergeSchemas(handler.jobDescription.input, options8.input);
|
|
385124
|
+
const output = core_1.schema.mergeSchemas(handler.jobDescription.output, options8.output);
|
|
385125
|
+
const jobDescription = {
|
|
385126
|
+
name,
|
|
385127
|
+
argument,
|
|
385128
|
+
output,
|
|
385129
|
+
input
|
|
385130
|
+
};
|
|
385131
|
+
const jobHandler = Object.assign(handler.bind(void 0), {
|
|
385132
|
+
jobDescription
|
|
385133
|
+
});
|
|
385134
|
+
this._jobNames.set(name, jobHandler);
|
|
385135
|
+
}
|
|
385136
|
+
/**
|
|
385137
|
+
* Returns the job names of all jobs.
|
|
385138
|
+
*/
|
|
385139
|
+
getJobNames() {
|
|
385140
|
+
return [...this._jobNames.keys()];
|
|
385141
|
+
}
|
|
385142
|
+
};
|
|
385143
|
+
exports2.SimpleJobRegistry = SimpleJobRegistry;
|
|
385144
|
+
}
|
|
385145
|
+
});
|
|
385146
|
+
|
|
385147
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-scheduler.js
|
|
385148
|
+
var require_simple_scheduler = __commonJS({
|
|
385149
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/simple-scheduler.js"(exports2) {
|
|
385150
|
+
"use strict";
|
|
385151
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385152
|
+
exports2.SimpleScheduler = exports2.JobOutputSchemaValidationError = exports2.JobInboundMessageSchemaValidationError = exports2.JobArgumentSchemaValidationError = void 0;
|
|
385153
|
+
var core_1 = require_src3();
|
|
385154
|
+
var rxjs_1 = require_cjs();
|
|
385155
|
+
var api_1 = require_api();
|
|
385156
|
+
var exception_1 = require_exception4();
|
|
385157
|
+
var JobArgumentSchemaValidationError = class extends core_1.schema.SchemaValidationException {
|
|
385158
|
+
constructor(errors) {
|
|
385159
|
+
super(errors, "Job Argument failed to validate. Errors: ");
|
|
385160
|
+
}
|
|
385161
|
+
};
|
|
385162
|
+
exports2.JobArgumentSchemaValidationError = JobArgumentSchemaValidationError;
|
|
385163
|
+
var JobInboundMessageSchemaValidationError = class extends core_1.schema.SchemaValidationException {
|
|
385164
|
+
constructor(errors) {
|
|
385165
|
+
super(errors, "Job Inbound Message failed to validate. Errors: ");
|
|
385166
|
+
}
|
|
385167
|
+
};
|
|
385168
|
+
exports2.JobInboundMessageSchemaValidationError = JobInboundMessageSchemaValidationError;
|
|
385169
|
+
var JobOutputSchemaValidationError = class extends core_1.schema.SchemaValidationException {
|
|
385170
|
+
constructor(errors) {
|
|
385171
|
+
super(errors, "Job Output failed to validate. Errors: ");
|
|
385172
|
+
}
|
|
385173
|
+
};
|
|
385174
|
+
exports2.JobOutputSchemaValidationError = JobOutputSchemaValidationError;
|
|
385175
|
+
function _jobShare() {
|
|
385176
|
+
return (source2) => {
|
|
385177
|
+
let refCount = 0;
|
|
385178
|
+
let subject;
|
|
385179
|
+
let hasError = false;
|
|
385180
|
+
let isComplete = false;
|
|
385181
|
+
let subscription;
|
|
385182
|
+
return new rxjs_1.Observable((subscriber) => {
|
|
385183
|
+
let innerSub;
|
|
385184
|
+
refCount++;
|
|
385185
|
+
if (!subject) {
|
|
385186
|
+
subject = new rxjs_1.Subject();
|
|
385187
|
+
innerSub = subject.subscribe(subscriber);
|
|
385188
|
+
subscription = source2.subscribe({
|
|
385189
|
+
next(value) {
|
|
385190
|
+
subject.next(value);
|
|
385191
|
+
},
|
|
385192
|
+
error(err) {
|
|
385193
|
+
hasError = true;
|
|
385194
|
+
subject.error(err);
|
|
385195
|
+
},
|
|
385196
|
+
complete() {
|
|
385197
|
+
isComplete = true;
|
|
385198
|
+
subject.complete();
|
|
385199
|
+
}
|
|
385200
|
+
});
|
|
385201
|
+
} else {
|
|
385202
|
+
innerSub = subject.subscribe(subscriber);
|
|
385203
|
+
}
|
|
385204
|
+
return () => {
|
|
385205
|
+
refCount--;
|
|
385206
|
+
innerSub.unsubscribe();
|
|
385207
|
+
if (subscription && refCount === 0 && (isComplete || hasError)) {
|
|
385208
|
+
subscription.unsubscribe();
|
|
385209
|
+
}
|
|
385210
|
+
};
|
|
385211
|
+
});
|
|
385212
|
+
};
|
|
385213
|
+
}
|
|
385214
|
+
var SimpleScheduler = class {
|
|
385215
|
+
_jobRegistry;
|
|
385216
|
+
_schemaRegistry;
|
|
385217
|
+
_internalJobDescriptionMap = /* @__PURE__ */ new Map();
|
|
385218
|
+
_queue = [];
|
|
385219
|
+
_pauseCounter = 0;
|
|
385220
|
+
constructor(_jobRegistry, _schemaRegistry = new core_1.schema.CoreSchemaRegistry()) {
|
|
385221
|
+
this._jobRegistry = _jobRegistry;
|
|
385222
|
+
this._schemaRegistry = _schemaRegistry;
|
|
385223
|
+
}
|
|
385224
|
+
_getInternalDescription(name) {
|
|
385225
|
+
const maybeHandler = this._internalJobDescriptionMap.get(name);
|
|
385226
|
+
if (maybeHandler !== void 0) {
|
|
385227
|
+
return (0, rxjs_1.of)(maybeHandler);
|
|
385228
|
+
}
|
|
385229
|
+
const handler = this._jobRegistry.get(name);
|
|
385230
|
+
return handler.pipe((0, rxjs_1.switchMap)((handler2) => {
|
|
385231
|
+
if (handler2 === null) {
|
|
385232
|
+
return (0, rxjs_1.of)(null);
|
|
385233
|
+
}
|
|
385234
|
+
const description = {
|
|
385235
|
+
// Make a copy of it to be sure it's proper JSON.
|
|
385236
|
+
...JSON.parse(JSON.stringify(handler2.jobDescription)),
|
|
385237
|
+
name: handler2.jobDescription.name || name,
|
|
385238
|
+
argument: handler2.jobDescription.argument || true,
|
|
385239
|
+
input: handler2.jobDescription.input || true,
|
|
385240
|
+
output: handler2.jobDescription.output || true,
|
|
385241
|
+
channels: handler2.jobDescription.channels || {}
|
|
385242
|
+
};
|
|
385243
|
+
const handlerWithExtra = Object.assign(handler2.bind(void 0), {
|
|
385244
|
+
jobDescription: description,
|
|
385245
|
+
argumentV: this._schemaRegistry.compile(description.argument),
|
|
385246
|
+
inputV: this._schemaRegistry.compile(description.input),
|
|
385247
|
+
outputV: this._schemaRegistry.compile(description.output)
|
|
385248
|
+
});
|
|
385249
|
+
this._internalJobDescriptionMap.set(name, handlerWithExtra);
|
|
385250
|
+
return (0, rxjs_1.of)(handlerWithExtra);
|
|
385251
|
+
}));
|
|
385252
|
+
}
|
|
385253
|
+
/**
|
|
385254
|
+
* Get a job description for a named job.
|
|
385255
|
+
*
|
|
385256
|
+
* @param name The name of the job.
|
|
385257
|
+
* @returns A description, or null if the job is not registered.
|
|
385258
|
+
*/
|
|
385259
|
+
getDescription(name) {
|
|
385260
|
+
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)());
|
|
385261
|
+
}
|
|
385262
|
+
/**
|
|
385263
|
+
* Returns true if the job name has been registered.
|
|
385264
|
+
* @param name The name of the job.
|
|
385265
|
+
* @returns True if the job exists, false otherwise.
|
|
385266
|
+
*/
|
|
385267
|
+
has(name) {
|
|
385268
|
+
return this.getDescription(name).pipe((0, rxjs_1.map)((x5) => x5 !== null));
|
|
385269
|
+
}
|
|
385270
|
+
/**
|
|
385271
|
+
* Pause the scheduler, temporary queueing _new_ jobs. Returns a resume function that should be
|
|
385272
|
+
* used to resume execution. If multiple `pause()` were called, all their resume functions must
|
|
385273
|
+
* be called before the Scheduler actually starts new jobs. Additional calls to the same resume
|
|
385274
|
+
* function will have no effect.
|
|
385275
|
+
*
|
|
385276
|
+
* Jobs already running are NOT paused. This is pausing the scheduler only.
|
|
385277
|
+
*/
|
|
385278
|
+
pause() {
|
|
385279
|
+
let called = false;
|
|
385280
|
+
this._pauseCounter++;
|
|
385281
|
+
return () => {
|
|
385282
|
+
if (!called) {
|
|
385283
|
+
called = true;
|
|
385284
|
+
if (--this._pauseCounter == 0) {
|
|
385285
|
+
const q9 = this._queue;
|
|
385286
|
+
this._queue = [];
|
|
385287
|
+
q9.forEach((fn6) => fn6());
|
|
385288
|
+
}
|
|
385289
|
+
}
|
|
385290
|
+
};
|
|
385291
|
+
}
|
|
385292
|
+
/**
|
|
385293
|
+
* Schedule a job to be run, using its name.
|
|
385294
|
+
* @param name The name of job to be run.
|
|
385295
|
+
* @param argument The argument to send to the job when starting it.
|
|
385296
|
+
* @param options Scheduling options.
|
|
385297
|
+
* @returns The Job being run.
|
|
385298
|
+
*/
|
|
385299
|
+
schedule(name, argument, options8) {
|
|
385300
|
+
if (this._pauseCounter > 0) {
|
|
385301
|
+
const waitable = new rxjs_1.Subject();
|
|
385302
|
+
this._queue.push(() => waitable.complete());
|
|
385303
|
+
return this._scheduleJob(name, argument, options8 || {}, waitable);
|
|
385304
|
+
}
|
|
385305
|
+
return this._scheduleJob(name, argument, options8 || {}, rxjs_1.EMPTY);
|
|
385306
|
+
}
|
|
385307
|
+
/**
|
|
385308
|
+
* Filter messages.
|
|
385309
|
+
* @private
|
|
385310
|
+
*/
|
|
385311
|
+
_filterJobOutboundMessages(message, state) {
|
|
385312
|
+
switch (message.kind) {
|
|
385313
|
+
case api_1.JobOutboundMessageKind.OnReady:
|
|
385314
|
+
return state == api_1.JobState.Queued;
|
|
385315
|
+
case api_1.JobOutboundMessageKind.Start:
|
|
385316
|
+
return state == api_1.JobState.Ready;
|
|
385317
|
+
case api_1.JobOutboundMessageKind.End:
|
|
385318
|
+
return state == api_1.JobState.Started || state == api_1.JobState.Ready;
|
|
385319
|
+
}
|
|
385320
|
+
return true;
|
|
385321
|
+
}
|
|
385322
|
+
/**
|
|
385323
|
+
* Return a new state. This is just to simplify the reading of the _createJob method.
|
|
385324
|
+
* @private
|
|
385325
|
+
*/
|
|
385326
|
+
_updateState(message, state) {
|
|
385327
|
+
switch (message.kind) {
|
|
385328
|
+
case api_1.JobOutboundMessageKind.OnReady:
|
|
385329
|
+
return api_1.JobState.Ready;
|
|
385330
|
+
case api_1.JobOutboundMessageKind.Start:
|
|
385331
|
+
return api_1.JobState.Started;
|
|
385332
|
+
case api_1.JobOutboundMessageKind.End:
|
|
385333
|
+
return api_1.JobState.Ended;
|
|
385334
|
+
}
|
|
385335
|
+
return state;
|
|
385336
|
+
}
|
|
385337
|
+
/**
|
|
385338
|
+
* Create the job.
|
|
385339
|
+
* @private
|
|
385340
|
+
*/
|
|
385341
|
+
// eslint-disable-next-line max-lines-per-function
|
|
385342
|
+
_createJob(name, argument, handler, inboundBus, outboundBus) {
|
|
385343
|
+
const schemaRegistry = this._schemaRegistry;
|
|
385344
|
+
const channelsSubject = /* @__PURE__ */ new Map();
|
|
385345
|
+
const channels = /* @__PURE__ */ new Map();
|
|
385346
|
+
let state = api_1.JobState.Queued;
|
|
385347
|
+
let pingId = 0;
|
|
385348
|
+
const input = new rxjs_1.Subject();
|
|
385349
|
+
input.pipe((0, rxjs_1.concatMap)((message) => handler.pipe((0, rxjs_1.switchMap)(async (handler2) => {
|
|
385350
|
+
if (handler2 === null) {
|
|
385351
|
+
throw new exception_1.JobDoesNotExistException(name);
|
|
385352
|
+
}
|
|
385353
|
+
const validator = await handler2.inputV;
|
|
385354
|
+
return validator(message);
|
|
385355
|
+
}))), (0, rxjs_1.filter)((result) => result.success), (0, rxjs_1.map)((result) => result.data)).subscribe((value) => inboundBus.next({ kind: api_1.JobInboundMessageKind.Input, value }));
|
|
385356
|
+
outboundBus = (0, rxjs_1.concat)(
|
|
385357
|
+
outboundBus,
|
|
385358
|
+
// Add an End message at completion. This will be filtered out if the job actually send an
|
|
385359
|
+
// End.
|
|
385360
|
+
handler.pipe((0, rxjs_1.switchMap)((handler2) => {
|
|
385361
|
+
if (handler2) {
|
|
385362
|
+
return (0, rxjs_1.of)({
|
|
385363
|
+
kind: api_1.JobOutboundMessageKind.End,
|
|
385364
|
+
description: handler2.jobDescription
|
|
385365
|
+
});
|
|
385366
|
+
} else {
|
|
385367
|
+
return rxjs_1.EMPTY;
|
|
385368
|
+
}
|
|
385369
|
+
}))
|
|
385370
|
+
).pipe(
|
|
385371
|
+
(0, rxjs_1.filter)((message) => this._filterJobOutboundMessages(message, state)),
|
|
385372
|
+
// Update internal logic and Job<> members.
|
|
385373
|
+
(0, rxjs_1.tap)((message) => {
|
|
385374
|
+
state = this._updateState(message, state);
|
|
385375
|
+
switch (message.kind) {
|
|
385376
|
+
case api_1.JobOutboundMessageKind.ChannelCreate: {
|
|
385377
|
+
const maybeSubject = channelsSubject.get(message.name);
|
|
385378
|
+
if (!maybeSubject) {
|
|
385379
|
+
const s = new rxjs_1.Subject();
|
|
385380
|
+
channelsSubject.set(message.name, s);
|
|
385381
|
+
channels.set(message.name, s.asObservable());
|
|
385382
|
+
}
|
|
385383
|
+
break;
|
|
385384
|
+
}
|
|
385385
|
+
case api_1.JobOutboundMessageKind.ChannelMessage: {
|
|
385386
|
+
const maybeSubject = channelsSubject.get(message.name);
|
|
385387
|
+
if (maybeSubject) {
|
|
385388
|
+
maybeSubject.next(message.message);
|
|
385389
|
+
}
|
|
385390
|
+
break;
|
|
385391
|
+
}
|
|
385392
|
+
case api_1.JobOutboundMessageKind.ChannelComplete: {
|
|
385393
|
+
const maybeSubject = channelsSubject.get(message.name);
|
|
385394
|
+
if (maybeSubject) {
|
|
385395
|
+
maybeSubject.complete();
|
|
385396
|
+
channelsSubject.delete(message.name);
|
|
385397
|
+
}
|
|
385398
|
+
break;
|
|
385399
|
+
}
|
|
385400
|
+
case api_1.JobOutboundMessageKind.ChannelError: {
|
|
385401
|
+
const maybeSubject = channelsSubject.get(message.name);
|
|
385402
|
+
if (maybeSubject) {
|
|
385403
|
+
maybeSubject.error(message.error);
|
|
385404
|
+
channelsSubject.delete(message.name);
|
|
385405
|
+
}
|
|
385406
|
+
break;
|
|
385407
|
+
}
|
|
385408
|
+
}
|
|
385409
|
+
}, () => {
|
|
385410
|
+
state = api_1.JobState.Errored;
|
|
385411
|
+
}),
|
|
385412
|
+
// Do output validation (might include default values so this might have side
|
|
385413
|
+
// effects). We keep all messages in order.
|
|
385414
|
+
(0, rxjs_1.concatMap)((message) => {
|
|
385415
|
+
if (message.kind !== api_1.JobOutboundMessageKind.Output) {
|
|
385416
|
+
return (0, rxjs_1.of)(message);
|
|
385417
|
+
}
|
|
385418
|
+
return handler.pipe((0, rxjs_1.switchMap)(async (handler2) => {
|
|
385419
|
+
if (handler2 === null) {
|
|
385420
|
+
throw new exception_1.JobDoesNotExistException(name);
|
|
385421
|
+
}
|
|
385422
|
+
const validate = await handler2.outputV;
|
|
385423
|
+
const output2 = await validate(message.value);
|
|
385424
|
+
if (!output2.success) {
|
|
385425
|
+
throw new JobOutputSchemaValidationError(output2.errors);
|
|
385426
|
+
}
|
|
385427
|
+
return {
|
|
385428
|
+
...message,
|
|
385429
|
+
output: output2.data
|
|
385430
|
+
};
|
|
385431
|
+
}));
|
|
385432
|
+
}),
|
|
385433
|
+
_jobShare()
|
|
385434
|
+
);
|
|
385435
|
+
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));
|
|
385436
|
+
return {
|
|
385437
|
+
get state() {
|
|
385438
|
+
return state;
|
|
385439
|
+
},
|
|
385440
|
+
argument,
|
|
385441
|
+
description: handler.pipe((0, rxjs_1.switchMap)((handler2) => {
|
|
385442
|
+
if (handler2 === null) {
|
|
385443
|
+
throw new exception_1.JobDoesNotExistException(name);
|
|
385444
|
+
} else {
|
|
385445
|
+
return (0, rxjs_1.of)(handler2.jobDescription);
|
|
385446
|
+
}
|
|
385447
|
+
})),
|
|
385448
|
+
output,
|
|
385449
|
+
getChannel(name2, schema2 = true) {
|
|
385450
|
+
let maybeObservable = channels.get(name2);
|
|
385451
|
+
if (!maybeObservable) {
|
|
385452
|
+
const s = new rxjs_1.Subject();
|
|
385453
|
+
channelsSubject.set(name2, s);
|
|
385454
|
+
channels.set(name2, s.asObservable());
|
|
385455
|
+
maybeObservable = s.asObservable();
|
|
385456
|
+
}
|
|
385457
|
+
return maybeObservable.pipe(
|
|
385458
|
+
// Keep the order of messages.
|
|
385459
|
+
(0, rxjs_1.concatMap)((message) => {
|
|
385460
|
+
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));
|
|
385461
|
+
})
|
|
385462
|
+
);
|
|
385463
|
+
},
|
|
385464
|
+
ping() {
|
|
385465
|
+
const id = pingId++;
|
|
385466
|
+
inboundBus.next({ kind: api_1.JobInboundMessageKind.Ping, id });
|
|
385467
|
+
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)());
|
|
385468
|
+
},
|
|
385469
|
+
stop() {
|
|
385470
|
+
inboundBus.next({ kind: api_1.JobInboundMessageKind.Stop });
|
|
385471
|
+
},
|
|
385472
|
+
input,
|
|
385473
|
+
inboundBus,
|
|
385474
|
+
outboundBus
|
|
385475
|
+
};
|
|
385476
|
+
}
|
|
385477
|
+
_scheduleJob(name, argument, options8, waitable) {
|
|
385478
|
+
const handler = this._getInternalDescription(name);
|
|
385479
|
+
const optionsDeps = options8 && options8.dependencies || [];
|
|
385480
|
+
const dependencies = Array.isArray(optionsDeps) ? optionsDeps : [optionsDeps];
|
|
385481
|
+
const inboundBus = new rxjs_1.Subject();
|
|
385482
|
+
const outboundBus = (0, rxjs_1.concat)(
|
|
385483
|
+
// Wait for dependencies, make sure to not report messages from dependencies. Subscribe to
|
|
385484
|
+
// all dependencies at the same time so they run concurrently.
|
|
385485
|
+
(0, rxjs_1.merge)(...dependencies.map((x5) => x5.outboundBus)).pipe((0, rxjs_1.ignoreElements)()),
|
|
385486
|
+
// Wait for pause() to clear (if necessary).
|
|
385487
|
+
waitable,
|
|
385488
|
+
(0, rxjs_1.from)(handler).pipe((0, rxjs_1.switchMap)((handler2) => new rxjs_1.Observable((subscriber) => {
|
|
385489
|
+
if (!handler2) {
|
|
385490
|
+
throw new exception_1.JobDoesNotExistException(name);
|
|
385491
|
+
}
|
|
385492
|
+
return (0, rxjs_1.from)(handler2.argumentV).pipe((0, rxjs_1.switchMap)((validate) => validate(argument)), (0, rxjs_1.switchMap)((output) => {
|
|
385493
|
+
if (!output.success) {
|
|
385494
|
+
throw new JobArgumentSchemaValidationError(output.errors);
|
|
385495
|
+
}
|
|
385496
|
+
const argument2 = output.data;
|
|
385497
|
+
const description = handler2.jobDescription;
|
|
385498
|
+
subscriber.next({ kind: api_1.JobOutboundMessageKind.OnReady, description });
|
|
385499
|
+
const context = {
|
|
385500
|
+
description,
|
|
385501
|
+
dependencies: [...dependencies],
|
|
385502
|
+
inboundBus: inboundBus.asObservable(),
|
|
385503
|
+
scheduler: this
|
|
385504
|
+
};
|
|
385505
|
+
return handler2(argument2, context);
|
|
385506
|
+
})).subscribe(subscriber);
|
|
385507
|
+
})))
|
|
385508
|
+
);
|
|
385509
|
+
return this._createJob(name, argument, handler, inboundBus, outboundBus);
|
|
385510
|
+
}
|
|
385511
|
+
};
|
|
385512
|
+
exports2.SimpleScheduler = SimpleScheduler;
|
|
385513
|
+
}
|
|
385514
|
+
});
|
|
385515
|
+
|
|
385516
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/index.js
|
|
385517
|
+
var require_jobs = __commonJS({
|
|
385518
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/jobs/index.js"(exports2) {
|
|
385519
|
+
"use strict";
|
|
385520
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o2, m2, k6, k23) {
|
|
385521
|
+
if (k23 === void 0)
|
|
385522
|
+
k23 = k6;
|
|
385523
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k6);
|
|
385524
|
+
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
385525
|
+
desc = { enumerable: true, get: function() {
|
|
385526
|
+
return m2[k6];
|
|
385527
|
+
} };
|
|
385528
|
+
}
|
|
385529
|
+
Object.defineProperty(o2, k23, desc);
|
|
385530
|
+
} : function(o2, m2, k6, k23) {
|
|
385531
|
+
if (k23 === void 0)
|
|
385532
|
+
k23 = k6;
|
|
385533
|
+
o2[k23] = m2[k6];
|
|
385534
|
+
});
|
|
385535
|
+
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o2, v5) {
|
|
385536
|
+
Object.defineProperty(o2, "default", { enumerable: true, value: v5 });
|
|
385537
|
+
} : function(o2, v5) {
|
|
385538
|
+
o2["default"] = v5;
|
|
385539
|
+
});
|
|
385540
|
+
var __importStar2 = exports2 && exports2.__importStar || function(mod) {
|
|
385541
|
+
if (mod && mod.__esModule)
|
|
385542
|
+
return mod;
|
|
385543
|
+
var result = {};
|
|
385544
|
+
if (mod != null) {
|
|
385545
|
+
for (var k6 in mod)
|
|
385546
|
+
if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6))
|
|
385547
|
+
__createBinding2(result, mod, k6);
|
|
385548
|
+
}
|
|
385549
|
+
__setModuleDefault2(result, mod);
|
|
385550
|
+
return result;
|
|
385551
|
+
};
|
|
385552
|
+
var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
|
|
385553
|
+
for (var p4 in m2)
|
|
385554
|
+
if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4))
|
|
385555
|
+
__createBinding2(exports3, m2, p4);
|
|
385556
|
+
};
|
|
385557
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385558
|
+
exports2.strategy = void 0;
|
|
385559
|
+
var strategy = __importStar2(require_strategy());
|
|
385560
|
+
exports2.strategy = strategy;
|
|
385561
|
+
__exportStar2(require_api(), exports2);
|
|
385562
|
+
__exportStar2(require_create_job_handler(), exports2);
|
|
385563
|
+
__exportStar2(require_exception4(), exports2);
|
|
385564
|
+
__exportStar2(require_dispatcher(), exports2);
|
|
385565
|
+
__exportStar2(require_fallback_registry(), exports2);
|
|
385566
|
+
__exportStar2(require_simple_registry(), exports2);
|
|
385567
|
+
__exportStar2(require_simple_scheduler(), exports2);
|
|
385568
|
+
}
|
|
385569
|
+
});
|
|
385570
|
+
|
|
385571
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.js
|
|
385572
|
+
var require_progress_schema = __commonJS({
|
|
385573
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.js"(exports2) {
|
|
385574
|
+
"use strict";
|
|
385575
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385576
|
+
exports2.State = void 0;
|
|
385577
|
+
var State;
|
|
385578
|
+
(function(State2) {
|
|
385579
|
+
State2["Error"] = "error";
|
|
385580
|
+
State2["Running"] = "running";
|
|
385581
|
+
State2["Stopped"] = "stopped";
|
|
385582
|
+
State2["Waiting"] = "waiting";
|
|
385583
|
+
})(State || (exports2.State = State = {}));
|
|
385584
|
+
}
|
|
385585
|
+
});
|
|
385586
|
+
|
|
385587
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/api.js
|
|
385588
|
+
var require_api2 = __commonJS({
|
|
385589
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/api.js"(exports2) {
|
|
385590
|
+
"use strict";
|
|
385591
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385592
|
+
exports2.scheduleTargetAndForget = exports2.targetFromTargetString = exports2.targetStringFromTarget = exports2.fromAsyncIterable = exports2.isBuilderOutput = exports2.BuilderProgressState = void 0;
|
|
385593
|
+
var rxjs_1 = require_cjs();
|
|
385594
|
+
var progress_schema_1 = require_progress_schema();
|
|
385595
|
+
Object.defineProperty(exports2, "BuilderProgressState", { enumerable: true, get: function() {
|
|
385596
|
+
return progress_schema_1.State;
|
|
385597
|
+
} });
|
|
385598
|
+
function isBuilderOutput(obj) {
|
|
385599
|
+
if (!obj || typeof obj.then === "function" || typeof obj.subscribe === "function") {
|
|
385600
|
+
return false;
|
|
385601
|
+
}
|
|
385602
|
+
if (typeof obj[Symbol.asyncIterator] === "function") {
|
|
385603
|
+
return false;
|
|
385604
|
+
}
|
|
385605
|
+
return typeof obj.success === "boolean";
|
|
385606
|
+
}
|
|
385607
|
+
exports2.isBuilderOutput = isBuilderOutput;
|
|
385608
|
+
function fromAsyncIterable(iterable) {
|
|
385609
|
+
return new rxjs_1.Observable((subscriber) => {
|
|
385610
|
+
handleAsyncIterator(subscriber, iterable[Symbol.asyncIterator]()).then(() => subscriber.complete(), (error) => subscriber.error(error));
|
|
385611
|
+
});
|
|
385612
|
+
}
|
|
385613
|
+
exports2.fromAsyncIterable = fromAsyncIterable;
|
|
385614
|
+
async function handleAsyncIterator(subscriber, iterator) {
|
|
385615
|
+
const teardown = new Promise((resolve3) => subscriber.add(() => resolve3()));
|
|
385616
|
+
try {
|
|
385617
|
+
while (!subscriber.closed) {
|
|
385618
|
+
const result = await Promise.race([teardown, iterator.next()]);
|
|
385619
|
+
if (!result || result.done) {
|
|
385620
|
+
break;
|
|
385621
|
+
}
|
|
385622
|
+
subscriber.next(result.value);
|
|
385623
|
+
}
|
|
385624
|
+
} finally {
|
|
385625
|
+
await iterator.return?.();
|
|
385626
|
+
}
|
|
385627
|
+
}
|
|
385628
|
+
function targetStringFromTarget({ project, target, configuration }) {
|
|
385629
|
+
return `${project}:${target}${configuration !== void 0 ? ":" + configuration : ""}`;
|
|
385630
|
+
}
|
|
385631
|
+
exports2.targetStringFromTarget = targetStringFromTarget;
|
|
385632
|
+
function targetFromTargetString(specifier, abbreviatedProjectName, abbreviatedTargetName) {
|
|
385633
|
+
const tuple = specifier.split(":", 3);
|
|
385634
|
+
if (tuple.length < 2) {
|
|
385635
|
+
throw new Error("Invalid target string: " + JSON.stringify(specifier));
|
|
385636
|
+
}
|
|
385637
|
+
return {
|
|
385638
|
+
project: tuple[0] || abbreviatedProjectName || "",
|
|
385639
|
+
target: tuple[1] || abbreviatedTargetName || "",
|
|
385640
|
+
...tuple[2] !== void 0 && { configuration: tuple[2] }
|
|
385641
|
+
};
|
|
385642
|
+
}
|
|
385643
|
+
exports2.targetFromTargetString = targetFromTargetString;
|
|
385644
|
+
function scheduleTargetAndForget(context, target, overrides, scheduleOptions) {
|
|
385645
|
+
let resolve3 = null;
|
|
385646
|
+
const promise = new Promise((r4) => resolve3 = r4);
|
|
385647
|
+
context.addTeardown(() => promise);
|
|
385648
|
+
return (0, rxjs_1.from)(context.scheduleTarget(target, overrides, scheduleOptions)).pipe((0, rxjs_1.switchMap)((run2) => new rxjs_1.Observable((observer) => {
|
|
385649
|
+
const subscription = run2.output.subscribe(observer);
|
|
385650
|
+
return () => {
|
|
385651
|
+
subscription.unsubscribe();
|
|
385652
|
+
run2.stop().then(resolve3);
|
|
385653
|
+
};
|
|
385654
|
+
})));
|
|
385655
|
+
}
|
|
385656
|
+
exports2.scheduleTargetAndForget = scheduleTargetAndForget;
|
|
385657
|
+
}
|
|
385658
|
+
});
|
|
385659
|
+
|
|
385660
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.json
|
|
385661
|
+
var require_progress_schema2 = __commonJS({
|
|
385662
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/progress-schema.json"(exports2, module2) {
|
|
385663
|
+
module2.exports = {
|
|
385664
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
385665
|
+
$id: "BuilderProgressSchema",
|
|
385666
|
+
title: "Progress schema for builders.",
|
|
385667
|
+
type: "object",
|
|
385668
|
+
allOf: [
|
|
385669
|
+
{
|
|
385670
|
+
type: "object",
|
|
385671
|
+
oneOf: [
|
|
385672
|
+
{
|
|
385673
|
+
type: "object",
|
|
385674
|
+
properties: {
|
|
385675
|
+
state: {
|
|
385676
|
+
type: "string",
|
|
385677
|
+
enum: ["stopped"]
|
|
385678
|
+
}
|
|
385679
|
+
},
|
|
385680
|
+
required: ["state"]
|
|
385681
|
+
},
|
|
385682
|
+
{
|
|
385683
|
+
type: "object",
|
|
385684
|
+
properties: {
|
|
385685
|
+
state: {
|
|
385686
|
+
type: "string",
|
|
385687
|
+
enum: ["waiting"]
|
|
385688
|
+
},
|
|
385689
|
+
status: {
|
|
385690
|
+
type: "string"
|
|
385691
|
+
}
|
|
385692
|
+
},
|
|
385693
|
+
required: ["state"]
|
|
385694
|
+
},
|
|
385695
|
+
{
|
|
385696
|
+
type: "object",
|
|
385697
|
+
properties: {
|
|
385698
|
+
state: {
|
|
385699
|
+
type: "string",
|
|
385700
|
+
enum: ["running"]
|
|
385701
|
+
},
|
|
385702
|
+
current: {
|
|
385703
|
+
type: "number",
|
|
385704
|
+
minimum: 0
|
|
385705
|
+
},
|
|
385706
|
+
total: {
|
|
385707
|
+
type: "number",
|
|
385708
|
+
minimum: 0
|
|
385709
|
+
},
|
|
385710
|
+
status: {
|
|
385711
|
+
type: "string"
|
|
385712
|
+
}
|
|
385713
|
+
},
|
|
385714
|
+
required: ["state"]
|
|
385715
|
+
},
|
|
385716
|
+
{
|
|
385717
|
+
type: "object",
|
|
385718
|
+
properties: {
|
|
385719
|
+
state: {
|
|
385720
|
+
type: "string",
|
|
385721
|
+
enum: ["error"]
|
|
385722
|
+
},
|
|
385723
|
+
error: true
|
|
385724
|
+
},
|
|
385725
|
+
required: ["state"]
|
|
385726
|
+
}
|
|
385727
|
+
]
|
|
385728
|
+
},
|
|
385729
|
+
{
|
|
385730
|
+
type: "object",
|
|
385731
|
+
properties: {
|
|
385732
|
+
builder: {
|
|
385733
|
+
type: "object"
|
|
385734
|
+
},
|
|
385735
|
+
target: {
|
|
385736
|
+
type: "object"
|
|
385737
|
+
},
|
|
385738
|
+
id: {
|
|
385739
|
+
type: "number"
|
|
385740
|
+
}
|
|
385741
|
+
},
|
|
385742
|
+
required: ["builder", "id"]
|
|
385743
|
+
}
|
|
385744
|
+
]
|
|
385745
|
+
};
|
|
385746
|
+
}
|
|
385747
|
+
});
|
|
385748
|
+
|
|
385749
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/schedule-by-name.js
|
|
385750
|
+
var require_schedule_by_name = __commonJS({
|
|
385751
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/schedule-by-name.js"(exports2) {
|
|
385752
|
+
"use strict";
|
|
385753
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385754
|
+
exports2.scheduleByTarget = exports2.scheduleByName = void 0;
|
|
385755
|
+
var rxjs_1 = require_cjs();
|
|
385756
|
+
var api_1 = require_api2();
|
|
385757
|
+
var jobs_1 = require_jobs();
|
|
385758
|
+
var progressSchema = require_progress_schema2();
|
|
385759
|
+
var _uniqueId = 0;
|
|
385760
|
+
async function scheduleByName(name, buildOptions, options8) {
|
|
385761
|
+
const childLoggerName = options8.target ? `{${(0, api_1.targetStringFromTarget)(options8.target)}}` : name;
|
|
385762
|
+
const logger = options8.logger.createChild(childLoggerName);
|
|
385763
|
+
const job = options8.scheduler.schedule(name, {});
|
|
385764
|
+
let stateSubscription;
|
|
385765
|
+
const workspaceRoot = await options8.workspaceRoot;
|
|
385766
|
+
const currentDirectory = await options8.currentDirectory;
|
|
385767
|
+
const description = await (0, rxjs_1.firstValueFrom)(job.description);
|
|
385768
|
+
const info = description.info;
|
|
385769
|
+
const id = ++_uniqueId;
|
|
385770
|
+
const message = {
|
|
385771
|
+
id,
|
|
385772
|
+
currentDirectory,
|
|
385773
|
+
workspaceRoot,
|
|
385774
|
+
info,
|
|
385775
|
+
options: buildOptions,
|
|
385776
|
+
...options8.target ? { target: options8.target } : {}
|
|
385777
|
+
};
|
|
385778
|
+
if (job.state !== jobs_1.JobState.Started) {
|
|
385779
|
+
stateSubscription = job.outboundBus.subscribe({
|
|
385780
|
+
next: (event) => {
|
|
385781
|
+
if (event.kind === jobs_1.JobOutboundMessageKind.Start) {
|
|
385782
|
+
job.input.next(message);
|
|
385783
|
+
}
|
|
385784
|
+
},
|
|
385785
|
+
error: () => {
|
|
385786
|
+
}
|
|
385787
|
+
});
|
|
385788
|
+
} else {
|
|
385789
|
+
job.input.next(message);
|
|
385790
|
+
}
|
|
385791
|
+
const logChannelSub = job.getChannel("log").subscribe({
|
|
385792
|
+
next: (entry) => {
|
|
385793
|
+
logger.next(entry);
|
|
385794
|
+
},
|
|
385795
|
+
error: () => {
|
|
385796
|
+
}
|
|
385797
|
+
});
|
|
385798
|
+
const outboundBusSub = job.outboundBus.subscribe({
|
|
385799
|
+
error() {
|
|
385800
|
+
},
|
|
385801
|
+
complete() {
|
|
385802
|
+
outboundBusSub.unsubscribe();
|
|
385803
|
+
logChannelSub.unsubscribe();
|
|
385804
|
+
stateSubscription.unsubscribe();
|
|
385805
|
+
}
|
|
385806
|
+
});
|
|
385807
|
+
const output = job.output.pipe((0, rxjs_1.map)((output2) => ({
|
|
385808
|
+
...output2,
|
|
385809
|
+
...options8.target ? { target: options8.target } : 0,
|
|
385810
|
+
info
|
|
385811
|
+
})), (0, rxjs_1.shareReplay)());
|
|
385812
|
+
output.pipe((0, rxjs_1.first)()).subscribe({
|
|
385813
|
+
error: () => {
|
|
385814
|
+
}
|
|
385815
|
+
});
|
|
385816
|
+
return {
|
|
385817
|
+
id,
|
|
385818
|
+
info,
|
|
385819
|
+
// This is a getter so that it always returns the next output, and not the same one.
|
|
385820
|
+
get result() {
|
|
385821
|
+
return (0, rxjs_1.firstValueFrom)(output);
|
|
385822
|
+
},
|
|
385823
|
+
get lastOutput() {
|
|
385824
|
+
return (0, rxjs_1.lastValueFrom)(output);
|
|
385825
|
+
},
|
|
385826
|
+
output,
|
|
385827
|
+
progress: job.getChannel("progress", progressSchema).pipe((0, rxjs_1.shareReplay)(1)),
|
|
385828
|
+
stop() {
|
|
385829
|
+
job.stop();
|
|
385830
|
+
return job.outboundBus.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.catchError)(() => rxjs_1.EMPTY)).toPromise();
|
|
385831
|
+
}
|
|
385832
|
+
};
|
|
385833
|
+
}
|
|
385834
|
+
exports2.scheduleByName = scheduleByName;
|
|
385835
|
+
async function scheduleByTarget(target, overrides, options8) {
|
|
385836
|
+
return scheduleByName(`{${(0, api_1.targetStringFromTarget)(target)}}`, overrides, {
|
|
385837
|
+
...options8,
|
|
385838
|
+
target,
|
|
385839
|
+
logger: options8.logger
|
|
385840
|
+
});
|
|
385841
|
+
}
|
|
385842
|
+
exports2.scheduleByTarget = scheduleByTarget;
|
|
385843
|
+
}
|
|
385844
|
+
});
|
|
385845
|
+
|
|
385846
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/input-schema.json
|
|
385847
|
+
var require_input_schema = __commonJS({
|
|
385848
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/input-schema.json"(exports2, module2) {
|
|
385849
|
+
module2.exports = {
|
|
385850
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
385851
|
+
$id: "BuilderInputSchema",
|
|
385852
|
+
title: "Input schema for builders.",
|
|
385853
|
+
type: "object",
|
|
385854
|
+
properties: {
|
|
385855
|
+
workspaceRoot: {
|
|
385856
|
+
type: "string"
|
|
385857
|
+
},
|
|
385858
|
+
currentDirectory: {
|
|
385859
|
+
type: "string"
|
|
385860
|
+
},
|
|
385861
|
+
id: {
|
|
385862
|
+
type: "number"
|
|
385863
|
+
},
|
|
385864
|
+
target: {
|
|
385865
|
+
type: "object",
|
|
385866
|
+
properties: {
|
|
385867
|
+
project: {
|
|
385868
|
+
type: "string"
|
|
385869
|
+
},
|
|
385870
|
+
target: {
|
|
385871
|
+
type: "string"
|
|
385872
|
+
},
|
|
385873
|
+
configuration: {
|
|
385874
|
+
type: "string"
|
|
385875
|
+
}
|
|
385876
|
+
},
|
|
385877
|
+
required: ["project", "target"]
|
|
385878
|
+
},
|
|
385879
|
+
info: {
|
|
385880
|
+
type: "object"
|
|
385881
|
+
},
|
|
385882
|
+
options: {
|
|
385883
|
+
type: "object"
|
|
385884
|
+
}
|
|
385885
|
+
},
|
|
385886
|
+
required: ["currentDirectory", "id", "info", "workspaceRoot"]
|
|
385887
|
+
};
|
|
385888
|
+
}
|
|
385889
|
+
});
|
|
385890
|
+
|
|
385891
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/output-schema.json
|
|
385892
|
+
var require_output_schema = __commonJS({
|
|
385893
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/output-schema.json"(exports2, module2) {
|
|
385894
|
+
module2.exports = {
|
|
385895
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
385896
|
+
$id: "BuilderOutputSchema",
|
|
385897
|
+
title: "Output schema for builders.",
|
|
385898
|
+
type: "object",
|
|
385899
|
+
properties: {
|
|
385900
|
+
success: {
|
|
385901
|
+
type: "boolean"
|
|
385902
|
+
},
|
|
385903
|
+
error: {
|
|
385904
|
+
type: "string"
|
|
385905
|
+
},
|
|
385906
|
+
target: {
|
|
385907
|
+
type: "object",
|
|
385908
|
+
properties: {
|
|
385909
|
+
project: {
|
|
385910
|
+
type: "string"
|
|
385911
|
+
},
|
|
385912
|
+
target: {
|
|
385913
|
+
type: "string"
|
|
385914
|
+
},
|
|
385915
|
+
configuration: {
|
|
385916
|
+
type: "string"
|
|
385917
|
+
}
|
|
385918
|
+
}
|
|
385919
|
+
},
|
|
385920
|
+
info: {
|
|
385921
|
+
type: "object"
|
|
385922
|
+
}
|
|
385923
|
+
},
|
|
385924
|
+
additionalProperties: true,
|
|
385925
|
+
required: ["success"]
|
|
385926
|
+
};
|
|
385927
|
+
}
|
|
385928
|
+
});
|
|
385929
|
+
|
|
385930
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/architect.js
|
|
385931
|
+
var require_architect = __commonJS({
|
|
385932
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/architect.js"(exports2) {
|
|
385933
|
+
"use strict";
|
|
385934
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
385935
|
+
exports2.Architect = void 0;
|
|
385936
|
+
var core_1 = require_src3();
|
|
385937
|
+
var rxjs_1 = require_cjs();
|
|
385938
|
+
var api_1 = require_api2();
|
|
385939
|
+
var jobs_1 = require_jobs();
|
|
385940
|
+
var schedule_by_name_1 = require_schedule_by_name();
|
|
385941
|
+
var inputSchema = require_input_schema();
|
|
385942
|
+
var outputSchema = require_output_schema();
|
|
385943
|
+
function _createJobHandlerFromBuilderInfo(info, target, host, registry, baseOptions) {
|
|
385944
|
+
const jobDescription = {
|
|
385945
|
+
name: target ? `{${(0, api_1.targetStringFromTarget)(target)}}` : info.builderName,
|
|
385946
|
+
argument: { type: "object" },
|
|
385947
|
+
input: inputSchema,
|
|
385948
|
+
output: outputSchema,
|
|
385949
|
+
info
|
|
385950
|
+
};
|
|
385951
|
+
function handler(argument, context) {
|
|
385952
|
+
const inboundBusWithInputValidation = context.inboundBus.pipe(
|
|
385953
|
+
(0, rxjs_1.concatMap)(async (message) => {
|
|
385954
|
+
if (message.kind === jobs_1.JobInboundMessageKind.Input) {
|
|
385955
|
+
const v5 = message.value;
|
|
385956
|
+
const options8 = {
|
|
385957
|
+
...baseOptions,
|
|
385958
|
+
...v5.options
|
|
385959
|
+
};
|
|
385960
|
+
const validation = await registry.compile(info.optionSchema);
|
|
385961
|
+
const validationResult = await validation(options8);
|
|
385962
|
+
const { data, success, errors } = validationResult;
|
|
385963
|
+
if (!success) {
|
|
385964
|
+
throw new core_1.json.schema.SchemaValidationException(errors);
|
|
385965
|
+
}
|
|
385966
|
+
return { ...message, value: { ...v5, options: data } };
|
|
385967
|
+
} else {
|
|
385968
|
+
return message;
|
|
385969
|
+
}
|
|
385970
|
+
}),
|
|
385971
|
+
// Using a share replay because the job might be synchronously sending input, but
|
|
385972
|
+
// asynchronously listening to it.
|
|
385973
|
+
(0, rxjs_1.shareReplay)(1)
|
|
385974
|
+
);
|
|
385975
|
+
const inboundBus = (0, rxjs_1.onErrorResumeNext)(inboundBusWithInputValidation);
|
|
385976
|
+
const output = (0, rxjs_1.from)(host.loadBuilder(info)).pipe(
|
|
385977
|
+
(0, rxjs_1.concatMap)((builder) => {
|
|
385978
|
+
if (builder === null) {
|
|
385979
|
+
throw new Error(`Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}`);
|
|
385980
|
+
}
|
|
385981
|
+
return builder.handler(argument, { ...context, inboundBus }).pipe((0, rxjs_1.map)((output2) => {
|
|
385982
|
+
if (output2.kind === jobs_1.JobOutboundMessageKind.Output) {
|
|
385983
|
+
return {
|
|
385984
|
+
...output2,
|
|
385985
|
+
value: {
|
|
385986
|
+
...output2.value,
|
|
385987
|
+
...target ? { target } : 0
|
|
385988
|
+
}
|
|
385989
|
+
};
|
|
385990
|
+
} else {
|
|
385991
|
+
return output2;
|
|
385992
|
+
}
|
|
385993
|
+
}));
|
|
385994
|
+
}),
|
|
385995
|
+
// Share subscriptions to the output, otherwise the handler will be re-run.
|
|
385996
|
+
(0, rxjs_1.shareReplay)()
|
|
385997
|
+
);
|
|
385998
|
+
const inboundBusErrors = inboundBusWithInputValidation.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.takeUntil)((0, rxjs_1.onErrorResumeNext)(output.pipe((0, rxjs_1.last)()))));
|
|
385999
|
+
return (0, rxjs_1.merge)(inboundBusErrors, output);
|
|
386000
|
+
}
|
|
386001
|
+
return (0, rxjs_1.of)(Object.assign(handler, { jobDescription }));
|
|
386002
|
+
}
|
|
386003
|
+
var ArchitectBuilderJobRegistry = class {
|
|
386004
|
+
_host;
|
|
386005
|
+
_registry;
|
|
386006
|
+
_jobCache;
|
|
386007
|
+
_infoCache;
|
|
386008
|
+
constructor(_host, _registry, _jobCache, _infoCache) {
|
|
386009
|
+
this._host = _host;
|
|
386010
|
+
this._registry = _registry;
|
|
386011
|
+
this._jobCache = _jobCache;
|
|
386012
|
+
this._infoCache = _infoCache;
|
|
386013
|
+
}
|
|
386014
|
+
_resolveBuilder(name) {
|
|
386015
|
+
const cache3 = this._infoCache;
|
|
386016
|
+
if (cache3) {
|
|
386017
|
+
const maybeCache = cache3.get(name);
|
|
386018
|
+
if (maybeCache !== void 0) {
|
|
386019
|
+
return maybeCache;
|
|
386020
|
+
}
|
|
386021
|
+
const info = (0, rxjs_1.from)(this._host.resolveBuilder(name)).pipe((0, rxjs_1.shareReplay)(1));
|
|
386022
|
+
cache3.set(name, info);
|
|
386023
|
+
return info;
|
|
386024
|
+
}
|
|
386025
|
+
return (0, rxjs_1.from)(this._host.resolveBuilder(name));
|
|
386026
|
+
}
|
|
386027
|
+
_createBuilder(info, target, options8) {
|
|
386028
|
+
const cache3 = this._jobCache;
|
|
386029
|
+
if (target) {
|
|
386030
|
+
const maybeHit = cache3 && cache3.get((0, api_1.targetStringFromTarget)(target));
|
|
386031
|
+
if (maybeHit) {
|
|
386032
|
+
return maybeHit;
|
|
386033
|
+
}
|
|
386034
|
+
} else {
|
|
386035
|
+
const maybeHit = cache3 && cache3.get(info.builderName);
|
|
386036
|
+
if (maybeHit) {
|
|
386037
|
+
return maybeHit;
|
|
386038
|
+
}
|
|
386039
|
+
}
|
|
386040
|
+
const result = _createJobHandlerFromBuilderInfo(info, target, this._host, this._registry, options8 || {});
|
|
386041
|
+
if (cache3) {
|
|
386042
|
+
if (target) {
|
|
386043
|
+
cache3.set((0, api_1.targetStringFromTarget)(target), result.pipe((0, rxjs_1.shareReplay)(1)));
|
|
386044
|
+
} else {
|
|
386045
|
+
cache3.set(info.builderName, result.pipe((0, rxjs_1.shareReplay)(1)));
|
|
386046
|
+
}
|
|
386047
|
+
}
|
|
386048
|
+
return result;
|
|
386049
|
+
}
|
|
386050
|
+
get(name) {
|
|
386051
|
+
const m2 = name.match(/^([^:]+):([^:]+)$/i);
|
|
386052
|
+
if (!m2) {
|
|
386053
|
+
return (0, rxjs_1.of)(null);
|
|
386054
|
+
}
|
|
386055
|
+
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));
|
|
386056
|
+
}
|
|
386057
|
+
};
|
|
386058
|
+
var ArchitectTargetJobRegistry = class extends ArchitectBuilderJobRegistry {
|
|
386059
|
+
get(name) {
|
|
386060
|
+
const m2 = name.match(/^{([^:]+):([^:]+)(?::([^:]*))?}$/i);
|
|
386061
|
+
if (!m2) {
|
|
386062
|
+
return (0, rxjs_1.of)(null);
|
|
386063
|
+
}
|
|
386064
|
+
const target = {
|
|
386065
|
+
project: m2[1],
|
|
386066
|
+
target: m2[2],
|
|
386067
|
+
configuration: m2[3]
|
|
386068
|
+
};
|
|
386069
|
+
return (0, rxjs_1.from)(Promise.all([
|
|
386070
|
+
this._host.getBuilderNameForTarget(target),
|
|
386071
|
+
this._host.getOptionsForTarget(target)
|
|
386072
|
+
])).pipe((0, rxjs_1.concatMap)(([builderStr, options8]) => {
|
|
386073
|
+
if (builderStr === null || options8 === null) {
|
|
386074
|
+
return (0, rxjs_1.of)(null);
|
|
386075
|
+
}
|
|
386076
|
+
return this._resolveBuilder(builderStr).pipe((0, rxjs_1.concatMap)((builderInfo) => {
|
|
386077
|
+
if (builderInfo === null) {
|
|
386078
|
+
return (0, rxjs_1.of)(null);
|
|
386079
|
+
}
|
|
386080
|
+
return this._createBuilder(builderInfo, target, options8);
|
|
386081
|
+
}));
|
|
386082
|
+
}), (0, rxjs_1.first)(null, null));
|
|
386083
|
+
}
|
|
386084
|
+
};
|
|
386085
|
+
function _getTargetOptionsFactory(host) {
|
|
386086
|
+
return (0, jobs_1.createJobHandler)((target) => {
|
|
386087
|
+
return host.getOptionsForTarget(target).then((options8) => {
|
|
386088
|
+
if (options8 === null) {
|
|
386089
|
+
throw new Error(`Invalid target: ${JSON.stringify(target)}.`);
|
|
386090
|
+
}
|
|
386091
|
+
return options8;
|
|
386092
|
+
});
|
|
386093
|
+
}, {
|
|
386094
|
+
name: "..getTargetOptions",
|
|
386095
|
+
output: { type: "object" },
|
|
386096
|
+
argument: inputSchema.properties.target
|
|
386097
|
+
});
|
|
386098
|
+
}
|
|
386099
|
+
function _getProjectMetadataFactory(host) {
|
|
386100
|
+
return (0, jobs_1.createJobHandler)((target) => {
|
|
386101
|
+
return host.getProjectMetadata(target).then((options8) => {
|
|
386102
|
+
if (options8 === null) {
|
|
386103
|
+
throw new Error(`Invalid target: ${JSON.stringify(target)}.`);
|
|
386104
|
+
}
|
|
386105
|
+
return options8;
|
|
386106
|
+
});
|
|
386107
|
+
}, {
|
|
386108
|
+
name: "..getProjectMetadata",
|
|
386109
|
+
output: { type: "object" },
|
|
386110
|
+
argument: {
|
|
386111
|
+
oneOf: [{ type: "string" }, inputSchema.properties.target]
|
|
386112
|
+
}
|
|
386113
|
+
});
|
|
386114
|
+
}
|
|
386115
|
+
function _getBuilderNameForTargetFactory(host) {
|
|
386116
|
+
return (0, jobs_1.createJobHandler)(async (target) => {
|
|
386117
|
+
const builderName = await host.getBuilderNameForTarget(target);
|
|
386118
|
+
if (!builderName) {
|
|
386119
|
+
throw new Error(`No builder were found for target ${(0, api_1.targetStringFromTarget)(target)}.`);
|
|
386120
|
+
}
|
|
386121
|
+
return builderName;
|
|
386122
|
+
}, {
|
|
386123
|
+
name: "..getBuilderNameForTarget",
|
|
386124
|
+
output: { type: "string" },
|
|
386125
|
+
argument: inputSchema.properties.target
|
|
386126
|
+
});
|
|
386127
|
+
}
|
|
386128
|
+
function _validateOptionsFactory(host, registry) {
|
|
386129
|
+
return (0, jobs_1.createJobHandler)(async ([builderName, options8]) => {
|
|
386130
|
+
const builderInfo = await host.resolveBuilder(builderName);
|
|
386131
|
+
if (!builderInfo) {
|
|
386132
|
+
throw new Error(`No builder info were found for builder ${JSON.stringify(builderName)}.`);
|
|
386133
|
+
}
|
|
386134
|
+
const validation = await registry.compile(builderInfo.optionSchema);
|
|
386135
|
+
const { data, success, errors } = await validation(options8);
|
|
386136
|
+
if (!success) {
|
|
386137
|
+
throw new core_1.json.schema.SchemaValidationException(errors);
|
|
386138
|
+
}
|
|
386139
|
+
return data;
|
|
386140
|
+
}, {
|
|
386141
|
+
name: "..validateOptions",
|
|
386142
|
+
output: { type: "object" },
|
|
386143
|
+
argument: {
|
|
386144
|
+
type: "array",
|
|
386145
|
+
items: [{ type: "string" }, { type: "object" }]
|
|
386146
|
+
}
|
|
386147
|
+
});
|
|
386148
|
+
}
|
|
386149
|
+
var Architect = class {
|
|
386150
|
+
_host;
|
|
386151
|
+
_scheduler;
|
|
386152
|
+
_jobCache = /* @__PURE__ */ new Map();
|
|
386153
|
+
_infoCache = /* @__PURE__ */ new Map();
|
|
386154
|
+
constructor(_host, registry = new core_1.json.schema.CoreSchemaRegistry(), additionalJobRegistry) {
|
|
386155
|
+
this._host = _host;
|
|
386156
|
+
const privateArchitectJobRegistry = new jobs_1.SimpleJobRegistry();
|
|
386157
|
+
privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host));
|
|
386158
|
+
privateArchitectJobRegistry.register(_getBuilderNameForTargetFactory(_host));
|
|
386159
|
+
privateArchitectJobRegistry.register(_validateOptionsFactory(_host, registry));
|
|
386160
|
+
privateArchitectJobRegistry.register(_getProjectMetadataFactory(_host));
|
|
386161
|
+
const jobRegistry = new jobs_1.FallbackRegistry([
|
|
386162
|
+
new ArchitectTargetJobRegistry(_host, registry, this._jobCache, this._infoCache),
|
|
386163
|
+
new ArchitectBuilderJobRegistry(_host, registry, this._jobCache, this._infoCache),
|
|
386164
|
+
privateArchitectJobRegistry,
|
|
386165
|
+
...additionalJobRegistry ? [additionalJobRegistry] : []
|
|
386166
|
+
]);
|
|
386167
|
+
this._scheduler = new jobs_1.SimpleScheduler(jobRegistry, registry);
|
|
386168
|
+
}
|
|
386169
|
+
has(name) {
|
|
386170
|
+
return this._scheduler.has(name);
|
|
386171
|
+
}
|
|
386172
|
+
scheduleBuilder(name, options8, scheduleOptions = {}) {
|
|
386173
|
+
if (!/^[^:]+:[^:]+(:[^:]+)?$/.test(name)) {
|
|
386174
|
+
throw new Error("Invalid builder name: " + JSON.stringify(name));
|
|
386175
|
+
}
|
|
386176
|
+
return (0, schedule_by_name_1.scheduleByName)(name, options8, {
|
|
386177
|
+
scheduler: this._scheduler,
|
|
386178
|
+
logger: scheduleOptions.logger || new core_1.logging.NullLogger(),
|
|
386179
|
+
currentDirectory: this._host.getCurrentDirectory(),
|
|
386180
|
+
workspaceRoot: this._host.getWorkspaceRoot()
|
|
386181
|
+
});
|
|
386182
|
+
}
|
|
386183
|
+
scheduleTarget(target, overrides = {}, scheduleOptions = {}) {
|
|
386184
|
+
return (0, schedule_by_name_1.scheduleByTarget)(target, overrides, {
|
|
386185
|
+
scheduler: this._scheduler,
|
|
386186
|
+
logger: scheduleOptions.logger || new core_1.logging.NullLogger(),
|
|
386187
|
+
currentDirectory: this._host.getCurrentDirectory(),
|
|
386188
|
+
workspaceRoot: this._host.getWorkspaceRoot()
|
|
386189
|
+
});
|
|
386190
|
+
}
|
|
386191
|
+
};
|
|
386192
|
+
exports2.Architect = Architect;
|
|
386193
|
+
}
|
|
386194
|
+
});
|
|
386195
|
+
|
|
386196
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/internal.js
|
|
386197
|
+
var require_internal = __commonJS({
|
|
386198
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/internal.js"(exports2) {
|
|
386199
|
+
"use strict";
|
|
386200
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386201
|
+
exports2.BuilderVersionSymbol = exports2.BuilderSymbol = void 0;
|
|
386202
|
+
exports2.BuilderSymbol = Symbol.for("@angular-devkit/architect:builder");
|
|
386203
|
+
exports2.BuilderVersionSymbol = Symbol.for("@angular-devkit/architect:version");
|
|
386204
|
+
}
|
|
386205
|
+
});
|
|
386206
|
+
|
|
386207
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/package.json
|
|
386208
|
+
var require_package3 = __commonJS({
|
|
386209
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/package.json"(exports2, module2) {
|
|
386210
|
+
module2.exports = {
|
|
386211
|
+
name: "@angular-devkit/architect",
|
|
386212
|
+
version: "0.1702.0",
|
|
386213
|
+
description: "Angular Build Facade",
|
|
386214
|
+
experimental: true,
|
|
386215
|
+
main: "src/index.js",
|
|
386216
|
+
typings: "src/index.d.ts",
|
|
386217
|
+
dependencies: {
|
|
386218
|
+
"@angular-devkit/core": "17.2.0",
|
|
386219
|
+
rxjs: "7.8.1"
|
|
386220
|
+
},
|
|
386221
|
+
builders: "./builders/builders.json",
|
|
386222
|
+
keywords: [
|
|
386223
|
+
"Angular CLI",
|
|
386224
|
+
"Angular DevKit",
|
|
386225
|
+
"angular",
|
|
386226
|
+
"devkit",
|
|
386227
|
+
"sdk"
|
|
386228
|
+
],
|
|
386229
|
+
repository: {
|
|
386230
|
+
type: "git",
|
|
386231
|
+
url: "https://github.com/angular/angular-cli.git"
|
|
386232
|
+
},
|
|
386233
|
+
engines: {
|
|
386234
|
+
node: "^18.13.0 || >=20.9.0",
|
|
386235
|
+
npm: "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
386236
|
+
yarn: ">= 1.13.0"
|
|
386237
|
+
},
|
|
386238
|
+
author: "Angular Authors",
|
|
386239
|
+
license: "MIT",
|
|
386240
|
+
bugs: {
|
|
386241
|
+
url: "https://github.com/angular/angular-cli/issues"
|
|
386242
|
+
},
|
|
386243
|
+
homepage: "https://github.com/angular/angular-cli"
|
|
386244
|
+
};
|
|
386245
|
+
}
|
|
386246
|
+
});
|
|
386247
|
+
|
|
386248
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/create-builder.js
|
|
386249
|
+
var require_create_builder = __commonJS({
|
|
386250
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/create-builder.js"(exports2) {
|
|
386251
|
+
"use strict";
|
|
386252
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386253
|
+
exports2.createBuilder = void 0;
|
|
386254
|
+
var core_1 = require_src3();
|
|
386255
|
+
var rxjs_1 = require_cjs();
|
|
386256
|
+
var api_1 = require_api2();
|
|
386257
|
+
var internal_1 = require_internal();
|
|
386258
|
+
var jobs_1 = require_jobs();
|
|
386259
|
+
var schedule_by_name_1 = require_schedule_by_name();
|
|
386260
|
+
function createBuilder2(fn6) {
|
|
386261
|
+
const cjh = jobs_1.createJobHandler;
|
|
386262
|
+
const handler = cjh((options8, context) => {
|
|
386263
|
+
const scheduler = context.scheduler;
|
|
386264
|
+
const progressChannel = context.createChannel("progress");
|
|
386265
|
+
const logChannel = context.createChannel("log");
|
|
386266
|
+
const addTeardown = context.addTeardown.bind(context);
|
|
386267
|
+
let currentState = api_1.BuilderProgressState.Stopped;
|
|
386268
|
+
let current = 0;
|
|
386269
|
+
let status = "";
|
|
386270
|
+
let total = 1;
|
|
386271
|
+
function log(entry) {
|
|
386272
|
+
logChannel.next(entry);
|
|
386273
|
+
}
|
|
386274
|
+
function progress(progress2, context2) {
|
|
386275
|
+
currentState = progress2.state;
|
|
386276
|
+
if (progress2.state === api_1.BuilderProgressState.Running) {
|
|
386277
|
+
current = progress2.current;
|
|
386278
|
+
total = progress2.total !== void 0 ? progress2.total : total;
|
|
386279
|
+
if (progress2.status === void 0) {
|
|
386280
|
+
progress2.status = status;
|
|
386281
|
+
} else {
|
|
386282
|
+
status = progress2.status;
|
|
386283
|
+
}
|
|
386284
|
+
}
|
|
386285
|
+
progressChannel.next({
|
|
386286
|
+
...progress2,
|
|
386287
|
+
...context2.target && { target: context2.target },
|
|
386288
|
+
...context2.builder && { builder: context2.builder },
|
|
386289
|
+
id: context2.id
|
|
386290
|
+
});
|
|
386291
|
+
}
|
|
386292
|
+
return new rxjs_1.Observable((observer) => {
|
|
386293
|
+
const subscriptions = [];
|
|
386294
|
+
const inputSubscription = context.inboundBus.subscribe((i3) => {
|
|
386295
|
+
switch (i3.kind) {
|
|
386296
|
+
case jobs_1.JobInboundMessageKind.Input:
|
|
386297
|
+
onInput(i3.value);
|
|
386298
|
+
break;
|
|
386299
|
+
}
|
|
386300
|
+
});
|
|
386301
|
+
function onInput(i3) {
|
|
386302
|
+
const builder = i3.info;
|
|
386303
|
+
const loggerName = i3.target ? (0, api_1.targetStringFromTarget)(i3.target) : builder.builderName;
|
|
386304
|
+
const logger = new core_1.logging.Logger(loggerName);
|
|
386305
|
+
subscriptions.push(logger.subscribe((entry) => log(entry)));
|
|
386306
|
+
const context2 = {
|
|
386307
|
+
builder,
|
|
386308
|
+
workspaceRoot: i3.workspaceRoot,
|
|
386309
|
+
currentDirectory: i3.currentDirectory,
|
|
386310
|
+
target: i3.target,
|
|
386311
|
+
logger,
|
|
386312
|
+
id: i3.id,
|
|
386313
|
+
async scheduleTarget(target, overrides = {}, scheduleOptions = {}) {
|
|
386314
|
+
const run2 = await (0, schedule_by_name_1.scheduleByTarget)(target, overrides, {
|
|
386315
|
+
scheduler,
|
|
386316
|
+
logger: scheduleOptions.logger || logger.createChild(""),
|
|
386317
|
+
workspaceRoot: i3.workspaceRoot,
|
|
386318
|
+
currentDirectory: i3.currentDirectory
|
|
386319
|
+
});
|
|
386320
|
+
subscriptions.push(run2.progress.subscribe((event) => progressChannel.next(event)));
|
|
386321
|
+
return run2;
|
|
386322
|
+
},
|
|
386323
|
+
async scheduleBuilder(builderName, options9 = {}, scheduleOptions = {}) {
|
|
386324
|
+
const run2 = await (0, schedule_by_name_1.scheduleByName)(builderName, options9, {
|
|
386325
|
+
scheduler,
|
|
386326
|
+
target: scheduleOptions.target,
|
|
386327
|
+
logger: scheduleOptions.logger || logger.createChild(""),
|
|
386328
|
+
workspaceRoot: i3.workspaceRoot,
|
|
386329
|
+
currentDirectory: i3.currentDirectory
|
|
386330
|
+
});
|
|
386331
|
+
subscriptions.push(run2.progress.subscribe((event) => progressChannel.next(event)));
|
|
386332
|
+
return run2;
|
|
386333
|
+
},
|
|
386334
|
+
async getTargetOptions(target) {
|
|
386335
|
+
return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getTargetOptions", target).output);
|
|
386336
|
+
},
|
|
386337
|
+
async getProjectMetadata(target) {
|
|
386338
|
+
return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getProjectMetadata", target).output);
|
|
386339
|
+
},
|
|
386340
|
+
async getBuilderNameForTarget(target) {
|
|
386341
|
+
return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..getBuilderNameForTarget", target).output);
|
|
386342
|
+
},
|
|
386343
|
+
async validateOptions(options9, builderName) {
|
|
386344
|
+
return (0, rxjs_1.firstValueFrom)(scheduler.schedule("..validateOptions", [builderName, options9]).output);
|
|
386345
|
+
},
|
|
386346
|
+
reportRunning() {
|
|
386347
|
+
switch (currentState) {
|
|
386348
|
+
case api_1.BuilderProgressState.Waiting:
|
|
386349
|
+
case api_1.BuilderProgressState.Stopped:
|
|
386350
|
+
progress({ state: api_1.BuilderProgressState.Running, current: 0, total }, context2);
|
|
386351
|
+
break;
|
|
386352
|
+
}
|
|
386353
|
+
},
|
|
386354
|
+
reportStatus(status2) {
|
|
386355
|
+
switch (currentState) {
|
|
386356
|
+
case api_1.BuilderProgressState.Running:
|
|
386357
|
+
progress({ state: currentState, status: status2, current, total }, context2);
|
|
386358
|
+
break;
|
|
386359
|
+
case api_1.BuilderProgressState.Waiting:
|
|
386360
|
+
progress({ state: currentState, status: status2 }, context2);
|
|
386361
|
+
break;
|
|
386362
|
+
}
|
|
386363
|
+
},
|
|
386364
|
+
reportProgress(current2, total2, status2) {
|
|
386365
|
+
switch (currentState) {
|
|
386366
|
+
case api_1.BuilderProgressState.Running:
|
|
386367
|
+
progress({ state: currentState, current: current2, total: total2, status: status2 }, context2);
|
|
386368
|
+
}
|
|
386369
|
+
},
|
|
386370
|
+
addTeardown
|
|
386371
|
+
};
|
|
386372
|
+
context2.reportRunning();
|
|
386373
|
+
let result;
|
|
386374
|
+
try {
|
|
386375
|
+
result = fn6(i3.options, context2);
|
|
386376
|
+
if ((0, api_1.isBuilderOutput)(result)) {
|
|
386377
|
+
result = (0, rxjs_1.of)(result);
|
|
386378
|
+
} else if (!(0, rxjs_1.isObservable)(result) && isAsyncIterable(result)) {
|
|
386379
|
+
result = (0, api_1.fromAsyncIterable)(result);
|
|
386380
|
+
} else {
|
|
386381
|
+
result = (0, rxjs_1.from)(result);
|
|
386382
|
+
}
|
|
386383
|
+
} catch (e3) {
|
|
386384
|
+
result = (0, rxjs_1.throwError)(e3);
|
|
386385
|
+
}
|
|
386386
|
+
progress({ state: api_1.BuilderProgressState.Running, current: 0, total: 1 }, context2);
|
|
386387
|
+
subscriptions.push(result.pipe((0, rxjs_1.defaultIfEmpty)({ success: false }), (0, rxjs_1.tap)(() => {
|
|
386388
|
+
progress({ state: api_1.BuilderProgressState.Running, current: total }, context2);
|
|
386389
|
+
progress({ state: api_1.BuilderProgressState.Stopped }, context2);
|
|
386390
|
+
}), (0, rxjs_1.mergeMap)(async (value) => {
|
|
386391
|
+
await new Promise(setImmediate);
|
|
386392
|
+
return value;
|
|
386393
|
+
})).subscribe((message) => observer.next(message), (error) => observer.error(error), () => observer.complete()));
|
|
386394
|
+
}
|
|
386395
|
+
return () => {
|
|
386396
|
+
subscriptions.forEach((x5) => x5.unsubscribe());
|
|
386397
|
+
inputSubscription.unsubscribe();
|
|
386398
|
+
};
|
|
386399
|
+
});
|
|
386400
|
+
});
|
|
386401
|
+
return {
|
|
386402
|
+
handler,
|
|
386403
|
+
[internal_1.BuilderSymbol]: true,
|
|
386404
|
+
[internal_1.BuilderVersionSymbol]: require_package3().version
|
|
386405
|
+
};
|
|
386406
|
+
}
|
|
386407
|
+
exports2.createBuilder = createBuilder2;
|
|
386408
|
+
function isAsyncIterable(obj) {
|
|
386409
|
+
return !!obj && typeof obj[Symbol.asyncIterator] === "function";
|
|
386410
|
+
}
|
|
386411
|
+
}
|
|
386412
|
+
});
|
|
386413
|
+
|
|
386414
|
+
// node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/index.js
|
|
386415
|
+
var require_src5 = __commonJS({
|
|
386416
|
+
"node_modules/.pnpm/@angular-devkit+architect@0.1702.0/node_modules/@angular-devkit/architect/src/index.js"(exports2) {
|
|
386417
|
+
"use strict";
|
|
386418
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o2, m2, k6, k23) {
|
|
386419
|
+
if (k23 === void 0)
|
|
386420
|
+
k23 = k6;
|
|
386421
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k6);
|
|
386422
|
+
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
386423
|
+
desc = { enumerable: true, get: function() {
|
|
386424
|
+
return m2[k6];
|
|
386425
|
+
} };
|
|
386426
|
+
}
|
|
386427
|
+
Object.defineProperty(o2, k23, desc);
|
|
386428
|
+
} : function(o2, m2, k6, k23) {
|
|
386429
|
+
if (k23 === void 0)
|
|
386430
|
+
k23 = k6;
|
|
386431
|
+
o2[k23] = m2[k6];
|
|
386432
|
+
});
|
|
386433
|
+
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o2, v5) {
|
|
386434
|
+
Object.defineProperty(o2, "default", { enumerable: true, value: v5 });
|
|
386435
|
+
} : function(o2, v5) {
|
|
386436
|
+
o2["default"] = v5;
|
|
386437
|
+
});
|
|
386438
|
+
var __importStar2 = exports2 && exports2.__importStar || function(mod) {
|
|
386439
|
+
if (mod && mod.__esModule)
|
|
386440
|
+
return mod;
|
|
386441
|
+
var result = {};
|
|
386442
|
+
if (mod != null) {
|
|
386443
|
+
for (var k6 in mod)
|
|
386444
|
+
if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6))
|
|
386445
|
+
__createBinding2(result, mod, k6);
|
|
386446
|
+
}
|
|
386447
|
+
__setModuleDefault2(result, mod);
|
|
386448
|
+
return result;
|
|
386449
|
+
};
|
|
386450
|
+
var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
|
|
386451
|
+
for (var p4 in m2)
|
|
386452
|
+
if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4))
|
|
386453
|
+
__createBinding2(exports3, m2, p4);
|
|
386454
|
+
};
|
|
386455
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386456
|
+
exports2.jobs = exports2.createBuilder = exports2.Architect = void 0;
|
|
386457
|
+
var jobs = __importStar2(require_jobs());
|
|
386458
|
+
exports2.jobs = jobs;
|
|
386459
|
+
__exportStar2(require_api2(), exports2);
|
|
386460
|
+
var architect_1 = require_architect();
|
|
386461
|
+
Object.defineProperty(exports2, "Architect", { enumerable: true, get: function() {
|
|
386462
|
+
return architect_1.Architect;
|
|
386463
|
+
} });
|
|
386464
|
+
var create_builder_1 = require_create_builder();
|
|
386465
|
+
Object.defineProperty(exports2, "createBuilder", { enumerable: true, get: function() {
|
|
386466
|
+
return create_builder_1.createBuilder;
|
|
386467
|
+
} });
|
|
386468
|
+
}
|
|
386469
|
+
});
|
|
386470
|
+
|
|
384763
386471
|
// node_modules/.pnpm/@nx+devkit@18.0.4_nx@18.0.4/node_modules/@nx/devkit/src/utils/convert-nx-executor.js
|
|
384764
386472
|
var require_convert_nx_executor = __commonJS({
|
|
384765
386473
|
"node_modules/.pnpm/@nx+devkit@18.0.4_nx@18.0.4/node_modules/@nx/devkit/src/utils/convert-nx-executor.js"(exports2) {
|
|
@@ -384802,7 +386510,7 @@ var require_convert_nx_executor = __commonJS({
|
|
|
384802
386510
|
};
|
|
384803
386511
|
return toObservable(promise());
|
|
384804
386512
|
};
|
|
384805
|
-
return
|
|
386513
|
+
return require_src5().createBuilder(builderFunction);
|
|
384806
386514
|
}
|
|
384807
386515
|
exports2.convertNxExecutor = convertNxExecutor;
|
|
384808
386516
|
function toObservable(promiseOrAsyncIterator) {
|
|
@@ -446847,7 +448555,7 @@ var require_dist7 = __commonJS({
|
|
|
446847
448555
|
});
|
|
446848
448556
|
|
|
446849
448557
|
// 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
|
|
446850
|
-
var
|
|
448558
|
+
var require_package4 = __commonJS({
|
|
446851
448559
|
"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) {
|
|
446852
448560
|
module2.exports = {
|
|
446853
448561
|
name: "@nx/js",
|
|
@@ -446934,7 +448642,7 @@ var require_versions2 = __commonJS({
|
|
|
446934
448642
|
"use strict";
|
|
446935
448643
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
446936
448644
|
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;
|
|
446937
|
-
exports2.nxVersion =
|
|
448645
|
+
exports2.nxVersion = require_package4().version;
|
|
446938
448646
|
exports2.esbuildVersion = "^0.19.2";
|
|
446939
448647
|
exports2.prettierVersion = "^2.6.2";
|
|
446940
448648
|
exports2.swcCliVersion = "~0.1.62";
|
|
@@ -456716,7 +458424,7 @@ var require_library = __commonJS({
|
|
|
456716
458424
|
});
|
|
456717
458425
|
|
|
456718
458426
|
// 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
|
|
456719
|
-
var
|
|
458427
|
+
var require_src6 = __commonJS({
|
|
456720
458428
|
"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) {
|
|
456721
458429
|
"use strict";
|
|
456722
458430
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -457337,7 +459045,7 @@ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
|
|
|
457337
459045
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
457338
459046
|
var import_node_fs3 = require("node:fs");
|
|
457339
459047
|
var import_devkit3 = __toESM(require_devkit());
|
|
457340
|
-
var import_js = __toESM(
|
|
459048
|
+
var import_js = __toESM(require_src6());
|
|
457341
459049
|
init_src2();
|
|
457342
459050
|
var import_fs_extra = __toESM(require_lib());
|
|
457343
459051
|
|
|
@@ -463517,7 +465225,6 @@ glob.glob = glob;
|
|
|
463517
465225
|
|
|
463518
465226
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
463519
465227
|
var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
463520
|
-
init_prettier();
|
|
463521
465228
|
|
|
463522
465229
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
463523
465230
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
@@ -463684,6 +465391,7 @@ ${externalDependencies.map((dep) => {
|
|
|
463684
465391
|
return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
|
|
463685
465392
|
}).join("\n")}`
|
|
463686
465393
|
);
|
|
465394
|
+
const prettier = await Promise.resolve().then(() => (init_prettier(), prettier_exports));
|
|
463687
465395
|
const prettierOptions = {
|
|
463688
465396
|
plugins: ["prettier-plugin-packagejson"],
|
|
463689
465397
|
trailingComma: "none",
|
|
@@ -463841,7 +465549,7 @@ ${externalDependencies.map((dep) => {
|
|
|
463841
465549
|
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
463842
465550
|
(0, import_node_fs3.writeFileSync)(
|
|
463843
465551
|
packageJsonPath,
|
|
463844
|
-
await
|
|
465552
|
+
await prettier.format(JSON.stringify(packageJson), {
|
|
463845
465553
|
...prettierOptions,
|
|
463846
465554
|
parser: "json"
|
|
463847
465555
|
})
|
|
@@ -463860,7 +465568,7 @@ ${externalDependencies.map((dep) => {
|
|
|
463860
465568
|
files.map(
|
|
463861
465569
|
async (file) => (0, import_fs_extra.writeFile)(
|
|
463862
465570
|
file,
|
|
463863
|
-
await
|
|
465571
|
+
await prettier.format(
|
|
463864
465572
|
`${options8.banner ? options8.banner.startsWith("//") ? options8.banner : `// ${options8.banner}` : ""}
|
|
463865
465573
|
|
|
463866
465574
|
${(0, import_node_fs3.readFileSync)(file, "utf-8")}`,
|
|
@@ -465097,6 +466805,141 @@ safe-buffer/index.js:
|
|
|
465097
466805
|
* found in the LICENSE file at https://angular.io/license
|
|
465098
466806
|
*)
|
|
465099
466807
|
|
|
466808
|
+
@angular-devkit/architect/src/jobs/api.js:
|
|
466809
|
+
(**
|
|
466810
|
+
* @license
|
|
466811
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466812
|
+
*
|
|
466813
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466814
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466815
|
+
*)
|
|
466816
|
+
|
|
466817
|
+
@angular-devkit/architect/src/jobs/strategy.js:
|
|
466818
|
+
(**
|
|
466819
|
+
* @license
|
|
466820
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466821
|
+
*
|
|
466822
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466823
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466824
|
+
*)
|
|
466825
|
+
|
|
466826
|
+
@angular-devkit/architect/src/jobs/create-job-handler.js:
|
|
466827
|
+
(**
|
|
466828
|
+
* @license
|
|
466829
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466830
|
+
*
|
|
466831
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466832
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466833
|
+
*)
|
|
466834
|
+
|
|
466835
|
+
@angular-devkit/architect/src/jobs/exception.js:
|
|
466836
|
+
(**
|
|
466837
|
+
* @license
|
|
466838
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466839
|
+
*
|
|
466840
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466841
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466842
|
+
*)
|
|
466843
|
+
|
|
466844
|
+
@angular-devkit/architect/src/jobs/dispatcher.js:
|
|
466845
|
+
(**
|
|
466846
|
+
* @license
|
|
466847
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466848
|
+
*
|
|
466849
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466850
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466851
|
+
*)
|
|
466852
|
+
|
|
466853
|
+
@angular-devkit/architect/src/jobs/fallback-registry.js:
|
|
466854
|
+
(**
|
|
466855
|
+
* @license
|
|
466856
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466857
|
+
*
|
|
466858
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466859
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466860
|
+
*)
|
|
466861
|
+
|
|
466862
|
+
@angular-devkit/architect/src/jobs/simple-registry.js:
|
|
466863
|
+
(**
|
|
466864
|
+
* @license
|
|
466865
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466866
|
+
*
|
|
466867
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466868
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466869
|
+
*)
|
|
466870
|
+
|
|
466871
|
+
@angular-devkit/architect/src/jobs/simple-scheduler.js:
|
|
466872
|
+
(**
|
|
466873
|
+
* @license
|
|
466874
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466875
|
+
*
|
|
466876
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466877
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466878
|
+
*)
|
|
466879
|
+
|
|
466880
|
+
@angular-devkit/architect/src/jobs/index.js:
|
|
466881
|
+
(**
|
|
466882
|
+
* @license
|
|
466883
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466884
|
+
*
|
|
466885
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466886
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466887
|
+
*)
|
|
466888
|
+
|
|
466889
|
+
@angular-devkit/architect/src/api.js:
|
|
466890
|
+
(**
|
|
466891
|
+
* @license
|
|
466892
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466893
|
+
*
|
|
466894
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466895
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466896
|
+
*)
|
|
466897
|
+
|
|
466898
|
+
@angular-devkit/architect/src/schedule-by-name.js:
|
|
466899
|
+
(**
|
|
466900
|
+
* @license
|
|
466901
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466902
|
+
*
|
|
466903
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466904
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466905
|
+
*)
|
|
466906
|
+
|
|
466907
|
+
@angular-devkit/architect/src/architect.js:
|
|
466908
|
+
(**
|
|
466909
|
+
* @license
|
|
466910
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466911
|
+
*
|
|
466912
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466913
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466914
|
+
*)
|
|
466915
|
+
|
|
466916
|
+
@angular-devkit/architect/src/internal.js:
|
|
466917
|
+
(**
|
|
466918
|
+
* @license
|
|
466919
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466920
|
+
*
|
|
466921
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466922
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466923
|
+
*)
|
|
466924
|
+
|
|
466925
|
+
@angular-devkit/architect/src/create-builder.js:
|
|
466926
|
+
(**
|
|
466927
|
+
* @license
|
|
466928
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466929
|
+
*
|
|
466930
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466931
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466932
|
+
*)
|
|
466933
|
+
|
|
466934
|
+
@angular-devkit/architect/src/index.js:
|
|
466935
|
+
(**
|
|
466936
|
+
* @license
|
|
466937
|
+
* Copyright Google LLC All Rights Reserved.
|
|
466938
|
+
*
|
|
466939
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
466940
|
+
* found in the LICENSE file at https://angular.io/license
|
|
466941
|
+
*)
|
|
466942
|
+
|
|
465100
466943
|
queue-microtask/index.js:
|
|
465101
466944
|
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
465102
466945
|
|