@modern-js/tailwindcss-generator 3.4.15 → 3.4.17
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 +2098 -389
- package/package.json +10 -9
- package/src/index.ts +27 -5
package/dist/index.js
CHANGED
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __esm = (fn, res) => function __init() {
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
10
|
+
};
|
8
11
|
var __commonJS = (cb, mod) => function __require() {
|
9
12
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
10
13
|
};
|
@@ -208,7 +211,7 @@ var require_ejs = __commonJS({
|
|
208
211
|
"../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/ejs.js"(exports) {
|
209
212
|
"use strict";
|
210
213
|
var fs7 = require("fs");
|
211
|
-
var
|
214
|
+
var path7 = require("path");
|
212
215
|
var utils = require_utils();
|
213
216
|
var scopeOptionWarned = false;
|
214
217
|
var _VERSION_STRING = require_package().version;
|
@@ -239,9 +242,9 @@ var require_ejs = __commonJS({
|
|
239
242
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
240
243
|
exports.promiseImpl = new Function("return this;")().Promise;
|
241
244
|
exports.resolveInclude = function(name, filename, isDir) {
|
242
|
-
var dirname =
|
243
|
-
var extname =
|
244
|
-
var resolve =
|
245
|
+
var dirname = path7.dirname;
|
246
|
+
var extname = path7.extname;
|
247
|
+
var resolve = path7.resolve;
|
245
248
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
246
249
|
var ext = extname(name);
|
247
250
|
if (!ext) {
|
@@ -258,30 +261,30 @@ var require_ejs = __commonJS({
|
|
258
261
|
return filePath;
|
259
262
|
}
|
260
263
|
}
|
261
|
-
function getIncludePath(
|
264
|
+
function getIncludePath(path8, options) {
|
262
265
|
var includePath;
|
263
266
|
var filePath;
|
264
267
|
var views = options.views;
|
265
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(
|
268
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path8);
|
266
269
|
if (match && match.length) {
|
267
|
-
|
270
|
+
path8 = path8.replace(/^\/*/, "");
|
268
271
|
if (Array.isArray(options.root)) {
|
269
|
-
includePath = resolvePaths(
|
272
|
+
includePath = resolvePaths(path8, options.root);
|
270
273
|
} else {
|
271
|
-
includePath = exports.resolveInclude(
|
274
|
+
includePath = exports.resolveInclude(path8, options.root || "/", true);
|
272
275
|
}
|
273
276
|
} else {
|
274
277
|
if (options.filename) {
|
275
|
-
filePath = exports.resolveInclude(
|
278
|
+
filePath = exports.resolveInclude(path8, options.filename);
|
276
279
|
if (fs7.existsSync(filePath)) {
|
277
280
|
includePath = filePath;
|
278
281
|
}
|
279
282
|
}
|
280
283
|
if (!includePath && Array.isArray(views)) {
|
281
|
-
includePath = resolvePaths(
|
284
|
+
includePath = resolvePaths(path8, views);
|
282
285
|
}
|
283
286
|
if (!includePath && typeof options.includer !== "function") {
|
284
|
-
throw new Error('Could not find the include file "' + options.escapeFunction(
|
287
|
+
throw new Error('Could not find the include file "' + options.escapeFunction(path8) + '"');
|
285
288
|
}
|
286
289
|
}
|
287
290
|
return includePath;
|
@@ -340,11 +343,11 @@ var require_ejs = __commonJS({
|
|
340
343
|
function fileLoader(filePath) {
|
341
344
|
return exports.fileLoader(filePath);
|
342
345
|
}
|
343
|
-
function includeFile(
|
346
|
+
function includeFile(path8, options) {
|
344
347
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
345
|
-
opts.filename = getIncludePath(
|
348
|
+
opts.filename = getIncludePath(path8, opts);
|
346
349
|
if (typeof options.includer === "function") {
|
347
|
-
var includerResult = options.includer(
|
350
|
+
var includerResult = options.includer(path8, opts.filename);
|
348
351
|
if (includerResult) {
|
349
352
|
if (includerResult.filename) {
|
350
353
|
opts.filename = includerResult.filename;
|
@@ -579,12 +582,12 @@ var require_ejs = __commonJS({
|
|
579
582
|
throw e;
|
580
583
|
}
|
581
584
|
var returnedFn = opts.client ? fn : function anonymous(data) {
|
582
|
-
var include = function(
|
585
|
+
var include = function(path8, includeData) {
|
583
586
|
var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
584
587
|
if (includeData) {
|
585
588
|
d = utils.shallowCopy(d, includeData);
|
586
589
|
}
|
587
|
-
return includeFile(
|
590
|
+
return includeFile(path8, opts)(d);
|
588
591
|
};
|
589
592
|
return fn.apply(
|
590
593
|
opts.context,
|
@@ -593,7 +596,7 @@ var require_ejs = __commonJS({
|
|
593
596
|
};
|
594
597
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
595
598
|
var filename = opts.filename;
|
596
|
-
var basename =
|
599
|
+
var basename = path7.basename(filename, path7.extname(filename));
|
597
600
|
try {
|
598
601
|
Object.defineProperty(returnedFn, "name", {
|
599
602
|
value: basename,
|
@@ -1569,15 +1572,15 @@ var require_runtime = __commonJS({
|
|
1569
1572
|
throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + compilerInfo[1] + ").");
|
1570
1573
|
}
|
1571
1574
|
}
|
1572
|
-
function template(templateSpec,
|
1573
|
-
if (!
|
1575
|
+
function template(templateSpec, env2) {
|
1576
|
+
if (!env2) {
|
1574
1577
|
throw new _exception2["default"]("No environment passed to template");
|
1575
1578
|
}
|
1576
1579
|
if (!templateSpec || !templateSpec.main) {
|
1577
1580
|
throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
|
1578
1581
|
}
|
1579
1582
|
templateSpec.main.decorator = templateSpec.main_d;
|
1580
|
-
|
1583
|
+
env2.VM.checkRevision(templateSpec.compiler);
|
1581
1584
|
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
1582
1585
|
function invokePartialWrapper(partial, context, options) {
|
1583
1586
|
if (options.hash) {
|
@@ -1586,14 +1589,14 @@ var require_runtime = __commonJS({
|
|
1586
1589
|
options.ids[0] = true;
|
1587
1590
|
}
|
1588
1591
|
}
|
1589
|
-
partial =
|
1592
|
+
partial = env2.VM.resolvePartial.call(this, partial, context, options);
|
1590
1593
|
var extendedOptions = Utils.extend({}, options, {
|
1591
1594
|
hooks: this.hooks,
|
1592
1595
|
protoAccessControl: this.protoAccessControl
|
1593
1596
|
});
|
1594
|
-
var result =
|
1595
|
-
if (result == null &&
|
1596
|
-
options.partials[options.name] =
|
1597
|
+
var result = env2.VM.invokePartial.call(this, partial, context, extendedOptions);
|
1598
|
+
if (result == null && env2.compile) {
|
1599
|
+
options.partials[options.name] = env2.compile(partial, templateSpec.compilerOptions, env2);
|
1597
1600
|
result = options.partials[options.name](context, extendedOptions);
|
1598
1601
|
}
|
1599
1602
|
if (result != null) {
|
@@ -1678,7 +1681,7 @@ var require_runtime = __commonJS({
|
|
1678
1681
|
},
|
1679
1682
|
// An empty object to use as replacement for null-contexts
|
1680
1683
|
nullContext: Object.seal({}),
|
1681
|
-
noop:
|
1684
|
+
noop: env2.VM.noop,
|
1682
1685
|
compilerInfo: templateSpec.compiler
|
1683
1686
|
};
|
1684
1687
|
function ret(context) {
|
@@ -1705,14 +1708,14 @@ var require_runtime = __commonJS({
|
|
1705
1708
|
ret.isTop = true;
|
1706
1709
|
ret._setup = function(options) {
|
1707
1710
|
if (!options.partial) {
|
1708
|
-
var mergedHelpers = Utils.extend({},
|
1711
|
+
var mergedHelpers = Utils.extend({}, env2.helpers, options.helpers);
|
1709
1712
|
wrapHelpersToPassLookupProperty(mergedHelpers, container);
|
1710
1713
|
container.helpers = mergedHelpers;
|
1711
1714
|
if (templateSpec.usePartial) {
|
1712
|
-
container.partials = container.mergeIfNeeded(options.partials,
|
1715
|
+
container.partials = container.mergeIfNeeded(options.partials, env2.partials);
|
1713
1716
|
}
|
1714
1717
|
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
1715
|
-
container.decorators = Utils.extend({},
|
1718
|
+
container.decorators = Utils.extend({}, env2.decorators, options.decorators);
|
1716
1719
|
}
|
1717
1720
|
container.hooks = {};
|
1718
1721
|
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
@@ -1919,13 +1922,13 @@ var require_ast = __commonJS({
|
|
1919
1922
|
helperExpression: function helperExpression(node) {
|
1920
1923
|
return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
|
1921
1924
|
},
|
1922
|
-
scopedId: function scopedId(
|
1923
|
-
return /^\.|this\b/.test(
|
1925
|
+
scopedId: function scopedId(path7) {
|
1926
|
+
return /^\.|this\b/.test(path7.original);
|
1924
1927
|
},
|
1925
1928
|
// an ID is simple if it only has one part, and that part is not
|
1926
1929
|
// `..` or `this`.
|
1927
|
-
simpleId: function simpleId(
|
1928
|
-
return
|
1930
|
+
simpleId: function simpleId(path7) {
|
1931
|
+
return path7.parts.length === 1 && !AST.helpers.scopedId(path7) && !path7.depth;
|
1929
1932
|
}
|
1930
1933
|
}
|
1931
1934
|
};
|
@@ -3009,12 +3012,12 @@ var require_helpers2 = __commonJS({
|
|
3009
3012
|
loc
|
3010
3013
|
};
|
3011
3014
|
}
|
3012
|
-
function prepareMustache(
|
3015
|
+
function prepareMustache(path7, params, hash, open, strip, locInfo) {
|
3013
3016
|
var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
|
3014
3017
|
var decorator = /\*/.test(open);
|
3015
3018
|
return {
|
3016
3019
|
type: decorator ? "Decorator" : "MustacheStatement",
|
3017
|
-
path:
|
3020
|
+
path: path7,
|
3018
3021
|
params,
|
3019
3022
|
hash,
|
3020
3023
|
escaped,
|
@@ -3285,9 +3288,9 @@ var require_compiler = __commonJS({
|
|
3285
3288
|
},
|
3286
3289
|
DecoratorBlock: function DecoratorBlock(decorator) {
|
3287
3290
|
var program = decorator.program && this.compileProgram(decorator.program);
|
3288
|
-
var params = this.setupFullMustacheParams(decorator, program, void 0),
|
3291
|
+
var params = this.setupFullMustacheParams(decorator, program, void 0), path7 = decorator.path;
|
3289
3292
|
this.useDecorators = true;
|
3290
|
-
this.opcode("registerDecorator", params.length,
|
3293
|
+
this.opcode("registerDecorator", params.length, path7.original);
|
3291
3294
|
},
|
3292
3295
|
PartialStatement: function PartialStatement(partial) {
|
3293
3296
|
this.usePartial = true;
|
@@ -3351,46 +3354,46 @@ var require_compiler = __commonJS({
|
|
3351
3354
|
}
|
3352
3355
|
},
|
3353
3356
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
3354
|
-
var
|
3355
|
-
this.opcode("getContext",
|
3357
|
+
var path7 = sexpr.path, name = path7.parts[0], isBlock = program != null || inverse != null;
|
3358
|
+
this.opcode("getContext", path7.depth);
|
3356
3359
|
this.opcode("pushProgram", program);
|
3357
3360
|
this.opcode("pushProgram", inverse);
|
3358
|
-
|
3359
|
-
this.accept(
|
3361
|
+
path7.strict = true;
|
3362
|
+
this.accept(path7);
|
3360
3363
|
this.opcode("invokeAmbiguous", name, isBlock);
|
3361
3364
|
},
|
3362
3365
|
simpleSexpr: function simpleSexpr(sexpr) {
|
3363
|
-
var
|
3364
|
-
|
3365
|
-
this.accept(
|
3366
|
+
var path7 = sexpr.path;
|
3367
|
+
path7.strict = true;
|
3368
|
+
this.accept(path7);
|
3366
3369
|
this.opcode("resolvePossibleLambda");
|
3367
3370
|
},
|
3368
3371
|
helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
3369
|
-
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
3372
|
+
var params = this.setupFullMustacheParams(sexpr, program, inverse), path7 = sexpr.path, name = path7.parts[0];
|
3370
3373
|
if (this.options.knownHelpers[name]) {
|
3371
3374
|
this.opcode("invokeKnownHelper", params.length, name);
|
3372
3375
|
} else if (this.options.knownHelpersOnly) {
|
3373
3376
|
throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
|
3374
3377
|
} else {
|
3375
|
-
|
3376
|
-
|
3377
|
-
this.accept(
|
3378
|
-
this.opcode("invokeHelper", params.length,
|
3378
|
+
path7.strict = true;
|
3379
|
+
path7.falsy = true;
|
3380
|
+
this.accept(path7);
|
3381
|
+
this.opcode("invokeHelper", params.length, path7.original, _ast2["default"].helpers.simpleId(path7));
|
3379
3382
|
}
|
3380
3383
|
},
|
3381
|
-
PathExpression: function PathExpression(
|
3382
|
-
this.addDepth(
|
3383
|
-
this.opcode("getContext",
|
3384
|
-
var name =
|
3384
|
+
PathExpression: function PathExpression(path7) {
|
3385
|
+
this.addDepth(path7.depth);
|
3386
|
+
this.opcode("getContext", path7.depth);
|
3387
|
+
var name = path7.parts[0], scoped = _ast2["default"].helpers.scopedId(path7), blockParamId = !path7.depth && !scoped && this.blockParamIndex(name);
|
3385
3388
|
if (blockParamId) {
|
3386
|
-
this.opcode("lookupBlockParam", blockParamId,
|
3389
|
+
this.opcode("lookupBlockParam", blockParamId, path7.parts);
|
3387
3390
|
} else if (!name) {
|
3388
3391
|
this.opcode("pushContext");
|
3389
|
-
} else if (
|
3392
|
+
} else if (path7.data) {
|
3390
3393
|
this.options.data = true;
|
3391
|
-
this.opcode("lookupData",
|
3394
|
+
this.opcode("lookupData", path7.depth, path7.parts, path7.strict);
|
3392
3395
|
} else {
|
3393
|
-
this.opcode("lookupOnContext",
|
3396
|
+
this.opcode("lookupOnContext", path7.parts, path7.falsy, path7.strict, scoped);
|
3394
3397
|
}
|
3395
3398
|
},
|
3396
3399
|
StringLiteral: function StringLiteral(string) {
|
@@ -3514,7 +3517,7 @@ var require_compiler = __commonJS({
|
|
3514
3517
|
}
|
3515
3518
|
}
|
3516
3519
|
};
|
3517
|
-
function precompile(input, options,
|
3520
|
+
function precompile(input, options, env2) {
|
3518
3521
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
3519
3522
|
throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
|
3520
3523
|
}
|
@@ -3525,10 +3528,10 @@ var require_compiler = __commonJS({
|
|
3525
3528
|
if (options.compat) {
|
3526
3529
|
options.useDepths = true;
|
3527
3530
|
}
|
3528
|
-
var ast =
|
3529
|
-
return new
|
3531
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options);
|
3532
|
+
return new env2.JavaScriptCompiler().compile(environment, options);
|
3530
3533
|
}
|
3531
|
-
function compile2(input, options,
|
3534
|
+
function compile2(input, options, env2) {
|
3532
3535
|
if (options === void 0)
|
3533
3536
|
options = {};
|
3534
3537
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
@@ -3543,8 +3546,8 @@ var require_compiler = __commonJS({
|
|
3543
3546
|
}
|
3544
3547
|
var compiled = void 0;
|
3545
3548
|
function compileInput() {
|
3546
|
-
var ast =
|
3547
|
-
return
|
3549
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options), templateSpec = new env2.JavaScriptCompiler().compile(environment, options, void 0, true);
|
3550
|
+
return env2.template(templateSpec);
|
3548
3551
|
}
|
3549
3552
|
function ret(context, execOptions) {
|
3550
3553
|
if (!compiled) {
|
@@ -3744,16 +3747,16 @@ var require_util = __commonJS({
|
|
3744
3747
|
}
|
3745
3748
|
exports.urlGenerate = urlGenerate;
|
3746
3749
|
function normalize(aPath) {
|
3747
|
-
var
|
3750
|
+
var path7 = aPath;
|
3748
3751
|
var url = urlParse(aPath);
|
3749
3752
|
if (url) {
|
3750
3753
|
if (!url.path) {
|
3751
3754
|
return aPath;
|
3752
3755
|
}
|
3753
|
-
|
3756
|
+
path7 = url.path;
|
3754
3757
|
}
|
3755
|
-
var isAbsolute = exports.isAbsolute(
|
3756
|
-
var parts =
|
3758
|
+
var isAbsolute = exports.isAbsolute(path7);
|
3759
|
+
var parts = path7.split(/\/+/);
|
3757
3760
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
3758
3761
|
part = parts[i];
|
3759
3762
|
if (part === ".") {
|
@@ -3770,15 +3773,15 @@ var require_util = __commonJS({
|
|
3770
3773
|
}
|
3771
3774
|
}
|
3772
3775
|
}
|
3773
|
-
|
3774
|
-
if (
|
3775
|
-
|
3776
|
+
path7 = parts.join("/");
|
3777
|
+
if (path7 === "") {
|
3778
|
+
path7 = isAbsolute ? "/" : ".";
|
3776
3779
|
}
|
3777
3780
|
if (url) {
|
3778
|
-
url.path =
|
3781
|
+
url.path = path7;
|
3779
3782
|
return urlGenerate(url);
|
3780
3783
|
}
|
3781
|
-
return
|
3784
|
+
return path7;
|
3782
3785
|
}
|
3783
3786
|
exports.normalize = normalize;
|
3784
3787
|
function join(aRoot, aPath) {
|
@@ -6568,8 +6571,8 @@ var require_printer = __commonJS({
|
|
6568
6571
|
return this.accept(sexpr.path) + " " + params + hash;
|
6569
6572
|
};
|
6570
6573
|
PrintVisitor.prototype.PathExpression = function(id) {
|
6571
|
-
var
|
6572
|
-
return (id.data ? "@" : "") + "PATH:" +
|
6574
|
+
var path7 = id.parts.join("/");
|
6575
|
+
return (id.data ? "@" : "") + "PATH:" + path7;
|
6573
6576
|
};
|
6574
6577
|
PrintVisitor.prototype.StringLiteral = function(string) {
|
6575
6578
|
return '"' + string.value + '"';
|
@@ -6620,9 +6623,9 @@ var require_lib = __commonJS({
|
|
6620
6623
|
}
|
6621
6624
|
});
|
6622
6625
|
|
6623
|
-
// ../../../../node_modules/.pnpm/@modern-js+utils@2.58.
|
6626
|
+
// ../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
|
6624
6627
|
var require_chalk = __commonJS({
|
6625
|
-
"../../../../node_modules/.pnpm/@modern-js+utils@2.58.
|
6628
|
+
"../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
|
6626
6629
|
"use strict";
|
6627
6630
|
(() => {
|
6628
6631
|
var e = { 44: (e2, t2, n2) => {
|
@@ -7751,13 +7754,13 @@ var require_chalk = __commonJS({
|
|
7751
7754
|
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
7752
7755
|
}
|
7753
7756
|
}
|
7754
|
-
function
|
7757
|
+
function translateLevel2(e3) {
|
7755
7758
|
if (e3 === 0) {
|
7756
7759
|
return false;
|
7757
7760
|
}
|
7758
7761
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
7759
7762
|
}
|
7760
|
-
function
|
7763
|
+
function supportsColor2(e3, t3) {
|
7761
7764
|
if (c === 0) {
|
7762
7765
|
return 0;
|
7763
7766
|
}
|
@@ -7814,10 +7817,10 @@ var require_chalk = __commonJS({
|
|
7814
7817
|
return n3;
|
7815
7818
|
}
|
7816
7819
|
function getSupportLevel(e3) {
|
7817
|
-
const t3 =
|
7818
|
-
return
|
7820
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
7821
|
+
return translateLevel2(t3);
|
7819
7822
|
}
|
7820
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
7823
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, s.isatty(1))), stderr: translateLevel2(supportsColor2(true, s.isatty(2))) };
|
7821
7824
|
}, 37: (e2) => {
|
7822
7825
|
"use strict";
|
7823
7826
|
e2.exports = require("os");
|
@@ -9444,11 +9447,11 @@ var require_baseGet = __commonJS({
|
|
9444
9447
|
"use strict";
|
9445
9448
|
var castPath = require_castPath();
|
9446
9449
|
var toKey = require_toKey();
|
9447
|
-
function baseGet(object,
|
9448
|
-
|
9449
|
-
var index = 0, length =
|
9450
|
+
function baseGet(object, path7) {
|
9451
|
+
path7 = castPath(path7, object);
|
9452
|
+
var index = 0, length = path7.length;
|
9450
9453
|
while (object != null && index < length) {
|
9451
|
-
object = object[toKey(
|
9454
|
+
object = object[toKey(path7[index++])];
|
9452
9455
|
}
|
9453
9456
|
return index && index == length ? object : void 0;
|
9454
9457
|
}
|
@@ -9461,8 +9464,8 @@ var require_get = __commonJS({
|
|
9461
9464
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports, module2) {
|
9462
9465
|
"use strict";
|
9463
9466
|
var baseGet = require_baseGet();
|
9464
|
-
function get3(object,
|
9465
|
-
var result = object == null ? void 0 : baseGet(object,
|
9467
|
+
function get3(object, path7, defaultValue) {
|
9468
|
+
var result = object == null ? void 0 : baseGet(object, path7);
|
9466
9469
|
return result === void 0 ? defaultValue : result;
|
9467
9470
|
}
|
9468
9471
|
module2.exports = get3;
|
@@ -9549,14 +9552,14 @@ var require_baseSet = __commonJS({
|
|
9549
9552
|
var isIndex = require_isIndex();
|
9550
9553
|
var isObject4 = require_isObject();
|
9551
9554
|
var toKey = require_toKey();
|
9552
|
-
function baseSet(object,
|
9555
|
+
function baseSet(object, path7, value, customizer) {
|
9553
9556
|
if (!isObject4(object)) {
|
9554
9557
|
return object;
|
9555
9558
|
}
|
9556
|
-
|
9557
|
-
var index = -1, length =
|
9559
|
+
path7 = castPath(path7, object);
|
9560
|
+
var index = -1, length = path7.length, lastIndex = length - 1, nested = object;
|
9558
9561
|
while (nested != null && ++index < length) {
|
9559
|
-
var key = toKey(
|
9562
|
+
var key = toKey(path7[index]), newValue = value;
|
9560
9563
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
9561
9564
|
return object;
|
9562
9565
|
}
|
@@ -9564,7 +9567,7 @@ var require_baseSet = __commonJS({
|
|
9564
9567
|
var objValue = nested[key];
|
9565
9568
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
9566
9569
|
if (newValue === void 0) {
|
9567
|
-
newValue = isObject4(objValue) ? objValue : isIndex(
|
9570
|
+
newValue = isObject4(objValue) ? objValue : isIndex(path7[index + 1]) ? [] : {};
|
9568
9571
|
}
|
9569
9572
|
}
|
9570
9573
|
assignValue(nested, key, newValue);
|
@@ -9581,8 +9584,8 @@ var require_set = __commonJS({
|
|
9581
9584
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js"(exports, module2) {
|
9582
9585
|
"use strict";
|
9583
9586
|
var baseSet = require_baseSet();
|
9584
|
-
function set(object,
|
9585
|
-
return object == null ? object : baseSet(object,
|
9587
|
+
function set(object, path7, value) {
|
9588
|
+
return object == null ? object : baseSet(object, path7, value);
|
9586
9589
|
}
|
9587
9590
|
module2.exports = set;
|
9588
9591
|
}
|
@@ -12743,7 +12746,7 @@ var require_innerFrom = __commonJS({
|
|
12743
12746
|
exports.fromIterable = fromIterable;
|
12744
12747
|
function fromAsyncIterable(asyncIterable) {
|
12745
12748
|
return new Observable_1.Observable(function(subscriber) {
|
12746
|
-
|
12749
|
+
process3(asyncIterable, subscriber).catch(function(err) {
|
12747
12750
|
return subscriber.error(err);
|
12748
12751
|
});
|
12749
12752
|
});
|
@@ -12753,7 +12756,7 @@ var require_innerFrom = __commonJS({
|
|
12753
12756
|
return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
|
12754
12757
|
}
|
12755
12758
|
exports.fromReadableStreamLike = fromReadableStreamLike;
|
12756
|
-
function
|
12759
|
+
function process3(asyncIterable, subscriber) {
|
12757
12760
|
var asyncIterable_1, asyncIterable_1_1;
|
12758
12761
|
var e_2, _a2;
|
12759
12762
|
return __awaiter6(this, void 0, void 0, function() {
|
@@ -20034,11 +20037,11 @@ var require_signals = __commonJS({
|
|
20034
20037
|
var require_signal_exit = __commonJS({
|
20035
20038
|
"../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
20036
20039
|
"use strict";
|
20037
|
-
var
|
20038
|
-
var processOk = function(
|
20039
|
-
return
|
20040
|
+
var process3 = global.process;
|
20041
|
+
var processOk = function(process4) {
|
20042
|
+
return process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
|
20040
20043
|
};
|
20041
|
-
if (!processOk(
|
20044
|
+
if (!processOk(process3)) {
|
20042
20045
|
module2.exports = function() {
|
20043
20046
|
return function() {
|
20044
20047
|
};
|
@@ -20046,15 +20049,15 @@ var require_signal_exit = __commonJS({
|
|
20046
20049
|
} else {
|
20047
20050
|
assert = require("assert");
|
20048
20051
|
signals = require_signals();
|
20049
|
-
isWin = /^win/i.test(
|
20052
|
+
isWin = /^win/i.test(process3.platform);
|
20050
20053
|
EE = require("events");
|
20051
20054
|
if (typeof EE !== "function") {
|
20052
20055
|
EE = EE.EventEmitter;
|
20053
20056
|
}
|
20054
|
-
if (
|
20055
|
-
emitter =
|
20057
|
+
if (process3.__signal_exit_emitter__) {
|
20058
|
+
emitter = process3.__signal_exit_emitter__;
|
20056
20059
|
} else {
|
20057
|
-
emitter =
|
20060
|
+
emitter = process3.__signal_exit_emitter__ = new EE();
|
20058
20061
|
emitter.count = 0;
|
20059
20062
|
emitter.emitted = {};
|
20060
20063
|
}
|
@@ -20091,12 +20094,12 @@ var require_signal_exit = __commonJS({
|
|
20091
20094
|
loaded = false;
|
20092
20095
|
signals.forEach(function(sig) {
|
20093
20096
|
try {
|
20094
|
-
|
20097
|
+
process3.removeListener(sig, sigListeners[sig]);
|
20095
20098
|
} catch (er) {
|
20096
20099
|
}
|
20097
20100
|
});
|
20098
|
-
|
20099
|
-
|
20101
|
+
process3.emit = originalProcessEmit;
|
20102
|
+
process3.reallyExit = originalProcessReallyExit;
|
20100
20103
|
emitter.count -= 1;
|
20101
20104
|
};
|
20102
20105
|
module2.exports.unload = unload;
|
@@ -20113,7 +20116,7 @@ var require_signal_exit = __commonJS({
|
|
20113
20116
|
if (!processOk(global.process)) {
|
20114
20117
|
return;
|
20115
20118
|
}
|
20116
|
-
var listeners =
|
20119
|
+
var listeners = process3.listeners(sig);
|
20117
20120
|
if (listeners.length === emitter.count) {
|
20118
20121
|
unload();
|
20119
20122
|
emit("exit", null, sig);
|
@@ -20121,7 +20124,7 @@ var require_signal_exit = __commonJS({
|
|
20121
20124
|
if (isWin && sig === "SIGHUP") {
|
20122
20125
|
sig = "SIGINT";
|
20123
20126
|
}
|
20124
|
-
|
20127
|
+
process3.kill(process3.pid, sig);
|
20125
20128
|
}
|
20126
20129
|
};
|
20127
20130
|
});
|
@@ -20137,36 +20140,36 @@ var require_signal_exit = __commonJS({
|
|
20137
20140
|
emitter.count += 1;
|
20138
20141
|
signals = signals.filter(function(sig) {
|
20139
20142
|
try {
|
20140
|
-
|
20143
|
+
process3.on(sig, sigListeners[sig]);
|
20141
20144
|
return true;
|
20142
20145
|
} catch (er) {
|
20143
20146
|
return false;
|
20144
20147
|
}
|
20145
20148
|
});
|
20146
|
-
|
20147
|
-
|
20149
|
+
process3.emit = processEmit;
|
20150
|
+
process3.reallyExit = processReallyExit;
|
20148
20151
|
};
|
20149
20152
|
module2.exports.load = load;
|
20150
|
-
originalProcessReallyExit =
|
20153
|
+
originalProcessReallyExit = process3.reallyExit;
|
20151
20154
|
processReallyExit = function processReallyExit2(code) {
|
20152
20155
|
if (!processOk(global.process)) {
|
20153
20156
|
return;
|
20154
20157
|
}
|
20155
|
-
|
20158
|
+
process3.exitCode = code || /* istanbul ignore next */
|
20156
20159
|
0;
|
20157
|
-
emit("exit",
|
20158
|
-
emit("afterexit",
|
20159
|
-
originalProcessReallyExit.call(
|
20160
|
+
emit("exit", process3.exitCode, null);
|
20161
|
+
emit("afterexit", process3.exitCode, null);
|
20162
|
+
originalProcessReallyExit.call(process3, process3.exitCode);
|
20160
20163
|
};
|
20161
|
-
originalProcessEmit =
|
20164
|
+
originalProcessEmit = process3.emit;
|
20162
20165
|
processEmit = function processEmit2(ev, arg) {
|
20163
20166
|
if (ev === "exit" && processOk(global.process)) {
|
20164
20167
|
if (arg !== void 0) {
|
20165
|
-
|
20168
|
+
process3.exitCode = arg;
|
20166
20169
|
}
|
20167
20170
|
var ret = originalProcessEmit.apply(this, arguments);
|
20168
|
-
emit("exit",
|
20169
|
-
emit("afterexit",
|
20171
|
+
emit("exit", process3.exitCode, null);
|
20172
|
+
emit("afterexit", process3.exitCode, null);
|
20170
20173
|
return ret;
|
20171
20174
|
} else {
|
20172
20175
|
return originalProcessEmit.apply(this, arguments);
|
@@ -22203,11 +22206,11 @@ var require_hasPath = __commonJS({
|
|
22203
22206
|
var isIndex = require_isIndex();
|
22204
22207
|
var isLength = require_isLength();
|
22205
22208
|
var toKey = require_toKey();
|
22206
|
-
function hasPath(object,
|
22207
|
-
|
22208
|
-
var index = -1, length =
|
22209
|
+
function hasPath(object, path7, hasFunc) {
|
22210
|
+
path7 = castPath(path7, object);
|
22211
|
+
var index = -1, length = path7.length, result = false;
|
22209
22212
|
while (++index < length) {
|
22210
|
-
var key = toKey(
|
22213
|
+
var key = toKey(path7[index]);
|
22211
22214
|
if (!(result = object != null && hasFunc(object, key))) {
|
22212
22215
|
break;
|
22213
22216
|
}
|
@@ -22229,8 +22232,8 @@ var require_hasIn = __commonJS({
|
|
22229
22232
|
"use strict";
|
22230
22233
|
var baseHasIn = require_baseHasIn();
|
22231
22234
|
var hasPath = require_hasPath();
|
22232
|
-
function hasIn(object,
|
22233
|
-
return object != null && hasPath(object,
|
22235
|
+
function hasIn(object, path7) {
|
22236
|
+
return object != null && hasPath(object, path7, baseHasIn);
|
22234
22237
|
}
|
22235
22238
|
module2.exports = hasIn;
|
22236
22239
|
}
|
@@ -22249,13 +22252,13 @@ var require_baseMatchesProperty = __commonJS({
|
|
22249
22252
|
var toKey = require_toKey();
|
22250
22253
|
var COMPARE_PARTIAL_FLAG = 1;
|
22251
22254
|
var COMPARE_UNORDERED_FLAG = 2;
|
22252
|
-
function baseMatchesProperty(
|
22253
|
-
if (isKey(
|
22254
|
-
return matchesStrictComparable(toKey(
|
22255
|
+
function baseMatchesProperty(path7, srcValue) {
|
22256
|
+
if (isKey(path7) && isStrictComparable(srcValue)) {
|
22257
|
+
return matchesStrictComparable(toKey(path7), srcValue);
|
22255
22258
|
}
|
22256
22259
|
return function(object) {
|
22257
|
-
var objValue = get3(object,
|
22258
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object,
|
22260
|
+
var objValue = get3(object, path7);
|
22261
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path7) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
22259
22262
|
};
|
22260
22263
|
}
|
22261
22264
|
module2.exports = baseMatchesProperty;
|
@@ -22280,9 +22283,9 @@ var require_basePropertyDeep = __commonJS({
|
|
22280
22283
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports, module2) {
|
22281
22284
|
"use strict";
|
22282
22285
|
var baseGet = require_baseGet();
|
22283
|
-
function basePropertyDeep(
|
22286
|
+
function basePropertyDeep(path7) {
|
22284
22287
|
return function(object) {
|
22285
|
-
return baseGet(object,
|
22288
|
+
return baseGet(object, path7);
|
22286
22289
|
};
|
22287
22290
|
}
|
22288
22291
|
module2.exports = basePropertyDeep;
|
@@ -22297,8 +22300,8 @@ var require_property = __commonJS({
|
|
22297
22300
|
var basePropertyDeep = require_basePropertyDeep();
|
22298
22301
|
var isKey = require_isKey();
|
22299
22302
|
var toKey = require_toKey();
|
22300
|
-
function property(
|
22301
|
-
return isKey(
|
22303
|
+
function property(path7) {
|
22304
|
+
return isKey(path7) ? baseProperty(toKey(path7)) : basePropertyDeep(path7);
|
22302
22305
|
}
|
22303
22306
|
module2.exports = property;
|
22304
22307
|
}
|
@@ -23527,15 +23530,15 @@ var require_route = __commonJS({
|
|
23527
23530
|
};
|
23528
23531
|
}
|
23529
23532
|
function wrapConversion(toModel, graph) {
|
23530
|
-
const
|
23533
|
+
const path7 = [graph[toModel].parent, toModel];
|
23531
23534
|
let fn = conversions[graph[toModel].parent][toModel];
|
23532
23535
|
let cur = graph[toModel].parent;
|
23533
23536
|
while (graph[cur].parent) {
|
23534
|
-
|
23537
|
+
path7.unshift(graph[cur].parent);
|
23535
23538
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
23536
23539
|
cur = graph[cur].parent;
|
23537
23540
|
}
|
23538
|
-
fn.conversion =
|
23541
|
+
fn.conversion = path7;
|
23539
23542
|
return fn;
|
23540
23543
|
}
|
23541
23544
|
module2.exports = function(fromModel) {
|
@@ -39651,16 +39654,16 @@ var require_os_tmpdir = __commonJS({
|
|
39651
39654
|
var isWindows = process.platform === "win32";
|
39652
39655
|
var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/;
|
39653
39656
|
module2.exports = function() {
|
39654
|
-
var
|
39657
|
+
var path7;
|
39655
39658
|
if (isWindows) {
|
39656
|
-
|
39659
|
+
path7 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
|
39657
39660
|
} else {
|
39658
|
-
|
39661
|
+
path7 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
|
39659
39662
|
}
|
39660
|
-
if (trailingSlashRe.test(
|
39661
|
-
|
39663
|
+
if (trailingSlashRe.test(path7)) {
|
39664
|
+
path7 = path7.slice(0, -1);
|
39662
39665
|
}
|
39663
|
-
return
|
39666
|
+
return path7;
|
39664
39667
|
};
|
39665
39668
|
}
|
39666
39669
|
});
|
@@ -39670,7 +39673,7 @@ var require_tmp = __commonJS({
|
|
39670
39673
|
"../../../../node_modules/.pnpm/tmp@0.0.33/node_modules/tmp/lib/tmp.js"(exports, module2) {
|
39671
39674
|
"use strict";
|
39672
39675
|
var fs7 = require("fs");
|
39673
|
-
var
|
39676
|
+
var path7 = require("path");
|
39674
39677
|
var crypto = require("crypto");
|
39675
39678
|
var osTmpDir = require_os_tmpdir();
|
39676
39679
|
var _c = process.binding("constants");
|
@@ -39712,7 +39715,7 @@ var require_tmp = __commonJS({
|
|
39712
39715
|
}
|
39713
39716
|
function _generateTmpName(opts) {
|
39714
39717
|
if (opts.name) {
|
39715
|
-
return
|
39718
|
+
return path7.join(opts.dir || tmpDir, opts.name);
|
39716
39719
|
}
|
39717
39720
|
if (opts.template) {
|
39718
39721
|
return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
|
@@ -39723,7 +39726,7 @@ var require_tmp = __commonJS({
|
|
39723
39726
|
_randomChars(12),
|
39724
39727
|
opts.postfix || ""
|
39725
39728
|
].join("");
|
39726
|
-
return
|
39729
|
+
return path7.join(opts.dir || tmpDir, name);
|
39727
39730
|
}
|
39728
39731
|
function tmpName(options, callback) {
|
39729
39732
|
var args = _parseArguments(options, callback), opts = args[0], cb = args[1], tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
|
@@ -39811,7 +39814,7 @@ var require_tmp = __commonJS({
|
|
39811
39814
|
do {
|
39812
39815
|
var dir2 = dirs.pop(), deferred = false, files = fs7.readdirSync(dir2);
|
39813
39816
|
for (var i = 0, length = files.length; i < length; i++) {
|
39814
|
-
var file2 =
|
39817
|
+
var file2 = path7.join(dir2, files[i]), stat = fs7.lstatSync(file2);
|
39815
39818
|
if (stat.isDirectory()) {
|
39816
39819
|
if (!deferred) {
|
39817
39820
|
deferred = true;
|
@@ -48473,8 +48476,8 @@ var require_parent = __commonJS({
|
|
48473
48476
|
"use strict";
|
48474
48477
|
var baseGet = require_baseGet();
|
48475
48478
|
var baseSlice = require_baseSlice();
|
48476
|
-
function parent(object,
|
48477
|
-
return
|
48479
|
+
function parent(object, path7) {
|
48480
|
+
return path7.length < 2 ? object : baseGet(object, baseSlice(path7, 0, -1));
|
48478
48481
|
}
|
48479
48482
|
module2.exports = parent;
|
48480
48483
|
}
|
@@ -48488,10 +48491,10 @@ var require_baseUnset = __commonJS({
|
|
48488
48491
|
var last = require_last2();
|
48489
48492
|
var parent = require_parent();
|
48490
48493
|
var toKey = require_toKey();
|
48491
|
-
function baseUnset(object,
|
48492
|
-
|
48493
|
-
object = parent(object,
|
48494
|
-
return object == null || delete object[toKey(last(
|
48494
|
+
function baseUnset(object, path7) {
|
48495
|
+
path7 = castPath(path7, object);
|
48496
|
+
object = parent(object, path7);
|
48497
|
+
return object == null || delete object[toKey(last(path7))];
|
48495
48498
|
}
|
48496
48499
|
module2.exports = baseUnset;
|
48497
48500
|
}
|
@@ -48600,10 +48603,10 @@ var require_omit = __commonJS({
|
|
48600
48603
|
return result;
|
48601
48604
|
}
|
48602
48605
|
var isDeep = false;
|
48603
|
-
paths = arrayMap(paths, function(
|
48604
|
-
|
48605
|
-
isDeep || (isDeep =
|
48606
|
-
return
|
48606
|
+
paths = arrayMap(paths, function(path7) {
|
48607
|
+
path7 = castPath(path7, object);
|
48608
|
+
isDeep || (isDeep = path7.length > 1);
|
48609
|
+
return path7;
|
48607
48610
|
});
|
48608
48611
|
copyObject(object, getAllKeysIn(object), result);
|
48609
48612
|
if (isDeep) {
|
@@ -51048,6 +51051,1635 @@ var require_inquirer2 = __commonJS({
|
|
51048
51051
|
}
|
51049
51052
|
});
|
51050
51053
|
|
51054
|
+
// ../../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
51055
|
+
var require_ms = __commonJS({
|
51056
|
+
"../../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) {
|
51057
|
+
"use strict";
|
51058
|
+
var s = 1e3;
|
51059
|
+
var m = s * 60;
|
51060
|
+
var h = m * 60;
|
51061
|
+
var d = h * 24;
|
51062
|
+
var w = d * 7;
|
51063
|
+
var y = d * 365.25;
|
51064
|
+
module2.exports = function(val, options) {
|
51065
|
+
options = options || {};
|
51066
|
+
var type = typeof val;
|
51067
|
+
if (type === "string" && val.length > 0) {
|
51068
|
+
return parse3(val);
|
51069
|
+
} else if (type === "number" && isFinite(val)) {
|
51070
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
51071
|
+
}
|
51072
|
+
throw new Error(
|
51073
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
51074
|
+
);
|
51075
|
+
};
|
51076
|
+
function parse3(str) {
|
51077
|
+
str = String(str);
|
51078
|
+
if (str.length > 100) {
|
51079
|
+
return;
|
51080
|
+
}
|
51081
|
+
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(
|
51082
|
+
str
|
51083
|
+
);
|
51084
|
+
if (!match) {
|
51085
|
+
return;
|
51086
|
+
}
|
51087
|
+
var n = parseFloat(match[1]);
|
51088
|
+
var type = (match[2] || "ms").toLowerCase();
|
51089
|
+
switch (type) {
|
51090
|
+
case "years":
|
51091
|
+
case "year":
|
51092
|
+
case "yrs":
|
51093
|
+
case "yr":
|
51094
|
+
case "y":
|
51095
|
+
return n * y;
|
51096
|
+
case "weeks":
|
51097
|
+
case "week":
|
51098
|
+
case "w":
|
51099
|
+
return n * w;
|
51100
|
+
case "days":
|
51101
|
+
case "day":
|
51102
|
+
case "d":
|
51103
|
+
return n * d;
|
51104
|
+
case "hours":
|
51105
|
+
case "hour":
|
51106
|
+
case "hrs":
|
51107
|
+
case "hr":
|
51108
|
+
case "h":
|
51109
|
+
return n * h;
|
51110
|
+
case "minutes":
|
51111
|
+
case "minute":
|
51112
|
+
case "mins":
|
51113
|
+
case "min":
|
51114
|
+
case "m":
|
51115
|
+
return n * m;
|
51116
|
+
case "seconds":
|
51117
|
+
case "second":
|
51118
|
+
case "secs":
|
51119
|
+
case "sec":
|
51120
|
+
case "s":
|
51121
|
+
return n * s;
|
51122
|
+
case "milliseconds":
|
51123
|
+
case "millisecond":
|
51124
|
+
case "msecs":
|
51125
|
+
case "msec":
|
51126
|
+
case "ms":
|
51127
|
+
return n;
|
51128
|
+
default:
|
51129
|
+
return void 0;
|
51130
|
+
}
|
51131
|
+
}
|
51132
|
+
function fmtShort(ms) {
|
51133
|
+
var msAbs = Math.abs(ms);
|
51134
|
+
if (msAbs >= d) {
|
51135
|
+
return Math.round(ms / d) + "d";
|
51136
|
+
}
|
51137
|
+
if (msAbs >= h) {
|
51138
|
+
return Math.round(ms / h) + "h";
|
51139
|
+
}
|
51140
|
+
if (msAbs >= m) {
|
51141
|
+
return Math.round(ms / m) + "m";
|
51142
|
+
}
|
51143
|
+
if (msAbs >= s) {
|
51144
|
+
return Math.round(ms / s) + "s";
|
51145
|
+
}
|
51146
|
+
return ms + "ms";
|
51147
|
+
}
|
51148
|
+
function fmtLong(ms) {
|
51149
|
+
var msAbs = Math.abs(ms);
|
51150
|
+
if (msAbs >= d) {
|
51151
|
+
return plural(ms, msAbs, d, "day");
|
51152
|
+
}
|
51153
|
+
if (msAbs >= h) {
|
51154
|
+
return plural(ms, msAbs, h, "hour");
|
51155
|
+
}
|
51156
|
+
if (msAbs >= m) {
|
51157
|
+
return plural(ms, msAbs, m, "minute");
|
51158
|
+
}
|
51159
|
+
if (msAbs >= s) {
|
51160
|
+
return plural(ms, msAbs, s, "second");
|
51161
|
+
}
|
51162
|
+
return ms + " ms";
|
51163
|
+
}
|
51164
|
+
function plural(ms, msAbs, n, name) {
|
51165
|
+
var isPlural = msAbs >= n * 1.5;
|
51166
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
51167
|
+
}
|
51168
|
+
}
|
51169
|
+
});
|
51170
|
+
|
51171
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js
|
51172
|
+
var require_common2 = __commonJS({
|
51173
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js"(exports, module2) {
|
51174
|
+
"use strict";
|
51175
|
+
function setup(env2) {
|
51176
|
+
createDebug.debug = createDebug;
|
51177
|
+
createDebug.default = createDebug;
|
51178
|
+
createDebug.coerce = coerce;
|
51179
|
+
createDebug.disable = disable;
|
51180
|
+
createDebug.enable = enable;
|
51181
|
+
createDebug.enabled = enabled;
|
51182
|
+
createDebug.humanize = require_ms();
|
51183
|
+
createDebug.destroy = destroy2;
|
51184
|
+
Object.keys(env2).forEach((key) => {
|
51185
|
+
createDebug[key] = env2[key];
|
51186
|
+
});
|
51187
|
+
createDebug.names = [];
|
51188
|
+
createDebug.skips = [];
|
51189
|
+
createDebug.formatters = {};
|
51190
|
+
function selectColor(namespace) {
|
51191
|
+
let hash = 0;
|
51192
|
+
for (let i = 0; i < namespace.length; i++) {
|
51193
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
51194
|
+
hash |= 0;
|
51195
|
+
}
|
51196
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
51197
|
+
}
|
51198
|
+
createDebug.selectColor = selectColor;
|
51199
|
+
function createDebug(namespace) {
|
51200
|
+
let prevTime;
|
51201
|
+
let enableOverride = null;
|
51202
|
+
let namespacesCache;
|
51203
|
+
let enabledCache;
|
51204
|
+
function debug(...args) {
|
51205
|
+
if (!debug.enabled) {
|
51206
|
+
return;
|
51207
|
+
}
|
51208
|
+
const self3 = debug;
|
51209
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
51210
|
+
const ms = curr - (prevTime || curr);
|
51211
|
+
self3.diff = ms;
|
51212
|
+
self3.prev = prevTime;
|
51213
|
+
self3.curr = curr;
|
51214
|
+
prevTime = curr;
|
51215
|
+
args[0] = createDebug.coerce(args[0]);
|
51216
|
+
if (typeof args[0] !== "string") {
|
51217
|
+
args.unshift("%O");
|
51218
|
+
}
|
51219
|
+
let index = 0;
|
51220
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
51221
|
+
if (match === "%%") {
|
51222
|
+
return "%";
|
51223
|
+
}
|
51224
|
+
index++;
|
51225
|
+
const formatter = createDebug.formatters[format];
|
51226
|
+
if (typeof formatter === "function") {
|
51227
|
+
const val = args[index];
|
51228
|
+
match = formatter.call(self3, val);
|
51229
|
+
args.splice(index, 1);
|
51230
|
+
index--;
|
51231
|
+
}
|
51232
|
+
return match;
|
51233
|
+
});
|
51234
|
+
createDebug.formatArgs.call(self3, args);
|
51235
|
+
const logFn = self3.log || createDebug.log;
|
51236
|
+
logFn.apply(self3, args);
|
51237
|
+
}
|
51238
|
+
debug.namespace = namespace;
|
51239
|
+
debug.useColors = createDebug.useColors();
|
51240
|
+
debug.color = createDebug.selectColor(namespace);
|
51241
|
+
debug.extend = extend;
|
51242
|
+
debug.destroy = createDebug.destroy;
|
51243
|
+
Object.defineProperty(debug, "enabled", {
|
51244
|
+
enumerable: true,
|
51245
|
+
configurable: false,
|
51246
|
+
get: () => {
|
51247
|
+
if (enableOverride !== null) {
|
51248
|
+
return enableOverride;
|
51249
|
+
}
|
51250
|
+
if (namespacesCache !== createDebug.namespaces) {
|
51251
|
+
namespacesCache = createDebug.namespaces;
|
51252
|
+
enabledCache = createDebug.enabled(namespace);
|
51253
|
+
}
|
51254
|
+
return enabledCache;
|
51255
|
+
},
|
51256
|
+
set: (v) => {
|
51257
|
+
enableOverride = v;
|
51258
|
+
}
|
51259
|
+
});
|
51260
|
+
if (typeof createDebug.init === "function") {
|
51261
|
+
createDebug.init(debug);
|
51262
|
+
}
|
51263
|
+
return debug;
|
51264
|
+
}
|
51265
|
+
function extend(namespace, delimiter) {
|
51266
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
51267
|
+
newDebug.log = this.log;
|
51268
|
+
return newDebug;
|
51269
|
+
}
|
51270
|
+
function enable(namespaces) {
|
51271
|
+
createDebug.save(namespaces);
|
51272
|
+
createDebug.namespaces = namespaces;
|
51273
|
+
createDebug.names = [];
|
51274
|
+
createDebug.skips = [];
|
51275
|
+
let i;
|
51276
|
+
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
51277
|
+
const len = split.length;
|
51278
|
+
for (i = 0; i < len; i++) {
|
51279
|
+
if (!split[i]) {
|
51280
|
+
continue;
|
51281
|
+
}
|
51282
|
+
namespaces = split[i].replace(/\*/g, ".*?");
|
51283
|
+
if (namespaces[0] === "-") {
|
51284
|
+
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
|
51285
|
+
} else {
|
51286
|
+
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
51287
|
+
}
|
51288
|
+
}
|
51289
|
+
}
|
51290
|
+
function disable() {
|
51291
|
+
const namespaces = [
|
51292
|
+
...createDebug.names.map(toNamespace),
|
51293
|
+
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
|
51294
|
+
].join(",");
|
51295
|
+
createDebug.enable("");
|
51296
|
+
return namespaces;
|
51297
|
+
}
|
51298
|
+
function enabled(name) {
|
51299
|
+
if (name[name.length - 1] === "*") {
|
51300
|
+
return true;
|
51301
|
+
}
|
51302
|
+
let i;
|
51303
|
+
let len;
|
51304
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
51305
|
+
if (createDebug.skips[i].test(name)) {
|
51306
|
+
return false;
|
51307
|
+
}
|
51308
|
+
}
|
51309
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
51310
|
+
if (createDebug.names[i].test(name)) {
|
51311
|
+
return true;
|
51312
|
+
}
|
51313
|
+
}
|
51314
|
+
return false;
|
51315
|
+
}
|
51316
|
+
function toNamespace(regexp) {
|
51317
|
+
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
51318
|
+
}
|
51319
|
+
function coerce(val) {
|
51320
|
+
if (val instanceof Error) {
|
51321
|
+
return val.stack || val.message;
|
51322
|
+
}
|
51323
|
+
return val;
|
51324
|
+
}
|
51325
|
+
function destroy2() {
|
51326
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
51327
|
+
}
|
51328
|
+
createDebug.enable(createDebug.load());
|
51329
|
+
return createDebug;
|
51330
|
+
}
|
51331
|
+
module2.exports = setup;
|
51332
|
+
}
|
51333
|
+
});
|
51334
|
+
|
51335
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js
|
51336
|
+
var require_browser = __commonJS({
|
51337
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js"(exports, module2) {
|
51338
|
+
"use strict";
|
51339
|
+
exports.formatArgs = formatArgs;
|
51340
|
+
exports.save = save;
|
51341
|
+
exports.load = load;
|
51342
|
+
exports.useColors = useColors;
|
51343
|
+
exports.storage = localstorage();
|
51344
|
+
exports.destroy = (() => {
|
51345
|
+
let warned = false;
|
51346
|
+
return () => {
|
51347
|
+
if (!warned) {
|
51348
|
+
warned = true;
|
51349
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
51350
|
+
}
|
51351
|
+
};
|
51352
|
+
})();
|
51353
|
+
exports.colors = [
|
51354
|
+
"#0000CC",
|
51355
|
+
"#0000FF",
|
51356
|
+
"#0033CC",
|
51357
|
+
"#0033FF",
|
51358
|
+
"#0066CC",
|
51359
|
+
"#0066FF",
|
51360
|
+
"#0099CC",
|
51361
|
+
"#0099FF",
|
51362
|
+
"#00CC00",
|
51363
|
+
"#00CC33",
|
51364
|
+
"#00CC66",
|
51365
|
+
"#00CC99",
|
51366
|
+
"#00CCCC",
|
51367
|
+
"#00CCFF",
|
51368
|
+
"#3300CC",
|
51369
|
+
"#3300FF",
|
51370
|
+
"#3333CC",
|
51371
|
+
"#3333FF",
|
51372
|
+
"#3366CC",
|
51373
|
+
"#3366FF",
|
51374
|
+
"#3399CC",
|
51375
|
+
"#3399FF",
|
51376
|
+
"#33CC00",
|
51377
|
+
"#33CC33",
|
51378
|
+
"#33CC66",
|
51379
|
+
"#33CC99",
|
51380
|
+
"#33CCCC",
|
51381
|
+
"#33CCFF",
|
51382
|
+
"#6600CC",
|
51383
|
+
"#6600FF",
|
51384
|
+
"#6633CC",
|
51385
|
+
"#6633FF",
|
51386
|
+
"#66CC00",
|
51387
|
+
"#66CC33",
|
51388
|
+
"#9900CC",
|
51389
|
+
"#9900FF",
|
51390
|
+
"#9933CC",
|
51391
|
+
"#9933FF",
|
51392
|
+
"#99CC00",
|
51393
|
+
"#99CC33",
|
51394
|
+
"#CC0000",
|
51395
|
+
"#CC0033",
|
51396
|
+
"#CC0066",
|
51397
|
+
"#CC0099",
|
51398
|
+
"#CC00CC",
|
51399
|
+
"#CC00FF",
|
51400
|
+
"#CC3300",
|
51401
|
+
"#CC3333",
|
51402
|
+
"#CC3366",
|
51403
|
+
"#CC3399",
|
51404
|
+
"#CC33CC",
|
51405
|
+
"#CC33FF",
|
51406
|
+
"#CC6600",
|
51407
|
+
"#CC6633",
|
51408
|
+
"#CC9900",
|
51409
|
+
"#CC9933",
|
51410
|
+
"#CCCC00",
|
51411
|
+
"#CCCC33",
|
51412
|
+
"#FF0000",
|
51413
|
+
"#FF0033",
|
51414
|
+
"#FF0066",
|
51415
|
+
"#FF0099",
|
51416
|
+
"#FF00CC",
|
51417
|
+
"#FF00FF",
|
51418
|
+
"#FF3300",
|
51419
|
+
"#FF3333",
|
51420
|
+
"#FF3366",
|
51421
|
+
"#FF3399",
|
51422
|
+
"#FF33CC",
|
51423
|
+
"#FF33FF",
|
51424
|
+
"#FF6600",
|
51425
|
+
"#FF6633",
|
51426
|
+
"#FF9900",
|
51427
|
+
"#FF9933",
|
51428
|
+
"#FFCC00",
|
51429
|
+
"#FFCC33"
|
51430
|
+
];
|
51431
|
+
function useColors() {
|
51432
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
51433
|
+
return true;
|
51434
|
+
}
|
51435
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
51436
|
+
return false;
|
51437
|
+
}
|
51438
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
51439
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
51440
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
51441
|
+
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
|
51442
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
51443
|
+
}
|
51444
|
+
function formatArgs(args) {
|
51445
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
|
51446
|
+
if (!this.useColors) {
|
51447
|
+
return;
|
51448
|
+
}
|
51449
|
+
const c = "color: " + this.color;
|
51450
|
+
args.splice(1, 0, c, "color: inherit");
|
51451
|
+
let index = 0;
|
51452
|
+
let lastC = 0;
|
51453
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
51454
|
+
if (match === "%%") {
|
51455
|
+
return;
|
51456
|
+
}
|
51457
|
+
index++;
|
51458
|
+
if (match === "%c") {
|
51459
|
+
lastC = index;
|
51460
|
+
}
|
51461
|
+
});
|
51462
|
+
args.splice(lastC, 0, c);
|
51463
|
+
}
|
51464
|
+
exports.log = console.debug || console.log || (() => {
|
51465
|
+
});
|
51466
|
+
function save(namespaces) {
|
51467
|
+
try {
|
51468
|
+
if (namespaces) {
|
51469
|
+
exports.storage.setItem("debug", namespaces);
|
51470
|
+
} else {
|
51471
|
+
exports.storage.removeItem("debug");
|
51472
|
+
}
|
51473
|
+
} catch (error) {
|
51474
|
+
}
|
51475
|
+
}
|
51476
|
+
function load() {
|
51477
|
+
let r;
|
51478
|
+
try {
|
51479
|
+
r = exports.storage.getItem("debug");
|
51480
|
+
} catch (error) {
|
51481
|
+
}
|
51482
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
51483
|
+
r = process.env.DEBUG;
|
51484
|
+
}
|
51485
|
+
return r;
|
51486
|
+
}
|
51487
|
+
function localstorage() {
|
51488
|
+
try {
|
51489
|
+
return localStorage;
|
51490
|
+
} catch (error) {
|
51491
|
+
}
|
51492
|
+
}
|
51493
|
+
module2.exports = require_common2()(exports);
|
51494
|
+
var { formatters } = module2.exports;
|
51495
|
+
formatters.j = function(v) {
|
51496
|
+
try {
|
51497
|
+
return JSON.stringify(v);
|
51498
|
+
} catch (error) {
|
51499
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
51500
|
+
}
|
51501
|
+
};
|
51502
|
+
}
|
51503
|
+
});
|
51504
|
+
|
51505
|
+
// ../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js
|
51506
|
+
var supports_color_exports = {};
|
51507
|
+
__export(supports_color_exports, {
|
51508
|
+
createSupportsColor: () => createSupportsColor,
|
51509
|
+
default: () => supports_color_default
|
51510
|
+
});
|
51511
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
51512
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
51513
|
+
const position = argv.indexOf(prefix + flag);
|
51514
|
+
const terminatorPosition = argv.indexOf("--");
|
51515
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
51516
|
+
}
|
51517
|
+
function envForceColor() {
|
51518
|
+
if ("FORCE_COLOR" in env) {
|
51519
|
+
if (env.FORCE_COLOR === "true") {
|
51520
|
+
return 1;
|
51521
|
+
}
|
51522
|
+
if (env.FORCE_COLOR === "false") {
|
51523
|
+
return 0;
|
51524
|
+
}
|
51525
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
51526
|
+
}
|
51527
|
+
}
|
51528
|
+
function translateLevel(level) {
|
51529
|
+
if (level === 0) {
|
51530
|
+
return false;
|
51531
|
+
}
|
51532
|
+
return {
|
51533
|
+
level,
|
51534
|
+
hasBasic: true,
|
51535
|
+
has256: level >= 2,
|
51536
|
+
has16m: level >= 3
|
51537
|
+
};
|
51538
|
+
}
|
51539
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
51540
|
+
const noFlagForceColor = envForceColor();
|
51541
|
+
if (noFlagForceColor !== void 0) {
|
51542
|
+
flagForceColor = noFlagForceColor;
|
51543
|
+
}
|
51544
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
51545
|
+
if (forceColor === 0) {
|
51546
|
+
return 0;
|
51547
|
+
}
|
51548
|
+
if (sniffFlags) {
|
51549
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
51550
|
+
return 3;
|
51551
|
+
}
|
51552
|
+
if (hasFlag("color=256")) {
|
51553
|
+
return 2;
|
51554
|
+
}
|
51555
|
+
}
|
51556
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
51557
|
+
return 1;
|
51558
|
+
}
|
51559
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
51560
|
+
return 0;
|
51561
|
+
}
|
51562
|
+
const min = forceColor || 0;
|
51563
|
+
if (env.TERM === "dumb") {
|
51564
|
+
return min;
|
51565
|
+
}
|
51566
|
+
if (import_node_process.default.platform === "win32") {
|
51567
|
+
const osRelease = import_node_os.default.release().split(".");
|
51568
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
51569
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
51570
|
+
}
|
51571
|
+
return 1;
|
51572
|
+
}
|
51573
|
+
if ("CI" in env) {
|
51574
|
+
if ("GITHUB_ACTIONS" in env) {
|
51575
|
+
return 3;
|
51576
|
+
}
|
51577
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
51578
|
+
return 1;
|
51579
|
+
}
|
51580
|
+
return min;
|
51581
|
+
}
|
51582
|
+
if ("TEAMCITY_VERSION" in env) {
|
51583
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
51584
|
+
}
|
51585
|
+
if (env.COLORTERM === "truecolor") {
|
51586
|
+
return 3;
|
51587
|
+
}
|
51588
|
+
if (env.TERM === "xterm-kitty") {
|
51589
|
+
return 3;
|
51590
|
+
}
|
51591
|
+
if ("TERM_PROGRAM" in env) {
|
51592
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
51593
|
+
switch (env.TERM_PROGRAM) {
|
51594
|
+
case "iTerm.app": {
|
51595
|
+
return version >= 3 ? 3 : 2;
|
51596
|
+
}
|
51597
|
+
case "Apple_Terminal": {
|
51598
|
+
return 2;
|
51599
|
+
}
|
51600
|
+
}
|
51601
|
+
}
|
51602
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
51603
|
+
return 2;
|
51604
|
+
}
|
51605
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
51606
|
+
return 1;
|
51607
|
+
}
|
51608
|
+
if ("COLORTERM" in env) {
|
51609
|
+
return 1;
|
51610
|
+
}
|
51611
|
+
return min;
|
51612
|
+
}
|
51613
|
+
function createSupportsColor(stream, options = {}) {
|
51614
|
+
const level = _supportsColor(stream, {
|
51615
|
+
streamIsTTY: stream && stream.isTTY,
|
51616
|
+
...options
|
51617
|
+
});
|
51618
|
+
return translateLevel(level);
|
51619
|
+
}
|
51620
|
+
var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
|
51621
|
+
var init_supports_color = __esm({
|
51622
|
+
"../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js"() {
|
51623
|
+
"use strict";
|
51624
|
+
import_node_process = __toESM(require("process"));
|
51625
|
+
import_node_os = __toESM(require("os"));
|
51626
|
+
import_node_tty = __toESM(require("tty"));
|
51627
|
+
({ env } = import_node_process.default);
|
51628
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
51629
|
+
flagForceColor = 0;
|
51630
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
51631
|
+
flagForceColor = 1;
|
51632
|
+
}
|
51633
|
+
supportsColor = {
|
51634
|
+
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
51635
|
+
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
51636
|
+
};
|
51637
|
+
supports_color_default = supportsColor;
|
51638
|
+
}
|
51639
|
+
});
|
51640
|
+
|
51641
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js
|
51642
|
+
var require_node2 = __commonJS({
|
51643
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js"(exports, module2) {
|
51644
|
+
"use strict";
|
51645
|
+
var tty2 = require("tty");
|
51646
|
+
var util = require("util");
|
51647
|
+
exports.init = init;
|
51648
|
+
exports.log = log;
|
51649
|
+
exports.formatArgs = formatArgs;
|
51650
|
+
exports.save = save;
|
51651
|
+
exports.load = load;
|
51652
|
+
exports.useColors = useColors;
|
51653
|
+
exports.destroy = util.deprecate(
|
51654
|
+
() => {
|
51655
|
+
},
|
51656
|
+
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
51657
|
+
);
|
51658
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
51659
|
+
try {
|
51660
|
+
const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
|
51661
|
+
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
51662
|
+
exports.colors = [
|
51663
|
+
20,
|
51664
|
+
21,
|
51665
|
+
26,
|
51666
|
+
27,
|
51667
|
+
32,
|
51668
|
+
33,
|
51669
|
+
38,
|
51670
|
+
39,
|
51671
|
+
40,
|
51672
|
+
41,
|
51673
|
+
42,
|
51674
|
+
43,
|
51675
|
+
44,
|
51676
|
+
45,
|
51677
|
+
56,
|
51678
|
+
57,
|
51679
|
+
62,
|
51680
|
+
63,
|
51681
|
+
68,
|
51682
|
+
69,
|
51683
|
+
74,
|
51684
|
+
75,
|
51685
|
+
76,
|
51686
|
+
77,
|
51687
|
+
78,
|
51688
|
+
79,
|
51689
|
+
80,
|
51690
|
+
81,
|
51691
|
+
92,
|
51692
|
+
93,
|
51693
|
+
98,
|
51694
|
+
99,
|
51695
|
+
112,
|
51696
|
+
113,
|
51697
|
+
128,
|
51698
|
+
129,
|
51699
|
+
134,
|
51700
|
+
135,
|
51701
|
+
148,
|
51702
|
+
149,
|
51703
|
+
160,
|
51704
|
+
161,
|
51705
|
+
162,
|
51706
|
+
163,
|
51707
|
+
164,
|
51708
|
+
165,
|
51709
|
+
166,
|
51710
|
+
167,
|
51711
|
+
168,
|
51712
|
+
169,
|
51713
|
+
170,
|
51714
|
+
171,
|
51715
|
+
172,
|
51716
|
+
173,
|
51717
|
+
178,
|
51718
|
+
179,
|
51719
|
+
184,
|
51720
|
+
185,
|
51721
|
+
196,
|
51722
|
+
197,
|
51723
|
+
198,
|
51724
|
+
199,
|
51725
|
+
200,
|
51726
|
+
201,
|
51727
|
+
202,
|
51728
|
+
203,
|
51729
|
+
204,
|
51730
|
+
205,
|
51731
|
+
206,
|
51732
|
+
207,
|
51733
|
+
208,
|
51734
|
+
209,
|
51735
|
+
214,
|
51736
|
+
215,
|
51737
|
+
220,
|
51738
|
+
221
|
51739
|
+
];
|
51740
|
+
}
|
51741
|
+
} catch (error) {
|
51742
|
+
}
|
51743
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
51744
|
+
return /^debug_/i.test(key);
|
51745
|
+
}).reduce((obj, key) => {
|
51746
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
51747
|
+
return k.toUpperCase();
|
51748
|
+
});
|
51749
|
+
let val = process.env[key];
|
51750
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
51751
|
+
val = true;
|
51752
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
51753
|
+
val = false;
|
51754
|
+
} else if (val === "null") {
|
51755
|
+
val = null;
|
51756
|
+
} else {
|
51757
|
+
val = Number(val);
|
51758
|
+
}
|
51759
|
+
obj[prop] = val;
|
51760
|
+
return obj;
|
51761
|
+
}, {});
|
51762
|
+
function useColors() {
|
51763
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
51764
|
+
}
|
51765
|
+
function formatArgs(args) {
|
51766
|
+
const { namespace: name, useColors: useColors2 } = this;
|
51767
|
+
if (useColors2) {
|
51768
|
+
const c = this.color;
|
51769
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
51770
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
51771
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
51772
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
51773
|
+
} else {
|
51774
|
+
args[0] = getDate() + name + " " + args[0];
|
51775
|
+
}
|
51776
|
+
}
|
51777
|
+
function getDate() {
|
51778
|
+
if (exports.inspectOpts.hideDate) {
|
51779
|
+
return "";
|
51780
|
+
}
|
51781
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
51782
|
+
}
|
51783
|
+
function log(...args) {
|
51784
|
+
return process.stderr.write(util.format(...args) + "\n");
|
51785
|
+
}
|
51786
|
+
function save(namespaces) {
|
51787
|
+
if (namespaces) {
|
51788
|
+
process.env.DEBUG = namespaces;
|
51789
|
+
} else {
|
51790
|
+
delete process.env.DEBUG;
|
51791
|
+
}
|
51792
|
+
}
|
51793
|
+
function load() {
|
51794
|
+
return process.env.DEBUG;
|
51795
|
+
}
|
51796
|
+
function init(debug) {
|
51797
|
+
debug.inspectOpts = {};
|
51798
|
+
const keys = Object.keys(exports.inspectOpts);
|
51799
|
+
for (let i = 0; i < keys.length; i++) {
|
51800
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
51801
|
+
}
|
51802
|
+
}
|
51803
|
+
module2.exports = require_common2()(exports);
|
51804
|
+
var { formatters } = module2.exports;
|
51805
|
+
formatters.o = function(v) {
|
51806
|
+
this.inspectOpts.colors = this.useColors;
|
51807
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
51808
|
+
};
|
51809
|
+
formatters.O = function(v) {
|
51810
|
+
this.inspectOpts.colors = this.useColors;
|
51811
|
+
return util.inspect(v, this.inspectOpts);
|
51812
|
+
};
|
51813
|
+
}
|
51814
|
+
});
|
51815
|
+
|
51816
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js
|
51817
|
+
var require_src3 = __commonJS({
|
51818
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js"(exports, module2) {
|
51819
|
+
"use strict";
|
51820
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
51821
|
+
module2.exports = require_browser();
|
51822
|
+
} else {
|
51823
|
+
module2.exports = require_node2();
|
51824
|
+
}
|
51825
|
+
}
|
51826
|
+
});
|
51827
|
+
|
51828
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/utils/get-type.js
|
51829
|
+
var require_get_type = __commonJS({
|
51830
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/utils/get-type.js"(exports) {
|
51831
|
+
"use strict";
|
51832
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
51833
|
+
function isBuffer(obj) {
|
51834
|
+
return !!(obj !== null && obj !== void 0 && (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
|
51835
|
+
obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj)));
|
51836
|
+
}
|
51837
|
+
var getType2 = function(val) {
|
51838
|
+
switch (Object.prototype.toString.call(val)) {
|
51839
|
+
case "[object Date]":
|
51840
|
+
return "date";
|
51841
|
+
case "[object RegExp]":
|
51842
|
+
return "regexp";
|
51843
|
+
case "[object Arguments]":
|
51844
|
+
return "arguments";
|
51845
|
+
case "[object Array]":
|
51846
|
+
return "array";
|
51847
|
+
case "[object Error]":
|
51848
|
+
return "error";
|
51849
|
+
}
|
51850
|
+
if (val === null)
|
51851
|
+
return "null";
|
51852
|
+
if (val === void 0)
|
51853
|
+
return "undefined";
|
51854
|
+
if (val !== val)
|
51855
|
+
return "nan";
|
51856
|
+
if (val && val.nodeType === 1)
|
51857
|
+
return "element";
|
51858
|
+
if (isBuffer(val))
|
51859
|
+
return "buffer";
|
51860
|
+
val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
|
51861
|
+
return typeof val;
|
51862
|
+
};
|
51863
|
+
exports.default = getType2;
|
51864
|
+
}
|
51865
|
+
});
|
51866
|
+
|
51867
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-eql.js
|
51868
|
+
var require_mongo_eql = __commonJS({
|
51869
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-eql.js"(exports) {
|
51870
|
+
"use strict";
|
51871
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
51872
|
+
var get_type_1 = require_get_type();
|
51873
|
+
function mongoEql(matcher, val) {
|
51874
|
+
switch (get_type_1.default(matcher)) {
|
51875
|
+
case "null":
|
51876
|
+
case "undefined":
|
51877
|
+
return null === val;
|
51878
|
+
case "regexp":
|
51879
|
+
return matcher.test(val);
|
51880
|
+
case "array":
|
51881
|
+
if ("array" === get_type_1.default(val) && matcher.length === val.length) {
|
51882
|
+
for (var i = 0; i < matcher.length; i++) {
|
51883
|
+
if (!mongoEql(val[i], matcher[i]))
|
51884
|
+
return false;
|
51885
|
+
}
|
51886
|
+
return true;
|
51887
|
+
} else {
|
51888
|
+
return false;
|
51889
|
+
}
|
51890
|
+
break;
|
51891
|
+
case "object":
|
51892
|
+
var keys = {};
|
51893
|
+
for (var i in matcher) {
|
51894
|
+
if (matcher.hasOwnProperty(i)) {
|
51895
|
+
if (!val.hasOwnProperty(i) || !mongoEql(matcher[i], val[i])) {
|
51896
|
+
return false;
|
51897
|
+
}
|
51898
|
+
}
|
51899
|
+
keys[i] = true;
|
51900
|
+
}
|
51901
|
+
for (var i in val) {
|
51902
|
+
if (val.hasOwnProperty(i) && !keys.hasOwnProperty(i)) {
|
51903
|
+
return false;
|
51904
|
+
}
|
51905
|
+
}
|
51906
|
+
return true;
|
51907
|
+
default:
|
51908
|
+
return matcher === val;
|
51909
|
+
}
|
51910
|
+
}
|
51911
|
+
exports.default = mongoEql;
|
51912
|
+
}
|
51913
|
+
});
|
51914
|
+
|
51915
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/ops.js
|
51916
|
+
var require_ops = __commonJS({
|
51917
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/ops.js"(exports) {
|
51918
|
+
"use strict";
|
51919
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
51920
|
+
var mongo_eql_1 = require_mongo_eql();
|
51921
|
+
var get_type_1 = require_get_type();
|
51922
|
+
exports.$ne = function(matcher, val) {
|
51923
|
+
return !mongo_eql_1.default(matcher, val);
|
51924
|
+
};
|
51925
|
+
exports.$gt = function $gt(matcher, val) {
|
51926
|
+
return get_type_1.default(matcher) === "number" && val > matcher;
|
51927
|
+
};
|
51928
|
+
exports.$gte = function $gte(matcher, val) {
|
51929
|
+
return get_type_1.default(matcher) === "number" && val >= matcher;
|
51930
|
+
};
|
51931
|
+
exports.$lt = function $lt(matcher, val) {
|
51932
|
+
return get_type_1.default(matcher) === "number" && val < matcher;
|
51933
|
+
};
|
51934
|
+
exports.$lte = function $lte(matcher, val) {
|
51935
|
+
return get_type_1.default(matcher) === "number" && val <= matcher;
|
51936
|
+
};
|
51937
|
+
exports.$regex = function $regex(matcher, val) {
|
51938
|
+
if ("regexp" !== get_type_1.default("matcher"))
|
51939
|
+
matcher = new RegExp(matcher);
|
51940
|
+
return matcher.test(val);
|
51941
|
+
};
|
51942
|
+
exports.$exists = function $exists(matcher, val) {
|
51943
|
+
if (matcher) {
|
51944
|
+
return void 0 !== val;
|
51945
|
+
} else {
|
51946
|
+
return void 0 === val;
|
51947
|
+
}
|
51948
|
+
};
|
51949
|
+
exports.$in = function $in(matcher, val) {
|
51950
|
+
if ("array" !== get_type_1.default(matcher))
|
51951
|
+
return false;
|
51952
|
+
for (var i = 0; i < matcher.length; i++) {
|
51953
|
+
if (mongo_eql_1.default(matcher[i], val))
|
51954
|
+
return true;
|
51955
|
+
}
|
51956
|
+
return false;
|
51957
|
+
};
|
51958
|
+
exports.$nin = function $nin(matcher, val) {
|
51959
|
+
return !exports.$in(matcher, val);
|
51960
|
+
};
|
51961
|
+
exports.$size = function(matcher, val) {
|
51962
|
+
return Array.isArray(val) && matcher === val.length;
|
51963
|
+
};
|
51964
|
+
}
|
51965
|
+
});
|
51966
|
+
|
51967
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/filter.js
|
51968
|
+
var require_filter3 = __commonJS({
|
51969
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/filter.js"(exports) {
|
51970
|
+
"use strict";
|
51971
|
+
var __spreadArrays = exports && exports.__spreadArrays || function() {
|
51972
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
51973
|
+
s += arguments[i].length;
|
51974
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
51975
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
51976
|
+
r[k] = a[j];
|
51977
|
+
return r;
|
51978
|
+
};
|
51979
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
51980
|
+
var debug_1 = require_src3();
|
51981
|
+
var mongo_eql_1 = require_mongo_eql();
|
51982
|
+
var ops = require_ops();
|
51983
|
+
var get_type_1 = require_get_type();
|
51984
|
+
var debug = debug_1.default("declaration-update");
|
51985
|
+
function filter(obj, query2) {
|
51986
|
+
obj = obj || {};
|
51987
|
+
var ret = {};
|
51988
|
+
function compare(matcher, val2) {
|
51989
|
+
if ("object" !== get_type_1.default(matcher)) {
|
51990
|
+
return mongo_eql_1.default(matcher, val2);
|
51991
|
+
}
|
51992
|
+
var keys2 = Object.keys(matcher);
|
51993
|
+
if ("$" === keys2[0][0]) {
|
51994
|
+
for (var i2 = 0; i2 < keys2.length; i2++) {
|
51995
|
+
if ("$elemMatch" === keys2[i2]) {
|
51996
|
+
return false !== filter(val2, matcher.$elemMatch);
|
51997
|
+
} else {
|
51998
|
+
if (!ops[keys2[i2]](matcher[keys2[i2]], val2))
|
51999
|
+
return false;
|
52000
|
+
}
|
52001
|
+
}
|
52002
|
+
return true;
|
52003
|
+
} else {
|
52004
|
+
return mongo_eql_1.default(matcher, val2);
|
52005
|
+
}
|
52006
|
+
}
|
52007
|
+
for (var key in query2) {
|
52008
|
+
if (!query2.hasOwnProperty(key))
|
52009
|
+
continue;
|
52010
|
+
var val = query2[key];
|
52011
|
+
var keys = key.split(".");
|
52012
|
+
var target = obj;
|
52013
|
+
var prefix = void 0, search = void 0;
|
52014
|
+
var matches = [];
|
52015
|
+
walk_keys:
|
52016
|
+
for (var i = 0; i < keys.length; i++) {
|
52017
|
+
target = target[keys[i]];
|
52018
|
+
switch (get_type_1.default(target)) {
|
52019
|
+
case "array":
|
52020
|
+
prefix = keys.slice(0, i + 1).join(".");
|
52021
|
+
search = keys.slice(i + 1).join(".");
|
52022
|
+
debug('searching array "%s"', prefix);
|
52023
|
+
if (val.$size && !search.length) {
|
52024
|
+
return compare(val, target);
|
52025
|
+
}
|
52026
|
+
var subset = ret[prefix] || target;
|
52027
|
+
for (var ii = 0; ii < subset.length; ii++) {
|
52028
|
+
if (search.length) {
|
52029
|
+
var q = {};
|
52030
|
+
q[search] = val;
|
52031
|
+
if ("object" === get_type_1.default(subset[ii])) {
|
52032
|
+
debug("attempting subdoc search with query %j", q);
|
52033
|
+
if (filter(subset[ii], q)) {
|
52034
|
+
if (!ret[prefix] || !~ret[prefix].indexOf(subset[ii])) {
|
52035
|
+
matches.push(subset[ii]);
|
52036
|
+
}
|
52037
|
+
}
|
52038
|
+
}
|
52039
|
+
} else {
|
52040
|
+
debug("performing simple array item search");
|
52041
|
+
if (compare(val, subset[ii])) {
|
52042
|
+
if (!ret[prefix] || !~ret[prefix].indexOf(subset[ii])) {
|
52043
|
+
matches.push(subset[ii]);
|
52044
|
+
}
|
52045
|
+
}
|
52046
|
+
}
|
52047
|
+
}
|
52048
|
+
if (matches.length) {
|
52049
|
+
ret[prefix] = ret[prefix] || [];
|
52050
|
+
ret[prefix] = __spreadArrays(ret[prefix], matches);
|
52051
|
+
}
|
52052
|
+
break walk_keys;
|
52053
|
+
case "undefined":
|
52054
|
+
return false;
|
52055
|
+
case "object":
|
52056
|
+
if (null !== keys[i + 1] && void 0 !== keys[i + 1]) {
|
52057
|
+
continue;
|
52058
|
+
} else if (!compare(val, target)) {
|
52059
|
+
return false;
|
52060
|
+
}
|
52061
|
+
break;
|
52062
|
+
default:
|
52063
|
+
if (!compare(val, target))
|
52064
|
+
return false;
|
52065
|
+
}
|
52066
|
+
}
|
52067
|
+
}
|
52068
|
+
return ret;
|
52069
|
+
}
|
52070
|
+
exports.default = filter;
|
52071
|
+
}
|
52072
|
+
});
|
52073
|
+
|
52074
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-dot.js
|
52075
|
+
var require_mongo_dot = __commonJS({
|
52076
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mongo-core/mongo-dot.js"(exports) {
|
52077
|
+
"use strict";
|
52078
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
52079
|
+
var get_type_1 = require_get_type();
|
52080
|
+
function parent(obj, key, init) {
|
52081
|
+
if (key.includes(".")) {
|
52082
|
+
var pieces = key.split(".");
|
52083
|
+
var ret = obj;
|
52084
|
+
for (var i = 0; i < pieces.length - 1; i++) {
|
52085
|
+
if (Number(pieces[i]).toString() === pieces[i] && "array" === get_type_1.default(ret)) {
|
52086
|
+
ret = ret[pieces[i]];
|
52087
|
+
} else if ("object" === get_type_1.default(ret)) {
|
52088
|
+
if (init && !ret.hasOwnProperty(pieces[i])) {
|
52089
|
+
ret[pieces[i]] = {};
|
52090
|
+
}
|
52091
|
+
if (ret)
|
52092
|
+
ret = ret[pieces[i]];
|
52093
|
+
}
|
52094
|
+
}
|
52095
|
+
return ret;
|
52096
|
+
} else {
|
52097
|
+
return obj;
|
52098
|
+
}
|
52099
|
+
}
|
52100
|
+
exports.parent = parent;
|
52101
|
+
var get3 = function(obj, path7) {
|
52102
|
+
if (path7.includes(".")) {
|
52103
|
+
var par = parent(obj, path7);
|
52104
|
+
var mainKey = path7.split(".").pop();
|
52105
|
+
var t = get_type_1.default(par);
|
52106
|
+
if ("object" === t || "array" === t)
|
52107
|
+
return par[mainKey];
|
52108
|
+
} else {
|
52109
|
+
return obj[path7];
|
52110
|
+
}
|
52111
|
+
};
|
52112
|
+
exports.get = get3;
|
52113
|
+
var set = function(obj, path7, val) {
|
52114
|
+
if (path7.includes(".")) {
|
52115
|
+
var par = parent(obj, path7, true);
|
52116
|
+
var mainKey = path7.split(".").pop();
|
52117
|
+
if (par && "object" === get_type_1.default(par))
|
52118
|
+
par[mainKey] = val;
|
52119
|
+
} else {
|
52120
|
+
obj[path7] = val;
|
52121
|
+
}
|
52122
|
+
};
|
52123
|
+
exports.set = set;
|
52124
|
+
}
|
52125
|
+
});
|
52126
|
+
|
52127
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mods.js
|
52128
|
+
var require_mods = __commonJS({
|
52129
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/mods.js"(exports) {
|
52130
|
+
"use strict";
|
52131
|
+
var __spreadArrays = exports && exports.__spreadArrays || function() {
|
52132
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
52133
|
+
s += arguments[i].length;
|
52134
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
52135
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
52136
|
+
r[k] = a[j];
|
52137
|
+
return r;
|
52138
|
+
};
|
52139
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
52140
|
+
var debug_1 = require_src3();
|
52141
|
+
var mongoDot = require_mongo_dot();
|
52142
|
+
var mongo_eql_1 = require_mongo_eql();
|
52143
|
+
var get_type_1 = require_get_type();
|
52144
|
+
var debug = debug_1.default("mongo-query");
|
52145
|
+
function numeric(val) {
|
52146
|
+
return "number" === get_type_1.default(val) || Number(val) === val;
|
52147
|
+
}
|
52148
|
+
function has2(array, val) {
|
52149
|
+
for (var i = 0, l = array.length; i < l; i++) {
|
52150
|
+
if (mongo_eql_1.default(val, array[i]))
|
52151
|
+
return true;
|
52152
|
+
}
|
52153
|
+
return false;
|
52154
|
+
}
|
52155
|
+
function pull(arr, vals, pulled) {
|
52156
|
+
var indexes = [];
|
52157
|
+
for (var a = 0; a < arr.length; a++) {
|
52158
|
+
var val = arr[a];
|
52159
|
+
for (var i = 0; i < vals.length; i++) {
|
52160
|
+
var matcher = vals[i];
|
52161
|
+
if ("object" === get_type_1.default(matcher)) {
|
52162
|
+
if ("object" === get_type_1.default(val)) {
|
52163
|
+
var match = false;
|
52164
|
+
if (Object.keys(matcher).length) {
|
52165
|
+
for (var i_1 in matcher) {
|
52166
|
+
if (matcher.hasOwnProperty(i_1)) {
|
52167
|
+
if (mongo_eql_1.default(matcher[i_1], val[i_1])) {
|
52168
|
+
match = true;
|
52169
|
+
} else {
|
52170
|
+
match = false;
|
52171
|
+
break;
|
52172
|
+
}
|
52173
|
+
}
|
52174
|
+
}
|
52175
|
+
} else if (!Object.keys(val).length) {
|
52176
|
+
match = true;
|
52177
|
+
}
|
52178
|
+
if (match) {
|
52179
|
+
indexes.push(a);
|
52180
|
+
pulled.push(val);
|
52181
|
+
continue;
|
52182
|
+
}
|
52183
|
+
} else {
|
52184
|
+
debug("ignoring pull match against object");
|
52185
|
+
}
|
52186
|
+
} else {
|
52187
|
+
if (mongo_eql_1.default(matcher, val)) {
|
52188
|
+
indexes.push(a);
|
52189
|
+
pulled.push(val);
|
52190
|
+
continue;
|
52191
|
+
}
|
52192
|
+
}
|
52193
|
+
}
|
52194
|
+
}
|
52195
|
+
return function() {
|
52196
|
+
for (var i2 = 0; i2 < indexes.length; i2++) {
|
52197
|
+
var index = indexes[i2];
|
52198
|
+
arr.splice(index - i2, 1);
|
52199
|
+
}
|
52200
|
+
};
|
52201
|
+
}
|
52202
|
+
var $set = function $set2(obj, path7, val) {
|
52203
|
+
var key = path7.split(".").pop();
|
52204
|
+
obj = mongoDot.parent(obj, path7, true);
|
52205
|
+
switch (get_type_1.default(obj)) {
|
52206
|
+
case "object":
|
52207
|
+
if (!mongo_eql_1.default(obj[key], val)) {
|
52208
|
+
return function() {
|
52209
|
+
obj[key] = val;
|
52210
|
+
return val;
|
52211
|
+
};
|
52212
|
+
}
|
52213
|
+
break;
|
52214
|
+
case "array":
|
52215
|
+
if (numeric(key)) {
|
52216
|
+
if (!mongo_eql_1.default(obj[key], val)) {
|
52217
|
+
return function() {
|
52218
|
+
obj[key] = val;
|
52219
|
+
return val;
|
52220
|
+
};
|
52221
|
+
}
|
52222
|
+
} else {
|
52223
|
+
throw new Error("can't append to array using string field name [" + key + "]");
|
52224
|
+
}
|
52225
|
+
break;
|
52226
|
+
default:
|
52227
|
+
throw new Error("$set only supports object not " + get_type_1.default(obj));
|
52228
|
+
}
|
52229
|
+
};
|
52230
|
+
exports.$set = $set;
|
52231
|
+
var $unset = function $unset2(obj, path7) {
|
52232
|
+
var key = path7.split(".").pop();
|
52233
|
+
obj = mongoDot.parent(obj, path7);
|
52234
|
+
switch (get_type_1.default(obj)) {
|
52235
|
+
case "array":
|
52236
|
+
case "object":
|
52237
|
+
if (obj.hasOwnProperty(key)) {
|
52238
|
+
return function() {
|
52239
|
+
delete obj[key];
|
52240
|
+
};
|
52241
|
+
} else {
|
52242
|
+
debug("ignoring unset of inexisting key");
|
52243
|
+
}
|
52244
|
+
}
|
52245
|
+
};
|
52246
|
+
exports.$unset = $unset;
|
52247
|
+
var $rename = function $rename2(obj, path7, newKey) {
|
52248
|
+
if (path7 === newKey) {
|
52249
|
+
throw new Error("$rename source must differ from target");
|
52250
|
+
}
|
52251
|
+
if (0 === path7.indexOf(newKey + ".")) {
|
52252
|
+
throw new Error("$rename target may not be a parent of source");
|
52253
|
+
}
|
52254
|
+
var p = mongoDot.parent(obj, path7);
|
52255
|
+
var t = get_type_1.default(p);
|
52256
|
+
if ("object" === t) {
|
52257
|
+
var key_1 = path7.split(".").pop();
|
52258
|
+
if (p.hasOwnProperty(key_1)) {
|
52259
|
+
return function() {
|
52260
|
+
var val = p[key_1];
|
52261
|
+
delete p[key_1];
|
52262
|
+
var newp = mongoDot.parent(obj, newKey, true);
|
52263
|
+
if ("object" === get_type_1.default(newp)) {
|
52264
|
+
newp[newKey.split(".").pop()] = val;
|
52265
|
+
} else {
|
52266
|
+
debug("invalid $rename target path type");
|
52267
|
+
}
|
52268
|
+
return newKey;
|
52269
|
+
};
|
52270
|
+
} else {
|
52271
|
+
debug("ignoring rename from inexisting source");
|
52272
|
+
}
|
52273
|
+
} else if ("undefined" !== t) {
|
52274
|
+
throw new Error("$rename source field invalid");
|
52275
|
+
}
|
52276
|
+
};
|
52277
|
+
exports.$rename = $rename;
|
52278
|
+
var $inc = function $inc2(obj, path7, inc) {
|
52279
|
+
if ("number" !== get_type_1.default(inc)) {
|
52280
|
+
throw new Error("Modifier $inc allowed for numbers only");
|
52281
|
+
}
|
52282
|
+
obj = mongoDot.parent(obj, path7, true);
|
52283
|
+
var key = path7.split(".").pop();
|
52284
|
+
switch (get_type_1.default(obj)) {
|
52285
|
+
case "array":
|
52286
|
+
case "object":
|
52287
|
+
if (obj.hasOwnProperty(key)) {
|
52288
|
+
if ("number" !== get_type_1.default(obj[key])) {
|
52289
|
+
throw new Error("Cannot apply $inc modifier to non-number");
|
52290
|
+
}
|
52291
|
+
return function() {
|
52292
|
+
obj[key] += inc;
|
52293
|
+
return inc;
|
52294
|
+
};
|
52295
|
+
} else if ("object" === get_type_1.default(obj) || numeric(key)) {
|
52296
|
+
return function() {
|
52297
|
+
obj[key] = inc;
|
52298
|
+
return inc;
|
52299
|
+
};
|
52300
|
+
} else {
|
52301
|
+
throw new Error("can't append to array using string field name [" + key + "]");
|
52302
|
+
}
|
52303
|
+
break;
|
52304
|
+
default:
|
52305
|
+
throw new Error("Cannot apply $inc modifier to non-number");
|
52306
|
+
}
|
52307
|
+
};
|
52308
|
+
exports.$inc = $inc;
|
52309
|
+
var $pop = function $pop2(obj, path7, val) {
|
52310
|
+
obj = mongoDot.parent(obj, path7);
|
52311
|
+
var key = path7.split(".").pop();
|
52312
|
+
switch (get_type_1.default(obj)) {
|
52313
|
+
case "array":
|
52314
|
+
case "object":
|
52315
|
+
if (obj.hasOwnProperty(key)) {
|
52316
|
+
switch (get_type_1.default(obj[key])) {
|
52317
|
+
case "array":
|
52318
|
+
if (obj[key].length) {
|
52319
|
+
return function() {
|
52320
|
+
if (-1 === val) {
|
52321
|
+
return obj[key].shift();
|
52322
|
+
} else {
|
52323
|
+
return obj[key].pop();
|
52324
|
+
}
|
52325
|
+
};
|
52326
|
+
}
|
52327
|
+
break;
|
52328
|
+
case "undefined":
|
52329
|
+
debug("ignoring pop to inexisting key");
|
52330
|
+
break;
|
52331
|
+
default:
|
52332
|
+
throw new Error("Cannot apply $pop modifier to non-array");
|
52333
|
+
}
|
52334
|
+
} else {
|
52335
|
+
debug("ignoring pop to inexisting key");
|
52336
|
+
}
|
52337
|
+
break;
|
52338
|
+
case "undefined":
|
52339
|
+
debug("ignoring pop to inexisting key");
|
52340
|
+
break;
|
52341
|
+
}
|
52342
|
+
};
|
52343
|
+
exports.$pop = $pop;
|
52344
|
+
var $push = function $push2(obj, path7, val) {
|
52345
|
+
obj = mongoDot.parent(obj, path7, true);
|
52346
|
+
var key = path7.split(".").pop();
|
52347
|
+
switch (get_type_1.default(obj)) {
|
52348
|
+
case "object":
|
52349
|
+
if (obj.hasOwnProperty(key)) {
|
52350
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52351
|
+
return function() {
|
52352
|
+
obj[key].push(val);
|
52353
|
+
return val;
|
52354
|
+
};
|
52355
|
+
} else {
|
52356
|
+
throw new Error("Cannot apply $push/$pushAll modifier to non-array");
|
52357
|
+
}
|
52358
|
+
} else {
|
52359
|
+
return function() {
|
52360
|
+
obj[key] = [val];
|
52361
|
+
return val;
|
52362
|
+
};
|
52363
|
+
}
|
52364
|
+
break;
|
52365
|
+
case "array":
|
52366
|
+
if (obj.hasOwnProperty(key)) {
|
52367
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52368
|
+
return function() {
|
52369
|
+
obj[key].push(val);
|
52370
|
+
return val;
|
52371
|
+
};
|
52372
|
+
} else {
|
52373
|
+
throw new Error("Cannot apply $push/$pushAll modifier to non-array");
|
52374
|
+
}
|
52375
|
+
} else if (numeric(key)) {
|
52376
|
+
return function() {
|
52377
|
+
obj[key] = [val];
|
52378
|
+
return val;
|
52379
|
+
};
|
52380
|
+
} else {
|
52381
|
+
throw new Error("can't append to array using string field name [" + key + "]");
|
52382
|
+
}
|
52383
|
+
break;
|
52384
|
+
}
|
52385
|
+
};
|
52386
|
+
exports.$push = $push;
|
52387
|
+
var $pushAll = function $pushAll2(obj, path7, val) {
|
52388
|
+
if ("array" !== get_type_1.default(val)) {
|
52389
|
+
throw new Error("Modifier $pushAll/pullAll allowed for arrays only");
|
52390
|
+
}
|
52391
|
+
obj = mongoDot.parent(obj, path7, true);
|
52392
|
+
var key = path7.split(".").pop();
|
52393
|
+
switch (get_type_1.default(obj)) {
|
52394
|
+
case "object":
|
52395
|
+
if (obj.hasOwnProperty(key)) {
|
52396
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52397
|
+
return function() {
|
52398
|
+
obj[key] = __spreadArrays(obj[key], val);
|
52399
|
+
return val;
|
52400
|
+
};
|
52401
|
+
} else {
|
52402
|
+
throw new Error("Cannot apply $push/$pushAll modifier to non-array");
|
52403
|
+
}
|
52404
|
+
} else {
|
52405
|
+
return function() {
|
52406
|
+
obj[key] = val;
|
52407
|
+
return val;
|
52408
|
+
};
|
52409
|
+
}
|
52410
|
+
break;
|
52411
|
+
case "array":
|
52412
|
+
if (obj.hasOwnProperty(key)) {
|
52413
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52414
|
+
return function() {
|
52415
|
+
obj[key] = __spreadArrays(obj[key], val);
|
52416
|
+
return val;
|
52417
|
+
};
|
52418
|
+
} else {
|
52419
|
+
throw new Error("Cannot apply $push/$pushAll modifier to non-array");
|
52420
|
+
}
|
52421
|
+
} else if (numeric(key)) {
|
52422
|
+
return function() {
|
52423
|
+
obj[key] = val;
|
52424
|
+
return val;
|
52425
|
+
};
|
52426
|
+
} else {
|
52427
|
+
throw new Error("can't append to array using string field name [" + key + "]");
|
52428
|
+
}
|
52429
|
+
break;
|
52430
|
+
}
|
52431
|
+
};
|
52432
|
+
exports.$pushAll = $pushAll;
|
52433
|
+
var $pull = function $pull2(obj, path7, val) {
|
52434
|
+
obj = mongoDot.parent(obj, path7, true);
|
52435
|
+
var key = path7.split(".").pop();
|
52436
|
+
var t = get_type_1.default(obj);
|
52437
|
+
switch (t) {
|
52438
|
+
case "object":
|
52439
|
+
if (obj.hasOwnProperty(key)) {
|
52440
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52441
|
+
var pulled_1 = [];
|
52442
|
+
var splice_1 = pull(obj[key], [val], pulled_1);
|
52443
|
+
if (pulled_1.length) {
|
52444
|
+
return function() {
|
52445
|
+
splice_1();
|
52446
|
+
return pulled_1;
|
52447
|
+
};
|
52448
|
+
}
|
52449
|
+
} else {
|
52450
|
+
throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
|
52451
|
+
}
|
52452
|
+
}
|
52453
|
+
break;
|
52454
|
+
case "array":
|
52455
|
+
if (obj.hasOwnProperty(key)) {
|
52456
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52457
|
+
var pulled_2 = [];
|
52458
|
+
var splice_2 = pull(obj[key], [val], pulled_2);
|
52459
|
+
if (pulled_2.length) {
|
52460
|
+
return function() {
|
52461
|
+
splice_2();
|
52462
|
+
return pulled_2;
|
52463
|
+
};
|
52464
|
+
}
|
52465
|
+
} else {
|
52466
|
+
throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
|
52467
|
+
}
|
52468
|
+
} else {
|
52469
|
+
debug("ignoring pull to non array");
|
52470
|
+
}
|
52471
|
+
break;
|
52472
|
+
default:
|
52473
|
+
if ("undefined" !== t) {
|
52474
|
+
throw new Error("LEFT_SUBFIELD only supports Object: hello not: " + t);
|
52475
|
+
}
|
52476
|
+
}
|
52477
|
+
};
|
52478
|
+
exports.$pull = $pull;
|
52479
|
+
var $pullAll = function $pullAll2(obj, path7, val) {
|
52480
|
+
if ("array" !== get_type_1.default(val)) {
|
52481
|
+
throw new Error("Modifier $pushAll/pullAll allowed for arrays only");
|
52482
|
+
}
|
52483
|
+
obj = mongoDot.parent(obj, path7, true);
|
52484
|
+
var key = path7.split(".").pop();
|
52485
|
+
var t = get_type_1.default(obj);
|
52486
|
+
switch (t) {
|
52487
|
+
case "object":
|
52488
|
+
if (obj.hasOwnProperty(key)) {
|
52489
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52490
|
+
var pulled_3 = [];
|
52491
|
+
var splice_3 = pull(obj[key], val, pulled_3);
|
52492
|
+
if (pulled_3.length) {
|
52493
|
+
return function() {
|
52494
|
+
splice_3();
|
52495
|
+
return pulled_3;
|
52496
|
+
};
|
52497
|
+
}
|
52498
|
+
} else {
|
52499
|
+
throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
|
52500
|
+
}
|
52501
|
+
}
|
52502
|
+
break;
|
52503
|
+
case "array":
|
52504
|
+
if (obj.hasOwnProperty(key)) {
|
52505
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52506
|
+
var pulled_4 = [];
|
52507
|
+
var splice_4 = pull(obj[key], val, pulled_4);
|
52508
|
+
if (pulled_4.length) {
|
52509
|
+
return function() {
|
52510
|
+
splice_4();
|
52511
|
+
return pulled_4;
|
52512
|
+
};
|
52513
|
+
}
|
52514
|
+
} else {
|
52515
|
+
throw new Error("Cannot apply $pull/$pullAll modifier to non-array");
|
52516
|
+
}
|
52517
|
+
} else {
|
52518
|
+
debug("ignoring pull to non array");
|
52519
|
+
}
|
52520
|
+
break;
|
52521
|
+
default:
|
52522
|
+
if ("undefined" !== t) {
|
52523
|
+
throw new Error("LEFT_SUBFIELD only supports Object: hello not: " + t);
|
52524
|
+
}
|
52525
|
+
}
|
52526
|
+
};
|
52527
|
+
exports.$pullAll = $pullAll;
|
52528
|
+
var $addToSet = function $addToSet2(obj, path7, val, recursing) {
|
52529
|
+
if (!recursing && "array" === get_type_1.default(val.$each)) {
|
52530
|
+
var fns_1 = [];
|
52531
|
+
for (var i = 0, l = val.$each.length; i < l; i++) {
|
52532
|
+
var fn = $addToSet2(obj, path7, val.$each[i], true);
|
52533
|
+
if (fn)
|
52534
|
+
fns_1.push(fn);
|
52535
|
+
}
|
52536
|
+
if (fns_1.length) {
|
52537
|
+
return function() {
|
52538
|
+
var values = [];
|
52539
|
+
for (var i2 = 0; i2 < fns_1.length; i2++)
|
52540
|
+
values.push(fns_1[i2]());
|
52541
|
+
return values;
|
52542
|
+
};
|
52543
|
+
} else {
|
52544
|
+
return;
|
52545
|
+
}
|
52546
|
+
}
|
52547
|
+
obj = mongoDot.parent(obj, path7, true);
|
52548
|
+
var key = path7.split(".").pop();
|
52549
|
+
switch (get_type_1.default(obj)) {
|
52550
|
+
case "object":
|
52551
|
+
if (obj.hasOwnProperty(key)) {
|
52552
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52553
|
+
if (!has2(obj[key], val)) {
|
52554
|
+
return function() {
|
52555
|
+
obj[key].push(val);
|
52556
|
+
return val;
|
52557
|
+
};
|
52558
|
+
}
|
52559
|
+
} else {
|
52560
|
+
throw new Error("Cannot apply $addToSet modifier to non-array");
|
52561
|
+
}
|
52562
|
+
} else {
|
52563
|
+
return function() {
|
52564
|
+
obj[key] = [val];
|
52565
|
+
return val;
|
52566
|
+
};
|
52567
|
+
}
|
52568
|
+
break;
|
52569
|
+
case "array":
|
52570
|
+
if (obj.hasOwnProperty(key)) {
|
52571
|
+
if ("array" === get_type_1.default(obj[key])) {
|
52572
|
+
if (!has2(obj[key], val)) {
|
52573
|
+
return function() {
|
52574
|
+
obj[key].push(val);
|
52575
|
+
return val;
|
52576
|
+
};
|
52577
|
+
}
|
52578
|
+
} else {
|
52579
|
+
throw new Error("Cannot apply $addToSet modifier to non-array");
|
52580
|
+
}
|
52581
|
+
} else if (numeric(key)) {
|
52582
|
+
return function() {
|
52583
|
+
obj[key] = [val];
|
52584
|
+
return val;
|
52585
|
+
};
|
52586
|
+
} else {
|
52587
|
+
throw new Error("can't append to array using string field name [" + key + "]");
|
52588
|
+
}
|
52589
|
+
break;
|
52590
|
+
}
|
52591
|
+
};
|
52592
|
+
exports.$addToSet = $addToSet;
|
52593
|
+
}
|
52594
|
+
});
|
52595
|
+
|
52596
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/query.js
|
52597
|
+
var require_query = __commonJS({
|
52598
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/query.js"(exports) {
|
52599
|
+
"use strict";
|
52600
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
52601
|
+
var debug_1 = require_src3();
|
52602
|
+
var filter_1 = require_filter3();
|
52603
|
+
var mods = require_mods();
|
52604
|
+
var mongoDot = require_mongo_dot();
|
52605
|
+
var debug = debug_1.default("declaration-update");
|
52606
|
+
function query2(obj, query3, update, opts) {
|
52607
|
+
obj = obj || {};
|
52608
|
+
opts = opts || {};
|
52609
|
+
query3 = query3 || {};
|
52610
|
+
update = update || {};
|
52611
|
+
var strict = !!opts.strict;
|
52612
|
+
var match;
|
52613
|
+
var log = [];
|
52614
|
+
if (Object.keys(query3).length !== 0) {
|
52615
|
+
match = filter_1.default(obj, query3);
|
52616
|
+
}
|
52617
|
+
if (!strict || false !== match) {
|
52618
|
+
var keys = Object.keys(update);
|
52619
|
+
var transactions = [];
|
52620
|
+
for (var i = 0, l = keys.length; i < l; i++) {
|
52621
|
+
if (mods[keys[i]]) {
|
52622
|
+
debug('found modifier "%s"', keys[i]);
|
52623
|
+
for (var key in update[keys[i]]) {
|
52624
|
+
var pos = key.indexOf(".$.");
|
52625
|
+
if (pos !== -1) {
|
52626
|
+
var prefix = key.substr(0, pos);
|
52627
|
+
var suffix = key.substr(pos + 3);
|
52628
|
+
if (match[prefix]) {
|
52629
|
+
debug('executing "%s" %s on first match within "%s"', key, keys[i], prefix);
|
52630
|
+
var fn = mods[keys[i]](match[prefix][0], suffix, update[keys[i]][key]);
|
52631
|
+
if (fn) {
|
52632
|
+
var index = mongoDot.get(obj, prefix).indexOf(match[prefix][0]);
|
52633
|
+
fn.key = prefix + "." + index + "." + suffix;
|
52634
|
+
fn.op = keys[i];
|
52635
|
+
transactions.push(fn);
|
52636
|
+
}
|
52637
|
+
} else {
|
52638
|
+
debug('ignoring "%s" %s - no matches within "%s"', key, keys[i], prefix);
|
52639
|
+
}
|
52640
|
+
} else {
|
52641
|
+
var fn = mods[keys[i]](obj, key, update[keys[i]][key]);
|
52642
|
+
if (fn) {
|
52643
|
+
fn.key = key;
|
52644
|
+
fn.op = keys[i];
|
52645
|
+
transactions.push(fn);
|
52646
|
+
}
|
52647
|
+
}
|
52648
|
+
}
|
52649
|
+
} else {
|
52650
|
+
debug('skipping unknown modifier "%s"', keys[i]);
|
52651
|
+
}
|
52652
|
+
}
|
52653
|
+
if (transactions.length) {
|
52654
|
+
for (var i = 0; i < transactions.length; i++) {
|
52655
|
+
var fn = transactions[i];
|
52656
|
+
var val = fn();
|
52657
|
+
log.push({ op: fn.op, key: fn.key, value: val });
|
52658
|
+
}
|
52659
|
+
}
|
52660
|
+
} else {
|
52661
|
+
debug("no matches for query %j", query3);
|
52662
|
+
}
|
52663
|
+
return log;
|
52664
|
+
}
|
52665
|
+
exports.default = query2;
|
52666
|
+
}
|
52667
|
+
});
|
52668
|
+
|
52669
|
+
// ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/index.js
|
52670
|
+
var require_dist = __commonJS({
|
52671
|
+
"../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/index.js"(exports) {
|
52672
|
+
"use strict";
|
52673
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
52674
|
+
var filter_1 = require_filter3();
|
52675
|
+
exports.filter = filter_1.default;
|
52676
|
+
var mods = require_mods();
|
52677
|
+
exports.mods = mods;
|
52678
|
+
var query_1 = require_query();
|
52679
|
+
exports.query = query_1.default;
|
52680
|
+
}
|
52681
|
+
});
|
52682
|
+
|
51051
52683
|
// src/index.ts
|
51052
52684
|
var src_exports = {};
|
51053
52685
|
__export(src_exports, {
|
@@ -51055,30 +52687,31 @@ __export(src_exports, {
|
|
51055
52687
|
handleTemplateFile: () => handleTemplateFile
|
51056
52688
|
});
|
51057
52689
|
module.exports = __toCommonJS(src_exports);
|
52690
|
+
var import_path7 = __toESM(require("path"));
|
51058
52691
|
|
51059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
52692
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
51060
52693
|
var import_path = __toESM(require("path"));
|
51061
52694
|
var import_utils = require("@modern-js/utils");
|
51062
52695
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
51063
52696
|
|
51064
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
52697
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
51065
52698
|
var import_utils2 = require("@modern-js/utils");
|
51066
|
-
async function fsExists(
|
52699
|
+
async function fsExists(path7) {
|
51067
52700
|
try {
|
51068
|
-
await import_utils2.fs.access(
|
52701
|
+
await import_utils2.fs.access(path7);
|
51069
52702
|
return true;
|
51070
52703
|
} catch (e) {
|
51071
52704
|
return false;
|
51072
52705
|
}
|
51073
52706
|
}
|
51074
52707
|
|
51075
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
52708
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
51076
52709
|
var import_ejs = __toESM(require_ejs());
|
51077
52710
|
function renderString(template, fullData) {
|
51078
52711
|
return import_ejs.default.render(template, fullData) || "";
|
51079
52712
|
}
|
51080
52713
|
|
51081
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
52714
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
51082
52715
|
var EjsAPI = class {
|
51083
52716
|
async renderTemplate(templateResource, target, parameters = {}) {
|
51084
52717
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -51110,7 +52743,7 @@ var EjsAPI = class {
|
|
51110
52743
|
}
|
51111
52744
|
};
|
51112
52745
|
|
51113
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
52746
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
51114
52747
|
var import_path2 = __toESM(require("path"));
|
51115
52748
|
var import_utils4 = require("@modern-js/utils");
|
51116
52749
|
var FsAPI = class {
|
@@ -51137,7 +52770,7 @@ var FsAPI = class {
|
|
51137
52770
|
}
|
51138
52771
|
};
|
51139
52772
|
|
51140
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
52773
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
51141
52774
|
var import_utils5 = require("@modern-js/utils");
|
51142
52775
|
async function canUseGit() {
|
51143
52776
|
try {
|
@@ -51212,7 +52845,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
51212
52845
|
});
|
51213
52846
|
}
|
51214
52847
|
|
51215
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
52848
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
51216
52849
|
var GitAPI = class {
|
51217
52850
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
51218
52851
|
const canUse = await canUseGit();
|
@@ -51262,7 +52895,7 @@ var GitAPI = class {
|
|
51262
52895
|
}
|
51263
52896
|
};
|
51264
52897
|
|
51265
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
52898
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
51266
52899
|
var import_handlebars = __toESM(require_lib());
|
51267
52900
|
function renderString2(template, fullData, registers) {
|
51268
52901
|
const helpers = {
|
@@ -51276,7 +52909,7 @@ function renderString2(template, fullData, registers) {
|
|
51276
52909
|
return import_handlebars.default.compile(template)(fullData) || "";
|
51277
52910
|
}
|
51278
52911
|
|
51279
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
52912
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
51280
52913
|
var HandlebarsAPI = class {
|
51281
52914
|
async registerHelp(helpers) {
|
51282
52915
|
this.registers.helpers = {
|
@@ -51324,7 +52957,7 @@ var HandlebarsAPI = class {
|
|
51324
52957
|
}
|
51325
52958
|
};
|
51326
52959
|
|
51327
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
52960
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
51328
52961
|
var import_utils8 = require("@modern-js/utils");
|
51329
52962
|
async function canUseNvm() {
|
51330
52963
|
try {
|
@@ -51374,7 +53007,7 @@ async function canUsePnpm() {
|
|
51374
53007
|
}
|
51375
53008
|
}
|
51376
53009
|
|
51377
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
53010
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
51378
53011
|
var import_utils9 = require("@modern-js/utils");
|
51379
53012
|
function execaWithStreamLog(command, args, options) {
|
51380
53013
|
const promise = (0, import_utils9.execa)(command, args, {
|
@@ -51470,7 +53103,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
51470
53103
|
throw new Error("please install pnpm first");
|
51471
53104
|
}
|
51472
53105
|
|
51473
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
53106
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
51474
53107
|
var NpmAPI = class {
|
51475
53108
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
51476
53109
|
return npmInstall({
|
@@ -52523,8 +54156,8 @@ var parseDestructorRules = function(node) {
|
|
52523
54156
|
};
|
52524
54157
|
var setInByDestructor = function(source, rules, value, mutators) {
|
52525
54158
|
rules.forEach(function(_a2) {
|
52526
|
-
var key = _a2.key,
|
52527
|
-
mutators.setIn([key], source, mutators.getIn(
|
54159
|
+
var key = _a2.key, path7 = _a2.path;
|
54160
|
+
mutators.setIn([key], source, mutators.getIn(path7, value));
|
52528
54161
|
});
|
52529
54162
|
};
|
52530
54163
|
var getInByDestructor = function(source, rules, mutators) {
|
@@ -52536,8 +54169,8 @@ var getInByDestructor = function(source, rules, mutators) {
|
|
52536
54169
|
}
|
52537
54170
|
source = isValid2(source) ? source : {};
|
52538
54171
|
rules.forEach(function(_a2) {
|
52539
|
-
var key = _a2.key,
|
52540
|
-
mutators.setIn(
|
54172
|
+
var key = _a2.key, path7 = _a2.path;
|
54173
|
+
mutators.setIn(path7, response, source[key]);
|
52541
54174
|
});
|
52542
54175
|
return response;
|
52543
54176
|
};
|
@@ -53104,8 +54737,8 @@ var Matcher = (
|
|
53104
54737
|
}
|
53105
54738
|
return false;
|
53106
54739
|
};
|
53107
|
-
Matcher2.prototype.match = function(
|
53108
|
-
this.path =
|
54740
|
+
Matcher2.prototype.match = function(path7) {
|
54741
|
+
this.path = path7;
|
53109
54742
|
return { matched: this.matchNode(this.tree), record: this.record };
|
53110
54743
|
};
|
53111
54744
|
Matcher2.matchSegments = function(source, target, record) {
|
@@ -53395,21 +55028,21 @@ var Path = (
|
|
53395
55028
|
if (_this.isMatchPattern || _this.isRegExp) {
|
53396
55029
|
throw new Error("".concat(_this.entire, " cannot be concat"));
|
53397
55030
|
}
|
53398
|
-
var
|
53399
|
-
|
55031
|
+
var path7 = new Path2("");
|
55032
|
+
path7.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
|
53400
55033
|
return parseString(s);
|
53401
55034
|
})), false));
|
53402
|
-
|
53403
|
-
return
|
55035
|
+
path7.entire = path7.segments.join(".");
|
55036
|
+
return path7;
|
53404
55037
|
};
|
53405
55038
|
this.slice = function(start, end) {
|
53406
55039
|
if (_this.isMatchPattern || _this.isRegExp) {
|
53407
55040
|
throw new Error("".concat(_this.entire, " cannot be slice"));
|
53408
55041
|
}
|
53409
|
-
var
|
53410
|
-
|
53411
|
-
|
53412
|
-
return
|
55042
|
+
var path7 = new Path2("");
|
55043
|
+
path7.segments = _this.segments.slice(start, end);
|
55044
|
+
path7.entire = path7.segments.join(".");
|
55045
|
+
return path7;
|
53413
55046
|
};
|
53414
55047
|
this.push = function() {
|
53415
55048
|
var items = [];
|
@@ -53501,8 +55134,8 @@ var Path = (
|
|
53501
55134
|
};
|
53502
55135
|
this.match = function(pattern) {
|
53503
55136
|
var _a3, _b;
|
53504
|
-
var
|
53505
|
-
var cache = _this.matchCache.get(
|
55137
|
+
var path7 = Path2.parse(pattern);
|
55138
|
+
var cache = _this.matchCache.get(path7.entire);
|
53506
55139
|
if (cache !== void 0) {
|
53507
55140
|
if (cache.record && cache.record.score !== void 0) {
|
53508
55141
|
_this.matchScore = cache.record.score;
|
@@ -53510,21 +55143,21 @@ var Path = (
|
|
53510
55143
|
return cache.matched;
|
53511
55144
|
}
|
53512
55145
|
var cacheWith = function(value) {
|
53513
|
-
_this.matchCache.set(
|
55146
|
+
_this.matchCache.set(path7.entire, value);
|
53514
55147
|
return value;
|
53515
55148
|
};
|
53516
|
-
if (
|
55149
|
+
if (path7.isMatchPattern) {
|
53517
55150
|
if (_this.isMatchPattern) {
|
53518
|
-
throw new Error("".concat(
|
55151
|
+
throw new Error("".concat(path7.entire, " cannot match ").concat(_this.entire));
|
53519
55152
|
} else {
|
53520
55153
|
_this.matchScore = 0;
|
53521
|
-
return cacheWith(
|
55154
|
+
return cacheWith(path7.match(_this.segments));
|
53522
55155
|
}
|
53523
55156
|
} else {
|
53524
55157
|
if (_this.isMatchPattern) {
|
53525
55158
|
if (_this.isRegExp) {
|
53526
55159
|
try {
|
53527
|
-
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3,
|
55160
|
+
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path7.entire);
|
53528
55161
|
} finally {
|
53529
55162
|
;
|
53530
55163
|
_this.entire.lastIndex = 0;
|
@@ -53533,14 +55166,14 @@ var Path = (
|
|
53533
55166
|
var record = {
|
53534
55167
|
score: 0
|
53535
55168
|
};
|
53536
|
-
var result = cacheWith(new Matcher(_this.tree, record).match(
|
55169
|
+
var result = cacheWith(new Matcher(_this.tree, record).match(path7.segments));
|
53537
55170
|
_this.matchScore = record.score;
|
53538
55171
|
return result.matched;
|
53539
55172
|
} else {
|
53540
55173
|
var record = {
|
53541
55174
|
score: 0
|
53542
55175
|
};
|
53543
|
-
var result = cacheWith(Matcher.matchSegments(_this.segments,
|
55176
|
+
var result = cacheWith(Matcher.matchSegments(_this.segments, path7.segments, record));
|
53544
55177
|
_this.matchScore = record.score;
|
53545
55178
|
return result.matched;
|
53546
55179
|
}
|
@@ -53616,12 +55249,12 @@ var Path = (
|
|
53616
55249
|
configurable: true
|
53617
55250
|
});
|
53618
55251
|
Path2.match = function(pattern) {
|
53619
|
-
var
|
55252
|
+
var path7 = Path2.parse(pattern);
|
53620
55253
|
var matcher = function(target) {
|
53621
|
-
return
|
55254
|
+
return path7.match(target);
|
53622
55255
|
};
|
53623
55256
|
matcher[isMatcher] = true;
|
53624
|
-
matcher.path =
|
55257
|
+
matcher.path = path7;
|
53625
55258
|
return matcher;
|
53626
55259
|
};
|
53627
55260
|
Path2.isPathPattern = function(target) {
|
@@ -53630,52 +55263,52 @@ var Path = (
|
|
53630
55263
|
Path2.transform = function(pattern, regexp, callback) {
|
53631
55264
|
return Path2.parse(pattern).transform(regexp, callback);
|
53632
55265
|
};
|
53633
|
-
Path2.parse = function(
|
53634
|
-
if (
|
53635
|
-
|
55266
|
+
Path2.parse = function(path7, base) {
|
55267
|
+
if (path7 === void 0) {
|
55268
|
+
path7 = "";
|
53636
55269
|
}
|
53637
|
-
if (
|
53638
|
-
var found = pathCache.get(
|
55270
|
+
if (path7 instanceof Path2) {
|
55271
|
+
var found = pathCache.get(path7.entire);
|
53639
55272
|
if (found) {
|
53640
55273
|
return found;
|
53641
55274
|
} else {
|
53642
|
-
pathCache.set(
|
53643
|
-
return
|
55275
|
+
pathCache.set(path7.entire, path7);
|
55276
|
+
return path7;
|
53644
55277
|
}
|
53645
|
-
} else if (
|
53646
|
-
return Path2.parse(
|
55278
|
+
} else if (path7 && path7[isMatcher]) {
|
55279
|
+
return Path2.parse(path7["path"]);
|
53647
55280
|
} else {
|
53648
55281
|
var key_ = base ? Path2.parse(base) : "";
|
53649
|
-
var key = "".concat(
|
55282
|
+
var key = "".concat(path7, ":").concat(key_);
|
53650
55283
|
var found = pathCache.get(key);
|
53651
55284
|
if (found) {
|
53652
55285
|
return found;
|
53653
55286
|
} else {
|
53654
|
-
|
53655
|
-
pathCache.set(key,
|
53656
|
-
return
|
55287
|
+
path7 = new Path2(path7, base);
|
55288
|
+
pathCache.set(key, path7);
|
55289
|
+
return path7;
|
53657
55290
|
}
|
53658
55291
|
}
|
53659
55292
|
};
|
53660
55293
|
Path2.getIn = function(source, pattern) {
|
53661
|
-
var
|
53662
|
-
return
|
55294
|
+
var path7 = Path2.parse(pattern);
|
55295
|
+
return path7.getIn(source);
|
53663
55296
|
};
|
53664
55297
|
Path2.setIn = function(source, pattern, value) {
|
53665
|
-
var
|
53666
|
-
return
|
55298
|
+
var path7 = Path2.parse(pattern);
|
55299
|
+
return path7.setIn(source, value);
|
53667
55300
|
};
|
53668
55301
|
Path2.deleteIn = function(source, pattern) {
|
53669
|
-
var
|
53670
|
-
return
|
55302
|
+
var path7 = Path2.parse(pattern);
|
55303
|
+
return path7.deleteIn(source);
|
53671
55304
|
};
|
53672
55305
|
Path2.existIn = function(source, pattern, start) {
|
53673
|
-
var
|
53674
|
-
return
|
55306
|
+
var path7 = Path2.parse(pattern);
|
55307
|
+
return path7.existIn(source, start);
|
53675
55308
|
};
|
53676
55309
|
Path2.ensureIn = function(source, pattern, defaultValue) {
|
53677
|
-
var
|
53678
|
-
return
|
55310
|
+
var path7 = Path2.parse(pattern);
|
55311
|
+
return path7.ensureIn(source, defaultValue);
|
53679
55312
|
};
|
53680
55313
|
return Path2;
|
53681
55314
|
}()
|
@@ -55494,9 +57127,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
|
|
55494
57127
|
var traverse = function(target, visitor) {
|
55495
57128
|
var seenObjects = [];
|
55496
57129
|
var root = target;
|
55497
|
-
var traverse2 = function(target2,
|
55498
|
-
if (
|
55499
|
-
|
57130
|
+
var traverse2 = function(target2, path7) {
|
57131
|
+
if (path7 === void 0) {
|
57132
|
+
path7 = [];
|
55500
57133
|
}
|
55501
57134
|
if (isPlainObj(target2)) {
|
55502
57135
|
var seenIndex = seenObjects.indexOf(target2);
|
@@ -55506,15 +57139,15 @@ var traverse = function(target, visitor) {
|
|
55506
57139
|
var addIndex = seenObjects.length;
|
55507
57140
|
seenObjects.push(target2);
|
55508
57141
|
if (isNoNeedCompileObject(target2) && root !== target2) {
|
55509
|
-
visitor(target2,
|
57142
|
+
visitor(target2, path7);
|
55510
57143
|
return;
|
55511
57144
|
}
|
55512
57145
|
each(target2, function(value, key) {
|
55513
|
-
traverse2(value,
|
57146
|
+
traverse2(value, path7.concat(key));
|
55514
57147
|
});
|
55515
57148
|
seenObjects.splice(addIndex, 1);
|
55516
57149
|
} else {
|
55517
|
-
visitor(target2,
|
57150
|
+
visitor(target2, path7);
|
55518
57151
|
}
|
55519
57152
|
};
|
55520
57153
|
traverse2(target);
|
@@ -55525,24 +57158,24 @@ var traverseSchema = function(schema, visitor) {
|
|
55525
57158
|
}
|
55526
57159
|
var seenObjects = [];
|
55527
57160
|
var root = schema;
|
55528
|
-
var traverse2 = function(target,
|
57161
|
+
var traverse2 = function(target, path7) {
|
55529
57162
|
var _a2;
|
55530
|
-
if (
|
55531
|
-
|
57163
|
+
if (path7 === void 0) {
|
57164
|
+
path7 = [];
|
55532
57165
|
}
|
55533
|
-
if (
|
57166
|
+
if (path7[0] === "x-compile-omitted" || path7[0] === "x-validator" || path7[0] === "version" || path7[0] === "_isJSONSchemaObject")
|
55534
57167
|
return;
|
55535
|
-
if (String(
|
57168
|
+
if (String(path7[0]).indexOf("x-") == -1 && isFn(target))
|
55536
57169
|
return;
|
55537
|
-
if (SchemaNestedMap[
|
57170
|
+
if (SchemaNestedMap[path7[0]])
|
55538
57171
|
return;
|
55539
|
-
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(
|
55540
|
-
visitor(target,
|
57172
|
+
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path7[0])) > -1) {
|
57173
|
+
visitor(target, path7, true);
|
55541
57174
|
return;
|
55542
57175
|
}
|
55543
57176
|
if (isPlainObj(target)) {
|
55544
|
-
if (
|
55545
|
-
visitor(target,
|
57177
|
+
if (path7[0] === "default" || path7[0] === "x-value") {
|
57178
|
+
visitor(target, path7);
|
55546
57179
|
return;
|
55547
57180
|
}
|
55548
57181
|
var seenIndex = seenObjects.indexOf(target);
|
@@ -55552,15 +57185,15 @@ var traverseSchema = function(schema, visitor) {
|
|
55552
57185
|
var addIndex = seenObjects.length;
|
55553
57186
|
seenObjects.push(target);
|
55554
57187
|
if (isNoNeedCompileObject(target) && root !== target) {
|
55555
|
-
visitor(target,
|
57188
|
+
visitor(target, path7);
|
55556
57189
|
return;
|
55557
57190
|
}
|
55558
57191
|
each(target, function(value, key) {
|
55559
|
-
traverse2(value,
|
57192
|
+
traverse2(value, path7.concat(key));
|
55560
57193
|
});
|
55561
57194
|
seenObjects.splice(addIndex, 1);
|
55562
57195
|
} else {
|
55563
|
-
visitor(target,
|
57196
|
+
visitor(target, path7);
|
55564
57197
|
}
|
55565
57198
|
};
|
55566
57199
|
traverse2(schema);
|
@@ -55604,8 +57237,8 @@ var createDataSource = function(source) {
|
|
55604
57237
|
var patchStateFormSchema = function(targetState, pattern, compiled) {
|
55605
57238
|
untracked(function() {
|
55606
57239
|
var _a2;
|
55607
|
-
var
|
55608
|
-
var segments =
|
57240
|
+
var path7 = Path.parse(pattern);
|
57241
|
+
var segments = path7.segments;
|
55609
57242
|
var key = segments[0];
|
55610
57243
|
var isEnum = key === "enum" && isArr(compiled);
|
55611
57244
|
var schemaMapKey = SchemaStateMap[key];
|
@@ -55689,14 +57322,14 @@ var compile = function(source, scope) {
|
|
55689
57322
|
};
|
55690
57323
|
var patchCompile = function(targetState, sourceState, scope) {
|
55691
57324
|
traverse(sourceState, function(value, pattern) {
|
55692
|
-
var
|
57325
|
+
var path7 = Path.parse(pattern);
|
55693
57326
|
var compiled = compile(value, scope);
|
55694
|
-
var key =
|
57327
|
+
var key = path7.segments[0];
|
55695
57328
|
if (compiled === void 0)
|
55696
57329
|
return;
|
55697
57330
|
if (hasOwnProperty4.call(targetState, key)) {
|
55698
57331
|
untracked(function() {
|
55699
|
-
return Path.setIn(targetState,
|
57332
|
+
return Path.setIn(targetState, path7, compiled);
|
55700
57333
|
});
|
55701
57334
|
}
|
55702
57335
|
});
|
@@ -55705,7 +57338,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
55705
57338
|
if (demand === void 0) {
|
55706
57339
|
demand = false;
|
55707
57340
|
}
|
55708
|
-
traverseSchema(sourceSchema, function(value,
|
57341
|
+
traverseSchema(sourceSchema, function(value, path7, omitCompile) {
|
55709
57342
|
var compiled = value;
|
55710
57343
|
var collected = hasCollected(function() {
|
55711
57344
|
if (!omitCompile) {
|
@@ -55716,10 +57349,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
55716
57349
|
return;
|
55717
57350
|
if (demand) {
|
55718
57351
|
if (collected || !targetState.initialized) {
|
55719
|
-
patchStateFormSchema(targetState,
|
57352
|
+
patchStateFormSchema(targetState, path7, compiled);
|
55720
57353
|
}
|
55721
57354
|
} else {
|
55722
|
-
patchStateFormSchema(targetState,
|
57355
|
+
patchStateFormSchema(targetState, path7, compiled);
|
55723
57356
|
}
|
55724
57357
|
});
|
55725
57358
|
};
|
@@ -55908,8 +57541,8 @@ var isObjectFieldState = function(state) {
|
|
55908
57541
|
return false;
|
55909
57542
|
return (state === null || state === void 0 ? void 0 : state.displayName) === "ObjectField";
|
55910
57543
|
};
|
55911
|
-
var isQuery = function(
|
55912
|
-
return
|
57544
|
+
var isQuery = function(query2) {
|
57545
|
+
return query2 && query2 instanceof Query;
|
55913
57546
|
};
|
55914
57547
|
|
55915
57548
|
// ../../../../node_modules/.pnpm/@formily+core@2.2.24/node_modules/@formily/core/esm/models/Graph.js
|
@@ -56003,14 +57636,14 @@ var getISOCode = function(language) {
|
|
56003
57636
|
});
|
56004
57637
|
return isoCode;
|
56005
57638
|
};
|
56006
|
-
var getLocaleByPath = function(
|
57639
|
+
var getLocaleByPath = function(path7, lang) {
|
56007
57640
|
if (lang === void 0) {
|
56008
57641
|
lang = registry.locales.language;
|
56009
57642
|
}
|
56010
|
-
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(
|
57643
|
+
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path7));
|
56011
57644
|
};
|
56012
|
-
var getValidateLocale = function(
|
56013
|
-
var message = getLocaleByPath(
|
57645
|
+
var getValidateLocale = function(path7) {
|
57646
|
+
var message = getLocaleByPath(path7);
|
56014
57647
|
return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
|
56015
57648
|
};
|
56016
57649
|
var getValidateMessageTemplateEngine = function() {
|
@@ -57271,15 +58904,15 @@ var buildFieldPath = function(field) {
|
|
57271
58904
|
var buildDataPath = function(fields, pattern) {
|
57272
58905
|
var prevArray = false;
|
57273
58906
|
var segments = pattern.segments;
|
57274
|
-
var
|
57275
|
-
var currentPath =
|
58907
|
+
var path7 = segments.reduce(function(path8, key, index) {
|
58908
|
+
var currentPath = path8.concat(key);
|
57276
58909
|
var currentAddress = segments.slice(0, index + 1);
|
57277
58910
|
var current = fields[currentAddress.join(".")];
|
57278
58911
|
if (prevArray) {
|
57279
58912
|
if (!isVoidField(current)) {
|
57280
58913
|
prevArray = false;
|
57281
58914
|
}
|
57282
|
-
return
|
58915
|
+
return path8;
|
57283
58916
|
}
|
57284
58917
|
if (index >= segments.length - 1) {
|
57285
58918
|
return currentPath;
|
@@ -57291,13 +58924,13 @@ var buildDataPath = function(fields, pattern) {
|
|
57291
58924
|
prevArray = true;
|
57292
58925
|
return currentPath;
|
57293
58926
|
}
|
57294
|
-
return
|
58927
|
+
return path8;
|
57295
58928
|
} else {
|
57296
58929
|
prevArray = false;
|
57297
58930
|
}
|
57298
58931
|
return currentPath;
|
57299
58932
|
}, []);
|
57300
|
-
return new Path(
|
58933
|
+
return new Path(path7);
|
57301
58934
|
};
|
57302
58935
|
var locateNode = function(field, address) {
|
57303
58936
|
field.address = Path.parse(address);
|
@@ -57331,33 +58964,33 @@ var destroy = function(target, address, forceClear) {
|
|
57331
58964
|
field === null || field === void 0 ? void 0 : field.dispose();
|
57332
58965
|
if (isDataField(field) && forceClear) {
|
57333
58966
|
var form = field.form;
|
57334
|
-
var
|
57335
|
-
form.deleteValuesIn(
|
57336
|
-
form.deleteInitialValuesIn(
|
58967
|
+
var path7 = field.path;
|
58968
|
+
form.deleteValuesIn(path7);
|
58969
|
+
form.deleteInitialValuesIn(path7);
|
57337
58970
|
}
|
57338
58971
|
delete target[address];
|
57339
58972
|
};
|
57340
|
-
var patchFormValues = function(form,
|
57341
|
-
var update = function(
|
57342
|
-
if (
|
57343
|
-
form.setValuesIn(
|
58973
|
+
var patchFormValues = function(form, path7, source) {
|
58974
|
+
var update = function(path8, source2) {
|
58975
|
+
if (path8.length) {
|
58976
|
+
form.setValuesIn(path8, clone(source2));
|
57344
58977
|
} else {
|
57345
58978
|
Object.assign(form.values, clone(source2));
|
57346
58979
|
}
|
57347
58980
|
};
|
57348
|
-
var patch = function(source2,
|
57349
|
-
if (
|
57350
|
-
|
58981
|
+
var patch = function(source2, path8) {
|
58982
|
+
if (path8 === void 0) {
|
58983
|
+
path8 = [];
|
57351
58984
|
}
|
57352
|
-
var targetValue = form.getValuesIn(
|
57353
|
-
var targetField = form.query(
|
58985
|
+
var targetValue = form.getValuesIn(path8);
|
58986
|
+
var targetField = form.query(path8).take();
|
57354
58987
|
var isUnVoidField = targetField && !isVoidField(targetField);
|
57355
58988
|
if (isUnVoidField && targetField.display === "none") {
|
57356
58989
|
targetField.caches.value = clone(source2);
|
57357
58990
|
return;
|
57358
58991
|
}
|
57359
58992
|
if (allowAssignDefaultValue(targetValue, source2)) {
|
57360
|
-
update(
|
58993
|
+
update(path8, source2);
|
57361
58994
|
} else {
|
57362
58995
|
if (isEmpty(source2))
|
57363
58996
|
return;
|
@@ -57365,20 +58998,20 @@ var patchFormValues = function(form, path6, source) {
|
|
57365
58998
|
return;
|
57366
58999
|
if (isPlainObj(targetValue) && isPlainObj(source2)) {
|
57367
59000
|
each(source2, function(value, key) {
|
57368
|
-
patch(value,
|
59001
|
+
patch(value, path8.concat(key));
|
57369
59002
|
});
|
57370
59003
|
} else {
|
57371
59004
|
if (targetField) {
|
57372
59005
|
if (isUnVoidField && !targetField.selfModified) {
|
57373
|
-
update(
|
59006
|
+
update(path8, source2);
|
57374
59007
|
}
|
57375
59008
|
} else if (form.initialized) {
|
57376
|
-
update(
|
59009
|
+
update(path8, source2);
|
57377
59010
|
}
|
57378
59011
|
}
|
57379
59012
|
}
|
57380
59013
|
};
|
57381
|
-
patch(source,
|
59014
|
+
patch(source, path7);
|
57382
59015
|
};
|
57383
59016
|
var matchFeedback = function(search, feedback) {
|
57384
59017
|
if (!search || !feedback)
|
@@ -57801,13 +59434,13 @@ var createBatchStateSetter = function(form) {
|
|
57801
59434
|
} else if (isGeneralField(pattern)) {
|
57802
59435
|
pattern.setState(payload);
|
57803
59436
|
} else {
|
57804
|
-
var matchCount_1 = 0,
|
57805
|
-
form.query(
|
59437
|
+
var matchCount_1 = 0, path7 = Path.parse(pattern);
|
59438
|
+
form.query(path7).forEach(function(field) {
|
57806
59439
|
field.setState(payload);
|
57807
59440
|
matchCount_1++;
|
57808
59441
|
});
|
57809
|
-
if (matchCount_1 === 0 ||
|
57810
|
-
subscribeUpdate(form,
|
59442
|
+
if (matchCount_1 === 0 || path7.isWildMatchPattern) {
|
59443
|
+
subscribeUpdate(form, path7, payload);
|
57811
59444
|
}
|
57812
59445
|
}
|
57813
59446
|
});
|
@@ -60423,8 +62056,8 @@ var FieldEffects = {
|
|
60423
62056
|
};
|
60424
62057
|
var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
|
60425
62058
|
var getDependencyValue = function(field, pattern, property) {
|
60426
|
-
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0],
|
60427
|
-
return field.query(target).getIn(
|
62059
|
+
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path7 = _a2[1];
|
62060
|
+
return field.query(target).getIn(path7 || property || "value");
|
60428
62061
|
};
|
60429
62062
|
var getDependencies = function(field, dependencies) {
|
60430
62063
|
if (isArr(dependencies)) {
|
@@ -61054,10 +62687,10 @@ var Schema = (
|
|
61054
62687
|
}()
|
61055
62688
|
);
|
61056
62689
|
|
61057
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
62690
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
61058
62691
|
var import_inquirer = __toESM(require_inquirer());
|
61059
62692
|
|
61060
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
62693
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
61061
62694
|
var import_lodash = require("@modern-js/utils/lodash");
|
61062
62695
|
function validateSchema(schema) {
|
61063
62696
|
const { type, properties } = schema;
|
@@ -61149,7 +62782,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
61149
62782
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
61150
62783
|
}
|
61151
62784
|
|
61152
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
62785
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
61153
62786
|
var compileRule = (rule, scope) => {
|
61154
62787
|
const state = Schema.compile(rule, {
|
61155
62788
|
$self: {},
|
@@ -61253,7 +62886,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
61253
62886
|
return answers;
|
61254
62887
|
}
|
61255
62888
|
|
61256
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
62889
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
61257
62890
|
var CLIReader = class {
|
61258
62891
|
getAnswers() {
|
61259
62892
|
return this.answers;
|
@@ -61282,7 +62915,7 @@ var CLIReader = class {
|
|
61282
62915
|
}
|
61283
62916
|
};
|
61284
62917
|
|
61285
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
62918
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
61286
62919
|
var import_utils13 = require("@modern-js/utils");
|
61287
62920
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
61288
62921
|
var import_comment_json = __toESM(require_src2());
|
@@ -61351,7 +62984,7 @@ var I18n = class {
|
|
61351
62984
|
}
|
61352
62985
|
};
|
61353
62986
|
|
61354
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
62987
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
61355
62988
|
var EN_LOCALE = {
|
61356
62989
|
environment: {
|
61357
62990
|
node_version: "please upgrade node to lts version",
|
@@ -61378,7 +63011,7 @@ var EN_LOCALE = {
|
|
61378
63011
|
}
|
61379
63012
|
};
|
61380
63013
|
|
61381
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
63014
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
61382
63015
|
var ZH_LOCALE = {
|
61383
63016
|
environment: {
|
61384
63017
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -61405,14 +63038,14 @@ var ZH_LOCALE = {
|
|
61405
63038
|
}
|
61406
63039
|
};
|
61407
63040
|
|
61408
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
63041
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
61409
63042
|
var i18n = new I18n();
|
61410
63043
|
var localeKeys = i18n.init("zh", {
|
61411
63044
|
zh: ZH_LOCALE,
|
61412
63045
|
en: EN_LOCALE
|
61413
63046
|
});
|
61414
63047
|
|
61415
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
63048
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
61416
63049
|
var import_path4 = __toESM(require("path"));
|
61417
63050
|
var import_utils12 = require("@modern-js/utils");
|
61418
63051
|
var NODE_MAJOR_VERSION_MAP = {
|
@@ -61460,7 +63093,7 @@ async function checkUseNvm(cwd, logger) {
|
|
61460
63093
|
}
|
61461
63094
|
}
|
61462
63095
|
|
61463
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
63096
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
61464
63097
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
61465
63098
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
61466
63099
|
for (const question of questions) {
|
@@ -61488,7 +63121,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
61488
63121
|
return questions;
|
61489
63122
|
}
|
61490
63123
|
|
61491
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
63124
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
61492
63125
|
var AppAPI = class {
|
61493
63126
|
async checkEnvironment(nodeVersion) {
|
61494
63127
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
@@ -61720,6 +63353,67 @@ var AppAPI = class {
|
|
61720
63353
|
}
|
61721
63354
|
};
|
61722
63355
|
|
63356
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
63357
|
+
var import_comment_json2 = __toESM(require_src2());
|
63358
|
+
var declarationUpdate = __toESM(require_dist());
|
63359
|
+
|
63360
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
63361
|
+
async function editJson(generatorCore, resource, getNewJsonValue) {
|
63362
|
+
const originJsonValue = await resource.value();
|
63363
|
+
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
63364
|
+
if (!newJsonString) {
|
63365
|
+
throw new Error("get new json string is undefined");
|
63366
|
+
}
|
63367
|
+
await generatorCore.output.fs(resource.filePath, newJsonString, {
|
63368
|
+
encoding: "utf-8"
|
63369
|
+
});
|
63370
|
+
return newJsonString;
|
63371
|
+
}
|
63372
|
+
|
63373
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
63374
|
+
var JsonAPI = class {
|
63375
|
+
async get(resource) {
|
63376
|
+
const originJsonValue = await resource.value();
|
63377
|
+
try {
|
63378
|
+
const origin = import_comment_json2.default.parse(originJsonValue.content);
|
63379
|
+
return origin;
|
63380
|
+
} catch (e) {
|
63381
|
+
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
63382
|
+
throw new Error("resource content is not a legal json");
|
63383
|
+
}
|
63384
|
+
}
|
63385
|
+
async extend(resource, obj) {
|
63386
|
+
await editJson(this.generatorCore, resource, async () => {
|
63387
|
+
const originJsonValue = await resource.value();
|
63388
|
+
try {
|
63389
|
+
const origin = import_comment_json2.default.parse(originJsonValue.content);
|
63390
|
+
const newObj = import_comment_json2.default.assign(origin, obj);
|
63391
|
+
const jsonIntent = 2;
|
63392
|
+
return import_comment_json2.default.stringify(newObj, void 0, jsonIntent);
|
63393
|
+
} catch (e) {
|
63394
|
+
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
63395
|
+
throw new Error("resource content is not a legal json");
|
63396
|
+
}
|
63397
|
+
});
|
63398
|
+
}
|
63399
|
+
async update(resource, operation) {
|
63400
|
+
await editJson(this.generatorCore, resource, (text) => {
|
63401
|
+
try {
|
63402
|
+
const jsonContent = import_comment_json2.default.parse(text);
|
63403
|
+
declarationUpdate.query(jsonContent, operation.query, operation.update);
|
63404
|
+
const jsonIntent = 2;
|
63405
|
+
return Promise.resolve(import_comment_json2.default.stringify(jsonContent, void 0, jsonIntent));
|
63406
|
+
} catch (e) {
|
63407
|
+
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
63408
|
+
throw new Error("resource content is not a legal json");
|
63409
|
+
}
|
63410
|
+
});
|
63411
|
+
}
|
63412
|
+
constructor(generatorCore) {
|
63413
|
+
this.generatorCore = generatorCore;
|
63414
|
+
}
|
63415
|
+
};
|
63416
|
+
|
61723
63417
|
// ../../../cli/plugin-i18n/dist/esm-node/index.js
|
61724
63418
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
61725
63419
|
|
@@ -61783,98 +63477,6 @@ var I18n2 = class {
|
|
61783
63477
|
}
|
61784
63478
|
};
|
61785
63479
|
|
61786
|
-
// ../../generator-common/dist/esm-node/locale/zh.js
|
61787
|
-
var ZH_LOCALE2 = {
|
61788
|
-
solution: {
|
61789
|
-
self: "请选择你想创建的工程类型",
|
61790
|
-
mwa: "Web 应用",
|
61791
|
-
module: "Npm 模块",
|
61792
|
-
custom: "自定义",
|
61793
|
-
default: "默认"
|
61794
|
-
},
|
61795
|
-
scenes: {
|
61796
|
-
self: "请选择项目场景"
|
61797
|
-
},
|
61798
|
-
sub_solution: {
|
61799
|
-
self: "请选择你想创建的工程类型",
|
61800
|
-
mwa: "Web 应用",
|
61801
|
-
module: "Npm 模块"
|
61802
|
-
},
|
61803
|
-
action: {
|
61804
|
-
self: "请选择你想要的操作",
|
61805
|
-
function: {
|
61806
|
-
self: "启用可选功能",
|
61807
|
-
question: "请选择功能名称",
|
61808
|
-
tailwindcss: "启用「Tailwind CSS」 支持",
|
61809
|
-
bff: "启用「BFF」功能",
|
61810
|
-
micro_frontend: "启用「微前端」模式",
|
61811
|
-
i18n: "启用「国际化(i18n)」功能",
|
61812
|
-
storybookV7: "启用「Storybook」V7",
|
61813
|
-
runtime_api: "启用「Runtime API」",
|
61814
|
-
ssg: "启用「SSG」功能",
|
61815
|
-
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
61816
|
-
proxy: "启用「全局代理」",
|
61817
|
-
swc: "启用「SWC 编译」",
|
61818
|
-
module_doc: "启动「模块文档」功能"
|
61819
|
-
},
|
61820
|
-
element: {
|
61821
|
-
self: "创建工程元素",
|
61822
|
-
question: "请选择创建元素类型",
|
61823
|
-
entry: "新建「应用入口」",
|
61824
|
-
server: "新建「自定义 Web Server」源码目录"
|
61825
|
-
},
|
61826
|
-
refactor: {
|
61827
|
-
self: "自动重构",
|
61828
|
-
question: "请选择重构类型",
|
61829
|
-
react_router_5: "使用 React Router v5"
|
61830
|
-
}
|
61831
|
-
},
|
61832
|
-
boolean: {
|
61833
|
-
yes: "是",
|
61834
|
-
no: "否"
|
61835
|
-
},
|
61836
|
-
language: {
|
61837
|
-
self: "请选择开发语言"
|
61838
|
-
},
|
61839
|
-
packageManager: {
|
61840
|
-
self: "请选择包管理工具"
|
61841
|
-
},
|
61842
|
-
entry: {
|
61843
|
-
name: "请填写入口名称",
|
61844
|
-
no_empty: "入口名称不能为空!",
|
61845
|
-
no_pages: '入口名称不支持 "pages"!'
|
61846
|
-
},
|
61847
|
-
packageName: {
|
61848
|
-
self: "请填写项目名称",
|
61849
|
-
sub_name: "请填写子项目名称",
|
61850
|
-
no_empty: "项目名称不能为空!"
|
61851
|
-
},
|
61852
|
-
packagePath: {
|
61853
|
-
self: "请填写子项目目录名称",
|
61854
|
-
no_empty: "目录名称不能为空!",
|
61855
|
-
format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
|
61856
|
-
},
|
61857
|
-
framework: {
|
61858
|
-
self: "请选择运行时框架",
|
61859
|
-
egg: "Egg",
|
61860
|
-
express: "Express",
|
61861
|
-
koa: "Koa",
|
61862
|
-
nest: "Nest"
|
61863
|
-
},
|
61864
|
-
bff: {
|
61865
|
-
bffType: {
|
61866
|
-
self: "请选择 BFF 类型",
|
61867
|
-
func: "函数模式",
|
61868
|
-
framework: "框架模式"
|
61869
|
-
}
|
61870
|
-
},
|
61871
|
-
buildTools: {
|
61872
|
-
self: "请选择构建工具",
|
61873
|
-
webpack: "webpack",
|
61874
|
-
rspack: "Rspack (实验性)"
|
61875
|
-
}
|
61876
|
-
};
|
61877
|
-
|
61878
63480
|
// ../../generator-common/dist/esm-node/locale/en.js
|
61879
63481
|
var EN_LOCALE2 = {
|
61880
63482
|
solution: {
|
@@ -61967,6 +63569,98 @@ var EN_LOCALE2 = {
|
|
61967
63569
|
}
|
61968
63570
|
};
|
61969
63571
|
|
63572
|
+
// ../../generator-common/dist/esm-node/locale/zh.js
|
63573
|
+
var ZH_LOCALE2 = {
|
63574
|
+
solution: {
|
63575
|
+
self: "请选择你想创建的工程类型",
|
63576
|
+
mwa: "Web 应用",
|
63577
|
+
module: "Npm 模块",
|
63578
|
+
custom: "自定义",
|
63579
|
+
default: "默认"
|
63580
|
+
},
|
63581
|
+
scenes: {
|
63582
|
+
self: "请选择项目场景"
|
63583
|
+
},
|
63584
|
+
sub_solution: {
|
63585
|
+
self: "请选择你想创建的工程类型",
|
63586
|
+
mwa: "Web 应用",
|
63587
|
+
module: "Npm 模块"
|
63588
|
+
},
|
63589
|
+
action: {
|
63590
|
+
self: "请选择你想要的操作",
|
63591
|
+
function: {
|
63592
|
+
self: "启用可选功能",
|
63593
|
+
question: "请选择功能名称",
|
63594
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
63595
|
+
bff: "启用「BFF」功能",
|
63596
|
+
micro_frontend: "启用「微前端」模式",
|
63597
|
+
i18n: "启用「国际化(i18n)」功能",
|
63598
|
+
storybookV7: "启用「Storybook」V7",
|
63599
|
+
runtime_api: "启用「Runtime API」",
|
63600
|
+
ssg: "启用「SSG」功能",
|
63601
|
+
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
63602
|
+
proxy: "启用「全局代理」",
|
63603
|
+
swc: "启用「SWC 编译」",
|
63604
|
+
module_doc: "启动「模块文档」功能"
|
63605
|
+
},
|
63606
|
+
element: {
|
63607
|
+
self: "创建工程元素",
|
63608
|
+
question: "请选择创建元素类型",
|
63609
|
+
entry: "新建「应用入口」",
|
63610
|
+
server: "新建「自定义 Web Server」源码目录"
|
63611
|
+
},
|
63612
|
+
refactor: {
|
63613
|
+
self: "自动重构",
|
63614
|
+
question: "请选择重构类型",
|
63615
|
+
react_router_5: "使用 React Router v5"
|
63616
|
+
}
|
63617
|
+
},
|
63618
|
+
boolean: {
|
63619
|
+
yes: "是",
|
63620
|
+
no: "否"
|
63621
|
+
},
|
63622
|
+
language: {
|
63623
|
+
self: "请选择开发语言"
|
63624
|
+
},
|
63625
|
+
packageManager: {
|
63626
|
+
self: "请选择包管理工具"
|
63627
|
+
},
|
63628
|
+
entry: {
|
63629
|
+
name: "请填写入口名称",
|
63630
|
+
no_empty: "入口名称不能为空!",
|
63631
|
+
no_pages: '入口名称不支持 "pages"!'
|
63632
|
+
},
|
63633
|
+
packageName: {
|
63634
|
+
self: "请填写项目名称",
|
63635
|
+
sub_name: "请填写子项目名称",
|
63636
|
+
no_empty: "项目名称不能为空!"
|
63637
|
+
},
|
63638
|
+
packagePath: {
|
63639
|
+
self: "请填写子项目目录名称",
|
63640
|
+
no_empty: "目录名称不能为空!",
|
63641
|
+
format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
|
63642
|
+
},
|
63643
|
+
framework: {
|
63644
|
+
self: "请选择运行时框架",
|
63645
|
+
egg: "Egg",
|
63646
|
+
express: "Express",
|
63647
|
+
koa: "Koa",
|
63648
|
+
nest: "Nest"
|
63649
|
+
},
|
63650
|
+
bff: {
|
63651
|
+
bffType: {
|
63652
|
+
self: "请选择 BFF 类型",
|
63653
|
+
func: "函数模式",
|
63654
|
+
framework: "框架模式"
|
63655
|
+
}
|
63656
|
+
},
|
63657
|
+
buildTools: {
|
63658
|
+
self: "请选择构建工具",
|
63659
|
+
webpack: "webpack",
|
63660
|
+
rspack: "Rspack (实验性)"
|
63661
|
+
}
|
63662
|
+
};
|
63663
|
+
|
61970
63664
|
// ../../generator-common/dist/esm-node/locale/index.js
|
61971
63665
|
var i18n2 = new I18n2();
|
61972
63666
|
var localeKeys2 = i18n2.init("en", {
|
@@ -61991,7 +63685,7 @@ var Language;
|
|
61991
63685
|
|
61992
63686
|
// ../../generator-utils/dist/esm/index.js
|
61993
63687
|
var import_path6 = __toESM(require("path"));
|
61994
|
-
var
|
63688
|
+
var import_utils16 = require("@modern-js/utils");
|
61995
63689
|
|
61996
63690
|
// ../../generator-utils/dist/esm/utils/getGeneratorPath.js
|
61997
63691
|
var import_path5 = __toESM(require("path"));
|
@@ -62009,14 +63703,15 @@ var getGeneratorPath = (generator, distTag, paths) => {
|
|
62009
63703
|
};
|
62010
63704
|
|
62011
63705
|
// ../../generator-utils/dist/esm/index.js
|
62012
|
-
var
|
63706
|
+
var import_utils17 = require("@modern-js/utils");
|
62013
63707
|
function isTsProject(appDir) {
|
62014
|
-
return
|
63708
|
+
return import_utils16.fs.existsSync(import_path6.default.join(appDir, "tsconfig.json"));
|
62015
63709
|
}
|
62016
63710
|
|
62017
63711
|
// src/index.ts
|
62018
63712
|
var handleTemplateFile = async (context, generator, appApi) => {
|
62019
63713
|
const appDir = context.materials.default.basePath;
|
63714
|
+
const jsonAPI = new JsonAPI(generator);
|
62020
63715
|
const language = isTsProject(appDir) ? Language.TS : Language.JS;
|
62021
63716
|
if (language === Language.TS) {
|
62022
63717
|
await appApi.forgeTemplate(
|
@@ -62024,6 +63719,20 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
62024
63719
|
void 0,
|
62025
63720
|
(resourceKey) => resourceKey.replace("templates/ts-template/", "")
|
62026
63721
|
);
|
63722
|
+
const tsconfigJSON = (0, import_utils17.readTsConfigByFile)(import_path7.default.join(appDir, "tsconfig.json"));
|
63723
|
+
if (!(tsconfigJSON.include || []).includes("tailwind.config.ts")) {
|
63724
|
+
await jsonAPI.update(
|
63725
|
+
context.materials.default.get(import_path7.default.join(appDir, "tsconfig.json")),
|
63726
|
+
{
|
63727
|
+
query: {},
|
63728
|
+
update: {
|
63729
|
+
$set: {
|
63730
|
+
include: [...tsconfigJSON.include || [], "tailwind.config.ts"]
|
63731
|
+
}
|
63732
|
+
}
|
63733
|
+
}
|
63734
|
+
);
|
63735
|
+
}
|
62027
63736
|
} else {
|
62028
63737
|
appApi.forgeTemplate(
|
62029
63738
|
"templates/js-template/**/*",
|