@modern-js/router-v5-generator 3.3.10 → 3.3.12

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.
Files changed (3) hide show
  1. package/dist/index.js +243 -249
  2. package/package.json +8 -8
  3. package/src/index.ts +7 -11
package/dist/index.js CHANGED
@@ -9104,13 +9104,13 @@ var require_ast = __commonJS({
9104
9104
  helperExpression: function helperExpression(node) {
9105
9105
  return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
9106
9106
  },
9107
- scopedId: function scopedId(path6) {
9108
- return /^\.|this\b/.test(path6.original);
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(path6) {
9113
- return path6.parts.length === 1 && !AST.helpers.scopedId(path6) && !path6.depth;
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(path6, params, hash, open, strip, locInfo) {
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: path6,
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), path6 = decorator.path;
10473
+ var params = this.setupFullMustacheParams(decorator, program, void 0), path7 = decorator.path;
10474
10474
  this.useDecorators = true;
10475
- this.opcode("registerDecorator", params.length, path6.original);
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 path6 = sexpr.path, name = path6.parts[0], isBlock = program != null || inverse != null;
10540
- this.opcode("getContext", path6.depth);
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
- path6.strict = true;
10544
- this.accept(path6);
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 path6 = sexpr.path;
10549
- path6.strict = true;
10550
- this.accept(path6);
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), path6 = sexpr.path, name = path6.parts[0];
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
- path6.strict = true;
10561
- path6.falsy = true;
10562
- this.accept(path6);
10563
- this.opcode("invokeHelper", params.length, path6.original, _ast2["default"].helpers.simpleId(path6));
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(path6) {
10567
- this.addDepth(path6.depth);
10568
- this.opcode("getContext", path6.depth);
10569
- var name = path6.parts[0], scoped = _ast2["default"].helpers.scopedId(path6), blockParamId = !path6.depth && !scoped && this.blockParamIndex(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, path6.parts);
10571
+ this.opcode("lookupBlockParam", blockParamId, path7.parts);
10572
10572
  } else if (!name) {
10573
10573
  this.opcode("pushContext");
10574
- } else if (path6.data) {
10574
+ } else if (path7.data) {
10575
10575
  this.options.data = true;
10576
- this.opcode("lookupData", path6.depth, path6.parts, path6.strict);
10576
+ this.opcode("lookupData", path7.depth, path7.parts, path7.strict);
10577
10577
  } else {
10578
- this.opcode("lookupOnContext", path6.parts, path6.falsy, path6.strict, scoped);
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 path6 = aPath;
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
- path6 = url.path;
10938
+ path7 = url.path;
10939
10939
  }
10940
- var isAbsolute = exports.isAbsolute(path6);
10941
- var parts = path6.split(/\/+/);
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
- path6 = parts.join("/");
10959
- if (path6 === "") {
10960
- path6 = isAbsolute ? "/" : ".";
10958
+ path7 = parts.join("/");
10959
+ if (path7 === "") {
10960
+ path7 = isAbsolute ? "/" : ".";
10961
10961
  }
10962
10962
  if (url) {
10963
- url.path = path6;
10963
+ url.path = path7;
10964
10964
  return urlGenerate(url);
10965
10965
  }
10966
- return path6;
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 path6 = id.parts.join("/");
13757
- return (id.data ? "@" : "") + "PATH:" + path6;
13756
+ var path7 = id.parts.join("/");
13757
+ return (id.data ? "@" : "") + "PATH:" + path7;
13758
13758
  };
13759
13759
  PrintVisitor.prototype.StringLiteral = function(string) {
13760
13760
  return '"' + string.value + '"';
@@ -13983,7 +13983,7 @@ var require_ejs = __commonJS({
13983
13983
  "../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/ejs.js"(exports) {
13984
13984
  "use strict";
13985
13985
  var fs8 = require("fs");
13986
- var path6 = require("path");
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 = path6.dirname;
14018
- var extname = path6.extname;
14019
- var resolve = path6.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(path7, options) {
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(path7);
14040
+ var match = /^[A-Za-z]+:\\|^\//.exec(path8);
14041
14041
  if (match && match.length) {
14042
- path7 = path7.replace(/^\/*/, "");
14042
+ path8 = path8.replace(/^\/*/, "");
14043
14043
  if (Array.isArray(options.root)) {
14044
- includePath = resolvePaths(path7, options.root);
14044
+ includePath = resolvePaths(path8, options.root);
14045
14045
  } else {
14046
- includePath = exports.resolveInclude(path7, options.root || "/", true);
14046
+ includePath = exports.resolveInclude(path8, options.root || "/", true);
14047
14047
  }
14048
14048
  } else {
14049
14049
  if (options.filename) {
14050
- filePath = exports.resolveInclude(path7, options.filename);
14050
+ filePath = exports.resolveInclude(path8, options.filename);
14051
14051
  if (fs8.existsSync(filePath)) {
14052
14052
  includePath = filePath;
14053
14053
  }
14054
14054
  }
14055
14055
  if (!includePath && Array.isArray(views)) {
14056
- includePath = resolvePaths(path7, views);
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(path7) + '"');
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(path7, options) {
14118
+ function includeFile(path8, options) {
14119
14119
  var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
14120
- opts.filename = getIncludePath(path7, opts);
14120
+ opts.filename = getIncludePath(path8, opts);
14121
14121
  if (typeof options.includer === "function") {
14122
- var includerResult = options.includer(path7, opts.filename);
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(path7, includeData) {
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(path7, opts)(d);
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 = path6.basename(filename, path6.extname(filename));
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, path6) {
17352
- path6 = castPath(path6, object);
17353
- var index = 0, length = path6.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(path6[index++])];
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, path6, defaultValue) {
17369
- var result = object == null ? void 0 : baseGet(object, path6);
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, path6, value, customizer) {
17456
+ function baseSet(object, path7, value, customizer) {
17457
17457
  if (!isObject4(object)) {
17458
17458
  return object;
17459
17459
  }
17460
- path6 = castPath(path6, object);
17461
- var index = -1, length = path6.length, lastIndex = length - 1, nested = object;
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(path6[index]), newValue = value;
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(path6[index + 1]) ? [] : {};
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, path6, value) {
17489
- return object == null ? object : baseSet(object, path6, value);
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, path6, hasFunc) {
30111
- path6 = castPath(path6, object);
30112
- var index = -1, length = path6.length, result = false;
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(path6[index]);
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, path6) {
30137
- return object != null && hasPath(object, path6, baseHasIn);
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(path6, srcValue) {
30157
- if (isKey(path6) && isStrictComparable(srcValue)) {
30158
- return matchesStrictComparable(toKey(path6), srcValue);
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, path6);
30162
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path6) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
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(path6) {
30187
+ function basePropertyDeep(path7) {
30188
30188
  return function(object) {
30189
- return baseGet(object, path6);
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(path6) {
30205
- return isKey(path6) ? baseProperty(toKey(path6)) : basePropertyDeep(path6);
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 path6 = [graph[toModel].parent, toModel];
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
- path6.unshift(graph[cur].parent);
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 = path6;
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 path6;
47558
+ var path7;
47559
47559
  if (isWindows) {
47560
- path6 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
47560
+ path7 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
47561
47561
  } else {
47562
- path6 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
47562
+ path7 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
47563
47563
  }
47564
- if (trailingSlashRe.test(path6)) {
47565
- path6 = path6.slice(0, -1);
47564
+ if (trailingSlashRe.test(path7)) {
47565
+ path7 = path7.slice(0, -1);
47566
47566
  }
47567
- return path6;
47567
+ return path7;
47568
47568
  };
47569
47569
  }
47570
47570
  });
@@ -47574,7 +47574,7 @@ var require_tmp = __commonJS({
47574
47574
  "../../../../node_modules/.pnpm/tmp@0.0.33/node_modules/tmp/lib/tmp.js"(exports, module2) {
47575
47575
  "use strict";
47576
47576
  var fs8 = require("fs");
47577
- var path6 = require("path");
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 path6.join(opts.dir || tmpDir, opts.name);
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 path6.join(opts.dir || tmpDir, name);
47630
+ return path7.join(opts.dir || tmpDir, name);
47631
47631
  }
47632
47632
  function tmpName(options, callback) {
47633
47633
  var args = _parseArguments(options, callback), opts = args[0], cb = args[1], tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
@@ -47715,7 +47715,7 @@ var require_tmp = __commonJS({
47715
47715
  do {
47716
47716
  var dir2 = dirs.pop(), deferred = false, files = fs8.readdirSync(dir2);
47717
47717
  for (var i = 0, length = files.length; i < length; i++) {
47718
- var file2 = path6.join(dir2, files[i]), stat = fs8.lstatSync(file2);
47718
+ var file2 = path7.join(dir2, files[i]), stat = fs8.lstatSync(file2);
47719
47719
  if (stat.isDirectory()) {
47720
47720
  if (!deferred) {
47721
47721
  deferred = true;
@@ -48473,8 +48473,8 @@ var require_parent = __commonJS({
48473
48473
  "use strict";
48474
48474
  var baseGet = require_baseGet();
48475
48475
  var baseSlice = require_baseSlice();
48476
- function parent(object, path6) {
48477
- return path6.length < 2 ? object : baseGet(object, baseSlice(path6, 0, -1));
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, path6) {
48492
- path6 = castPath(path6, object);
48493
- object = parent(object, path6);
48494
- return object == null || delete object[toKey(last(path6))];
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(path6) {
48604
- path6 = castPath(path6, object);
48605
- isDeep || (isDeep = path6.length > 1);
48606
- return path6;
48603
+ paths = arrayMap(paths, function(path7) {
48604
+ path7 = castPath(path7, object);
48605
+ isDeep || (isDeep = path7.length > 1);
48606
+ return path7;
48607
48607
  });
48608
48608
  copyObject(object, getAllKeysIn(object), result);
48609
48609
  if (isDeep) {
@@ -51054,7 +51054,7 @@ __export(src_exports, {
51054
51054
  default: () => src_default
51055
51055
  });
51056
51056
  module.exports = __toCommonJS(src_exports);
51057
- var import_path6 = __toESM(require("path"));
51057
+ var import_path7 = __toESM(require("path"));
51058
51058
 
51059
51059
  // ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
51060
51060
  function _define_property(obj, key, value) {
@@ -51379,9 +51379,9 @@ var FS_RESOURCE = "_codesmith_core_fs_resource";
51379
51379
 
51380
51380
  // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51381
51381
  var import_utils7 = require("@modern-js/utils");
51382
- async function fsExists(path6) {
51382
+ async function fsExists(path7) {
51383
51383
  try {
51384
- await import_utils7.fs.access(path6);
51384
+ await import_utils7.fs.access(path7);
51385
51385
  return true;
51386
51386
  } catch (e) {
51387
51387
  return false;
@@ -52544,8 +52544,8 @@ var parseDestructorRules = function(node) {
52544
52544
  };
52545
52545
  var setInByDestructor = function(source, rules, value, mutators) {
52546
52546
  rules.forEach(function(_a2) {
52547
- var key = _a2.key, path6 = _a2.path;
52548
- mutators.setIn([key], source, mutators.getIn(path6, value));
52547
+ var key = _a2.key, path7 = _a2.path;
52548
+ mutators.setIn([key], source, mutators.getIn(path7, value));
52549
52549
  });
52550
52550
  };
52551
52551
  var getInByDestructor = function(source, rules, mutators) {
@@ -52557,8 +52557,8 @@ var getInByDestructor = function(source, rules, mutators) {
52557
52557
  }
52558
52558
  source = isValid2(source) ? source : {};
52559
52559
  rules.forEach(function(_a2) {
52560
- var key = _a2.key, path6 = _a2.path;
52561
- mutators.setIn(path6, response, source[key]);
52560
+ var key = _a2.key, path7 = _a2.path;
52561
+ mutators.setIn(path7, response, source[key]);
52562
52562
  });
52563
52563
  return response;
52564
52564
  };
@@ -53125,8 +53125,8 @@ var Matcher = (
53125
53125
  }
53126
53126
  return false;
53127
53127
  };
53128
- Matcher2.prototype.match = function(path6) {
53129
- this.path = path6;
53128
+ Matcher2.prototype.match = function(path7) {
53129
+ this.path = path7;
53130
53130
  return { matched: this.matchNode(this.tree), record: this.record };
53131
53131
  };
53132
53132
  Matcher2.matchSegments = function(source, target, record) {
@@ -53416,21 +53416,21 @@ var Path = (
53416
53416
  if (_this.isMatchPattern || _this.isRegExp) {
53417
53417
  throw new Error("".concat(_this.entire, " cannot be concat"));
53418
53418
  }
53419
- var path6 = new Path2("");
53420
- path6.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
53419
+ var path7 = new Path2("");
53420
+ path7.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
53421
53421
  return parseString(s);
53422
53422
  })), false));
53423
- path6.entire = path6.segments.join(".");
53424
- return path6;
53423
+ path7.entire = path7.segments.join(".");
53424
+ return path7;
53425
53425
  };
53426
53426
  this.slice = function(start, end) {
53427
53427
  if (_this.isMatchPattern || _this.isRegExp) {
53428
53428
  throw new Error("".concat(_this.entire, " cannot be slice"));
53429
53429
  }
53430
- var path6 = new Path2("");
53431
- path6.segments = _this.segments.slice(start, end);
53432
- path6.entire = path6.segments.join(".");
53433
- return path6;
53430
+ var path7 = new Path2("");
53431
+ path7.segments = _this.segments.slice(start, end);
53432
+ path7.entire = path7.segments.join(".");
53433
+ return path7;
53434
53434
  };
53435
53435
  this.push = function() {
53436
53436
  var items = [];
@@ -53522,8 +53522,8 @@ var Path = (
53522
53522
  };
53523
53523
  this.match = function(pattern) {
53524
53524
  var _a3, _b;
53525
- var path6 = Path2.parse(pattern);
53526
- var cache = _this.matchCache.get(path6.entire);
53525
+ var path7 = Path2.parse(pattern);
53526
+ var cache = _this.matchCache.get(path7.entire);
53527
53527
  if (cache !== void 0) {
53528
53528
  if (cache.record && cache.record.score !== void 0) {
53529
53529
  _this.matchScore = cache.record.score;
@@ -53531,21 +53531,21 @@ var Path = (
53531
53531
  return cache.matched;
53532
53532
  }
53533
53533
  var cacheWith = function(value) {
53534
- _this.matchCache.set(path6.entire, value);
53534
+ _this.matchCache.set(path7.entire, value);
53535
53535
  return value;
53536
53536
  };
53537
- if (path6.isMatchPattern) {
53537
+ if (path7.isMatchPattern) {
53538
53538
  if (_this.isMatchPattern) {
53539
- throw new Error("".concat(path6.entire, " cannot match ").concat(_this.entire));
53539
+ throw new Error("".concat(path7.entire, " cannot match ").concat(_this.entire));
53540
53540
  } else {
53541
53541
  _this.matchScore = 0;
53542
- return cacheWith(path6.match(_this.segments));
53542
+ return cacheWith(path7.match(_this.segments));
53543
53543
  }
53544
53544
  } else {
53545
53545
  if (_this.isMatchPattern) {
53546
53546
  if (_this.isRegExp) {
53547
53547
  try {
53548
- return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path6.entire);
53548
+ return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path7.entire);
53549
53549
  } finally {
53550
53550
  ;
53551
53551
  _this.entire.lastIndex = 0;
@@ -53554,14 +53554,14 @@ var Path = (
53554
53554
  var record = {
53555
53555
  score: 0
53556
53556
  };
53557
- var result = cacheWith(new Matcher(_this.tree, record).match(path6.segments));
53557
+ var result = cacheWith(new Matcher(_this.tree, record).match(path7.segments));
53558
53558
  _this.matchScore = record.score;
53559
53559
  return result.matched;
53560
53560
  } else {
53561
53561
  var record = {
53562
53562
  score: 0
53563
53563
  };
53564
- var result = cacheWith(Matcher.matchSegments(_this.segments, path6.segments, record));
53564
+ var result = cacheWith(Matcher.matchSegments(_this.segments, path7.segments, record));
53565
53565
  _this.matchScore = record.score;
53566
53566
  return result.matched;
53567
53567
  }
@@ -53637,12 +53637,12 @@ var Path = (
53637
53637
  configurable: true
53638
53638
  });
53639
53639
  Path2.match = function(pattern) {
53640
- var path6 = Path2.parse(pattern);
53640
+ var path7 = Path2.parse(pattern);
53641
53641
  var matcher = function(target) {
53642
- return path6.match(target);
53642
+ return path7.match(target);
53643
53643
  };
53644
53644
  matcher[isMatcher] = true;
53645
- matcher.path = path6;
53645
+ matcher.path = path7;
53646
53646
  return matcher;
53647
53647
  };
53648
53648
  Path2.isPathPattern = function(target) {
@@ -53651,52 +53651,52 @@ var Path = (
53651
53651
  Path2.transform = function(pattern, regexp, callback) {
53652
53652
  return Path2.parse(pattern).transform(regexp, callback);
53653
53653
  };
53654
- Path2.parse = function(path6, base) {
53655
- if (path6 === void 0) {
53656
- path6 = "";
53654
+ Path2.parse = function(path7, base) {
53655
+ if (path7 === void 0) {
53656
+ path7 = "";
53657
53657
  }
53658
- if (path6 instanceof Path2) {
53659
- var found = pathCache.get(path6.entire);
53658
+ if (path7 instanceof Path2) {
53659
+ var found = pathCache.get(path7.entire);
53660
53660
  if (found) {
53661
53661
  return found;
53662
53662
  } else {
53663
- pathCache.set(path6.entire, path6);
53664
- return path6;
53663
+ pathCache.set(path7.entire, path7);
53664
+ return path7;
53665
53665
  }
53666
- } else if (path6 && path6[isMatcher]) {
53667
- return Path2.parse(path6["path"]);
53666
+ } else if (path7 && path7[isMatcher]) {
53667
+ return Path2.parse(path7["path"]);
53668
53668
  } else {
53669
53669
  var key_ = base ? Path2.parse(base) : "";
53670
- var key = "".concat(path6, ":").concat(key_);
53670
+ var key = "".concat(path7, ":").concat(key_);
53671
53671
  var found = pathCache.get(key);
53672
53672
  if (found) {
53673
53673
  return found;
53674
53674
  } else {
53675
- path6 = new Path2(path6, base);
53676
- pathCache.set(key, path6);
53677
- return path6;
53675
+ path7 = new Path2(path7, base);
53676
+ pathCache.set(key, path7);
53677
+ return path7;
53678
53678
  }
53679
53679
  }
53680
53680
  };
53681
53681
  Path2.getIn = function(source, pattern) {
53682
- var path6 = Path2.parse(pattern);
53683
- return path6.getIn(source);
53682
+ var path7 = Path2.parse(pattern);
53683
+ return path7.getIn(source);
53684
53684
  };
53685
53685
  Path2.setIn = function(source, pattern, value) {
53686
- var path6 = Path2.parse(pattern);
53687
- return path6.setIn(source, value);
53686
+ var path7 = Path2.parse(pattern);
53687
+ return path7.setIn(source, value);
53688
53688
  };
53689
53689
  Path2.deleteIn = function(source, pattern) {
53690
- var path6 = Path2.parse(pattern);
53691
- return path6.deleteIn(source);
53690
+ var path7 = Path2.parse(pattern);
53691
+ return path7.deleteIn(source);
53692
53692
  };
53693
53693
  Path2.existIn = function(source, pattern, start) {
53694
- var path6 = Path2.parse(pattern);
53695
- return path6.existIn(source, start);
53694
+ var path7 = Path2.parse(pattern);
53695
+ return path7.existIn(source, start);
53696
53696
  };
53697
53697
  Path2.ensureIn = function(source, pattern, defaultValue) {
53698
- var path6 = Path2.parse(pattern);
53699
- return path6.ensureIn(source, defaultValue);
53698
+ var path7 = Path2.parse(pattern);
53699
+ return path7.ensureIn(source, defaultValue);
53700
53700
  };
53701
53701
  return Path2;
53702
53702
  }()
@@ -55515,9 +55515,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
55515
55515
  var traverse = function(target, visitor) {
55516
55516
  var seenObjects = [];
55517
55517
  var root = target;
55518
- var traverse2 = function(target2, path6) {
55519
- if (path6 === void 0) {
55520
- path6 = [];
55518
+ var traverse2 = function(target2, path7) {
55519
+ if (path7 === void 0) {
55520
+ path7 = [];
55521
55521
  }
55522
55522
  if (isPlainObj(target2)) {
55523
55523
  var seenIndex = seenObjects.indexOf(target2);
@@ -55527,15 +55527,15 @@ var traverse = function(target, visitor) {
55527
55527
  var addIndex = seenObjects.length;
55528
55528
  seenObjects.push(target2);
55529
55529
  if (isNoNeedCompileObject(target2) && root !== target2) {
55530
- visitor(target2, path6);
55530
+ visitor(target2, path7);
55531
55531
  return;
55532
55532
  }
55533
55533
  each(target2, function(value, key) {
55534
- traverse2(value, path6.concat(key));
55534
+ traverse2(value, path7.concat(key));
55535
55535
  });
55536
55536
  seenObjects.splice(addIndex, 1);
55537
55537
  } else {
55538
- visitor(target2, path6);
55538
+ visitor(target2, path7);
55539
55539
  }
55540
55540
  };
55541
55541
  traverse2(target);
@@ -55546,24 +55546,24 @@ var traverseSchema = function(schema, visitor) {
55546
55546
  }
55547
55547
  var seenObjects = [];
55548
55548
  var root = schema;
55549
- var traverse2 = function(target, path6) {
55549
+ var traverse2 = function(target, path7) {
55550
55550
  var _a2;
55551
- if (path6 === void 0) {
55552
- path6 = [];
55551
+ if (path7 === void 0) {
55552
+ path7 = [];
55553
55553
  }
55554
- if (path6[0] === "x-compile-omitted" || path6[0] === "x-validator" || path6[0] === "version" || path6[0] === "_isJSONSchemaObject")
55554
+ if (path7[0] === "x-compile-omitted" || path7[0] === "x-validator" || path7[0] === "version" || path7[0] === "_isJSONSchemaObject")
55555
55555
  return;
55556
- if (String(path6[0]).indexOf("x-") == -1 && isFn(target))
55556
+ if (String(path7[0]).indexOf("x-") == -1 && isFn(target))
55557
55557
  return;
55558
- if (SchemaNestedMap[path6[0]])
55558
+ if (SchemaNestedMap[path7[0]])
55559
55559
  return;
55560
- if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path6[0])) > -1) {
55561
- visitor(target, path6, true);
55560
+ if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path7[0])) > -1) {
55561
+ visitor(target, path7, true);
55562
55562
  return;
55563
55563
  }
55564
55564
  if (isPlainObj(target)) {
55565
- if (path6[0] === "default" || path6[0] === "x-value") {
55566
- visitor(target, path6);
55565
+ if (path7[0] === "default" || path7[0] === "x-value") {
55566
+ visitor(target, path7);
55567
55567
  return;
55568
55568
  }
55569
55569
  var seenIndex = seenObjects.indexOf(target);
@@ -55573,15 +55573,15 @@ var traverseSchema = function(schema, visitor) {
55573
55573
  var addIndex = seenObjects.length;
55574
55574
  seenObjects.push(target);
55575
55575
  if (isNoNeedCompileObject(target) && root !== target) {
55576
- visitor(target, path6);
55576
+ visitor(target, path7);
55577
55577
  return;
55578
55578
  }
55579
55579
  each(target, function(value, key) {
55580
- traverse2(value, path6.concat(key));
55580
+ traverse2(value, path7.concat(key));
55581
55581
  });
55582
55582
  seenObjects.splice(addIndex, 1);
55583
55583
  } else {
55584
- visitor(target, path6);
55584
+ visitor(target, path7);
55585
55585
  }
55586
55586
  };
55587
55587
  traverse2(schema);
@@ -55625,8 +55625,8 @@ var createDataSource = function(source) {
55625
55625
  var patchStateFormSchema = function(targetState, pattern, compiled) {
55626
55626
  untracked(function() {
55627
55627
  var _a2;
55628
- var path6 = Path.parse(pattern);
55629
- var segments = path6.segments;
55628
+ var path7 = Path.parse(pattern);
55629
+ var segments = path7.segments;
55630
55630
  var key = segments[0];
55631
55631
  var isEnum = key === "enum" && isArr(compiled);
55632
55632
  var schemaMapKey = SchemaStateMap[key];
@@ -55710,14 +55710,14 @@ var compile = function(source, scope) {
55710
55710
  };
55711
55711
  var patchCompile = function(targetState, sourceState, scope) {
55712
55712
  traverse(sourceState, function(value, pattern) {
55713
- var path6 = Path.parse(pattern);
55713
+ var path7 = Path.parse(pattern);
55714
55714
  var compiled = compile(value, scope);
55715
- var key = path6.segments[0];
55715
+ var key = path7.segments[0];
55716
55716
  if (compiled === void 0)
55717
55717
  return;
55718
55718
  if (hasOwnProperty4.call(targetState, key)) {
55719
55719
  untracked(function() {
55720
- return Path.setIn(targetState, path6, compiled);
55720
+ return Path.setIn(targetState, path7, compiled);
55721
55721
  });
55722
55722
  }
55723
55723
  });
@@ -55726,7 +55726,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
55726
55726
  if (demand === void 0) {
55727
55727
  demand = false;
55728
55728
  }
55729
- traverseSchema(sourceSchema, function(value, path6, omitCompile) {
55729
+ traverseSchema(sourceSchema, function(value, path7, omitCompile) {
55730
55730
  var compiled = value;
55731
55731
  var collected = hasCollected(function() {
55732
55732
  if (!omitCompile) {
@@ -55737,10 +55737,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
55737
55737
  return;
55738
55738
  if (demand) {
55739
55739
  if (collected || !targetState.initialized) {
55740
- patchStateFormSchema(targetState, path6, compiled);
55740
+ patchStateFormSchema(targetState, path7, compiled);
55741
55741
  }
55742
55742
  } else {
55743
- patchStateFormSchema(targetState, path6, compiled);
55743
+ patchStateFormSchema(targetState, path7, compiled);
55744
55744
  }
55745
55745
  });
55746
55746
  };
@@ -56024,14 +56024,14 @@ var getISOCode = function(language) {
56024
56024
  });
56025
56025
  return isoCode;
56026
56026
  };
56027
- var getLocaleByPath = function(path6, lang) {
56027
+ var getLocaleByPath = function(path7, lang) {
56028
56028
  if (lang === void 0) {
56029
56029
  lang = registry.locales.language;
56030
56030
  }
56031
- return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path6));
56031
+ return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path7));
56032
56032
  };
56033
- var getValidateLocale = function(path6) {
56034
- var message = getLocaleByPath(path6);
56033
+ var getValidateLocale = function(path7) {
56034
+ var message = getLocaleByPath(path7);
56035
56035
  return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
56036
56036
  };
56037
56037
  var getValidateMessageTemplateEngine = function() {
@@ -57292,15 +57292,15 @@ var buildFieldPath = function(field) {
57292
57292
  var buildDataPath = function(fields, pattern) {
57293
57293
  var prevArray = false;
57294
57294
  var segments = pattern.segments;
57295
- var path6 = segments.reduce(function(path7, key, index) {
57296
- var currentPath = path7.concat(key);
57295
+ var path7 = segments.reduce(function(path8, key, index) {
57296
+ var currentPath = path8.concat(key);
57297
57297
  var currentAddress = segments.slice(0, index + 1);
57298
57298
  var current = fields[currentAddress.join(".")];
57299
57299
  if (prevArray) {
57300
57300
  if (!isVoidField(current)) {
57301
57301
  prevArray = false;
57302
57302
  }
57303
- return path7;
57303
+ return path8;
57304
57304
  }
57305
57305
  if (index >= segments.length - 1) {
57306
57306
  return currentPath;
@@ -57312,13 +57312,13 @@ var buildDataPath = function(fields, pattern) {
57312
57312
  prevArray = true;
57313
57313
  return currentPath;
57314
57314
  }
57315
- return path7;
57315
+ return path8;
57316
57316
  } else {
57317
57317
  prevArray = false;
57318
57318
  }
57319
57319
  return currentPath;
57320
57320
  }, []);
57321
- return new Path(path6);
57321
+ return new Path(path7);
57322
57322
  };
57323
57323
  var locateNode = function(field, address) {
57324
57324
  field.address = Path.parse(address);
@@ -57352,33 +57352,33 @@ var destroy = function(target, address, forceClear) {
57352
57352
  field === null || field === void 0 ? void 0 : field.dispose();
57353
57353
  if (isDataField(field) && forceClear) {
57354
57354
  var form = field.form;
57355
- var path6 = field.path;
57356
- form.deleteValuesIn(path6);
57357
- form.deleteInitialValuesIn(path6);
57355
+ var path7 = field.path;
57356
+ form.deleteValuesIn(path7);
57357
+ form.deleteInitialValuesIn(path7);
57358
57358
  }
57359
57359
  delete target[address];
57360
57360
  };
57361
- var patchFormValues = function(form, path6, source) {
57362
- var update = function(path7, source2) {
57363
- if (path7.length) {
57364
- form.setValuesIn(path7, clone(source2));
57361
+ var patchFormValues = function(form, path7, source) {
57362
+ var update = function(path8, source2) {
57363
+ if (path8.length) {
57364
+ form.setValuesIn(path8, clone(source2));
57365
57365
  } else {
57366
57366
  Object.assign(form.values, clone(source2));
57367
57367
  }
57368
57368
  };
57369
- var patch = function(source2, path7) {
57370
- if (path7 === void 0) {
57371
- path7 = [];
57369
+ var patch = function(source2, path8) {
57370
+ if (path8 === void 0) {
57371
+ path8 = [];
57372
57372
  }
57373
- var targetValue = form.getValuesIn(path7);
57374
- var targetField = form.query(path7).take();
57373
+ var targetValue = form.getValuesIn(path8);
57374
+ var targetField = form.query(path8).take();
57375
57375
  var isUnVoidField = targetField && !isVoidField(targetField);
57376
57376
  if (isUnVoidField && targetField.display === "none") {
57377
57377
  targetField.caches.value = clone(source2);
57378
57378
  return;
57379
57379
  }
57380
57380
  if (allowAssignDefaultValue(targetValue, source2)) {
57381
- update(path7, source2);
57381
+ update(path8, source2);
57382
57382
  } else {
57383
57383
  if (isEmpty(source2))
57384
57384
  return;
@@ -57386,20 +57386,20 @@ var patchFormValues = function(form, path6, source) {
57386
57386
  return;
57387
57387
  if (isPlainObj(targetValue) && isPlainObj(source2)) {
57388
57388
  each(source2, function(value, key) {
57389
- patch(value, path7.concat(key));
57389
+ patch(value, path8.concat(key));
57390
57390
  });
57391
57391
  } else {
57392
57392
  if (targetField) {
57393
57393
  if (isUnVoidField && !targetField.selfModified) {
57394
- update(path7, source2);
57394
+ update(path8, source2);
57395
57395
  }
57396
57396
  } else if (form.initialized) {
57397
- update(path7, source2);
57397
+ update(path8, source2);
57398
57398
  }
57399
57399
  }
57400
57400
  }
57401
57401
  };
57402
- patch(source, path6);
57402
+ patch(source, path7);
57403
57403
  };
57404
57404
  var matchFeedback = function(search, feedback) {
57405
57405
  if (!search || !feedback)
@@ -57822,13 +57822,13 @@ var createBatchStateSetter = function(form) {
57822
57822
  } else if (isGeneralField(pattern)) {
57823
57823
  pattern.setState(payload);
57824
57824
  } else {
57825
- var matchCount_1 = 0, path6 = Path.parse(pattern);
57826
- form.query(path6).forEach(function(field) {
57825
+ var matchCount_1 = 0, path7 = Path.parse(pattern);
57826
+ form.query(path7).forEach(function(field) {
57827
57827
  field.setState(payload);
57828
57828
  matchCount_1++;
57829
57829
  });
57830
- if (matchCount_1 === 0 || path6.isWildMatchPattern) {
57831
- subscribeUpdate(form, path6, payload);
57830
+ if (matchCount_1 === 0 || path7.isWildMatchPattern) {
57831
+ subscribeUpdate(form, path7, payload);
57832
57832
  }
57833
57833
  }
57834
57834
  });
@@ -60444,8 +60444,8 @@ var FieldEffects = {
60444
60444
  };
60445
60445
  var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
60446
60446
  var getDependencyValue = function(field, pattern, property) {
60447
- var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path6 = _a2[1];
60448
- return field.query(target).getIn(path6 || property || "value");
60447
+ var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path7 = _a2[1];
60448
+ return field.query(target).getIn(path7 || property || "value");
60449
60449
  };
60450
60450
  var getDependencies = function(field, dependencies) {
60451
60451
  if (isArr(dependencies)) {
@@ -61749,18 +61749,9 @@ var AppAPI = class {
61749
61749
  };
61750
61750
 
61751
61751
  // ../../generator-utils/dist/esm/index.js
61752
- var import_path5 = __toESM(require("path"));
61752
+ var import_path6 = __toESM(require("path"));
61753
61753
  var import_utils16 = require("@modern-js/utils");
61754
61754
 
61755
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
61756
- function _define_property2(obj, key, value) {
61757
- if (key in obj) {
61758
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
61759
- } else
61760
- obj[key] = value;
61761
- return obj;
61762
- }
61763
-
61764
61755
  // ../../../cli/plugin-i18n/dist/esm-node/index.js
61765
61756
  var import_lodash7 = require("@modern-js/utils/lodash");
61766
61757
 
@@ -61819,8 +61810,8 @@ var I18n2 = class {
61819
61810
  };
61820
61811
  }
61821
61812
  constructor() {
61822
- _define_property2(this, "language", "en");
61823
- _define_property2(this, "languageMap", {});
61813
+ this.language = "en";
61814
+ this.languageMap = {};
61824
61815
  }
61825
61816
  };
61826
61817
 
@@ -61853,10 +61844,8 @@ var ZH_LOCALE2 = {
61853
61844
  i18n: "启用「国际化(i18n)」功能",
61854
61845
  test: "启用「单元测试 / 集成测试」功能",
61855
61846
  e2e_test: "启用「E2E 测试」功能",
61856
- storybook: "启用「Storybook」",
61857
61847
  storybookV7: "启用「Storybook」V7",
61858
61848
  runtime_api: "启用「Runtime API」",
61859
- mwa_storybook: "启用「Visual Testing (Storybook)」模式",
61860
61849
  ssg: "启用「SSG」功能",
61861
61850
  polyfill: "启用「基于 UA 的 Polyfill」功能",
61862
61851
  proxy: "启用「全局代理」",
@@ -61951,10 +61940,8 @@ var EN_LOCALE2 = {
61951
61940
  i18n: "Enable Internationalization (i18n)",
61952
61941
  test: "Enable Unit Test / Integration Test",
61953
61942
  e2e_test: "Enable E2E Test",
61954
- storybook: "Enable Storybook",
61955
61943
  storybookV7: "Enable Storybook V7",
61956
61944
  runtime_api: "Enable Runtime API",
61957
- mwa_storybook: "Enable Visual Testing (Storybook)",
61958
61945
  ssg: "Enable SSG",
61959
61946
  polyfill: "Enable UA-based Polyfill Feature",
61960
61947
  proxy: "Enable Global Proxy",
@@ -62054,17 +62041,32 @@ async function fileExist(filePath) {
62054
62041
  }
62055
62042
  }
62056
62043
 
62044
+ // ../../generator-utils/dist/esm/utils/getGeneratorPath.js
62045
+ var import_path5 = __toESM(require("path"));
62046
+ var getGeneratorPath = (generator, distTag, paths) => {
62047
+ if (process.env.CODESMITH_ENV === "development") {
62048
+ return import_path5.default.dirname(require.resolve(generator, {
62049
+ paths: paths !== null && paths !== void 0 ? paths : [
62050
+ process.cwd()
62051
+ ]
62052
+ }));
62053
+ } else if (distTag) {
62054
+ return `${generator}@${distTag}`;
62055
+ }
62056
+ return generator;
62057
+ };
62058
+
62057
62059
  // ../../generator-utils/dist/esm/index.js
62058
62060
  var import_utils17 = require("@modern-js/utils");
62059
62061
  function isTsProject(appDir) {
62060
- return import_utils16.fs.existsSync(import_path5.default.join(appDir, "tsconfig.json"));
62062
+ return import_utils16.fs.existsSync(import_path6.default.join(appDir, "tsconfig.json"));
62061
62063
  }
62062
62064
  async function getModernConfigFile(appDir) {
62063
- let exist = await fileExist(import_path5.default.join(appDir, "modern.config.ts"));
62065
+ let exist = await fileExist(import_path6.default.join(appDir, "modern.config.ts"));
62064
62066
  if (exist) {
62065
62067
  return "modern.config.ts";
62066
62068
  }
62067
- exist = await fileExist(import_path5.default.join(appDir, "modern.config.js"));
62069
+ exist = await fileExist(import_path6.default.join(appDir, "modern.config.js"));
62068
62070
  if (exist) {
62069
62071
  return "modern.config.js";
62070
62072
  }
@@ -62090,23 +62092,15 @@ var i18n3 = new I18n2();
62090
62092
  var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
62091
62093
 
62092
62094
  // src/index.ts
62093
- var getGeneratorPath = (generator, distTag) => {
62094
- if (process.env.CODESMITH_ENV === "development") {
62095
- return import_path6.default.dirname(require.resolve(generator));
62096
- } else if (distTag) {
62097
- return `${generator}@${distTag}`;
62098
- }
62099
- return generator;
62100
- };
62101
62095
  var ReactRouter6Type = `/// <reference types='@modern-js/runtime/types/router' />`;
62102
62096
  var handleTemplateFile = async (context, generator, appApi) => {
62103
62097
  const { sourceTypeFile, projectPath } = context.config;
62104
62098
  const appDir = context.materials.default.basePath;
62105
62099
  const isTs = import_utils17.fs.existsSync(
62106
- import_path6.default.join(appDir, projectPath || "", "tsconfig.json")
62100
+ import_path7.default.join(appDir, projectPath || "", "tsconfig.json")
62107
62101
  );
62108
62102
  if (isTs) {
62109
- const typePath = import_path6.default.join(
62103
+ const typePath = import_path7.default.join(
62110
62104
  appDir,
62111
62105
  projectPath || "",
62112
62106
  "src",
@@ -62124,7 +62118,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
62124
62118
  }
62125
62119
  }
62126
62120
  await appApi.runSubGenerator(
62127
- getGeneratorPath(DependenceGenerator, context.config.distTag),
62121
+ getGeneratorPath(DependenceGenerator, context.config.distTag, [__dirname]),
62128
62122
  void 0,
62129
62123
  {
62130
62124
  ...context.config,
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.3.10",
18
+ "version": "3.3.12",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,7 +23,7 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "2.47.1"
26
+ "@modern-js/utils": "2.48.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@modern-js/codesmith": "2.3.5",
@@ -32,12 +32,12 @@
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/generator-common": "3.3.10",
36
- "@modern-js/dependence-generator": "3.3.10",
37
- "@modern-js/plugin-i18n": "2.47.1",
38
- "@scripts/build": "2.47.1",
39
- "@scripts/jest-config": "2.47.1",
40
- "@modern-js/generator-utils": "3.3.10"
35
+ "@modern-js/dependence-generator": "3.3.12",
36
+ "@modern-js/generator-utils": "3.3.12",
37
+ "@scripts/build": "2.48.1",
38
+ "@modern-js/generator-common": "3.3.12",
39
+ "@scripts/jest-config": "2.48.1",
40
+ "@modern-js/plugin-i18n": "2.48.1"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {
package/src/index.ts CHANGED
@@ -1,22 +1,18 @@
1
1
  import path from 'path';
2
2
  import { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
3
3
  import { AppAPI } from '@modern-js/codesmith-api-app';
4
- import { fs, chalk, getModernConfigFile } from '@modern-js/generator-utils';
4
+ import {
5
+ fs,
6
+ chalk,
7
+ getModernConfigFile,
8
+ getGeneratorPath,
9
+ } from '@modern-js/generator-utils';
5
10
  import {
6
11
  DependenceGenerator,
7
12
  i18n as commonI18n,
8
13
  } from '@modern-js/generator-common';
9
14
  import { i18n, localeKeys } from './locale';
10
15
 
11
- const getGeneratorPath = (generator: string, distTag: string) => {
12
- if (process.env.CODESMITH_ENV === 'development') {
13
- return path.dirname(require.resolve(generator));
14
- } else if (distTag) {
15
- return `${generator}@${distTag}`;
16
- }
17
- return generator;
18
- };
19
-
20
16
  const ReactRouter6Type = `/// <reference types='@modern-js/runtime/types/router' />`;
21
17
 
22
18
  const handleTemplateFile = async (
@@ -50,7 +46,7 @@ const handleTemplateFile = async (
50
46
  }
51
47
 
52
48
  await appApi.runSubGenerator(
53
- getGeneratorPath(DependenceGenerator, context.config.distTag),
49
+ getGeneratorPath(DependenceGenerator, context.config.distTag, [__dirname]),
54
50
  undefined,
55
51
  {
56
52
  ...context.config,