@modern-js/repo-generator 0.0.0-nightly-20240818170637 → 0.0.0-nightly-20240819170736

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 +196 -165
  2. package/package.json +10 -10
  3. package/src/index.ts +2 -2
package/dist/index.js CHANGED
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
8
11
  var __commonJS = (cb, mod) => function __require() {
9
12
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
13
  };
@@ -9653,11 +9656,11 @@ var require_ms = __commonJS({
9653
9656
  }
9654
9657
  });
9655
9658
 
9656
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js
9659
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js
9657
9660
  var require_common = __commonJS({
9658
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js"(exports, module2) {
9661
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js"(exports, module2) {
9659
9662
  "use strict";
9660
- function setup(env) {
9663
+ function setup(env2) {
9661
9664
  createDebug.debug = createDebug;
9662
9665
  createDebug.default = createDebug;
9663
9666
  createDebug.coerce = coerce;
@@ -9666,8 +9669,8 @@ var require_common = __commonJS({
9666
9669
  createDebug.enabled = enabled;
9667
9670
  createDebug.humanize = require_ms();
9668
9671
  createDebug.destroy = destroy2;
9669
- Object.keys(env).forEach((key) => {
9670
- createDebug[key] = env[key];
9672
+ Object.keys(env2).forEach((key) => {
9673
+ createDebug[key] = env2[key];
9671
9674
  });
9672
9675
  createDebug.names = [];
9673
9676
  createDebug.skips = [];
@@ -9817,9 +9820,9 @@ var require_common = __commonJS({
9817
9820
  }
9818
9821
  });
9819
9822
 
9820
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js
9823
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js
9821
9824
  var require_browser = __commonJS({
9822
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports, module2) {
9825
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js"(exports, module2) {
9823
9826
  "use strict";
9824
9827
  exports.formatArgs = formatArgs;
9825
9828
  exports.save = save;
@@ -9987,120 +9990,147 @@ var require_browser = __commonJS({
9987
9990
  }
9988
9991
  });
9989
9992
 
9990
- // ../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
9991
- var require_has_flag = __commonJS({
9992
- "../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
9993
- "use strict";
9994
- module2.exports = (flag, argv) => {
9995
- argv = argv || process.argv;
9996
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
9997
- const pos = argv.indexOf(prefix + flag);
9998
- const terminatorPos = argv.indexOf("--");
9999
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
10000
- };
10001
- }
9993
+ // ../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js
9994
+ var supports_color_exports = {};
9995
+ __export(supports_color_exports, {
9996
+ createSupportsColor: () => createSupportsColor,
9997
+ default: () => supports_color_default
10002
9998
  });
10003
-
10004
- // ../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
10005
- var require_supports_color = __commonJS({
10006
- "../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
10007
- "use strict";
10008
- var os2 = require("os");
10009
- var hasFlag = require_has_flag();
10010
- var env = process.env;
10011
- var forceColor;
10012
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
10013
- forceColor = false;
10014
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
10015
- forceColor = true;
9999
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
10000
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
10001
+ const position = argv.indexOf(prefix + flag);
10002
+ const terminatorPosition = argv.indexOf("--");
10003
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
10004
+ }
10005
+ function envForceColor() {
10006
+ if ("FORCE_COLOR" in env) {
10007
+ if (env.FORCE_COLOR === "true") {
10008
+ return 1;
10016
10009
  }
10017
- if ("FORCE_COLOR" in env) {
10018
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
10010
+ if (env.FORCE_COLOR === "false") {
10011
+ return 0;
10019
10012
  }
10020
- function translateLevel(level) {
10021
- if (level === 0) {
10022
- return false;
10023
- }
10024
- return {
10025
- level,
10026
- hasBasic: true,
10027
- has256: level >= 2,
10028
- has16m: level >= 3
10029
- };
10013
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
10014
+ }
10015
+ }
10016
+ function translateLevel(level) {
10017
+ if (level === 0) {
10018
+ return false;
10019
+ }
10020
+ return {
10021
+ level,
10022
+ hasBasic: true,
10023
+ has256: level >= 2,
10024
+ has16m: level >= 3
10025
+ };
10026
+ }
10027
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
10028
+ const noFlagForceColor = envForceColor();
10029
+ if (noFlagForceColor !== void 0) {
10030
+ flagForceColor = noFlagForceColor;
10031
+ }
10032
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
10033
+ if (forceColor === 0) {
10034
+ return 0;
10035
+ }
10036
+ if (sniffFlags) {
10037
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
10038
+ return 3;
10030
10039
  }
10031
- function supportsColor(stream4) {
10032
- if (forceColor === false) {
10033
- return 0;
10034
- }
10035
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
10036
- return 3;
10037
- }
10038
- if (hasFlag("color=256")) {
10039
- return 2;
10040
- }
10041
- if (stream4 && !stream4.isTTY && forceColor !== true) {
10042
- return 0;
10043
- }
10044
- const min = forceColor ? 1 : 0;
10045
- if (process.platform === "win32") {
10046
- const osRelease = os2.release().split(".");
10047
- if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
10048
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
10049
- }
10050
- return 1;
10051
- }
10052
- if ("CI" in env) {
10053
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
10054
- return 1;
10055
- }
10056
- return min;
10057
- }
10058
- if ("TEAMCITY_VERSION" in env) {
10059
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
10060
- }
10061
- if (env.COLORTERM === "truecolor") {
10062
- return 3;
10063
- }
10064
- if ("TERM_PROGRAM" in env) {
10065
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
10066
- switch (env.TERM_PROGRAM) {
10067
- case "iTerm.app":
10068
- return version >= 3 ? 3 : 2;
10069
- case "Apple_Terminal":
10070
- return 2;
10071
- }
10040
+ if (hasFlag("color=256")) {
10041
+ return 2;
10042
+ }
10043
+ }
10044
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
10045
+ return 1;
10046
+ }
10047
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
10048
+ return 0;
10049
+ }
10050
+ const min = forceColor || 0;
10051
+ if (env.TERM === "dumb") {
10052
+ return min;
10053
+ }
10054
+ if (import_node_process.default.platform === "win32") {
10055
+ const osRelease = import_node_os.default.release().split(".");
10056
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
10057
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
10058
+ }
10059
+ return 1;
10060
+ }
10061
+ if ("CI" in env) {
10062
+ if ("GITHUB_ACTIONS" in env) {
10063
+ return 3;
10064
+ }
10065
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
10066
+ return 1;
10067
+ }
10068
+ return min;
10069
+ }
10070
+ if ("TEAMCITY_VERSION" in env) {
10071
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
10072
+ }
10073
+ if (env.COLORTERM === "truecolor") {
10074
+ return 3;
10075
+ }
10076
+ if (env.TERM === "xterm-kitty") {
10077
+ return 3;
10078
+ }
10079
+ if ("TERM_PROGRAM" in env) {
10080
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
10081
+ switch (env.TERM_PROGRAM) {
10082
+ case "iTerm.app": {
10083
+ return version >= 3 ? 3 : 2;
10072
10084
  }
10073
- if (/-256(color)?$/i.test(env.TERM)) {
10085
+ case "Apple_Terminal": {
10074
10086
  return 2;
10075
10087
  }
10076
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
10077
- return 1;
10078
- }
10079
- if ("COLORTERM" in env) {
10080
- return 1;
10081
- }
10082
- if (env.TERM === "dumb") {
10083
- return min;
10084
- }
10085
- return min;
10086
10088
  }
10087
- function getSupportLevel(stream4) {
10088
- const level = supportsColor(stream4);
10089
- return translateLevel(level);
10089
+ }
10090
+ if (/-256(color)?$/i.test(env.TERM)) {
10091
+ return 2;
10092
+ }
10093
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
10094
+ return 1;
10095
+ }
10096
+ if ("COLORTERM" in env) {
10097
+ return 1;
10098
+ }
10099
+ return min;
10100
+ }
10101
+ function createSupportsColor(stream4, options = {}) {
10102
+ const level = _supportsColor(stream4, {
10103
+ streamIsTTY: stream4 && stream4.isTTY,
10104
+ ...options
10105
+ });
10106
+ return translateLevel(level);
10107
+ }
10108
+ var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
10109
+ var init_supports_color = __esm({
10110
+ "../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js"() {
10111
+ "use strict";
10112
+ import_node_process = __toESM(require("process"));
10113
+ import_node_os = __toESM(require("os"));
10114
+ import_node_tty = __toESM(require("tty"));
10115
+ ({ env } = import_node_process.default);
10116
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
10117
+ flagForceColor = 0;
10118
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
10119
+ flagForceColor = 1;
10090
10120
  }
10091
- module2.exports = {
10092
- supportsColor: getSupportLevel,
10093
- stdout: getSupportLevel(process.stdout),
10094
- stderr: getSupportLevel(process.stderr)
10121
+ supportsColor = {
10122
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
10123
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
10095
10124
  };
10125
+ supports_color_default = supportsColor;
10096
10126
  }
10097
10127
  });
10098
10128
 
10099
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js
10129
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js
10100
10130
  var require_node = __commonJS({
10101
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js"(exports, module2) {
10131
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js"(exports, module2) {
10102
10132
  "use strict";
10103
- var tty = require("tty");
10133
+ var tty2 = require("tty");
10104
10134
  var util2 = require("util");
10105
10135
  exports.init = init;
10106
10136
  exports.log = log;
@@ -10115,8 +10145,8 @@ var require_node = __commonJS({
10115
10145
  );
10116
10146
  exports.colors = [6, 2, 3, 4, 5, 1];
10117
10147
  try {
10118
- const supportsColor = require_supports_color();
10119
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
10148
+ const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
10149
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
10120
10150
  exports.colors = [
10121
10151
  20,
10122
10152
  21,
@@ -10218,7 +10248,7 @@ var require_node = __commonJS({
10218
10248
  return obj;
10219
10249
  }, {});
10220
10250
  function useColors() {
10221
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
10251
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
10222
10252
  }
10223
10253
  function formatArgs(args) {
10224
10254
  const { namespace: name, useColors: useColors2 } = this;
@@ -10271,9 +10301,9 @@ var require_node = __commonJS({
10271
10301
  }
10272
10302
  });
10273
10303
 
10274
- // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js
10304
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js
10275
10305
  var require_src = __commonJS({
10276
- "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js"(exports, module2) {
10306
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js"(exports, module2) {
10277
10307
  "use strict";
10278
10308
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
10279
10309
  module2.exports = require_browser();
@@ -18504,15 +18534,15 @@ var require_runtime = __commonJS({
18504
18534
  throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + compilerInfo[1] + ").");
18505
18535
  }
18506
18536
  }
18507
- function template(templateSpec, env) {
18508
- if (!env) {
18537
+ function template(templateSpec, env2) {
18538
+ if (!env2) {
18509
18539
  throw new _exception2["default"]("No environment passed to template");
18510
18540
  }
18511
18541
  if (!templateSpec || !templateSpec.main) {
18512
18542
  throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
18513
18543
  }
18514
18544
  templateSpec.main.decorator = templateSpec.main_d;
18515
- env.VM.checkRevision(templateSpec.compiler);
18545
+ env2.VM.checkRevision(templateSpec.compiler);
18516
18546
  var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
18517
18547
  function invokePartialWrapper(partial, context, options) {
18518
18548
  if (options.hash) {
@@ -18521,14 +18551,14 @@ var require_runtime = __commonJS({
18521
18551
  options.ids[0] = true;
18522
18552
  }
18523
18553
  }
18524
- partial = env.VM.resolvePartial.call(this, partial, context, options);
18554
+ partial = env2.VM.resolvePartial.call(this, partial, context, options);
18525
18555
  var extendedOptions = Utils.extend({}, options, {
18526
18556
  hooks: this.hooks,
18527
18557
  protoAccessControl: this.protoAccessControl
18528
18558
  });
18529
- var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
18530
- if (result == null && env.compile) {
18531
- options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
18559
+ var result = env2.VM.invokePartial.call(this, partial, context, extendedOptions);
18560
+ if (result == null && env2.compile) {
18561
+ options.partials[options.name] = env2.compile(partial, templateSpec.compilerOptions, env2);
18532
18562
  result = options.partials[options.name](context, extendedOptions);
18533
18563
  }
18534
18564
  if (result != null) {
@@ -18613,7 +18643,7 @@ var require_runtime = __commonJS({
18613
18643
  },
18614
18644
  // An empty object to use as replacement for null-contexts
18615
18645
  nullContext: Object.seal({}),
18616
- noop: env.VM.noop,
18646
+ noop: env2.VM.noop,
18617
18647
  compilerInfo: templateSpec.compiler
18618
18648
  };
18619
18649
  function ret(context) {
@@ -18640,14 +18670,14 @@ var require_runtime = __commonJS({
18640
18670
  ret.isTop = true;
18641
18671
  ret._setup = function(options) {
18642
18672
  if (!options.partial) {
18643
- var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
18673
+ var mergedHelpers = Utils.extend({}, env2.helpers, options.helpers);
18644
18674
  wrapHelpersToPassLookupProperty(mergedHelpers, container);
18645
18675
  container.helpers = mergedHelpers;
18646
18676
  if (templateSpec.usePartial) {
18647
- container.partials = container.mergeIfNeeded(options.partials, env.partials);
18677
+ container.partials = container.mergeIfNeeded(options.partials, env2.partials);
18648
18678
  }
18649
18679
  if (templateSpec.usePartial || templateSpec.useDecorators) {
18650
- container.decorators = Utils.extend({}, env.decorators, options.decorators);
18680
+ container.decorators = Utils.extend({}, env2.decorators, options.decorators);
18651
18681
  }
18652
18682
  container.hooks = {};
18653
18683
  container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
@@ -20449,7 +20479,7 @@ var require_compiler = __commonJS({
20449
20479
  }
20450
20480
  }
20451
20481
  };
20452
- function precompile(input, options, env) {
20482
+ function precompile(input, options, env2) {
20453
20483
  if (input == null || typeof input !== "string" && input.type !== "Program") {
20454
20484
  throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
20455
20485
  }
@@ -20460,10 +20490,10 @@ var require_compiler = __commonJS({
20460
20490
  if (options.compat) {
20461
20491
  options.useDepths = true;
20462
20492
  }
20463
- var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options);
20464
- return new env.JavaScriptCompiler().compile(environment, options);
20493
+ var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options);
20494
+ return new env2.JavaScriptCompiler().compile(environment, options);
20465
20495
  }
20466
- function compile3(input, options, env) {
20496
+ function compile3(input, options, env2) {
20467
20497
  if (options === void 0)
20468
20498
  options = {};
20469
20499
  if (input == null || typeof input !== "string" && input.type !== "Program") {
@@ -20478,8 +20508,8 @@ var require_compiler = __commonJS({
20478
20508
  }
20479
20509
  var compiled = void 0;
20480
20510
  function compileInput() {
20481
- var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options), templateSpec = new env.JavaScriptCompiler().compile(environment, options, void 0, true);
20482
- return env.template(templateSpec);
20511
+ var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options), templateSpec = new env2.JavaScriptCompiler().compile(environment, options, void 0, true);
20512
+ return env2.template(templateSpec);
20483
20513
  }
20484
20514
  function ret(context, execOptions) {
20485
20515
  if (!compiled) {
@@ -24686,13 +24716,13 @@ var require_chalk = __commonJS({
24686
24716
  c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
24687
24717
  }
24688
24718
  }
24689
- function translateLevel(e3) {
24719
+ function translateLevel2(e3) {
24690
24720
  if (e3 === 0) {
24691
24721
  return false;
24692
24722
  }
24693
24723
  return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
24694
24724
  }
24695
- function supportsColor(e3, t3) {
24725
+ function supportsColor2(e3, t3) {
24696
24726
  if (c === 0) {
24697
24727
  return 0;
24698
24728
  }
@@ -24749,10 +24779,10 @@ var require_chalk = __commonJS({
24749
24779
  return n3;
24750
24780
  }
24751
24781
  function getSupportLevel(e3) {
24752
- const t3 = supportsColor(e3, e3 && e3.isTTY);
24753
- return translateLevel(t3);
24782
+ const t3 = supportsColor2(e3, e3 && e3.isTTY);
24783
+ return translateLevel2(t3);
24754
24784
  }
24755
- e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, s.isatty(1))), stderr: translateLevel(supportsColor(true, s.isatty(2))) };
24785
+ e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, s.isatty(1))), stderr: translateLevel2(supportsColor2(true, s.isatty(2))) };
24756
24786
  }, 37: (e2) => {
24757
24787
  "use strict";
24758
24788
  e2.exports = require("os");
@@ -29678,7 +29708,7 @@ var require_innerFrom = __commonJS({
29678
29708
  exports.fromIterable = fromIterable;
29679
29709
  function fromAsyncIterable(asyncIterable) {
29680
29710
  return new Observable_1.Observable(function(subscriber) {
29681
- process2(asyncIterable, subscriber).catch(function(err) {
29711
+ process3(asyncIterable, subscriber).catch(function(err) {
29682
29712
  return subscriber.error(err);
29683
29713
  });
29684
29714
  });
@@ -29688,7 +29718,7 @@ var require_innerFrom = __commonJS({
29688
29718
  return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
29689
29719
  }
29690
29720
  exports.fromReadableStreamLike = fromReadableStreamLike;
29691
- function process2(asyncIterable, subscriber) {
29721
+ function process3(asyncIterable, subscriber) {
29692
29722
  var asyncIterable_1, asyncIterable_1_1;
29693
29723
  var e_2, _a2;
29694
29724
  return __awaiter6(this, void 0, void 0, function() {
@@ -36969,11 +36999,11 @@ var require_signals = __commonJS({
36969
36999
  var require_signal_exit = __commonJS({
36970
37000
  "../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
36971
37001
  "use strict";
36972
- var process2 = global.process;
36973
- var processOk = function(process3) {
36974
- return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
37002
+ var process3 = global.process;
37003
+ var processOk = function(process4) {
37004
+ return process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
36975
37005
  };
36976
- if (!processOk(process2)) {
37006
+ if (!processOk(process3)) {
36977
37007
  module2.exports = function() {
36978
37008
  return function() {
36979
37009
  };
@@ -36981,15 +37011,15 @@ var require_signal_exit = __commonJS({
36981
37011
  } else {
36982
37012
  assert = require("assert");
36983
37013
  signals = require_signals();
36984
- isWin = /^win/i.test(process2.platform);
37014
+ isWin = /^win/i.test(process3.platform);
36985
37015
  EE = require("events");
36986
37016
  if (typeof EE !== "function") {
36987
37017
  EE = EE.EventEmitter;
36988
37018
  }
36989
- if (process2.__signal_exit_emitter__) {
36990
- emitter = process2.__signal_exit_emitter__;
37019
+ if (process3.__signal_exit_emitter__) {
37020
+ emitter = process3.__signal_exit_emitter__;
36991
37021
  } else {
36992
- emitter = process2.__signal_exit_emitter__ = new EE();
37022
+ emitter = process3.__signal_exit_emitter__ = new EE();
36993
37023
  emitter.count = 0;
36994
37024
  emitter.emitted = {};
36995
37025
  }
@@ -37026,12 +37056,12 @@ var require_signal_exit = __commonJS({
37026
37056
  loaded = false;
37027
37057
  signals.forEach(function(sig) {
37028
37058
  try {
37029
- process2.removeListener(sig, sigListeners[sig]);
37059
+ process3.removeListener(sig, sigListeners[sig]);
37030
37060
  } catch (er) {
37031
37061
  }
37032
37062
  });
37033
- process2.emit = originalProcessEmit;
37034
- process2.reallyExit = originalProcessReallyExit;
37063
+ process3.emit = originalProcessEmit;
37064
+ process3.reallyExit = originalProcessReallyExit;
37035
37065
  emitter.count -= 1;
37036
37066
  };
37037
37067
  module2.exports.unload = unload;
@@ -37048,7 +37078,7 @@ var require_signal_exit = __commonJS({
37048
37078
  if (!processOk(global.process)) {
37049
37079
  return;
37050
37080
  }
37051
- var listeners = process2.listeners(sig);
37081
+ var listeners = process3.listeners(sig);
37052
37082
  if (listeners.length === emitter.count) {
37053
37083
  unload();
37054
37084
  emit("exit", null, sig);
@@ -37056,7 +37086,7 @@ var require_signal_exit = __commonJS({
37056
37086
  if (isWin && sig === "SIGHUP") {
37057
37087
  sig = "SIGINT";
37058
37088
  }
37059
- process2.kill(process2.pid, sig);
37089
+ process3.kill(process3.pid, sig);
37060
37090
  }
37061
37091
  };
37062
37092
  });
@@ -37072,36 +37102,36 @@ var require_signal_exit = __commonJS({
37072
37102
  emitter.count += 1;
37073
37103
  signals = signals.filter(function(sig) {
37074
37104
  try {
37075
- process2.on(sig, sigListeners[sig]);
37105
+ process3.on(sig, sigListeners[sig]);
37076
37106
  return true;
37077
37107
  } catch (er) {
37078
37108
  return false;
37079
37109
  }
37080
37110
  });
37081
- process2.emit = processEmit;
37082
- process2.reallyExit = processReallyExit;
37111
+ process3.emit = processEmit;
37112
+ process3.reallyExit = processReallyExit;
37083
37113
  };
37084
37114
  module2.exports.load = load;
37085
- originalProcessReallyExit = process2.reallyExit;
37115
+ originalProcessReallyExit = process3.reallyExit;
37086
37116
  processReallyExit = function processReallyExit2(code) {
37087
37117
  if (!processOk(global.process)) {
37088
37118
  return;
37089
37119
  }
37090
- process2.exitCode = code || /* istanbul ignore next */
37120
+ process3.exitCode = code || /* istanbul ignore next */
37091
37121
  0;
37092
- emit("exit", process2.exitCode, null);
37093
- emit("afterexit", process2.exitCode, null);
37094
- originalProcessReallyExit.call(process2, process2.exitCode);
37122
+ emit("exit", process3.exitCode, null);
37123
+ emit("afterexit", process3.exitCode, null);
37124
+ originalProcessReallyExit.call(process3, process3.exitCode);
37095
37125
  };
37096
- originalProcessEmit = process2.emit;
37126
+ originalProcessEmit = process3.emit;
37097
37127
  processEmit = function processEmit2(ev, arg) {
37098
37128
  if (ev === "exit" && processOk(global.process)) {
37099
37129
  if (arg !== void 0) {
37100
- process2.exitCode = arg;
37130
+ process3.exitCode = arg;
37101
37131
  }
37102
37132
  var ret = originalProcessEmit.apply(this, arguments);
37103
- emit("exit", process2.exitCode, null);
37104
- emit("afterexit", process2.exitCode, null);
37133
+ emit("exit", process3.exitCode, null);
37134
+ emit("afterexit", process3.exitCode, null);
37105
37135
  return ret;
37106
37136
  } else {
37107
37137
  return originalProcessEmit.apply(this, arguments);
@@ -83597,9 +83627,9 @@ var BooleanConfig;
83597
83627
 
83598
83628
  // ../../generator-common/dist/esm-node/common/solution.js
83599
83629
  var Solution;
83600
- (function(Solution22) {
83601
- Solution22["MWA"] = "mwa";
83602
- Solution22["Module"] = "module";
83630
+ (function(Solution2) {
83631
+ Solution2["MWA"] = "mwa";
83632
+ Solution2["Module"] = "module";
83603
83633
  })(Solution || (Solution = {}));
83604
83634
  var SolutionText = {
83605
83635
  ["mwa"]: () => i18n2.t(localeKeys2.solution.mwa),
@@ -83638,7 +83668,8 @@ var getSolutionSchema = (extra = {}) => {
83638
83668
  };
83639
83669
  };
83640
83670
  var getScenesSchema = (extra = {}) => {
83641
- const hasPlugin = (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[extra === null || extra === void 0 ? void 0 : extra.solution] && extra.customPlugin[extra === null || extra === void 0 ? void 0 : extra.solution].length > 0;
83671
+ var _extra_customPlugin;
83672
+ const hasPlugin = (extra === null || extra === void 0 ? void 0 : (_extra_customPlugin = extra.customPlugin) === null || _extra_customPlugin === void 0 ? void 0 : _extra_customPlugin[extra === null || extra === void 0 ? void 0 : extra.solution]) && extra.customPlugin[extra === null || extra === void 0 ? void 0 : extra.solution].length > 0;
83642
83673
  return {
83643
83674
  type: "object",
83644
83675
  properties: hasPlugin ? {
@@ -83748,7 +83779,7 @@ var getPackageNameSchema = (extra = {}) => {
83748
83779
  };
83749
83780
 
83750
83781
  // ../../generator-common/dist/esm-node/common/packagePath.js
83751
- var PackagePathRegex = new RegExp("^[a-z0-9-_]+[a-z0-9-/_]*$");
83782
+ var PackagePathRegex = /^[a-z0-9-_]+[a-z0-9-\/_]*$/;
83752
83783
  var getPackagePathSchema = (extra) => {
83753
83784
  return {
83754
83785
  type: "string",
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20240818170637",
18
+ "version": "0.0.0-nightly-20240819170736",
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": "0.0.0-nightly-20240818170637"
26
+ "@modern-js/utils": "0.0.0-nightly-20240819170736"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@modern-js/codesmith": "2.4.0",
@@ -32,14 +32,14 @@
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/base-generator": "0.0.0-nightly-20240818170637",
36
- "@modern-js/generator-common": "0.0.0-nightly-20240818170637",
37
- "@modern-js/generator-plugin": "0.0.0-nightly-20240818170637",
38
- "@modern-js/generator-utils": "0.0.0-nightly-20240818170637",
39
- "@modern-js/module-generator": "0.0.0-nightly-20240818170637",
40
- "@modern-js/mwa-generator": "0.0.0-nightly-20240818170637",
41
- "@scripts/build": "0.0.0-nightly-20240818170637",
42
- "@scripts/jest-config": "0.0.0-nightly-20240818170637"
35
+ "@modern-js/base-generator": "0.0.0-nightly-20240819170736",
36
+ "@modern-js/generator-utils": "0.0.0-nightly-20240819170736",
37
+ "@modern-js/module-generator": "0.0.0-nightly-20240819170736",
38
+ "@modern-js/mwa-generator": "0.0.0-nightly-20240819170736",
39
+ "@modern-js/generator-common": "0.0.0-nightly-20240819170736",
40
+ "@modern-js/generator-plugin": "0.0.0-nightly-20240819170736",
41
+ "@scripts/jest-config": "0.0.0-nightly-20240819170736",
42
+ "@scripts/build": "0.0.0-nightly-20240819170736"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {
package/src/index.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { merge } from '@modern-js/utils/lodash';
2
- import { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
2
+ import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
3
3
  import { AppAPI } from '@modern-js/codesmith-api-app';
4
4
  import {
5
5
  i18n,
6
6
  getSolutionSchema,
7
7
  SolutionGenerator,
8
- Solution,
8
+ type Solution,
9
9
  SolutionDefaultConfig,
10
10
  BaseGenerator,
11
11
  getScenesSchema,