@modern-js/mwa-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 +266 -259
- package/package.json +13 -13
- package/src/index.ts +4 -12
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 fs7 = 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 (fs7.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 fs7 = 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 = fs7.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 = fs7.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) {
|
|
@@ -51055,7 +51055,7 @@ __export(src_exports, {
|
|
|
51055
51055
|
handleTemplateFile: () => handleTemplateFile
|
|
51056
51056
|
});
|
|
51057
51057
|
module.exports = __toCommonJS(src_exports);
|
|
51058
|
-
var
|
|
51058
|
+
var import_path7 = __toESM(require("path"));
|
|
51059
51059
|
|
|
51060
51060
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
|
|
51061
51061
|
function _define_property(obj, key, value) {
|
|
@@ -51066,12 +51066,12 @@ function _define_property(obj, key, value) {
|
|
|
51066
51066
|
return obj;
|
|
51067
51067
|
}
|
|
51068
51068
|
|
|
51069
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
51069
|
+
// ../../../../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
|
|
51070
51070
|
var import_utils13 = require("@modern-js/utils");
|
|
51071
51071
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
51072
51072
|
var import_comment_json = __toESM(require_src2());
|
|
51073
51073
|
|
|
51074
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51074
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
51075
51075
|
var import_utils = require("@modern-js/utils");
|
|
51076
51076
|
async function canUseNvm() {
|
|
51077
51077
|
try {
|
|
@@ -51121,7 +51121,7 @@ async function canUsePnpm() {
|
|
|
51121
51121
|
}
|
|
51122
51122
|
}
|
|
51123
51123
|
|
|
51124
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51124
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
51125
51125
|
var import_utils2 = require("@modern-js/utils");
|
|
51126
51126
|
function execaWithStreamLog(command, args, options) {
|
|
51127
51127
|
const promise = (0, import_utils2.execa)(command, args, {
|
|
@@ -51217,7 +51217,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
51217
51217
|
throw new Error("please install pnpm first");
|
|
51218
51218
|
}
|
|
51219
51219
|
|
|
51220
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51220
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
51221
51221
|
var NpmAPI = class {
|
|
51222
51222
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
51223
51223
|
return npmInstall({
|
|
@@ -51246,7 +51246,7 @@ var NpmAPI = class {
|
|
|
51246
51246
|
}
|
|
51247
51247
|
};
|
|
51248
51248
|
|
|
51249
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
51249
|
+
// ../../../../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
|
|
51250
51250
|
var import_utils4 = require("@modern-js/utils");
|
|
51251
51251
|
async function canUseGit() {
|
|
51252
51252
|
try {
|
|
@@ -51321,7 +51321,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
51321
51321
|
});
|
|
51322
51322
|
}
|
|
51323
51323
|
|
|
51324
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
51324
|
+
// ../../../../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
|
|
51325
51325
|
var GitAPI = class {
|
|
51326
51326
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
51327
51327
|
const canUse = await canUseGit();
|
|
@@ -51373,23 +51373,23 @@ var GitAPI = class {
|
|
|
51373
51373
|
}
|
|
51374
51374
|
};
|
|
51375
51375
|
|
|
51376
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
51376
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
51377
51377
|
var import_path = __toESM(require("path"));
|
|
51378
51378
|
var import_utils6 = require("@modern-js/utils");
|
|
51379
51379
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
51380
51380
|
|
|
51381
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
51381
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
51382
51382
|
var import_utils7 = require("@modern-js/utils");
|
|
51383
|
-
async function fsExists(
|
|
51383
|
+
async function fsExists(path7) {
|
|
51384
51384
|
try {
|
|
51385
|
-
await import_utils7.fs.access(
|
|
51385
|
+
await import_utils7.fs.access(path7);
|
|
51386
51386
|
return true;
|
|
51387
51387
|
} catch (e) {
|
|
51388
51388
|
return false;
|
|
51389
51389
|
}
|
|
51390
51390
|
}
|
|
51391
51391
|
|
|
51392
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
51392
|
+
// ../../../../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
|
|
51393
51393
|
var import_handlebars = __toESM(require_lib());
|
|
51394
51394
|
function renderString(template, fullData, registers) {
|
|
51395
51395
|
const helpers = {
|
|
@@ -51403,7 +51403,7 @@ function renderString(template, fullData, registers) {
|
|
|
51403
51403
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
51404
51404
|
}
|
|
51405
51405
|
|
|
51406
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
51406
|
+
// ../../../../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
|
|
51407
51407
|
var HandlebarsAPI = class {
|
|
51408
51408
|
async registerHelp(helpers) {
|
|
51409
51409
|
this.registers.helpers = {
|
|
@@ -51453,13 +51453,13 @@ var HandlebarsAPI = class {
|
|
|
51453
51453
|
}
|
|
51454
51454
|
};
|
|
51455
51455
|
|
|
51456
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
51456
|
+
// ../../../../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
|
|
51457
51457
|
var import_ejs = __toESM(require_ejs());
|
|
51458
51458
|
function renderString2(template, fullData) {
|
|
51459
51459
|
return import_ejs.default.render(template, fullData) || "";
|
|
51460
51460
|
}
|
|
51461
51461
|
|
|
51462
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
51462
|
+
// ../../../../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
|
|
51463
51463
|
var EjsAPI = class {
|
|
51464
51464
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
51465
51465
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -51492,7 +51492,7 @@ var EjsAPI = class {
|
|
|
51492
51492
|
}
|
|
51493
51493
|
};
|
|
51494
51494
|
|
|
51495
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
51495
|
+
// ../../../../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
|
|
51496
51496
|
var import_path2 = __toESM(require("path"));
|
|
51497
51497
|
var import_utils10 = require("@modern-js/utils");
|
|
51498
51498
|
var FsAPI = class {
|
|
@@ -52545,8 +52545,8 @@ var parseDestructorRules = function(node) {
|
|
|
52545
52545
|
};
|
|
52546
52546
|
var setInByDestructor = function(source, rules, value, mutators) {
|
|
52547
52547
|
rules.forEach(function(_a2) {
|
|
52548
|
-
var key = _a2.key,
|
|
52549
|
-
mutators.setIn([key], source, mutators.getIn(
|
|
52548
|
+
var key = _a2.key, path7 = _a2.path;
|
|
52549
|
+
mutators.setIn([key], source, mutators.getIn(path7, value));
|
|
52550
52550
|
});
|
|
52551
52551
|
};
|
|
52552
52552
|
var getInByDestructor = function(source, rules, mutators) {
|
|
@@ -52558,8 +52558,8 @@ var getInByDestructor = function(source, rules, mutators) {
|
|
|
52558
52558
|
}
|
|
52559
52559
|
source = isValid2(source) ? source : {};
|
|
52560
52560
|
rules.forEach(function(_a2) {
|
|
52561
|
-
var key = _a2.key,
|
|
52562
|
-
mutators.setIn(
|
|
52561
|
+
var key = _a2.key, path7 = _a2.path;
|
|
52562
|
+
mutators.setIn(path7, response, source[key]);
|
|
52563
52563
|
});
|
|
52564
52564
|
return response;
|
|
52565
52565
|
};
|
|
@@ -53126,8 +53126,8 @@ var Matcher = (
|
|
|
53126
53126
|
}
|
|
53127
53127
|
return false;
|
|
53128
53128
|
};
|
|
53129
|
-
Matcher2.prototype.match = function(
|
|
53130
|
-
this.path =
|
|
53129
|
+
Matcher2.prototype.match = function(path7) {
|
|
53130
|
+
this.path = path7;
|
|
53131
53131
|
return { matched: this.matchNode(this.tree), record: this.record };
|
|
53132
53132
|
};
|
|
53133
53133
|
Matcher2.matchSegments = function(source, target, record) {
|
|
@@ -53417,21 +53417,21 @@ var Path = (
|
|
|
53417
53417
|
if (_this.isMatchPattern || _this.isRegExp) {
|
|
53418
53418
|
throw new Error("".concat(_this.entire, " cannot be concat"));
|
|
53419
53419
|
}
|
|
53420
|
-
var
|
|
53421
|
-
|
|
53420
|
+
var path7 = new Path2("");
|
|
53421
|
+
path7.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
|
|
53422
53422
|
return parseString(s);
|
|
53423
53423
|
})), false));
|
|
53424
|
-
|
|
53425
|
-
return
|
|
53424
|
+
path7.entire = path7.segments.join(".");
|
|
53425
|
+
return path7;
|
|
53426
53426
|
};
|
|
53427
53427
|
this.slice = function(start, end) {
|
|
53428
53428
|
if (_this.isMatchPattern || _this.isRegExp) {
|
|
53429
53429
|
throw new Error("".concat(_this.entire, " cannot be slice"));
|
|
53430
53430
|
}
|
|
53431
|
-
var
|
|
53432
|
-
|
|
53433
|
-
|
|
53434
|
-
return
|
|
53431
|
+
var path7 = new Path2("");
|
|
53432
|
+
path7.segments = _this.segments.slice(start, end);
|
|
53433
|
+
path7.entire = path7.segments.join(".");
|
|
53434
|
+
return path7;
|
|
53435
53435
|
};
|
|
53436
53436
|
this.push = function() {
|
|
53437
53437
|
var items = [];
|
|
@@ -53523,8 +53523,8 @@ var Path = (
|
|
|
53523
53523
|
};
|
|
53524
53524
|
this.match = function(pattern) {
|
|
53525
53525
|
var _a3, _b;
|
|
53526
|
-
var
|
|
53527
|
-
var cache = _this.matchCache.get(
|
|
53526
|
+
var path7 = Path2.parse(pattern);
|
|
53527
|
+
var cache = _this.matchCache.get(path7.entire);
|
|
53528
53528
|
if (cache !== void 0) {
|
|
53529
53529
|
if (cache.record && cache.record.score !== void 0) {
|
|
53530
53530
|
_this.matchScore = cache.record.score;
|
|
@@ -53532,21 +53532,21 @@ var Path = (
|
|
|
53532
53532
|
return cache.matched;
|
|
53533
53533
|
}
|
|
53534
53534
|
var cacheWith = function(value) {
|
|
53535
|
-
_this.matchCache.set(
|
|
53535
|
+
_this.matchCache.set(path7.entire, value);
|
|
53536
53536
|
return value;
|
|
53537
53537
|
};
|
|
53538
|
-
if (
|
|
53538
|
+
if (path7.isMatchPattern) {
|
|
53539
53539
|
if (_this.isMatchPattern) {
|
|
53540
|
-
throw new Error("".concat(
|
|
53540
|
+
throw new Error("".concat(path7.entire, " cannot match ").concat(_this.entire));
|
|
53541
53541
|
} else {
|
|
53542
53542
|
_this.matchScore = 0;
|
|
53543
|
-
return cacheWith(
|
|
53543
|
+
return cacheWith(path7.match(_this.segments));
|
|
53544
53544
|
}
|
|
53545
53545
|
} else {
|
|
53546
53546
|
if (_this.isMatchPattern) {
|
|
53547
53547
|
if (_this.isRegExp) {
|
|
53548
53548
|
try {
|
|
53549
|
-
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3,
|
|
53549
|
+
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path7.entire);
|
|
53550
53550
|
} finally {
|
|
53551
53551
|
;
|
|
53552
53552
|
_this.entire.lastIndex = 0;
|
|
@@ -53555,14 +53555,14 @@ var Path = (
|
|
|
53555
53555
|
var record = {
|
|
53556
53556
|
score: 0
|
|
53557
53557
|
};
|
|
53558
|
-
var result = cacheWith(new Matcher(_this.tree, record).match(
|
|
53558
|
+
var result = cacheWith(new Matcher(_this.tree, record).match(path7.segments));
|
|
53559
53559
|
_this.matchScore = record.score;
|
|
53560
53560
|
return result.matched;
|
|
53561
53561
|
} else {
|
|
53562
53562
|
var record = {
|
|
53563
53563
|
score: 0
|
|
53564
53564
|
};
|
|
53565
|
-
var result = cacheWith(Matcher.matchSegments(_this.segments,
|
|
53565
|
+
var result = cacheWith(Matcher.matchSegments(_this.segments, path7.segments, record));
|
|
53566
53566
|
_this.matchScore = record.score;
|
|
53567
53567
|
return result.matched;
|
|
53568
53568
|
}
|
|
@@ -53638,12 +53638,12 @@ var Path = (
|
|
|
53638
53638
|
configurable: true
|
|
53639
53639
|
});
|
|
53640
53640
|
Path2.match = function(pattern) {
|
|
53641
|
-
var
|
|
53641
|
+
var path7 = Path2.parse(pattern);
|
|
53642
53642
|
var matcher = function(target) {
|
|
53643
|
-
return
|
|
53643
|
+
return path7.match(target);
|
|
53644
53644
|
};
|
|
53645
53645
|
matcher[isMatcher] = true;
|
|
53646
|
-
matcher.path =
|
|
53646
|
+
matcher.path = path7;
|
|
53647
53647
|
return matcher;
|
|
53648
53648
|
};
|
|
53649
53649
|
Path2.isPathPattern = function(target) {
|
|
@@ -53652,52 +53652,52 @@ var Path = (
|
|
|
53652
53652
|
Path2.transform = function(pattern, regexp, callback) {
|
|
53653
53653
|
return Path2.parse(pattern).transform(regexp, callback);
|
|
53654
53654
|
};
|
|
53655
|
-
Path2.parse = function(
|
|
53656
|
-
if (
|
|
53657
|
-
|
|
53655
|
+
Path2.parse = function(path7, base) {
|
|
53656
|
+
if (path7 === void 0) {
|
|
53657
|
+
path7 = "";
|
|
53658
53658
|
}
|
|
53659
|
-
if (
|
|
53660
|
-
var found = pathCache.get(
|
|
53659
|
+
if (path7 instanceof Path2) {
|
|
53660
|
+
var found = pathCache.get(path7.entire);
|
|
53661
53661
|
if (found) {
|
|
53662
53662
|
return found;
|
|
53663
53663
|
} else {
|
|
53664
|
-
pathCache.set(
|
|
53665
|
-
return
|
|
53664
|
+
pathCache.set(path7.entire, path7);
|
|
53665
|
+
return path7;
|
|
53666
53666
|
}
|
|
53667
|
-
} else if (
|
|
53668
|
-
return Path2.parse(
|
|
53667
|
+
} else if (path7 && path7[isMatcher]) {
|
|
53668
|
+
return Path2.parse(path7["path"]);
|
|
53669
53669
|
} else {
|
|
53670
53670
|
var key_ = base ? Path2.parse(base) : "";
|
|
53671
|
-
var key = "".concat(
|
|
53671
|
+
var key = "".concat(path7, ":").concat(key_);
|
|
53672
53672
|
var found = pathCache.get(key);
|
|
53673
53673
|
if (found) {
|
|
53674
53674
|
return found;
|
|
53675
53675
|
} else {
|
|
53676
|
-
|
|
53677
|
-
pathCache.set(key,
|
|
53678
|
-
return
|
|
53676
|
+
path7 = new Path2(path7, base);
|
|
53677
|
+
pathCache.set(key, path7);
|
|
53678
|
+
return path7;
|
|
53679
53679
|
}
|
|
53680
53680
|
}
|
|
53681
53681
|
};
|
|
53682
53682
|
Path2.getIn = function(source, pattern) {
|
|
53683
|
-
var
|
|
53684
|
-
return
|
|
53683
|
+
var path7 = Path2.parse(pattern);
|
|
53684
|
+
return path7.getIn(source);
|
|
53685
53685
|
};
|
|
53686
53686
|
Path2.setIn = function(source, pattern, value) {
|
|
53687
|
-
var
|
|
53688
|
-
return
|
|
53687
|
+
var path7 = Path2.parse(pattern);
|
|
53688
|
+
return path7.setIn(source, value);
|
|
53689
53689
|
};
|
|
53690
53690
|
Path2.deleteIn = function(source, pattern) {
|
|
53691
|
-
var
|
|
53692
|
-
return
|
|
53691
|
+
var path7 = Path2.parse(pattern);
|
|
53692
|
+
return path7.deleteIn(source);
|
|
53693
53693
|
};
|
|
53694
53694
|
Path2.existIn = function(source, pattern, start) {
|
|
53695
|
-
var
|
|
53696
|
-
return
|
|
53695
|
+
var path7 = Path2.parse(pattern);
|
|
53696
|
+
return path7.existIn(source, start);
|
|
53697
53697
|
};
|
|
53698
53698
|
Path2.ensureIn = function(source, pattern, defaultValue) {
|
|
53699
|
-
var
|
|
53700
|
-
return
|
|
53699
|
+
var path7 = Path2.parse(pattern);
|
|
53700
|
+
return path7.ensureIn(source, defaultValue);
|
|
53701
53701
|
};
|
|
53702
53702
|
return Path2;
|
|
53703
53703
|
}()
|
|
@@ -55516,9 +55516,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
|
|
|
55516
55516
|
var traverse = function(target, visitor) {
|
|
55517
55517
|
var seenObjects = [];
|
|
55518
55518
|
var root = target;
|
|
55519
|
-
var traverse2 = function(target2,
|
|
55520
|
-
if (
|
|
55521
|
-
|
|
55519
|
+
var traverse2 = function(target2, path7) {
|
|
55520
|
+
if (path7 === void 0) {
|
|
55521
|
+
path7 = [];
|
|
55522
55522
|
}
|
|
55523
55523
|
if (isPlainObj(target2)) {
|
|
55524
55524
|
var seenIndex = seenObjects.indexOf(target2);
|
|
@@ -55528,15 +55528,15 @@ var traverse = function(target, visitor) {
|
|
|
55528
55528
|
var addIndex = seenObjects.length;
|
|
55529
55529
|
seenObjects.push(target2);
|
|
55530
55530
|
if (isNoNeedCompileObject(target2) && root !== target2) {
|
|
55531
|
-
visitor(target2,
|
|
55531
|
+
visitor(target2, path7);
|
|
55532
55532
|
return;
|
|
55533
55533
|
}
|
|
55534
55534
|
each(target2, function(value, key) {
|
|
55535
|
-
traverse2(value,
|
|
55535
|
+
traverse2(value, path7.concat(key));
|
|
55536
55536
|
});
|
|
55537
55537
|
seenObjects.splice(addIndex, 1);
|
|
55538
55538
|
} else {
|
|
55539
|
-
visitor(target2,
|
|
55539
|
+
visitor(target2, path7);
|
|
55540
55540
|
}
|
|
55541
55541
|
};
|
|
55542
55542
|
traverse2(target);
|
|
@@ -55547,24 +55547,24 @@ var traverseSchema = function(schema, visitor) {
|
|
|
55547
55547
|
}
|
|
55548
55548
|
var seenObjects = [];
|
|
55549
55549
|
var root = schema;
|
|
55550
|
-
var traverse2 = function(target,
|
|
55550
|
+
var traverse2 = function(target, path7) {
|
|
55551
55551
|
var _a2;
|
|
55552
|
-
if (
|
|
55553
|
-
|
|
55552
|
+
if (path7 === void 0) {
|
|
55553
|
+
path7 = [];
|
|
55554
55554
|
}
|
|
55555
|
-
if (
|
|
55555
|
+
if (path7[0] === "x-compile-omitted" || path7[0] === "x-validator" || path7[0] === "version" || path7[0] === "_isJSONSchemaObject")
|
|
55556
55556
|
return;
|
|
55557
|
-
if (String(
|
|
55557
|
+
if (String(path7[0]).indexOf("x-") == -1 && isFn(target))
|
|
55558
55558
|
return;
|
|
55559
|
-
if (SchemaNestedMap[
|
|
55559
|
+
if (SchemaNestedMap[path7[0]])
|
|
55560
55560
|
return;
|
|
55561
|
-
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(
|
|
55562
|
-
visitor(target,
|
|
55561
|
+
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path7[0])) > -1) {
|
|
55562
|
+
visitor(target, path7, true);
|
|
55563
55563
|
return;
|
|
55564
55564
|
}
|
|
55565
55565
|
if (isPlainObj(target)) {
|
|
55566
|
-
if (
|
|
55567
|
-
visitor(target,
|
|
55566
|
+
if (path7[0] === "default" || path7[0] === "x-value") {
|
|
55567
|
+
visitor(target, path7);
|
|
55568
55568
|
return;
|
|
55569
55569
|
}
|
|
55570
55570
|
var seenIndex = seenObjects.indexOf(target);
|
|
@@ -55574,15 +55574,15 @@ var traverseSchema = function(schema, visitor) {
|
|
|
55574
55574
|
var addIndex = seenObjects.length;
|
|
55575
55575
|
seenObjects.push(target);
|
|
55576
55576
|
if (isNoNeedCompileObject(target) && root !== target) {
|
|
55577
|
-
visitor(target,
|
|
55577
|
+
visitor(target, path7);
|
|
55578
55578
|
return;
|
|
55579
55579
|
}
|
|
55580
55580
|
each(target, function(value, key) {
|
|
55581
|
-
traverse2(value,
|
|
55581
|
+
traverse2(value, path7.concat(key));
|
|
55582
55582
|
});
|
|
55583
55583
|
seenObjects.splice(addIndex, 1);
|
|
55584
55584
|
} else {
|
|
55585
|
-
visitor(target,
|
|
55585
|
+
visitor(target, path7);
|
|
55586
55586
|
}
|
|
55587
55587
|
};
|
|
55588
55588
|
traverse2(schema);
|
|
@@ -55626,8 +55626,8 @@ var createDataSource = function(source) {
|
|
|
55626
55626
|
var patchStateFormSchema = function(targetState, pattern, compiled) {
|
|
55627
55627
|
untracked(function() {
|
|
55628
55628
|
var _a2;
|
|
55629
|
-
var
|
|
55630
|
-
var segments =
|
|
55629
|
+
var path7 = Path.parse(pattern);
|
|
55630
|
+
var segments = path7.segments;
|
|
55631
55631
|
var key = segments[0];
|
|
55632
55632
|
var isEnum = key === "enum" && isArr(compiled);
|
|
55633
55633
|
var schemaMapKey = SchemaStateMap[key];
|
|
@@ -55711,14 +55711,14 @@ var compile = function(source, scope) {
|
|
|
55711
55711
|
};
|
|
55712
55712
|
var patchCompile = function(targetState, sourceState, scope) {
|
|
55713
55713
|
traverse(sourceState, function(value, pattern) {
|
|
55714
|
-
var
|
|
55714
|
+
var path7 = Path.parse(pattern);
|
|
55715
55715
|
var compiled = compile(value, scope);
|
|
55716
|
-
var key =
|
|
55716
|
+
var key = path7.segments[0];
|
|
55717
55717
|
if (compiled === void 0)
|
|
55718
55718
|
return;
|
|
55719
55719
|
if (hasOwnProperty4.call(targetState, key)) {
|
|
55720
55720
|
untracked(function() {
|
|
55721
|
-
return Path.setIn(targetState,
|
|
55721
|
+
return Path.setIn(targetState, path7, compiled);
|
|
55722
55722
|
});
|
|
55723
55723
|
}
|
|
55724
55724
|
});
|
|
@@ -55727,7 +55727,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
|
55727
55727
|
if (demand === void 0) {
|
|
55728
55728
|
demand = false;
|
|
55729
55729
|
}
|
|
55730
|
-
traverseSchema(sourceSchema, function(value,
|
|
55730
|
+
traverseSchema(sourceSchema, function(value, path7, omitCompile) {
|
|
55731
55731
|
var compiled = value;
|
|
55732
55732
|
var collected = hasCollected(function() {
|
|
55733
55733
|
if (!omitCompile) {
|
|
@@ -55738,10 +55738,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
|
55738
55738
|
return;
|
|
55739
55739
|
if (demand) {
|
|
55740
55740
|
if (collected || !targetState.initialized) {
|
|
55741
|
-
patchStateFormSchema(targetState,
|
|
55741
|
+
patchStateFormSchema(targetState, path7, compiled);
|
|
55742
55742
|
}
|
|
55743
55743
|
} else {
|
|
55744
|
-
patchStateFormSchema(targetState,
|
|
55744
|
+
patchStateFormSchema(targetState, path7, compiled);
|
|
55745
55745
|
}
|
|
55746
55746
|
});
|
|
55747
55747
|
};
|
|
@@ -56025,14 +56025,14 @@ var getISOCode = function(language) {
|
|
|
56025
56025
|
});
|
|
56026
56026
|
return isoCode;
|
|
56027
56027
|
};
|
|
56028
|
-
var getLocaleByPath = function(
|
|
56028
|
+
var getLocaleByPath = function(path7, lang) {
|
|
56029
56029
|
if (lang === void 0) {
|
|
56030
56030
|
lang = registry.locales.language;
|
|
56031
56031
|
}
|
|
56032
|
-
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(
|
|
56032
|
+
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path7));
|
|
56033
56033
|
};
|
|
56034
|
-
var getValidateLocale = function(
|
|
56035
|
-
var message = getLocaleByPath(
|
|
56034
|
+
var getValidateLocale = function(path7) {
|
|
56035
|
+
var message = getLocaleByPath(path7);
|
|
56036
56036
|
return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
|
|
56037
56037
|
};
|
|
56038
56038
|
var getValidateMessageTemplateEngine = function() {
|
|
@@ -57293,15 +57293,15 @@ var buildFieldPath = function(field) {
|
|
|
57293
57293
|
var buildDataPath = function(fields, pattern) {
|
|
57294
57294
|
var prevArray = false;
|
|
57295
57295
|
var segments = pattern.segments;
|
|
57296
|
-
var
|
|
57297
|
-
var currentPath =
|
|
57296
|
+
var path7 = segments.reduce(function(path8, key, index) {
|
|
57297
|
+
var currentPath = path8.concat(key);
|
|
57298
57298
|
var currentAddress = segments.slice(0, index + 1);
|
|
57299
57299
|
var current = fields[currentAddress.join(".")];
|
|
57300
57300
|
if (prevArray) {
|
|
57301
57301
|
if (!isVoidField(current)) {
|
|
57302
57302
|
prevArray = false;
|
|
57303
57303
|
}
|
|
57304
|
-
return
|
|
57304
|
+
return path8;
|
|
57305
57305
|
}
|
|
57306
57306
|
if (index >= segments.length - 1) {
|
|
57307
57307
|
return currentPath;
|
|
@@ -57313,13 +57313,13 @@ var buildDataPath = function(fields, pattern) {
|
|
|
57313
57313
|
prevArray = true;
|
|
57314
57314
|
return currentPath;
|
|
57315
57315
|
}
|
|
57316
|
-
return
|
|
57316
|
+
return path8;
|
|
57317
57317
|
} else {
|
|
57318
57318
|
prevArray = false;
|
|
57319
57319
|
}
|
|
57320
57320
|
return currentPath;
|
|
57321
57321
|
}, []);
|
|
57322
|
-
return new Path(
|
|
57322
|
+
return new Path(path7);
|
|
57323
57323
|
};
|
|
57324
57324
|
var locateNode = function(field, address) {
|
|
57325
57325
|
field.address = Path.parse(address);
|
|
@@ -57353,33 +57353,33 @@ var destroy = function(target, address, forceClear) {
|
|
|
57353
57353
|
field === null || field === void 0 ? void 0 : field.dispose();
|
|
57354
57354
|
if (isDataField(field) && forceClear) {
|
|
57355
57355
|
var form = field.form;
|
|
57356
|
-
var
|
|
57357
|
-
form.deleteValuesIn(
|
|
57358
|
-
form.deleteInitialValuesIn(
|
|
57356
|
+
var path7 = field.path;
|
|
57357
|
+
form.deleteValuesIn(path7);
|
|
57358
|
+
form.deleteInitialValuesIn(path7);
|
|
57359
57359
|
}
|
|
57360
57360
|
delete target[address];
|
|
57361
57361
|
};
|
|
57362
|
-
var patchFormValues = function(form,
|
|
57363
|
-
var update = function(
|
|
57364
|
-
if (
|
|
57365
|
-
form.setValuesIn(
|
|
57362
|
+
var patchFormValues = function(form, path7, source) {
|
|
57363
|
+
var update = function(path8, source2) {
|
|
57364
|
+
if (path8.length) {
|
|
57365
|
+
form.setValuesIn(path8, clone(source2));
|
|
57366
57366
|
} else {
|
|
57367
57367
|
Object.assign(form.values, clone(source2));
|
|
57368
57368
|
}
|
|
57369
57369
|
};
|
|
57370
|
-
var patch = function(source2,
|
|
57371
|
-
if (
|
|
57372
|
-
|
|
57370
|
+
var patch = function(source2, path8) {
|
|
57371
|
+
if (path8 === void 0) {
|
|
57372
|
+
path8 = [];
|
|
57373
57373
|
}
|
|
57374
|
-
var targetValue = form.getValuesIn(
|
|
57375
|
-
var targetField = form.query(
|
|
57374
|
+
var targetValue = form.getValuesIn(path8);
|
|
57375
|
+
var targetField = form.query(path8).take();
|
|
57376
57376
|
var isUnVoidField = targetField && !isVoidField(targetField);
|
|
57377
57377
|
if (isUnVoidField && targetField.display === "none") {
|
|
57378
57378
|
targetField.caches.value = clone(source2);
|
|
57379
57379
|
return;
|
|
57380
57380
|
}
|
|
57381
57381
|
if (allowAssignDefaultValue(targetValue, source2)) {
|
|
57382
|
-
update(
|
|
57382
|
+
update(path8, source2);
|
|
57383
57383
|
} else {
|
|
57384
57384
|
if (isEmpty(source2))
|
|
57385
57385
|
return;
|
|
@@ -57387,20 +57387,20 @@ var patchFormValues = function(form, path6, source) {
|
|
|
57387
57387
|
return;
|
|
57388
57388
|
if (isPlainObj(targetValue) && isPlainObj(source2)) {
|
|
57389
57389
|
each(source2, function(value, key) {
|
|
57390
|
-
patch(value,
|
|
57390
|
+
patch(value, path8.concat(key));
|
|
57391
57391
|
});
|
|
57392
57392
|
} else {
|
|
57393
57393
|
if (targetField) {
|
|
57394
57394
|
if (isUnVoidField && !targetField.selfModified) {
|
|
57395
|
-
update(
|
|
57395
|
+
update(path8, source2);
|
|
57396
57396
|
}
|
|
57397
57397
|
} else if (form.initialized) {
|
|
57398
|
-
update(
|
|
57398
|
+
update(path8, source2);
|
|
57399
57399
|
}
|
|
57400
57400
|
}
|
|
57401
57401
|
}
|
|
57402
57402
|
};
|
|
57403
|
-
patch(source,
|
|
57403
|
+
patch(source, path7);
|
|
57404
57404
|
};
|
|
57405
57405
|
var matchFeedback = function(search, feedback) {
|
|
57406
57406
|
if (!search || !feedback)
|
|
@@ -57823,13 +57823,13 @@ var createBatchStateSetter = function(form) {
|
|
|
57823
57823
|
} else if (isGeneralField(pattern)) {
|
|
57824
57824
|
pattern.setState(payload);
|
|
57825
57825
|
} else {
|
|
57826
|
-
var matchCount_1 = 0,
|
|
57827
|
-
form.query(
|
|
57826
|
+
var matchCount_1 = 0, path7 = Path.parse(pattern);
|
|
57827
|
+
form.query(path7).forEach(function(field) {
|
|
57828
57828
|
field.setState(payload);
|
|
57829
57829
|
matchCount_1++;
|
|
57830
57830
|
});
|
|
57831
|
-
if (matchCount_1 === 0 ||
|
|
57832
|
-
subscribeUpdate(form,
|
|
57831
|
+
if (matchCount_1 === 0 || path7.isWildMatchPattern) {
|
|
57832
|
+
subscribeUpdate(form, path7, payload);
|
|
57833
57833
|
}
|
|
57834
57834
|
}
|
|
57835
57835
|
});
|
|
@@ -60445,8 +60445,8 @@ var FieldEffects = {
|
|
|
60445
60445
|
};
|
|
60446
60446
|
var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
|
|
60447
60447
|
var getDependencyValue = function(field, pattern, property) {
|
|
60448
|
-
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0],
|
|
60449
|
-
return field.query(target).getIn(
|
|
60448
|
+
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path7 = _a2[1];
|
|
60449
|
+
return field.query(target).getIn(path7 || property || "value");
|
|
60450
60450
|
};
|
|
60451
60451
|
var getDependencies = function(field, dependencies) {
|
|
60452
60452
|
if (isArr(dependencies)) {
|
|
@@ -61076,10 +61076,10 @@ var Schema = (
|
|
|
61076
61076
|
}()
|
|
61077
61077
|
);
|
|
61078
61078
|
|
|
61079
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61079
|
+
// ../../../../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
|
|
61080
61080
|
var import_inquirer = __toESM(require_inquirer());
|
|
61081
61081
|
|
|
61082
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61082
|
+
// ../../../../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
|
|
61083
61083
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
61084
61084
|
function validateSchema(schema) {
|
|
61085
61085
|
const { type, properties } = schema;
|
|
@@ -61171,7 +61171,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
61171
61171
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
61172
61172
|
}
|
|
61173
61173
|
|
|
61174
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61174
|
+
// ../../../../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
|
|
61175
61175
|
var compileRule = (rule, scope) => {
|
|
61176
61176
|
const state = Schema.compile(rule, {
|
|
61177
61177
|
$self: {},
|
|
@@ -61275,7 +61275,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
61275
61275
|
return answers;
|
|
61276
61276
|
}
|
|
61277
61277
|
|
|
61278
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61278
|
+
// ../../../../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
|
|
61279
61279
|
var CLIReader = class {
|
|
61280
61280
|
getAnswers() {
|
|
61281
61281
|
return this.answers;
|
|
@@ -61306,7 +61306,7 @@ var CLIReader = class {
|
|
|
61306
61306
|
}
|
|
61307
61307
|
};
|
|
61308
61308
|
|
|
61309
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61309
|
+
// ../../../../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
|
|
61310
61310
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
61311
61311
|
|
|
61312
61312
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -61372,7 +61372,7 @@ var I18n = class {
|
|
|
61372
61372
|
}
|
|
61373
61373
|
};
|
|
61374
61374
|
|
|
61375
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61375
|
+
// ../../../../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
|
|
61376
61376
|
var ZH_LOCALE = {
|
|
61377
61377
|
environment: {
|
|
61378
61378
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -61399,7 +61399,7 @@ var ZH_LOCALE = {
|
|
|
61399
61399
|
}
|
|
61400
61400
|
};
|
|
61401
61401
|
|
|
61402
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61402
|
+
// ../../../../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
|
|
61403
61403
|
var EN_LOCALE = {
|
|
61404
61404
|
environment: {
|
|
61405
61405
|
node_version: "please upgrade node to lts version",
|
|
@@ -61426,14 +61426,14 @@ var EN_LOCALE = {
|
|
|
61426
61426
|
}
|
|
61427
61427
|
};
|
|
61428
61428
|
|
|
61429
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61429
|
+
// ../../../../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
|
|
61430
61430
|
var i18n = new I18n();
|
|
61431
61431
|
var localeKeys = i18n.init("zh", {
|
|
61432
61432
|
zh: ZH_LOCALE,
|
|
61433
61433
|
en: EN_LOCALE
|
|
61434
61434
|
});
|
|
61435
61435
|
|
|
61436
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61436
|
+
// ../../../../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
|
|
61437
61437
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
|
61438
61438
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
61439
61439
|
for (const question of questions) {
|
|
@@ -61461,7 +61461,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
61461
61461
|
return questions;
|
|
61462
61462
|
}
|
|
61463
61463
|
|
|
61464
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61464
|
+
// ../../../../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
|
|
61465
61465
|
var import_path4 = __toESM(require("path"));
|
|
61466
61466
|
var import_utils12 = require("@modern-js/utils");
|
|
61467
61467
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -61509,7 +61509,7 @@ async function checkUseNvm(cwd, logger) {
|
|
|
61509
61509
|
}
|
|
61510
61510
|
}
|
|
61511
61511
|
|
|
61512
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61512
|
+
// ../../../../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
|
|
61513
61513
|
var AppAPI = class {
|
|
61514
61514
|
async checkEnvironment(nodeVersion) {
|
|
61515
61515
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -62206,7 +62206,7 @@ var MWADefaultConfig = {
|
|
|
62206
62206
|
};
|
|
62207
62207
|
|
|
62208
62208
|
// ../../generator-utils/dist/esm/index.js
|
|
62209
|
-
var
|
|
62209
|
+
var import_path6 = __toESM(require("path"));
|
|
62210
62210
|
var import_utils15 = require("@modern-js/utils");
|
|
62211
62211
|
|
|
62212
62212
|
// ../../generator-utils/dist/esm/utils/stripAnsi.js
|
|
@@ -62251,6 +62251,21 @@ var localeKeys3 = i18n3.init("en", {
|
|
|
62251
62251
|
en: EN_LOCALE3
|
|
62252
62252
|
});
|
|
62253
62253
|
|
|
62254
|
+
// ../../generator-utils/dist/esm/utils/getGeneratorPath.js
|
|
62255
|
+
var import_path5 = __toESM(require("path"));
|
|
62256
|
+
var getGeneratorPath = (generator, distTag, paths) => {
|
|
62257
|
+
if (process.env.CODESMITH_ENV === "development") {
|
|
62258
|
+
return import_path5.default.dirname(require.resolve(generator, {
|
|
62259
|
+
paths: paths !== null && paths !== void 0 ? paths : [
|
|
62260
|
+
process.cwd()
|
|
62261
|
+
]
|
|
62262
|
+
}));
|
|
62263
|
+
} else if (distTag) {
|
|
62264
|
+
return `${generator}@${distTag}`;
|
|
62265
|
+
}
|
|
62266
|
+
return generator;
|
|
62267
|
+
};
|
|
62268
|
+
|
|
62254
62269
|
// ../../generator-utils/dist/esm/index.js
|
|
62255
62270
|
var import_utils16 = require("@modern-js/utils");
|
|
62256
62271
|
async function getPackageVersion(packageName, registry2) {
|
|
@@ -62316,7 +62331,7 @@ function validatePackageName(value, packages, options) {
|
|
|
62316
62331
|
function validatePackagePath(value, projectDir, options) {
|
|
62317
62332
|
const { isMwa } = options || {};
|
|
62318
62333
|
const dir = isMwa ? "apps" : "packages";
|
|
62319
|
-
const packageDir =
|
|
62334
|
+
const packageDir = import_path6.default.resolve(projectDir || "", dir, value);
|
|
62320
62335
|
if (import_utils15.fs.existsSync(packageDir)) {
|
|
62321
62336
|
return {
|
|
62322
62337
|
success: false,
|
|
@@ -62365,14 +62380,6 @@ var i18n4 = new I18n2();
|
|
|
62365
62380
|
var localeKeys4 = i18n4.init("en", { zh: ZH_LOCALE4, en: EN_LOCALE4 });
|
|
62366
62381
|
|
|
62367
62382
|
// src/index.ts
|
|
62368
|
-
var getGeneratorPath = (generator, distTag) => {
|
|
62369
|
-
if (process.env.CODESMITH_ENV === "development") {
|
|
62370
|
-
return import_path6.default.dirname(require.resolve(generator));
|
|
62371
|
-
} else if (distTag) {
|
|
62372
|
-
return `${generator}@${distTag}`;
|
|
62373
|
-
}
|
|
62374
|
-
return generator;
|
|
62375
|
-
};
|
|
62376
62383
|
var handleTemplateFile = async (context, generator, appApi) => {
|
|
62377
62384
|
const { isMonorepoSubProject, projectDir = "" } = context.config;
|
|
62378
62385
|
const { outputPath } = generator;
|
|
@@ -62408,7 +62415,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62408
62415
|
}),
|
|
62409
62416
|
packagePath: (input) => validatePackagePath(
|
|
62410
62417
|
input,
|
|
62411
|
-
|
|
62418
|
+
import_path7.default.join(process.cwd(), projectDir),
|
|
62412
62419
|
{
|
|
62413
62420
|
isMwa: true
|
|
62414
62421
|
}
|
|
@@ -62426,7 +62433,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62426
62433
|
}),
|
|
62427
62434
|
packagePath: (input) => validatePackagePath(
|
|
62428
62435
|
input,
|
|
62429
|
-
|
|
62436
|
+
import_path7.default.join(process.cwd(), projectDir),
|
|
62430
62437
|
{ isMwa: true }
|
|
62431
62438
|
)
|
|
62432
62439
|
}
|
|
@@ -62445,9 +62452,9 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62445
62452
|
packagePath,
|
|
62446
62453
|
isMonorepoSubProject
|
|
62447
62454
|
);
|
|
62448
|
-
const dirname =
|
|
62455
|
+
const dirname = import_path7.default.basename(generator.outputPath);
|
|
62449
62456
|
await appApi.runSubGenerator(
|
|
62450
|
-
getGeneratorPath(BaseGenerator, context.config.distTag),
|
|
62457
|
+
getGeneratorPath(BaseGenerator, context.config.distTag, [__dirname]),
|
|
62451
62458
|
void 0,
|
|
62452
62459
|
{ ...context.config, hasPlugin: false }
|
|
62453
62460
|
);
|
|
@@ -62483,7 +62490,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62483
62490
|
);
|
|
62484
62491
|
}
|
|
62485
62492
|
await appApi.runSubGenerator(
|
|
62486
|
-
getGeneratorPath(EntryGenerator, context.config.distTag),
|
|
62493
|
+
getGeneratorPath(EntryGenerator, context.config.distTag, [__dirname]),
|
|
62487
62494
|
`./${projectPath}`,
|
|
62488
62495
|
{
|
|
62489
62496
|
...context.config,
|
|
@@ -62498,7 +62505,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
62498
62505
|
}
|
|
62499
62506
|
if (packagesInfo && Object.keys(packagesInfo).length > 0) {
|
|
62500
62507
|
await appApi.runSubGenerator(
|
|
62501
|
-
getGeneratorPath(PackagesGenerator, context.config.distTag),
|
|
62508
|
+
getGeneratorPath(PackagesGenerator, context.config.distTag, [__dirname]),
|
|
62502
62509
|
void 0,
|
|
62503
62510
|
context.config
|
|
62504
62511
|
);
|