@modern-js/base-generator 3.5.0 → 3.6.0
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 +373 -380
- package/package.json +8 -8
- package/src/index.ts +0 -2
- package/templates/base-template/.gitignore.handlebars +0 -1
- package/templates/base-template/.vscode/extensions.json +2 -3
- package/templates/base-template/.vscode/settings.json +37 -26
- package/templates/base-template/biome.json +34 -0
- package/templates/base-template/.husky/pre-commit +0 -4
- package/templates/base-template/.prettierrc +0 -5
package/dist/index.js
CHANGED
|
@@ -207,8 +207,8 @@ var require_package = __commonJS({
|
|
|
207
207
|
var require_ejs = __commonJS({
|
|
208
208
|
"../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/ejs.js"(exports) {
|
|
209
209
|
"use strict";
|
|
210
|
-
var
|
|
211
|
-
var
|
|
210
|
+
var fs6 = require("fs");
|
|
211
|
+
var path4 = require("path");
|
|
212
212
|
var utils = require_utils();
|
|
213
213
|
var scopeOptionWarned = false;
|
|
214
214
|
var _VERSION_STRING = require_package().version;
|
|
@@ -235,13 +235,13 @@ var require_ejs = __commonJS({
|
|
|
235
235
|
var _BOM = /^\uFEFF/;
|
|
236
236
|
var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
237
237
|
exports.cache = utils.cache;
|
|
238
|
-
exports.fileLoader =
|
|
238
|
+
exports.fileLoader = fs6.readFileSync;
|
|
239
239
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
240
240
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
241
241
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
242
|
-
var dirname =
|
|
243
|
-
var extname =
|
|
244
|
-
var resolve =
|
|
242
|
+
var dirname = path4.dirname;
|
|
243
|
+
var extname = path4.extname;
|
|
244
|
+
var resolve = path4.resolve;
|
|
245
245
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
|
246
246
|
var ext = extname(name);
|
|
247
247
|
if (!ext) {
|
|
@@ -253,35 +253,35 @@ var require_ejs = __commonJS({
|
|
|
253
253
|
var filePath;
|
|
254
254
|
if (paths.some(function(v) {
|
|
255
255
|
filePath = exports.resolveInclude(name, v, true);
|
|
256
|
-
return
|
|
256
|
+
return fs6.existsSync(filePath);
|
|
257
257
|
})) {
|
|
258
258
|
return filePath;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
function getIncludePath(
|
|
261
|
+
function getIncludePath(path5, options) {
|
|
262
262
|
var includePath;
|
|
263
263
|
var filePath;
|
|
264
264
|
var views = options.views;
|
|
265
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(
|
|
265
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path5);
|
|
266
266
|
if (match && match.length) {
|
|
267
|
-
|
|
267
|
+
path5 = path5.replace(/^\/*/, "");
|
|
268
268
|
if (Array.isArray(options.root)) {
|
|
269
|
-
includePath = resolvePaths(
|
|
269
|
+
includePath = resolvePaths(path5, options.root);
|
|
270
270
|
} else {
|
|
271
|
-
includePath = exports.resolveInclude(
|
|
271
|
+
includePath = exports.resolveInclude(path5, options.root || "/", true);
|
|
272
272
|
}
|
|
273
273
|
} else {
|
|
274
274
|
if (options.filename) {
|
|
275
|
-
filePath = exports.resolveInclude(
|
|
276
|
-
if (
|
|
275
|
+
filePath = exports.resolveInclude(path5, options.filename);
|
|
276
|
+
if (fs6.existsSync(filePath)) {
|
|
277
277
|
includePath = filePath;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
if (!includePath && Array.isArray(views)) {
|
|
281
|
-
includePath = resolvePaths(
|
|
281
|
+
includePath = resolvePaths(path5, views);
|
|
282
282
|
}
|
|
283
283
|
if (!includePath && typeof options.includer !== "function") {
|
|
284
|
-
throw new Error('Could not find the include file "' + options.escapeFunction(
|
|
284
|
+
throw new Error('Could not find the include file "' + options.escapeFunction(path5) + '"');
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
return includePath;
|
|
@@ -340,11 +340,11 @@ var require_ejs = __commonJS({
|
|
|
340
340
|
function fileLoader(filePath) {
|
|
341
341
|
return exports.fileLoader(filePath);
|
|
342
342
|
}
|
|
343
|
-
function includeFile(
|
|
343
|
+
function includeFile(path5, options) {
|
|
344
344
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
345
|
-
opts.filename = getIncludePath(
|
|
345
|
+
opts.filename = getIncludePath(path5, opts);
|
|
346
346
|
if (typeof options.includer === "function") {
|
|
347
|
-
var includerResult = options.includer(
|
|
347
|
+
var includerResult = options.includer(path5, opts.filename);
|
|
348
348
|
if (includerResult) {
|
|
349
349
|
if (includerResult.filename) {
|
|
350
350
|
opts.filename = includerResult.filename;
|
|
@@ -579,12 +579,12 @@ var require_ejs = __commonJS({
|
|
|
579
579
|
throw e;
|
|
580
580
|
}
|
|
581
581
|
var returnedFn = opts.client ? fn : function anonymous(data) {
|
|
582
|
-
var include = function(
|
|
582
|
+
var include = function(path5, includeData) {
|
|
583
583
|
var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
|
584
584
|
if (includeData) {
|
|
585
585
|
d = utils.shallowCopy(d, includeData);
|
|
586
586
|
}
|
|
587
|
-
return includeFile(
|
|
587
|
+
return includeFile(path5, opts)(d);
|
|
588
588
|
};
|
|
589
589
|
return fn.apply(
|
|
590
590
|
opts.context,
|
|
@@ -593,7 +593,7 @@ var require_ejs = __commonJS({
|
|
|
593
593
|
};
|
|
594
594
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
595
595
|
var filename = opts.filename;
|
|
596
|
-
var basename =
|
|
596
|
+
var basename = path4.basename(filename, path4.extname(filename));
|
|
597
597
|
try {
|
|
598
598
|
Object.defineProperty(returnedFn, "name", {
|
|
599
599
|
value: basename,
|
|
@@ -1919,13 +1919,13 @@ var require_ast = __commonJS({
|
|
|
1919
1919
|
helperExpression: function helperExpression(node) {
|
|
1920
1920
|
return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
|
|
1921
1921
|
},
|
|
1922
|
-
scopedId: function scopedId(
|
|
1923
|
-
return /^\.|this\b/.test(
|
|
1922
|
+
scopedId: function scopedId(path4) {
|
|
1923
|
+
return /^\.|this\b/.test(path4.original);
|
|
1924
1924
|
},
|
|
1925
1925
|
// an ID is simple if it only has one part, and that part is not
|
|
1926
1926
|
// `..` or `this`.
|
|
1927
|
-
simpleId: function simpleId(
|
|
1928
|
-
return
|
|
1927
|
+
simpleId: function simpleId(path4) {
|
|
1928
|
+
return path4.parts.length === 1 && !AST.helpers.scopedId(path4) && !path4.depth;
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
1931
|
};
|
|
@@ -3009,12 +3009,12 @@ var require_helpers2 = __commonJS({
|
|
|
3009
3009
|
loc
|
|
3010
3010
|
};
|
|
3011
3011
|
}
|
|
3012
|
-
function prepareMustache(
|
|
3012
|
+
function prepareMustache(path4, params, hash, open, strip, locInfo) {
|
|
3013
3013
|
var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
|
|
3014
3014
|
var decorator = /\*/.test(open);
|
|
3015
3015
|
return {
|
|
3016
3016
|
type: decorator ? "Decorator" : "MustacheStatement",
|
|
3017
|
-
path:
|
|
3017
|
+
path: path4,
|
|
3018
3018
|
params,
|
|
3019
3019
|
hash,
|
|
3020
3020
|
escaped,
|
|
@@ -3285,9 +3285,9 @@ var require_compiler = __commonJS({
|
|
|
3285
3285
|
},
|
|
3286
3286
|
DecoratorBlock: function DecoratorBlock(decorator) {
|
|
3287
3287
|
var program = decorator.program && this.compileProgram(decorator.program);
|
|
3288
|
-
var params = this.setupFullMustacheParams(decorator, program, void 0),
|
|
3288
|
+
var params = this.setupFullMustacheParams(decorator, program, void 0), path4 = decorator.path;
|
|
3289
3289
|
this.useDecorators = true;
|
|
3290
|
-
this.opcode("registerDecorator", params.length,
|
|
3290
|
+
this.opcode("registerDecorator", params.length, path4.original);
|
|
3291
3291
|
},
|
|
3292
3292
|
PartialStatement: function PartialStatement(partial) {
|
|
3293
3293
|
this.usePartial = true;
|
|
@@ -3351,46 +3351,46 @@ var require_compiler = __commonJS({
|
|
|
3351
3351
|
}
|
|
3352
3352
|
},
|
|
3353
3353
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
|
3354
|
-
var
|
|
3355
|
-
this.opcode("getContext",
|
|
3354
|
+
var path4 = sexpr.path, name = path4.parts[0], isBlock = program != null || inverse != null;
|
|
3355
|
+
this.opcode("getContext", path4.depth);
|
|
3356
3356
|
this.opcode("pushProgram", program);
|
|
3357
3357
|
this.opcode("pushProgram", inverse);
|
|
3358
|
-
|
|
3359
|
-
this.accept(
|
|
3358
|
+
path4.strict = true;
|
|
3359
|
+
this.accept(path4);
|
|
3360
3360
|
this.opcode("invokeAmbiguous", name, isBlock);
|
|
3361
3361
|
},
|
|
3362
3362
|
simpleSexpr: function simpleSexpr(sexpr) {
|
|
3363
|
-
var
|
|
3364
|
-
|
|
3365
|
-
this.accept(
|
|
3363
|
+
var path4 = sexpr.path;
|
|
3364
|
+
path4.strict = true;
|
|
3365
|
+
this.accept(path4);
|
|
3366
3366
|
this.opcode("resolvePossibleLambda");
|
|
3367
3367
|
},
|
|
3368
3368
|
helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
|
3369
|
-
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
|
3369
|
+
var params = this.setupFullMustacheParams(sexpr, program, inverse), path4 = sexpr.path, name = path4.parts[0];
|
|
3370
3370
|
if (this.options.knownHelpers[name]) {
|
|
3371
3371
|
this.opcode("invokeKnownHelper", params.length, name);
|
|
3372
3372
|
} else if (this.options.knownHelpersOnly) {
|
|
3373
3373
|
throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
|
|
3374
3374
|
} else {
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
this.accept(
|
|
3378
|
-
this.opcode("invokeHelper", params.length,
|
|
3375
|
+
path4.strict = true;
|
|
3376
|
+
path4.falsy = true;
|
|
3377
|
+
this.accept(path4);
|
|
3378
|
+
this.opcode("invokeHelper", params.length, path4.original, _ast2["default"].helpers.simpleId(path4));
|
|
3379
3379
|
}
|
|
3380
3380
|
},
|
|
3381
|
-
PathExpression: function PathExpression(
|
|
3382
|
-
this.addDepth(
|
|
3383
|
-
this.opcode("getContext",
|
|
3384
|
-
var name =
|
|
3381
|
+
PathExpression: function PathExpression(path4) {
|
|
3382
|
+
this.addDepth(path4.depth);
|
|
3383
|
+
this.opcode("getContext", path4.depth);
|
|
3384
|
+
var name = path4.parts[0], scoped = _ast2["default"].helpers.scopedId(path4), blockParamId = !path4.depth && !scoped && this.blockParamIndex(name);
|
|
3385
3385
|
if (blockParamId) {
|
|
3386
|
-
this.opcode("lookupBlockParam", blockParamId,
|
|
3386
|
+
this.opcode("lookupBlockParam", blockParamId, path4.parts);
|
|
3387
3387
|
} else if (!name) {
|
|
3388
3388
|
this.opcode("pushContext");
|
|
3389
|
-
} else if (
|
|
3389
|
+
} else if (path4.data) {
|
|
3390
3390
|
this.options.data = true;
|
|
3391
|
-
this.opcode("lookupData",
|
|
3391
|
+
this.opcode("lookupData", path4.depth, path4.parts, path4.strict);
|
|
3392
3392
|
} else {
|
|
3393
|
-
this.opcode("lookupOnContext",
|
|
3393
|
+
this.opcode("lookupOnContext", path4.parts, path4.falsy, path4.strict, scoped);
|
|
3394
3394
|
}
|
|
3395
3395
|
},
|
|
3396
3396
|
StringLiteral: function StringLiteral(string) {
|
|
@@ -3744,16 +3744,16 @@ var require_util = __commonJS({
|
|
|
3744
3744
|
}
|
|
3745
3745
|
exports.urlGenerate = urlGenerate;
|
|
3746
3746
|
function normalize(aPath) {
|
|
3747
|
-
var
|
|
3747
|
+
var path4 = aPath;
|
|
3748
3748
|
var url = urlParse(aPath);
|
|
3749
3749
|
if (url) {
|
|
3750
3750
|
if (!url.path) {
|
|
3751
3751
|
return aPath;
|
|
3752
3752
|
}
|
|
3753
|
-
|
|
3753
|
+
path4 = url.path;
|
|
3754
3754
|
}
|
|
3755
|
-
var isAbsolute = exports.isAbsolute(
|
|
3756
|
-
var parts =
|
|
3755
|
+
var isAbsolute = exports.isAbsolute(path4);
|
|
3756
|
+
var parts = path4.split(/\/+/);
|
|
3757
3757
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
3758
3758
|
part = parts[i];
|
|
3759
3759
|
if (part === ".") {
|
|
@@ -3770,15 +3770,15 @@ var require_util = __commonJS({
|
|
|
3770
3770
|
}
|
|
3771
3771
|
}
|
|
3772
3772
|
}
|
|
3773
|
-
|
|
3774
|
-
if (
|
|
3775
|
-
|
|
3773
|
+
path4 = parts.join("/");
|
|
3774
|
+
if (path4 === "") {
|
|
3775
|
+
path4 = isAbsolute ? "/" : ".";
|
|
3776
3776
|
}
|
|
3777
3777
|
if (url) {
|
|
3778
|
-
url.path =
|
|
3778
|
+
url.path = path4;
|
|
3779
3779
|
return urlGenerate(url);
|
|
3780
3780
|
}
|
|
3781
|
-
return
|
|
3781
|
+
return path4;
|
|
3782
3782
|
}
|
|
3783
3783
|
exports.normalize = normalize;
|
|
3784
3784
|
function join(aRoot, aPath) {
|
|
@@ -6568,8 +6568,8 @@ var require_printer = __commonJS({
|
|
|
6568
6568
|
return this.accept(sexpr.path) + " " + params + hash;
|
|
6569
6569
|
};
|
|
6570
6570
|
PrintVisitor.prototype.PathExpression = function(id) {
|
|
6571
|
-
var
|
|
6572
|
-
return (id.data ? "@" : "") + "PATH:" +
|
|
6571
|
+
var path4 = id.parts.join("/");
|
|
6572
|
+
return (id.data ? "@" : "") + "PATH:" + path4;
|
|
6573
6573
|
};
|
|
6574
6574
|
PrintVisitor.prototype.StringLiteral = function(string) {
|
|
6575
6575
|
return '"' + string.value + '"';
|
|
@@ -6609,8 +6609,8 @@ var require_lib = __commonJS({
|
|
|
6609
6609
|
handlebars2.print = printer.print;
|
|
6610
6610
|
module2.exports = handlebars2;
|
|
6611
6611
|
function extension(module3, filename) {
|
|
6612
|
-
var
|
|
6613
|
-
var templateString =
|
|
6612
|
+
var fs6 = require("fs");
|
|
6613
|
+
var templateString = fs6.readFileSync(filename, "utf8");
|
|
6614
6614
|
module3.exports = handlebars2.compile(templateString);
|
|
6615
6615
|
}
|
|
6616
6616
|
if (typeof require !== "undefined" && require.extensions) {
|
|
@@ -8023,12 +8023,12 @@ var require_figures = __commonJS({
|
|
|
8023
8023
|
var require_separator = __commonJS({
|
|
8024
8024
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/objects/separator.js"(exports, module2) {
|
|
8025
8025
|
"use strict";
|
|
8026
|
-
var
|
|
8026
|
+
var chalk = require_chalk();
|
|
8027
8027
|
var figures = require_figures();
|
|
8028
8028
|
var Separator = class {
|
|
8029
8029
|
constructor(line) {
|
|
8030
8030
|
this.type = "separator";
|
|
8031
|
-
this.line =
|
|
8031
|
+
this.line = chalk.dim(line || new Array(15).join(figures.line));
|
|
8032
8032
|
}
|
|
8033
8033
|
/**
|
|
8034
8034
|
* Stringify separator
|
|
@@ -9444,11 +9444,11 @@ var require_baseGet = __commonJS({
|
|
|
9444
9444
|
"use strict";
|
|
9445
9445
|
var castPath = require_castPath();
|
|
9446
9446
|
var toKey = require_toKey();
|
|
9447
|
-
function baseGet(object,
|
|
9448
|
-
|
|
9449
|
-
var index = 0, length =
|
|
9447
|
+
function baseGet(object, path4) {
|
|
9448
|
+
path4 = castPath(path4, object);
|
|
9449
|
+
var index = 0, length = path4.length;
|
|
9450
9450
|
while (object != null && index < length) {
|
|
9451
|
-
object = object[toKey(
|
|
9451
|
+
object = object[toKey(path4[index++])];
|
|
9452
9452
|
}
|
|
9453
9453
|
return index && index == length ? object : void 0;
|
|
9454
9454
|
}
|
|
@@ -9461,8 +9461,8 @@ var require_get = __commonJS({
|
|
|
9461
9461
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports, module2) {
|
|
9462
9462
|
"use strict";
|
|
9463
9463
|
var baseGet = require_baseGet();
|
|
9464
|
-
function get3(object,
|
|
9465
|
-
var result = object == null ? void 0 : baseGet(object,
|
|
9464
|
+
function get3(object, path4, defaultValue) {
|
|
9465
|
+
var result = object == null ? void 0 : baseGet(object, path4);
|
|
9466
9466
|
return result === void 0 ? defaultValue : result;
|
|
9467
9467
|
}
|
|
9468
9468
|
module2.exports = get3;
|
|
@@ -9549,14 +9549,14 @@ var require_baseSet = __commonJS({
|
|
|
9549
9549
|
var isIndex = require_isIndex();
|
|
9550
9550
|
var isObject4 = require_isObject();
|
|
9551
9551
|
var toKey = require_toKey();
|
|
9552
|
-
function baseSet(object,
|
|
9552
|
+
function baseSet(object, path4, value, customizer) {
|
|
9553
9553
|
if (!isObject4(object)) {
|
|
9554
9554
|
return object;
|
|
9555
9555
|
}
|
|
9556
|
-
|
|
9557
|
-
var index = -1, length =
|
|
9556
|
+
path4 = castPath(path4, object);
|
|
9557
|
+
var index = -1, length = path4.length, lastIndex = length - 1, nested = object;
|
|
9558
9558
|
while (nested != null && ++index < length) {
|
|
9559
|
-
var key = toKey(
|
|
9559
|
+
var key = toKey(path4[index]), newValue = value;
|
|
9560
9560
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
9561
9561
|
return object;
|
|
9562
9562
|
}
|
|
@@ -9564,7 +9564,7 @@ var require_baseSet = __commonJS({
|
|
|
9564
9564
|
var objValue = nested[key];
|
|
9565
9565
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
9566
9566
|
if (newValue === void 0) {
|
|
9567
|
-
newValue = isObject4(objValue) ? objValue : isIndex(
|
|
9567
|
+
newValue = isObject4(objValue) ? objValue : isIndex(path4[index + 1]) ? [] : {};
|
|
9568
9568
|
}
|
|
9569
9569
|
}
|
|
9570
9570
|
assignValue(nested, key, newValue);
|
|
@@ -9581,8 +9581,8 @@ var require_set = __commonJS({
|
|
|
9581
9581
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js"(exports, module2) {
|
|
9582
9582
|
"use strict";
|
|
9583
9583
|
var baseSet = require_baseSet();
|
|
9584
|
-
function set(object,
|
|
9585
|
-
return object == null ? object : baseSet(object,
|
|
9584
|
+
function set(object, path4, value) {
|
|
9585
|
+
return object == null ? object : baseSet(object, path4, value);
|
|
9586
9586
|
}
|
|
9587
9587
|
module2.exports = set;
|
|
9588
9588
|
}
|
|
@@ -22203,11 +22203,11 @@ var require_hasPath = __commonJS({
|
|
|
22203
22203
|
var isIndex = require_isIndex();
|
|
22204
22204
|
var isLength = require_isLength();
|
|
22205
22205
|
var toKey = require_toKey();
|
|
22206
|
-
function hasPath(object,
|
|
22207
|
-
|
|
22208
|
-
var index = -1, length =
|
|
22206
|
+
function hasPath(object, path4, hasFunc) {
|
|
22207
|
+
path4 = castPath(path4, object);
|
|
22208
|
+
var index = -1, length = path4.length, result = false;
|
|
22209
22209
|
while (++index < length) {
|
|
22210
|
-
var key = toKey(
|
|
22210
|
+
var key = toKey(path4[index]);
|
|
22211
22211
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
22212
22212
|
break;
|
|
22213
22213
|
}
|
|
@@ -22229,8 +22229,8 @@ var require_hasIn = __commonJS({
|
|
|
22229
22229
|
"use strict";
|
|
22230
22230
|
var baseHasIn = require_baseHasIn();
|
|
22231
22231
|
var hasPath = require_hasPath();
|
|
22232
|
-
function hasIn(object,
|
|
22233
|
-
return object != null && hasPath(object,
|
|
22232
|
+
function hasIn(object, path4) {
|
|
22233
|
+
return object != null && hasPath(object, path4, baseHasIn);
|
|
22234
22234
|
}
|
|
22235
22235
|
module2.exports = hasIn;
|
|
22236
22236
|
}
|
|
@@ -22249,13 +22249,13 @@ var require_baseMatchesProperty = __commonJS({
|
|
|
22249
22249
|
var toKey = require_toKey();
|
|
22250
22250
|
var COMPARE_PARTIAL_FLAG = 1;
|
|
22251
22251
|
var COMPARE_UNORDERED_FLAG = 2;
|
|
22252
|
-
function baseMatchesProperty(
|
|
22253
|
-
if (isKey(
|
|
22254
|
-
return matchesStrictComparable(toKey(
|
|
22252
|
+
function baseMatchesProperty(path4, srcValue) {
|
|
22253
|
+
if (isKey(path4) && isStrictComparable(srcValue)) {
|
|
22254
|
+
return matchesStrictComparable(toKey(path4), srcValue);
|
|
22255
22255
|
}
|
|
22256
22256
|
return function(object) {
|
|
22257
|
-
var objValue = get3(object,
|
|
22258
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object,
|
|
22257
|
+
var objValue = get3(object, path4);
|
|
22258
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path4) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
22259
22259
|
};
|
|
22260
22260
|
}
|
|
22261
22261
|
module2.exports = baseMatchesProperty;
|
|
@@ -22280,9 +22280,9 @@ var require_basePropertyDeep = __commonJS({
|
|
|
22280
22280
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports, module2) {
|
|
22281
22281
|
"use strict";
|
|
22282
22282
|
var baseGet = require_baseGet();
|
|
22283
|
-
function basePropertyDeep(
|
|
22283
|
+
function basePropertyDeep(path4) {
|
|
22284
22284
|
return function(object) {
|
|
22285
|
-
return baseGet(object,
|
|
22285
|
+
return baseGet(object, path4);
|
|
22286
22286
|
};
|
|
22287
22287
|
}
|
|
22288
22288
|
module2.exports = basePropertyDeep;
|
|
@@ -22297,8 +22297,8 @@ var require_property = __commonJS({
|
|
|
22297
22297
|
var basePropertyDeep = require_basePropertyDeep();
|
|
22298
22298
|
var isKey = require_isKey();
|
|
22299
22299
|
var toKey = require_toKey();
|
|
22300
|
-
function property(
|
|
22301
|
-
return isKey(
|
|
22300
|
+
function property(path4) {
|
|
22301
|
+
return isKey(path4) ? baseProperty(toKey(path4)) : basePropertyDeep(path4);
|
|
22302
22302
|
}
|
|
22303
22303
|
module2.exports = property;
|
|
22304
22304
|
}
|
|
@@ -23527,15 +23527,15 @@ var require_route = __commonJS({
|
|
|
23527
23527
|
};
|
|
23528
23528
|
}
|
|
23529
23529
|
function wrapConversion(toModel, graph) {
|
|
23530
|
-
const
|
|
23530
|
+
const path4 = [graph[toModel].parent, toModel];
|
|
23531
23531
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
23532
23532
|
let cur = graph[toModel].parent;
|
|
23533
23533
|
while (graph[cur].parent) {
|
|
23534
|
-
|
|
23534
|
+
path4.unshift(graph[cur].parent);
|
|
23535
23535
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
23536
23536
|
cur = graph[cur].parent;
|
|
23537
23537
|
}
|
|
23538
|
-
fn.conversion =
|
|
23538
|
+
fn.conversion = path4;
|
|
23539
23539
|
return fn;
|
|
23540
23540
|
}
|
|
23541
23541
|
module2.exports = function(fromModel) {
|
|
@@ -25374,19 +25374,19 @@ var require_is_unicode_supported = __commonJS({
|
|
|
25374
25374
|
var require_log_symbols = __commonJS({
|
|
25375
25375
|
"../../../../node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js"(exports, module2) {
|
|
25376
25376
|
"use strict";
|
|
25377
|
-
var
|
|
25377
|
+
var chalk = require_chalk();
|
|
25378
25378
|
var isUnicodeSupported = require_is_unicode_supported();
|
|
25379
25379
|
var main = {
|
|
25380
|
-
info:
|
|
25381
|
-
success:
|
|
25382
|
-
warning:
|
|
25383
|
-
error:
|
|
25380
|
+
info: chalk.blue("ℹ"),
|
|
25381
|
+
success: chalk.green("✔"),
|
|
25382
|
+
warning: chalk.yellow("⚠"),
|
|
25383
|
+
error: chalk.red("✖")
|
|
25384
25384
|
};
|
|
25385
25385
|
var fallback = {
|
|
25386
|
-
info:
|
|
25387
|
-
success:
|
|
25388
|
-
warning:
|
|
25389
|
-
error:
|
|
25386
|
+
info: chalk.blue("i"),
|
|
25387
|
+
success: chalk.green("√"),
|
|
25388
|
+
warning: chalk.yellow("‼"),
|
|
25389
|
+
error: chalk.red("×")
|
|
25390
25390
|
};
|
|
25391
25391
|
module2.exports = isUnicodeSupported() ? main : fallback;
|
|
25392
25392
|
}
|
|
@@ -29032,7 +29032,7 @@ var require_ora = __commonJS({
|
|
|
29032
29032
|
"../../../../node_modules/.pnpm/ora@5.4.1/node_modules/ora/index.js"(exports, module2) {
|
|
29033
29033
|
"use strict";
|
|
29034
29034
|
var readline = require("readline");
|
|
29035
|
-
var
|
|
29035
|
+
var chalk = require_chalk();
|
|
29036
29036
|
var cliCursor = require_cli_cursor();
|
|
29037
29037
|
var cliSpinners = require_cli_spinners();
|
|
29038
29038
|
var logSymbols = require_log_symbols();
|
|
@@ -29229,7 +29229,7 @@ var require_ora = __commonJS({
|
|
|
29229
29229
|
const { frames } = this.spinner;
|
|
29230
29230
|
let frame = frames[this.frameIndex];
|
|
29231
29231
|
if (this.color) {
|
|
29232
|
-
frame =
|
|
29232
|
+
frame = chalk[this.color](frame);
|
|
29233
29233
|
}
|
|
29234
29234
|
this.frameIndex = ++this.frameIndex % frames.length;
|
|
29235
29235
|
const fullPrefixText = typeof this.prefixText === "string" && this.prefixText !== "" ? this.prefixText + " " : "";
|
|
@@ -29361,7 +29361,7 @@ var require_screen_manager = __commonJS({
|
|
|
29361
29361
|
var wrapAnsi = require_wrap_ansi();
|
|
29362
29362
|
var stripAnsi2 = require_strip_ansi();
|
|
29363
29363
|
var stringWidth = require_string_width();
|
|
29364
|
-
var
|
|
29364
|
+
var ora = require_ora();
|
|
29365
29365
|
function height(content) {
|
|
29366
29366
|
return content.split("\n").length;
|
|
29367
29367
|
}
|
|
@@ -29382,11 +29382,11 @@ var require_screen_manager = __commonJS({
|
|
|
29382
29382
|
let contentFunc;
|
|
29383
29383
|
let bottomContentFunc;
|
|
29384
29384
|
if (bottomContent) {
|
|
29385
|
-
spinner =
|
|
29385
|
+
spinner = ora(bottomContent);
|
|
29386
29386
|
contentFunc = () => content;
|
|
29387
29387
|
bottomContentFunc = () => spinner.frame();
|
|
29388
29388
|
} else {
|
|
29389
|
-
spinner =
|
|
29389
|
+
spinner = ora(content);
|
|
29390
29390
|
contentFunc = () => spinner.frame();
|
|
29391
29391
|
bottomContentFunc = () => "";
|
|
29392
29392
|
}
|
|
@@ -29482,7 +29482,7 @@ var require_base3 = __commonJS({
|
|
|
29482
29482
|
defaults: require_defaults(),
|
|
29483
29483
|
clone: require_clone()
|
|
29484
29484
|
};
|
|
29485
|
-
var
|
|
29485
|
+
var chalk = require_chalk();
|
|
29486
29486
|
var runAsync = require_run_async();
|
|
29487
29487
|
var { filter, flatMap, share, take, takeUntil } = require_operators();
|
|
29488
29488
|
var Choices = require_choices();
|
|
@@ -29500,7 +29500,7 @@ var require_base3 = __commonJS({
|
|
|
29500
29500
|
filteringText: "",
|
|
29501
29501
|
when: () => true,
|
|
29502
29502
|
suffix: "",
|
|
29503
|
-
prefix:
|
|
29503
|
+
prefix: chalk.green("?")
|
|
29504
29504
|
});
|
|
29505
29505
|
if (!this.opt.name) {
|
|
29506
29506
|
this.throwParamError("name");
|
|
@@ -29601,12 +29601,12 @@ var require_base3 = __commonJS({
|
|
|
29601
29601
|
* @return {String} prompt question string
|
|
29602
29602
|
*/
|
|
29603
29603
|
getQuestion() {
|
|
29604
|
-
let message = (this.opt.prefix ? this.opt.prefix + " " : "") +
|
|
29604
|
+
let message = (this.opt.prefix ? this.opt.prefix + " " : "") + chalk.bold(this.opt.message) + this.opt.suffix + chalk.reset(" ");
|
|
29605
29605
|
if (this.opt.default != null && this.status !== "touched" && this.status !== "answered") {
|
|
29606
29606
|
if (this.opt.type === "password") {
|
|
29607
|
-
message +=
|
|
29607
|
+
message += chalk.italic.dim("[hidden] ");
|
|
29608
29608
|
} else {
|
|
29609
|
-
message +=
|
|
29609
|
+
message += chalk.dim("(" + this.opt.default + ") ");
|
|
29610
29610
|
}
|
|
29611
29611
|
}
|
|
29612
29612
|
return message;
|
|
@@ -29668,7 +29668,7 @@ var require_events = __commonJS({
|
|
|
29668
29668
|
var require_paginator = __commonJS({
|
|
29669
29669
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/utils/paginator.js"(exports, module2) {
|
|
29670
29670
|
"use strict";
|
|
29671
|
-
var
|
|
29671
|
+
var chalk = require_chalk();
|
|
29672
29672
|
var Paginator = class {
|
|
29673
29673
|
/**
|
|
29674
29674
|
* @param {import("./screen-manager")} [screen]
|
|
@@ -29693,7 +29693,7 @@ var require_paginator = __commonJS({
|
|
|
29693
29693
|
}
|
|
29694
29694
|
const visibleLines = this.isInfinite ? this.getInfiniteLines(lines, active, pageSize) : this.getFiniteLines(lines, active, pageSize);
|
|
29695
29695
|
this.lastIndex = active;
|
|
29696
|
-
return visibleLines.join("\n") + "\n" +
|
|
29696
|
+
return visibleLines.join("\n") + "\n" + chalk.dim("(Move up and down to reveal more choices)");
|
|
29697
29697
|
}
|
|
29698
29698
|
getInfiniteLines(lines, active, pageSize) {
|
|
29699
29699
|
if (this.pointer === void 0) {
|
|
@@ -29750,7 +29750,7 @@ var require_incrementListIndex = __commonJS({
|
|
|
29750
29750
|
var require_list = __commonJS({
|
|
29751
29751
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/list.js"(exports, module2) {
|
|
29752
29752
|
"use strict";
|
|
29753
|
-
var
|
|
29753
|
+
var chalk = require_chalk();
|
|
29754
29754
|
var figures = require_figures();
|
|
29755
29755
|
var cliCursor = require_cli_cursor();
|
|
29756
29756
|
var runAsync = require_run_async();
|
|
@@ -29808,10 +29808,10 @@ var require_list = __commonJS({
|
|
|
29808
29808
|
render() {
|
|
29809
29809
|
let message = this.getQuestion();
|
|
29810
29810
|
if (this.firstRender) {
|
|
29811
|
-
message +=
|
|
29811
|
+
message += chalk.dim("(Use arrow keys)");
|
|
29812
29812
|
}
|
|
29813
29813
|
if (this.status === "answered") {
|
|
29814
|
-
message +=
|
|
29814
|
+
message += chalk.cyan(this.opt.choices.getChoice(this.selected).short);
|
|
29815
29815
|
} else {
|
|
29816
29816
|
const choicesStr = listRender(this.opt.choices, this.selected);
|
|
29817
29817
|
const indexPosition = this.opt.choices.indexOf(
|
|
@@ -29886,7 +29886,7 @@ var require_list = __commonJS({
|
|
|
29886
29886
|
const isSelected = i - separatorOffset === pointer;
|
|
29887
29887
|
let line = (isSelected ? figures.pointer + " " : " ") + choice.name;
|
|
29888
29888
|
if (isSelected) {
|
|
29889
|
-
line =
|
|
29889
|
+
line = chalk.cyan(line);
|
|
29890
29890
|
}
|
|
29891
29891
|
output2 += line + " \n";
|
|
29892
29892
|
});
|
|
@@ -29900,7 +29900,7 @@ var require_list = __commonJS({
|
|
|
29900
29900
|
var require_input = __commonJS({
|
|
29901
29901
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/input.js"(exports, module2) {
|
|
29902
29902
|
"use strict";
|
|
29903
|
-
var
|
|
29903
|
+
var chalk = require_chalk();
|
|
29904
29904
|
var { map: map2, takeUntil } = require_operators();
|
|
29905
29905
|
var Base = require_base3();
|
|
29906
29906
|
var observe2 = require_events();
|
|
@@ -29939,10 +29939,10 @@ var require_input = __commonJS({
|
|
|
29939
29939
|
if (transformer) {
|
|
29940
29940
|
message += transformer(appendContent, this.answers, { isFinal });
|
|
29941
29941
|
} else {
|
|
29942
|
-
message += isFinal ?
|
|
29942
|
+
message += isFinal ? chalk.cyan(appendContent) : appendContent;
|
|
29943
29943
|
}
|
|
29944
29944
|
if (error) {
|
|
29945
|
-
bottomContent =
|
|
29945
|
+
bottomContent = chalk.red(">> ") + error;
|
|
29946
29946
|
}
|
|
29947
29947
|
this.screen.render(message, bottomContent);
|
|
29948
29948
|
}
|
|
@@ -30004,7 +30004,7 @@ var require_number = __commonJS({
|
|
|
30004
30004
|
var require_confirm = __commonJS({
|
|
30005
30005
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/confirm.js"(exports, module2) {
|
|
30006
30006
|
"use strict";
|
|
30007
|
-
var
|
|
30007
|
+
var chalk = require_chalk();
|
|
30008
30008
|
var { take, takeUntil } = require_operators();
|
|
30009
30009
|
var Base = require_base3();
|
|
30010
30010
|
var observe2 = require_events();
|
|
@@ -30046,7 +30046,7 @@ var require_confirm = __commonJS({
|
|
|
30046
30046
|
render(answer) {
|
|
30047
30047
|
let message = this.getQuestion();
|
|
30048
30048
|
if (typeof answer === "boolean") {
|
|
30049
|
-
message +=
|
|
30049
|
+
message += chalk.cyan(answer ? "Yes" : "No");
|
|
30050
30050
|
} else {
|
|
30051
30051
|
message += this.rl.line;
|
|
30052
30052
|
}
|
|
@@ -30078,7 +30078,7 @@ var require_confirm = __commonJS({
|
|
|
30078
30078
|
var require_rawlist = __commonJS({
|
|
30079
30079
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/rawlist.js"(exports, module2) {
|
|
30080
30080
|
"use strict";
|
|
30081
|
-
var
|
|
30081
|
+
var chalk = require_chalk();
|
|
30082
30082
|
var { map: map2, takeUntil } = require_operators();
|
|
30083
30083
|
var Base = require_base3();
|
|
30084
30084
|
var Separator = require_separator();
|
|
@@ -30141,7 +30141,7 @@ var require_rawlist = __commonJS({
|
|
|
30141
30141
|
let message = this.getQuestion();
|
|
30142
30142
|
let bottomContent = "";
|
|
30143
30143
|
if (this.status === "answered") {
|
|
30144
|
-
message +=
|
|
30144
|
+
message += chalk.cyan(this.opt.choices.getChoice(this.selected).short);
|
|
30145
30145
|
} else {
|
|
30146
30146
|
const choicesStr = renderChoices(this.opt.choices, this.selected);
|
|
30147
30147
|
message += "\n" + this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize);
|
|
@@ -30149,7 +30149,7 @@ var require_rawlist = __commonJS({
|
|
|
30149
30149
|
}
|
|
30150
30150
|
message += this.rl.line;
|
|
30151
30151
|
if (error) {
|
|
30152
|
-
bottomContent = "\n" +
|
|
30152
|
+
bottomContent = "\n" + chalk.red(">> ") + error;
|
|
30153
30153
|
}
|
|
30154
30154
|
this.screen.render(message, bottomContent);
|
|
30155
30155
|
}
|
|
@@ -30232,7 +30232,7 @@ var require_rawlist = __commonJS({
|
|
|
30232
30232
|
const index = i - separatorOffset;
|
|
30233
30233
|
let display = index + 1 + ") " + choice.name;
|
|
30234
30234
|
if (index === pointer) {
|
|
30235
|
-
display =
|
|
30235
|
+
display = chalk.cyan(display);
|
|
30236
30236
|
}
|
|
30237
30237
|
output2 += display;
|
|
30238
30238
|
});
|
|
@@ -30246,7 +30246,7 @@ var require_rawlist = __commonJS({
|
|
|
30246
30246
|
var require_expand2 = __commonJS({
|
|
30247
30247
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/expand.js"(exports, module2) {
|
|
30248
30248
|
"use strict";
|
|
30249
|
-
var
|
|
30249
|
+
var chalk = require_chalk();
|
|
30250
30250
|
var { map: map2, takeUntil } = require_operators();
|
|
30251
30251
|
var Base = require_base3();
|
|
30252
30252
|
var Separator = require_separator();
|
|
@@ -30298,7 +30298,7 @@ var require_expand2 = __commonJS({
|
|
|
30298
30298
|
let message = this.getQuestion();
|
|
30299
30299
|
let bottomContent = "";
|
|
30300
30300
|
if (this.status === "answered") {
|
|
30301
|
-
message +=
|
|
30301
|
+
message += chalk.cyan(this.answer);
|
|
30302
30302
|
} else if (this.status === "expanded") {
|
|
30303
30303
|
const choicesStr = renderChoices(this.opt.choices, this.selectedKey);
|
|
30304
30304
|
message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize);
|
|
@@ -30306,10 +30306,10 @@ var require_expand2 = __commonJS({
|
|
|
30306
30306
|
}
|
|
30307
30307
|
message += this.rl.line;
|
|
30308
30308
|
if (error) {
|
|
30309
|
-
bottomContent =
|
|
30309
|
+
bottomContent = chalk.red(">> ") + error;
|
|
30310
30310
|
}
|
|
30311
30311
|
if (hint) {
|
|
30312
|
-
bottomContent =
|
|
30312
|
+
bottomContent = chalk.cyan(">> ") + hint;
|
|
30313
30313
|
}
|
|
30314
30314
|
this.screen.render(message, bottomContent);
|
|
30315
30315
|
}
|
|
@@ -30337,7 +30337,7 @@ var require_expand2 = __commonJS({
|
|
|
30337
30337
|
}
|
|
30338
30338
|
let choiceStr = choice.key + ") " + choice.name;
|
|
30339
30339
|
if (this.selectedKey === choice.key) {
|
|
30340
|
-
choiceStr =
|
|
30340
|
+
choiceStr = chalk.cyan(choiceStr);
|
|
30341
30341
|
}
|
|
30342
30342
|
output2 += choiceStr;
|
|
30343
30343
|
});
|
|
@@ -30439,7 +30439,7 @@ var require_expand2 = __commonJS({
|
|
|
30439
30439
|
}
|
|
30440
30440
|
let choiceStr = choice.key + ") " + choice.name;
|
|
30441
30441
|
if (pointer === choice.key) {
|
|
30442
|
-
choiceStr =
|
|
30442
|
+
choiceStr = chalk.cyan(choiceStr);
|
|
30443
30443
|
}
|
|
30444
30444
|
output2 += choiceStr;
|
|
30445
30445
|
});
|
|
@@ -30453,7 +30453,7 @@ var require_expand2 = __commonJS({
|
|
|
30453
30453
|
var require_checkbox = __commonJS({
|
|
30454
30454
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/checkbox.js"(exports, module2) {
|
|
30455
30455
|
"use strict";
|
|
30456
|
-
var
|
|
30456
|
+
var chalk = require_chalk();
|
|
30457
30457
|
var cliCursor = require_cli_cursor();
|
|
30458
30458
|
var figures = require_figures();
|
|
30459
30459
|
var { map: map2, takeUntil } = require_operators();
|
|
@@ -30511,10 +30511,10 @@ var require_checkbox = __commonJS({
|
|
|
30511
30511
|
let message = this.getQuestion();
|
|
30512
30512
|
let bottomContent = "";
|
|
30513
30513
|
if (!this.dontShowHints) {
|
|
30514
|
-
message += "(Press " +
|
|
30514
|
+
message += "(Press " + chalk.cyan.bold("<space>") + " to select, " + chalk.cyan.bold("<a>") + " to toggle all, " + chalk.cyan.bold("<i>") + " to invert selection, and " + chalk.cyan.bold("<enter>") + " to proceed)";
|
|
30515
30515
|
}
|
|
30516
30516
|
if (this.status === "answered") {
|
|
30517
|
-
message +=
|
|
30517
|
+
message += chalk.cyan(this.selection.join(", "));
|
|
30518
30518
|
} else {
|
|
30519
30519
|
const choicesStr = renderChoices(this.opt.choices, this.pointer);
|
|
30520
30520
|
const indexPosition = this.opt.choices.indexOf(
|
|
@@ -30537,7 +30537,7 @@ var require_checkbox = __commonJS({
|
|
|
30537
30537
|
message += "\n" + this.paginator.paginate(choicesStr, realIndexPosition, this.opt.pageSize);
|
|
30538
30538
|
}
|
|
30539
30539
|
if (error) {
|
|
30540
|
-
bottomContent =
|
|
30540
|
+
bottomContent = chalk.red(">> ") + error;
|
|
30541
30541
|
}
|
|
30542
30542
|
this.screen.render(message, bottomContent);
|
|
30543
30543
|
}
|
|
@@ -30623,7 +30623,7 @@ var require_checkbox = __commonJS({
|
|
|
30623
30623
|
} else {
|
|
30624
30624
|
const line = getCheckbox(choice.checked) + " " + choice.name;
|
|
30625
30625
|
if (i - separatorOffset === pointer) {
|
|
30626
|
-
output2 +=
|
|
30626
|
+
output2 += chalk.cyan(figures.pointer + line);
|
|
30627
30627
|
} else {
|
|
30628
30628
|
output2 += " " + line;
|
|
30629
30629
|
}
|
|
@@ -30633,7 +30633,7 @@ var require_checkbox = __commonJS({
|
|
|
30633
30633
|
return output2.replace(/\n$/, "");
|
|
30634
30634
|
}
|
|
30635
30635
|
function getCheckbox(checked) {
|
|
30636
|
-
return checked ?
|
|
30636
|
+
return checked ? chalk.green(figures.radioOn) : figures.radioOff;
|
|
30637
30637
|
}
|
|
30638
30638
|
module2.exports = CheckboxPrompt;
|
|
30639
30639
|
}
|
|
@@ -30643,7 +30643,7 @@ var require_checkbox = __commonJS({
|
|
|
30643
30643
|
var require_password = __commonJS({
|
|
30644
30644
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/password.js"(exports, module2) {
|
|
30645
30645
|
"use strict";
|
|
30646
|
-
var
|
|
30646
|
+
var chalk = require_chalk();
|
|
30647
30647
|
var { map: map2, takeUntil } = require_operators();
|
|
30648
30648
|
var Base = require_base3();
|
|
30649
30649
|
var observe2 = require_events();
|
|
@@ -30685,15 +30685,15 @@ var require_password = __commonJS({
|
|
|
30685
30685
|
message += this.getMaskedValue(this.rl.line || "");
|
|
30686
30686
|
}
|
|
30687
30687
|
if (error) {
|
|
30688
|
-
bottomContent = "\n" +
|
|
30688
|
+
bottomContent = "\n" + chalk.red(">> ") + error;
|
|
30689
30689
|
}
|
|
30690
30690
|
this.screen.render(message, bottomContent);
|
|
30691
30691
|
}
|
|
30692
30692
|
getMaskedValue(value) {
|
|
30693
30693
|
if (this.status === "answered") {
|
|
30694
|
-
return this.opt.mask ?
|
|
30694
|
+
return this.opt.mask ? chalk.cyan(mask(value, this.opt.mask)) : chalk.italic.dim("[hidden]");
|
|
30695
30695
|
}
|
|
30696
|
-
return this.opt.mask ? mask(value, this.opt.mask) :
|
|
30696
|
+
return this.opt.mask ? mask(value, this.opt.mask) : chalk.italic.dim("[input is hidden] ");
|
|
30697
30697
|
}
|
|
30698
30698
|
/**
|
|
30699
30699
|
* Mask value during async filter/validation.
|
|
@@ -36069,7 +36069,7 @@ var require_iso2022 = __commonJS({
|
|
|
36069
36069
|
var require_chardet = __commonJS({
|
|
36070
36070
|
"../../../../node_modules/.pnpm/chardet@0.7.0/node_modules/chardet/index.js"(exports, module2) {
|
|
36071
36071
|
"use strict";
|
|
36072
|
-
var
|
|
36072
|
+
var fs6 = require("fs");
|
|
36073
36073
|
var utf8 = require_utf8();
|
|
36074
36074
|
var unicode = require_unicode();
|
|
36075
36075
|
var mbcs = require_mbcs();
|
|
@@ -36143,29 +36143,29 @@ var require_chardet = __commonJS({
|
|
|
36143
36143
|
var fd;
|
|
36144
36144
|
var handler = function(err, buffer) {
|
|
36145
36145
|
if (fd) {
|
|
36146
|
-
|
|
36146
|
+
fs6.closeSync(fd);
|
|
36147
36147
|
}
|
|
36148
36148
|
if (err)
|
|
36149
36149
|
return cb(err, null);
|
|
36150
36150
|
cb(null, self3.detect(buffer, opts));
|
|
36151
36151
|
};
|
|
36152
36152
|
if (opts && opts.sampleSize) {
|
|
36153
|
-
fd =
|
|
36154
|
-
|
|
36153
|
+
fd = fs6.openSync(filepath, "r"), sample = Buffer.allocUnsafe(opts.sampleSize);
|
|
36154
|
+
fs6.read(fd, sample, 0, opts.sampleSize, null, function(err) {
|
|
36155
36155
|
handler(err, sample);
|
|
36156
36156
|
});
|
|
36157
36157
|
return;
|
|
36158
36158
|
}
|
|
36159
|
-
|
|
36159
|
+
fs6.readFile(filepath, handler);
|
|
36160
36160
|
};
|
|
36161
36161
|
module2.exports.detectFileSync = function(filepath, opts) {
|
|
36162
36162
|
if (opts && opts.sampleSize) {
|
|
36163
|
-
var fd =
|
|
36164
|
-
|
|
36165
|
-
|
|
36163
|
+
var fd = fs6.openSync(filepath, "r"), sample2 = Buffer.allocUnsafe(opts.sampleSize);
|
|
36164
|
+
fs6.readSync(fd, sample2, 0, opts.sampleSize);
|
|
36165
|
+
fs6.closeSync(fd);
|
|
36166
36166
|
return self3.detect(sample2, opts);
|
|
36167
36167
|
}
|
|
36168
|
-
return self3.detect(
|
|
36168
|
+
return self3.detect(fs6.readFileSync(filepath), opts);
|
|
36169
36169
|
};
|
|
36170
36170
|
module2.exports.detectAll = function(buffer, opts) {
|
|
36171
36171
|
if (typeof opts !== "object") {
|
|
@@ -39651,16 +39651,16 @@ var require_os_tmpdir = __commonJS({
|
|
|
39651
39651
|
var isWindows = process.platform === "win32";
|
|
39652
39652
|
var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/;
|
|
39653
39653
|
module2.exports = function() {
|
|
39654
|
-
var
|
|
39654
|
+
var path4;
|
|
39655
39655
|
if (isWindows) {
|
|
39656
|
-
|
|
39656
|
+
path4 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
|
|
39657
39657
|
} else {
|
|
39658
|
-
|
|
39658
|
+
path4 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
|
|
39659
39659
|
}
|
|
39660
|
-
if (trailingSlashRe.test(
|
|
39661
|
-
|
|
39660
|
+
if (trailingSlashRe.test(path4)) {
|
|
39661
|
+
path4 = path4.slice(0, -1);
|
|
39662
39662
|
}
|
|
39663
|
-
return
|
|
39663
|
+
return path4;
|
|
39664
39664
|
};
|
|
39665
39665
|
}
|
|
39666
39666
|
});
|
|
@@ -39669,8 +39669,8 @@ var require_os_tmpdir = __commonJS({
|
|
|
39669
39669
|
var require_tmp = __commonJS({
|
|
39670
39670
|
"../../../../node_modules/.pnpm/tmp@0.0.33/node_modules/tmp/lib/tmp.js"(exports, module2) {
|
|
39671
39671
|
"use strict";
|
|
39672
|
-
var
|
|
39673
|
-
var
|
|
39672
|
+
var fs6 = require("fs");
|
|
39673
|
+
var path4 = require("path");
|
|
39674
39674
|
var crypto = require("crypto");
|
|
39675
39675
|
var osTmpDir = require_os_tmpdir();
|
|
39676
39676
|
var _c = process.binding("constants");
|
|
@@ -39712,7 +39712,7 @@ var require_tmp = __commonJS({
|
|
|
39712
39712
|
}
|
|
39713
39713
|
function _generateTmpName(opts) {
|
|
39714
39714
|
if (opts.name) {
|
|
39715
|
-
return
|
|
39715
|
+
return path4.join(opts.dir || tmpDir, opts.name);
|
|
39716
39716
|
}
|
|
39717
39717
|
if (opts.template) {
|
|
39718
39718
|
return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
@@ -39723,7 +39723,7 @@ var require_tmp = __commonJS({
|
|
|
39723
39723
|
_randomChars(12),
|
|
39724
39724
|
opts.postfix || ""
|
|
39725
39725
|
].join("");
|
|
39726
|
-
return
|
|
39726
|
+
return path4.join(opts.dir || tmpDir, name);
|
|
39727
39727
|
}
|
|
39728
39728
|
function tmpName(options, callback) {
|
|
39729
39729
|
var args = _parseArguments(options, callback), opts = args[0], cb = args[1], tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
|
|
@@ -39733,7 +39733,7 @@ var require_tmp = __commonJS({
|
|
|
39733
39733
|
return cb(new Error("Invalid template provided"));
|
|
39734
39734
|
(function _getUniqueName() {
|
|
39735
39735
|
const name = _generateTmpName(opts);
|
|
39736
|
-
|
|
39736
|
+
fs6.stat(name, function(err) {
|
|
39737
39737
|
if (!err) {
|
|
39738
39738
|
if (tries-- > 0)
|
|
39739
39739
|
return _getUniqueName();
|
|
@@ -39752,7 +39752,7 @@ var require_tmp = __commonJS({
|
|
|
39752
39752
|
do {
|
|
39753
39753
|
const name = _generateTmpName(opts);
|
|
39754
39754
|
try {
|
|
39755
|
-
|
|
39755
|
+
fs6.statSync(name);
|
|
39756
39756
|
} catch (e) {
|
|
39757
39757
|
return name;
|
|
39758
39758
|
}
|
|
@@ -39765,14 +39765,14 @@ var require_tmp = __commonJS({
|
|
|
39765
39765
|
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
39766
39766
|
if (err)
|
|
39767
39767
|
return cb(err);
|
|
39768
|
-
|
|
39768
|
+
fs6.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
|
|
39769
39769
|
if (err2)
|
|
39770
39770
|
return cb(err2);
|
|
39771
39771
|
if (opts.discardDescriptor) {
|
|
39772
|
-
return
|
|
39772
|
+
return fs6.close(fd, function _discardCallback(err3) {
|
|
39773
39773
|
if (err3) {
|
|
39774
39774
|
try {
|
|
39775
|
-
|
|
39775
|
+
fs6.unlinkSync(name);
|
|
39776
39776
|
} catch (e) {
|
|
39777
39777
|
if (!isENOENT(e)) {
|
|
39778
39778
|
err3 = e;
|
|
@@ -39795,9 +39795,9 @@ var require_tmp = __commonJS({
|
|
|
39795
39795
|
opts.postfix = opts.postfix || ".tmp";
|
|
39796
39796
|
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
39797
39797
|
const name = tmpNameSync(opts);
|
|
39798
|
-
var fd =
|
|
39798
|
+
var fd = fs6.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
|
|
39799
39799
|
if (opts.discardDescriptor) {
|
|
39800
|
-
|
|
39800
|
+
fs6.closeSync(fd);
|
|
39801
39801
|
fd = void 0;
|
|
39802
39802
|
}
|
|
39803
39803
|
return {
|
|
@@ -39809,9 +39809,9 @@ var require_tmp = __commonJS({
|
|
|
39809
39809
|
function _rmdirRecursiveSync(root) {
|
|
39810
39810
|
const dirs = [root];
|
|
39811
39811
|
do {
|
|
39812
|
-
var dir2 = dirs.pop(), deferred = false, files =
|
|
39812
|
+
var dir2 = dirs.pop(), deferred = false, files = fs6.readdirSync(dir2);
|
|
39813
39813
|
for (var i = 0, length = files.length; i < length; i++) {
|
|
39814
|
-
var file2 =
|
|
39814
|
+
var file2 = path4.join(dir2, files[i]), stat = fs6.lstatSync(file2);
|
|
39815
39815
|
if (stat.isDirectory()) {
|
|
39816
39816
|
if (!deferred) {
|
|
39817
39817
|
deferred = true;
|
|
@@ -39819,11 +39819,11 @@ var require_tmp = __commonJS({
|
|
|
39819
39819
|
}
|
|
39820
39820
|
dirs.push(file2);
|
|
39821
39821
|
} else {
|
|
39822
|
-
|
|
39822
|
+
fs6.unlinkSync(file2);
|
|
39823
39823
|
}
|
|
39824
39824
|
}
|
|
39825
39825
|
if (!deferred) {
|
|
39826
|
-
|
|
39826
|
+
fs6.rmdirSync(dir2);
|
|
39827
39827
|
}
|
|
39828
39828
|
} while (dirs.length !== 0);
|
|
39829
39829
|
}
|
|
@@ -39832,7 +39832,7 @@ var require_tmp = __commonJS({
|
|
|
39832
39832
|
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
39833
39833
|
if (err)
|
|
39834
39834
|
return cb(err);
|
|
39835
|
-
|
|
39835
|
+
fs6.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
|
|
39836
39836
|
if (err2)
|
|
39837
39837
|
return cb(err2);
|
|
39838
39838
|
cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
|
|
@@ -39842,7 +39842,7 @@ var require_tmp = __commonJS({
|
|
|
39842
39842
|
function dirSync(options) {
|
|
39843
39843
|
var args = _parseArguments(options), opts = args[0];
|
|
39844
39844
|
const name = tmpNameSync(opts);
|
|
39845
|
-
|
|
39845
|
+
fs6.mkdirSync(name, opts.mode || DIR_MODE);
|
|
39846
39846
|
return {
|
|
39847
39847
|
name,
|
|
39848
39848
|
removeCallback: _prepareTmpDirRemoveCallback(name, opts)
|
|
@@ -39852,7 +39852,7 @@ var require_tmp = __commonJS({
|
|
|
39852
39852
|
const removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) {
|
|
39853
39853
|
try {
|
|
39854
39854
|
if (0 <= fdPath[0]) {
|
|
39855
|
-
|
|
39855
|
+
fs6.closeSync(fdPath[0]);
|
|
39856
39856
|
}
|
|
39857
39857
|
} catch (e) {
|
|
39858
39858
|
if (!isEBADF(e) && !isENOENT(e)) {
|
|
@@ -39860,7 +39860,7 @@ var require_tmp = __commonJS({
|
|
|
39860
39860
|
}
|
|
39861
39861
|
}
|
|
39862
39862
|
try {
|
|
39863
|
-
|
|
39863
|
+
fs6.unlinkSync(fdPath[1]);
|
|
39864
39864
|
} catch (e) {
|
|
39865
39865
|
if (!isENOENT(e)) {
|
|
39866
39866
|
throw e;
|
|
@@ -39873,7 +39873,7 @@ var require_tmp = __commonJS({
|
|
|
39873
39873
|
return removeCallback;
|
|
39874
39874
|
}
|
|
39875
39875
|
function _prepareTmpDirRemoveCallback(name, opts) {
|
|
39876
|
-
const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync :
|
|
39876
|
+
const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs6.rmdirSync.bind(fs6);
|
|
39877
39877
|
const removeCallback = _prepareRemoveCallback(removeFunction, name);
|
|
39878
39878
|
if (!opts.keep) {
|
|
39879
39879
|
_removeObjects.unshift(removeCallback);
|
|
@@ -40325,7 +40325,7 @@ var require_main = __commonJS({
|
|
|
40325
40325
|
var require_editor = __commonJS({
|
|
40326
40326
|
"../../../../node_modules/.pnpm/inquirer@8.2.5/node_modules/inquirer/lib/prompts/editor.js"(exports, module2) {
|
|
40327
40327
|
"use strict";
|
|
40328
|
-
var
|
|
40328
|
+
var chalk = require_chalk();
|
|
40329
40329
|
var { editAsync } = require_main();
|
|
40330
40330
|
var Base = require_base3();
|
|
40331
40331
|
var observe2 = require_events();
|
|
@@ -40357,12 +40357,12 @@ var require_editor = __commonJS({
|
|
|
40357
40357
|
let bottomContent = "";
|
|
40358
40358
|
let message = this.getQuestion();
|
|
40359
40359
|
if (this.status === "answered") {
|
|
40360
|
-
message +=
|
|
40360
|
+
message += chalk.dim("Received");
|
|
40361
40361
|
} else {
|
|
40362
|
-
message +=
|
|
40362
|
+
message += chalk.dim("Press <enter> to launch your preferred editor.");
|
|
40363
40363
|
}
|
|
40364
40364
|
if (error) {
|
|
40365
|
-
bottomContent =
|
|
40365
|
+
bottomContent = chalk.red(">> ") + error;
|
|
40366
40366
|
}
|
|
40367
40367
|
this.screen.render(message, bottomContent);
|
|
40368
40368
|
}
|
|
@@ -48358,12 +48358,12 @@ var require_src2 = __commonJS({
|
|
|
48358
48358
|
var require_separator2 = __commonJS({
|
|
48359
48359
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/objects/separator.js"(exports, module2) {
|
|
48360
48360
|
"use strict";
|
|
48361
|
-
var
|
|
48361
|
+
var chalk = require_chalk();
|
|
48362
48362
|
var figures = require_figures();
|
|
48363
48363
|
var Separator = class {
|
|
48364
48364
|
constructor(line) {
|
|
48365
48365
|
this.type = "separator";
|
|
48366
|
-
this.line =
|
|
48366
|
+
this.line = chalk.dim(line || new Array(15).join(figures.line));
|
|
48367
48367
|
}
|
|
48368
48368
|
/**
|
|
48369
48369
|
* Stringify separator
|
|
@@ -48473,8 +48473,8 @@ var require_parent = __commonJS({
|
|
|
48473
48473
|
"use strict";
|
|
48474
48474
|
var baseGet = require_baseGet();
|
|
48475
48475
|
var baseSlice = require_baseSlice();
|
|
48476
|
-
function parent(object,
|
|
48477
|
-
return
|
|
48476
|
+
function parent(object, path4) {
|
|
48477
|
+
return path4.length < 2 ? object : baseGet(object, baseSlice(path4, 0, -1));
|
|
48478
48478
|
}
|
|
48479
48479
|
module2.exports = parent;
|
|
48480
48480
|
}
|
|
@@ -48488,10 +48488,10 @@ var require_baseUnset = __commonJS({
|
|
|
48488
48488
|
var last = require_last2();
|
|
48489
48489
|
var parent = require_parent();
|
|
48490
48490
|
var toKey = require_toKey();
|
|
48491
|
-
function baseUnset(object,
|
|
48492
|
-
|
|
48493
|
-
object = parent(object,
|
|
48494
|
-
return object == null || delete object[toKey(last(
|
|
48491
|
+
function baseUnset(object, path4) {
|
|
48492
|
+
path4 = castPath(path4, object);
|
|
48493
|
+
object = parent(object, path4);
|
|
48494
|
+
return object == null || delete object[toKey(last(path4))];
|
|
48495
48495
|
}
|
|
48496
48496
|
module2.exports = baseUnset;
|
|
48497
48497
|
}
|
|
@@ -48600,10 +48600,10 @@ var require_omit = __commonJS({
|
|
|
48600
48600
|
return result;
|
|
48601
48601
|
}
|
|
48602
48602
|
var isDeep = false;
|
|
48603
|
-
paths = arrayMap(paths, function(
|
|
48604
|
-
|
|
48605
|
-
isDeep || (isDeep =
|
|
48606
|
-
return
|
|
48603
|
+
paths = arrayMap(paths, function(path4) {
|
|
48604
|
+
path4 = castPath(path4, object);
|
|
48605
|
+
isDeep || (isDeep = path4.length > 1);
|
|
48606
|
+
return path4;
|
|
48607
48607
|
});
|
|
48608
48608
|
copyObject(object, getAllKeysIn(object), result);
|
|
48609
48609
|
if (isDeep) {
|
|
@@ -49316,7 +49316,7 @@ var require_screen_manager2 = __commonJS({
|
|
|
49316
49316
|
var cliWidth = require_cli_width();
|
|
49317
49317
|
var stripAnsi2 = require_strip_ansi();
|
|
49318
49318
|
var stringWidth = require_string_width();
|
|
49319
|
-
var
|
|
49319
|
+
var ora = require_ora();
|
|
49320
49320
|
function height(content) {
|
|
49321
49321
|
return content.split("\n").length;
|
|
49322
49322
|
}
|
|
@@ -49337,11 +49337,11 @@ var require_screen_manager2 = __commonJS({
|
|
|
49337
49337
|
let contentFunc;
|
|
49338
49338
|
let bottomContentFunc;
|
|
49339
49339
|
if (bottomContent) {
|
|
49340
|
-
spinner =
|
|
49340
|
+
spinner = ora(bottomContent);
|
|
49341
49341
|
contentFunc = () => content;
|
|
49342
49342
|
bottomContentFunc = () => spinner.frame();
|
|
49343
49343
|
} else {
|
|
49344
|
-
spinner =
|
|
49344
|
+
spinner = ora(content);
|
|
49345
49345
|
contentFunc = () => spinner.frame();
|
|
49346
49346
|
bottomContentFunc = () => "";
|
|
49347
49347
|
}
|
|
@@ -49437,7 +49437,7 @@ var require_base4 = __commonJS({
|
|
|
49437
49437
|
defaults: require_defaults(),
|
|
49438
49438
|
clone: require_clone()
|
|
49439
49439
|
};
|
|
49440
|
-
var
|
|
49440
|
+
var chalk = require_chalk();
|
|
49441
49441
|
var runAsync = require_run_async();
|
|
49442
49442
|
var { filter, flatMap, share, take, takeUntil } = require_operators();
|
|
49443
49443
|
var Choices = require_choices2();
|
|
@@ -49455,7 +49455,7 @@ var require_base4 = __commonJS({
|
|
|
49455
49455
|
filteringText: "",
|
|
49456
49456
|
when: () => true,
|
|
49457
49457
|
suffix: "",
|
|
49458
|
-
prefix:
|
|
49458
|
+
prefix: chalk.green("?")
|
|
49459
49459
|
});
|
|
49460
49460
|
if (!this.opt.name) {
|
|
49461
49461
|
this.throwParamError("name");
|
|
@@ -49556,12 +49556,12 @@ var require_base4 = __commonJS({
|
|
|
49556
49556
|
* @return {String} prompt question string
|
|
49557
49557
|
*/
|
|
49558
49558
|
getQuestion() {
|
|
49559
|
-
let message = (this.opt.prefix ? this.opt.prefix + " " : "") +
|
|
49559
|
+
let message = (this.opt.prefix ? this.opt.prefix + " " : "") + chalk.bold(this.opt.message) + this.opt.suffix + chalk.reset(" ");
|
|
49560
49560
|
if (this.opt.default != null && this.status !== "touched" && this.status !== "answered") {
|
|
49561
49561
|
if (this.opt.type === "password") {
|
|
49562
|
-
message +=
|
|
49562
|
+
message += chalk.italic.dim("[hidden] ");
|
|
49563
49563
|
} else {
|
|
49564
|
-
message +=
|
|
49564
|
+
message += chalk.dim("(" + this.opt.default + ") ");
|
|
49565
49565
|
}
|
|
49566
49566
|
}
|
|
49567
49567
|
return message;
|
|
@@ -49658,7 +49658,7 @@ var require_paginator2 = __commonJS({
|
|
|
49658
49658
|
sum: require_sum(),
|
|
49659
49659
|
flatten: require_flatten()
|
|
49660
49660
|
};
|
|
49661
|
-
var
|
|
49661
|
+
var chalk = require_chalk();
|
|
49662
49662
|
var Paginator = class {
|
|
49663
49663
|
constructor(screen, options = {}) {
|
|
49664
49664
|
const { isInfinite = true } = options;
|
|
@@ -49679,7 +49679,7 @@ var require_paginator2 = __commonJS({
|
|
|
49679
49679
|
}
|
|
49680
49680
|
const visibleLines = this.isInfinite ? this.getInfiniteLines(lines, active, pageSize) : this.getFiniteLines(lines, active, pageSize);
|
|
49681
49681
|
this.lastIndex = active;
|
|
49682
|
-
return visibleLines.join("\n") + "\n" +
|
|
49682
|
+
return visibleLines.join("\n") + "\n" + chalk.dim("(Move up and down to reveal more choices)");
|
|
49683
49683
|
}
|
|
49684
49684
|
getInfiniteLines(lines, active, pageSize) {
|
|
49685
49685
|
if (this.pointer === void 0) {
|
|
@@ -49741,7 +49741,7 @@ var require_list2 = __commonJS({
|
|
|
49741
49741
|
findIndex: require_findIndex2(),
|
|
49742
49742
|
isString: require_isString()
|
|
49743
49743
|
};
|
|
49744
|
-
var
|
|
49744
|
+
var chalk = require_chalk();
|
|
49745
49745
|
var figures = require_figures();
|
|
49746
49746
|
var cliCursor = require_cli_cursor();
|
|
49747
49747
|
var runAsync = require_run_async();
|
|
@@ -49802,10 +49802,10 @@ var require_list2 = __commonJS({
|
|
|
49802
49802
|
render() {
|
|
49803
49803
|
let message = this.getQuestion();
|
|
49804
49804
|
if (this.firstRender) {
|
|
49805
|
-
message +=
|
|
49805
|
+
message += chalk.dim("(Use arrow keys)");
|
|
49806
49806
|
}
|
|
49807
49807
|
if (this.status === "answered") {
|
|
49808
|
-
message +=
|
|
49808
|
+
message += chalk.cyan(this.opt.choices.getChoice(this.selected).short);
|
|
49809
49809
|
} else {
|
|
49810
49810
|
const choicesStr = listRender(this.opt.choices, this.selected);
|
|
49811
49811
|
const indexPosition = this.opt.choices.indexOf(
|
|
@@ -49880,7 +49880,7 @@ var require_list2 = __commonJS({
|
|
|
49880
49880
|
const isSelected = i - separatorOffset === pointer;
|
|
49881
49881
|
let line = (isSelected ? figures.pointer + " " : " ") + choice.name;
|
|
49882
49882
|
if (isSelected) {
|
|
49883
|
-
line =
|
|
49883
|
+
line = chalk.cyan(line);
|
|
49884
49884
|
}
|
|
49885
49885
|
output2 += line + " \n";
|
|
49886
49886
|
});
|
|
@@ -49894,7 +49894,7 @@ var require_list2 = __commonJS({
|
|
|
49894
49894
|
var require_input2 = __commonJS({
|
|
49895
49895
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/prompts/input.js"(exports, module2) {
|
|
49896
49896
|
"use strict";
|
|
49897
|
-
var
|
|
49897
|
+
var chalk = require_chalk();
|
|
49898
49898
|
var { map: map2, takeUntil } = require_operators();
|
|
49899
49899
|
var Base = require_base4();
|
|
49900
49900
|
var observe2 = require_events2();
|
|
@@ -49933,10 +49933,10 @@ var require_input2 = __commonJS({
|
|
|
49933
49933
|
if (transformer) {
|
|
49934
49934
|
message += transformer(appendContent, this.answers, { isFinal });
|
|
49935
49935
|
} else {
|
|
49936
|
-
message += isFinal ?
|
|
49936
|
+
message += isFinal ? chalk.cyan(appendContent) : appendContent;
|
|
49937
49937
|
}
|
|
49938
49938
|
if (error) {
|
|
49939
|
-
bottomContent =
|
|
49939
|
+
bottomContent = chalk.red(">> ") + error;
|
|
49940
49940
|
}
|
|
49941
49941
|
this.screen.render(message, bottomContent);
|
|
49942
49942
|
}
|
|
@@ -50016,7 +50016,7 @@ var require_confirm2 = __commonJS({
|
|
|
50016
50016
|
extend: require_extend(),
|
|
50017
50017
|
isBoolean: require_isBoolean()
|
|
50018
50018
|
};
|
|
50019
|
-
var
|
|
50019
|
+
var chalk = require_chalk();
|
|
50020
50020
|
var { take, takeUntil } = require_operators();
|
|
50021
50021
|
var Base = require_base4();
|
|
50022
50022
|
var observe2 = require_events2();
|
|
@@ -50058,7 +50058,7 @@ var require_confirm2 = __commonJS({
|
|
|
50058
50058
|
render(answer) {
|
|
50059
50059
|
let message = this.getQuestion();
|
|
50060
50060
|
if (typeof answer === "boolean") {
|
|
50061
|
-
message +=
|
|
50061
|
+
message += chalk.cyan(answer ? "Yes" : "No");
|
|
50062
50062
|
} else {
|
|
50063
50063
|
message += this.rl.line;
|
|
50064
50064
|
}
|
|
@@ -50095,7 +50095,7 @@ var require_rawlist2 = __commonJS({
|
|
|
50095
50095
|
isNumber: require_isNumber(),
|
|
50096
50096
|
findIndex: require_findIndex2()
|
|
50097
50097
|
};
|
|
50098
|
-
var
|
|
50098
|
+
var chalk = require_chalk();
|
|
50099
50099
|
var { map: map2, takeUntil } = require_operators();
|
|
50100
50100
|
var Base = require_base4();
|
|
50101
50101
|
var Separator = require_separator2();
|
|
@@ -50159,7 +50159,7 @@ var require_rawlist2 = __commonJS({
|
|
|
50159
50159
|
let message = this.getQuestion();
|
|
50160
50160
|
let bottomContent = "";
|
|
50161
50161
|
if (this.status === "answered") {
|
|
50162
|
-
message +=
|
|
50162
|
+
message += chalk.cyan(this.opt.choices.getChoice(this.selected).short);
|
|
50163
50163
|
} else {
|
|
50164
50164
|
const choicesStr = renderChoices(this.opt.choices, this.selected);
|
|
50165
50165
|
message += "\n" + this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize);
|
|
@@ -50167,7 +50167,7 @@ var require_rawlist2 = __commonJS({
|
|
|
50167
50167
|
}
|
|
50168
50168
|
message += this.rl.line;
|
|
50169
50169
|
if (error) {
|
|
50170
|
-
bottomContent = "\n" +
|
|
50170
|
+
bottomContent = "\n" + chalk.red(">> ") + error;
|
|
50171
50171
|
}
|
|
50172
50172
|
this.screen.render(message, bottomContent);
|
|
50173
50173
|
}
|
|
@@ -50241,7 +50241,7 @@ var require_rawlist2 = __commonJS({
|
|
|
50241
50241
|
const index = i - separatorOffset;
|
|
50242
50242
|
let display = index + 1 + ") " + choice.name;
|
|
50243
50243
|
if (index === pointer) {
|
|
50244
|
-
display =
|
|
50244
|
+
display = chalk.cyan(display);
|
|
50245
50245
|
}
|
|
50246
50246
|
output2 += display;
|
|
50247
50247
|
});
|
|
@@ -50425,7 +50425,7 @@ var require_expand3 = __commonJS({
|
|
|
50425
50425
|
isNumber: require_isNumber(),
|
|
50426
50426
|
findIndex: require_findIndex2()
|
|
50427
50427
|
};
|
|
50428
|
-
var
|
|
50428
|
+
var chalk = require_chalk();
|
|
50429
50429
|
var { map: map2, takeUntil } = require_operators();
|
|
50430
50430
|
var Base = require_base4();
|
|
50431
50431
|
var Separator = require_separator2();
|
|
@@ -50477,7 +50477,7 @@ var require_expand3 = __commonJS({
|
|
|
50477
50477
|
let message = this.getQuestion();
|
|
50478
50478
|
let bottomContent = "";
|
|
50479
50479
|
if (this.status === "answered") {
|
|
50480
|
-
message +=
|
|
50480
|
+
message += chalk.cyan(this.answer);
|
|
50481
50481
|
} else if (this.status === "expanded") {
|
|
50482
50482
|
const choicesStr = renderChoices(this.opt.choices, this.selectedKey);
|
|
50483
50483
|
message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize);
|
|
@@ -50485,10 +50485,10 @@ var require_expand3 = __commonJS({
|
|
|
50485
50485
|
}
|
|
50486
50486
|
message += this.rl.line;
|
|
50487
50487
|
if (error) {
|
|
50488
|
-
bottomContent =
|
|
50488
|
+
bottomContent = chalk.red(">> ") + error;
|
|
50489
50489
|
}
|
|
50490
50490
|
if (hint) {
|
|
50491
|
-
bottomContent =
|
|
50491
|
+
bottomContent = chalk.cyan(">> ") + hint;
|
|
50492
50492
|
}
|
|
50493
50493
|
this.screen.render(message, bottomContent);
|
|
50494
50494
|
}
|
|
@@ -50516,7 +50516,7 @@ var require_expand3 = __commonJS({
|
|
|
50516
50516
|
}
|
|
50517
50517
|
let choiceStr = choice.key + ") " + choice.name;
|
|
50518
50518
|
if (this.selectedKey === choice.key) {
|
|
50519
|
-
choiceStr =
|
|
50519
|
+
choiceStr = chalk.cyan(choiceStr);
|
|
50520
50520
|
}
|
|
50521
50521
|
output2 += choiceStr;
|
|
50522
50522
|
});
|
|
@@ -50621,7 +50621,7 @@ var require_expand3 = __commonJS({
|
|
|
50621
50621
|
}
|
|
50622
50622
|
let choiceStr = choice.key + ") " + choice.name;
|
|
50623
50623
|
if (pointer === choice.key) {
|
|
50624
|
-
choiceStr =
|
|
50624
|
+
choiceStr = chalk.cyan(choiceStr);
|
|
50625
50625
|
}
|
|
50626
50626
|
output2 += choiceStr;
|
|
50627
50627
|
});
|
|
@@ -50640,7 +50640,7 @@ var require_checkbox2 = __commonJS({
|
|
|
50640
50640
|
map: require_map2(),
|
|
50641
50641
|
isString: require_isString()
|
|
50642
50642
|
};
|
|
50643
|
-
var
|
|
50643
|
+
var chalk = require_chalk();
|
|
50644
50644
|
var cliCursor = require_cli_cursor();
|
|
50645
50645
|
var figures = require_figures();
|
|
50646
50646
|
var { map: map2, takeUntil } = require_operators();
|
|
@@ -50698,10 +50698,10 @@ var require_checkbox2 = __commonJS({
|
|
|
50698
50698
|
let message = this.getQuestion();
|
|
50699
50699
|
let bottomContent = "";
|
|
50700
50700
|
if (!this.spaceKeyPressed) {
|
|
50701
|
-
message += "(Press " +
|
|
50701
|
+
message += "(Press " + chalk.cyan.bold("<space>") + " to select, " + chalk.cyan.bold("<a>") + " to toggle all, " + chalk.cyan.bold("<i>") + " to invert selection)";
|
|
50702
50702
|
}
|
|
50703
50703
|
if (this.status === "answered") {
|
|
50704
|
-
message +=
|
|
50704
|
+
message += chalk.cyan(this.selection.join(", "));
|
|
50705
50705
|
} else {
|
|
50706
50706
|
const choicesStr = renderChoices(this.opt.choices, this.pointer);
|
|
50707
50707
|
const indexPosition = this.opt.choices.indexOf(
|
|
@@ -50724,7 +50724,7 @@ var require_checkbox2 = __commonJS({
|
|
|
50724
50724
|
message += "\n" + this.paginator.paginate(choicesStr, realIndexPosition, this.opt.pageSize);
|
|
50725
50725
|
}
|
|
50726
50726
|
if (error) {
|
|
50727
|
-
bottomContent =
|
|
50727
|
+
bottomContent = chalk.red(">> ") + error;
|
|
50728
50728
|
}
|
|
50729
50729
|
this.screen.render(message, bottomContent);
|
|
50730
50730
|
}
|
|
@@ -50811,7 +50811,7 @@ var require_checkbox2 = __commonJS({
|
|
|
50811
50811
|
} else {
|
|
50812
50812
|
const line = getCheckbox(choice.checked) + " " + choice.name;
|
|
50813
50813
|
if (i - separatorOffset === pointer) {
|
|
50814
|
-
output2 +=
|
|
50814
|
+
output2 += chalk.cyan(figures.pointer + line);
|
|
50815
50815
|
} else {
|
|
50816
50816
|
output2 += " " + line;
|
|
50817
50817
|
}
|
|
@@ -50821,7 +50821,7 @@ var require_checkbox2 = __commonJS({
|
|
|
50821
50821
|
return output2.replace(/\n$/, "");
|
|
50822
50822
|
}
|
|
50823
50823
|
function getCheckbox(checked) {
|
|
50824
|
-
return checked ?
|
|
50824
|
+
return checked ? chalk.green(figures.radioOn) : figures.radioOff;
|
|
50825
50825
|
}
|
|
50826
50826
|
module2.exports = CheckboxPrompt;
|
|
50827
50827
|
}
|
|
@@ -50831,7 +50831,7 @@ var require_checkbox2 = __commonJS({
|
|
|
50831
50831
|
var require_password2 = __commonJS({
|
|
50832
50832
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/prompts/password.js"(exports, module2) {
|
|
50833
50833
|
"use strict";
|
|
50834
|
-
var
|
|
50834
|
+
var chalk = require_chalk();
|
|
50835
50835
|
var { map: map2, takeUntil } = require_operators();
|
|
50836
50836
|
var Base = require_base4();
|
|
50837
50837
|
var observe2 = require_events2();
|
|
@@ -50873,15 +50873,15 @@ var require_password2 = __commonJS({
|
|
|
50873
50873
|
message += this.getMaskedValue(this.rl.line || "");
|
|
50874
50874
|
}
|
|
50875
50875
|
if (error) {
|
|
50876
|
-
bottomContent = "\n" +
|
|
50876
|
+
bottomContent = "\n" + chalk.red(">> ") + error;
|
|
50877
50877
|
}
|
|
50878
50878
|
this.screen.render(message, bottomContent);
|
|
50879
50879
|
}
|
|
50880
50880
|
getMaskedValue(value) {
|
|
50881
50881
|
if (this.status === "answered") {
|
|
50882
|
-
return this.opt.mask ?
|
|
50882
|
+
return this.opt.mask ? chalk.cyan(mask(value, this.opt.mask)) : chalk.italic.dim("[hidden]");
|
|
50883
50883
|
}
|
|
50884
|
-
return this.opt.mask ? mask(value, this.opt.mask) :
|
|
50884
|
+
return this.opt.mask ? mask(value, this.opt.mask) : chalk.italic.dim("[input is hidden] ");
|
|
50885
50885
|
}
|
|
50886
50886
|
/**
|
|
50887
50887
|
* Mask value during async filter/validation.
|
|
@@ -50923,7 +50923,7 @@ var require_password2 = __commonJS({
|
|
|
50923
50923
|
var require_editor2 = __commonJS({
|
|
50924
50924
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/prompts/editor.js"(exports, module2) {
|
|
50925
50925
|
"use strict";
|
|
50926
|
-
var
|
|
50926
|
+
var chalk = require_chalk();
|
|
50927
50927
|
var { editAsync } = require_main();
|
|
50928
50928
|
var Base = require_base4();
|
|
50929
50929
|
var observe2 = require_events2();
|
|
@@ -50955,12 +50955,12 @@ var require_editor2 = __commonJS({
|
|
|
50955
50955
|
let bottomContent = "";
|
|
50956
50956
|
let message = this.getQuestion();
|
|
50957
50957
|
if (this.status === "answered") {
|
|
50958
|
-
message +=
|
|
50958
|
+
message += chalk.dim("Received");
|
|
50959
50959
|
} else {
|
|
50960
|
-
message +=
|
|
50960
|
+
message += chalk.dim("Press <enter> to launch your preferred editor.");
|
|
50961
50961
|
}
|
|
50962
50962
|
if (error) {
|
|
50963
|
-
bottomContent =
|
|
50963
|
+
bottomContent = chalk.red(">> ") + error;
|
|
50964
50964
|
}
|
|
50965
50965
|
this.screen.render(message, bottomContent);
|
|
50966
50966
|
}
|
|
@@ -51054,31 +51054,30 @@ __export(src_exports, {
|
|
|
51054
51054
|
default: () => src_default
|
|
51055
51055
|
});
|
|
51056
51056
|
module.exports = __toCommonJS(src_exports);
|
|
51057
|
-
var import_path6 = __toESM(require("path"));
|
|
51058
51057
|
|
|
51059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
51058
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
51060
51059
|
var import_path = __toESM(require("path"));
|
|
51061
51060
|
var import_utils = require("@modern-js/utils");
|
|
51062
51061
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
51063
51062
|
|
|
51064
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
51063
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
51065
51064
|
var import_utils2 = require("@modern-js/utils");
|
|
51066
|
-
async function fsExists(
|
|
51065
|
+
async function fsExists(path4) {
|
|
51067
51066
|
try {
|
|
51068
|
-
await import_utils2.fs.access(
|
|
51067
|
+
await import_utils2.fs.access(path4);
|
|
51069
51068
|
return true;
|
|
51070
51069
|
} catch (e) {
|
|
51071
51070
|
return false;
|
|
51072
51071
|
}
|
|
51073
51072
|
}
|
|
51074
51073
|
|
|
51075
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
51074
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
51076
51075
|
var import_ejs = __toESM(require_ejs());
|
|
51077
51076
|
function renderString(template, fullData) {
|
|
51078
51077
|
return import_ejs.default.render(template, fullData) || "";
|
|
51079
51078
|
}
|
|
51080
51079
|
|
|
51081
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
51080
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
51082
51081
|
var EjsAPI = class {
|
|
51083
51082
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
51084
51083
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -51110,7 +51109,7 @@ var EjsAPI = class {
|
|
|
51110
51109
|
}
|
|
51111
51110
|
};
|
|
51112
51111
|
|
|
51113
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
|
51112
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
51114
51113
|
var import_path2 = __toESM(require("path"));
|
|
51115
51114
|
var import_utils4 = require("@modern-js/utils");
|
|
51116
51115
|
var FsAPI = class {
|
|
@@ -51137,7 +51136,7 @@ var FsAPI = class {
|
|
|
51137
51136
|
}
|
|
51138
51137
|
};
|
|
51139
51138
|
|
|
51140
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
51139
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
51141
51140
|
var import_utils5 = require("@modern-js/utils");
|
|
51142
51141
|
async function canUseGit() {
|
|
51143
51142
|
try {
|
|
@@ -51212,7 +51211,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
51212
51211
|
});
|
|
51213
51212
|
}
|
|
51214
51213
|
|
|
51215
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
51214
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
51216
51215
|
var GitAPI = class {
|
|
51217
51216
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
51218
51217
|
const canUse = await canUseGit();
|
|
@@ -51262,7 +51261,7 @@ var GitAPI = class {
|
|
|
51262
51261
|
}
|
|
51263
51262
|
};
|
|
51264
51263
|
|
|
51265
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
51264
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
51266
51265
|
var import_handlebars = __toESM(require_lib());
|
|
51267
51266
|
function renderString2(template, fullData, registers) {
|
|
51268
51267
|
const helpers = {
|
|
@@ -51276,7 +51275,7 @@ function renderString2(template, fullData, registers) {
|
|
|
51276
51275
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
51277
51276
|
}
|
|
51278
51277
|
|
|
51279
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
51278
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
51280
51279
|
var HandlebarsAPI = class {
|
|
51281
51280
|
async registerHelp(helpers) {
|
|
51282
51281
|
this.registers.helpers = {
|
|
@@ -51324,7 +51323,7 @@ var HandlebarsAPI = class {
|
|
|
51324
51323
|
}
|
|
51325
51324
|
};
|
|
51326
51325
|
|
|
51327
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
51326
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
51328
51327
|
var import_utils8 = require("@modern-js/utils");
|
|
51329
51328
|
async function canUseNvm() {
|
|
51330
51329
|
try {
|
|
@@ -51374,7 +51373,7 @@ async function canUsePnpm() {
|
|
|
51374
51373
|
}
|
|
51375
51374
|
}
|
|
51376
51375
|
|
|
51377
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
51376
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
51378
51377
|
var import_utils9 = require("@modern-js/utils");
|
|
51379
51378
|
function execaWithStreamLog(command, args, options) {
|
|
51380
51379
|
const promise = (0, import_utils9.execa)(command, args, {
|
|
@@ -51470,7 +51469,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
51470
51469
|
throw new Error("please install pnpm first");
|
|
51471
51470
|
}
|
|
51472
51471
|
|
|
51473
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
51472
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
51474
51473
|
var NpmAPI = class {
|
|
51475
51474
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
51476
51475
|
return npmInstall({
|
|
@@ -52523,8 +52522,8 @@ var parseDestructorRules = function(node) {
|
|
|
52523
52522
|
};
|
|
52524
52523
|
var setInByDestructor = function(source, rules, value, mutators) {
|
|
52525
52524
|
rules.forEach(function(_a2) {
|
|
52526
|
-
var key = _a2.key,
|
|
52527
|
-
mutators.setIn([key], source, mutators.getIn(
|
|
52525
|
+
var key = _a2.key, path4 = _a2.path;
|
|
52526
|
+
mutators.setIn([key], source, mutators.getIn(path4, value));
|
|
52528
52527
|
});
|
|
52529
52528
|
};
|
|
52530
52529
|
var getInByDestructor = function(source, rules, mutators) {
|
|
@@ -52536,8 +52535,8 @@ var getInByDestructor = function(source, rules, mutators) {
|
|
|
52536
52535
|
}
|
|
52537
52536
|
source = isValid2(source) ? source : {};
|
|
52538
52537
|
rules.forEach(function(_a2) {
|
|
52539
|
-
var key = _a2.key,
|
|
52540
|
-
mutators.setIn(
|
|
52538
|
+
var key = _a2.key, path4 = _a2.path;
|
|
52539
|
+
mutators.setIn(path4, response, source[key]);
|
|
52541
52540
|
});
|
|
52542
52541
|
return response;
|
|
52543
52542
|
};
|
|
@@ -53104,8 +53103,8 @@ var Matcher = (
|
|
|
53104
53103
|
}
|
|
53105
53104
|
return false;
|
|
53106
53105
|
};
|
|
53107
|
-
Matcher2.prototype.match = function(
|
|
53108
|
-
this.path =
|
|
53106
|
+
Matcher2.prototype.match = function(path4) {
|
|
53107
|
+
this.path = path4;
|
|
53109
53108
|
return { matched: this.matchNode(this.tree), record: this.record };
|
|
53110
53109
|
};
|
|
53111
53110
|
Matcher2.matchSegments = function(source, target, record) {
|
|
@@ -53395,21 +53394,21 @@ var Path = (
|
|
|
53395
53394
|
if (_this.isMatchPattern || _this.isRegExp) {
|
|
53396
53395
|
throw new Error("".concat(_this.entire, " cannot be concat"));
|
|
53397
53396
|
}
|
|
53398
|
-
var
|
|
53399
|
-
|
|
53397
|
+
var path4 = new Path2("");
|
|
53398
|
+
path4.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
|
|
53400
53399
|
return parseString(s);
|
|
53401
53400
|
})), false));
|
|
53402
|
-
|
|
53403
|
-
return
|
|
53401
|
+
path4.entire = path4.segments.join(".");
|
|
53402
|
+
return path4;
|
|
53404
53403
|
};
|
|
53405
53404
|
this.slice = function(start, end) {
|
|
53406
53405
|
if (_this.isMatchPattern || _this.isRegExp) {
|
|
53407
53406
|
throw new Error("".concat(_this.entire, " cannot be slice"));
|
|
53408
53407
|
}
|
|
53409
|
-
var
|
|
53410
|
-
|
|
53411
|
-
|
|
53412
|
-
return
|
|
53408
|
+
var path4 = new Path2("");
|
|
53409
|
+
path4.segments = _this.segments.slice(start, end);
|
|
53410
|
+
path4.entire = path4.segments.join(".");
|
|
53411
|
+
return path4;
|
|
53413
53412
|
};
|
|
53414
53413
|
this.push = function() {
|
|
53415
53414
|
var items = [];
|
|
@@ -53501,8 +53500,8 @@ var Path = (
|
|
|
53501
53500
|
};
|
|
53502
53501
|
this.match = function(pattern) {
|
|
53503
53502
|
var _a3, _b;
|
|
53504
|
-
var
|
|
53505
|
-
var cache = _this.matchCache.get(
|
|
53503
|
+
var path4 = Path2.parse(pattern);
|
|
53504
|
+
var cache = _this.matchCache.get(path4.entire);
|
|
53506
53505
|
if (cache !== void 0) {
|
|
53507
53506
|
if (cache.record && cache.record.score !== void 0) {
|
|
53508
53507
|
_this.matchScore = cache.record.score;
|
|
@@ -53510,21 +53509,21 @@ var Path = (
|
|
|
53510
53509
|
return cache.matched;
|
|
53511
53510
|
}
|
|
53512
53511
|
var cacheWith = function(value) {
|
|
53513
|
-
_this.matchCache.set(
|
|
53512
|
+
_this.matchCache.set(path4.entire, value);
|
|
53514
53513
|
return value;
|
|
53515
53514
|
};
|
|
53516
|
-
if (
|
|
53515
|
+
if (path4.isMatchPattern) {
|
|
53517
53516
|
if (_this.isMatchPattern) {
|
|
53518
|
-
throw new Error("".concat(
|
|
53517
|
+
throw new Error("".concat(path4.entire, " cannot match ").concat(_this.entire));
|
|
53519
53518
|
} else {
|
|
53520
53519
|
_this.matchScore = 0;
|
|
53521
|
-
return cacheWith(
|
|
53520
|
+
return cacheWith(path4.match(_this.segments));
|
|
53522
53521
|
}
|
|
53523
53522
|
} else {
|
|
53524
53523
|
if (_this.isMatchPattern) {
|
|
53525
53524
|
if (_this.isRegExp) {
|
|
53526
53525
|
try {
|
|
53527
|
-
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3,
|
|
53526
|
+
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path4.entire);
|
|
53528
53527
|
} finally {
|
|
53529
53528
|
;
|
|
53530
53529
|
_this.entire.lastIndex = 0;
|
|
@@ -53533,14 +53532,14 @@ var Path = (
|
|
|
53533
53532
|
var record = {
|
|
53534
53533
|
score: 0
|
|
53535
53534
|
};
|
|
53536
|
-
var result = cacheWith(new Matcher(_this.tree, record).match(
|
|
53535
|
+
var result = cacheWith(new Matcher(_this.tree, record).match(path4.segments));
|
|
53537
53536
|
_this.matchScore = record.score;
|
|
53538
53537
|
return result.matched;
|
|
53539
53538
|
} else {
|
|
53540
53539
|
var record = {
|
|
53541
53540
|
score: 0
|
|
53542
53541
|
};
|
|
53543
|
-
var result = cacheWith(Matcher.matchSegments(_this.segments,
|
|
53542
|
+
var result = cacheWith(Matcher.matchSegments(_this.segments, path4.segments, record));
|
|
53544
53543
|
_this.matchScore = record.score;
|
|
53545
53544
|
return result.matched;
|
|
53546
53545
|
}
|
|
@@ -53616,12 +53615,12 @@ var Path = (
|
|
|
53616
53615
|
configurable: true
|
|
53617
53616
|
});
|
|
53618
53617
|
Path2.match = function(pattern) {
|
|
53619
|
-
var
|
|
53618
|
+
var path4 = Path2.parse(pattern);
|
|
53620
53619
|
var matcher = function(target) {
|
|
53621
|
-
return
|
|
53620
|
+
return path4.match(target);
|
|
53622
53621
|
};
|
|
53623
53622
|
matcher[isMatcher] = true;
|
|
53624
|
-
matcher.path =
|
|
53623
|
+
matcher.path = path4;
|
|
53625
53624
|
return matcher;
|
|
53626
53625
|
};
|
|
53627
53626
|
Path2.isPathPattern = function(target) {
|
|
@@ -53630,52 +53629,52 @@ var Path = (
|
|
|
53630
53629
|
Path2.transform = function(pattern, regexp, callback) {
|
|
53631
53630
|
return Path2.parse(pattern).transform(regexp, callback);
|
|
53632
53631
|
};
|
|
53633
|
-
Path2.parse = function(
|
|
53634
|
-
if (
|
|
53635
|
-
|
|
53632
|
+
Path2.parse = function(path4, base) {
|
|
53633
|
+
if (path4 === void 0) {
|
|
53634
|
+
path4 = "";
|
|
53636
53635
|
}
|
|
53637
|
-
if (
|
|
53638
|
-
var found = pathCache.get(
|
|
53636
|
+
if (path4 instanceof Path2) {
|
|
53637
|
+
var found = pathCache.get(path4.entire);
|
|
53639
53638
|
if (found) {
|
|
53640
53639
|
return found;
|
|
53641
53640
|
} else {
|
|
53642
|
-
pathCache.set(
|
|
53643
|
-
return
|
|
53641
|
+
pathCache.set(path4.entire, path4);
|
|
53642
|
+
return path4;
|
|
53644
53643
|
}
|
|
53645
|
-
} else if (
|
|
53646
|
-
return Path2.parse(
|
|
53644
|
+
} else if (path4 && path4[isMatcher]) {
|
|
53645
|
+
return Path2.parse(path4["path"]);
|
|
53647
53646
|
} else {
|
|
53648
53647
|
var key_ = base ? Path2.parse(base) : "";
|
|
53649
|
-
var key = "".concat(
|
|
53648
|
+
var key = "".concat(path4, ":").concat(key_);
|
|
53650
53649
|
var found = pathCache.get(key);
|
|
53651
53650
|
if (found) {
|
|
53652
53651
|
return found;
|
|
53653
53652
|
} else {
|
|
53654
|
-
|
|
53655
|
-
pathCache.set(key,
|
|
53656
|
-
return
|
|
53653
|
+
path4 = new Path2(path4, base);
|
|
53654
|
+
pathCache.set(key, path4);
|
|
53655
|
+
return path4;
|
|
53657
53656
|
}
|
|
53658
53657
|
}
|
|
53659
53658
|
};
|
|
53660
53659
|
Path2.getIn = function(source, pattern) {
|
|
53661
|
-
var
|
|
53662
|
-
return
|
|
53660
|
+
var path4 = Path2.parse(pattern);
|
|
53661
|
+
return path4.getIn(source);
|
|
53663
53662
|
};
|
|
53664
53663
|
Path2.setIn = function(source, pattern, value) {
|
|
53665
|
-
var
|
|
53666
|
-
return
|
|
53664
|
+
var path4 = Path2.parse(pattern);
|
|
53665
|
+
return path4.setIn(source, value);
|
|
53667
53666
|
};
|
|
53668
53667
|
Path2.deleteIn = function(source, pattern) {
|
|
53669
|
-
var
|
|
53670
|
-
return
|
|
53668
|
+
var path4 = Path2.parse(pattern);
|
|
53669
|
+
return path4.deleteIn(source);
|
|
53671
53670
|
};
|
|
53672
53671
|
Path2.existIn = function(source, pattern, start) {
|
|
53673
|
-
var
|
|
53674
|
-
return
|
|
53672
|
+
var path4 = Path2.parse(pattern);
|
|
53673
|
+
return path4.existIn(source, start);
|
|
53675
53674
|
};
|
|
53676
53675
|
Path2.ensureIn = function(source, pattern, defaultValue) {
|
|
53677
|
-
var
|
|
53678
|
-
return
|
|
53676
|
+
var path4 = Path2.parse(pattern);
|
|
53677
|
+
return path4.ensureIn(source, defaultValue);
|
|
53679
53678
|
};
|
|
53680
53679
|
return Path2;
|
|
53681
53680
|
}()
|
|
@@ -55494,9 +55493,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
|
|
|
55494
55493
|
var traverse = function(target, visitor) {
|
|
55495
55494
|
var seenObjects = [];
|
|
55496
55495
|
var root = target;
|
|
55497
|
-
var traverse2 = function(target2,
|
|
55498
|
-
if (
|
|
55499
|
-
|
|
55496
|
+
var traverse2 = function(target2, path4) {
|
|
55497
|
+
if (path4 === void 0) {
|
|
55498
|
+
path4 = [];
|
|
55500
55499
|
}
|
|
55501
55500
|
if (isPlainObj(target2)) {
|
|
55502
55501
|
var seenIndex = seenObjects.indexOf(target2);
|
|
@@ -55506,15 +55505,15 @@ var traverse = function(target, visitor) {
|
|
|
55506
55505
|
var addIndex = seenObjects.length;
|
|
55507
55506
|
seenObjects.push(target2);
|
|
55508
55507
|
if (isNoNeedCompileObject(target2) && root !== target2) {
|
|
55509
|
-
visitor(target2,
|
|
55508
|
+
visitor(target2, path4);
|
|
55510
55509
|
return;
|
|
55511
55510
|
}
|
|
55512
55511
|
each(target2, function(value, key) {
|
|
55513
|
-
traverse2(value,
|
|
55512
|
+
traverse2(value, path4.concat(key));
|
|
55514
55513
|
});
|
|
55515
55514
|
seenObjects.splice(addIndex, 1);
|
|
55516
55515
|
} else {
|
|
55517
|
-
visitor(target2,
|
|
55516
|
+
visitor(target2, path4);
|
|
55518
55517
|
}
|
|
55519
55518
|
};
|
|
55520
55519
|
traverse2(target);
|
|
@@ -55525,24 +55524,24 @@ var traverseSchema = function(schema, visitor) {
|
|
|
55525
55524
|
}
|
|
55526
55525
|
var seenObjects = [];
|
|
55527
55526
|
var root = schema;
|
|
55528
|
-
var traverse2 = function(target,
|
|
55527
|
+
var traverse2 = function(target, path4) {
|
|
55529
55528
|
var _a2;
|
|
55530
|
-
if (
|
|
55531
|
-
|
|
55529
|
+
if (path4 === void 0) {
|
|
55530
|
+
path4 = [];
|
|
55532
55531
|
}
|
|
55533
|
-
if (
|
|
55532
|
+
if (path4[0] === "x-compile-omitted" || path4[0] === "x-validator" || path4[0] === "version" || path4[0] === "_isJSONSchemaObject")
|
|
55534
55533
|
return;
|
|
55535
|
-
if (String(
|
|
55534
|
+
if (String(path4[0]).indexOf("x-") == -1 && isFn(target))
|
|
55536
55535
|
return;
|
|
55537
|
-
if (SchemaNestedMap[
|
|
55536
|
+
if (SchemaNestedMap[path4[0]])
|
|
55538
55537
|
return;
|
|
55539
|
-
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(
|
|
55540
|
-
visitor(target,
|
|
55538
|
+
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path4[0])) > -1) {
|
|
55539
|
+
visitor(target, path4, true);
|
|
55541
55540
|
return;
|
|
55542
55541
|
}
|
|
55543
55542
|
if (isPlainObj(target)) {
|
|
55544
|
-
if (
|
|
55545
|
-
visitor(target,
|
|
55543
|
+
if (path4[0] === "default" || path4[0] === "x-value") {
|
|
55544
|
+
visitor(target, path4);
|
|
55546
55545
|
return;
|
|
55547
55546
|
}
|
|
55548
55547
|
var seenIndex = seenObjects.indexOf(target);
|
|
@@ -55552,15 +55551,15 @@ var traverseSchema = function(schema, visitor) {
|
|
|
55552
55551
|
var addIndex = seenObjects.length;
|
|
55553
55552
|
seenObjects.push(target);
|
|
55554
55553
|
if (isNoNeedCompileObject(target) && root !== target) {
|
|
55555
|
-
visitor(target,
|
|
55554
|
+
visitor(target, path4);
|
|
55556
55555
|
return;
|
|
55557
55556
|
}
|
|
55558
55557
|
each(target, function(value, key) {
|
|
55559
|
-
traverse2(value,
|
|
55558
|
+
traverse2(value, path4.concat(key));
|
|
55560
55559
|
});
|
|
55561
55560
|
seenObjects.splice(addIndex, 1);
|
|
55562
55561
|
} else {
|
|
55563
|
-
visitor(target,
|
|
55562
|
+
visitor(target, path4);
|
|
55564
55563
|
}
|
|
55565
55564
|
};
|
|
55566
55565
|
traverse2(schema);
|
|
@@ -55604,8 +55603,8 @@ var createDataSource = function(source) {
|
|
|
55604
55603
|
var patchStateFormSchema = function(targetState, pattern, compiled) {
|
|
55605
55604
|
untracked(function() {
|
|
55606
55605
|
var _a2;
|
|
55607
|
-
var
|
|
55608
|
-
var segments =
|
|
55606
|
+
var path4 = Path.parse(pattern);
|
|
55607
|
+
var segments = path4.segments;
|
|
55609
55608
|
var key = segments[0];
|
|
55610
55609
|
var isEnum = key === "enum" && isArr(compiled);
|
|
55611
55610
|
var schemaMapKey = SchemaStateMap[key];
|
|
@@ -55689,14 +55688,14 @@ var compile = function(source, scope) {
|
|
|
55689
55688
|
};
|
|
55690
55689
|
var patchCompile = function(targetState, sourceState, scope) {
|
|
55691
55690
|
traverse(sourceState, function(value, pattern) {
|
|
55692
|
-
var
|
|
55691
|
+
var path4 = Path.parse(pattern);
|
|
55693
55692
|
var compiled = compile(value, scope);
|
|
55694
|
-
var key =
|
|
55693
|
+
var key = path4.segments[0];
|
|
55695
55694
|
if (compiled === void 0)
|
|
55696
55695
|
return;
|
|
55697
55696
|
if (hasOwnProperty4.call(targetState, key)) {
|
|
55698
55697
|
untracked(function() {
|
|
55699
|
-
return Path.setIn(targetState,
|
|
55698
|
+
return Path.setIn(targetState, path4, compiled);
|
|
55700
55699
|
});
|
|
55701
55700
|
}
|
|
55702
55701
|
});
|
|
@@ -55705,7 +55704,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
|
55705
55704
|
if (demand === void 0) {
|
|
55706
55705
|
demand = false;
|
|
55707
55706
|
}
|
|
55708
|
-
traverseSchema(sourceSchema, function(value,
|
|
55707
|
+
traverseSchema(sourceSchema, function(value, path4, omitCompile) {
|
|
55709
55708
|
var compiled = value;
|
|
55710
55709
|
var collected = hasCollected(function() {
|
|
55711
55710
|
if (!omitCompile) {
|
|
@@ -55716,10 +55715,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
|
55716
55715
|
return;
|
|
55717
55716
|
if (demand) {
|
|
55718
55717
|
if (collected || !targetState.initialized) {
|
|
55719
|
-
patchStateFormSchema(targetState,
|
|
55718
|
+
patchStateFormSchema(targetState, path4, compiled);
|
|
55720
55719
|
}
|
|
55721
55720
|
} else {
|
|
55722
|
-
patchStateFormSchema(targetState,
|
|
55721
|
+
patchStateFormSchema(targetState, path4, compiled);
|
|
55723
55722
|
}
|
|
55724
55723
|
});
|
|
55725
55724
|
};
|
|
@@ -56003,14 +56002,14 @@ var getISOCode = function(language) {
|
|
|
56003
56002
|
});
|
|
56004
56003
|
return isoCode;
|
|
56005
56004
|
};
|
|
56006
|
-
var getLocaleByPath = function(
|
|
56005
|
+
var getLocaleByPath = function(path4, lang) {
|
|
56007
56006
|
if (lang === void 0) {
|
|
56008
56007
|
lang = registry.locales.language;
|
|
56009
56008
|
}
|
|
56010
|
-
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(
|
|
56009
|
+
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path4));
|
|
56011
56010
|
};
|
|
56012
|
-
var getValidateLocale = function(
|
|
56013
|
-
var message = getLocaleByPath(
|
|
56011
|
+
var getValidateLocale = function(path4) {
|
|
56012
|
+
var message = getLocaleByPath(path4);
|
|
56014
56013
|
return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
|
|
56015
56014
|
};
|
|
56016
56015
|
var getValidateMessageTemplateEngine = function() {
|
|
@@ -57271,15 +57270,15 @@ var buildFieldPath = function(field) {
|
|
|
57271
57270
|
var buildDataPath = function(fields, pattern) {
|
|
57272
57271
|
var prevArray = false;
|
|
57273
57272
|
var segments = pattern.segments;
|
|
57274
|
-
var
|
|
57275
|
-
var currentPath =
|
|
57273
|
+
var path4 = segments.reduce(function(path5, key, index) {
|
|
57274
|
+
var currentPath = path5.concat(key);
|
|
57276
57275
|
var currentAddress = segments.slice(0, index + 1);
|
|
57277
57276
|
var current = fields[currentAddress.join(".")];
|
|
57278
57277
|
if (prevArray) {
|
|
57279
57278
|
if (!isVoidField(current)) {
|
|
57280
57279
|
prevArray = false;
|
|
57281
57280
|
}
|
|
57282
|
-
return
|
|
57281
|
+
return path5;
|
|
57283
57282
|
}
|
|
57284
57283
|
if (index >= segments.length - 1) {
|
|
57285
57284
|
return currentPath;
|
|
@@ -57291,13 +57290,13 @@ var buildDataPath = function(fields, pattern) {
|
|
|
57291
57290
|
prevArray = true;
|
|
57292
57291
|
return currentPath;
|
|
57293
57292
|
}
|
|
57294
|
-
return
|
|
57293
|
+
return path5;
|
|
57295
57294
|
} else {
|
|
57296
57295
|
prevArray = false;
|
|
57297
57296
|
}
|
|
57298
57297
|
return currentPath;
|
|
57299
57298
|
}, []);
|
|
57300
|
-
return new Path(
|
|
57299
|
+
return new Path(path4);
|
|
57301
57300
|
};
|
|
57302
57301
|
var locateNode = function(field, address) {
|
|
57303
57302
|
field.address = Path.parse(address);
|
|
@@ -57331,33 +57330,33 @@ var destroy = function(target, address, forceClear) {
|
|
|
57331
57330
|
field === null || field === void 0 ? void 0 : field.dispose();
|
|
57332
57331
|
if (isDataField(field) && forceClear) {
|
|
57333
57332
|
var form = field.form;
|
|
57334
|
-
var
|
|
57335
|
-
form.deleteValuesIn(
|
|
57336
|
-
form.deleteInitialValuesIn(
|
|
57333
|
+
var path4 = field.path;
|
|
57334
|
+
form.deleteValuesIn(path4);
|
|
57335
|
+
form.deleteInitialValuesIn(path4);
|
|
57337
57336
|
}
|
|
57338
57337
|
delete target[address];
|
|
57339
57338
|
};
|
|
57340
|
-
var patchFormValues = function(form,
|
|
57341
|
-
var update = function(
|
|
57342
|
-
if (
|
|
57343
|
-
form.setValuesIn(
|
|
57339
|
+
var patchFormValues = function(form, path4, source) {
|
|
57340
|
+
var update = function(path5, source2) {
|
|
57341
|
+
if (path5.length) {
|
|
57342
|
+
form.setValuesIn(path5, clone(source2));
|
|
57344
57343
|
} else {
|
|
57345
57344
|
Object.assign(form.values, clone(source2));
|
|
57346
57345
|
}
|
|
57347
57346
|
};
|
|
57348
|
-
var patch = function(source2,
|
|
57349
|
-
if (
|
|
57350
|
-
|
|
57347
|
+
var patch = function(source2, path5) {
|
|
57348
|
+
if (path5 === void 0) {
|
|
57349
|
+
path5 = [];
|
|
57351
57350
|
}
|
|
57352
|
-
var targetValue = form.getValuesIn(
|
|
57353
|
-
var targetField = form.query(
|
|
57351
|
+
var targetValue = form.getValuesIn(path5);
|
|
57352
|
+
var targetField = form.query(path5).take();
|
|
57354
57353
|
var isUnVoidField = targetField && !isVoidField(targetField);
|
|
57355
57354
|
if (isUnVoidField && targetField.display === "none") {
|
|
57356
57355
|
targetField.caches.value = clone(source2);
|
|
57357
57356
|
return;
|
|
57358
57357
|
}
|
|
57359
57358
|
if (allowAssignDefaultValue(targetValue, source2)) {
|
|
57360
|
-
update(
|
|
57359
|
+
update(path5, source2);
|
|
57361
57360
|
} else {
|
|
57362
57361
|
if (isEmpty(source2))
|
|
57363
57362
|
return;
|
|
@@ -57365,20 +57364,20 @@ var patchFormValues = function(form, path6, source) {
|
|
|
57365
57364
|
return;
|
|
57366
57365
|
if (isPlainObj(targetValue) && isPlainObj(source2)) {
|
|
57367
57366
|
each(source2, function(value, key) {
|
|
57368
|
-
patch(value,
|
|
57367
|
+
patch(value, path5.concat(key));
|
|
57369
57368
|
});
|
|
57370
57369
|
} else {
|
|
57371
57370
|
if (targetField) {
|
|
57372
57371
|
if (isUnVoidField && !targetField.selfModified) {
|
|
57373
|
-
update(
|
|
57372
|
+
update(path5, source2);
|
|
57374
57373
|
}
|
|
57375
57374
|
} else if (form.initialized) {
|
|
57376
|
-
update(
|
|
57375
|
+
update(path5, source2);
|
|
57377
57376
|
}
|
|
57378
57377
|
}
|
|
57379
57378
|
}
|
|
57380
57379
|
};
|
|
57381
|
-
patch(source,
|
|
57380
|
+
patch(source, path4);
|
|
57382
57381
|
};
|
|
57383
57382
|
var matchFeedback = function(search, feedback) {
|
|
57384
57383
|
if (!search || !feedback)
|
|
@@ -57801,13 +57800,13 @@ var createBatchStateSetter = function(form) {
|
|
|
57801
57800
|
} else if (isGeneralField(pattern)) {
|
|
57802
57801
|
pattern.setState(payload);
|
|
57803
57802
|
} else {
|
|
57804
|
-
var matchCount_1 = 0,
|
|
57805
|
-
form.query(
|
|
57803
|
+
var matchCount_1 = 0, path4 = Path.parse(pattern);
|
|
57804
|
+
form.query(path4).forEach(function(field) {
|
|
57806
57805
|
field.setState(payload);
|
|
57807
57806
|
matchCount_1++;
|
|
57808
57807
|
});
|
|
57809
|
-
if (matchCount_1 === 0 ||
|
|
57810
|
-
subscribeUpdate(form,
|
|
57808
|
+
if (matchCount_1 === 0 || path4.isWildMatchPattern) {
|
|
57809
|
+
subscribeUpdate(form, path4, payload);
|
|
57811
57810
|
}
|
|
57812
57811
|
}
|
|
57813
57812
|
});
|
|
@@ -60423,8 +60422,8 @@ var FieldEffects = {
|
|
|
60423
60422
|
};
|
|
60424
60423
|
var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
|
|
60425
60424
|
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(
|
|
60425
|
+
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path4 = _a2[1];
|
|
60426
|
+
return field.query(target).getIn(path4 || property || "value");
|
|
60428
60427
|
};
|
|
60429
60428
|
var getDependencies = function(field, dependencies) {
|
|
60430
60429
|
if (isArr(dependencies)) {
|
|
@@ -61054,10 +61053,10 @@ var Schema = (
|
|
|
61054
61053
|
}()
|
|
61055
61054
|
);
|
|
61056
61055
|
|
|
61057
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
61056
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
61058
61057
|
var import_inquirer = __toESM(require_inquirer());
|
|
61059
61058
|
|
|
61060
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
61059
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
61061
61060
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
61062
61061
|
function validateSchema(schema) {
|
|
61063
61062
|
const { type, properties } = schema;
|
|
@@ -61149,7 +61148,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
61149
61148
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
61150
61149
|
}
|
|
61151
61150
|
|
|
61152
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
61151
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
61153
61152
|
var compileRule = (rule, scope) => {
|
|
61154
61153
|
const state = Schema.compile(rule, {
|
|
61155
61154
|
$self: {},
|
|
@@ -61253,7 +61252,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
61253
61252
|
return answers;
|
|
61254
61253
|
}
|
|
61255
61254
|
|
|
61256
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
61255
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
61257
61256
|
var CLIReader = class {
|
|
61258
61257
|
getAnswers() {
|
|
61259
61258
|
return this.answers;
|
|
@@ -61282,7 +61281,7 @@ var CLIReader = class {
|
|
|
61282
61281
|
}
|
|
61283
61282
|
};
|
|
61284
61283
|
|
|
61285
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61284
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
61286
61285
|
var import_utils13 = require("@modern-js/utils");
|
|
61287
61286
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
61288
61287
|
var import_comment_json = __toESM(require_src2());
|
|
@@ -61351,7 +61350,7 @@ var I18n = class {
|
|
|
61351
61350
|
}
|
|
61352
61351
|
};
|
|
61353
61352
|
|
|
61354
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61353
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
61355
61354
|
var EN_LOCALE = {
|
|
61356
61355
|
environment: {
|
|
61357
61356
|
node_version: "please upgrade node to lts version",
|
|
@@ -61378,7 +61377,7 @@ var EN_LOCALE = {
|
|
|
61378
61377
|
}
|
|
61379
61378
|
};
|
|
61380
61379
|
|
|
61381
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61380
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
61382
61381
|
var ZH_LOCALE = {
|
|
61383
61382
|
environment: {
|
|
61384
61383
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -61405,14 +61404,14 @@ var ZH_LOCALE = {
|
|
|
61405
61404
|
}
|
|
61406
61405
|
};
|
|
61407
61406
|
|
|
61408
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61407
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
61409
61408
|
var i18n = new I18n();
|
|
61410
61409
|
var localeKeys = i18n.init("zh", {
|
|
61411
61410
|
zh: ZH_LOCALE,
|
|
61412
61411
|
en: EN_LOCALE
|
|
61413
61412
|
});
|
|
61414
61413
|
|
|
61415
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61414
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
61416
61415
|
var import_path4 = __toESM(require("path"));
|
|
61417
61416
|
var import_utils12 = require("@modern-js/utils");
|
|
61418
61417
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -61460,7 +61459,7 @@ async function checkUseNvm(cwd, logger) {
|
|
|
61460
61459
|
}
|
|
61461
61460
|
}
|
|
61462
61461
|
|
|
61463
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61462
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
61464
61463
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
|
61465
61464
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
61466
61465
|
for (const question of questions) {
|
|
@@ -61488,7 +61487,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
61488
61487
|
return questions;
|
|
61489
61488
|
}
|
|
61490
61489
|
|
|
61491
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
61490
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
61492
61491
|
var AppAPI = class {
|
|
61493
61492
|
async checkEnvironment(nodeVersion) {
|
|
61494
61493
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -62010,11 +62009,6 @@ var BaseDefaultConfig = {
|
|
|
62010
62009
|
packageManager: PackageManager.Pnpm
|
|
62011
62010
|
};
|
|
62012
62011
|
|
|
62013
|
-
// ../../generator-utils/dist/esm/index.js
|
|
62014
|
-
var import_path5 = __toESM(require("path"));
|
|
62015
|
-
var import_utils15 = require("@modern-js/utils");
|
|
62016
|
-
var import_utils16 = require("@modern-js/utils");
|
|
62017
|
-
|
|
62018
62012
|
// src/index.ts
|
|
62019
62013
|
var handleTemplateFile = async (context, generator, appApi) => {
|
|
62020
62014
|
const { hasPlugin, generatorPlugin, ...extra } = context.config;
|
|
@@ -62050,7 +62044,6 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62050
62044
|
(resourceKey) => resourceKey.replace("templates/pnpm-template/npmrc", ".npmrc").replace(".handlebars", "")
|
|
62051
62045
|
);
|
|
62052
62046
|
}
|
|
62053
|
-
import_utils16.fs.chmodSync(import_path6.default.join(generator.outputPath, ".husky", "pre-commit"), "755");
|
|
62054
62047
|
};
|
|
62055
62048
|
var src_default = async (context, generator) => {
|
|
62056
62049
|
const appApi = new AppAPI(context, generator);
|