@modern-js/monorepo-generator 3.3.9 → 3.3.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +310 -303
- 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(path8) {
|
9108
|
+
return /^\.|this\b/.test(path8.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(path8) {
|
9113
|
+
return path8.parts.length === 1 && !AST.helpers.scopedId(path8) && !path8.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(path8, 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: path8,
|
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), path8 = decorator.path;
|
10474
10474
|
this.useDecorators = true;
|
10475
|
-
this.opcode("registerDecorator", params.length,
|
10475
|
+
this.opcode("registerDecorator", params.length, path8.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 path8 = sexpr.path, name = path8.parts[0], isBlock = program != null || inverse != null;
|
10540
|
+
this.opcode("getContext", path8.depth);
|
10541
10541
|
this.opcode("pushProgram", program);
|
10542
10542
|
this.opcode("pushProgram", inverse);
|
10543
|
-
|
10544
|
-
this.accept(
|
10543
|
+
path8.strict = true;
|
10544
|
+
this.accept(path8);
|
10545
10545
|
this.opcode("invokeAmbiguous", name, isBlock);
|
10546
10546
|
},
|
10547
10547
|
simpleSexpr: function simpleSexpr(sexpr) {
|
10548
|
-
var
|
10549
|
-
|
10550
|
-
this.accept(
|
10548
|
+
var path8 = sexpr.path;
|
10549
|
+
path8.strict = true;
|
10550
|
+
this.accept(path8);
|
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), path8 = sexpr.path, name = path8.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
|
+
path8.strict = true;
|
10561
|
+
path8.falsy = true;
|
10562
|
+
this.accept(path8);
|
10563
|
+
this.opcode("invokeHelper", params.length, path8.original, _ast2["default"].helpers.simpleId(path8));
|
10564
10564
|
}
|
10565
10565
|
},
|
10566
|
-
PathExpression: function PathExpression(
|
10567
|
-
this.addDepth(
|
10568
|
-
this.opcode("getContext",
|
10569
|
-
var name =
|
10566
|
+
PathExpression: function PathExpression(path8) {
|
10567
|
+
this.addDepth(path8.depth);
|
10568
|
+
this.opcode("getContext", path8.depth);
|
10569
|
+
var name = path8.parts[0], scoped = _ast2["default"].helpers.scopedId(path8), blockParamId = !path8.depth && !scoped && this.blockParamIndex(name);
|
10570
10570
|
if (blockParamId) {
|
10571
|
-
this.opcode("lookupBlockParam", blockParamId,
|
10571
|
+
this.opcode("lookupBlockParam", blockParamId, path8.parts);
|
10572
10572
|
} else if (!name) {
|
10573
10573
|
this.opcode("pushContext");
|
10574
|
-
} else if (
|
10574
|
+
} else if (path8.data) {
|
10575
10575
|
this.options.data = true;
|
10576
|
-
this.opcode("lookupData",
|
10576
|
+
this.opcode("lookupData", path8.depth, path8.parts, path8.strict);
|
10577
10577
|
} else {
|
10578
|
-
this.opcode("lookupOnContext",
|
10578
|
+
this.opcode("lookupOnContext", path8.parts, path8.falsy, path8.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 path8 = aPath;
|
10933
10933
|
var url = urlParse(aPath);
|
10934
10934
|
if (url) {
|
10935
10935
|
if (!url.path) {
|
10936
10936
|
return aPath;
|
10937
10937
|
}
|
10938
|
-
|
10938
|
+
path8 = url.path;
|
10939
10939
|
}
|
10940
|
-
var isAbsolute = exports.isAbsolute(
|
10941
|
-
var parts =
|
10940
|
+
var isAbsolute = exports.isAbsolute(path8);
|
10941
|
+
var parts = path8.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
|
+
path8 = parts.join("/");
|
10959
|
+
if (path8 === "") {
|
10960
|
+
path8 = isAbsolute ? "/" : ".";
|
10961
10961
|
}
|
10962
10962
|
if (url) {
|
10963
|
-
url.path =
|
10963
|
+
url.path = path8;
|
10964
10964
|
return urlGenerate(url);
|
10965
10965
|
}
|
10966
|
-
return
|
10966
|
+
return path8;
|
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 path8 = id.parts.join("/");
|
13757
|
+
return (id.data ? "@" : "") + "PATH:" + path8;
|
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 path8 = 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 = path8.dirname;
|
14018
|
+
var extname = path8.extname;
|
14019
|
+
var resolve = path8.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(path9, 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(path9);
|
14041
14041
|
if (match && match.length) {
|
14042
|
-
|
14042
|
+
path9 = path9.replace(/^\/*/, "");
|
14043
14043
|
if (Array.isArray(options.root)) {
|
14044
|
-
includePath = resolvePaths(
|
14044
|
+
includePath = resolvePaths(path9, options.root);
|
14045
14045
|
} else {
|
14046
|
-
includePath = exports.resolveInclude(
|
14046
|
+
includePath = exports.resolveInclude(path9, options.root || "/", true);
|
14047
14047
|
}
|
14048
14048
|
} else {
|
14049
14049
|
if (options.filename) {
|
14050
|
-
filePath = exports.resolveInclude(
|
14050
|
+
filePath = exports.resolveInclude(path9, 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(path9, 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(path9) + '"');
|
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(path9, options) {
|
14119
14119
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
14120
|
-
opts.filename = getIncludePath(
|
14120
|
+
opts.filename = getIncludePath(path9, opts);
|
14121
14121
|
if (typeof options.includer === "function") {
|
14122
|
-
var includerResult = options.includer(
|
14122
|
+
var includerResult = options.includer(path9, 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(path9, 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(path9, 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 = path8.basename(filename, path8.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, path8) {
|
17352
|
+
path8 = castPath(path8, object);
|
17353
|
+
var index = 0, length = path8.length;
|
17354
17354
|
while (object != null && index < length) {
|
17355
|
-
object = object[toKey(
|
17355
|
+
object = object[toKey(path8[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, path8, defaultValue) {
|
17369
|
+
var result = object == null ? void 0 : baseGet(object, path8);
|
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, path8, value, customizer) {
|
17457
17457
|
if (!isObject4(object)) {
|
17458
17458
|
return object;
|
17459
17459
|
}
|
17460
|
-
|
17461
|
-
var index = -1, length =
|
17460
|
+
path8 = castPath(path8, object);
|
17461
|
+
var index = -1, length = path8.length, lastIndex = length - 1, nested = object;
|
17462
17462
|
while (nested != null && ++index < length) {
|
17463
|
-
var key = toKey(
|
17463
|
+
var key = toKey(path8[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(path8[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, path8, value) {
|
17489
|
+
return object == null ? object : baseSet(object, path8, 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, path8, hasFunc) {
|
30111
|
+
path8 = castPath(path8, object);
|
30112
|
+
var index = -1, length = path8.length, result = false;
|
30113
30113
|
while (++index < length) {
|
30114
|
-
var key = toKey(
|
30114
|
+
var key = toKey(path8[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, path8) {
|
30137
|
+
return object != null && hasPath(object, path8, 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(path8, srcValue) {
|
30157
|
+
if (isKey(path8) && isStrictComparable(srcValue)) {
|
30158
|
+
return matchesStrictComparable(toKey(path8), 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, path8);
|
30162
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path8) : 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(path8) {
|
30188
30188
|
return function(object) {
|
30189
|
-
return baseGet(object,
|
30189
|
+
return baseGet(object, path8);
|
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(path8) {
|
30205
|
+
return isKey(path8) ? baseProperty(toKey(path8)) : basePropertyDeep(path8);
|
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 path8 = [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
|
+
path8.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 = path8;
|
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 path8;
|
47559
47559
|
if (isWindows) {
|
47560
|
-
|
47560
|
+
path8 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
|
47561
47561
|
} else {
|
47562
|
-
|
47562
|
+
path8 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
|
47563
47563
|
}
|
47564
|
-
if (trailingSlashRe.test(
|
47565
|
-
|
47564
|
+
if (trailingSlashRe.test(path8)) {
|
47565
|
+
path8 = path8.slice(0, -1);
|
47566
47566
|
}
|
47567
|
-
return
|
47567
|
+
return path8;
|
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 path8 = 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 path8.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 path8.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 = path8.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, path8) {
|
48477
|
+
return path8.length < 2 ? object : baseGet(object, baseSlice(path8, 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, path8) {
|
48492
|
+
path8 = castPath(path8, object);
|
48493
|
+
object = parent(object, path8);
|
48494
|
+
return object == null || delete object[toKey(last(path8))];
|
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(path8) {
|
48604
|
+
path8 = castPath(path8, object);
|
48605
|
+
isDeep || (isDeep = path8.length > 1);
|
48606
|
+
return path8;
|
48607
48607
|
});
|
48608
48608
|
copyObject(object, getAllKeysIn(object), result);
|
48609
48609
|
if (isDeep) {
|
@@ -52068,26 +52068,26 @@ var require_mongo_dot = __commonJS({
|
|
52068
52068
|
}
|
52069
52069
|
}
|
52070
52070
|
exports.parent = parent;
|
52071
|
-
var get3 = function(obj,
|
52072
|
-
if (
|
52073
|
-
var par = parent(obj,
|
52074
|
-
var mainKey =
|
52071
|
+
var get3 = function(obj, path8) {
|
52072
|
+
if (path8.includes(".")) {
|
52073
|
+
var par = parent(obj, path8);
|
52074
|
+
var mainKey = path8.split(".").pop();
|
52075
52075
|
var t = get_type_1.default(par);
|
52076
52076
|
if ("object" === t || "array" === t)
|
52077
52077
|
return par[mainKey];
|
52078
52078
|
} else {
|
52079
|
-
return obj[
|
52079
|
+
return obj[path8];
|
52080
52080
|
}
|
52081
52081
|
};
|
52082
52082
|
exports.get = get3;
|
52083
|
-
var set = function(obj,
|
52084
|
-
if (
|
52085
|
-
var par = parent(obj,
|
52086
|
-
var mainKey =
|
52083
|
+
var set = function(obj, path8, val) {
|
52084
|
+
if (path8.includes(".")) {
|
52085
|
+
var par = parent(obj, path8, true);
|
52086
|
+
var mainKey = path8.split(".").pop();
|
52087
52087
|
if (par && "object" === get_type_1.default(par))
|
52088
52088
|
par[mainKey] = val;
|
52089
52089
|
} else {
|
52090
|
-
obj[
|
52090
|
+
obj[path8] = val;
|
52091
52091
|
}
|
52092
52092
|
};
|
52093
52093
|
exports.set = set;
|
@@ -52169,9 +52169,9 @@ var require_mods = __commonJS({
|
|
52169
52169
|
}
|
52170
52170
|
};
|
52171
52171
|
}
|
52172
|
-
var $set = function $set2(obj,
|
52173
|
-
var key =
|
52174
|
-
obj = mongoDot.parent(obj,
|
52172
|
+
var $set = function $set2(obj, path8, val) {
|
52173
|
+
var key = path8.split(".").pop();
|
52174
|
+
obj = mongoDot.parent(obj, path8, true);
|
52175
52175
|
switch (get_type_1.default(obj)) {
|
52176
52176
|
case "object":
|
52177
52177
|
if (!mongo_eql_1.default(obj[key], val)) {
|
@@ -52198,9 +52198,9 @@ var require_mods = __commonJS({
|
|
52198
52198
|
}
|
52199
52199
|
};
|
52200
52200
|
exports.$set = $set;
|
52201
|
-
var $unset = function $unset2(obj,
|
52202
|
-
var key =
|
52203
|
-
obj = mongoDot.parent(obj,
|
52201
|
+
var $unset = function $unset2(obj, path8) {
|
52202
|
+
var key = path8.split(".").pop();
|
52203
|
+
obj = mongoDot.parent(obj, path8);
|
52204
52204
|
switch (get_type_1.default(obj)) {
|
52205
52205
|
case "array":
|
52206
52206
|
case "object":
|
@@ -52214,17 +52214,17 @@ var require_mods = __commonJS({
|
|
52214
52214
|
}
|
52215
52215
|
};
|
52216
52216
|
exports.$unset = $unset;
|
52217
|
-
var $rename = function $rename2(obj,
|
52218
|
-
if (
|
52217
|
+
var $rename = function $rename2(obj, path8, newKey) {
|
52218
|
+
if (path8 === newKey) {
|
52219
52219
|
throw new Error("$rename source must differ from target");
|
52220
52220
|
}
|
52221
|
-
if (0 ===
|
52221
|
+
if (0 === path8.indexOf(newKey + ".")) {
|
52222
52222
|
throw new Error("$rename target may not be a parent of source");
|
52223
52223
|
}
|
52224
|
-
var p = mongoDot.parent(obj,
|
52224
|
+
var p = mongoDot.parent(obj, path8);
|
52225
52225
|
var t = get_type_1.default(p);
|
52226
52226
|
if ("object" === t) {
|
52227
|
-
var key_1 =
|
52227
|
+
var key_1 = path8.split(".").pop();
|
52228
52228
|
if (p.hasOwnProperty(key_1)) {
|
52229
52229
|
return function() {
|
52230
52230
|
var val = p[key_1];
|
@@ -52245,12 +52245,12 @@ var require_mods = __commonJS({
|
|
52245
52245
|
}
|
52246
52246
|
};
|
52247
52247
|
exports.$rename = $rename;
|
52248
|
-
var $inc = function $inc2(obj,
|
52248
|
+
var $inc = function $inc2(obj, path8, inc) {
|
52249
52249
|
if ("number" !== get_type_1.default(inc)) {
|
52250
52250
|
throw new Error("Modifier $inc allowed for numbers only");
|
52251
52251
|
}
|
52252
|
-
obj = mongoDot.parent(obj,
|
52253
|
-
var key =
|
52252
|
+
obj = mongoDot.parent(obj, path8, true);
|
52253
|
+
var key = path8.split(".").pop();
|
52254
52254
|
switch (get_type_1.default(obj)) {
|
52255
52255
|
case "array":
|
52256
52256
|
case "object":
|
@@ -52276,9 +52276,9 @@ var require_mods = __commonJS({
|
|
52276
52276
|
}
|
52277
52277
|
};
|
52278
52278
|
exports.$inc = $inc;
|
52279
|
-
var $pop = function $pop2(obj,
|
52280
|
-
obj = mongoDot.parent(obj,
|
52281
|
-
var key =
|
52279
|
+
var $pop = function $pop2(obj, path8, val) {
|
52280
|
+
obj = mongoDot.parent(obj, path8);
|
52281
|
+
var key = path8.split(".").pop();
|
52282
52282
|
switch (get_type_1.default(obj)) {
|
52283
52283
|
case "array":
|
52284
52284
|
case "object":
|
@@ -52311,9 +52311,9 @@ var require_mods = __commonJS({
|
|
52311
52311
|
}
|
52312
52312
|
};
|
52313
52313
|
exports.$pop = $pop;
|
52314
|
-
var $push = function $push2(obj,
|
52315
|
-
obj = mongoDot.parent(obj,
|
52316
|
-
var key =
|
52314
|
+
var $push = function $push2(obj, path8, val) {
|
52315
|
+
obj = mongoDot.parent(obj, path8, true);
|
52316
|
+
var key = path8.split(".").pop();
|
52317
52317
|
switch (get_type_1.default(obj)) {
|
52318
52318
|
case "object":
|
52319
52319
|
if (obj.hasOwnProperty(key)) {
|
@@ -52354,12 +52354,12 @@ var require_mods = __commonJS({
|
|
52354
52354
|
}
|
52355
52355
|
};
|
52356
52356
|
exports.$push = $push;
|
52357
|
-
var $pushAll = function $pushAll2(obj,
|
52357
|
+
var $pushAll = function $pushAll2(obj, path8, val) {
|
52358
52358
|
if ("array" !== get_type_1.default(val)) {
|
52359
52359
|
throw new Error("Modifier $pushAll/pullAll allowed for arrays only");
|
52360
52360
|
}
|
52361
|
-
obj = mongoDot.parent(obj,
|
52362
|
-
var key =
|
52361
|
+
obj = mongoDot.parent(obj, path8, true);
|
52362
|
+
var key = path8.split(".").pop();
|
52363
52363
|
switch (get_type_1.default(obj)) {
|
52364
52364
|
case "object":
|
52365
52365
|
if (obj.hasOwnProperty(key)) {
|
@@ -52400,9 +52400,9 @@ var require_mods = __commonJS({
|
|
52400
52400
|
}
|
52401
52401
|
};
|
52402
52402
|
exports.$pushAll = $pushAll;
|
52403
|
-
var $pull = function $pull2(obj,
|
52404
|
-
obj = mongoDot.parent(obj,
|
52405
|
-
var key =
|
52403
|
+
var $pull = function $pull2(obj, path8, val) {
|
52404
|
+
obj = mongoDot.parent(obj, path8, true);
|
52405
|
+
var key = path8.split(".").pop();
|
52406
52406
|
var t = get_type_1.default(obj);
|
52407
52407
|
switch (t) {
|
52408
52408
|
case "object":
|
@@ -52446,12 +52446,12 @@ var require_mods = __commonJS({
|
|
52446
52446
|
}
|
52447
52447
|
};
|
52448
52448
|
exports.$pull = $pull;
|
52449
|
-
var $pullAll = function $pullAll2(obj,
|
52449
|
+
var $pullAll = function $pullAll2(obj, path8, val) {
|
52450
52450
|
if ("array" !== get_type_1.default(val)) {
|
52451
52451
|
throw new Error("Modifier $pushAll/pullAll allowed for arrays only");
|
52452
52452
|
}
|
52453
|
-
obj = mongoDot.parent(obj,
|
52454
|
-
var key =
|
52453
|
+
obj = mongoDot.parent(obj, path8, true);
|
52454
|
+
var key = path8.split(".").pop();
|
52455
52455
|
var t = get_type_1.default(obj);
|
52456
52456
|
switch (t) {
|
52457
52457
|
case "object":
|
@@ -52495,11 +52495,11 @@ var require_mods = __commonJS({
|
|
52495
52495
|
}
|
52496
52496
|
};
|
52497
52497
|
exports.$pullAll = $pullAll;
|
52498
|
-
var $addToSet = function $addToSet2(obj,
|
52498
|
+
var $addToSet = function $addToSet2(obj, path8, val, recursing) {
|
52499
52499
|
if (!recursing && "array" === get_type_1.default(val.$each)) {
|
52500
52500
|
var fns_1 = [];
|
52501
52501
|
for (var i = 0, l = val.$each.length; i < l; i++) {
|
52502
|
-
var fn = $addToSet2(obj,
|
52502
|
+
var fn = $addToSet2(obj, path8, val.$each[i], true);
|
52503
52503
|
if (fn)
|
52504
52504
|
fns_1.push(fn);
|
52505
52505
|
}
|
@@ -52514,8 +52514,8 @@ var require_mods = __commonJS({
|
|
52514
52514
|
return;
|
52515
52515
|
}
|
52516
52516
|
}
|
52517
|
-
obj = mongoDot.parent(obj,
|
52518
|
-
var key =
|
52517
|
+
obj = mongoDot.parent(obj, path8, true);
|
52518
|
+
var key = path8.split(".").pop();
|
52519
52519
|
switch (get_type_1.default(obj)) {
|
52520
52520
|
case "object":
|
52521
52521
|
if (obj.hasOwnProperty(key)) {
|
@@ -52657,7 +52657,7 @@ __export(src_exports, {
|
|
52657
52657
|
handleTemplateFile: () => handleTemplateFile
|
52658
52658
|
});
|
52659
52659
|
module.exports = __toCommonJS(src_exports);
|
52660
|
-
var
|
52660
|
+
var import_path8 = __toESM(require("path"));
|
52661
52661
|
|
52662
52662
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
|
52663
52663
|
function _define_property(obj, key, value) {
|
@@ -52668,23 +52668,23 @@ function _define_property(obj, key, value) {
|
|
52668
52668
|
return obj;
|
52669
52669
|
}
|
52670
52670
|
|
52671
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
52671
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
52672
52672
|
var import_path = __toESM(require("path"));
|
52673
52673
|
var import_utils = require("@modern-js/utils");
|
52674
52674
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
52675
52675
|
|
52676
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
52676
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
52677
52677
|
var import_utils2 = require("@modern-js/utils");
|
52678
|
-
async function fsExists(
|
52678
|
+
async function fsExists(path8) {
|
52679
52679
|
try {
|
52680
|
-
await import_utils2.fs.access(
|
52680
|
+
await import_utils2.fs.access(path8);
|
52681
52681
|
return true;
|
52682
52682
|
} catch (e) {
|
52683
52683
|
return false;
|
52684
52684
|
}
|
52685
52685
|
}
|
52686
52686
|
|
52687
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
52687
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
52688
52688
|
var import_path2 = __toESM(require("path"));
|
52689
52689
|
var import_utils3 = require("@modern-js/utils");
|
52690
52690
|
async function canUseYarn() {
|
@@ -52712,12 +52712,12 @@ async function canUsePnpm() {
|
|
52712
52712
|
}
|
52713
52713
|
}
|
52714
52714
|
|
52715
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
52715
|
+
// ../../../../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
|
52716
52716
|
var import_utils14 = require("@modern-js/utils");
|
52717
52717
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
52718
52718
|
var import_comment_json = __toESM(require_src2());
|
52719
52719
|
|
52720
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
52720
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
52721
52721
|
var import_utils4 = require("@modern-js/utils");
|
52722
52722
|
async function canUseNvm() {
|
52723
52723
|
try {
|
@@ -52767,7 +52767,7 @@ async function canUsePnpm2() {
|
|
52767
52767
|
}
|
52768
52768
|
}
|
52769
52769
|
|
52770
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
52770
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
52771
52771
|
var import_utils5 = require("@modern-js/utils");
|
52772
52772
|
function execaWithStreamLog(command, args, options) {
|
52773
52773
|
const promise = (0, import_utils5.execa)(command, args, {
|
@@ -52863,7 +52863,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
52863
52863
|
throw new Error("please install pnpm first");
|
52864
52864
|
}
|
52865
52865
|
|
52866
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
52866
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
52867
52867
|
var NpmAPI = class {
|
52868
52868
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
52869
52869
|
return npmInstall({
|
@@ -52892,7 +52892,7 @@ var NpmAPI = class {
|
|
52892
52892
|
}
|
52893
52893
|
};
|
52894
52894
|
|
52895
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
52895
|
+
// ../../../../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
|
52896
52896
|
var import_utils7 = require("@modern-js/utils");
|
52897
52897
|
async function canUseGit() {
|
52898
52898
|
try {
|
@@ -52967,7 +52967,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
52967
52967
|
});
|
52968
52968
|
}
|
52969
52969
|
|
52970
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
52970
|
+
// ../../../../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
|
52971
52971
|
var GitAPI = class {
|
52972
52972
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
52973
52973
|
const canUse = await canUseGit();
|
@@ -53019,7 +53019,7 @@ var GitAPI = class {
|
|
53019
53019
|
}
|
53020
53020
|
};
|
53021
53021
|
|
53022
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
53022
|
+
// ../../../../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
|
53023
53023
|
var import_handlebars = __toESM(require_lib());
|
53024
53024
|
function renderString(template, fullData, registers) {
|
53025
53025
|
const helpers = {
|
@@ -53033,7 +53033,7 @@ function renderString(template, fullData, registers) {
|
|
53033
53033
|
return import_handlebars.default.compile(template)(fullData) || "";
|
53034
53034
|
}
|
53035
53035
|
|
53036
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
53036
|
+
// ../../../../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
|
53037
53037
|
var HandlebarsAPI = class {
|
53038
53038
|
async registerHelp(helpers) {
|
53039
53039
|
this.registers.helpers = {
|
@@ -53083,13 +53083,13 @@ var HandlebarsAPI = class {
|
|
53083
53083
|
}
|
53084
53084
|
};
|
53085
53085
|
|
53086
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
53086
|
+
// ../../../../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
|
53087
53087
|
var import_ejs = __toESM(require_ejs());
|
53088
53088
|
function renderString2(template, fullData) {
|
53089
53089
|
return import_ejs.default.render(template, fullData) || "";
|
53090
53090
|
}
|
53091
53091
|
|
53092
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
53092
|
+
// ../../../../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
|
53093
53093
|
var EjsAPI = class {
|
53094
53094
|
async renderTemplate(templateResource, target, parameters = {}) {
|
53095
53095
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -53122,7 +53122,7 @@ var EjsAPI = class {
|
|
53122
53122
|
}
|
53123
53123
|
};
|
53124
53124
|
|
53125
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
53125
|
+
// ../../../../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
|
53126
53126
|
var import_path3 = __toESM(require("path"));
|
53127
53127
|
var import_utils11 = require("@modern-js/utils");
|
53128
53128
|
var FsAPI = class {
|
@@ -54175,8 +54175,8 @@ var parseDestructorRules = function(node) {
|
|
54175
54175
|
};
|
54176
54176
|
var setInByDestructor = function(source, rules, value, mutators) {
|
54177
54177
|
rules.forEach(function(_a2) {
|
54178
|
-
var key = _a2.key,
|
54179
|
-
mutators.setIn([key], source, mutators.getIn(
|
54178
|
+
var key = _a2.key, path8 = _a2.path;
|
54179
|
+
mutators.setIn([key], source, mutators.getIn(path8, value));
|
54180
54180
|
});
|
54181
54181
|
};
|
54182
54182
|
var getInByDestructor = function(source, rules, mutators) {
|
@@ -54188,8 +54188,8 @@ var getInByDestructor = function(source, rules, mutators) {
|
|
54188
54188
|
}
|
54189
54189
|
source = isValid2(source) ? source : {};
|
54190
54190
|
rules.forEach(function(_a2) {
|
54191
|
-
var key = _a2.key,
|
54192
|
-
mutators.setIn(
|
54191
|
+
var key = _a2.key, path8 = _a2.path;
|
54192
|
+
mutators.setIn(path8, response, source[key]);
|
54193
54193
|
});
|
54194
54194
|
return response;
|
54195
54195
|
};
|
@@ -54756,8 +54756,8 @@ var Matcher = (
|
|
54756
54756
|
}
|
54757
54757
|
return false;
|
54758
54758
|
};
|
54759
|
-
Matcher2.prototype.match = function(
|
54760
|
-
this.path =
|
54759
|
+
Matcher2.prototype.match = function(path8) {
|
54760
|
+
this.path = path8;
|
54761
54761
|
return { matched: this.matchNode(this.tree), record: this.record };
|
54762
54762
|
};
|
54763
54763
|
Matcher2.matchSegments = function(source, target, record) {
|
@@ -55047,21 +55047,21 @@ var Path = (
|
|
55047
55047
|
if (_this.isMatchPattern || _this.isRegExp) {
|
55048
55048
|
throw new Error("".concat(_this.entire, " cannot be concat"));
|
55049
55049
|
}
|
55050
|
-
var
|
55051
|
-
|
55050
|
+
var path8 = new Path2("");
|
55051
|
+
path8.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
|
55052
55052
|
return parseString(s);
|
55053
55053
|
})), false));
|
55054
|
-
|
55055
|
-
return
|
55054
|
+
path8.entire = path8.segments.join(".");
|
55055
|
+
return path8;
|
55056
55056
|
};
|
55057
55057
|
this.slice = function(start, end) {
|
55058
55058
|
if (_this.isMatchPattern || _this.isRegExp) {
|
55059
55059
|
throw new Error("".concat(_this.entire, " cannot be slice"));
|
55060
55060
|
}
|
55061
|
-
var
|
55062
|
-
|
55063
|
-
|
55064
|
-
return
|
55061
|
+
var path8 = new Path2("");
|
55062
|
+
path8.segments = _this.segments.slice(start, end);
|
55063
|
+
path8.entire = path8.segments.join(".");
|
55064
|
+
return path8;
|
55065
55065
|
};
|
55066
55066
|
this.push = function() {
|
55067
55067
|
var items = [];
|
@@ -55153,8 +55153,8 @@ var Path = (
|
|
55153
55153
|
};
|
55154
55154
|
this.match = function(pattern) {
|
55155
55155
|
var _a3, _b;
|
55156
|
-
var
|
55157
|
-
var cache = _this.matchCache.get(
|
55156
|
+
var path8 = Path2.parse(pattern);
|
55157
|
+
var cache = _this.matchCache.get(path8.entire);
|
55158
55158
|
if (cache !== void 0) {
|
55159
55159
|
if (cache.record && cache.record.score !== void 0) {
|
55160
55160
|
_this.matchScore = cache.record.score;
|
@@ -55162,21 +55162,21 @@ var Path = (
|
|
55162
55162
|
return cache.matched;
|
55163
55163
|
}
|
55164
55164
|
var cacheWith = function(value) {
|
55165
|
-
_this.matchCache.set(
|
55165
|
+
_this.matchCache.set(path8.entire, value);
|
55166
55166
|
return value;
|
55167
55167
|
};
|
55168
|
-
if (
|
55168
|
+
if (path8.isMatchPattern) {
|
55169
55169
|
if (_this.isMatchPattern) {
|
55170
|
-
throw new Error("".concat(
|
55170
|
+
throw new Error("".concat(path8.entire, " cannot match ").concat(_this.entire));
|
55171
55171
|
} else {
|
55172
55172
|
_this.matchScore = 0;
|
55173
|
-
return cacheWith(
|
55173
|
+
return cacheWith(path8.match(_this.segments));
|
55174
55174
|
}
|
55175
55175
|
} else {
|
55176
55176
|
if (_this.isMatchPattern) {
|
55177
55177
|
if (_this.isRegExp) {
|
55178
55178
|
try {
|
55179
|
-
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3,
|
55179
|
+
return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path8.entire);
|
55180
55180
|
} finally {
|
55181
55181
|
;
|
55182
55182
|
_this.entire.lastIndex = 0;
|
@@ -55185,14 +55185,14 @@ var Path = (
|
|
55185
55185
|
var record = {
|
55186
55186
|
score: 0
|
55187
55187
|
};
|
55188
|
-
var result = cacheWith(new Matcher(_this.tree, record).match(
|
55188
|
+
var result = cacheWith(new Matcher(_this.tree, record).match(path8.segments));
|
55189
55189
|
_this.matchScore = record.score;
|
55190
55190
|
return result.matched;
|
55191
55191
|
} else {
|
55192
55192
|
var record = {
|
55193
55193
|
score: 0
|
55194
55194
|
};
|
55195
|
-
var result = cacheWith(Matcher.matchSegments(_this.segments,
|
55195
|
+
var result = cacheWith(Matcher.matchSegments(_this.segments, path8.segments, record));
|
55196
55196
|
_this.matchScore = record.score;
|
55197
55197
|
return result.matched;
|
55198
55198
|
}
|
@@ -55268,12 +55268,12 @@ var Path = (
|
|
55268
55268
|
configurable: true
|
55269
55269
|
});
|
55270
55270
|
Path2.match = function(pattern) {
|
55271
|
-
var
|
55271
|
+
var path8 = Path2.parse(pattern);
|
55272
55272
|
var matcher = function(target) {
|
55273
|
-
return
|
55273
|
+
return path8.match(target);
|
55274
55274
|
};
|
55275
55275
|
matcher[isMatcher] = true;
|
55276
|
-
matcher.path =
|
55276
|
+
matcher.path = path8;
|
55277
55277
|
return matcher;
|
55278
55278
|
};
|
55279
55279
|
Path2.isPathPattern = function(target) {
|
@@ -55282,52 +55282,52 @@ var Path = (
|
|
55282
55282
|
Path2.transform = function(pattern, regexp, callback) {
|
55283
55283
|
return Path2.parse(pattern).transform(regexp, callback);
|
55284
55284
|
};
|
55285
|
-
Path2.parse = function(
|
55286
|
-
if (
|
55287
|
-
|
55285
|
+
Path2.parse = function(path8, base) {
|
55286
|
+
if (path8 === void 0) {
|
55287
|
+
path8 = "";
|
55288
55288
|
}
|
55289
|
-
if (
|
55290
|
-
var found = pathCache.get(
|
55289
|
+
if (path8 instanceof Path2) {
|
55290
|
+
var found = pathCache.get(path8.entire);
|
55291
55291
|
if (found) {
|
55292
55292
|
return found;
|
55293
55293
|
} else {
|
55294
|
-
pathCache.set(
|
55295
|
-
return
|
55294
|
+
pathCache.set(path8.entire, path8);
|
55295
|
+
return path8;
|
55296
55296
|
}
|
55297
|
-
} else if (
|
55298
|
-
return Path2.parse(
|
55297
|
+
} else if (path8 && path8[isMatcher]) {
|
55298
|
+
return Path2.parse(path8["path"]);
|
55299
55299
|
} else {
|
55300
55300
|
var key_ = base ? Path2.parse(base) : "";
|
55301
|
-
var key = "".concat(
|
55301
|
+
var key = "".concat(path8, ":").concat(key_);
|
55302
55302
|
var found = pathCache.get(key);
|
55303
55303
|
if (found) {
|
55304
55304
|
return found;
|
55305
55305
|
} else {
|
55306
|
-
|
55307
|
-
pathCache.set(key,
|
55308
|
-
return
|
55306
|
+
path8 = new Path2(path8, base);
|
55307
|
+
pathCache.set(key, path8);
|
55308
|
+
return path8;
|
55309
55309
|
}
|
55310
55310
|
}
|
55311
55311
|
};
|
55312
55312
|
Path2.getIn = function(source, pattern) {
|
55313
|
-
var
|
55314
|
-
return
|
55313
|
+
var path8 = Path2.parse(pattern);
|
55314
|
+
return path8.getIn(source);
|
55315
55315
|
};
|
55316
55316
|
Path2.setIn = function(source, pattern, value) {
|
55317
|
-
var
|
55318
|
-
return
|
55317
|
+
var path8 = Path2.parse(pattern);
|
55318
|
+
return path8.setIn(source, value);
|
55319
55319
|
};
|
55320
55320
|
Path2.deleteIn = function(source, pattern) {
|
55321
|
-
var
|
55322
|
-
return
|
55321
|
+
var path8 = Path2.parse(pattern);
|
55322
|
+
return path8.deleteIn(source);
|
55323
55323
|
};
|
55324
55324
|
Path2.existIn = function(source, pattern, start) {
|
55325
|
-
var
|
55326
|
-
return
|
55325
|
+
var path8 = Path2.parse(pattern);
|
55326
|
+
return path8.existIn(source, start);
|
55327
55327
|
};
|
55328
55328
|
Path2.ensureIn = function(source, pattern, defaultValue) {
|
55329
|
-
var
|
55330
|
-
return
|
55329
|
+
var path8 = Path2.parse(pattern);
|
55330
|
+
return path8.ensureIn(source, defaultValue);
|
55331
55331
|
};
|
55332
55332
|
return Path2;
|
55333
55333
|
}()
|
@@ -57146,9 +57146,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
|
|
57146
57146
|
var traverse = function(target, visitor) {
|
57147
57147
|
var seenObjects = [];
|
57148
57148
|
var root = target;
|
57149
|
-
var traverse2 = function(target2,
|
57150
|
-
if (
|
57151
|
-
|
57149
|
+
var traverse2 = function(target2, path8) {
|
57150
|
+
if (path8 === void 0) {
|
57151
|
+
path8 = [];
|
57152
57152
|
}
|
57153
57153
|
if (isPlainObj(target2)) {
|
57154
57154
|
var seenIndex = seenObjects.indexOf(target2);
|
@@ -57158,15 +57158,15 @@ var traverse = function(target, visitor) {
|
|
57158
57158
|
var addIndex = seenObjects.length;
|
57159
57159
|
seenObjects.push(target2);
|
57160
57160
|
if (isNoNeedCompileObject(target2) && root !== target2) {
|
57161
|
-
visitor(target2,
|
57161
|
+
visitor(target2, path8);
|
57162
57162
|
return;
|
57163
57163
|
}
|
57164
57164
|
each(target2, function(value, key) {
|
57165
|
-
traverse2(value,
|
57165
|
+
traverse2(value, path8.concat(key));
|
57166
57166
|
});
|
57167
57167
|
seenObjects.splice(addIndex, 1);
|
57168
57168
|
} else {
|
57169
|
-
visitor(target2,
|
57169
|
+
visitor(target2, path8);
|
57170
57170
|
}
|
57171
57171
|
};
|
57172
57172
|
traverse2(target);
|
@@ -57177,24 +57177,24 @@ var traverseSchema = function(schema, visitor) {
|
|
57177
57177
|
}
|
57178
57178
|
var seenObjects = [];
|
57179
57179
|
var root = schema;
|
57180
|
-
var traverse2 = function(target,
|
57180
|
+
var traverse2 = function(target, path8) {
|
57181
57181
|
var _a2;
|
57182
|
-
if (
|
57183
|
-
|
57182
|
+
if (path8 === void 0) {
|
57183
|
+
path8 = [];
|
57184
57184
|
}
|
57185
|
-
if (
|
57185
|
+
if (path8[0] === "x-compile-omitted" || path8[0] === "x-validator" || path8[0] === "version" || path8[0] === "_isJSONSchemaObject")
|
57186
57186
|
return;
|
57187
|
-
if (String(
|
57187
|
+
if (String(path8[0]).indexOf("x-") == -1 && isFn(target))
|
57188
57188
|
return;
|
57189
|
-
if (SchemaNestedMap[
|
57189
|
+
if (SchemaNestedMap[path8[0]])
|
57190
57190
|
return;
|
57191
|
-
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(
|
57192
|
-
visitor(target,
|
57191
|
+
if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path8[0])) > -1) {
|
57192
|
+
visitor(target, path8, true);
|
57193
57193
|
return;
|
57194
57194
|
}
|
57195
57195
|
if (isPlainObj(target)) {
|
57196
|
-
if (
|
57197
|
-
visitor(target,
|
57196
|
+
if (path8[0] === "default" || path8[0] === "x-value") {
|
57197
|
+
visitor(target, path8);
|
57198
57198
|
return;
|
57199
57199
|
}
|
57200
57200
|
var seenIndex = seenObjects.indexOf(target);
|
@@ -57204,15 +57204,15 @@ var traverseSchema = function(schema, visitor) {
|
|
57204
57204
|
var addIndex = seenObjects.length;
|
57205
57205
|
seenObjects.push(target);
|
57206
57206
|
if (isNoNeedCompileObject(target) && root !== target) {
|
57207
|
-
visitor(target,
|
57207
|
+
visitor(target, path8);
|
57208
57208
|
return;
|
57209
57209
|
}
|
57210
57210
|
each(target, function(value, key) {
|
57211
|
-
traverse2(value,
|
57211
|
+
traverse2(value, path8.concat(key));
|
57212
57212
|
});
|
57213
57213
|
seenObjects.splice(addIndex, 1);
|
57214
57214
|
} else {
|
57215
|
-
visitor(target,
|
57215
|
+
visitor(target, path8);
|
57216
57216
|
}
|
57217
57217
|
};
|
57218
57218
|
traverse2(schema);
|
@@ -57256,8 +57256,8 @@ var createDataSource = function(source) {
|
|
57256
57256
|
var patchStateFormSchema = function(targetState, pattern, compiled) {
|
57257
57257
|
untracked(function() {
|
57258
57258
|
var _a2;
|
57259
|
-
var
|
57260
|
-
var segments =
|
57259
|
+
var path8 = Path.parse(pattern);
|
57260
|
+
var segments = path8.segments;
|
57261
57261
|
var key = segments[0];
|
57262
57262
|
var isEnum = key === "enum" && isArr(compiled);
|
57263
57263
|
var schemaMapKey = SchemaStateMap[key];
|
@@ -57341,14 +57341,14 @@ var compile = function(source, scope) {
|
|
57341
57341
|
};
|
57342
57342
|
var patchCompile = function(targetState, sourceState, scope) {
|
57343
57343
|
traverse(sourceState, function(value, pattern) {
|
57344
|
-
var
|
57344
|
+
var path8 = Path.parse(pattern);
|
57345
57345
|
var compiled = compile(value, scope);
|
57346
|
-
var key =
|
57346
|
+
var key = path8.segments[0];
|
57347
57347
|
if (compiled === void 0)
|
57348
57348
|
return;
|
57349
57349
|
if (hasOwnProperty4.call(targetState, key)) {
|
57350
57350
|
untracked(function() {
|
57351
|
-
return Path.setIn(targetState,
|
57351
|
+
return Path.setIn(targetState, path8, compiled);
|
57352
57352
|
});
|
57353
57353
|
}
|
57354
57354
|
});
|
@@ -57357,7 +57357,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
57357
57357
|
if (demand === void 0) {
|
57358
57358
|
demand = false;
|
57359
57359
|
}
|
57360
|
-
traverseSchema(sourceSchema, function(value,
|
57360
|
+
traverseSchema(sourceSchema, function(value, path8, omitCompile) {
|
57361
57361
|
var compiled = value;
|
57362
57362
|
var collected = hasCollected(function() {
|
57363
57363
|
if (!omitCompile) {
|
@@ -57368,10 +57368,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
|
|
57368
57368
|
return;
|
57369
57369
|
if (demand) {
|
57370
57370
|
if (collected || !targetState.initialized) {
|
57371
|
-
patchStateFormSchema(targetState,
|
57371
|
+
patchStateFormSchema(targetState, path8, compiled);
|
57372
57372
|
}
|
57373
57373
|
} else {
|
57374
|
-
patchStateFormSchema(targetState,
|
57374
|
+
patchStateFormSchema(targetState, path8, compiled);
|
57375
57375
|
}
|
57376
57376
|
});
|
57377
57377
|
};
|
@@ -57655,14 +57655,14 @@ var getISOCode = function(language) {
|
|
57655
57655
|
});
|
57656
57656
|
return isoCode;
|
57657
57657
|
};
|
57658
|
-
var getLocaleByPath = function(
|
57658
|
+
var getLocaleByPath = function(path8, lang) {
|
57659
57659
|
if (lang === void 0) {
|
57660
57660
|
lang = registry.locales.language;
|
57661
57661
|
}
|
57662
|
-
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(
|
57662
|
+
return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path8));
|
57663
57663
|
};
|
57664
|
-
var getValidateLocale = function(
|
57665
|
-
var message = getLocaleByPath(
|
57664
|
+
var getValidateLocale = function(path8) {
|
57665
|
+
var message = getLocaleByPath(path8);
|
57666
57666
|
return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
|
57667
57667
|
};
|
57668
57668
|
var getValidateMessageTemplateEngine = function() {
|
@@ -58923,15 +58923,15 @@ var buildFieldPath = function(field) {
|
|
58923
58923
|
var buildDataPath = function(fields, pattern) {
|
58924
58924
|
var prevArray = false;
|
58925
58925
|
var segments = pattern.segments;
|
58926
|
-
var
|
58927
|
-
var currentPath =
|
58926
|
+
var path8 = segments.reduce(function(path9, key, index) {
|
58927
|
+
var currentPath = path9.concat(key);
|
58928
58928
|
var currentAddress = segments.slice(0, index + 1);
|
58929
58929
|
var current = fields[currentAddress.join(".")];
|
58930
58930
|
if (prevArray) {
|
58931
58931
|
if (!isVoidField(current)) {
|
58932
58932
|
prevArray = false;
|
58933
58933
|
}
|
58934
|
-
return
|
58934
|
+
return path9;
|
58935
58935
|
}
|
58936
58936
|
if (index >= segments.length - 1) {
|
58937
58937
|
return currentPath;
|
@@ -58943,13 +58943,13 @@ var buildDataPath = function(fields, pattern) {
|
|
58943
58943
|
prevArray = true;
|
58944
58944
|
return currentPath;
|
58945
58945
|
}
|
58946
|
-
return
|
58946
|
+
return path9;
|
58947
58947
|
} else {
|
58948
58948
|
prevArray = false;
|
58949
58949
|
}
|
58950
58950
|
return currentPath;
|
58951
58951
|
}, []);
|
58952
|
-
return new Path(
|
58952
|
+
return new Path(path8);
|
58953
58953
|
};
|
58954
58954
|
var locateNode = function(field, address) {
|
58955
58955
|
field.address = Path.parse(address);
|
@@ -58983,33 +58983,33 @@ var destroy = function(target, address, forceClear) {
|
|
58983
58983
|
field === null || field === void 0 ? void 0 : field.dispose();
|
58984
58984
|
if (isDataField(field) && forceClear) {
|
58985
58985
|
var form = field.form;
|
58986
|
-
var
|
58987
|
-
form.deleteValuesIn(
|
58988
|
-
form.deleteInitialValuesIn(
|
58986
|
+
var path8 = field.path;
|
58987
|
+
form.deleteValuesIn(path8);
|
58988
|
+
form.deleteInitialValuesIn(path8);
|
58989
58989
|
}
|
58990
58990
|
delete target[address];
|
58991
58991
|
};
|
58992
|
-
var patchFormValues = function(form,
|
58993
|
-
var update = function(
|
58994
|
-
if (
|
58995
|
-
form.setValuesIn(
|
58992
|
+
var patchFormValues = function(form, path8, source) {
|
58993
|
+
var update = function(path9, source2) {
|
58994
|
+
if (path9.length) {
|
58995
|
+
form.setValuesIn(path9, clone(source2));
|
58996
58996
|
} else {
|
58997
58997
|
Object.assign(form.values, clone(source2));
|
58998
58998
|
}
|
58999
58999
|
};
|
59000
|
-
var patch = function(source2,
|
59001
|
-
if (
|
59002
|
-
|
59000
|
+
var patch = function(source2, path9) {
|
59001
|
+
if (path9 === void 0) {
|
59002
|
+
path9 = [];
|
59003
59003
|
}
|
59004
|
-
var targetValue = form.getValuesIn(
|
59005
|
-
var targetField = form.query(
|
59004
|
+
var targetValue = form.getValuesIn(path9);
|
59005
|
+
var targetField = form.query(path9).take();
|
59006
59006
|
var isUnVoidField = targetField && !isVoidField(targetField);
|
59007
59007
|
if (isUnVoidField && targetField.display === "none") {
|
59008
59008
|
targetField.caches.value = clone(source2);
|
59009
59009
|
return;
|
59010
59010
|
}
|
59011
59011
|
if (allowAssignDefaultValue(targetValue, source2)) {
|
59012
|
-
update(
|
59012
|
+
update(path9, source2);
|
59013
59013
|
} else {
|
59014
59014
|
if (isEmpty(source2))
|
59015
59015
|
return;
|
@@ -59017,20 +59017,20 @@ var patchFormValues = function(form, path7, source) {
|
|
59017
59017
|
return;
|
59018
59018
|
if (isPlainObj(targetValue) && isPlainObj(source2)) {
|
59019
59019
|
each(source2, function(value, key) {
|
59020
|
-
patch(value,
|
59020
|
+
patch(value, path9.concat(key));
|
59021
59021
|
});
|
59022
59022
|
} else {
|
59023
59023
|
if (targetField) {
|
59024
59024
|
if (isUnVoidField && !targetField.selfModified) {
|
59025
|
-
update(
|
59025
|
+
update(path9, source2);
|
59026
59026
|
}
|
59027
59027
|
} else if (form.initialized) {
|
59028
|
-
update(
|
59028
|
+
update(path9, source2);
|
59029
59029
|
}
|
59030
59030
|
}
|
59031
59031
|
}
|
59032
59032
|
};
|
59033
|
-
patch(source,
|
59033
|
+
patch(source, path8);
|
59034
59034
|
};
|
59035
59035
|
var matchFeedback = function(search, feedback) {
|
59036
59036
|
if (!search || !feedback)
|
@@ -59453,13 +59453,13 @@ var createBatchStateSetter = function(form) {
|
|
59453
59453
|
} else if (isGeneralField(pattern)) {
|
59454
59454
|
pattern.setState(payload);
|
59455
59455
|
} else {
|
59456
|
-
var matchCount_1 = 0,
|
59457
|
-
form.query(
|
59456
|
+
var matchCount_1 = 0, path8 = Path.parse(pattern);
|
59457
|
+
form.query(path8).forEach(function(field) {
|
59458
59458
|
field.setState(payload);
|
59459
59459
|
matchCount_1++;
|
59460
59460
|
});
|
59461
|
-
if (matchCount_1 === 0 ||
|
59462
|
-
subscribeUpdate(form,
|
59461
|
+
if (matchCount_1 === 0 || path8.isWildMatchPattern) {
|
59462
|
+
subscribeUpdate(form, path8, payload);
|
59463
59463
|
}
|
59464
59464
|
}
|
59465
59465
|
});
|
@@ -62075,8 +62075,8 @@ var FieldEffects = {
|
|
62075
62075
|
};
|
62076
62076
|
var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
|
62077
62077
|
var getDependencyValue = function(field, pattern, property) {
|
62078
|
-
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0],
|
62079
|
-
return field.query(target).getIn(
|
62078
|
+
var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path8 = _a2[1];
|
62079
|
+
return field.query(target).getIn(path8 || property || "value");
|
62080
62080
|
};
|
62081
62081
|
var getDependencies = function(field, dependencies) {
|
62082
62082
|
if (isArr(dependencies)) {
|
@@ -62706,10 +62706,10 @@ var Schema = (
|
|
62706
62706
|
}()
|
62707
62707
|
);
|
62708
62708
|
|
62709
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
62709
|
+
// ../../../../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
|
62710
62710
|
var import_inquirer = __toESM(require_inquirer());
|
62711
62711
|
|
62712
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
62712
|
+
// ../../../../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
|
62713
62713
|
var import_lodash = require("@modern-js/utils/lodash");
|
62714
62714
|
function validateSchema(schema) {
|
62715
62715
|
const { type, properties } = schema;
|
@@ -62801,7 +62801,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
62801
62801
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
62802
62802
|
}
|
62803
62803
|
|
62804
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
62804
|
+
// ../../../../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
|
62805
62805
|
var compileRule = (rule, scope) => {
|
62806
62806
|
const state = Schema.compile(rule, {
|
62807
62807
|
$self: {},
|
@@ -62905,7 +62905,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
62905
62905
|
return answers;
|
62906
62906
|
}
|
62907
62907
|
|
62908
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
62908
|
+
// ../../../../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
|
62909
62909
|
var CLIReader = class {
|
62910
62910
|
getAnswers() {
|
62911
62911
|
return this.answers;
|
@@ -62936,7 +62936,7 @@ var CLIReader = class {
|
|
62936
62936
|
}
|
62937
62937
|
};
|
62938
62938
|
|
62939
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
62939
|
+
// ../../../../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
|
62940
62940
|
var import_inquirer2 = __toESM(require_inquirer2());
|
62941
62941
|
|
62942
62942
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
@@ -63002,7 +63002,7 @@ var I18n = class {
|
|
63002
63002
|
}
|
63003
63003
|
};
|
63004
63004
|
|
63005
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
63005
|
+
// ../../../../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
|
63006
63006
|
var ZH_LOCALE = {
|
63007
63007
|
environment: {
|
63008
63008
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -63029,7 +63029,7 @@ var ZH_LOCALE = {
|
|
63029
63029
|
}
|
63030
63030
|
};
|
63031
63031
|
|
63032
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
63032
|
+
// ../../../../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
|
63033
63033
|
var EN_LOCALE = {
|
63034
63034
|
environment: {
|
63035
63035
|
node_version: "please upgrade node to lts version",
|
@@ -63056,14 +63056,14 @@ var EN_LOCALE = {
|
|
63056
63056
|
}
|
63057
63057
|
};
|
63058
63058
|
|
63059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
63059
|
+
// ../../../../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
|
63060
63060
|
var i18n = new I18n();
|
63061
63061
|
var localeKeys = i18n.init("zh", {
|
63062
63062
|
zh: ZH_LOCALE,
|
63063
63063
|
en: EN_LOCALE
|
63064
63064
|
});
|
63065
63065
|
|
63066
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
63066
|
+
// ../../../../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
|
63067
63067
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
63068
63068
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
63069
63069
|
for (const question of questions) {
|
@@ -63091,7 +63091,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
63091
63091
|
return questions;
|
63092
63092
|
}
|
63093
63093
|
|
63094
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
63094
|
+
// ../../../../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
|
63095
63095
|
var import_path5 = __toESM(require("path"));
|
63096
63096
|
var import_utils13 = require("@modern-js/utils");
|
63097
63097
|
var NODE_MAJOR_VERSION_MAP = {
|
@@ -63139,7 +63139,7 @@ async function checkUseNvm(cwd, logger) {
|
|
63139
63139
|
}
|
63140
63140
|
}
|
63141
63141
|
|
63142
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
63142
|
+
// ../../../../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
|
63143
63143
|
var AppAPI = class {
|
63144
63144
|
async checkEnvironment(nodeVersion) {
|
63145
63145
|
if (import_utils14.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
@@ -63379,11 +63379,11 @@ var AppAPI = class {
|
|
63379
63379
|
}
|
63380
63380
|
};
|
63381
63381
|
|
63382
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
63382
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
63383
63383
|
var import_comment_json2 = __toESM(require_src2());
|
63384
63384
|
var declarationUpdate = __toESM(require_dist());
|
63385
63385
|
|
63386
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
63386
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
63387
63387
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
63388
63388
|
const originJsonValue = await resource.value();
|
63389
63389
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
@@ -63396,7 +63396,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
63396
63396
|
return newJsonString;
|
63397
63397
|
}
|
63398
63398
|
|
63399
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
63399
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
63400
63400
|
var JsonAPI = class {
|
63401
63401
|
async get(resource) {
|
63402
63402
|
const originJsonValue = await resource.value();
|
@@ -63783,7 +63783,7 @@ var MonorepoDefaultConfig = {
|
|
63783
63783
|
};
|
63784
63784
|
|
63785
63785
|
// ../../generator-utils/dist/esm/index.js
|
63786
|
-
var
|
63786
|
+
var import_path7 = __toESM(require("path"));
|
63787
63787
|
var import_utils17 = require("@modern-js/utils");
|
63788
63788
|
|
63789
63789
|
// ../../generator-utils/dist/esm/utils/stripAnsi.js
|
@@ -63801,6 +63801,21 @@ function stripAnsi2(string) {
|
|
63801
63801
|
return string.replace(ansiRegex2(), "");
|
63802
63802
|
}
|
63803
63803
|
|
63804
|
+
// ../../generator-utils/dist/esm/utils/getGeneratorPath.js
|
63805
|
+
var import_path6 = __toESM(require("path"));
|
63806
|
+
var getGeneratorPath = (generator, distTag, paths) => {
|
63807
|
+
if (process.env.CODESMITH_ENV === "development") {
|
63808
|
+
return import_path6.default.dirname(require.resolve(generator, {
|
63809
|
+
paths: paths !== null && paths !== void 0 ? paths : [
|
63810
|
+
process.cwd()
|
63811
|
+
]
|
63812
|
+
}));
|
63813
|
+
} else if (distTag) {
|
63814
|
+
return `${generator}@${distTag}`;
|
63815
|
+
}
|
63816
|
+
return generator;
|
63817
|
+
};
|
63818
|
+
|
63804
63819
|
// ../../generator-utils/dist/esm/index.js
|
63805
63820
|
var import_utils18 = require("@modern-js/utils");
|
63806
63821
|
async function getPackageVersion(packageName, registry2) {
|
@@ -63877,14 +63892,6 @@ var i18n3 = new I18n2();
|
|
63877
63892
|
var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
|
63878
63893
|
|
63879
63894
|
// src/index.ts
|
63880
|
-
var getGeneratorPath = (generator, distTag) => {
|
63881
|
-
if (process.env.CODESMITH_ENV === "development") {
|
63882
|
-
return import_path7.default.dirname(require.resolve(generator));
|
63883
|
-
} else if (distTag) {
|
63884
|
-
return `${generator}@${distTag}`;
|
63885
|
-
}
|
63886
|
-
return generator;
|
63887
|
-
};
|
63888
63895
|
var handleTemplateFile = async (context, generator, appApi) => {
|
63889
63896
|
const { hasPlugin, generatorPlugin, ...extra } = context.config;
|
63890
63897
|
let ans = {};
|
@@ -63919,7 +63926,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
63919
63926
|
generator.logger.debug(`ans=`, ans);
|
63920
63927
|
const { packageManager } = ans;
|
63921
63928
|
await appApi.runSubGenerator(
|
63922
|
-
getGeneratorPath(BaseGenerator, context.config.distTag),
|
63929
|
+
getGeneratorPath(BaseGenerator, context.config.distTag, [__dirname]),
|
63923
63930
|
void 0,
|
63924
63931
|
{ ...context.config, hasPlugin: false }
|
63925
63932
|
);
|
@@ -63945,7 +63952,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
63945
63952
|
const jsonAPI = new JsonAPI(generator);
|
63946
63953
|
await jsonAPI.update(
|
63947
63954
|
context.materials.default.get(
|
63948
|
-
|
63955
|
+
import_path8.default.join(generator.outputPath, "package.json")
|
63949
63956
|
),
|
63950
63957
|
{
|
63951
63958
|
query: {},
|
@@ -63958,12 +63965,12 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
63958
63965
|
);
|
63959
63966
|
}
|
63960
63967
|
await appApi.runSubGenerator(
|
63961
|
-
getGeneratorPath(ChangesetGenerator, context.config.distTag)
|
63968
|
+
getGeneratorPath(ChangesetGenerator, context.config.distTag, [__dirname])
|
63962
63969
|
);
|
63963
63970
|
const { packagesInfo } = context.config;
|
63964
63971
|
if (packagesInfo && Object.keys(packagesInfo).length > 0) {
|
63965
63972
|
await appApi.runSubGenerator(
|
63966
|
-
getGeneratorPath(PackagesGenerator, context.config.distTag),
|
63973
|
+
getGeneratorPath(PackagesGenerator, context.config.distTag, [__dirname]),
|
63967
63974
|
void 0,
|
63968
63975
|
context.config
|
63969
63976
|
);
|