@modern-js/mwa-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 +244 -250
  2. package/package.json +11 -11
  3. 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(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 fs7 = 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 (fs7.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 fs7 = 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 = fs7.readdirSync(dir2);
47717
47717
  for (var i = 0, length = files.length; i < length; i++) {
47718
- var file2 = path6.join(dir2, files[i]), stat = fs7.lstatSync(file2);
47718
+ var file2 = path7.join(dir2, files[i]), stat = fs7.lstatSync(file2);
47719
47719
  if (stat.isDirectory()) {
47720
47720
  if (!deferred) {
47721
47721
  deferred = true;
@@ -48473,8 +48473,8 @@ var require_parent = __commonJS({
48473
48473
  "use strict";
48474
48474
  var baseGet = require_baseGet();
48475
48475
  var baseSlice = require_baseSlice();
48476
- function parent(object, 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) {
@@ -51055,7 +51055,7 @@ __export(src_exports, {
51055
51055
  handleTemplateFile: () => handleTemplateFile
51056
51056
  });
51057
51057
  module.exports = __toCommonJS(src_exports);
51058
- var import_path6 = __toESM(require("path"));
51058
+ var import_path7 = __toESM(require("path"));
51059
51059
 
51060
51060
  // ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
51061
51061
  function _define_property(obj, key, value) {
@@ -51380,9 +51380,9 @@ var FS_RESOURCE = "_codesmith_core_fs_resource";
51380
51380
 
51381
51381
  // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51382
51382
  var import_utils7 = require("@modern-js/utils");
51383
- async function fsExists(path6) {
51383
+ async function fsExists(path7) {
51384
51384
  try {
51385
- await import_utils7.fs.access(path6);
51385
+ await import_utils7.fs.access(path7);
51386
51386
  return true;
51387
51387
  } catch (e) {
51388
51388
  return false;
@@ -52545,8 +52545,8 @@ var parseDestructorRules = function(node) {
52545
52545
  };
52546
52546
  var setInByDestructor = function(source, rules, value, mutators) {
52547
52547
  rules.forEach(function(_a2) {
52548
- var key = _a2.key, path6 = _a2.path;
52549
- mutators.setIn([key], source, mutators.getIn(path6, value));
52548
+ var key = _a2.key, path7 = _a2.path;
52549
+ mutators.setIn([key], source, mutators.getIn(path7, value));
52550
52550
  });
52551
52551
  };
52552
52552
  var getInByDestructor = function(source, rules, mutators) {
@@ -52558,8 +52558,8 @@ var getInByDestructor = function(source, rules, mutators) {
52558
52558
  }
52559
52559
  source = isValid2(source) ? source : {};
52560
52560
  rules.forEach(function(_a2) {
52561
- var key = _a2.key, path6 = _a2.path;
52562
- mutators.setIn(path6, response, source[key]);
52561
+ var key = _a2.key, path7 = _a2.path;
52562
+ mutators.setIn(path7, response, source[key]);
52563
52563
  });
52564
52564
  return response;
52565
52565
  };
@@ -53126,8 +53126,8 @@ var Matcher = (
53126
53126
  }
53127
53127
  return false;
53128
53128
  };
53129
- Matcher2.prototype.match = function(path6) {
53130
- this.path = path6;
53129
+ Matcher2.prototype.match = function(path7) {
53130
+ this.path = path7;
53131
53131
  return { matched: this.matchNode(this.tree), record: this.record };
53132
53132
  };
53133
53133
  Matcher2.matchSegments = function(source, target, record) {
@@ -53417,21 +53417,21 @@ var Path = (
53417
53417
  if (_this.isMatchPattern || _this.isRegExp) {
53418
53418
  throw new Error("".concat(_this.entire, " cannot be concat"));
53419
53419
  }
53420
- var path6 = new Path2("");
53421
- path6.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
53420
+ var path7 = new Path2("");
53421
+ path7.segments = (_a3 = _this.segments).concat.apply(_a3, __spreadArray([], __read(args.map(function(s) {
53422
53422
  return parseString(s);
53423
53423
  })), false));
53424
- path6.entire = path6.segments.join(".");
53425
- return path6;
53424
+ path7.entire = path7.segments.join(".");
53425
+ return path7;
53426
53426
  };
53427
53427
  this.slice = function(start, end) {
53428
53428
  if (_this.isMatchPattern || _this.isRegExp) {
53429
53429
  throw new Error("".concat(_this.entire, " cannot be slice"));
53430
53430
  }
53431
- var path6 = new Path2("");
53432
- path6.segments = _this.segments.slice(start, end);
53433
- path6.entire = path6.segments.join(".");
53434
- return path6;
53431
+ var path7 = new Path2("");
53432
+ path7.segments = _this.segments.slice(start, end);
53433
+ path7.entire = path7.segments.join(".");
53434
+ return path7;
53435
53435
  };
53436
53436
  this.push = function() {
53437
53437
  var items = [];
@@ -53523,8 +53523,8 @@ var Path = (
53523
53523
  };
53524
53524
  this.match = function(pattern) {
53525
53525
  var _a3, _b;
53526
- var path6 = Path2.parse(pattern);
53527
- var cache = _this.matchCache.get(path6.entire);
53526
+ var path7 = Path2.parse(pattern);
53527
+ var cache = _this.matchCache.get(path7.entire);
53528
53528
  if (cache !== void 0) {
53529
53529
  if (cache.record && cache.record.score !== void 0) {
53530
53530
  _this.matchScore = cache.record.score;
@@ -53532,21 +53532,21 @@ var Path = (
53532
53532
  return cache.matched;
53533
53533
  }
53534
53534
  var cacheWith = function(value) {
53535
- _this.matchCache.set(path6.entire, value);
53535
+ _this.matchCache.set(path7.entire, value);
53536
53536
  return value;
53537
53537
  };
53538
- if (path6.isMatchPattern) {
53538
+ if (path7.isMatchPattern) {
53539
53539
  if (_this.isMatchPattern) {
53540
- throw new Error("".concat(path6.entire, " cannot match ").concat(_this.entire));
53540
+ throw new Error("".concat(path7.entire, " cannot match ").concat(_this.entire));
53541
53541
  } else {
53542
53542
  _this.matchScore = 0;
53543
- return cacheWith(path6.match(_this.segments));
53543
+ return cacheWith(path7.match(_this.segments));
53544
53544
  }
53545
53545
  } else {
53546
53546
  if (_this.isMatchPattern) {
53547
53547
  if (_this.isRegExp) {
53548
53548
  try {
53549
- return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path6.entire);
53549
+ return (_b = (_a3 = _this["entire"]) === null || _a3 === void 0 ? void 0 : _a3["test"]) === null || _b === void 0 ? void 0 : _b.call(_a3, path7.entire);
53550
53550
  } finally {
53551
53551
  ;
53552
53552
  _this.entire.lastIndex = 0;
@@ -53555,14 +53555,14 @@ var Path = (
53555
53555
  var record = {
53556
53556
  score: 0
53557
53557
  };
53558
- var result = cacheWith(new Matcher(_this.tree, record).match(path6.segments));
53558
+ var result = cacheWith(new Matcher(_this.tree, record).match(path7.segments));
53559
53559
  _this.matchScore = record.score;
53560
53560
  return result.matched;
53561
53561
  } else {
53562
53562
  var record = {
53563
53563
  score: 0
53564
53564
  };
53565
- var result = cacheWith(Matcher.matchSegments(_this.segments, path6.segments, record));
53565
+ var result = cacheWith(Matcher.matchSegments(_this.segments, path7.segments, record));
53566
53566
  _this.matchScore = record.score;
53567
53567
  return result.matched;
53568
53568
  }
@@ -53638,12 +53638,12 @@ var Path = (
53638
53638
  configurable: true
53639
53639
  });
53640
53640
  Path2.match = function(pattern) {
53641
- var path6 = Path2.parse(pattern);
53641
+ var path7 = Path2.parse(pattern);
53642
53642
  var matcher = function(target) {
53643
- return path6.match(target);
53643
+ return path7.match(target);
53644
53644
  };
53645
53645
  matcher[isMatcher] = true;
53646
- matcher.path = path6;
53646
+ matcher.path = path7;
53647
53647
  return matcher;
53648
53648
  };
53649
53649
  Path2.isPathPattern = function(target) {
@@ -53652,52 +53652,52 @@ var Path = (
53652
53652
  Path2.transform = function(pattern, regexp, callback) {
53653
53653
  return Path2.parse(pattern).transform(regexp, callback);
53654
53654
  };
53655
- Path2.parse = function(path6, base) {
53656
- if (path6 === void 0) {
53657
- path6 = "";
53655
+ Path2.parse = function(path7, base) {
53656
+ if (path7 === void 0) {
53657
+ path7 = "";
53658
53658
  }
53659
- if (path6 instanceof Path2) {
53660
- var found = pathCache.get(path6.entire);
53659
+ if (path7 instanceof Path2) {
53660
+ var found = pathCache.get(path7.entire);
53661
53661
  if (found) {
53662
53662
  return found;
53663
53663
  } else {
53664
- pathCache.set(path6.entire, path6);
53665
- return path6;
53664
+ pathCache.set(path7.entire, path7);
53665
+ return path7;
53666
53666
  }
53667
- } else if (path6 && path6[isMatcher]) {
53668
- return Path2.parse(path6["path"]);
53667
+ } else if (path7 && path7[isMatcher]) {
53668
+ return Path2.parse(path7["path"]);
53669
53669
  } else {
53670
53670
  var key_ = base ? Path2.parse(base) : "";
53671
- var key = "".concat(path6, ":").concat(key_);
53671
+ var key = "".concat(path7, ":").concat(key_);
53672
53672
  var found = pathCache.get(key);
53673
53673
  if (found) {
53674
53674
  return found;
53675
53675
  } else {
53676
- path6 = new Path2(path6, base);
53677
- pathCache.set(key, path6);
53678
- return path6;
53676
+ path7 = new Path2(path7, base);
53677
+ pathCache.set(key, path7);
53678
+ return path7;
53679
53679
  }
53680
53680
  }
53681
53681
  };
53682
53682
  Path2.getIn = function(source, pattern) {
53683
- var path6 = Path2.parse(pattern);
53684
- return path6.getIn(source);
53683
+ var path7 = Path2.parse(pattern);
53684
+ return path7.getIn(source);
53685
53685
  };
53686
53686
  Path2.setIn = function(source, pattern, value) {
53687
- var path6 = Path2.parse(pattern);
53688
- return path6.setIn(source, value);
53687
+ var path7 = Path2.parse(pattern);
53688
+ return path7.setIn(source, value);
53689
53689
  };
53690
53690
  Path2.deleteIn = function(source, pattern) {
53691
- var path6 = Path2.parse(pattern);
53692
- return path6.deleteIn(source);
53691
+ var path7 = Path2.parse(pattern);
53692
+ return path7.deleteIn(source);
53693
53693
  };
53694
53694
  Path2.existIn = function(source, pattern, start) {
53695
- var path6 = Path2.parse(pattern);
53696
- return path6.existIn(source, start);
53695
+ var path7 = Path2.parse(pattern);
53696
+ return path7.existIn(source, start);
53697
53697
  };
53698
53698
  Path2.ensureIn = function(source, pattern, defaultValue) {
53699
- var path6 = Path2.parse(pattern);
53700
- return path6.ensureIn(source, defaultValue);
53699
+ var path7 = Path2.parse(pattern);
53700
+ return path7.ensureIn(source, defaultValue);
53701
53701
  };
53702
53702
  return Path2;
53703
53703
  }()
@@ -55516,9 +55516,9 @@ var hasOwnProperty4 = Object.prototype.hasOwnProperty;
55516
55516
  var traverse = function(target, visitor) {
55517
55517
  var seenObjects = [];
55518
55518
  var root = target;
55519
- var traverse2 = function(target2, path6) {
55520
- if (path6 === void 0) {
55521
- path6 = [];
55519
+ var traverse2 = function(target2, path7) {
55520
+ if (path7 === void 0) {
55521
+ path7 = [];
55522
55522
  }
55523
55523
  if (isPlainObj(target2)) {
55524
55524
  var seenIndex = seenObjects.indexOf(target2);
@@ -55528,15 +55528,15 @@ var traverse = function(target, visitor) {
55528
55528
  var addIndex = seenObjects.length;
55529
55529
  seenObjects.push(target2);
55530
55530
  if (isNoNeedCompileObject(target2) && root !== target2) {
55531
- visitor(target2, path6);
55531
+ visitor(target2, path7);
55532
55532
  return;
55533
55533
  }
55534
55534
  each(target2, function(value, key) {
55535
- traverse2(value, path6.concat(key));
55535
+ traverse2(value, path7.concat(key));
55536
55536
  });
55537
55537
  seenObjects.splice(addIndex, 1);
55538
55538
  } else {
55539
- visitor(target2, path6);
55539
+ visitor(target2, path7);
55540
55540
  }
55541
55541
  };
55542
55542
  traverse2(target);
@@ -55547,24 +55547,24 @@ var traverseSchema = function(schema, visitor) {
55547
55547
  }
55548
55548
  var seenObjects = [];
55549
55549
  var root = schema;
55550
- var traverse2 = function(target, path6) {
55550
+ var traverse2 = function(target, path7) {
55551
55551
  var _a2;
55552
- if (path6 === void 0) {
55553
- path6 = [];
55552
+ if (path7 === void 0) {
55553
+ path7 = [];
55554
55554
  }
55555
- if (path6[0] === "x-compile-omitted" || path6[0] === "x-validator" || path6[0] === "version" || path6[0] === "_isJSONSchemaObject")
55555
+ if (path7[0] === "x-compile-omitted" || path7[0] === "x-validator" || path7[0] === "version" || path7[0] === "_isJSONSchemaObject")
55556
55556
  return;
55557
- if (String(path6[0]).indexOf("x-") == -1 && isFn(target))
55557
+ if (String(path7[0]).indexOf("x-") == -1 && isFn(target))
55558
55558
  return;
55559
- if (SchemaNestedMap[path6[0]])
55559
+ if (SchemaNestedMap[path7[0]])
55560
55560
  return;
55561
- if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path6[0])) > -1) {
55562
- visitor(target, path6, true);
55561
+ if (((_a2 = schema["x-compile-omitted"]) === null || _a2 === void 0 ? void 0 : _a2.indexOf(path7[0])) > -1) {
55562
+ visitor(target, path7, true);
55563
55563
  return;
55564
55564
  }
55565
55565
  if (isPlainObj(target)) {
55566
- if (path6[0] === "default" || path6[0] === "x-value") {
55567
- visitor(target, path6);
55566
+ if (path7[0] === "default" || path7[0] === "x-value") {
55567
+ visitor(target, path7);
55568
55568
  return;
55569
55569
  }
55570
55570
  var seenIndex = seenObjects.indexOf(target);
@@ -55574,15 +55574,15 @@ var traverseSchema = function(schema, visitor) {
55574
55574
  var addIndex = seenObjects.length;
55575
55575
  seenObjects.push(target);
55576
55576
  if (isNoNeedCompileObject(target) && root !== target) {
55577
- visitor(target, path6);
55577
+ visitor(target, path7);
55578
55578
  return;
55579
55579
  }
55580
55580
  each(target, function(value, key) {
55581
- traverse2(value, path6.concat(key));
55581
+ traverse2(value, path7.concat(key));
55582
55582
  });
55583
55583
  seenObjects.splice(addIndex, 1);
55584
55584
  } else {
55585
- visitor(target, path6);
55585
+ visitor(target, path7);
55586
55586
  }
55587
55587
  };
55588
55588
  traverse2(schema);
@@ -55626,8 +55626,8 @@ var createDataSource = function(source) {
55626
55626
  var patchStateFormSchema = function(targetState, pattern, compiled) {
55627
55627
  untracked(function() {
55628
55628
  var _a2;
55629
- var path6 = Path.parse(pattern);
55630
- var segments = path6.segments;
55629
+ var path7 = Path.parse(pattern);
55630
+ var segments = path7.segments;
55631
55631
  var key = segments[0];
55632
55632
  var isEnum = key === "enum" && isArr(compiled);
55633
55633
  var schemaMapKey = SchemaStateMap[key];
@@ -55711,14 +55711,14 @@ var compile = function(source, scope) {
55711
55711
  };
55712
55712
  var patchCompile = function(targetState, sourceState, scope) {
55713
55713
  traverse(sourceState, function(value, pattern) {
55714
- var path6 = Path.parse(pattern);
55714
+ var path7 = Path.parse(pattern);
55715
55715
  var compiled = compile(value, scope);
55716
- var key = path6.segments[0];
55716
+ var key = path7.segments[0];
55717
55717
  if (compiled === void 0)
55718
55718
  return;
55719
55719
  if (hasOwnProperty4.call(targetState, key)) {
55720
55720
  untracked(function() {
55721
- return Path.setIn(targetState, path6, compiled);
55721
+ return Path.setIn(targetState, path7, compiled);
55722
55722
  });
55723
55723
  }
55724
55724
  });
@@ -55727,7 +55727,7 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
55727
55727
  if (demand === void 0) {
55728
55728
  demand = false;
55729
55729
  }
55730
- traverseSchema(sourceSchema, function(value, path6, omitCompile) {
55730
+ traverseSchema(sourceSchema, function(value, path7, omitCompile) {
55731
55731
  var compiled = value;
55732
55732
  var collected = hasCollected(function() {
55733
55733
  if (!omitCompile) {
@@ -55738,10 +55738,10 @@ var patchSchemaCompile = function(targetState, sourceSchema, scope, demand) {
55738
55738
  return;
55739
55739
  if (demand) {
55740
55740
  if (collected || !targetState.initialized) {
55741
- patchStateFormSchema(targetState, path6, compiled);
55741
+ patchStateFormSchema(targetState, path7, compiled);
55742
55742
  }
55743
55743
  } else {
55744
- patchStateFormSchema(targetState, path6, compiled);
55744
+ patchStateFormSchema(targetState, path7, compiled);
55745
55745
  }
55746
55746
  });
55747
55747
  };
@@ -56025,14 +56025,14 @@ var getISOCode = function(language) {
56025
56025
  });
56026
56026
  return isoCode;
56027
56027
  };
56028
- var getLocaleByPath = function(path6, lang) {
56028
+ var getLocaleByPath = function(path7, lang) {
56029
56029
  if (lang === void 0) {
56030
56030
  lang = registry.locales.language;
56031
56031
  }
56032
- return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path6));
56032
+ return getIn2(registry.locales.messages, "".concat(getISOCode(lang), ".").concat(path7));
56033
56033
  };
56034
- var getValidateLocale = function(path6) {
56035
- var message = getLocaleByPath(path6);
56034
+ var getValidateLocale = function(path7) {
56035
+ var message = getLocaleByPath(path7);
56036
56036
  return message || getLocaleByPath("pattern") || getLocaleByPath("pattern", defaultLanguage);
56037
56037
  };
56038
56038
  var getValidateMessageTemplateEngine = function() {
@@ -57293,15 +57293,15 @@ var buildFieldPath = function(field) {
57293
57293
  var buildDataPath = function(fields, pattern) {
57294
57294
  var prevArray = false;
57295
57295
  var segments = pattern.segments;
57296
- var path6 = segments.reduce(function(path7, key, index) {
57297
- var currentPath = path7.concat(key);
57296
+ var path7 = segments.reduce(function(path8, key, index) {
57297
+ var currentPath = path8.concat(key);
57298
57298
  var currentAddress = segments.slice(0, index + 1);
57299
57299
  var current = fields[currentAddress.join(".")];
57300
57300
  if (prevArray) {
57301
57301
  if (!isVoidField(current)) {
57302
57302
  prevArray = false;
57303
57303
  }
57304
- return path7;
57304
+ return path8;
57305
57305
  }
57306
57306
  if (index >= segments.length - 1) {
57307
57307
  return currentPath;
@@ -57313,13 +57313,13 @@ var buildDataPath = function(fields, pattern) {
57313
57313
  prevArray = true;
57314
57314
  return currentPath;
57315
57315
  }
57316
- return path7;
57316
+ return path8;
57317
57317
  } else {
57318
57318
  prevArray = false;
57319
57319
  }
57320
57320
  return currentPath;
57321
57321
  }, []);
57322
- return new Path(path6);
57322
+ return new Path(path7);
57323
57323
  };
57324
57324
  var locateNode = function(field, address) {
57325
57325
  field.address = Path.parse(address);
@@ -57353,33 +57353,33 @@ var destroy = function(target, address, forceClear) {
57353
57353
  field === null || field === void 0 ? void 0 : field.dispose();
57354
57354
  if (isDataField(field) && forceClear) {
57355
57355
  var form = field.form;
57356
- var path6 = field.path;
57357
- form.deleteValuesIn(path6);
57358
- form.deleteInitialValuesIn(path6);
57356
+ var path7 = field.path;
57357
+ form.deleteValuesIn(path7);
57358
+ form.deleteInitialValuesIn(path7);
57359
57359
  }
57360
57360
  delete target[address];
57361
57361
  };
57362
- var patchFormValues = function(form, path6, source) {
57363
- var update = function(path7, source2) {
57364
- if (path7.length) {
57365
- form.setValuesIn(path7, clone(source2));
57362
+ var patchFormValues = function(form, path7, source) {
57363
+ var update = function(path8, source2) {
57364
+ if (path8.length) {
57365
+ form.setValuesIn(path8, clone(source2));
57366
57366
  } else {
57367
57367
  Object.assign(form.values, clone(source2));
57368
57368
  }
57369
57369
  };
57370
- var patch = function(source2, path7) {
57371
- if (path7 === void 0) {
57372
- path7 = [];
57370
+ var patch = function(source2, path8) {
57371
+ if (path8 === void 0) {
57372
+ path8 = [];
57373
57373
  }
57374
- var targetValue = form.getValuesIn(path7);
57375
- var targetField = form.query(path7).take();
57374
+ var targetValue = form.getValuesIn(path8);
57375
+ var targetField = form.query(path8).take();
57376
57376
  var isUnVoidField = targetField && !isVoidField(targetField);
57377
57377
  if (isUnVoidField && targetField.display === "none") {
57378
57378
  targetField.caches.value = clone(source2);
57379
57379
  return;
57380
57380
  }
57381
57381
  if (allowAssignDefaultValue(targetValue, source2)) {
57382
- update(path7, source2);
57382
+ update(path8, source2);
57383
57383
  } else {
57384
57384
  if (isEmpty(source2))
57385
57385
  return;
@@ -57387,20 +57387,20 @@ var patchFormValues = function(form, path6, source) {
57387
57387
  return;
57388
57388
  if (isPlainObj(targetValue) && isPlainObj(source2)) {
57389
57389
  each(source2, function(value, key) {
57390
- patch(value, path7.concat(key));
57390
+ patch(value, path8.concat(key));
57391
57391
  });
57392
57392
  } else {
57393
57393
  if (targetField) {
57394
57394
  if (isUnVoidField && !targetField.selfModified) {
57395
- update(path7, source2);
57395
+ update(path8, source2);
57396
57396
  }
57397
57397
  } else if (form.initialized) {
57398
- update(path7, source2);
57398
+ update(path8, source2);
57399
57399
  }
57400
57400
  }
57401
57401
  }
57402
57402
  };
57403
- patch(source, path6);
57403
+ patch(source, path7);
57404
57404
  };
57405
57405
  var matchFeedback = function(search, feedback) {
57406
57406
  if (!search || !feedback)
@@ -57823,13 +57823,13 @@ var createBatchStateSetter = function(form) {
57823
57823
  } else if (isGeneralField(pattern)) {
57824
57824
  pattern.setState(payload);
57825
57825
  } else {
57826
- var matchCount_1 = 0, path6 = Path.parse(pattern);
57827
- form.query(path6).forEach(function(field) {
57826
+ var matchCount_1 = 0, path7 = Path.parse(pattern);
57827
+ form.query(path7).forEach(function(field) {
57828
57828
  field.setState(payload);
57829
57829
  matchCount_1++;
57830
57830
  });
57831
- if (matchCount_1 === 0 || path6.isWildMatchPattern) {
57832
- subscribeUpdate(form, path6, payload);
57831
+ if (matchCount_1 === 0 || path7.isWildMatchPattern) {
57832
+ subscribeUpdate(form, path7, payload);
57833
57833
  }
57834
57834
  }
57835
57835
  });
@@ -60445,8 +60445,8 @@ var FieldEffects = {
60445
60445
  };
60446
60446
  var DefaultFieldEffects = ["onFieldInit", "onFieldValueChange"];
60447
60447
  var getDependencyValue = function(field, pattern, property) {
60448
- var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path6 = _a2[1];
60449
- return field.query(target).getIn(path6 || property || "value");
60448
+ var _a2 = __read7(String(pattern).split(/\s*#\s*/), 2), target = _a2[0], path7 = _a2[1];
60449
+ return field.query(target).getIn(path7 || property || "value");
60450
60450
  };
60451
60451
  var getDependencies = function(field, dependencies) {
60452
60452
  if (isArr(dependencies)) {
@@ -61749,15 +61749,6 @@ var AppAPI = class {
61749
61749
  }
61750
61750
  };
61751
61751
 
61752
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
61753
- function _define_property2(obj, key, value) {
61754
- if (key in obj) {
61755
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
61756
- } else
61757
- obj[key] = value;
61758
- return obj;
61759
- }
61760
-
61761
61752
  // ../../../cli/plugin-i18n/dist/esm-node/index.js
61762
61753
  var import_lodash7 = require("@modern-js/utils/lodash");
61763
61754
 
@@ -61816,8 +61807,8 @@ var I18n2 = class {
61816
61807
  };
61817
61808
  }
61818
61809
  constructor() {
61819
- _define_property2(this, "language", "en");
61820
- _define_property2(this, "languageMap", {});
61810
+ this.language = "en";
61811
+ this.languageMap = {};
61821
61812
  }
61822
61813
  };
61823
61814
 
@@ -61850,10 +61841,8 @@ var ZH_LOCALE2 = {
61850
61841
  i18n: "启用「国际化(i18n)」功能",
61851
61842
  test: "启用「单元测试 / 集成测试」功能",
61852
61843
  e2e_test: "启用「E2E 测试」功能",
61853
- storybook: "启用「Storybook」",
61854
61844
  storybookV7: "启用「Storybook」V7",
61855
61845
  runtime_api: "启用「Runtime API」",
61856
- mwa_storybook: "启用「Visual Testing (Storybook)」模式",
61857
61846
  ssg: "启用「SSG」功能",
61858
61847
  polyfill: "启用「基于 UA 的 Polyfill」功能",
61859
61848
  proxy: "启用「全局代理」",
@@ -61948,10 +61937,8 @@ var EN_LOCALE2 = {
61948
61937
  i18n: "Enable Internationalization (i18n)",
61949
61938
  test: "Enable Unit Test / Integration Test",
61950
61939
  e2e_test: "Enable E2E Test",
61951
- storybook: "Enable Storybook",
61952
61940
  storybookV7: "Enable Storybook V7",
61953
61941
  runtime_api: "Enable Runtime API",
61954
- mwa_storybook: "Enable Visual Testing (Storybook)",
61955
61942
  ssg: "Enable SSG",
61956
61943
  polyfill: "Enable UA-based Polyfill Feature",
61957
61944
  proxy: "Enable Global Proxy",
@@ -62206,7 +62193,7 @@ var MWADefaultConfig = {
62206
62193
  };
62207
62194
 
62208
62195
  // ../../generator-utils/dist/esm/index.js
62209
- var import_path5 = __toESM(require("path"));
62196
+ var import_path6 = __toESM(require("path"));
62210
62197
  var import_utils15 = require("@modern-js/utils");
62211
62198
 
62212
62199
  // ../../generator-utils/dist/esm/utils/stripAnsi.js
@@ -62251,6 +62238,21 @@ var localeKeys3 = i18n3.init("en", {
62251
62238
  en: EN_LOCALE3
62252
62239
  });
62253
62240
 
62241
+ // ../../generator-utils/dist/esm/utils/getGeneratorPath.js
62242
+ var import_path5 = __toESM(require("path"));
62243
+ var getGeneratorPath = (generator, distTag, paths) => {
62244
+ if (process.env.CODESMITH_ENV === "development") {
62245
+ return import_path5.default.dirname(require.resolve(generator, {
62246
+ paths: paths !== null && paths !== void 0 ? paths : [
62247
+ process.cwd()
62248
+ ]
62249
+ }));
62250
+ } else if (distTag) {
62251
+ return `${generator}@${distTag}`;
62252
+ }
62253
+ return generator;
62254
+ };
62255
+
62254
62256
  // ../../generator-utils/dist/esm/index.js
62255
62257
  var import_utils16 = require("@modern-js/utils");
62256
62258
  async function getPackageVersion(packageName, registry2) {
@@ -62316,7 +62318,7 @@ function validatePackageName(value, packages, options) {
62316
62318
  function validatePackagePath(value, projectDir, options) {
62317
62319
  const { isMwa } = options || {};
62318
62320
  const dir = isMwa ? "apps" : "packages";
62319
- const packageDir = import_path5.default.resolve(projectDir || "", dir, value);
62321
+ const packageDir = import_path6.default.resolve(projectDir || "", dir, value);
62320
62322
  if (import_utils15.fs.existsSync(packageDir)) {
62321
62323
  return {
62322
62324
  success: false,
@@ -62365,14 +62367,6 @@ var i18n4 = new I18n2();
62365
62367
  var localeKeys4 = i18n4.init("en", { zh: ZH_LOCALE4, en: EN_LOCALE4 });
62366
62368
 
62367
62369
  // src/index.ts
62368
- var getGeneratorPath = (generator, distTag) => {
62369
- if (process.env.CODESMITH_ENV === "development") {
62370
- return import_path6.default.dirname(require.resolve(generator));
62371
- } else if (distTag) {
62372
- return `${generator}@${distTag}`;
62373
- }
62374
- return generator;
62375
- };
62376
62370
  var handleTemplateFile = async (context, generator, appApi) => {
62377
62371
  const { isMonorepoSubProject, projectDir = "" } = context.config;
62378
62372
  const { outputPath } = generator;
@@ -62408,7 +62402,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
62408
62402
  }),
62409
62403
  packagePath: (input) => validatePackagePath(
62410
62404
  input,
62411
- import_path6.default.join(process.cwd(), projectDir),
62405
+ import_path7.default.join(process.cwd(), projectDir),
62412
62406
  {
62413
62407
  isMwa: true
62414
62408
  }
@@ -62426,7 +62420,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
62426
62420
  }),
62427
62421
  packagePath: (input) => validatePackagePath(
62428
62422
  input,
62429
- import_path6.default.join(process.cwd(), projectDir),
62423
+ import_path7.default.join(process.cwd(), projectDir),
62430
62424
  { isMwa: true }
62431
62425
  )
62432
62426
  }
@@ -62445,9 +62439,9 @@ var handleTemplateFile = async (context, generator, appApi) => {
62445
62439
  packagePath,
62446
62440
  isMonorepoSubProject
62447
62441
  );
62448
- const dirname = import_path6.default.basename(generator.outputPath);
62442
+ const dirname = import_path7.default.basename(generator.outputPath);
62449
62443
  await appApi.runSubGenerator(
62450
- getGeneratorPath(BaseGenerator, context.config.distTag),
62444
+ getGeneratorPath(BaseGenerator, context.config.distTag, [__dirname]),
62451
62445
  void 0,
62452
62446
  { ...context.config, hasPlugin: false }
62453
62447
  );
@@ -62483,7 +62477,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
62483
62477
  );
62484
62478
  }
62485
62479
  await appApi.runSubGenerator(
62486
- getGeneratorPath(EntryGenerator, context.config.distTag),
62480
+ getGeneratorPath(EntryGenerator, context.config.distTag, [__dirname]),
62487
62481
  `./${projectPath}`,
62488
62482
  {
62489
62483
  ...context.config,
@@ -62498,7 +62492,7 @@ var handleTemplateFile = async (context, generator, appApi) => {
62498
62492
  }
62499
62493
  if (packagesInfo && Object.keys(packagesInfo).length > 0) {
62500
62494
  await appApi.runSubGenerator(
62501
- getGeneratorPath(PackagesGenerator, context.config.distTag),
62495
+ getGeneratorPath(PackagesGenerator, context.config.distTag, [__dirname]),
62502
62496
  void 0,
62503
62497
  context.config
62504
62498
  );
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,15 +32,15 @@
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/base-generator": "3.3.10",
36
- "@modern-js/dependence-generator": "3.3.10",
37
- "@modern-js/generator-common": "3.3.10",
38
- "@modern-js/entry-generator": "3.3.10",
39
- "@modern-js/generator-utils": "3.3.10",
40
- "@modern-js/packages-generator": "3.3.10",
41
- "@modern-js/plugin-i18n": "2.47.1",
42
- "@scripts/build": "2.47.1",
43
- "@scripts/jest-config": "2.47.1"
35
+ "@modern-js/base-generator": "3.3.12",
36
+ "@modern-js/dependence-generator": "3.3.12",
37
+ "@modern-js/entry-generator": "3.3.12",
38
+ "@modern-js/plugin-i18n": "2.48.1",
39
+ "@modern-js/generator-utils": "3.3.12",
40
+ "@modern-js/packages-generator": "3.3.12",
41
+ "@modern-js/generator-common": "3.3.12",
42
+ "@scripts/build": "2.48.1",
43
+ "@scripts/jest-config": "2.48.1"
44
44
  },
45
45
  "sideEffects": false,
46
46
  "publishConfig": {
package/src/index.ts CHANGED
@@ -19,18 +19,10 @@ import {
19
19
  validatePackagePath,
20
20
  getPackageManagerText,
21
21
  getModernVersion,
22
+ getGeneratorPath,
22
23
  } from '@modern-js/generator-utils';
23
24
  import { i18n, localeKeys } from './locale';
24
25
 
25
- const getGeneratorPath = (generator: string, distTag: string) => {
26
- if (process.env.CODESMITH_ENV === 'development') {
27
- return path.dirname(require.resolve(generator));
28
- } else if (distTag) {
29
- return `${generator}@${distTag}`;
30
- }
31
- return generator;
32
- };
33
-
34
26
  export const handleTemplateFile = async (
35
27
  context: GeneratorContext,
36
28
  generator: GeneratorCore,
@@ -131,7 +123,7 @@ export const handleTemplateFile = async (
131
123
  const dirname = path.basename(generator.outputPath);
132
124
 
133
125
  await appApi.runSubGenerator(
134
- getGeneratorPath(BaseGenerator, context.config.distTag),
126
+ getGeneratorPath(BaseGenerator, context.config.distTag, [__dirname]),
135
127
  undefined,
136
128
  { ...context.config, hasPlugin: false },
137
129
  );
@@ -179,7 +171,7 @@ export const handleTemplateFile = async (
179
171
  }
180
172
 
181
173
  await appApi.runSubGenerator(
182
- getGeneratorPath(EntryGenerator, context.config.distTag),
174
+ getGeneratorPath(EntryGenerator, context.config.distTag, [__dirname]),
183
175
  `./${projectPath}`,
184
176
  {
185
177
  ...context.config,
@@ -196,7 +188,7 @@ export const handleTemplateFile = async (
196
188
 
197
189
  if (packagesInfo && Object.keys(packagesInfo).length > 0) {
198
190
  await appApi.runSubGenerator(
199
- getGeneratorPath(PackagesGenerator, context.config.distTag),
191
+ getGeneratorPath(PackagesGenerator, context.config.distTag, [__dirname]),
200
192
  undefined,
201
193
  context.config,
202
194
  );