@modern-js/router-v5-generator 3.3.9 → 3.3.11
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 +265 -258
- package/package.json +10 -10
- package/src/index.ts +7 -11
package/dist/index.js
CHANGED
|
@@ -9104,13 +9104,13 @@ var require_ast = __commonJS({
|
|
|
9104
9104
|
helperExpression: function helperExpression(node) {
|
|
9105
9105
|
return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
|
|
9106
9106
|
},
|
|
9107
|
-
scopedId: function scopedId(
|
|
9108
|
-
return /^\.|this\b/.test(
|
|
9107
|
+
scopedId: function scopedId(path7) {
|
|
9108
|
+
return /^\.|this\b/.test(path7.original);
|
|
9109
9109
|
},
|
|
9110
9110
|
// an ID is simple if it only has one part, and that part is not
|
|
9111
9111
|
// `..` or `this`.
|
|
9112
|
-
simpleId: function simpleId(
|
|
9113
|
-
return
|
|
9112
|
+
simpleId: function simpleId(path7) {
|
|
9113
|
+
return path7.parts.length === 1 && !AST.helpers.scopedId(path7) && !path7.depth;
|
|
9114
9114
|
}
|
|
9115
9115
|
}
|
|
9116
9116
|
};
|
|
@@ -10194,12 +10194,12 @@ var require_helpers2 = __commonJS({
|
|
|
10194
10194
|
loc
|
|
10195
10195
|
};
|
|
10196
10196
|
}
|
|
10197
|
-
function prepareMustache(
|
|
10197
|
+
function prepareMustache(path7, params, hash, open, strip, locInfo) {
|
|
10198
10198
|
var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
|
|
10199
10199
|
var decorator = /\*/.test(open);
|
|
10200
10200
|
return {
|
|
10201
10201
|
type: decorator ? "Decorator" : "MustacheStatement",
|
|
10202
|
-
path:
|
|
10202
|
+
path: path7,
|
|
10203
10203
|
params,
|
|
10204
10204
|
hash,
|
|
10205
10205
|
escaped,
|
|
@@ -10470,9 +10470,9 @@ var require_compiler = __commonJS({
|
|
|
10470
10470
|
},
|
|
10471
10471
|
DecoratorBlock: function DecoratorBlock(decorator) {
|
|
10472
10472
|
var program = decorator.program && this.compileProgram(decorator.program);
|
|
10473
|
-
var params = this.setupFullMustacheParams(decorator, program, void 0),
|
|
10473
|
+
var params = this.setupFullMustacheParams(decorator, program, void 0), path7 = decorator.path;
|
|
10474
10474
|
this.useDecorators = true;
|
|
10475
|
-
this.opcode("registerDecorator", params.length,
|
|
10475
|
+
this.opcode("registerDecorator", params.length, path7.original);
|
|
10476
10476
|
},
|
|
10477
10477
|
PartialStatement: function PartialStatement(partial) {
|
|
10478
10478
|
this.usePartial = true;
|
|
@@ -10536,46 +10536,46 @@ var require_compiler = __commonJS({
|
|
|
10536
10536
|
}
|
|
10537
10537
|
},
|
|
10538
10538
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
|
10539
|
-
var
|
|
10540
|
-
this.opcode("getContext",
|
|
10539
|
+
var path7 = sexpr.path, name = path7.parts[0], isBlock = program != null || inverse != null;
|
|
10540
|
+
this.opcode("getContext", path7.depth);
|
|
10541
10541
|
this.opcode("pushProgram", program);
|
|
10542
10542
|
this.opcode("pushProgram", inverse);
|
|
10543
|
-
|
|
10544
|
-
this.accept(
|
|
10543
|
+
path7.strict = true;
|
|
10544
|
+
this.accept(path7);
|
|
10545
10545
|
this.opcode("invokeAmbiguous", name, isBlock);
|
|
10546
10546
|
},
|
|
10547
10547
|
simpleSexpr: function simpleSexpr(sexpr) {
|
|
10548
|
-
var
|
|
10549
|
-
|
|
10550
|
-
this.accept(
|
|
10548
|
+
var path7 = sexpr.path;
|
|
10549
|
+
path7.strict = true;
|
|
10550
|
+
this.accept(path7);
|
|
10551
10551
|
this.opcode("resolvePossibleLambda");
|
|
10552
10552
|
},
|
|
10553
10553
|
helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
|
10554
|
-
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
|
10554
|
+
var params = this.setupFullMustacheParams(sexpr, program, inverse), path7 = sexpr.path, name = path7.parts[0];
|
|
10555
10555
|
if (this.options.knownHelpers[name]) {
|
|
10556
10556
|
this.opcode("invokeKnownHelper", params.length, name);
|
|
10557
10557
|
} else if (this.options.knownHelpersOnly) {
|
|
10558
10558
|
throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
|
|
10559
10559
|
} else {
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
this.accept(
|
|
10563
|
-
this.opcode("invokeHelper", params.length,
|
|
10560
|
+
path7.strict = true;
|
|
10561
|
+
path7.falsy = true;
|
|
10562
|
+
this.accept(path7);
|
|
10563
|
+
this.opcode("invokeHelper", params.length, path7.original, _ast2["default"].helpers.simpleId(path7));
|
|
10564
10564
|
}
|
|
10565
10565
|
},
|
|
10566
|
-
PathExpression: function PathExpression(
|
|
10567
|
-
this.addDepth(
|
|
10568
|
-
this.opcode("getContext",
|
|
10569
|
-
var name =
|
|
10566
|
+
PathExpression: function PathExpression(path7) {
|
|
10567
|
+
this.addDepth(path7.depth);
|
|
10568
|
+
this.opcode("getContext", path7.depth);
|
|
10569
|
+
var name = path7.parts[0], scoped = _ast2["default"].helpers.scopedId(path7), blockParamId = !path7.depth && !scoped && this.blockParamIndex(name);
|
|
10570
10570
|
if (blockParamId) {
|
|
10571
|
-
this.opcode("lookupBlockParam", blockParamId,
|
|
10571
|
+
this.opcode("lookupBlockParam", blockParamId, path7.parts);
|
|
10572
10572
|
} else if (!name) {
|
|
10573
10573
|
this.opcode("pushContext");
|
|
10574
|
-
} else if (
|
|
10574
|
+
} else if (path7.data) {
|
|
10575
10575
|
this.options.data = true;
|
|
10576
|
-
this.opcode("lookupData",
|
|
10576
|
+
this.opcode("lookupData", path7.depth, path7.parts, path7.strict);
|
|
10577
10577
|
} else {
|
|
10578
|
-
this.opcode("lookupOnContext",
|
|
10578
|
+
this.opcode("lookupOnContext", path7.parts, path7.falsy, path7.strict, scoped);
|
|
10579
10579
|
}
|
|
10580
10580
|
},
|
|
10581
10581
|
StringLiteral: function StringLiteral(string) {
|
|
@@ -10929,16 +10929,16 @@ var require_util2 = __commonJS({
|
|
|
10929
10929
|
}
|
|
10930
10930
|
exports.urlGenerate = urlGenerate;
|
|
10931
10931
|
function normalize(aPath) {
|
|
10932
|
-
var
|
|
10932
|
+
var path7 = aPath;
|
|
10933
10933
|
var url = urlParse(aPath);
|
|
10934
10934
|
if (url) {
|
|
10935
10935
|
if (!url.path) {
|
|
10936
10936
|
return aPath;
|
|
10937
10937
|
}
|
|
10938
|
-
|
|
10938
|
+
path7 = url.path;
|
|
10939
10939
|
}
|
|
10940
|
-
var isAbsolute = exports.isAbsolute(
|
|
10941
|
-
var parts =
|
|
10940
|
+
var isAbsolute = exports.isAbsolute(path7);
|
|
10941
|
+
var parts = path7.split(/\/+/);
|
|
10942
10942
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
10943
10943
|
part = parts[i];
|
|
10944
10944
|
if (part === ".") {
|
|
@@ -10955,15 +10955,15 @@ var require_util2 = __commonJS({
|
|
|
10955
10955
|
}
|
|
10956
10956
|
}
|
|
10957
10957
|
}
|
|
10958
|
-
|
|
10959
|
-
if (
|
|
10960
|
-
|
|
10958
|
+
path7 = parts.join("/");
|
|
10959
|
+
if (path7 === "") {
|
|
10960
|
+
path7 = isAbsolute ? "/" : ".";
|
|
10961
10961
|
}
|
|
10962
10962
|
if (url) {
|
|
10963
|
-
url.path =
|
|
10963
|
+
url.path = path7;
|
|
10964
10964
|
return urlGenerate(url);
|
|
10965
10965
|
}
|
|
10966
|
-
return
|
|
10966
|
+
return path7;
|
|
10967
10967
|
}
|
|
10968
10968
|
exports.normalize = normalize;
|
|
10969
10969
|
function join(aRoot, aPath) {
|
|
@@ -13753,8 +13753,8 @@ var require_printer = __commonJS({
|
|
|
13753
13753
|
return this.accept(sexpr.path) + " " + params + hash;
|
|
13754
13754
|
};
|
|
13755
13755
|
PrintVisitor.prototype.PathExpression = function(id) {
|
|
13756
|
-
var
|
|
13757
|
-
return (id.data ? "@" : "") + "PATH:" +
|
|
13756
|
+
var path7 = id.parts.join("/");
|
|
13757
|
+
return (id.data ? "@" : "") + "PATH:" + path7;
|
|
13758
13758
|
};
|
|
13759
13759
|
PrintVisitor.prototype.StringLiteral = function(string) {
|
|
13760
13760
|
return '"' + string.value + '"';
|
|
@@ -13983,7 +13983,7 @@ var require_ejs = __commonJS({
|
|
|
13983
13983
|
"../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/ejs.js"(exports) {
|
|
13984
13984
|
"use strict";
|
|
13985
13985
|
var fs8 = require("fs");
|
|
13986
|
-
var
|
|
13986
|
+
var path7 = require("path");
|
|
13987
13987
|
var utils = require_utils2();
|
|
13988
13988
|
var scopeOptionWarned = false;
|
|
13989
13989
|
var _VERSION_STRING = require_package().version;
|
|
@@ -14014,9 +14014,9 @@ var require_ejs = __commonJS({
|
|
|
14014
14014
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
14015
14015
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
14016
14016
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
14017
|
-
var dirname =
|
|
14018
|
-
var extname =
|
|
14019
|
-
var resolve =
|
|
14017
|
+
var dirname = path7.dirname;
|
|
14018
|
+
var extname = path7.extname;
|
|
14019
|
+
var resolve = path7.resolve;
|
|
14020
14020
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
|
14021
14021
|
var ext = extname(name);
|
|
14022
14022
|
if (!ext) {
|
|
@@ -14033,30 +14033,30 @@ var require_ejs = __commonJS({
|
|
|
14033
14033
|
return filePath;
|
|
14034
14034
|
}
|
|
14035
14035
|
}
|
|
14036
|
-
function getIncludePath(
|
|
14036
|
+
function getIncludePath(path8, options) {
|
|
14037
14037
|
var includePath;
|
|
14038
14038
|
var filePath;
|
|
14039
14039
|
var views = options.views;
|
|
14040
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(
|
|
14040
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path8);
|
|
14041
14041
|
if (match && match.length) {
|
|
14042
|
-
|
|
14042
|
+
path8 = path8.replace(/^\/*/, "");
|
|
14043
14043
|
if (Array.isArray(options.root)) {
|
|
14044
|
-
includePath = resolvePaths(
|
|
14044
|
+
includePath = resolvePaths(path8, options.root);
|
|
14045
14045
|
} else {
|
|
14046
|
-
includePath = exports.resolveInclude(
|
|
14046
|
+
includePath = exports.resolveInclude(path8, options.root || "/", true);
|
|
14047
14047
|
}
|
|
14048
14048
|
} else {
|
|
14049
14049
|
if (options.filename) {
|
|
14050
|
-
filePath = exports.resolveInclude(
|
|
14050
|
+
filePath = exports.resolveInclude(path8, options.filename);
|
|
14051
14051
|
if (fs8.existsSync(filePath)) {
|
|
14052
14052
|
includePath = filePath;
|
|
14053
14053
|
}
|
|
14054
14054
|
}
|
|
14055
14055
|
if (!includePath && Array.isArray(views)) {
|
|
14056
|
-
includePath = resolvePaths(
|
|
14056
|
+
includePath = resolvePaths(path8, views);
|
|
14057
14057
|
}
|
|
14058
14058
|
if (!includePath && typeof options.includer !== "function") {
|
|
14059
|
-
throw new Error('Could not find the include file "' + options.escapeFunction(
|
|
14059
|
+
throw new Error('Could not find the include file "' + options.escapeFunction(path8) + '"');
|
|
14060
14060
|
}
|
|
14061
14061
|
}
|
|
14062
14062
|
return includePath;
|
|
@@ -14115,11 +14115,11 @@ var require_ejs = __commonJS({
|
|
|
14115
14115
|
function fileLoader(filePath) {
|
|
14116
14116
|
return exports.fileLoader(filePath);
|
|
14117
14117
|
}
|
|
14118
|
-
function includeFile(
|
|
14118
|
+
function includeFile(path8, options) {
|
|
14119
14119
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
14120
|
-
opts.filename = getIncludePath(
|
|
14120
|
+
opts.filename = getIncludePath(path8, opts);
|
|
14121
14121
|
if (typeof options.includer === "function") {
|
|
14122
|
-
var includerResult = options.includer(
|
|
14122
|
+
var includerResult = options.includer(path8, opts.filename);
|
|
14123
14123
|
if (includerResult) {
|
|
14124
14124
|
if (includerResult.filename) {
|
|
14125
14125
|
opts.filename = includerResult.filename;
|
|
@@ -14354,12 +14354,12 @@ var require_ejs = __commonJS({
|
|
|
14354
14354
|
throw e;
|
|
14355
14355
|
}
|
|
14356
14356
|
var returnedFn = opts.client ? fn : function anonymous(data) {
|
|
14357
|
-
var include = function(
|
|
14357
|
+
var include = function(path8, includeData) {
|
|
14358
14358
|
var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
|
14359
14359
|
if (includeData) {
|
|
14360
14360
|
d = utils.shallowCopy(d, includeData);
|
|
14361
14361
|
}
|
|
14362
|
-
return includeFile(
|
|
14362
|
+
return includeFile(path8, opts)(d);
|
|
14363
14363
|
};
|
|
14364
14364
|
return fn.apply(
|
|
14365
14365
|
opts.context,
|
|
@@ -14368,7 +14368,7 @@ var require_ejs = __commonJS({
|
|
|
14368
14368
|
};
|
|
14369
14369
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
14370
14370
|
var filename = opts.filename;
|
|
14371
|
-
var basename =
|
|
14371
|
+
var basename = path7.basename(filename, path7.extname(filename));
|
|
14372
14372
|
try {
|
|
14373
14373
|
Object.defineProperty(returnedFn, "name", {
|
|
14374
14374
|
value: basename,
|
|
@@ -17348,11 +17348,11 @@ var require_baseGet = __commonJS({
|
|
|
17348
17348
|
"use strict";
|
|
17349
17349
|
var castPath = require_castPath();
|
|
17350
17350
|
var toKey = require_toKey();
|
|
17351
|
-
function baseGet(object,
|
|
17352
|
-
|
|
17353
|
-
var index = 0, length =
|
|
17351
|
+
function baseGet(object, path7) {
|
|
17352
|
+
path7 = castPath(path7, object);
|
|
17353
|
+
var index = 0, length = path7.length;
|
|
17354
17354
|
while (object != null && index < length) {
|
|
17355
|
-
object = object[toKey(
|
|
17355
|
+
object = object[toKey(path7[index++])];
|
|
17356
17356
|
}
|
|
17357
17357
|
return index && index == length ? object : void 0;
|
|
17358
17358
|
}
|
|
@@ -17365,8 +17365,8 @@ var require_get = __commonJS({
|
|
|
17365
17365
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports, module2) {
|
|
17366
17366
|
"use strict";
|
|
17367
17367
|
var baseGet = require_baseGet();
|
|
17368
|
-
function get3(object,
|
|
17369
|
-
var result = object == null ? void 0 : baseGet(object,
|
|
17368
|
+
function get3(object, path7, defaultValue) {
|
|
17369
|
+
var result = object == null ? void 0 : baseGet(object, path7);
|
|
17370
17370
|
return result === void 0 ? defaultValue : result;
|
|
17371
17371
|
}
|
|
17372
17372
|
module2.exports = get3;
|
|
@@ -17453,14 +17453,14 @@ var require_baseSet = __commonJS({
|
|
|
17453
17453
|
var isIndex = require_isIndex();
|
|
17454
17454
|
var isObject4 = require_isObject();
|
|
17455
17455
|
var toKey = require_toKey();
|
|
17456
|
-
function baseSet(object,
|
|
17456
|
+
function baseSet(object, path7, value, customizer) {
|
|
17457
17457
|
if (!isObject4(object)) {
|
|
17458
17458
|
return object;
|
|
17459
17459
|
}
|
|
17460
|
-
|
|
17461
|
-
var index = -1, length =
|
|
17460
|
+
path7 = castPath(path7, object);
|
|
17461
|
+
var index = -1, length = path7.length, lastIndex = length - 1, nested = object;
|
|
17462
17462
|
while (nested != null && ++index < length) {
|
|
17463
|
-
var key = toKey(
|
|
17463
|
+
var key = toKey(path7[index]), newValue = value;
|
|
17464
17464
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
17465
17465
|
return object;
|
|
17466
17466
|
}
|
|
@@ -17468,7 +17468,7 @@ var require_baseSet = __commonJS({
|
|
|
17468
17468
|
var objValue = nested[key];
|
|
17469
17469
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
17470
17470
|
if (newValue === void 0) {
|
|
17471
|
-
newValue = isObject4(objValue) ? objValue : isIndex(
|
|
17471
|
+
newValue = isObject4(objValue) ? objValue : isIndex(path7[index + 1]) ? [] : {};
|
|
17472
17472
|
}
|
|
17473
17473
|
}
|
|
17474
17474
|
assignValue(nested, key, newValue);
|
|
@@ -17485,8 +17485,8 @@ var require_set = __commonJS({
|
|
|
17485
17485
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js"(exports, module2) {
|
|
17486
17486
|
"use strict";
|
|
17487
17487
|
var baseSet = require_baseSet();
|
|
17488
|
-
function set(object,
|
|
17489
|
-
return object == null ? object : baseSet(object,
|
|
17488
|
+
function set(object, path7, value) {
|
|
17489
|
+
return object == null ? object : baseSet(object, path7, value);
|
|
17490
17490
|
}
|
|
17491
17491
|
module2.exports = set;
|
|
17492
17492
|
}
|
|
@@ -30107,11 +30107,11 @@ var require_hasPath = __commonJS({
|
|
|
30107
30107
|
var isIndex = require_isIndex();
|
|
30108
30108
|
var isLength = require_isLength();
|
|
30109
30109
|
var toKey = require_toKey();
|
|
30110
|
-
function hasPath(object,
|
|
30111
|
-
|
|
30112
|
-
var index = -1, length =
|
|
30110
|
+
function hasPath(object, path7, hasFunc) {
|
|
30111
|
+
path7 = castPath(path7, object);
|
|
30112
|
+
var index = -1, length = path7.length, result = false;
|
|
30113
30113
|
while (++index < length) {
|
|
30114
|
-
var key = toKey(
|
|
30114
|
+
var key = toKey(path7[index]);
|
|
30115
30115
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
30116
30116
|
break;
|
|
30117
30117
|
}
|
|
@@ -30133,8 +30133,8 @@ var require_hasIn = __commonJS({
|
|
|
30133
30133
|
"use strict";
|
|
30134
30134
|
var baseHasIn = require_baseHasIn();
|
|
30135
30135
|
var hasPath = require_hasPath();
|
|
30136
|
-
function hasIn(object,
|
|
30137
|
-
return object != null && hasPath(object,
|
|
30136
|
+
function hasIn(object, path7) {
|
|
30137
|
+
return object != null && hasPath(object, path7, baseHasIn);
|
|
30138
30138
|
}
|
|
30139
30139
|
module2.exports = hasIn;
|
|
30140
30140
|
}
|
|
@@ -30153,13 +30153,13 @@ var require_baseMatchesProperty = __commonJS({
|
|
|
30153
30153
|
var toKey = require_toKey();
|
|
30154
30154
|
var COMPARE_PARTIAL_FLAG = 1;
|
|
30155
30155
|
var COMPARE_UNORDERED_FLAG = 2;
|
|
30156
|
-
function baseMatchesProperty(
|
|
30157
|
-
if (isKey(
|
|
30158
|
-
return matchesStrictComparable(toKey(
|
|
30156
|
+
function baseMatchesProperty(path7, srcValue) {
|
|
30157
|
+
if (isKey(path7) && isStrictComparable(srcValue)) {
|
|
30158
|
+
return matchesStrictComparable(toKey(path7), srcValue);
|
|
30159
30159
|
}
|
|
30160
30160
|
return function(object) {
|
|
30161
|
-
var objValue = get3(object,
|
|
30162
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object,
|
|
30161
|
+
var objValue = get3(object, path7);
|
|
30162
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path7) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
30163
30163
|
};
|
|
30164
30164
|
}
|
|
30165
30165
|
module2.exports = baseMatchesProperty;
|
|
@@ -30184,9 +30184,9 @@ var require_basePropertyDeep = __commonJS({
|
|
|
30184
30184
|
"../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports, module2) {
|
|
30185
30185
|
"use strict";
|
|
30186
30186
|
var baseGet = require_baseGet();
|
|
30187
|
-
function basePropertyDeep(
|
|
30187
|
+
function basePropertyDeep(path7) {
|
|
30188
30188
|
return function(object) {
|
|
30189
|
-
return baseGet(object,
|
|
30189
|
+
return baseGet(object, path7);
|
|
30190
30190
|
};
|
|
30191
30191
|
}
|
|
30192
30192
|
module2.exports = basePropertyDeep;
|
|
@@ -30201,8 +30201,8 @@ var require_property = __commonJS({
|
|
|
30201
30201
|
var basePropertyDeep = require_basePropertyDeep();
|
|
30202
30202
|
var isKey = require_isKey();
|
|
30203
30203
|
var toKey = require_toKey();
|
|
30204
|
-
function property(
|
|
30205
|
-
return isKey(
|
|
30204
|
+
function property(path7) {
|
|
30205
|
+
return isKey(path7) ? baseProperty(toKey(path7)) : basePropertyDeep(path7);
|
|
30206
30206
|
}
|
|
30207
30207
|
module2.exports = property;
|
|
30208
30208
|
}
|
|
@@ -31431,15 +31431,15 @@ var require_route = __commonJS({
|
|
|
31431
31431
|
};
|
|
31432
31432
|
}
|
|
31433
31433
|
function wrapConversion(toModel, graph) {
|
|
31434
|
-
const
|
|
31434
|
+
const path7 = [graph[toModel].parent, toModel];
|
|
31435
31435
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
31436
31436
|
let cur = graph[toModel].parent;
|
|
31437
31437
|
while (graph[cur].parent) {
|
|
31438
|
-
|
|
31438
|
+
path7.unshift(graph[cur].parent);
|
|
31439
31439
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
31440
31440
|
cur = graph[cur].parent;
|
|
31441
31441
|
}
|
|
31442
|
-
fn.conversion =
|
|
31442
|
+
fn.conversion = path7;
|
|
31443
31443
|
return fn;
|
|
31444
31444
|
}
|
|
31445
31445
|
module2.exports = function(fromModel) {
|
|
@@ -47555,16 +47555,16 @@ var require_os_tmpdir = __commonJS({
|
|
|
47555
47555
|
var isWindows = process.platform === "win32";
|
|
47556
47556
|
var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/;
|
|
47557
47557
|
module2.exports = function() {
|
|
47558
|
-
var
|
|
47558
|
+
var path7;
|
|
47559
47559
|
if (isWindows) {
|
|
47560
|
-
|
|
47560
|
+
path7 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
|
|
47561
47561
|
} else {
|
|
47562
|
-
|
|
47562
|
+
path7 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
|
|
47563
47563
|
}
|
|
47564
|
-
if (trailingSlashRe.test(
|
|
47565
|
-
|
|
47564
|
+
if (trailingSlashRe.test(path7)) {
|
|
47565
|
+
path7 = path7.slice(0, -1);
|
|
47566
47566
|
}
|
|
47567
|
-
return
|
|
47567
|
+
return path7;
|
|
47568
47568
|
};
|
|
47569
47569
|
}
|
|
47570
47570
|
});
|
|
@@ -47574,7 +47574,7 @@ var require_tmp = __commonJS({
|
|
|
47574
47574
|
"../../../../node_modules/.pnpm/tmp@0.0.33/node_modules/tmp/lib/tmp.js"(exports, module2) {
|
|
47575
47575
|
"use strict";
|
|
47576
47576
|
var fs8 = require("fs");
|
|
47577
|
-
var
|
|
47577
|
+
var path7 = require("path");
|
|
47578
47578
|
var crypto = require("crypto");
|
|
47579
47579
|
var osTmpDir = require_os_tmpdir();
|
|
47580
47580
|
var _c = process.binding("constants");
|
|
@@ -47616,7 +47616,7 @@ var require_tmp = __commonJS({
|
|
|
47616
47616
|
}
|
|
47617
47617
|
function _generateTmpName(opts) {
|
|
47618
47618
|
if (opts.name) {
|
|
47619
|
-
return
|
|
47619
|
+
return path7.join(opts.dir || tmpDir, opts.name);
|
|
47620
47620
|
}
|
|
47621
47621
|
if (opts.template) {
|
|
47622
47622
|
return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
@@ -47627,7 +47627,7 @@ var require_tmp = __commonJS({
|
|
|
47627
47627
|
_randomChars(12),
|
|
47628
47628
|
opts.postfix || ""
|
|
47629
47629
|
].join("");
|
|
47630
|
-
return
|
|
47630
|
+
return path7.join(opts.dir || tmpDir, name);
|
|
47631
47631
|
}
|
|
47632
47632
|
function tmpName(options, callback) {
|
|
47633
47633
|
var args = _parseArguments(options, callback), opts = args[0], cb = args[1], tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
|
|
@@ -47715,7 +47715,7 @@ var require_tmp = __commonJS({
|
|
|
47715
47715
|
do {
|
|
47716
47716
|
var dir2 = dirs.pop(), deferred = false, files = fs8.readdirSync(dir2);
|
|
47717
47717
|
for (var i = 0, length = files.length; i < length; i++) {
|
|
47718
|
-
var file2 =
|
|
47718
|
+
var file2 = path7.join(dir2, files[i]), stat = fs8.lstatSync(file2);
|
|
47719
47719
|
if (stat.isDirectory()) {
|
|
47720
47720
|
if (!deferred) {
|
|
47721
47721
|
deferred = true;
|
|
@@ -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, path7) {
|
|
48477
|
+
return path7.length < 2 ? object : baseGet(object, baseSlice(path7, 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, path7) {
|
|
48492
|
+
path7 = castPath(path7, object);
|
|
48493
|
+
object = parent(object, path7);
|
|
48494
|
+
return object == null || delete object[toKey(last(path7))];
|
|
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(path7) {
|
|
48604
|
+
path7 = castPath(path7, object);
|
|
48605
|
+
isDeep || (isDeep = path7.length > 1);
|
|
48606
|
+
return path7;
|
|
48607
48607
|
});
|
|
48608
48608
|
copyObject(object, getAllKeysIn(object), result);
|
|
48609
48609
|
if (isDeep) {
|
|
@@ -51054,7 +51054,7 @@ __export(src_exports, {
|
|
|
51054
51054
|
default: () => src_default
|
|
51055
51055
|
});
|
|
51056
51056
|
module.exports = __toCommonJS(src_exports);
|
|
51057
|
-
var
|
|
51057
|
+
var import_path7 = __toESM(require("path"));
|
|
51058
51058
|
|
|
51059
51059
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
|
|
51060
51060
|
function _define_property(obj, key, value) {
|
|
@@ -51065,12 +51065,12 @@ function _define_property(obj, key, value) {
|
|
|
51065
51065
|
return obj;
|
|
51066
51066
|
}
|
|
51067
51067
|
|
|
51068
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
51068
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
51069
51069
|
var import_utils13 = require("@modern-js/utils");
|
|
51070
51070
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
51071
51071
|
var import_comment_json = __toESM(require_src2());
|
|
51072
51072
|
|
|
51073
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51073
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
51074
51074
|
var import_utils = require("@modern-js/utils");
|
|
51075
51075
|
async function canUseNvm() {
|
|
51076
51076
|
try {
|
|
@@ -51120,7 +51120,7 @@ async function canUsePnpm() {
|
|
|
51120
51120
|
}
|
|
51121
51121
|
}
|
|
51122
51122
|
|
|
51123
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51123
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
51124
51124
|
var import_utils2 = require("@modern-js/utils");
|
|
51125
51125
|
function execaWithStreamLog(command, args, options) {
|
|
51126
51126
|
const promise = (0, import_utils2.execa)(command, args, {
|
|
@@ -51216,7 +51216,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
51216
51216
|
throw new Error("please install pnpm first");
|
|
51217
51217
|
}
|
|
51218
51218
|
|
|
51219
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51219
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
51220
51220
|
var NpmAPI = class {
|
|
51221
51221
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
51222
51222
|
return npmInstall({
|
|
@@ -51245,7 +51245,7 @@ var NpmAPI = class {
|
|
|
51245
51245
|
}
|
|
51246
51246
|
};
|
|
51247
51247
|
|
|
51248
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
51248
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
51249
51249
|
var import_utils4 = require("@modern-js/utils");
|
|
51250
51250
|
async function canUseGit() {
|
|
51251
51251
|
try {
|
|
@@ -51320,7 +51320,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
51320
51320
|
});
|
|
51321
51321
|
}
|
|
51322
51322
|
|
|
51323
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
51323
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
51324
51324
|
var GitAPI = class {
|
|
51325
51325
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
51326
51326
|
const canUse = await canUseGit();
|
|
@@ -51372,23 +51372,23 @@ var GitAPI = class {
|
|
|
51372
51372
|
}
|
|
51373
51373
|
};
|
|
51374
51374
|
|
|
51375
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
51375
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
51376
51376
|
var import_path = __toESM(require("path"));
|
|
51377
51377
|
var import_utils6 = require("@modern-js/utils");
|
|
51378
51378
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
51379
51379
|
|
|
51380
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
51380
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
51381
51381
|
var import_utils7 = require("@modern-js/utils");
|
|
51382
|
-
async function fsExists(
|
|
51382
|
+
async function fsExists(path7) {
|
|
51383
51383
|
try {
|
|
51384
|
-
await import_utils7.fs.access(
|
|
51384
|
+
await import_utils7.fs.access(path7);
|
|
51385
51385
|
return true;
|
|
51386
51386
|
} catch (e) {
|
|
51387
51387
|
return false;
|
|
51388
51388
|
}
|
|
51389
51389
|
}
|
|
51390
51390
|
|
|
51391
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
51391
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
51392
51392
|
var import_handlebars = __toESM(require_lib());
|
|
51393
51393
|
function renderString(template, fullData, registers) {
|
|
51394
51394
|
const helpers = {
|
|
@@ -51402,7 +51402,7 @@ function renderString(template, fullData, registers) {
|
|
|
51402
51402
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
51403
51403
|
}
|
|
51404
51404
|
|
|
51405
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
51405
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
51406
51406
|
var HandlebarsAPI = class {
|
|
51407
51407
|
async registerHelp(helpers) {
|
|
51408
51408
|
this.registers.helpers = {
|
|
@@ -51452,13 +51452,13 @@ var HandlebarsAPI = class {
|
|
|
51452
51452
|
}
|
|
51453
51453
|
};
|
|
51454
51454
|
|
|
51455
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
51455
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
51456
51456
|
var import_ejs = __toESM(require_ejs());
|
|
51457
51457
|
function renderString2(template, fullData) {
|
|
51458
51458
|
return import_ejs.default.render(template, fullData) || "";
|
|
51459
51459
|
}
|
|
51460
51460
|
|
|
51461
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
51461
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
51462
51462
|
var EjsAPI = class {
|
|
51463
51463
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
51464
51464
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -51491,7 +51491,7 @@ var EjsAPI = class {
|
|
|
51491
51491
|
}
|
|
51492
51492
|
};
|
|
51493
51493
|
|
|
51494
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
51494
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
51495
51495
|
var import_path2 = __toESM(require("path"));
|
|
51496
51496
|
var import_utils10 = require("@modern-js/utils");
|
|
51497
51497
|
var FsAPI = class {
|
|
@@ -52544,8 +52544,8 @@ var parseDestructorRules = function(node) {
|
|
|
52544
52544
|
};
|
|
52545
52545
|
var setInByDestructor = function(source, rules, value, mutators) {
|
|
52546
52546
|
rules.forEach(function(_a2) {
|
|
52547
|
-
var key = _a2.key,
|
|
52548
|
-
mutators.setIn([key], source, mutators.getIn(
|
|
52547
|
+
var key = _a2.key, path7 = _a2.path;
|
|
52548
|
+
mutators.setIn([key], source, mutators.getIn(path7, value));
|
|
52549
52549
|
});
|
|
52550
52550
|
};
|
|
52551
52551
|
var getInByDestructor = function(source, rules, mutators) {
|
|
@@ -52557,8 +52557,8 @@ var getInByDestructor = function(source, rules, mutators) {
|
|
|
52557
52557
|
}
|
|
52558
52558
|
source = isValid2(source) ? source : {};
|
|
52559
52559
|
rules.forEach(function(_a2) {
|
|
52560
|
-
var key = _a2.key,
|
|
52561
|
-
mutators.setIn(
|
|
52560
|
+
var key = _a2.key, path7 = _a2.path;
|
|
52561
|
+
mutators.setIn(path7, response, source[key]);
|
|
52562
52562
|
});
|
|
52563
52563
|
return response;
|
|
52564
52564
|
};
|
|
@@ -53125,8 +53125,8 @@ var Matcher = (
|
|
|
53125
53125
|
}
|
|
53126
53126
|
return false;
|
|
53127
53127
|
};
|
|
53128
|
-
Matcher2.prototype.match = function(
|
|
53129
|
-
this.path =
|
|
53128
|
+
Matcher2.prototype.match = function(path7) {
|
|
53129
|
+
this.path = path7;
|
|
53130
53130
|
return { matched: this.matchNode(this.tree), record: this.record };
|
|
53131
53131
|
};
|
|
53132
53132
|
Matcher2.matchSegments = function(source, target, record) {
|
|
@@ -53416,21 +53416,21 @@ var Path = (
|
|
|
53416
53416
|
if (_this.isMatchPattern || _this.isRegExp) {
|
|
53417
53417
|
throw new Error("".concat(_this.entire, " cannot be concat"));
|
|
53418
53418
|
}
|
|
53419
|
-
var
|
|
53420
|
-
|
|
53419
|
+
var path7 = new Path2("");
|
|
53420
|
+
path7.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
|
|
53421
53421
|
return parseString(s);
|
|
53422
53422
|
})), false));
|
|
53423
|
-
|
|
53424
|
-
return
|
|
53423
|
+
path7.entire = path7.segments.join(".");
|
|
53424
|
+
return path7;
|
|
53425
53425
|
};
|
|
53426
53426
|
this.slice = function(start, end) {
|
|
53427
53427
|
if (_this.isMatchPattern || _this.isRegExp) {
|
|
53428
53428
|
throw new Error("".concat(_this.entire, " cannot be slice"));
|
|
53429
53429
|
}
|
|
53430
|
-
var
|
|
53431
|
-
|
|
53432
|
-
|
|
53433
|
-
return
|
|
53430
|
+
var path7 = new Path2("");
|
|
53431
|
+
path7.segments = _this.segments.slice(start, end);
|
|
53432
|
+
path7.entire = path7.segments.join(".");
|
|
53433
|
+
return path7;
|
|
53434
53434
|
};
|
|
53435
53435
|
this.push = function() {
|
|
53436
53436
|
var items = [];
|
|
@@ -53522,8 +53522,8 @@ var Path = (
|
|
|
53522
53522
|
};
|
|
53523
53523
|
this.match = function(pattern) {
|
|
53524
53524
|
var _a3, _b;
|
|
53525
|
-
var
|
|
53526
|
-
var cache = _this.matchCache.get(
|
|
53525
|
+
var path7 = Path2.parse(pattern);
|
|
53526
|
+
var cache = _this.matchCache.get(path7.entire);
|
|
53527
53527
|
if (cache !== void 0) {
|
|
53528
53528
|
if (cache.record && cache.record.score !== void 0) {
|
|
53529
53529
|
_this.matchScore = cache.record.score;
|
|
@@ -53531,21 +53531,21 @@ var Path = (
|
|
|
53531
53531
|
return cache.matched;
|
|
53532
53532
|
}
|
|
53533
53533
|
var cacheWith = function(value) {
|
|
53534
|
-
_this.matchCache.set(
|
|
53534
|
+
_this.matchCache.set(path7.entire, value);
|
|
53535
53535
|
return value;
|
|
53536
53536
|
};
|
|
53537
|
-
if (
|
|
53537
|
+
if (path7.isMatchPattern) {
|
|
53538
53538
|
if (_this.isMatchPattern) {
|
|
53539
|
-
throw new Error("".concat(
|
|
53539
|
+
throw new Error("".concat(path7.entire, " cannot match ").concat(_this.entire));
|
|
53540
53540
|
} else {
|
|
53541
53541
|
_this.matchScore = 0;
|
|
53542
|
-
return cacheWith(
|
|
53542
|
+
return cacheWith(path7.match(_this.segments));
|
|
53543
53543
|
}
|
|
53544
53544
|
} else {
|
|
53545
53545
|
if (_this.isMatchPattern) {
|
|
53546
53546
|
if (_this.isRegExp) {
|
|
53547
53547
|
try {
|
|
53548
|
-
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3,
|
|
53548
|
+
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path7.entire);
|
|
53549
53549
|
} finally {
|
|
53550
53550
|
;
|
|
53551
53551
|
_this.entire.lastIndex = 0;
|
|
@@ -53554,14 +53554,14 @@ var Path = (
|
|
|
53554
53554
|
var record = {
|
|
53555
53555
|
score: 0
|
|
53556
53556
|
};
|
|
53557
|
-
var result = cacheWith(new Matcher(_this.tree, record).match(
|
|
53557
|
+
var result = cacheWith(new Matcher(_this.tree, record).match(path7.segments));
|
|
53558
53558
|
_this.matchScore = record.score;
|
|
53559
53559
|
return result.matched;
|
|
53560
53560
|
} else {
|
|
53561
53561
|
var record = {
|
|
53562
53562
|
score: 0
|
|
53563
53563
|
};
|
|
53564
|
-
var result = cacheWith(Matcher.matchSegments(_this.segments,
|
|
53564
|
+
var result = cacheWith(Matcher.matchSegments(_this.segments, path7.segments, record));
|
|
53565
53565
|
_this.matchScore = record.score;
|
|
53566
53566
|
return result.matched;
|
|
53567
53567
|
}
|
|
@@ -53637,12 +53637,12 @@ var Path = (
|
|
|
53637
53637
|
configurable: true
|
|
53638
53638
|
});
|
|
53639
53639
|
Path2.match = function(pattern) {
|
|
53640
|
-
var
|
|
53640
|
+
var path7 = Path2.parse(pattern);
|
|
53641
53641
|
var matcher = function(target) {
|
|
53642
|
-
return
|
|
53642
|
+
return path7.match(target);
|
|
53643
53643
|
};
|
|
53644
53644
|
matcher[isMatcher] = true;
|
|
53645
|
-
matcher.path =
|
|
53645
|
+
matcher.path = path7;
|
|
53646
53646
|
return matcher;
|
|
53647
53647
|
};
|
|
53648
53648
|
Path2.isPathPattern = function(target) {
|
|
@@ -53651,52 +53651,52 @@ var Path = (
|
|
|
53651
53651
|
Path2.transform = function(pattern, regexp, callback) {
|
|
53652
53652
|
return Path2.parse(pattern).transform(regexp, callback);
|
|
53653
53653
|
};
|
|
53654
|
-
Path2.parse = function(
|
|
53655
|
-
if (
|
|
53656
|
-
|
|
53654
|
+
Path2.parse = function(path7, base) {
|
|
53655
|
+
if (path7 === void 0) {
|
|
53656
|
+
path7 = "";
|
|
53657
53657
|
}
|
|
53658
|
-
if (
|
|
53659
|
-
var found = pathCache.get(
|
|
53658
|
+
if (path7 instanceof Path2) {
|
|
53659
|
+
var found = pathCache.get(path7.entire);
|
|
53660
53660
|
if (found) {
|
|
53661
53661
|
return found;
|
|
53662
53662
|
} else {
|
|
53663
|
-
pathCache.set(
|
|
53664
|
-
return
|
|
53663
|
+
pathCache.set(path7.entire, path7);
|
|
53664
|
+
return path7;
|
|
53665
53665
|
}
|
|
53666
|
-
} else if (
|
|
53667
|
-
return Path2.parse(
|
|
53666
|
+
} else if (path7 && path7[isMatcher]) {
|
|
53667
|
+
return Path2.parse(path7["path"]);
|
|
53668
53668
|
} else {
|
|
53669
53669
|
var key_ = base ? Path2.parse(base) : "";
|
|
53670
|
-
var key = "".concat(
|
|
53670
|
+
var key = "".concat(path7, ":").concat(key_);
|
|
53671
53671
|
var found = pathCache.get(key);
|
|
53672
53672
|
if (found) {
|
|
53673
53673
|
return found;
|
|
53674
53674
|
} else {
|
|
53675
|
-
|
|
53676
|
-
pathCache.set(key,
|
|
53677
|
-
return
|
|
53675
|
+
path7 = new Path2(path7, base);
|
|
53676
|
+
pathCache.set(key, path7);
|
|
53677
|
+
return path7;
|
|
53678
53678
|
}
|
|
53679
53679
|
}
|
|
53680
53680
|
};
|
|
53681
53681
|
Path2.getIn = function(source, pattern) {
|
|
53682
|
-
var
|
|
53683
|
-
return
|
|
53682
|
+
var path7 = Path2.parse(pattern);
|
|
53683
|
+
return path7.getIn(source);
|
|
53684
53684
|
};
|
|
53685
53685
|
Path2.setIn = function(source, pattern, value) {
|
|
53686
|
-
var
|
|
53687
|
-
return
|
|
53686
|
+
var path7 = Path2.parse(pattern);
|
|
53687
|
+
return path7.setIn(source, value);
|
|
53688
53688
|
};
|
|
53689
53689
|
Path2.deleteIn = function(source, pattern) {
|
|
53690
|
-
var
|
|
53691
|
-
return
|
|
53690
|
+
var path7 = Path2.parse(pattern);
|
|
53691
|
+
return path7.deleteIn(source);
|
|
53692
53692
|
};
|
|
53693
53693
|
Path2.existIn = function(source, pattern, start) {
|
|
53694
|
-
var
|
|
53695
|
-
return
|
|
53694
|
+
var path7 = Path2.parse(pattern);
|
|
53695
|
+
return path7.existIn(source, start);
|
|
53696
53696
|
};
|
|
53697
53697
|
Path2.ensureIn = function(source, pattern, defaultValue) {
|
|
53698
|
-
var
|
|
53699
|
-
return
|
|
53698
|
+
var path7 = Path2.parse(pattern);
|
|
53699
|
+
return path7.ensureIn(source, defaultValue);
|
|
53700
53700
|
};
|
|
53701
53701
|
return Path2;
|
|
53702
53702
|
}()
|
|
@@ -55515,9 +55515,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
|
|
|
55515
55515
|
var traverse = function(target, visitor) {
|
|
55516
55516
|
var seenObjects = [];
|
|
55517
55517
|
var root = target;
|
|
55518
|
-
var traverse2 = function(target2,
|
|
55519
|
-
if (
|
|
55520
|
-
|
|
55518
|
+
var traverse2 = function(target2, path7) {
|
|
55519
|
+
if (path7 === void 0) {
|
|
55520
|
+
path7 = [];
|
|
55521
55521
|
}
|
|
55522
55522
|
if (isPlainObj(target2)) {
|
|
55523
55523
|
var seenIndex = seenObjects.indexOf(target2);
|
|
@@ -55527,15 +55527,15 @@ var traverse = function(target, visitor) {
|
|
|
55527
55527
|
var addIndex = seenObjects.length;
|
|
55528
55528
|
seenObjects.push(target2);
|
|
55529
55529
|
if (isNoNeedCompileObject(target2) && root !== target2) {
|
|
55530
|
-
visitor(target2,
|
|
55530
|
+
visitor(target2, path7);
|
|
55531
55531
|
return;
|
|
55532
55532
|
}
|
|
55533
55533
|
each(target2, function(value, key) {
|
|
55534
|
-
traverse2(value,
|
|
55534
|
+
traverse2(value, path7.concat(key));
|
|
55535
55535
|
});
|
|
55536
55536
|
seenObjects.splice(addIndex, 1);
|
|
55537
55537
|
} else {
|
|
55538
|
-
visitor(target2,
|
|
55538
|
+
visitor(target2, path7);
|
|
55539
55539
|
}
|
|
55540
55540
|
};
|
|
55541
55541
|
traverse2(target);
|
|
@@ -55546,24 +55546,24 @@ var traverseSchema = function(schema, visitor) {
|
|
|
55546
55546
|
}
|
|
55547
55547
|
var seenObjects = [];
|
|
55548
55548
|
var root = schema;
|
|
55549
|
-
var traverse2 = function(target,
|
|
55549
|
+
var traverse2 = function(target, path7) {
|
|
55550
55550
|
var _a2;
|
|
55551
|
-
if (
|
|
55552
|
-
|
|
55551
|
+
if (path7 === void 0) {
|
|
55552
|
+
path7 = [];
|
|
55553
55553
|
}
|
|
55554
|
-
if (
|
|
55554
|
+
if (path7[0] === "x-compile-omitted" || path7[0] === "x-validator" || path7[0] === "version" || path7[0] === "_isJSONSchemaObject")
|
|
55555
55555
|
return;
|
|
55556
|
-
if (String(
|
|
55556
|
+
if (String(path7[0]).indexOf("x-") == -1 && isFn(target))
|
|
55557
55557
|
return;
|
|
55558
|
-
if (SchemaNestedMap[
|
|
55558
|
+
if (SchemaNestedMap[path7[0]])
|
|
55559
55559
|
return;
|
|
55560
|
-
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(
|
|
55561
|
-
visitor(target,
|
|
55560
|
+
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path7[0])) > -1) {
|
|
55561
|
+
visitor(target, path7, true);
|
|
55562
55562
|
return;
|
|
55563
55563
|
}
|
|
55564
55564
|
if (isPlainObj(target)) {
|
|
55565
|
-
if (
|
|
55566
|
-
visitor(target,
|
|
55565
|
+
if (path7[0] === "default" || path7[0] === "x-value") {
|
|
55566
|
+
visitor(target, path7);
|
|
55567
55567
|
return;
|
|
55568
55568
|
}
|
|
55569
55569
|
var seenIndex = seenObjects.indexOf(target);
|
|
@@ -55573,15 +55573,15 @@ var traverseSchema = function(schema, visitor) {
|
|
|
55573
55573
|
var addIndex = seenObjects.length;
|
|
55574
55574
|
seenObjects.push(target);
|
|
55575
55575
|
if (isNoNeedCompileObject(target) && root !== target) {
|
|
55576
|
-
visitor(target,
|
|
55576
|
+
visitor(target, path7);
|
|
55577
55577
|
return;
|
|
55578
55578
|
}
|
|
55579
55579
|
each(target, function(value, key) {
|
|
55580
|
-
traverse2(value,
|
|
55580
|
+
traverse2(value, path7.concat(key));
|
|
55581
55581
|
});
|
|
55582
55582
|
seenObjects.splice(addIndex, 1);
|
|
55583
55583
|
} else {
|
|
55584
|
-
visitor(target,
|
|
55584
|
+
visitor(target, path7);
|
|
55585
55585
|
}
|
|
55586
55586
|
};
|
|
55587
55587
|
traverse2(schema);
|
|
@@ -55625,8 +55625,8 @@ var createDataSource = function(source) {
|
|
|
55625
55625
|
var patchStateFormSchema = function(targetState, pattern, compiled) {
|
|
55626
55626
|
untracked(function() {
|
|
55627
55627
|
var _a2;
|
|
55628
|
-
var
|
|
55629
|
-
var segments =
|
|
55628
|
+
var path7 = Path.parse(pattern);
|
|
55629
|
+
var segments = path7.segments;
|
|
55630
55630
|
var key = segments[0];
|
|
55631
55631
|
var isEnum = key === "enum" && isArr(compiled);
|
|
55632
55632
|
var schemaMapKey = SchemaStateMap[key];
|
|
@@ -55710,14 +55710,14 @@ var compile = function(source, scope) {
|
|
|
55710
55710
|
};
|
|
55711
55711
|
var patchCompile = function(targetState, sourceState, scope) {
|
|
55712
55712
|
traverse(sourceState, function(value, pattern) {
|
|
55713
|
-
var
|
|
55713
|
+
var path7 = Path.parse(pattern);
|
|
55714
55714
|
var compiled = compile(value, scope);
|
|
55715
|
-
var key =
|
|
55715
|
+
var key = path7.segments[0];
|
|
55716
55716
|
if (compiled === void 0)
|
|
55717
55717
|
return;
|
|
55718
55718
|
if (hasOwnProperty4.call(targetState, key)) {
|
|
55719
55719
|
untracked(function() {
|
|
55720
|
-
return Path.setIn(targetState,
|
|
55720
|
+
return Path.setIn(targetState, path7, compiled);
|
|
55721
55721
|
});
|
|
55722
55722
|
}
|
|
55723
55723
|
});
|
|
@@ -55726,7 +55726,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
|
55726
55726
|
if (demand === void 0) {
|
|
55727
55727
|
demand = false;
|
|
55728
55728
|
}
|
|
55729
|
-
traverseSchema(sourceSchema, function(value,
|
|
55729
|
+
traverseSchema(sourceSchema, function(value, path7, omitCompile) {
|
|
55730
55730
|
var compiled = value;
|
|
55731
55731
|
var collected = hasCollected(function() {
|
|
55732
55732
|
if (!omitCompile) {
|
|
@@ -55737,10 +55737,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
|
55737
55737
|
return;
|
|
55738
55738
|
if (demand) {
|
|
55739
55739
|
if (collected || !targetState.initialized) {
|
|
55740
|
-
patchStateFormSchema(targetState,
|
|
55740
|
+
patchStateFormSchema(targetState, path7, compiled);
|
|
55741
55741
|
}
|
|
55742
55742
|
} else {
|
|
55743
|
-
patchStateFormSchema(targetState,
|
|
55743
|
+
patchStateFormSchema(targetState, path7, compiled);
|
|
55744
55744
|
}
|
|
55745
55745
|
});
|
|
55746
55746
|
};
|
|
@@ -56024,14 +56024,14 @@ var getISOCode = function(language) {
|
|
|
56024
56024
|
});
|
|
56025
56025
|
return isoCode;
|
|
56026
56026
|
};
|
|
56027
|
-
var getLocaleByPath = function(
|
|
56027
|
+
var getLocaleByPath = function(path7, lang) {
|
|
56028
56028
|
if (lang === void 0) {
|
|
56029
56029
|
lang = registry.locales.language;
|
|
56030
56030
|
}
|
|
56031
|
-
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(
|
|
56031
|
+
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path7));
|
|
56032
56032
|
};
|
|
56033
|
-
var getValidateLocale = function(
|
|
56034
|
-
var message = getLocaleByPath(
|
|
56033
|
+
var getValidateLocale = function(path7) {
|
|
56034
|
+
var message = getLocaleByPath(path7);
|
|
56035
56035
|
return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
|
|
56036
56036
|
};
|
|
56037
56037
|
var getValidateMessageTemplateEngine = function() {
|
|
@@ -57292,15 +57292,15 @@ var buildFieldPath = function(field) {
|
|
|
57292
57292
|
var buildDataPath = function(fields, pattern) {
|
|
57293
57293
|
var prevArray = false;
|
|
57294
57294
|
var segments = pattern.segments;
|
|
57295
|
-
var
|
|
57296
|
-
var currentPath =
|
|
57295
|
+
var path7 = segments.reduce(function(path8, key, index) {
|
|
57296
|
+
var currentPath = path8.concat(key);
|
|
57297
57297
|
var currentAddress = segments.slice(0, index + 1);
|
|
57298
57298
|
var current = fields[currentAddress.join(".")];
|
|
57299
57299
|
if (prevArray) {
|
|
57300
57300
|
if (!isVoidField(current)) {
|
|
57301
57301
|
prevArray = false;
|
|
57302
57302
|
}
|
|
57303
|
-
return
|
|
57303
|
+
return path8;
|
|
57304
57304
|
}
|
|
57305
57305
|
if (index >= segments.length - 1) {
|
|
57306
57306
|
return currentPath;
|
|
@@ -57312,13 +57312,13 @@ var buildDataPath = function(fields, pattern) {
|
|
|
57312
57312
|
prevArray = true;
|
|
57313
57313
|
return currentPath;
|
|
57314
57314
|
}
|
|
57315
|
-
return
|
|
57315
|
+
return path8;
|
|
57316
57316
|
} else {
|
|
57317
57317
|
prevArray = false;
|
|
57318
57318
|
}
|
|
57319
57319
|
return currentPath;
|
|
57320
57320
|
}, []);
|
|
57321
|
-
return new Path(
|
|
57321
|
+
return new Path(path7);
|
|
57322
57322
|
};
|
|
57323
57323
|
var locateNode = function(field, address) {
|
|
57324
57324
|
field.address = Path.parse(address);
|
|
@@ -57352,33 +57352,33 @@ var destroy = function(target, address, forceClear) {
|
|
|
57352
57352
|
field === null || field === void 0 ? void 0 : field.dispose();
|
|
57353
57353
|
if (isDataField(field) && forceClear) {
|
|
57354
57354
|
var form = field.form;
|
|
57355
|
-
var
|
|
57356
|
-
form.deleteValuesIn(
|
|
57357
|
-
form.deleteInitialValuesIn(
|
|
57355
|
+
var path7 = field.path;
|
|
57356
|
+
form.deleteValuesIn(path7);
|
|
57357
|
+
form.deleteInitialValuesIn(path7);
|
|
57358
57358
|
}
|
|
57359
57359
|
delete target[address];
|
|
57360
57360
|
};
|
|
57361
|
-
var patchFormValues = function(form,
|
|
57362
|
-
var update = function(
|
|
57363
|
-
if (
|
|
57364
|
-
form.setValuesIn(
|
|
57361
|
+
var patchFormValues = function(form, path7, source) {
|
|
57362
|
+
var update = function(path8, source2) {
|
|
57363
|
+
if (path8.length) {
|
|
57364
|
+
form.setValuesIn(path8, clone(source2));
|
|
57365
57365
|
} else {
|
|
57366
57366
|
Object.assign(form.values, clone(source2));
|
|
57367
57367
|
}
|
|
57368
57368
|
};
|
|
57369
|
-
var patch = function(source2,
|
|
57370
|
-
if (
|
|
57371
|
-
|
|
57369
|
+
var patch = function(source2, path8) {
|
|
57370
|
+
if (path8 === void 0) {
|
|
57371
|
+
path8 = [];
|
|
57372
57372
|
}
|
|
57373
|
-
var targetValue = form.getValuesIn(
|
|
57374
|
-
var targetField = form.query(
|
|
57373
|
+
var targetValue = form.getValuesIn(path8);
|
|
57374
|
+
var targetField = form.query(path8).take();
|
|
57375
57375
|
var isUnVoidField = targetField && !isVoidField(targetField);
|
|
57376
57376
|
if (isUnVoidField && targetField.display === "none") {
|
|
57377
57377
|
targetField.caches.value = clone(source2);
|
|
57378
57378
|
return;
|
|
57379
57379
|
}
|
|
57380
57380
|
if (allowAssignDefaultValue(targetValue, source2)) {
|
|
57381
|
-
update(
|
|
57381
|
+
update(path8, source2);
|
|
57382
57382
|
} else {
|
|
57383
57383
|
if (isEmpty(source2))
|
|
57384
57384
|
return;
|
|
@@ -57386,20 +57386,20 @@ var patchFormValues = function(form, path6, source) {
|
|
|
57386
57386
|
return;
|
|
57387
57387
|
if (isPlainObj(targetValue) && isPlainObj(source2)) {
|
|
57388
57388
|
each(source2, function(value, key) {
|
|
57389
|
-
patch(value,
|
|
57389
|
+
patch(value, path8.concat(key));
|
|
57390
57390
|
});
|
|
57391
57391
|
} else {
|
|
57392
57392
|
if (targetField) {
|
|
57393
57393
|
if (isUnVoidField && !targetField.selfModified) {
|
|
57394
|
-
update(
|
|
57394
|
+
update(path8, source2);
|
|
57395
57395
|
}
|
|
57396
57396
|
} else if (form.initialized) {
|
|
57397
|
-
update(
|
|
57397
|
+
update(path8, source2);
|
|
57398
57398
|
}
|
|
57399
57399
|
}
|
|
57400
57400
|
}
|
|
57401
57401
|
};
|
|
57402
|
-
patch(source,
|
|
57402
|
+
patch(source, path7);
|
|
57403
57403
|
};
|
|
57404
57404
|
var matchFeedback = function(search, feedback) {
|
|
57405
57405
|
if (!search || !feedback)
|
|
@@ -57822,13 +57822,13 @@ var createBatchStateSetter = function(form) {
|
|
|
57822
57822
|
} else if (isGeneralField(pattern)) {
|
|
57823
57823
|
pattern.setState(payload);
|
|
57824
57824
|
} else {
|
|
57825
|
-
var matchCount_1 = 0,
|
|
57826
|
-
form.query(
|
|
57825
|
+
var matchCount_1 = 0, path7 = Path.parse(pattern);
|
|
57826
|
+
form.query(path7).forEach(function(field) {
|
|
57827
57827
|
field.setState(payload);
|
|
57828
57828
|
matchCount_1++;
|
|
57829
57829
|
});
|
|
57830
|
-
if (matchCount_1 === 0 ||
|
|
57831
|
-
subscribeUpdate(form,
|
|
57830
|
+
if (matchCount_1 === 0 || path7.isWildMatchPattern) {
|
|
57831
|
+
subscribeUpdate(form, path7, payload);
|
|
57832
57832
|
}
|
|
57833
57833
|
}
|
|
57834
57834
|
});
|
|
@@ -60444,8 +60444,8 @@ var FieldEffects = {
|
|
|
60444
60444
|
};
|
|
60445
60445
|
var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
|
|
60446
60446
|
var getDependencyValue = function(field, pattern, property) {
|
|
60447
|
-
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0],
|
|
60448
|
-
return field.query(target).getIn(
|
|
60447
|
+
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path7 = _a2[1];
|
|
60448
|
+
return field.query(target).getIn(path7 || property || "value");
|
|
60449
60449
|
};
|
|
60450
60450
|
var getDependencies = function(field, dependencies) {
|
|
60451
60451
|
if (isArr(dependencies)) {
|
|
@@ -61075,10 +61075,10 @@ var Schema = (
|
|
|
61075
61075
|
}()
|
|
61076
61076
|
);
|
|
61077
61077
|
|
|
61078
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61078
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
61079
61079
|
var import_inquirer = __toESM(require_inquirer());
|
|
61080
61080
|
|
|
61081
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61081
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
61082
61082
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
61083
61083
|
function validateSchema(schema) {
|
|
61084
61084
|
const { type, properties } = schema;
|
|
@@ -61170,7 +61170,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
61170
61170
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
61171
61171
|
}
|
|
61172
61172
|
|
|
61173
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61173
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
61174
61174
|
var compileRule = (rule, scope) => {
|
|
61175
61175
|
const state = Schema.compile(rule, {
|
|
61176
61176
|
$self: {},
|
|
@@ -61274,7 +61274,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
61274
61274
|
return answers;
|
|
61275
61275
|
}
|
|
61276
61276
|
|
|
61277
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61277
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
61278
61278
|
var CLIReader = class {
|
|
61279
61279
|
getAnswers() {
|
|
61280
61280
|
return this.answers;
|
|
@@ -61305,7 +61305,7 @@ var CLIReader = class {
|
|
|
61305
61305
|
}
|
|
61306
61306
|
};
|
|
61307
61307
|
|
|
61308
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61308
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
61309
61309
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
61310
61310
|
|
|
61311
61311
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -61371,7 +61371,7 @@ var I18n = class {
|
|
|
61371
61371
|
}
|
|
61372
61372
|
};
|
|
61373
61373
|
|
|
61374
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61374
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
61375
61375
|
var ZH_LOCALE = {
|
|
61376
61376
|
environment: {
|
|
61377
61377
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -61398,7 +61398,7 @@ var ZH_LOCALE = {
|
|
|
61398
61398
|
}
|
|
61399
61399
|
};
|
|
61400
61400
|
|
|
61401
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61401
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
61402
61402
|
var EN_LOCALE = {
|
|
61403
61403
|
environment: {
|
|
61404
61404
|
node_version: "please upgrade node to lts version",
|
|
@@ -61425,14 +61425,14 @@ var EN_LOCALE = {
|
|
|
61425
61425
|
}
|
|
61426
61426
|
};
|
|
61427
61427
|
|
|
61428
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61428
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
61429
61429
|
var i18n = new I18n();
|
|
61430
61430
|
var localeKeys = i18n.init("zh", {
|
|
61431
61431
|
zh: ZH_LOCALE,
|
|
61432
61432
|
en: EN_LOCALE
|
|
61433
61433
|
});
|
|
61434
61434
|
|
|
61435
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61435
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
61436
61436
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
|
61437
61437
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
61438
61438
|
for (const question of questions) {
|
|
@@ -61460,7 +61460,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
61460
61460
|
return questions;
|
|
61461
61461
|
}
|
|
61462
61462
|
|
|
61463
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61463
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
61464
61464
|
var import_path4 = __toESM(require("path"));
|
|
61465
61465
|
var import_utils12 = require("@modern-js/utils");
|
|
61466
61466
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -61508,7 +61508,7 @@ async function checkUseNvm(cwd, logger) {
|
|
|
61508
61508
|
}
|
|
61509
61509
|
}
|
|
61510
61510
|
|
|
61511
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61511
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
61512
61512
|
var AppAPI = class {
|
|
61513
61513
|
async checkEnvironment(nodeVersion) {
|
|
61514
61514
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -61749,7 +61749,7 @@ var AppAPI = class {
|
|
|
61749
61749
|
};
|
|
61750
61750
|
|
|
61751
61751
|
// ../../generator-utils/dist/esm/index.js
|
|
61752
|
-
var
|
|
61752
|
+
var import_path6 = __toESM(require("path"));
|
|
61753
61753
|
var import_utils16 = require("@modern-js/utils");
|
|
61754
61754
|
|
|
61755
61755
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
|
@@ -62054,17 +62054,32 @@ async function fileExist(filePath) {
|
|
|
62054
62054
|
}
|
|
62055
62055
|
}
|
|
62056
62056
|
|
|
62057
|
+
// ../../generator-utils/dist/esm/utils/getGeneratorPath.js
|
|
62058
|
+
var import_path5 = __toESM(require("path"));
|
|
62059
|
+
var getGeneratorPath = (generator, distTag, paths) => {
|
|
62060
|
+
if (process.env.CODESMITH_ENV === "development") {
|
|
62061
|
+
return import_path5.default.dirname(require.resolve(generator, {
|
|
62062
|
+
paths: paths !== null && paths !== void 0 ? paths : [
|
|
62063
|
+
process.cwd()
|
|
62064
|
+
]
|
|
62065
|
+
}));
|
|
62066
|
+
} else if (distTag) {
|
|
62067
|
+
return `${generator}@${distTag}`;
|
|
62068
|
+
}
|
|
62069
|
+
return generator;
|
|
62070
|
+
};
|
|
62071
|
+
|
|
62057
62072
|
// ../../generator-utils/dist/esm/index.js
|
|
62058
62073
|
var import_utils17 = require("@modern-js/utils");
|
|
62059
62074
|
function isTsProject(appDir) {
|
|
62060
|
-
return import_utils16.fs.existsSync(
|
|
62075
|
+
return import_utils16.fs.existsSync(import_path6.default.join(appDir, "tsconfig.json"));
|
|
62061
62076
|
}
|
|
62062
62077
|
async function getModernConfigFile(appDir) {
|
|
62063
|
-
let exist = await fileExist(
|
|
62078
|
+
let exist = await fileExist(import_path6.default.join(appDir, "modern.config.ts"));
|
|
62064
62079
|
if (exist) {
|
|
62065
62080
|
return "modern.config.ts";
|
|
62066
62081
|
}
|
|
62067
|
-
exist = await fileExist(
|
|
62082
|
+
exist = await fileExist(import_path6.default.join(appDir, "modern.config.js"));
|
|
62068
62083
|
if (exist) {
|
|
62069
62084
|
return "modern.config.js";
|
|
62070
62085
|
}
|
|
@@ -62090,23 +62105,15 @@ var i18n3 = new I18n2();
|
|
|
62090
62105
|
var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
|
|
62091
62106
|
|
|
62092
62107
|
// src/index.ts
|
|
62093
|
-
var getGeneratorPath = (generator, distTag) => {
|
|
62094
|
-
if (process.env.CODESMITH_ENV === "development") {
|
|
62095
|
-
return import_path6.default.dirname(require.resolve(generator));
|
|
62096
|
-
} else if (distTag) {
|
|
62097
|
-
return `${generator}@${distTag}`;
|
|
62098
|
-
}
|
|
62099
|
-
return generator;
|
|
62100
|
-
};
|
|
62101
62108
|
var ReactRouter6Type = `/// <reference types='@modern-js/runtime/types/router' />`;
|
|
62102
62109
|
var handleTemplateFile = async (context, generator, appApi) => {
|
|
62103
62110
|
const { sourceTypeFile, projectPath } = context.config;
|
|
62104
62111
|
const appDir = context.materials.default.basePath;
|
|
62105
62112
|
const isTs = import_utils17.fs.existsSync(
|
|
62106
|
-
|
|
62113
|
+
import_path7.default.join(appDir, projectPath || "", "tsconfig.json")
|
|
62107
62114
|
);
|
|
62108
62115
|
if (isTs) {
|
|
62109
|
-
const typePath =
|
|
62116
|
+
const typePath = import_path7.default.join(
|
|
62110
62117
|
appDir,
|
|
62111
62118
|
projectPath || "",
|
|
62112
62119
|
"src",
|
|
@@ -62124,7 +62131,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62124
62131
|
}
|
|
62125
62132
|
}
|
|
62126
62133
|
await appApi.runSubGenerator(
|
|
62127
|
-
getGeneratorPath(DependenceGenerator, context.config.distTag),
|
|
62134
|
+
getGeneratorPath(DependenceGenerator, context.config.distTag, [__dirname]),
|
|
62128
62135
|
void 0,
|
|
62129
62136
|
{
|
|
62130
62137
|
...context.config,
|