@modern-js/mwa-generator 3.1.39 → 3.2.1

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/dist/index.js CHANGED
@@ -6276,7 +6276,7 @@ var require_ora = __commonJS({
6276
6276
  throw new TypeError("Cannot call a class as a function");
6277
6277
  }
6278
6278
  }
6279
- function _defineProperties9(e3, t3) {
6279
+ function _defineProperties8(e3, t3) {
6280
6280
  for (var r3 = 0; r3 < t3.length; r3++) {
6281
6281
  var i2 = t3[r3];
6282
6282
  i2.enumerable = i2.enumerable || false;
@@ -6288,9 +6288,9 @@ var require_ora = __commonJS({
6288
6288
  }
6289
6289
  function _createClass(e3, t3, r3) {
6290
6290
  if (t3)
6291
- _defineProperties9(e3.prototype, t3);
6291
+ _defineProperties8(e3.prototype, t3);
6292
6292
  if (r3)
6293
- _defineProperties9(e3, r3);
6293
+ _defineProperties8(e3, r3);
6294
6294
  return e3;
6295
6295
  }
6296
6296
  var i = r2(300), n = i.Buffer;
@@ -6612,7 +6612,7 @@ var require_ora = __commonJS({
6612
6612
  e2.exports = eos;
6613
6613
  }, 668: (e2, t2, r2) => {
6614
6614
  "use strict";
6615
- function asyncGeneratorStep17(e3, t3, r3, i2, n, s, a) {
6615
+ function asyncGeneratorStep15(e3, t3, r3, i2, n, s, a) {
6616
6616
  try {
6617
6617
  var o = e3[s](a);
6618
6618
  var f = o.value;
@@ -6632,10 +6632,10 @@ var require_ora = __commonJS({
6632
6632
  return new Promise(function(i2, n) {
6633
6633
  var s = e3.apply(t3, r3);
6634
6634
  function _next(e4) {
6635
- asyncGeneratorStep17(s, i2, n, _next, _throw, "next", e4);
6635
+ asyncGeneratorStep15(s, i2, n, _next, _throw, "next", e4);
6636
6636
  }
6637
6637
  function _throw(e4) {
6638
- asyncGeneratorStep17(s, i2, n, _next, _throw, "throw", e4);
6638
+ asyncGeneratorStep15(s, i2, n, _next, _throw, "throw", e4);
6639
6639
  }
6640
6640
  _next(void 0);
6641
6641
  });
@@ -56117,7 +56117,7 @@ var require_isIterable = __commonJS({
56117
56117
  var require_isReadableStreamLike = __commonJS({
56118
56118
  "../../../../node_modules/.pnpm/rxjs@7.8.0/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(exports) {
56119
56119
  "use strict";
56120
- var __generator22 = exports && exports.__generator || function(thisArg, body) {
56120
+ var __generator20 = exports && exports.__generator || function(thisArg, body) {
56121
56121
  var _ = { label: 0, sent: function() {
56122
56122
  if (t[0] & 1)
56123
56123
  throw t[1];
@@ -56238,7 +56238,7 @@ var require_isReadableStreamLike = __commonJS({
56238
56238
  function readableStreamLikeToAsyncGenerator(readableStream) {
56239
56239
  return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {
56240
56240
  var reader, _a2, value, done;
56241
- return __generator22(this, function(_b) {
56241
+ return __generator20(this, function(_b) {
56242
56242
  switch (_b.label) {
56243
56243
  case 0:
56244
56244
  reader = readableStream.getReader();
@@ -56314,7 +56314,7 @@ var require_innerFrom = __commonJS({
56314
56314
  step((generator = generator.apply(thisArg, _arguments || [])).next());
56315
56315
  });
56316
56316
  };
56317
- var __generator22 = exports && exports.__generator || function(thisArg, body) {
56317
+ var __generator20 = exports && exports.__generator || function(thisArg, body) {
56318
56318
  var _ = { label: 0, sent: function() {
56319
56319
  if (t[0] & 1)
56320
56320
  throw t[1];
@@ -56539,7 +56539,7 @@ var require_innerFrom = __commonJS({
56539
56539
  var e_2, _a2;
56540
56540
  return __awaiter6(this, void 0, void 0, function() {
56541
56541
  var value, e_2_1;
56542
- return __generator22(this, function(_b) {
56542
+ return __generator20(this, function(_b) {
56543
56543
  switch (_b.label) {
56544
56544
  case 0:
56545
56545
  _b.trys.push([0, 5, 6, 11]);
@@ -57956,7 +57956,7 @@ var require_fromEventPattern = __commonJS({
57956
57956
  var require_generate = __commonJS({
57957
57957
  "../../../../node_modules/.pnpm/rxjs@7.8.0/node_modules/rxjs/dist/cjs/internal/observable/generate.js"(exports) {
57958
57958
  "use strict";
57959
- var __generator22 = exports && exports.__generator || function(thisArg, body) {
57959
+ var __generator20 = exports && exports.__generator || function(thisArg, body) {
57960
57960
  var _ = { label: 0, sent: function() {
57961
57961
  if (t[0] & 1)
57962
57962
  throw t[1];
@@ -58055,7 +58055,7 @@ var require_generate = __commonJS({
58055
58055
  }
58056
58056
  function gen() {
58057
58057
  var state;
58058
- return __generator22(this, function(_a3) {
58058
+ return __generator20(this, function(_a3) {
58059
58059
  switch (_a3.label) {
58060
58060
  case 0:
58061
58061
  state = initialState;
@@ -69485,7 +69485,7 @@ var require_buffer_list = __commonJS({
69485
69485
  throw new TypeError("Cannot call a class as a function");
69486
69486
  }
69487
69487
  }
69488
- function _defineProperties9(target, props) {
69488
+ function _defineProperties8(target, props) {
69489
69489
  for (var i = 0; i < props.length; i++) {
69490
69490
  var descriptor = props[i];
69491
69491
  descriptor.enumerable = descriptor.enumerable || false;
@@ -69497,9 +69497,9 @@ var require_buffer_list = __commonJS({
69497
69497
  }
69498
69498
  function _createClass(Constructor, protoProps, staticProps) {
69499
69499
  if (protoProps)
69500
- _defineProperties9(Constructor.prototype, protoProps);
69500
+ _defineProperties8(Constructor.prototype, protoProps);
69501
69501
  if (staticProps)
69502
- _defineProperties9(Constructor, staticProps);
69502
+ _defineProperties8(Constructor, staticProps);
69503
69503
  return Constructor;
69504
69504
  }
69505
69505
  var _require = require("buffer");
@@ -71155,7 +71155,7 @@ var require_async_iterator = __commonJS({
71155
71155
  var require_from2 = __commonJS({
71156
71156
  "../../../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/from.js"(exports, module2) {
71157
71157
  "use strict";
71158
- function asyncGeneratorStep17(gen, resolve, reject, _next, _throw, key, arg) {
71158
+ function asyncGeneratorStep15(gen, resolve, reject, _next, _throw, key, arg) {
71159
71159
  try {
71160
71160
  var info = gen[key](arg);
71161
71161
  var value = info.value;
@@ -71175,10 +71175,10 @@ var require_from2 = __commonJS({
71175
71175
  return new Promise(function(resolve, reject) {
71176
71176
  var gen = fn.apply(self3, args);
71177
71177
  function _next(value) {
71178
- asyncGeneratorStep17(gen, resolve, reject, _next, _throw, "next", value);
71178
+ asyncGeneratorStep15(gen, resolve, reject, _next, _throw, "next", value);
71179
71179
  }
71180
71180
  function _throw(err) {
71181
- asyncGeneratorStep17(gen, resolve, reject, _next, _throw, "throw", err);
71181
+ asyncGeneratorStep15(gen, resolve, reject, _next, _throw, "throw", err);
71182
71182
  }
71183
71183
  _next(void 0);
71184
71184
  });
@@ -86766,1603 +86766,6 @@ var require_lodash3 = __commonJS({
86766
86766
  }
86767
86767
  });
86768
86768
 
86769
- // ../../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
86770
- var require_ms = __commonJS({
86771
- "../../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) {
86772
- var s = 1e3;
86773
- var m = s * 60;
86774
- var h = m * 60;
86775
- var d = h * 24;
86776
- var w = d * 7;
86777
- var y = d * 365.25;
86778
- module2.exports = function(val, options) {
86779
- options = options || {};
86780
- var type = typeof val;
86781
- if (type === "string" && val.length > 0) {
86782
- return parse3(val);
86783
- } else if (type === "number" && isFinite(val)) {
86784
- return options.long ? fmtLong(val) : fmtShort(val);
86785
- }
86786
- throw new Error(
86787
- "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
86788
- );
86789
- };
86790
- function parse3(str) {
86791
- str = String(str);
86792
- if (str.length > 100) {
86793
- return;
86794
- }
86795
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
86796
- str
86797
- );
86798
- if (!match) {
86799
- return;
86800
- }
86801
- var n = parseFloat(match[1]);
86802
- var type = (match[2] || "ms").toLowerCase();
86803
- switch (type) {
86804
- case "years":
86805
- case "year":
86806
- case "yrs":
86807
- case "yr":
86808
- case "y":
86809
- return n * y;
86810
- case "weeks":
86811
- case "week":
86812
- case "w":
86813
- return n * w;
86814
- case "days":
86815
- case "day":
86816
- case "d":
86817
- return n * d;
86818
- case "hours":
86819
- case "hour":
86820
- case "hrs":
86821
- case "hr":
86822
- case "h":
86823
- return n * h;
86824
- case "minutes":
86825
- case "minute":
86826
- case "mins":
86827
- case "min":
86828
- case "m":
86829
- return n * m;
86830
- case "seconds":
86831
- case "second":
86832
- case "secs":
86833
- case "sec":
86834
- case "s":
86835
- return n * s;
86836
- case "milliseconds":
86837
- case "millisecond":
86838
- case "msecs":
86839
- case "msec":
86840
- case "ms":
86841
- return n;
86842
- default:
86843
- return void 0;
86844
- }
86845
- }
86846
- function fmtShort(ms) {
86847
- var msAbs = Math.abs(ms);
86848
- if (msAbs >= d) {
86849
- return Math.round(ms / d) + "d";
86850
- }
86851
- if (msAbs >= h) {
86852
- return Math.round(ms / h) + "h";
86853
- }
86854
- if (msAbs >= m) {
86855
- return Math.round(ms / m) + "m";
86856
- }
86857
- if (msAbs >= s) {
86858
- return Math.round(ms / s) + "s";
86859
- }
86860
- return ms + "ms";
86861
- }
86862
- function fmtLong(ms) {
86863
- var msAbs = Math.abs(ms);
86864
- if (msAbs >= d) {
86865
- return plural(ms, msAbs, d, "day");
86866
- }
86867
- if (msAbs >= h) {
86868
- return plural(ms, msAbs, h, "hour");
86869
- }
86870
- if (msAbs >= m) {
86871
- return plural(ms, msAbs, m, "minute");
86872
- }
86873
- if (msAbs >= s) {
86874
- return plural(ms, msAbs, s, "second");
86875
- }
86876
- return ms + " ms";
86877
- }
86878
- function plural(ms, msAbs, n, name) {
86879
- var isPlural = msAbs >= n * 1.5;
86880
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
86881
- }
86882
- }
86883
- });
86884
-
86885
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js
86886
- var require_common3 = __commonJS({
86887
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js"(exports, module2) {
86888
- function setup(env) {
86889
- createDebug.debug = createDebug;
86890
- createDebug.default = createDebug;
86891
- createDebug.coerce = coerce;
86892
- createDebug.disable = disable;
86893
- createDebug.enable = enable;
86894
- createDebug.enabled = enabled;
86895
- createDebug.humanize = require_ms();
86896
- createDebug.destroy = destroy2;
86897
- Object.keys(env).forEach((key) => {
86898
- createDebug[key] = env[key];
86899
- });
86900
- createDebug.names = [];
86901
- createDebug.skips = [];
86902
- createDebug.formatters = {};
86903
- function selectColor(namespace) {
86904
- let hash = 0;
86905
- for (let i = 0; i < namespace.length; i++) {
86906
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
86907
- hash |= 0;
86908
- }
86909
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
86910
- }
86911
- createDebug.selectColor = selectColor;
86912
- function createDebug(namespace) {
86913
- let prevTime;
86914
- let enableOverride = null;
86915
- let namespacesCache;
86916
- let enabledCache;
86917
- function debug(...args) {
86918
- if (!debug.enabled) {
86919
- return;
86920
- }
86921
- const self3 = debug;
86922
- const curr = Number(/* @__PURE__ */ new Date());
86923
- const ms = curr - (prevTime || curr);
86924
- self3.diff = ms;
86925
- self3.prev = prevTime;
86926
- self3.curr = curr;
86927
- prevTime = curr;
86928
- args[0] = createDebug.coerce(args[0]);
86929
- if (typeof args[0] !== "string") {
86930
- args.unshift("%O");
86931
- }
86932
- let index = 0;
86933
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
86934
- if (match === "%%") {
86935
- return "%";
86936
- }
86937
- index++;
86938
- const formatter = createDebug.formatters[format];
86939
- if (typeof formatter === "function") {
86940
- const val = args[index];
86941
- match = formatter.call(self3, val);
86942
- args.splice(index, 1);
86943
- index--;
86944
- }
86945
- return match;
86946
- });
86947
- createDebug.formatArgs.call(self3, args);
86948
- const logFn = self3.log || createDebug.log;
86949
- logFn.apply(self3, args);
86950
- }
86951
- debug.namespace = namespace;
86952
- debug.useColors = createDebug.useColors();
86953
- debug.color = createDebug.selectColor(namespace);
86954
- debug.extend = extend;
86955
- debug.destroy = createDebug.destroy;
86956
- Object.defineProperty(debug, "enabled", {
86957
- enumerable: true,
86958
- configurable: false,
86959
- get: () => {
86960
- if (enableOverride !== null) {
86961
- return enableOverride;
86962
- }
86963
- if (namespacesCache !== createDebug.namespaces) {
86964
- namespacesCache = createDebug.namespaces;
86965
- enabledCache = createDebug.enabled(namespace);
86966
- }
86967
- return enabledCache;
86968
- },
86969
- set: (v) => {
86970
- enableOverride = v;
86971
- }
86972
- });
86973
- if (typeof createDebug.init === "function") {
86974
- createDebug.init(debug);
86975
- }
86976
- return debug;
86977
- }
86978
- function extend(namespace, delimiter) {
86979
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
86980
- newDebug.log = this.log;
86981
- return newDebug;
86982
- }
86983
- function enable(namespaces) {
86984
- createDebug.save(namespaces);
86985
- createDebug.namespaces = namespaces;
86986
- createDebug.names = [];
86987
- createDebug.skips = [];
86988
- let i;
86989
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
86990
- const len = split.length;
86991
- for (i = 0; i < len; i++) {
86992
- if (!split[i]) {
86993
- continue;
86994
- }
86995
- namespaces = split[i].replace(/\*/g, ".*?");
86996
- if (namespaces[0] === "-") {
86997
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
86998
- } else {
86999
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
87000
- }
87001
- }
87002
- }
87003
- function disable() {
87004
- const namespaces = [
87005
- ...createDebug.names.map(toNamespace),
87006
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
87007
- ].join(",");
87008
- createDebug.enable("");
87009
- return namespaces;
87010
- }
87011
- function enabled(name) {
87012
- if (name[name.length - 1] === "*") {
87013
- return true;
87014
- }
87015
- let i;
87016
- let len;
87017
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
87018
- if (createDebug.skips[i].test(name)) {
87019
- return false;
87020
- }
87021
- }
87022
- for (i = 0, len = createDebug.names.length; i < len; i++) {
87023
- if (createDebug.names[i].test(name)) {
87024
- return true;
87025
- }
87026
- }
87027
- return false;
87028
- }
87029
- function toNamespace(regexp) {
87030
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
87031
- }
87032
- function coerce(val) {
87033
- if (val instanceof Error) {
87034
- return val.stack || val.message;
87035
- }
87036
- return val;
87037
- }
87038
- function destroy2() {
87039
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
87040
- }
87041
- createDebug.enable(createDebug.load());
87042
- return createDebug;
87043
- }
87044
- module2.exports = setup;
87045
- }
87046
- });
87047
-
87048
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js
87049
- var require_browser = __commonJS({
87050
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports, module2) {
87051
- exports.formatArgs = formatArgs;
87052
- exports.save = save;
87053
- exports.load = load;
87054
- exports.useColors = useColors;
87055
- exports.storage = localstorage();
87056
- exports.destroy = (() => {
87057
- let warned = false;
87058
- return () => {
87059
- if (!warned) {
87060
- warned = true;
87061
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
87062
- }
87063
- };
87064
- })();
87065
- exports.colors = [
87066
- "#0000CC",
87067
- "#0000FF",
87068
- "#0033CC",
87069
- "#0033FF",
87070
- "#0066CC",
87071
- "#0066FF",
87072
- "#0099CC",
87073
- "#0099FF",
87074
- "#00CC00",
87075
- "#00CC33",
87076
- "#00CC66",
87077
- "#00CC99",
87078
- "#00CCCC",
87079
- "#00CCFF",
87080
- "#3300CC",
87081
- "#3300FF",
87082
- "#3333CC",
87083
- "#3333FF",
87084
- "#3366CC",
87085
- "#3366FF",
87086
- "#3399CC",
87087
- "#3399FF",
87088
- "#33CC00",
87089
- "#33CC33",
87090
- "#33CC66",
87091
- "#33CC99",
87092
- "#33CCCC",
87093
- "#33CCFF",
87094
- "#6600CC",
87095
- "#6600FF",
87096
- "#6633CC",
87097
- "#6633FF",
87098
- "#66CC00",
87099
- "#66CC33",
87100
- "#9900CC",
87101
- "#9900FF",
87102
- "#9933CC",
87103
- "#9933FF",
87104
- "#99CC00",
87105
- "#99CC33",
87106
- "#CC0000",
87107
- "#CC0033",
87108
- "#CC0066",
87109
- "#CC0099",
87110
- "#CC00CC",
87111
- "#CC00FF",
87112
- "#CC3300",
87113
- "#CC3333",
87114
- "#CC3366",
87115
- "#CC3399",
87116
- "#CC33CC",
87117
- "#CC33FF",
87118
- "#CC6600",
87119
- "#CC6633",
87120
- "#CC9900",
87121
- "#CC9933",
87122
- "#CCCC00",
87123
- "#CCCC33",
87124
- "#FF0000",
87125
- "#FF0033",
87126
- "#FF0066",
87127
- "#FF0099",
87128
- "#FF00CC",
87129
- "#FF00FF",
87130
- "#FF3300",
87131
- "#FF3333",
87132
- "#FF3366",
87133
- "#FF3399",
87134
- "#FF33CC",
87135
- "#FF33FF",
87136
- "#FF6600",
87137
- "#FF6633",
87138
- "#FF9900",
87139
- "#FF9933",
87140
- "#FFCC00",
87141
- "#FFCC33"
87142
- ];
87143
- function useColors() {
87144
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
87145
- return true;
87146
- }
87147
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
87148
- return false;
87149
- }
87150
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
87151
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
87152
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
87153
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
87154
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
87155
- }
87156
- function formatArgs(args) {
87157
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
87158
- if (!this.useColors) {
87159
- return;
87160
- }
87161
- const c = "color: " + this.color;
87162
- args.splice(1, 0, c, "color: inherit");
87163
- let index = 0;
87164
- let lastC = 0;
87165
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
87166
- if (match === "%%") {
87167
- return;
87168
- }
87169
- index++;
87170
- if (match === "%c") {
87171
- lastC = index;
87172
- }
87173
- });
87174
- args.splice(lastC, 0, c);
87175
- }
87176
- exports.log = console.debug || console.log || (() => {
87177
- });
87178
- function save(namespaces) {
87179
- try {
87180
- if (namespaces) {
87181
- exports.storage.setItem("debug", namespaces);
87182
- } else {
87183
- exports.storage.removeItem("debug");
87184
- }
87185
- } catch (error) {
87186
- }
87187
- }
87188
- function load() {
87189
- let r;
87190
- try {
87191
- r = exports.storage.getItem("debug");
87192
- } catch (error) {
87193
- }
87194
- if (!r && typeof process !== "undefined" && "env" in process) {
87195
- r = process.env.DEBUG;
87196
- }
87197
- return r;
87198
- }
87199
- function localstorage() {
87200
- try {
87201
- return localStorage;
87202
- } catch (error) {
87203
- }
87204
- }
87205
- module2.exports = require_common3()(exports);
87206
- var { formatters } = module2.exports;
87207
- formatters.j = function(v) {
87208
- try {
87209
- return JSON.stringify(v);
87210
- } catch (error) {
87211
- return "[UnexpectedJSONParseError]: " + error.message;
87212
- }
87213
- };
87214
- }
87215
- });
87216
-
87217
- // ../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
87218
- var require_has_flag = __commonJS({
87219
- "../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
87220
- "use strict";
87221
- module2.exports = (flag, argv) => {
87222
- argv = argv || process.argv;
87223
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
87224
- const pos = argv.indexOf(prefix + flag);
87225
- const terminatorPos = argv.indexOf("--");
87226
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
87227
- };
87228
- }
87229
- });
87230
-
87231
- // ../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
87232
- var require_supports_color = __commonJS({
87233
- "../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
87234
- "use strict";
87235
- var os = require("os");
87236
- var hasFlag = require_has_flag();
87237
- var env = process.env;
87238
- var forceColor;
87239
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
87240
- forceColor = false;
87241
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
87242
- forceColor = true;
87243
- }
87244
- if ("FORCE_COLOR" in env) {
87245
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
87246
- }
87247
- function translateLevel(level) {
87248
- if (level === 0) {
87249
- return false;
87250
- }
87251
- return {
87252
- level,
87253
- hasBasic: true,
87254
- has256: level >= 2,
87255
- has16m: level >= 3
87256
- };
87257
- }
87258
- function supportsColor(stream) {
87259
- if (forceColor === false) {
87260
- return 0;
87261
- }
87262
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
87263
- return 3;
87264
- }
87265
- if (hasFlag("color=256")) {
87266
- return 2;
87267
- }
87268
- if (stream && !stream.isTTY && forceColor !== true) {
87269
- return 0;
87270
- }
87271
- const min = forceColor ? 1 : 0;
87272
- if (process.platform === "win32") {
87273
- const osRelease = os.release().split(".");
87274
- if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
87275
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
87276
- }
87277
- return 1;
87278
- }
87279
- if ("CI" in env) {
87280
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
87281
- return 1;
87282
- }
87283
- return min;
87284
- }
87285
- if ("TEAMCITY_VERSION" in env) {
87286
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
87287
- }
87288
- if (env.COLORTERM === "truecolor") {
87289
- return 3;
87290
- }
87291
- if ("TERM_PROGRAM" in env) {
87292
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
87293
- switch (env.TERM_PROGRAM) {
87294
- case "iTerm.app":
87295
- return version >= 3 ? 3 : 2;
87296
- case "Apple_Terminal":
87297
- return 2;
87298
- }
87299
- }
87300
- if (/-256(color)?$/i.test(env.TERM)) {
87301
- return 2;
87302
- }
87303
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
87304
- return 1;
87305
- }
87306
- if ("COLORTERM" in env) {
87307
- return 1;
87308
- }
87309
- if (env.TERM === "dumb") {
87310
- return min;
87311
- }
87312
- return min;
87313
- }
87314
- function getSupportLevel(stream) {
87315
- const level = supportsColor(stream);
87316
- return translateLevel(level);
87317
- }
87318
- module2.exports = {
87319
- supportsColor: getSupportLevel,
87320
- stdout: getSupportLevel(process.stdout),
87321
- stderr: getSupportLevel(process.stderr)
87322
- };
87323
- }
87324
- });
87325
-
87326
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js
87327
- var require_node2 = __commonJS({
87328
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js"(exports, module2) {
87329
- var tty = require("tty");
87330
- var util = require("util");
87331
- exports.init = init;
87332
- exports.log = log;
87333
- exports.formatArgs = formatArgs;
87334
- exports.save = save;
87335
- exports.load = load;
87336
- exports.useColors = useColors;
87337
- exports.destroy = util.deprecate(
87338
- () => {
87339
- },
87340
- "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
87341
- );
87342
- exports.colors = [6, 2, 3, 4, 5, 1];
87343
- try {
87344
- const supportsColor = require_supports_color();
87345
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
87346
- exports.colors = [
87347
- 20,
87348
- 21,
87349
- 26,
87350
- 27,
87351
- 32,
87352
- 33,
87353
- 38,
87354
- 39,
87355
- 40,
87356
- 41,
87357
- 42,
87358
- 43,
87359
- 44,
87360
- 45,
87361
- 56,
87362
- 57,
87363
- 62,
87364
- 63,
87365
- 68,
87366
- 69,
87367
- 74,
87368
- 75,
87369
- 76,
87370
- 77,
87371
- 78,
87372
- 79,
87373
- 80,
87374
- 81,
87375
- 92,
87376
- 93,
87377
- 98,
87378
- 99,
87379
- 112,
87380
- 113,
87381
- 128,
87382
- 129,
87383
- 134,
87384
- 135,
87385
- 148,
87386
- 149,
87387
- 160,
87388
- 161,
87389
- 162,
87390
- 163,
87391
- 164,
87392
- 165,
87393
- 166,
87394
- 167,
87395
- 168,
87396
- 169,
87397
- 170,
87398
- 171,
87399
- 172,
87400
- 173,
87401
- 178,
87402
- 179,
87403
- 184,
87404
- 185,
87405
- 196,
87406
- 197,
87407
- 198,
87408
- 199,
87409
- 200,
87410
- 201,
87411
- 202,
87412
- 203,
87413
- 204,
87414
- 205,
87415
- 206,
87416
- 207,
87417
- 208,
87418
- 209,
87419
- 214,
87420
- 215,
87421
- 220,
87422
- 221
87423
- ];
87424
- }
87425
- } catch (error) {
87426
- }
87427
- exports.inspectOpts = Object.keys(process.env).filter((key) => {
87428
- return /^debug_/i.test(key);
87429
- }).reduce((obj, key) => {
87430
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
87431
- return k.toUpperCase();
87432
- });
87433
- let val = process.env[key];
87434
- if (/^(yes|on|true|enabled)$/i.test(val)) {
87435
- val = true;
87436
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
87437
- val = false;
87438
- } else if (val === "null") {
87439
- val = null;
87440
- } else {
87441
- val = Number(val);
87442
- }
87443
- obj[prop] = val;
87444
- return obj;
87445
- }, {});
87446
- function useColors() {
87447
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
87448
- }
87449
- function formatArgs(args) {
87450
- const { namespace: name, useColors: useColors2 } = this;
87451
- if (useColors2) {
87452
- const c = this.color;
87453
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
87454
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
87455
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
87456
- args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
87457
- } else {
87458
- args[0] = getDate() + name + " " + args[0];
87459
- }
87460
- }
87461
- function getDate() {
87462
- if (exports.inspectOpts.hideDate) {
87463
- return "";
87464
- }
87465
- return (/* @__PURE__ */ new Date()).toISOString() + " ";
87466
- }
87467
- function log(...args) {
87468
- return process.stderr.write(util.format(...args) + "\n");
87469
- }
87470
- function save(namespaces) {
87471
- if (namespaces) {
87472
- process.env.DEBUG = namespaces;
87473
- } else {
87474
- delete process.env.DEBUG;
87475
- }
87476
- }
87477
- function load() {
87478
- return process.env.DEBUG;
87479
- }
87480
- function init(debug) {
87481
- debug.inspectOpts = {};
87482
- const keys = Object.keys(exports.inspectOpts);
87483
- for (let i = 0; i < keys.length; i++) {
87484
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
87485
- }
87486
- }
87487
- module2.exports = require_common3()(exports);
87488
- var { formatters } = module2.exports;
87489
- formatters.o = function(v) {
87490
- this.inspectOpts.colors = this.useColors;
87491
- return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
87492
- };
87493
- formatters.O = function(v) {
87494
- this.inspectOpts.colors = this.useColors;
87495
- return util.inspect(v, this.inspectOpts);
87496
- };
87497
- }
87498
- });
87499
-
87500
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js
87501
- var require_src3 = __commonJS({
87502
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js"(exports, module2) {
87503
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
87504
- module2.exports = require_browser();
87505
- } else {
87506
- module2.exports = require_node2();
87507
- }
87508
- }
87509
- });
87510
-
87511
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/utils/get-type.js
87512
- var require_get_type = __commonJS({
87513
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/utils/get-type.js"(exports) {
87514
- "use strict";
87515
- Object.defineProperty(exports, "__esModule", { value: true });
87516
- function isBuffer(obj) {
87517
- return !!(obj !== null && obj !== void 0 && (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
87518
- obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj)));
87519
- }
87520
- var getType2 = function(val) {
87521
- switch (Object.prototype.toString.call(val)) {
87522
- case "[object Date]":
87523
- return "date";
87524
- case "[object RegExp]":
87525
- return "regexp";
87526
- case "[object Arguments]":
87527
- return "arguments";
87528
- case "[object Array]":
87529
- return "array";
87530
- case "[object Error]":
87531
- return "error";
87532
- }
87533
- if (val === null)
87534
- return "null";
87535
- if (val === void 0)
87536
- return "undefined";
87537
- if (val !== val)
87538
- return "nan";
87539
- if (val && val.nodeType === 1)
87540
- return "element";
87541
- if (isBuffer(val))
87542
- return "buffer";
87543
- val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
87544
- return typeof val;
87545
- };
87546
- exports.default = getType2;
87547
- }
87548
- });
87549
-
87550
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-eql.js
87551
- var require_mongo_eql = __commonJS({
87552
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-eql.js"(exports) {
87553
- "use strict";
87554
- Object.defineProperty(exports, "__esModule", { value: true });
87555
- var get_type_1 = require_get_type();
87556
- function mongoEql(matcher, val) {
87557
- switch (get_type_1.default(matcher)) {
87558
- case "null":
87559
- case "undefined":
87560
- return null === val;
87561
- case "regexp":
87562
- return matcher.test(val);
87563
- case "array":
87564
- if ("array" === get_type_1.default(val) && matcher.length === val.length) {
87565
- for (var i = 0; i < matcher.length; i++) {
87566
- if (!mongoEql(val[i], matcher[i]))
87567
- return false;
87568
- }
87569
- return true;
87570
- } else {
87571
- return false;
87572
- }
87573
- break;
87574
- case "object":
87575
- var keys = {};
87576
- for (var i in matcher) {
87577
- if (matcher.hasOwnProperty(i)) {
87578
- if (!val.hasOwnProperty(i) || !mongoEql(matcher[i], val[i])) {
87579
- return false;
87580
- }
87581
- }
87582
- keys[i] = true;
87583
- }
87584
- for (var i in val) {
87585
- if (val.hasOwnProperty(i) && !keys.hasOwnProperty(i)) {
87586
- return false;
87587
- }
87588
- }
87589
- return true;
87590
- default:
87591
- return matcher === val;
87592
- }
87593
- }
87594
- exports.default = mongoEql;
87595
- }
87596
- });
87597
-
87598
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/ops.js
87599
- var require_ops = __commonJS({
87600
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/ops.js"(exports) {
87601
- "use strict";
87602
- Object.defineProperty(exports, "__esModule", { value: true });
87603
- var mongo_eql_1 = require_mongo_eql();
87604
- var get_type_1 = require_get_type();
87605
- exports.$ne = function(matcher, val) {
87606
- return !mongo_eql_1.default(matcher, val);
87607
- };
87608
- exports.$gt = function $gt(matcher, val) {
87609
- return get_type_1.default(matcher) === "number" && val > matcher;
87610
- };
87611
- exports.$gte = function $gte(matcher, val) {
87612
- return get_type_1.default(matcher) === "number" && val >= matcher;
87613
- };
87614
- exports.$lt = function $lt(matcher, val) {
87615
- return get_type_1.default(matcher) === "number" && val < matcher;
87616
- };
87617
- exports.$lte = function $lte(matcher, val) {
87618
- return get_type_1.default(matcher) === "number" && val <= matcher;
87619
- };
87620
- exports.$regex = function $regex(matcher, val) {
87621
- if ("regexp" !== get_type_1.default("matcher"))
87622
- matcher = new RegExp(matcher);
87623
- return matcher.test(val);
87624
- };
87625
- exports.$exists = function $exists(matcher, val) {
87626
- if (matcher) {
87627
- return void 0 !== val;
87628
- } else {
87629
- return void 0 === val;
87630
- }
87631
- };
87632
- exports.$in = function $in(matcher, val) {
87633
- if ("array" !== get_type_1.default(matcher))
87634
- return false;
87635
- for (var i = 0; i < matcher.length; i++) {
87636
- if (mongo_eql_1.default(matcher[i], val))
87637
- return true;
87638
- }
87639
- return false;
87640
- };
87641
- exports.$nin = function $nin(matcher, val) {
87642
- return !exports.$in(matcher, val);
87643
- };
87644
- exports.$size = function(matcher, val) {
87645
- return Array.isArray(val) && matcher === val.length;
87646
- };
87647
- }
87648
- });
87649
-
87650
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/filter.js
87651
- var require_filter3 = __commonJS({
87652
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/filter.js"(exports) {
87653
- "use strict";
87654
- var __spreadArrays = exports && exports.__spreadArrays || function() {
87655
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
87656
- s += arguments[i].length;
87657
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
87658
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
87659
- r[k] = a[j];
87660
- return r;
87661
- };
87662
- Object.defineProperty(exports, "__esModule", { value: true });
87663
- var debug_1 = require_src3();
87664
- var mongo_eql_1 = require_mongo_eql();
87665
- var ops = require_ops();
87666
- var get_type_1 = require_get_type();
87667
- var debug = debug_1.default("declaration-update");
87668
- function filter(obj, query2) {
87669
- obj = obj || {};
87670
- var ret = {};
87671
- function compare(matcher, val2) {
87672
- if ("object" !== get_type_1.default(matcher)) {
87673
- return mongo_eql_1.default(matcher, val2);
87674
- }
87675
- var keys2 = Object.keys(matcher);
87676
- if ("$" === keys2[0][0]) {
87677
- for (var i2 = 0; i2 < keys2.length; i2++) {
87678
- if ("$elemMatch" === keys2[i2]) {
87679
- return false !== filter(val2, matcher.$elemMatch);
87680
- } else {
87681
- if (!ops[keys2[i2]](matcher[keys2[i2]], val2))
87682
- return false;
87683
- }
87684
- }
87685
- return true;
87686
- } else {
87687
- return mongo_eql_1.default(matcher, val2);
87688
- }
87689
- }
87690
- for (var key in query2) {
87691
- if (!query2.hasOwnProperty(key))
87692
- continue;
87693
- var val = query2[key];
87694
- var keys = key.split(".");
87695
- var target = obj;
87696
- var prefix = void 0, search = void 0;
87697
- var matches = [];
87698
- walk_keys:
87699
- for (var i = 0; i < keys.length; i++) {
87700
- target = target[keys[i]];
87701
- switch (get_type_1.default(target)) {
87702
- case "array":
87703
- prefix = keys.slice(0, i + 1).join(".");
87704
- search = keys.slice(i + 1).join(".");
87705
- debug('searching array "%s"', prefix);
87706
- if (val.$size && !search.length) {
87707
- return compare(val, target);
87708
- }
87709
- var subset = ret[prefix] || target;
87710
- for (var ii = 0; ii < subset.length; ii++) {
87711
- if (search.length) {
87712
- var q = {};
87713
- q[search] = val;
87714
- if ("object" === get_type_1.default(subset[ii])) {
87715
- debug("attempting subdoc search with query %j", q);
87716
- if (filter(subset[ii], q)) {
87717
- if (!ret[prefix] || !~ret[prefix].indexOf(subset[ii])) {
87718
- matches.push(subset[ii]);
87719
- }
87720
- }
87721
- }
87722
- } else {
87723
- debug("performing simple array item search");
87724
- if (compare(val, subset[ii])) {
87725
- if (!ret[prefix] || !~ret[prefix].indexOf(subset[ii])) {
87726
- matches.push(subset[ii]);
87727
- }
87728
- }
87729
- }
87730
- }
87731
- if (matches.length) {
87732
- ret[prefix] = ret[prefix] || [];
87733
- ret[prefix] = __spreadArrays(ret[prefix], matches);
87734
- }
87735
- break walk_keys;
87736
- case "undefined":
87737
- return false;
87738
- case "object":
87739
- if (null !== keys[i + 1] && void 0 !== keys[i + 1]) {
87740
- continue;
87741
- } else if (!compare(val, target)) {
87742
- return false;
87743
- }
87744
- break;
87745
- default:
87746
- if (!compare(val, target))
87747
- return false;
87748
- }
87749
- }
87750
- }
87751
- return ret;
87752
- }
87753
- exports.default = filter;
87754
- }
87755
- });
87756
-
87757
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-dot.js
87758
- var require_mongo_dot = __commonJS({
87759
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-dot.js"(exports) {
87760
- "use strict";
87761
- Object.defineProperty(exports, "__esModule", { value: true });
87762
- var get_type_1 = require_get_type();
87763
- function parent(obj, key, init) {
87764
- if (key.includes(".")) {
87765
- var pieces = key.split(".");
87766
- var ret = obj;
87767
- for (var i = 0; i < pieces.length - 1; i++) {
87768
- if (Number(pieces[i]).toString() === pieces[i] && "array" === get_type_1.default(ret)) {
87769
- ret = ret[pieces[i]];
87770
- } else if ("object" === get_type_1.default(ret)) {
87771
- if (init && !ret.hasOwnProperty(pieces[i])) {
87772
- ret[pieces[i]] = {};
87773
- }
87774
- if (ret)
87775
- ret = ret[pieces[i]];
87776
- }
87777
- }
87778
- return ret;
87779
- } else {
87780
- return obj;
87781
- }
87782
- }
87783
- exports.parent = parent;
87784
- var get3 = function(obj, path6) {
87785
- if (path6.includes(".")) {
87786
- var par = parent(obj, path6);
87787
- var mainKey = path6.split(".").pop();
87788
- var t = get_type_1.default(par);
87789
- if ("object" === t || "array" === t)
87790
- return par[mainKey];
87791
- } else {
87792
- return obj[path6];
87793
- }
87794
- };
87795
- exports.get = get3;
87796
- var set = function(obj, path6, val) {
87797
- if (path6.includes(".")) {
87798
- var par = parent(obj, path6, true);
87799
- var mainKey = path6.split(".").pop();
87800
- if (par && "object" === get_type_1.default(par))
87801
- par[mainKey] = val;
87802
- } else {
87803
- obj[path6] = val;
87804
- }
87805
- };
87806
- exports.set = set;
87807
- }
87808
- });
87809
-
87810
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mods.js
87811
- var require_mods = __commonJS({
87812
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mods.js"(exports) {
87813
- "use strict";
87814
- var __spreadArrays = exports && exports.__spreadArrays || function() {
87815
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
87816
- s += arguments[i].length;
87817
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
87818
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
87819
- r[k] = a[j];
87820
- return r;
87821
- };
87822
- Object.defineProperty(exports, "__esModule", { value: true });
87823
- var debug_1 = require_src3();
87824
- var mongoDot = require_mongo_dot();
87825
- var mongo_eql_1 = require_mongo_eql();
87826
- var get_type_1 = require_get_type();
87827
- var debug = debug_1.default("mongo-query");
87828
- function numeric(val) {
87829
- return "number" === get_type_1.default(val) || Number(val) === val;
87830
- }
87831
- function has2(array, val) {
87832
- for (var i = 0, l = array.length; i < l; i++) {
87833
- if (mongo_eql_1.default(val, array[i]))
87834
- return true;
87835
- }
87836
- return false;
87837
- }
87838
- function pull(arr, vals, pulled) {
87839
- var indexes = [];
87840
- for (var a = 0; a < arr.length; a++) {
87841
- var val = arr[a];
87842
- for (var i = 0; i < vals.length; i++) {
87843
- var matcher = vals[i];
87844
- if ("object" === get_type_1.default(matcher)) {
87845
- if ("object" === get_type_1.default(val)) {
87846
- var match = false;
87847
- if (Object.keys(matcher).length) {
87848
- for (var i_1 in matcher) {
87849
- if (matcher.hasOwnProperty(i_1)) {
87850
- if (mongo_eql_1.default(matcher[i_1], val[i_1])) {
87851
- match = true;
87852
- } else {
87853
- match = false;
87854
- break;
87855
- }
87856
- }
87857
- }
87858
- } else if (!Object.keys(val).length) {
87859
- match = true;
87860
- }
87861
- if (match) {
87862
- indexes.push(a);
87863
- pulled.push(val);
87864
- continue;
87865
- }
87866
- } else {
87867
- debug("ignoring pull match against object");
87868
- }
87869
- } else {
87870
- if (mongo_eql_1.default(matcher, val)) {
87871
- indexes.push(a);
87872
- pulled.push(val);
87873
- continue;
87874
- }
87875
- }
87876
- }
87877
- }
87878
- return function() {
87879
- for (var i2 = 0; i2 < indexes.length; i2++) {
87880
- var index = indexes[i2];
87881
- arr.splice(index - i2, 1);
87882
- }
87883
- };
87884
- }
87885
- var $set = function $set2(obj, path6, val) {
87886
- var key = path6.split(".").pop();
87887
- obj = mongoDot.parent(obj, path6, true);
87888
- switch (get_type_1.default(obj)) {
87889
- case "object":
87890
- if (!mongo_eql_1.default(obj[key], val)) {
87891
- return function() {
87892
- obj[key] = val;
87893
- return val;
87894
- };
87895
- }
87896
- break;
87897
- case "array":
87898
- if (numeric(key)) {
87899
- if (!mongo_eql_1.default(obj[key], val)) {
87900
- return function() {
87901
- obj[key] = val;
87902
- return val;
87903
- };
87904
- }
87905
- } else {
87906
- throw new Error("can't append to array using string field name [" + key + "]");
87907
- }
87908
- break;
87909
- default:
87910
- throw new Error("$set only supports object not " + get_type_1.default(obj));
87911
- }
87912
- };
87913
- exports.$set = $set;
87914
- var $unset = function $unset2(obj, path6) {
87915
- var key = path6.split(".").pop();
87916
- obj = mongoDot.parent(obj, path6);
87917
- switch (get_type_1.default(obj)) {
87918
- case "array":
87919
- case "object":
87920
- if (obj.hasOwnProperty(key)) {
87921
- return function() {
87922
- delete obj[key];
87923
- };
87924
- } else {
87925
- debug("ignoring unset of inexisting key");
87926
- }
87927
- }
87928
- };
87929
- exports.$unset = $unset;
87930
- var $rename = function $rename2(obj, path6, newKey) {
87931
- if (path6 === newKey) {
87932
- throw new Error("$rename source must differ from target");
87933
- }
87934
- if (0 === path6.indexOf(newKey + ".")) {
87935
- throw new Error("$rename target may not be a parent of source");
87936
- }
87937
- var p = mongoDot.parent(obj, path6);
87938
- var t = get_type_1.default(p);
87939
- if ("object" === t) {
87940
- var key_1 = path6.split(".").pop();
87941
- if (p.hasOwnProperty(key_1)) {
87942
- return function() {
87943
- var val = p[key_1];
87944
- delete p[key_1];
87945
- var newp = mongoDot.parent(obj, newKey, true);
87946
- if ("object" === get_type_1.default(newp)) {
87947
- newp[newKey.split(".").pop()] = val;
87948
- } else {
87949
- debug("invalid $rename target path type");
87950
- }
87951
- return newKey;
87952
- };
87953
- } else {
87954
- debug("ignoring rename from inexisting source");
87955
- }
87956
- } else if ("undefined" !== t) {
87957
- throw new Error("$rename source field invalid");
87958
- }
87959
- };
87960
- exports.$rename = $rename;
87961
- var $inc = function $inc2(obj, path6, inc) {
87962
- if ("number" !== get_type_1.default(inc)) {
87963
- throw new Error("Modifier $inc allowed for numbers only");
87964
- }
87965
- obj = mongoDot.parent(obj, path6, true);
87966
- var key = path6.split(".").pop();
87967
- switch (get_type_1.default(obj)) {
87968
- case "array":
87969
- case "object":
87970
- if (obj.hasOwnProperty(key)) {
87971
- if ("number" !== get_type_1.default(obj[key])) {
87972
- throw new Error("Cannot apply $inc modifier to non-number");
87973
- }
87974
- return function() {
87975
- obj[key] += inc;
87976
- return inc;
87977
- };
87978
- } else if ("object" === get_type_1.default(obj) || numeric(key)) {
87979
- return function() {
87980
- obj[key] = inc;
87981
- return inc;
87982
- };
87983
- } else {
87984
- throw new Error("can't append to array using string field name [" + key + "]");
87985
- }
87986
- break;
87987
- default:
87988
- throw new Error("Cannot apply $inc modifier to non-number");
87989
- }
87990
- };
87991
- exports.$inc = $inc;
87992
- var $pop = function $pop2(obj, path6, val) {
87993
- obj = mongoDot.parent(obj, path6);
87994
- var key = path6.split(".").pop();
87995
- switch (get_type_1.default(obj)) {
87996
- case "array":
87997
- case "object":
87998
- if (obj.hasOwnProperty(key)) {
87999
- switch (get_type_1.default(obj[key])) {
88000
- case "array":
88001
- if (obj[key].length) {
88002
- return function() {
88003
- if (-1 === val) {
88004
- return obj[key].shift();
88005
- } else {
88006
- return obj[key].pop();
88007
- }
88008
- };
88009
- }
88010
- break;
88011
- case "undefined":
88012
- debug("ignoring pop to inexisting key");
88013
- break;
88014
- default:
88015
- throw new Error("Cannot apply $pop modifier to non-array");
88016
- }
88017
- } else {
88018
- debug("ignoring pop to inexisting key");
88019
- }
88020
- break;
88021
- case "undefined":
88022
- debug("ignoring pop to inexisting key");
88023
- break;
88024
- }
88025
- };
88026
- exports.$pop = $pop;
88027
- var $push = function $push2(obj, path6, val) {
88028
- obj = mongoDot.parent(obj, path6, true);
88029
- var key = path6.split(".").pop();
88030
- switch (get_type_1.default(obj)) {
88031
- case "object":
88032
- if (obj.hasOwnProperty(key)) {
88033
- if ("array" === get_type_1.default(obj[key])) {
88034
- return function() {
88035
- obj[key].push(val);
88036
- return val;
88037
- };
88038
- } else {
88039
- throw new Error("Cannot apply $push/$pushAll modifier to non-array");
88040
- }
88041
- } else {
88042
- return function() {
88043
- obj[key] = [val];
88044
- return val;
88045
- };
88046
- }
88047
- break;
88048
- case "array":
88049
- if (obj.hasOwnProperty(key)) {
88050
- if ("array" === get_type_1.default(obj[key])) {
88051
- return function() {
88052
- obj[key].push(val);
88053
- return val;
88054
- };
88055
- } else {
88056
- throw new Error("Cannot apply $push/$pushAll modifier to non-array");
88057
- }
88058
- } else if (numeric(key)) {
88059
- return function() {
88060
- obj[key] = [val];
88061
- return val;
88062
- };
88063
- } else {
88064
- throw new Error("can't append to array using string field name [" + key + "]");
88065
- }
88066
- break;
88067
- }
88068
- };
88069
- exports.$push = $push;
88070
- var $pushAll = function $pushAll2(obj, path6, val) {
88071
- if ("array" !== get_type_1.default(val)) {
88072
- throw new Error("Modifier $pushAll/pullAll allowed for arrays only");
88073
- }
88074
- obj = mongoDot.parent(obj, path6, true);
88075
- var key = path6.split(".").pop();
88076
- switch (get_type_1.default(obj)) {
88077
- case "object":
88078
- if (obj.hasOwnProperty(key)) {
88079
- if ("array" === get_type_1.default(obj[key])) {
88080
- return function() {
88081
- obj[key] = __spreadArrays(obj[key], val);
88082
- return val;
88083
- };
88084
- } else {
88085
- throw new Error("Cannot apply $push/$pushAll modifier to non-array");
88086
- }
88087
- } else {
88088
- return function() {
88089
- obj[key] = val;
88090
- return val;
88091
- };
88092
- }
88093
- break;
88094
- case "array":
88095
- if (obj.hasOwnProperty(key)) {
88096
- if ("array" === get_type_1.default(obj[key])) {
88097
- return function() {
88098
- obj[key] = __spreadArrays(obj[key], val);
88099
- return val;
88100
- };
88101
- } else {
88102
- throw new Error("Cannot apply $push/$pushAll modifier to non-array");
88103
- }
88104
- } else if (numeric(key)) {
88105
- return function() {
88106
- obj[key] = val;
88107
- return val;
88108
- };
88109
- } else {
88110
- throw new Error("can't append to array using string field name [" + key + "]");
88111
- }
88112
- break;
88113
- }
88114
- };
88115
- exports.$pushAll = $pushAll;
88116
- var $pull = function $pull2(obj, path6, val) {
88117
- obj = mongoDot.parent(obj, path6, true);
88118
- var key = path6.split(".").pop();
88119
- var t = get_type_1.default(obj);
88120
- switch (t) {
88121
- case "object":
88122
- if (obj.hasOwnProperty(key)) {
88123
- if ("array" === get_type_1.default(obj[key])) {
88124
- var pulled_1 = [];
88125
- var splice_1 = pull(obj[key], [val], pulled_1);
88126
- if (pulled_1.length) {
88127
- return function() {
88128
- splice_1();
88129
- return pulled_1;
88130
- };
88131
- }
88132
- } else {
88133
- throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
88134
- }
88135
- }
88136
- break;
88137
- case "array":
88138
- if (obj.hasOwnProperty(key)) {
88139
- if ("array" === get_type_1.default(obj[key])) {
88140
- var pulled_2 = [];
88141
- var splice_2 = pull(obj[key], [val], pulled_2);
88142
- if (pulled_2.length) {
88143
- return function() {
88144
- splice_2();
88145
- return pulled_2;
88146
- };
88147
- }
88148
- } else {
88149
- throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
88150
- }
88151
- } else {
88152
- debug("ignoring pull to non array");
88153
- }
88154
- break;
88155
- default:
88156
- if ("undefined" !== t) {
88157
- throw new Error("LEFT_SUBFIELD only supports Object: hello not: " + t);
88158
- }
88159
- }
88160
- };
88161
- exports.$pull = $pull;
88162
- var $pullAll = function $pullAll2(obj, path6, val) {
88163
- if ("array" !== get_type_1.default(val)) {
88164
- throw new Error("Modifier $pushAll/pullAll allowed for arrays only");
88165
- }
88166
- obj = mongoDot.parent(obj, path6, true);
88167
- var key = path6.split(".").pop();
88168
- var t = get_type_1.default(obj);
88169
- switch (t) {
88170
- case "object":
88171
- if (obj.hasOwnProperty(key)) {
88172
- if ("array" === get_type_1.default(obj[key])) {
88173
- var pulled_3 = [];
88174
- var splice_3 = pull(obj[key], val, pulled_3);
88175
- if (pulled_3.length) {
88176
- return function() {
88177
- splice_3();
88178
- return pulled_3;
88179
- };
88180
- }
88181
- } else {
88182
- throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
88183
- }
88184
- }
88185
- break;
88186
- case "array":
88187
- if (obj.hasOwnProperty(key)) {
88188
- if ("array" === get_type_1.default(obj[key])) {
88189
- var pulled_4 = [];
88190
- var splice_4 = pull(obj[key], val, pulled_4);
88191
- if (pulled_4.length) {
88192
- return function() {
88193
- splice_4();
88194
- return pulled_4;
88195
- };
88196
- }
88197
- } else {
88198
- throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
88199
- }
88200
- } else {
88201
- debug("ignoring pull to non array");
88202
- }
88203
- break;
88204
- default:
88205
- if ("undefined" !== t) {
88206
- throw new Error("LEFT_SUBFIELD only supports Object: hello not: " + t);
88207
- }
88208
- }
88209
- };
88210
- exports.$pullAll = $pullAll;
88211
- var $addToSet = function $addToSet2(obj, path6, val, recursing) {
88212
- if (!recursing && "array" === get_type_1.default(val.$each)) {
88213
- var fns_1 = [];
88214
- for (var i = 0, l = val.$each.length; i < l; i++) {
88215
- var fn = $addToSet2(obj, path6, val.$each[i], true);
88216
- if (fn)
88217
- fns_1.push(fn);
88218
- }
88219
- if (fns_1.length) {
88220
- return function() {
88221
- var values = [];
88222
- for (var i2 = 0; i2 < fns_1.length; i2++)
88223
- values.push(fns_1[i2]());
88224
- return values;
88225
- };
88226
- } else {
88227
- return;
88228
- }
88229
- }
88230
- obj = mongoDot.parent(obj, path6, true);
88231
- var key = path6.split(".").pop();
88232
- switch (get_type_1.default(obj)) {
88233
- case "object":
88234
- if (obj.hasOwnProperty(key)) {
88235
- if ("array" === get_type_1.default(obj[key])) {
88236
- if (!has2(obj[key], val)) {
88237
- return function() {
88238
- obj[key].push(val);
88239
- return val;
88240
- };
88241
- }
88242
- } else {
88243
- throw new Error("Cannot apply $addToSet modifier to non-array");
88244
- }
88245
- } else {
88246
- return function() {
88247
- obj[key] = [val];
88248
- return val;
88249
- };
88250
- }
88251
- break;
88252
- case "array":
88253
- if (obj.hasOwnProperty(key)) {
88254
- if ("array" === get_type_1.default(obj[key])) {
88255
- if (!has2(obj[key], val)) {
88256
- return function() {
88257
- obj[key].push(val);
88258
- return val;
88259
- };
88260
- }
88261
- } else {
88262
- throw new Error("Cannot apply $addToSet modifier to non-array");
88263
- }
88264
- } else if (numeric(key)) {
88265
- return function() {
88266
- obj[key] = [val];
88267
- return val;
88268
- };
88269
- } else {
88270
- throw new Error("can't append to array using string field name [" + key + "]");
88271
- }
88272
- break;
88273
- }
88274
- };
88275
- exports.$addToSet = $addToSet;
88276
- }
88277
- });
88278
-
88279
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/query.js
88280
- var require_query = __commonJS({
88281
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/query.js"(exports) {
88282
- "use strict";
88283
- Object.defineProperty(exports, "__esModule", { value: true });
88284
- var debug_1 = require_src3();
88285
- var filter_1 = require_filter3();
88286
- var mods = require_mods();
88287
- var mongoDot = require_mongo_dot();
88288
- var debug = debug_1.default("declaration-update");
88289
- function query2(obj, query3, update, opts) {
88290
- obj = obj || {};
88291
- opts = opts || {};
88292
- query3 = query3 || {};
88293
- update = update || {};
88294
- var strict = !!opts.strict;
88295
- var match;
88296
- var log = [];
88297
- if (Object.keys(query3).length !== 0) {
88298
- match = filter_1.default(obj, query3);
88299
- }
88300
- if (!strict || false !== match) {
88301
- var keys = Object.keys(update);
88302
- var transactions = [];
88303
- for (var i = 0, l = keys.length; i < l; i++) {
88304
- if (mods[keys[i]]) {
88305
- debug('found modifier "%s"', keys[i]);
88306
- for (var key in update[keys[i]]) {
88307
- var pos = key.indexOf(".$.");
88308
- if (pos !== -1) {
88309
- var prefix = key.substr(0, pos);
88310
- var suffix = key.substr(pos + 3);
88311
- if (match[prefix]) {
88312
- debug('executing "%s" %s on first match within "%s"', key, keys[i], prefix);
88313
- var fn = mods[keys[i]](match[prefix][0], suffix, update[keys[i]][key]);
88314
- if (fn) {
88315
- var index = mongoDot.get(obj, prefix).indexOf(match[prefix][0]);
88316
- fn.key = prefix + "." + index + "." + suffix;
88317
- fn.op = keys[i];
88318
- transactions.push(fn);
88319
- }
88320
- } else {
88321
- debug('ignoring "%s" %s - no matches within "%s"', key, keys[i], prefix);
88322
- }
88323
- } else {
88324
- var fn = mods[keys[i]](obj, key, update[keys[i]][key]);
88325
- if (fn) {
88326
- fn.key = key;
88327
- fn.op = keys[i];
88328
- transactions.push(fn);
88329
- }
88330
- }
88331
- }
88332
- } else {
88333
- debug('skipping unknown modifier "%s"', keys[i]);
88334
- }
88335
- }
88336
- if (transactions.length) {
88337
- for (var i = 0; i < transactions.length; i++) {
88338
- var fn = transactions[i];
88339
- var val = fn();
88340
- log.push({ op: fn.op, key: fn.key, value: val });
88341
- }
88342
- }
88343
- } else {
88344
- debug("no matches for query %j", query3);
88345
- }
88346
- return log;
88347
- }
88348
- exports.default = query2;
88349
- }
88350
- });
88351
-
88352
- // ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/index.js
88353
- var require_dist = __commonJS({
88354
- "../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/index.js"(exports) {
88355
- "use strict";
88356
- Object.defineProperty(exports, "__esModule", { value: true });
88357
- var filter_1 = require_filter3();
88358
- exports.filter = filter_1.default;
88359
- var mods = require_mods();
88360
- exports.mods = mods;
88361
- var query_1 = require_query();
88362
- exports.query = query_1.default;
88363
- }
88364
- });
88365
-
88366
86769
  // ../../../toolkit/utils/compiled/lodash/index.js
88367
86770
  var require_lodash4 = __commonJS({
88368
86771
  "../../../toolkit/utils/compiled/lodash/index.js"(exports, module2) {
@@ -94544,7 +92947,7 @@ var require_ora3 = __commonJS({
94544
92947
  throw new TypeError("Cannot call a class as a function");
94545
92948
  }
94546
92949
  }
94547
- function _defineProperties9(e3, t3) {
92950
+ function _defineProperties8(e3, t3) {
94548
92951
  for (var r3 = 0; r3 < t3.length; r3++) {
94549
92952
  var i2 = t3[r3];
94550
92953
  i2.enumerable = i2.enumerable || false;
@@ -94556,9 +92959,9 @@ var require_ora3 = __commonJS({
94556
92959
  }
94557
92960
  function _createClass(e3, t3, r3) {
94558
92961
  if (t3)
94559
- _defineProperties9(e3.prototype, t3);
92962
+ _defineProperties8(e3.prototype, t3);
94560
92963
  if (r3)
94561
- _defineProperties9(e3, r3);
92964
+ _defineProperties8(e3, r3);
94562
92965
  return e3;
94563
92966
  }
94564
92967
  var i = r2(300), n = i.Buffer;
@@ -94880,7 +93283,7 @@ var require_ora3 = __commonJS({
94880
93283
  e2.exports = eos;
94881
93284
  }, 668: (e2, t2, r2) => {
94882
93285
  "use strict";
94883
- function asyncGeneratorStep17(e3, t3, r3, i2, n, s, a) {
93286
+ function asyncGeneratorStep15(e3, t3, r3, i2, n, s, a) {
94884
93287
  try {
94885
93288
  var o = e3[s](a);
94886
93289
  var f = o.value;
@@ -94900,10 +93303,10 @@ var require_ora3 = __commonJS({
94900
93303
  return new Promise(function(i2, n) {
94901
93304
  var s = e3.apply(t3, r3);
94902
93305
  function _next(e4) {
94903
- asyncGeneratorStep17(s, i2, n, _next, _throw, "next", e4);
93306
+ asyncGeneratorStep15(s, i2, n, _next, _throw, "next", e4);
94904
93307
  }
94905
93308
  function _throw(e4) {
94906
- asyncGeneratorStep17(s, i2, n, _next, _throw, "throw", e4);
93309
+ asyncGeneratorStep15(s, i2, n, _next, _throw, "throw", e4);
94907
93310
  }
94908
93311
  _next(void 0);
94909
93312
  });
@@ -100508,7 +98911,7 @@ var require_js_yaml2 = __commonJS({
100508
98911
  var require_debug2 = __commonJS({
100509
98912
  "../../../toolkit/utils/dist/compiled/debug/index.js"(exports, module2) {
100510
98913
  (() => {
100511
- var e = { 20: (e2, t2, r2) => {
98914
+ var e = { 434: (e2, t2, r2) => {
100512
98915
  t2.formatArgs = formatArgs;
100513
98916
  t2.save = save;
100514
98917
  t2.load = load;
@@ -100582,7 +98985,7 @@ var require_debug2 = __commonJS({
100582
98985
  } catch (e3) {
100583
98986
  }
100584
98987
  }
100585
- e2.exports = r2(530)(t2);
98988
+ e2.exports = r2(290)(t2);
100586
98989
  const { formatters: s } = e2.exports;
100587
98990
  s.j = function(e3) {
100588
98991
  try {
@@ -100591,7 +98994,7 @@ var require_debug2 = __commonJS({
100591
98994
  return "[UnexpectedJSONParseError]: " + e4.message;
100592
98995
  }
100593
98996
  };
100594
- }, 530: (e2, t2, r2) => {
98997
+ }, 290: (e2, t2, r2) => {
100595
98998
  function setup(e3) {
100596
98999
  createDebug.debug = createDebug;
100597
99000
  createDebug.default = createDebug;
@@ -100741,13 +99144,13 @@ var require_debug2 = __commonJS({
100741
99144
  return createDebug;
100742
99145
  }
100743
99146
  e2.exports = setup;
100744
- }, 731: (e2, t2, r2) => {
99147
+ }, 372: (e2, t2, r2) => {
100745
99148
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
100746
- e2.exports = r2(20);
99149
+ e2.exports = r2(434);
100747
99150
  } else {
100748
- e2.exports = r2(689);
99151
+ e2.exports = r2(970);
100749
99152
  }
100750
- }, 689: (e2, t2, r2) => {
99153
+ }, 970: (e2, t2, r2) => {
100751
99154
  const s = r2(224);
100752
99155
  const n = r2(837);
100753
99156
  t2.init = init;
@@ -100760,7 +99163,7 @@ var require_debug2 = __commonJS({
100760
99163
  }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
100761
99164
  t2.colors = [6, 2, 3, 4, 5, 1];
100762
99165
  try {
100763
- const e3 = r2(242);
99166
+ const e3 = r2(332);
100764
99167
  if (e3 && (e3.stderr || e3).level >= 2) {
100765
99168
  t2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
100766
99169
  }
@@ -100822,7 +99225,7 @@ var require_debug2 = __commonJS({
100822
99225
  e3.inspectOpts[r3[s2]] = t2.inspectOpts[r3[s2]];
100823
99226
  }
100824
99227
  }
100825
- e2.exports = r2(530)(t2);
99228
+ e2.exports = r2(290)(t2);
100826
99229
  const { formatters: o } = e2.exports;
100827
99230
  o.o = function(e3) {
100828
99231
  this.inspectOpts.colors = this.useColors;
@@ -100832,13 +99235,14 @@ var require_debug2 = __commonJS({
100832
99235
  this.inspectOpts.colors = this.useColors;
100833
99236
  return n.inspect(e3, this.inspectOpts);
100834
99237
  };
100835
- }, 975: (e2) => {
99238
+ }, 419: (e2) => {
100836
99239
  "use strict";
100837
- e2.exports = (e3, t2 = process.argv) => {
99240
+ e2.exports = (e3, t2) => {
99241
+ t2 = t2 || process.argv;
100838
99242
  const r2 = e3.startsWith("-") ? "" : e3.length === 1 ? "-" : "--";
100839
99243
  const s = t2.indexOf(r2 + e3);
100840
99244
  const n = t2.indexOf("--");
100841
- return s !== -1 && (n === -1 || s < n);
99245
+ return s !== -1 && (n === -1 ? true : s < n);
100842
99246
  };
100843
99247
  }, 367: (e2) => {
100844
99248
  var t2 = 1e3;
@@ -100947,26 +99351,19 @@ var require_debug2 = __commonJS({
100947
99351
  var n2 = t3 >= r3 * 1.5;
100948
99352
  return Math.round(e3 / r3) + " " + s2 + (n2 ? "s" : "");
100949
99353
  }
100950
- }, 242: (e2, t2, r2) => {
99354
+ }, 332: (e2, t2, r2) => {
100951
99355
  "use strict";
100952
99356
  const s = r2(37);
100953
- const n = r2(224);
100954
- const o = r2(975);
100955
- const { env: a } = process;
100956
- let c;
100957
- if (o("no-color") || o("no-colors") || o("color=false") || o("color=never")) {
100958
- c = 0;
100959
- } else if (o("color") || o("colors") || o("color=true") || o("color=always")) {
100960
- c = 1;
99357
+ const n = r2(419);
99358
+ const o = process.env;
99359
+ let a;
99360
+ if (n("no-color") || n("no-colors") || n("color=false")) {
99361
+ a = false;
99362
+ } else if (n("color") || n("colors") || n("color=true") || n("color=always")) {
99363
+ a = true;
100961
99364
  }
100962
- if ("FORCE_COLOR" in a) {
100963
- if (a.FORCE_COLOR === "true") {
100964
- c = 1;
100965
- } else if (a.FORCE_COLOR === "false") {
100966
- c = 0;
100967
- } else {
100968
- c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
100969
- }
99365
+ if ("FORCE_COLOR" in o) {
99366
+ a = o.FORCE_COLOR.length === 0 || parseInt(o.FORCE_COLOR, 10) !== 0;
100970
99367
  }
100971
99368
  function translateLevel(e3) {
100972
99369
  if (e3 === 0) {
@@ -100974,67 +99371,67 @@ var require_debug2 = __commonJS({
100974
99371
  }
100975
99372
  return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
100976
99373
  }
100977
- function supportsColor(e3, t3) {
100978
- if (c === 0) {
99374
+ function supportsColor(e3) {
99375
+ if (a === false) {
100979
99376
  return 0;
100980
99377
  }
100981
- if (o("color=16m") || o("color=full") || o("color=truecolor")) {
99378
+ if (n("color=16m") || n("color=full") || n("color=truecolor")) {
100982
99379
  return 3;
100983
99380
  }
100984
- if (o("color=256")) {
99381
+ if (n("color=256")) {
100985
99382
  return 2;
100986
99383
  }
100987
- if (e3 && !t3 && c === void 0) {
99384
+ if (e3 && !e3.isTTY && a !== true) {
100988
99385
  return 0;
100989
99386
  }
100990
- const r3 = c || 0;
100991
- if (a.TERM === "dumb") {
100992
- return r3;
100993
- }
99387
+ const t3 = a ? 1 : 0;
100994
99388
  if (process.platform === "win32") {
100995
99389
  const e4 = s.release().split(".");
100996
- if (Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
99390
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
100997
99391
  return Number(e4[2]) >= 14931 ? 3 : 2;
100998
99392
  }
100999
99393
  return 1;
101000
99394
  }
101001
- if ("CI" in a) {
101002
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((e4) => e4 in a) || a.CI_NAME === "codeship") {
99395
+ if ("CI" in o) {
99396
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((e4) => e4 in o) || o.CI_NAME === "codeship") {
101003
99397
  return 1;
101004
99398
  }
101005
- return r3;
99399
+ return t3;
101006
99400
  }
101007
- if ("TEAMCITY_VERSION" in a) {
101008
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION) ? 1 : 0;
99401
+ if ("TEAMCITY_VERSION" in o) {
99402
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION) ? 1 : 0;
101009
99403
  }
101010
- if (a.COLORTERM === "truecolor") {
99404
+ if (o.COLORTERM === "truecolor") {
101011
99405
  return 3;
101012
99406
  }
101013
- if ("TERM_PROGRAM" in a) {
101014
- const e4 = parseInt((a.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
101015
- switch (a.TERM_PROGRAM) {
99407
+ if ("TERM_PROGRAM" in o) {
99408
+ const e4 = parseInt((o.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
99409
+ switch (o.TERM_PROGRAM) {
101016
99410
  case "iTerm.app":
101017
99411
  return e4 >= 3 ? 3 : 2;
101018
99412
  case "Apple_Terminal":
101019
99413
  return 2;
101020
99414
  }
101021
99415
  }
101022
- if (/-256(color)?$/i.test(a.TERM)) {
99416
+ if (/-256(color)?$/i.test(o.TERM)) {
101023
99417
  return 2;
101024
99418
  }
101025
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)) {
99419
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)) {
101026
99420
  return 1;
101027
99421
  }
101028
- if ("COLORTERM" in a) {
99422
+ if ("COLORTERM" in o) {
101029
99423
  return 1;
101030
99424
  }
101031
- return r3;
99425
+ if (o.TERM === "dumb") {
99426
+ return t3;
99427
+ }
99428
+ return t3;
101032
99429
  }
101033
99430
  function getSupportLevel(e3) {
101034
- const t3 = supportsColor(e3, e3 && e3.isTTY);
99431
+ const t3 = supportsColor(e3);
101035
99432
  return translateLevel(t3);
101036
99433
  }
101037
- e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, n.isatty(1))), stderr: translateLevel(supportsColor(true, n.isatty(2))) };
99434
+ e2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) };
101038
99435
  }, 37: (e2) => {
101039
99436
  "use strict";
101040
99437
  e2.exports = require("os");
@@ -101064,7 +99461,7 @@ var require_debug2 = __commonJS({
101064
99461
  }
101065
99462
  if (typeof __nccwpck_require__ !== "undefined")
101066
99463
  __nccwpck_require__.ab = __dirname + "/";
101067
- var r = __nccwpck_require__(731);
99464
+ var r = __nccwpck_require__(372);
101068
99465
  module2.exports = r;
101069
99466
  })();
101070
99467
  }
@@ -117463,7 +115860,7 @@ var require_commands2 = __commonJS({
117463
115860
  });
117464
115861
 
117465
115862
  // ../../../toolkit/utils/dist/cjs/cli/common.js
117466
- var require_common4 = __commonJS({
115863
+ var require_common3 = __commonJS({
117467
115864
  "../../../toolkit/utils/dist/cjs/cli/common.js"(exports) {
117468
115865
  "use strict";
117469
115866
  Object.defineProperty(exports, "__esModule", {
@@ -117578,7 +115975,7 @@ var require_project2 = __commonJS({
117578
115975
  var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up2());
117579
115976
  var _commands = require_commands2();
117580
115977
  var _compiled = require_compiled2();
117581
- var _common = require_common4();
115978
+ var _common = require_common3();
117582
115979
  var _ensure = require_ensure2();
117583
115980
  var debug = (0, _common.createDebugger)("judge-depExists");
117584
115981
  var isDepExists = (appDirectory, name) => {
@@ -118902,6 +117299,27 @@ var require_watch2 = __commonJS({
118902
117299
  }
118903
117300
  });
118904
117301
 
117302
+ // ../../../toolkit/utils/dist/cjs/cli/config.js
117303
+ var require_config6 = __commonJS({
117304
+ "../../../toolkit/utils/dist/cjs/cli/config.js"(exports) {
117305
+ "use strict";
117306
+ Object.defineProperty(exports, "__esModule", {
117307
+ value: true
117308
+ });
117309
+ Object.defineProperty(exports, "isOverriddenConfigKey", {
117310
+ enumerable: true,
117311
+ get: function() {
117312
+ return isOverriddenConfigKey;
117313
+ }
117314
+ });
117315
+ var isOverriddenConfigKey = (key) => [
117316
+ "removeConsole",
117317
+ "enableInlineScripts",
117318
+ "enableInlineStyles"
117319
+ ].includes(key);
117320
+ }
117321
+ });
117322
+
118905
117323
  // ../../../toolkit/utils/dist/cjs/cli/index.js
118906
117324
  var require_cli2 = __commonJS({
118907
117325
  "../../../toolkit/utils/dist/cjs/cli/index.js"(exports) {
@@ -118917,7 +117335,7 @@ var require_cli2 = __commonJS({
118917
117335
  _export_star._(require_applyOptionsChain2(), exports);
118918
117336
  _export_star._(require_babel2(), exports);
118919
117337
  _export_star._(require_commands2(), exports);
118920
- _export_star._(require_common4(), exports);
117338
+ _export_star._(require_common3(), exports);
118921
117339
  _export_star._(require_ensure2(), exports);
118922
117340
  _export_star._(require_fs2(), exports);
118923
117341
  _export_star._(require_logger3(), exports);
@@ -118929,6 +117347,7 @@ var require_cli2 = __commonJS({
118929
117347
  _export_star._(require_require2(), exports);
118930
117348
  _export_star._(require_runtimeExports2(), exports);
118931
117349
  _export_star._(require_watch2(), exports);
117350
+ _export_star._(require_config6(), exports);
118932
117351
  }
118933
117352
  });
118934
117353
 
@@ -125916,8 +124335,8 @@ var isObjectFieldState = function(state) {
125916
124335
  return false;
125917
124336
  return (state === null || state === void 0 ? void 0 : state.displayName) === "ObjectField";
125918
124337
  };
125919
- var isQuery = function(query2) {
125920
- return query2 && query2 instanceof Query;
124338
+ var isQuery = function(query) {
124339
+ return query && query instanceof Query;
125921
124340
  };
125922
124341
 
125923
124342
  // ../../../../node_modules/.pnpm/@formily+core@2.2.24/node_modules/@formily/core/esm/models/Graph.js
@@ -133720,480 +132139,8 @@ var AppAPI = /* @__PURE__ */ function() {
133720
132139
  return AppAPI2;
133721
132140
  }();
133722
132141
 
133723
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.5_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/codesmith-api-json/dist/esm/index.js
133724
- var import_comment_json2 = __toESM(require_src2());
133725
- var declarationUpdate = __toESM(require_dist());
133726
-
133727
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.5_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/codesmith-api-json/dist/esm/utils/index.js
133728
- function asyncGeneratorStep15(gen, resolve, reject, _next, _throw, key, arg) {
133729
- try {
133730
- var info = gen[key](arg);
133731
- var value = info.value;
133732
- } catch (error) {
133733
- reject(error);
133734
- return;
133735
- }
133736
- if (info.done) {
133737
- resolve(value);
133738
- } else {
133739
- Promise.resolve(value).then(_next, _throw);
133740
- }
133741
- }
133742
- function _async_to_generator15(fn) {
133743
- return function() {
133744
- var self3 = this, args = arguments;
133745
- return new Promise(function(resolve, reject) {
133746
- var gen = fn.apply(self3, args);
133747
- function _next(value) {
133748
- asyncGeneratorStep15(gen, resolve, reject, _next, _throw, "next", value);
133749
- }
133750
- function _throw(err) {
133751
- asyncGeneratorStep15(gen, resolve, reject, _next, _throw, "throw", err);
133752
- }
133753
- _next(void 0);
133754
- });
133755
- };
133756
- }
133757
- var __generator20 = function(thisArg, body) {
133758
- var f, y, t, g, _ = {
133759
- label: 0,
133760
- sent: function() {
133761
- if (t[0] & 1)
133762
- throw t[1];
133763
- return t[1];
133764
- },
133765
- trys: [],
133766
- ops: []
133767
- };
133768
- return g = {
133769
- next: verb(0),
133770
- "throw": verb(1),
133771
- "return": verb(2)
133772
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
133773
- return this;
133774
- }), g;
133775
- function verb(n) {
133776
- return function(v) {
133777
- return step([
133778
- n,
133779
- v
133780
- ]);
133781
- };
133782
- }
133783
- function step(op) {
133784
- if (f)
133785
- throw new TypeError("Generator is already executing.");
133786
- while (_)
133787
- try {
133788
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
133789
- return t;
133790
- if (y = 0, t)
133791
- op = [
133792
- op[0] & 2,
133793
- t.value
133794
- ];
133795
- switch (op[0]) {
133796
- case 0:
133797
- case 1:
133798
- t = op;
133799
- break;
133800
- case 4:
133801
- _.label++;
133802
- return {
133803
- value: op[1],
133804
- done: false
133805
- };
133806
- case 5:
133807
- _.label++;
133808
- y = op[1];
133809
- op = [
133810
- 0
133811
- ];
133812
- continue;
133813
- case 7:
133814
- op = _.ops.pop();
133815
- _.trys.pop();
133816
- continue;
133817
- default:
133818
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
133819
- _ = 0;
133820
- continue;
133821
- }
133822
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
133823
- _.label = op[1];
133824
- break;
133825
- }
133826
- if (op[0] === 6 && _.label < t[1]) {
133827
- _.label = t[1];
133828
- t = op;
133829
- break;
133830
- }
133831
- if (t && _.label < t[2]) {
133832
- _.label = t[2];
133833
- _.ops.push(op);
133834
- break;
133835
- }
133836
- if (t[2])
133837
- _.ops.pop();
133838
- _.trys.pop();
133839
- continue;
133840
- }
133841
- op = body.call(thisArg, _);
133842
- } catch (e) {
133843
- op = [
133844
- 6,
133845
- e
133846
- ];
133847
- y = 0;
133848
- } finally {
133849
- f = t = 0;
133850
- }
133851
- if (op[0] & 5)
133852
- throw op[1];
133853
- return {
133854
- value: op[0] ? op[1] : void 0,
133855
- done: true
133856
- };
133857
- }
133858
- };
133859
- function editJson(generatorCore, resource, getNewJsonValue) {
133860
- return _editJson.apply(this, arguments);
133861
- }
133862
- function _editJson() {
133863
- _editJson = _async_to_generator15(function(generatorCore, resource, getNewJsonValue) {
133864
- var originJsonValue, newJsonString;
133865
- return __generator20(this, function(_state) {
133866
- switch (_state.label) {
133867
- case 0:
133868
- return [
133869
- 4,
133870
- resource.value()
133871
- ];
133872
- case 1:
133873
- originJsonValue = _state.sent();
133874
- return [
133875
- 4,
133876
- getNewJsonValue(originJsonValue.content)
133877
- ];
133878
- case 2:
133879
- newJsonString = _state.sent();
133880
- if (!newJsonString) {
133881
- throw new Error("get new json string is undefined");
133882
- }
133883
- return [
133884
- 4,
133885
- generatorCore.output.fs(resource.filePath, newJsonString, {
133886
- encoding: "utf-8"
133887
- })
133888
- ];
133889
- case 3:
133890
- _state.sent();
133891
- return [
133892
- 2,
133893
- newJsonString
133894
- ];
133895
- }
133896
- });
133897
- });
133898
- return _editJson.apply(this, arguments);
133899
- }
133900
-
133901
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.5_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/codesmith-api-json/dist/esm/index.js
133902
- function asyncGeneratorStep16(gen, resolve, reject, _next, _throw, key, arg) {
133903
- try {
133904
- var info = gen[key](arg);
133905
- var value = info.value;
133906
- } catch (error) {
133907
- reject(error);
133908
- return;
133909
- }
133910
- if (info.done) {
133911
- resolve(value);
133912
- } else {
133913
- Promise.resolve(value).then(_next, _throw);
133914
- }
133915
- }
133916
- function _async_to_generator16(fn) {
133917
- return function() {
133918
- var self3 = this, args = arguments;
133919
- return new Promise(function(resolve, reject) {
133920
- var gen = fn.apply(self3, args);
133921
- function _next(value) {
133922
- asyncGeneratorStep16(gen, resolve, reject, _next, _throw, "next", value);
133923
- }
133924
- function _throw(err) {
133925
- asyncGeneratorStep16(gen, resolve, reject, _next, _throw, "throw", err);
133926
- }
133927
- _next(void 0);
133928
- });
133929
- };
133930
- }
133931
- function _class_call_check8(instance, Constructor) {
133932
- if (!(instance instanceof Constructor)) {
133933
- throw new TypeError("Cannot call a class as a function");
133934
- }
133935
- }
133936
- function _defineProperties8(target, props) {
133937
- for (var i = 0; i < props.length; i++) {
133938
- var descriptor = props[i];
133939
- descriptor.enumerable = descriptor.enumerable || false;
133940
- descriptor.configurable = true;
133941
- if ("value" in descriptor)
133942
- descriptor.writable = true;
133943
- Object.defineProperty(target, descriptor.key, descriptor);
133944
- }
133945
- }
133946
- function _create_class8(Constructor, protoProps, staticProps) {
133947
- if (protoProps)
133948
- _defineProperties8(Constructor.prototype, protoProps);
133949
- if (staticProps)
133950
- _defineProperties8(Constructor, staticProps);
133951
- return Constructor;
133952
- }
133953
- function _define_property13(obj, key, value) {
133954
- if (key in obj) {
133955
- Object.defineProperty(obj, key, {
133956
- value,
133957
- enumerable: true,
133958
- configurable: true,
133959
- writable: true
133960
- });
133961
- } else {
133962
- obj[key] = value;
133963
- }
133964
- return obj;
133965
- }
133966
- var __generator21 = function(thisArg, body) {
133967
- var f, y, t, g, _ = {
133968
- label: 0,
133969
- sent: function() {
133970
- if (t[0] & 1)
133971
- throw t[1];
133972
- return t[1];
133973
- },
133974
- trys: [],
133975
- ops: []
133976
- };
133977
- return g = {
133978
- next: verb(0),
133979
- "throw": verb(1),
133980
- "return": verb(2)
133981
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
133982
- return this;
133983
- }), g;
133984
- function verb(n) {
133985
- return function(v) {
133986
- return step([
133987
- n,
133988
- v
133989
- ]);
133990
- };
133991
- }
133992
- function step(op) {
133993
- if (f)
133994
- throw new TypeError("Generator is already executing.");
133995
- while (_)
133996
- try {
133997
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
133998
- return t;
133999
- if (y = 0, t)
134000
- op = [
134001
- op[0] & 2,
134002
- t.value
134003
- ];
134004
- switch (op[0]) {
134005
- case 0:
134006
- case 1:
134007
- t = op;
134008
- break;
134009
- case 4:
134010
- _.label++;
134011
- return {
134012
- value: op[1],
134013
- done: false
134014
- };
134015
- case 5:
134016
- _.label++;
134017
- y = op[1];
134018
- op = [
134019
- 0
134020
- ];
134021
- continue;
134022
- case 7:
134023
- op = _.ops.pop();
134024
- _.trys.pop();
134025
- continue;
134026
- default:
134027
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
134028
- _ = 0;
134029
- continue;
134030
- }
134031
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
134032
- _.label = op[1];
134033
- break;
134034
- }
134035
- if (op[0] === 6 && _.label < t[1]) {
134036
- _.label = t[1];
134037
- t = op;
134038
- break;
134039
- }
134040
- if (t && _.label < t[2]) {
134041
- _.label = t[2];
134042
- _.ops.push(op);
134043
- break;
134044
- }
134045
- if (t[2])
134046
- _.ops.pop();
134047
- _.trys.pop();
134048
- continue;
134049
- }
134050
- op = body.call(thisArg, _);
134051
- } catch (e) {
134052
- op = [
134053
- 6,
134054
- e
134055
- ];
134056
- y = 0;
134057
- } finally {
134058
- f = t = 0;
134059
- }
134060
- if (op[0] & 5)
134061
- throw op[1];
134062
- return {
134063
- value: op[0] ? op[1] : void 0,
134064
- done: true
134065
- };
134066
- }
134067
- };
134068
- var JsonAPI = /* @__PURE__ */ function() {
134069
- "use strict";
134070
- function JsonAPI2(generatorCore) {
134071
- _class_call_check8(this, JsonAPI2);
134072
- _define_property13(this, "generatorCore", void 0);
134073
- this.generatorCore = generatorCore;
134074
- }
134075
- _create_class8(JsonAPI2, [
134076
- {
134077
- key: "get",
134078
- value: function get3(resource) {
134079
- var _this = this;
134080
- return _async_to_generator16(function() {
134081
- var originJsonValue, origin;
134082
- return __generator21(this, function(_state) {
134083
- switch (_state.label) {
134084
- case 0:
134085
- return [
134086
- 4,
134087
- resource.value()
134088
- ];
134089
- case 1:
134090
- originJsonValue = _state.sent();
134091
- try {
134092
- origin = import_comment_json2.default.parse(originJsonValue.content);
134093
- return [
134094
- 2,
134095
- origin
134096
- ];
134097
- } catch (e) {
134098
- _this.generatorCore.logger.debug("[JSON API] parse json error:", e);
134099
- throw new Error("resource content is not a legal json");
134100
- }
134101
- return [
134102
- 2
134103
- ];
134104
- }
134105
- });
134106
- })();
134107
- }
134108
- },
134109
- {
134110
- key: "extend",
134111
- value: function extend(resource, obj) {
134112
- var _this = this;
134113
- return _async_to_generator16(function() {
134114
- return __generator21(this, function(_state) {
134115
- switch (_state.label) {
134116
- case 0:
134117
- return [
134118
- 4,
134119
- editJson(_this.generatorCore, resource, /* @__PURE__ */ _async_to_generator16(function() {
134120
- var originJsonValue, origin, newObj, jsonIntent;
134121
- return __generator21(this, function(_state2) {
134122
- switch (_state2.label) {
134123
- case 0:
134124
- return [
134125
- 4,
134126
- resource.value()
134127
- ];
134128
- case 1:
134129
- originJsonValue = _state2.sent();
134130
- try {
134131
- origin = import_comment_json2.default.parse(originJsonValue.content);
134132
- newObj = import_comment_json2.default.assign(origin, obj);
134133
- jsonIntent = 2;
134134
- return [
134135
- 2,
134136
- import_comment_json2.default.stringify(newObj, void 0, jsonIntent)
134137
- ];
134138
- } catch (e) {
134139
- _this.generatorCore.logger.debug("[JSON API] parse json error:", e);
134140
- throw new Error("resource content is not a legal json");
134141
- }
134142
- return [
134143
- 2
134144
- ];
134145
- }
134146
- });
134147
- }))
134148
- ];
134149
- case 1:
134150
- _state.sent();
134151
- return [
134152
- 2
134153
- ];
134154
- }
134155
- });
134156
- })();
134157
- }
134158
- },
134159
- {
134160
- key: "update",
134161
- value: function update(resource, operation) {
134162
- var _this = this;
134163
- return _async_to_generator16(function() {
134164
- return __generator21(this, function(_state) {
134165
- switch (_state.label) {
134166
- case 0:
134167
- return [
134168
- 4,
134169
- editJson(_this.generatorCore, resource, function(text) {
134170
- try {
134171
- var jsonContent = import_comment_json2.default.parse(text);
134172
- declarationUpdate.query(jsonContent, operation.query, operation.update);
134173
- var jsonIntent = 2;
134174
- return Promise.resolve(import_comment_json2.default.stringify(jsonContent, void 0, jsonIntent));
134175
- } catch (e) {
134176
- _this.generatorCore.logger.debug("[JSON API] parse json error:", e);
134177
- throw new Error("resource content is not a legal json");
134178
- }
134179
- })
134180
- ];
134181
- case 1:
134182
- _state.sent();
134183
- return [
134184
- 2
134185
- ];
134186
- }
134187
- });
134188
- })();
134189
- }
134190
- }
134191
- ]);
134192
- return JsonAPI2;
134193
- }();
134194
-
134195
132142
  // ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
134196
- function _define_property14(obj, key, value) {
132143
+ function _define_property13(obj, key, value) {
134197
132144
  if (key in obj) {
134198
132145
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
134199
132146
  } else
@@ -134259,8 +132206,8 @@ var I18n2 = class {
134259
132206
  };
134260
132207
  }
134261
132208
  constructor() {
134262
- _define_property14(this, "language", "en");
134263
- _define_property14(this, "languageMap", {});
132209
+ _define_property13(this, "language", "en");
132210
+ _define_property13(this, "languageMap", {});
134264
132211
  }
134265
132212
  };
134266
132213
 
@@ -134691,7 +132638,7 @@ var MWADefaultConfig = {
134691
132638
 
134692
132639
  // ../../generator-utils/dist/esm/index.js
134693
132640
  var import_path5 = __toESM(require("path"));
134694
- var import_utils15 = __toESM(require_cjs3());
132641
+ var import_utils14 = __toESM(require_cjs3());
134695
132642
 
134696
132643
  // ../../generator-utils/dist/esm/utils/stripAnsi.js
134697
132644
  function ansiRegex2({ onlyFirst = false } = {}) {
@@ -134737,11 +132684,11 @@ var localeKeys3 = i18n3.init("en", {
134737
132684
 
134738
132685
  // ../../generator-utils/dist/esm/index.js
134739
132686
  async function getPackageVersion(packageName, registry2) {
134740
- const spinner = (0, import_utils15.ora)({
132687
+ const spinner = (0, import_utils14.ora)({
134741
132688
  text: "Load Generator...",
134742
132689
  spinner: "runner"
134743
132690
  }).start();
134744
- if (await (0, import_utils15.canUsePnpm)()) {
132691
+ if (await (0, import_utils14.canUsePnpm)()) {
134745
132692
  const args = [
134746
132693
  "info",
134747
132694
  packageName,
@@ -134750,11 +132697,11 @@ async function getPackageVersion(packageName, registry2) {
134750
132697
  if (registry2) {
134751
132698
  args.push(`--registry=${registry2}`);
134752
132699
  }
134753
- const result = await (0, import_utils15.execa)("pnpm", args);
132700
+ const result = await (0, import_utils14.execa)("pnpm", args);
134754
132701
  spinner.stop();
134755
132702
  return stripAnsi2(result.stdout);
134756
132703
  }
134757
- if (await (0, import_utils15.canUseNpm)()) {
132704
+ if (await (0, import_utils14.canUseNpm)()) {
134758
132705
  const args = [
134759
132706
  "view",
134760
132707
  packageName,
@@ -134763,7 +132710,7 @@ async function getPackageVersion(packageName, registry2) {
134763
132710
  if (registry2) {
134764
132711
  args.push(`--registry=${registry2}`);
134765
132712
  }
134766
- const result = await (0, import_utils15.execa)("npm", args);
132713
+ const result = await (0, import_utils14.execa)("npm", args);
134767
132714
  spinner.stop();
134768
132715
  return stripAnsi2(result.stdout);
134769
132716
  }
@@ -134779,7 +132726,7 @@ function getPackageManagerText(packageManager) {
134779
132726
  return packageManager === "yarn" ? "yarn" : `${packageManager} run`;
134780
132727
  }
134781
132728
  function getAllPackages(appDir) {
134782
- const packages = (0, import_utils15.getMonorepoPackages)(appDir);
132729
+ const packages = (0, import_utils14.getMonorepoPackages)(appDir);
134783
132730
  return packages.map((pkg) => pkg.name);
134784
132731
  }
134785
132732
  function validatePackageName(value, packages, options) {
@@ -134805,7 +132752,7 @@ function validatePackagePath(value, projectDir, options) {
134805
132752
  dir = isPublic ? "packages" : "features";
134806
132753
  }
134807
132754
  const packageDir = import_path5.default.resolve(projectDir || "", dir, value);
134808
- if (import_utils15.fs.existsSync(packageDir)) {
132755
+ if (import_utils14.fs.existsSync(packageDir)) {
134809
132756
  return {
134810
132757
  success: false,
134811
132758
  error: i18n3.t(localeKeys3.packagePath.exit, {
@@ -134862,7 +132809,6 @@ var getGeneratorPath = (generator, distTag) => {
134862
132809
  return generator;
134863
132810
  };
134864
132811
  var handleTemplateFile = async (context, generator, appApi) => {
134865
- const jsonAPI = new JsonAPI(generator);
134866
132812
  const { isMonorepoSubProject, isTest, projectDir = "" } = context.config;
134867
132813
  const { outputPath } = generator;
134868
132814
  let packages = [];
@@ -134948,25 +132894,11 @@ var handleTemplateFile = async (context, generator, appApi) => {
134948
132894
  name: packageName || dirname,
134949
132895
  isMonorepoSubProject,
134950
132896
  modernVersion,
134951
- packageManager
132897
+ packageManager,
132898
+ isTs: language === Language.TS
134952
132899
  }
134953
132900
  );
134954
132901
  if (language === Language.TS) {
134955
- await jsonAPI.update(
134956
- context.materials.default.get(import_path6.default.join(projectPath, "package.json")),
134957
- {
134958
- query: {},
134959
- update: {
134960
- $set: {
134961
- "devDependencies.typescript": "~5.0.4",
134962
- "devDependencies.@types/jest": "~29.2.4",
134963
- "devDependencies.@types/node": "~16.11.7",
134964
- "devDependencies.@types/react": "~18.0.26",
134965
- "devDependencies.@types/react-dom": "~18.0.10"
134966
- }
134967
- }
134968
- }
134969
- );
134970
132902
  await appApi.forgeTemplate(
134971
132903
  "templates/ts-template/**/*",
134972
132904
  void 0,