@modern-js/packages-generator 3.4.15 → 3.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +218 -188
- package/package.json +9 -9
- package/src/index.ts +1 -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
|
};
|
|
@@ -1569,15 +1572,15 @@ var require_runtime = __commonJS({
|
|
|
1569
1572
|
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] + ").");
|
|
1570
1573
|
}
|
|
1571
1574
|
}
|
|
1572
|
-
function template(templateSpec,
|
|
1573
|
-
if (!
|
|
1575
|
+
function template(templateSpec, env2) {
|
|
1576
|
+
if (!env2) {
|
|
1574
1577
|
throw new _exception2["default"]("No environment passed to template");
|
|
1575
1578
|
}
|
|
1576
1579
|
if (!templateSpec || !templateSpec.main) {
|
|
1577
1580
|
throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
|
|
1578
1581
|
}
|
|
1579
1582
|
templateSpec.main.decorator = templateSpec.main_d;
|
|
1580
|
-
|
|
1583
|
+
env2.VM.checkRevision(templateSpec.compiler);
|
|
1581
1584
|
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
|
1582
1585
|
function invokePartialWrapper(partial, context, options) {
|
|
1583
1586
|
if (options.hash) {
|
|
@@ -1586,14 +1589,14 @@ var require_runtime = __commonJS({
|
|
|
1586
1589
|
options.ids[0] = true;
|
|
1587
1590
|
}
|
|
1588
1591
|
}
|
|
1589
|
-
partial =
|
|
1592
|
+
partial = env2.VM.resolvePartial.call(this, partial, context, options);
|
|
1590
1593
|
var extendedOptions = Utils.extend({}, options, {
|
|
1591
1594
|
hooks: this.hooks,
|
|
1592
1595
|
protoAccessControl: this.protoAccessControl
|
|
1593
1596
|
});
|
|
1594
|
-
var result =
|
|
1595
|
-
if (result == null &&
|
|
1596
|
-
options.partials[options.name] =
|
|
1597
|
+
var result = env2.VM.invokePartial.call(this, partial, context, extendedOptions);
|
|
1598
|
+
if (result == null && env2.compile) {
|
|
1599
|
+
options.partials[options.name] = env2.compile(partial, templateSpec.compilerOptions, env2);
|
|
1597
1600
|
result = options.partials[options.name](context, extendedOptions);
|
|
1598
1601
|
}
|
|
1599
1602
|
if (result != null) {
|
|
@@ -1678,7 +1681,7 @@ var require_runtime = __commonJS({
|
|
|
1678
1681
|
},
|
|
1679
1682
|
// An empty object to use as replacement for null-contexts
|
|
1680
1683
|
nullContext: Object.seal({}),
|
|
1681
|
-
noop:
|
|
1684
|
+
noop: env2.VM.noop,
|
|
1682
1685
|
compilerInfo: templateSpec.compiler
|
|
1683
1686
|
};
|
|
1684
1687
|
function ret(context) {
|
|
@@ -1705,14 +1708,14 @@ var require_runtime = __commonJS({
|
|
|
1705
1708
|
ret.isTop = true;
|
|
1706
1709
|
ret._setup = function(options) {
|
|
1707
1710
|
if (!options.partial) {
|
|
1708
|
-
var mergedHelpers = Utils.extend({},
|
|
1711
|
+
var mergedHelpers = Utils.extend({}, env2.helpers, options.helpers);
|
|
1709
1712
|
wrapHelpersToPassLookupProperty(mergedHelpers, container);
|
|
1710
1713
|
container.helpers = mergedHelpers;
|
|
1711
1714
|
if (templateSpec.usePartial) {
|
|
1712
|
-
container.partials = container.mergeIfNeeded(options.partials,
|
|
1715
|
+
container.partials = container.mergeIfNeeded(options.partials, env2.partials);
|
|
1713
1716
|
}
|
|
1714
1717
|
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
|
1715
|
-
container.decorators = Utils.extend({},
|
|
1718
|
+
container.decorators = Utils.extend({}, env2.decorators, options.decorators);
|
|
1716
1719
|
}
|
|
1717
1720
|
container.hooks = {};
|
|
1718
1721
|
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
|
@@ -3514,7 +3517,7 @@ var require_compiler = __commonJS({
|
|
|
3514
3517
|
}
|
|
3515
3518
|
}
|
|
3516
3519
|
};
|
|
3517
|
-
function precompile(input, options,
|
|
3520
|
+
function precompile(input, options, env2) {
|
|
3518
3521
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
|
3519
3522
|
throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
|
|
3520
3523
|
}
|
|
@@ -3525,10 +3528,10 @@ var require_compiler = __commonJS({
|
|
|
3525
3528
|
if (options.compat) {
|
|
3526
3529
|
options.useDepths = true;
|
|
3527
3530
|
}
|
|
3528
|
-
var ast =
|
|
3529
|
-
return new
|
|
3531
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options);
|
|
3532
|
+
return new env2.JavaScriptCompiler().compile(environment, options);
|
|
3530
3533
|
}
|
|
3531
|
-
function compile2(input, options,
|
|
3534
|
+
function compile2(input, options, env2) {
|
|
3532
3535
|
if (options === void 0)
|
|
3533
3536
|
options = {};
|
|
3534
3537
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
|
@@ -3543,8 +3546,8 @@ var require_compiler = __commonJS({
|
|
|
3543
3546
|
}
|
|
3544
3547
|
var compiled = void 0;
|
|
3545
3548
|
function compileInput() {
|
|
3546
|
-
var ast =
|
|
3547
|
-
return
|
|
3549
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options), templateSpec = new env2.JavaScriptCompiler().compile(environment, options, void 0, true);
|
|
3550
|
+
return env2.template(templateSpec);
|
|
3548
3551
|
}
|
|
3549
3552
|
function ret(context, execOptions) {
|
|
3550
3553
|
if (!compiled) {
|
|
@@ -6620,9 +6623,9 @@ var require_lib = __commonJS({
|
|
|
6620
6623
|
}
|
|
6621
6624
|
});
|
|
6622
6625
|
|
|
6623
|
-
// ../../../../node_modules/.pnpm/@modern-js+utils@2.58.
|
|
6626
|
+
// ../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
|
|
6624
6627
|
var require_chalk = __commonJS({
|
|
6625
|
-
"../../../../node_modules/.pnpm/@modern-js+utils@2.58.
|
|
6628
|
+
"../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
|
|
6626
6629
|
"use strict";
|
|
6627
6630
|
(() => {
|
|
6628
6631
|
var e = { 44: (e2, t2, n2) => {
|
|
@@ -7751,13 +7754,13 @@ var require_chalk = __commonJS({
|
|
|
7751
7754
|
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
|
7752
7755
|
}
|
|
7753
7756
|
}
|
|
7754
|
-
function
|
|
7757
|
+
function translateLevel2(e3) {
|
|
7755
7758
|
if (e3 === 0) {
|
|
7756
7759
|
return false;
|
|
7757
7760
|
}
|
|
7758
7761
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
7759
7762
|
}
|
|
7760
|
-
function
|
|
7763
|
+
function supportsColor2(e3, t3) {
|
|
7761
7764
|
if (c === 0) {
|
|
7762
7765
|
return 0;
|
|
7763
7766
|
}
|
|
@@ -7814,10 +7817,10 @@ var require_chalk = __commonJS({
|
|
|
7814
7817
|
return n3;
|
|
7815
7818
|
}
|
|
7816
7819
|
function getSupportLevel(e3) {
|
|
7817
|
-
const t3 =
|
|
7818
|
-
return
|
|
7820
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
|
7821
|
+
return translateLevel2(t3);
|
|
7819
7822
|
}
|
|
7820
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
|
7823
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, s.isatty(1))), stderr: translateLevel2(supportsColor2(true, s.isatty(2))) };
|
|
7821
7824
|
}, 37: (e2) => {
|
|
7822
7825
|
"use strict";
|
|
7823
7826
|
e2.exports = require("os");
|
|
@@ -12743,7 +12746,7 @@ var require_innerFrom = __commonJS({
|
|
|
12743
12746
|
exports.fromIterable = fromIterable;
|
|
12744
12747
|
function fromAsyncIterable(asyncIterable) {
|
|
12745
12748
|
return new Observable_1.Observable(function(subscriber) {
|
|
12746
|
-
|
|
12749
|
+
process3(asyncIterable, subscriber).catch(function(err) {
|
|
12747
12750
|
return subscriber.error(err);
|
|
12748
12751
|
});
|
|
12749
12752
|
});
|
|
@@ -12753,7 +12756,7 @@ var require_innerFrom = __commonJS({
|
|
|
12753
12756
|
return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
|
|
12754
12757
|
}
|
|
12755
12758
|
exports.fromReadableStreamLike = fromReadableStreamLike;
|
|
12756
|
-
function
|
|
12759
|
+
function process3(asyncIterable, subscriber) {
|
|
12757
12760
|
var asyncIterable_1, asyncIterable_1_1;
|
|
12758
12761
|
var e_2, _a2;
|
|
12759
12762
|
return __awaiter6(this, void 0, void 0, function() {
|
|
@@ -20034,11 +20037,11 @@ var require_signals = __commonJS({
|
|
|
20034
20037
|
var require_signal_exit = __commonJS({
|
|
20035
20038
|
"../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
20036
20039
|
"use strict";
|
|
20037
|
-
var
|
|
20038
|
-
var processOk = function(
|
|
20039
|
-
return
|
|
20040
|
+
var process3 = global.process;
|
|
20041
|
+
var processOk = function(process4) {
|
|
20042
|
+
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";
|
|
20040
20043
|
};
|
|
20041
|
-
if (!processOk(
|
|
20044
|
+
if (!processOk(process3)) {
|
|
20042
20045
|
module2.exports = function() {
|
|
20043
20046
|
return function() {
|
|
20044
20047
|
};
|
|
@@ -20046,15 +20049,15 @@ var require_signal_exit = __commonJS({
|
|
|
20046
20049
|
} else {
|
|
20047
20050
|
assert = require("assert");
|
|
20048
20051
|
signals = require_signals();
|
|
20049
|
-
isWin = /^win/i.test(
|
|
20052
|
+
isWin = /^win/i.test(process3.platform);
|
|
20050
20053
|
EE = require("events");
|
|
20051
20054
|
if (typeof EE !== "function") {
|
|
20052
20055
|
EE = EE.EventEmitter;
|
|
20053
20056
|
}
|
|
20054
|
-
if (
|
|
20055
|
-
emitter =
|
|
20057
|
+
if (process3.__signal_exit_emitter__) {
|
|
20058
|
+
emitter = process3.__signal_exit_emitter__;
|
|
20056
20059
|
} else {
|
|
20057
|
-
emitter =
|
|
20060
|
+
emitter = process3.__signal_exit_emitter__ = new EE();
|
|
20058
20061
|
emitter.count = 0;
|
|
20059
20062
|
emitter.emitted = {};
|
|
20060
20063
|
}
|
|
@@ -20091,12 +20094,12 @@ var require_signal_exit = __commonJS({
|
|
|
20091
20094
|
loaded = false;
|
|
20092
20095
|
signals.forEach(function(sig) {
|
|
20093
20096
|
try {
|
|
20094
|
-
|
|
20097
|
+
process3.removeListener(sig, sigListeners[sig]);
|
|
20095
20098
|
} catch (er) {
|
|
20096
20099
|
}
|
|
20097
20100
|
});
|
|
20098
|
-
|
|
20099
|
-
|
|
20101
|
+
process3.emit = originalProcessEmit;
|
|
20102
|
+
process3.reallyExit = originalProcessReallyExit;
|
|
20100
20103
|
emitter.count -= 1;
|
|
20101
20104
|
};
|
|
20102
20105
|
module2.exports.unload = unload;
|
|
@@ -20113,7 +20116,7 @@ var require_signal_exit = __commonJS({
|
|
|
20113
20116
|
if (!processOk(global.process)) {
|
|
20114
20117
|
return;
|
|
20115
20118
|
}
|
|
20116
|
-
var listeners =
|
|
20119
|
+
var listeners = process3.listeners(sig);
|
|
20117
20120
|
if (listeners.length === emitter.count) {
|
|
20118
20121
|
unload();
|
|
20119
20122
|
emit("exit", null, sig);
|
|
@@ -20121,7 +20124,7 @@ var require_signal_exit = __commonJS({
|
|
|
20121
20124
|
if (isWin && sig === "SIGHUP") {
|
|
20122
20125
|
sig = "SIGINT";
|
|
20123
20126
|
}
|
|
20124
|
-
|
|
20127
|
+
process3.kill(process3.pid, sig);
|
|
20125
20128
|
}
|
|
20126
20129
|
};
|
|
20127
20130
|
});
|
|
@@ -20137,36 +20140,36 @@ var require_signal_exit = __commonJS({
|
|
|
20137
20140
|
emitter.count += 1;
|
|
20138
20141
|
signals = signals.filter(function(sig) {
|
|
20139
20142
|
try {
|
|
20140
|
-
|
|
20143
|
+
process3.on(sig, sigListeners[sig]);
|
|
20141
20144
|
return true;
|
|
20142
20145
|
} catch (er) {
|
|
20143
20146
|
return false;
|
|
20144
20147
|
}
|
|
20145
20148
|
});
|
|
20146
|
-
|
|
20147
|
-
|
|
20149
|
+
process3.emit = processEmit;
|
|
20150
|
+
process3.reallyExit = processReallyExit;
|
|
20148
20151
|
};
|
|
20149
20152
|
module2.exports.load = load;
|
|
20150
|
-
originalProcessReallyExit =
|
|
20153
|
+
originalProcessReallyExit = process3.reallyExit;
|
|
20151
20154
|
processReallyExit = function processReallyExit2(code) {
|
|
20152
20155
|
if (!processOk(global.process)) {
|
|
20153
20156
|
return;
|
|
20154
20157
|
}
|
|
20155
|
-
|
|
20158
|
+
process3.exitCode = code || /* istanbul ignore next */
|
|
20156
20159
|
0;
|
|
20157
|
-
emit("exit",
|
|
20158
|
-
emit("afterexit",
|
|
20159
|
-
originalProcessReallyExit.call(
|
|
20160
|
+
emit("exit", process3.exitCode, null);
|
|
20161
|
+
emit("afterexit", process3.exitCode, null);
|
|
20162
|
+
originalProcessReallyExit.call(process3, process3.exitCode);
|
|
20160
20163
|
};
|
|
20161
|
-
originalProcessEmit =
|
|
20164
|
+
originalProcessEmit = process3.emit;
|
|
20162
20165
|
processEmit = function processEmit2(ev, arg) {
|
|
20163
20166
|
if (ev === "exit" && processOk(global.process)) {
|
|
20164
20167
|
if (arg !== void 0) {
|
|
20165
|
-
|
|
20168
|
+
process3.exitCode = arg;
|
|
20166
20169
|
}
|
|
20167
20170
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
20168
|
-
emit("exit",
|
|
20169
|
-
emit("afterexit",
|
|
20171
|
+
emit("exit", process3.exitCode, null);
|
|
20172
|
+
emit("afterexit", process3.exitCode, null);
|
|
20170
20173
|
return ret;
|
|
20171
20174
|
} else {
|
|
20172
20175
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -51165,11 +51168,11 @@ var require_ms = __commonJS({
|
|
|
51165
51168
|
}
|
|
51166
51169
|
});
|
|
51167
51170
|
|
|
51168
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51171
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js
|
|
51169
51172
|
var require_common2 = __commonJS({
|
|
51170
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51173
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js"(exports, module2) {
|
|
51171
51174
|
"use strict";
|
|
51172
|
-
function setup(
|
|
51175
|
+
function setup(env2) {
|
|
51173
51176
|
createDebug.debug = createDebug;
|
|
51174
51177
|
createDebug.default = createDebug;
|
|
51175
51178
|
createDebug.coerce = coerce;
|
|
@@ -51178,8 +51181,8 @@ var require_common2 = __commonJS({
|
|
|
51178
51181
|
createDebug.enabled = enabled;
|
|
51179
51182
|
createDebug.humanize = require_ms();
|
|
51180
51183
|
createDebug.destroy = destroy2;
|
|
51181
|
-
Object.keys(
|
|
51182
|
-
createDebug[key] =
|
|
51184
|
+
Object.keys(env2).forEach((key) => {
|
|
51185
|
+
createDebug[key] = env2[key];
|
|
51183
51186
|
});
|
|
51184
51187
|
createDebug.names = [];
|
|
51185
51188
|
createDebug.skips = [];
|
|
@@ -51329,9 +51332,9 @@ var require_common2 = __commonJS({
|
|
|
51329
51332
|
}
|
|
51330
51333
|
});
|
|
51331
51334
|
|
|
51332
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51335
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js
|
|
51333
51336
|
var require_browser = __commonJS({
|
|
51334
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51337
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js"(exports, module2) {
|
|
51335
51338
|
"use strict";
|
|
51336
51339
|
exports.formatArgs = formatArgs;
|
|
51337
51340
|
exports.save = save;
|
|
@@ -51499,120 +51502,147 @@ var require_browser = __commonJS({
|
|
|
51499
51502
|
}
|
|
51500
51503
|
});
|
|
51501
51504
|
|
|
51502
|
-
// ../../../../node_modules/.pnpm/
|
|
51503
|
-
var
|
|
51504
|
-
|
|
51505
|
-
|
|
51506
|
-
|
|
51507
|
-
argv = argv || process.argv;
|
|
51508
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
51509
|
-
const pos = argv.indexOf(prefix + flag);
|
|
51510
|
-
const terminatorPos = argv.indexOf("--");
|
|
51511
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
51512
|
-
};
|
|
51513
|
-
}
|
|
51505
|
+
// ../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js
|
|
51506
|
+
var supports_color_exports = {};
|
|
51507
|
+
__export(supports_color_exports, {
|
|
51508
|
+
createSupportsColor: () => createSupportsColor,
|
|
51509
|
+
default: () => supports_color_default
|
|
51514
51510
|
});
|
|
51515
|
-
|
|
51516
|
-
|
|
51517
|
-
|
|
51518
|
-
|
|
51519
|
-
|
|
51520
|
-
|
|
51521
|
-
|
|
51522
|
-
|
|
51523
|
-
|
|
51524
|
-
|
|
51525
|
-
forceColor = false;
|
|
51526
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
51527
|
-
forceColor = true;
|
|
51511
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
51512
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
51513
|
+
const position = argv.indexOf(prefix + flag);
|
|
51514
|
+
const terminatorPosition = argv.indexOf("--");
|
|
51515
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
51516
|
+
}
|
|
51517
|
+
function envForceColor() {
|
|
51518
|
+
if ("FORCE_COLOR" in env) {
|
|
51519
|
+
if (env.FORCE_COLOR === "true") {
|
|
51520
|
+
return 1;
|
|
51528
51521
|
}
|
|
51529
|
-
if (
|
|
51530
|
-
|
|
51522
|
+
if (env.FORCE_COLOR === "false") {
|
|
51523
|
+
return 0;
|
|
51531
51524
|
}
|
|
51532
|
-
|
|
51533
|
-
|
|
51534
|
-
|
|
51535
|
-
|
|
51536
|
-
|
|
51537
|
-
|
|
51538
|
-
|
|
51539
|
-
|
|
51540
|
-
|
|
51541
|
-
|
|
51525
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
51526
|
+
}
|
|
51527
|
+
}
|
|
51528
|
+
function translateLevel(level) {
|
|
51529
|
+
if (level === 0) {
|
|
51530
|
+
return false;
|
|
51531
|
+
}
|
|
51532
|
+
return {
|
|
51533
|
+
level,
|
|
51534
|
+
hasBasic: true,
|
|
51535
|
+
has256: level >= 2,
|
|
51536
|
+
has16m: level >= 3
|
|
51537
|
+
};
|
|
51538
|
+
}
|
|
51539
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
51540
|
+
const noFlagForceColor = envForceColor();
|
|
51541
|
+
if (noFlagForceColor !== void 0) {
|
|
51542
|
+
flagForceColor = noFlagForceColor;
|
|
51543
|
+
}
|
|
51544
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
51545
|
+
if (forceColor === 0) {
|
|
51546
|
+
return 0;
|
|
51547
|
+
}
|
|
51548
|
+
if (sniffFlags) {
|
|
51549
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
51550
|
+
return 3;
|
|
51542
51551
|
}
|
|
51543
|
-
|
|
51544
|
-
|
|
51545
|
-
|
|
51546
|
-
|
|
51547
|
-
|
|
51548
|
-
|
|
51549
|
-
|
|
51550
|
-
|
|
51551
|
-
|
|
51552
|
-
|
|
51553
|
-
|
|
51554
|
-
|
|
51555
|
-
|
|
51556
|
-
|
|
51557
|
-
|
|
51558
|
-
|
|
51559
|
-
|
|
51560
|
-
|
|
51561
|
-
|
|
51562
|
-
|
|
51563
|
-
|
|
51564
|
-
|
|
51565
|
-
|
|
51566
|
-
|
|
51567
|
-
|
|
51568
|
-
|
|
51569
|
-
|
|
51570
|
-
|
|
51571
|
-
|
|
51572
|
-
|
|
51573
|
-
|
|
51574
|
-
|
|
51575
|
-
|
|
51576
|
-
|
|
51577
|
-
|
|
51578
|
-
|
|
51579
|
-
|
|
51580
|
-
|
|
51581
|
-
|
|
51582
|
-
|
|
51583
|
-
|
|
51552
|
+
if (hasFlag("color=256")) {
|
|
51553
|
+
return 2;
|
|
51554
|
+
}
|
|
51555
|
+
}
|
|
51556
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
51557
|
+
return 1;
|
|
51558
|
+
}
|
|
51559
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
51560
|
+
return 0;
|
|
51561
|
+
}
|
|
51562
|
+
const min = forceColor || 0;
|
|
51563
|
+
if (env.TERM === "dumb") {
|
|
51564
|
+
return min;
|
|
51565
|
+
}
|
|
51566
|
+
if (import_node_process.default.platform === "win32") {
|
|
51567
|
+
const osRelease = import_node_os.default.release().split(".");
|
|
51568
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
51569
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
51570
|
+
}
|
|
51571
|
+
return 1;
|
|
51572
|
+
}
|
|
51573
|
+
if ("CI" in env) {
|
|
51574
|
+
if ("GITHUB_ACTIONS" in env) {
|
|
51575
|
+
return 3;
|
|
51576
|
+
}
|
|
51577
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
51578
|
+
return 1;
|
|
51579
|
+
}
|
|
51580
|
+
return min;
|
|
51581
|
+
}
|
|
51582
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
51583
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
51584
|
+
}
|
|
51585
|
+
if (env.COLORTERM === "truecolor") {
|
|
51586
|
+
return 3;
|
|
51587
|
+
}
|
|
51588
|
+
if (env.TERM === "xterm-kitty") {
|
|
51589
|
+
return 3;
|
|
51590
|
+
}
|
|
51591
|
+
if ("TERM_PROGRAM" in env) {
|
|
51592
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
51593
|
+
switch (env.TERM_PROGRAM) {
|
|
51594
|
+
case "iTerm.app": {
|
|
51595
|
+
return version >= 3 ? 3 : 2;
|
|
51584
51596
|
}
|
|
51585
|
-
|
|
51597
|
+
case "Apple_Terminal": {
|
|
51586
51598
|
return 2;
|
|
51587
51599
|
}
|
|
51588
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
51589
|
-
return 1;
|
|
51590
|
-
}
|
|
51591
|
-
if ("COLORTERM" in env) {
|
|
51592
|
-
return 1;
|
|
51593
|
-
}
|
|
51594
|
-
if (env.TERM === "dumb") {
|
|
51595
|
-
return min;
|
|
51596
|
-
}
|
|
51597
|
-
return min;
|
|
51598
51600
|
}
|
|
51599
|
-
|
|
51600
|
-
|
|
51601
|
-
|
|
51601
|
+
}
|
|
51602
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
51603
|
+
return 2;
|
|
51604
|
+
}
|
|
51605
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
51606
|
+
return 1;
|
|
51607
|
+
}
|
|
51608
|
+
if ("COLORTERM" in env) {
|
|
51609
|
+
return 1;
|
|
51610
|
+
}
|
|
51611
|
+
return min;
|
|
51612
|
+
}
|
|
51613
|
+
function createSupportsColor(stream, options = {}) {
|
|
51614
|
+
const level = _supportsColor(stream, {
|
|
51615
|
+
streamIsTTY: stream && stream.isTTY,
|
|
51616
|
+
...options
|
|
51617
|
+
});
|
|
51618
|
+
return translateLevel(level);
|
|
51619
|
+
}
|
|
51620
|
+
var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
|
|
51621
|
+
var init_supports_color = __esm({
|
|
51622
|
+
"../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js"() {
|
|
51623
|
+
"use strict";
|
|
51624
|
+
import_node_process = __toESM(require("process"));
|
|
51625
|
+
import_node_os = __toESM(require("os"));
|
|
51626
|
+
import_node_tty = __toESM(require("tty"));
|
|
51627
|
+
({ env } = import_node_process.default);
|
|
51628
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
51629
|
+
flagForceColor = 0;
|
|
51630
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
51631
|
+
flagForceColor = 1;
|
|
51602
51632
|
}
|
|
51603
|
-
|
|
51604
|
-
|
|
51605
|
-
|
|
51606
|
-
stderr: getSupportLevel(process.stderr)
|
|
51633
|
+
supportsColor = {
|
|
51634
|
+
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
|
51635
|
+
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
|
51607
51636
|
};
|
|
51637
|
+
supports_color_default = supportsColor;
|
|
51608
51638
|
}
|
|
51609
51639
|
});
|
|
51610
51640
|
|
|
51611
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51641
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js
|
|
51612
51642
|
var require_node2 = __commonJS({
|
|
51613
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51643
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js"(exports, module2) {
|
|
51614
51644
|
"use strict";
|
|
51615
|
-
var
|
|
51645
|
+
var tty2 = require("tty");
|
|
51616
51646
|
var util = require("util");
|
|
51617
51647
|
exports.init = init;
|
|
51618
51648
|
exports.log = log;
|
|
@@ -51627,8 +51657,8 @@ var require_node2 = __commonJS({
|
|
|
51627
51657
|
);
|
|
51628
51658
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
51629
51659
|
try {
|
|
51630
|
-
const
|
|
51631
|
-
if (
|
|
51660
|
+
const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
|
|
51661
|
+
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
|
51632
51662
|
exports.colors = [
|
|
51633
51663
|
20,
|
|
51634
51664
|
21,
|
|
@@ -51730,7 +51760,7 @@ var require_node2 = __commonJS({
|
|
|
51730
51760
|
return obj;
|
|
51731
51761
|
}, {});
|
|
51732
51762
|
function useColors() {
|
|
51733
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) :
|
|
51763
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
|
51734
51764
|
}
|
|
51735
51765
|
function formatArgs(args) {
|
|
51736
51766
|
const { namespace: name, useColors: useColors2 } = this;
|
|
@@ -51783,9 +51813,9 @@ var require_node2 = __commonJS({
|
|
|
51783
51813
|
}
|
|
51784
51814
|
});
|
|
51785
51815
|
|
|
51786
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51816
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js
|
|
51787
51817
|
var require_src3 = __commonJS({
|
|
51788
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51818
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js"(exports, module2) {
|
|
51789
51819
|
"use strict";
|
|
51790
51820
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
51791
51821
|
module2.exports = require_browser();
|
|
@@ -52658,12 +52688,12 @@ __export(src_exports, {
|
|
|
52658
52688
|
module.exports = __toCommonJS(src_exports);
|
|
52659
52689
|
var import_path6 = __toESM(require("path"));
|
|
52660
52690
|
|
|
52661
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
52691
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
52662
52692
|
var import_path = __toESM(require("path"));
|
|
52663
52693
|
var import_utils = require("@modern-js/utils");
|
|
52664
52694
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
52665
52695
|
|
|
52666
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
52696
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
52667
52697
|
var import_utils2 = require("@modern-js/utils");
|
|
52668
52698
|
async function fsExists(path6) {
|
|
52669
52699
|
try {
|
|
@@ -52674,13 +52704,13 @@ async function fsExists(path6) {
|
|
|
52674
52704
|
}
|
|
52675
52705
|
}
|
|
52676
52706
|
|
|
52677
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
52707
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
52678
52708
|
var import_ejs = __toESM(require_ejs());
|
|
52679
52709
|
function renderString(template, fullData) {
|
|
52680
52710
|
return import_ejs.default.render(template, fullData) || "";
|
|
52681
52711
|
}
|
|
52682
52712
|
|
|
52683
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
52713
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
52684
52714
|
var EjsAPI = class {
|
|
52685
52715
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
52686
52716
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -52712,7 +52742,7 @@ var EjsAPI = class {
|
|
|
52712
52742
|
}
|
|
52713
52743
|
};
|
|
52714
52744
|
|
|
52715
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
|
52745
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
52716
52746
|
var import_path2 = __toESM(require("path"));
|
|
52717
52747
|
var import_utils4 = require("@modern-js/utils");
|
|
52718
52748
|
var FsAPI = class {
|
|
@@ -52739,7 +52769,7 @@ var FsAPI = class {
|
|
|
52739
52769
|
}
|
|
52740
52770
|
};
|
|
52741
52771
|
|
|
52742
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
52772
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
52743
52773
|
var import_utils5 = require("@modern-js/utils");
|
|
52744
52774
|
async function canUseGit() {
|
|
52745
52775
|
try {
|
|
@@ -52814,7 +52844,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
52814
52844
|
});
|
|
52815
52845
|
}
|
|
52816
52846
|
|
|
52817
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
52847
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
52818
52848
|
var GitAPI = class {
|
|
52819
52849
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
52820
52850
|
const canUse = await canUseGit();
|
|
@@ -52864,7 +52894,7 @@ var GitAPI = class {
|
|
|
52864
52894
|
}
|
|
52865
52895
|
};
|
|
52866
52896
|
|
|
52867
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
52897
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
52868
52898
|
var import_handlebars = __toESM(require_lib());
|
|
52869
52899
|
function renderString2(template, fullData, registers) {
|
|
52870
52900
|
const helpers = {
|
|
@@ -52878,7 +52908,7 @@ function renderString2(template, fullData, registers) {
|
|
|
52878
52908
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
52879
52909
|
}
|
|
52880
52910
|
|
|
52881
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
52911
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
52882
52912
|
var HandlebarsAPI = class {
|
|
52883
52913
|
async registerHelp(helpers) {
|
|
52884
52914
|
this.registers.helpers = {
|
|
@@ -52926,7 +52956,7 @@ var HandlebarsAPI = class {
|
|
|
52926
52956
|
}
|
|
52927
52957
|
};
|
|
52928
52958
|
|
|
52929
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
52959
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
52930
52960
|
var import_utils8 = require("@modern-js/utils");
|
|
52931
52961
|
async function canUseNvm() {
|
|
52932
52962
|
try {
|
|
@@ -52976,7 +53006,7 @@ async function canUsePnpm() {
|
|
|
52976
53006
|
}
|
|
52977
53007
|
}
|
|
52978
53008
|
|
|
52979
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53009
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
52980
53010
|
var import_utils9 = require("@modern-js/utils");
|
|
52981
53011
|
function execaWithStreamLog(command, args, options) {
|
|
52982
53012
|
const promise = (0, import_utils9.execa)(command, args, {
|
|
@@ -53072,7 +53102,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53072
53102
|
throw new Error("please install pnpm first");
|
|
53073
53103
|
}
|
|
53074
53104
|
|
|
53075
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53105
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53076
53106
|
var NpmAPI = class {
|
|
53077
53107
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53078
53108
|
return npmInstall({
|
|
@@ -62656,10 +62686,10 @@ var Schema = (
|
|
|
62656
62686
|
}()
|
|
62657
62687
|
);
|
|
62658
62688
|
|
|
62659
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62689
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
62660
62690
|
var import_inquirer = __toESM(require_inquirer());
|
|
62661
62691
|
|
|
62662
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62692
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
62663
62693
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
62664
62694
|
function validateSchema(schema) {
|
|
62665
62695
|
const { type, properties } = schema;
|
|
@@ -62751,7 +62781,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
62751
62781
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
62752
62782
|
}
|
|
62753
62783
|
|
|
62754
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62784
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
62755
62785
|
var compileRule = (rule, scope) => {
|
|
62756
62786
|
const state = Schema.compile(rule, {
|
|
62757
62787
|
$self: {},
|
|
@@ -62855,7 +62885,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
62855
62885
|
return answers;
|
|
62856
62886
|
}
|
|
62857
62887
|
|
|
62858
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62888
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
62859
62889
|
var CLIReader = class {
|
|
62860
62890
|
getAnswers() {
|
|
62861
62891
|
return this.answers;
|
|
@@ -62884,7 +62914,7 @@ var CLIReader = class {
|
|
|
62884
62914
|
}
|
|
62885
62915
|
};
|
|
62886
62916
|
|
|
62887
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
62917
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
62888
62918
|
var import_utils13 = require("@modern-js/utils");
|
|
62889
62919
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
62890
62920
|
var import_comment_json = __toESM(require_src2());
|
|
@@ -62953,7 +62983,7 @@ var I18n = class {
|
|
|
62953
62983
|
}
|
|
62954
62984
|
};
|
|
62955
62985
|
|
|
62956
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
62986
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
62957
62987
|
var EN_LOCALE = {
|
|
62958
62988
|
environment: {
|
|
62959
62989
|
node_version: "please upgrade node to lts version",
|
|
@@ -62980,7 +63010,7 @@ var EN_LOCALE = {
|
|
|
62980
63010
|
}
|
|
62981
63011
|
};
|
|
62982
63012
|
|
|
62983
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63013
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
62984
63014
|
var ZH_LOCALE = {
|
|
62985
63015
|
environment: {
|
|
62986
63016
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63007,14 +63037,14 @@ var ZH_LOCALE = {
|
|
|
63007
63037
|
}
|
|
63008
63038
|
};
|
|
63009
63039
|
|
|
63010
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63040
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
63011
63041
|
var i18n = new I18n();
|
|
63012
63042
|
var localeKeys = i18n.init("zh", {
|
|
63013
63043
|
zh: ZH_LOCALE,
|
|
63014
63044
|
en: EN_LOCALE
|
|
63015
63045
|
});
|
|
63016
63046
|
|
|
63017
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63047
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
63018
63048
|
var import_path4 = __toESM(require("path"));
|
|
63019
63049
|
var import_utils12 = require("@modern-js/utils");
|
|
63020
63050
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63062,7 +63092,7 @@ async function checkUseNvm(cwd, logger) {
|
|
|
63062
63092
|
}
|
|
63063
63093
|
}
|
|
63064
63094
|
|
|
63065
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63095
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
63066
63096
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
|
63067
63097
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63068
63098
|
for (const question of questions) {
|
|
@@ -63090,7 +63120,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63090
63120
|
return questions;
|
|
63091
63121
|
}
|
|
63092
63122
|
|
|
63093
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63123
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63094
63124
|
var AppAPI = class {
|
|
63095
63125
|
async checkEnvironment(nodeVersion) {
|
|
63096
63126
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -63322,11 +63352,11 @@ var AppAPI = class {
|
|
|
63322
63352
|
}
|
|
63323
63353
|
};
|
|
63324
63354
|
|
|
63325
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63355
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63326
63356
|
var import_comment_json2 = __toESM(require_src2());
|
|
63327
63357
|
var declarationUpdate = __toESM(require_dist());
|
|
63328
63358
|
|
|
63329
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63359
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
63330
63360
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
63331
63361
|
const originJsonValue = await resource.value();
|
|
63332
63362
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -63339,7 +63369,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
63339
63369
|
return newJsonString;
|
|
63340
63370
|
}
|
|
63341
63371
|
|
|
63342
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63372
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63343
63373
|
var JsonAPI = class {
|
|
63344
63374
|
async get(resource) {
|
|
63345
63375
|
const originJsonValue = await resource.value();
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.4.
|
|
18
|
+
"version": "3.4.16",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@modern-js/utils": "2.58.
|
|
26
|
+
"@modern-js/utils": "2.58.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@modern-js/codesmith": "2.4.
|
|
30
|
-
"@modern-js/codesmith-api-app": "2.4.
|
|
31
|
-
"@modern-js/codesmith-api-json": "2.4.
|
|
29
|
+
"@modern-js/codesmith": "2.4.1",
|
|
30
|
+
"@modern-js/codesmith-api-app": "2.4.1",
|
|
31
|
+
"@modern-js/codesmith-api-json": "2.4.1",
|
|
32
32
|
"@types/jest": "^29",
|
|
33
33
|
"@types/node": "^14",
|
|
34
34
|
"jest": "^29",
|
|
35
35
|
"typescript": "^5",
|
|
36
|
-
"@modern-js/generator-common": "3.4.
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@scripts/jest-config": "2.58.
|
|
36
|
+
"@modern-js/generator-common": "3.4.16",
|
|
37
|
+
"@modern-js/generator-utils": "3.4.16",
|
|
38
|
+
"@scripts/build": "2.58.2",
|
|
39
|
+
"@scripts/jest-config": "2.58.2"
|
|
40
40
|
},
|
|
41
41
|
"sideEffects": false,
|
|
42
42
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
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 { JsonAPI } from '@modern-js/codesmith-api-json';
|
|
5
5
|
import { PackageManager } from '@modern-js/generator-common';
|
|
@@ -77,7 +77,6 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
|
77
77
|
appApi.i18n.changeLanguage({ locale });
|
|
78
78
|
|
|
79
79
|
if (!(await appApi.checkEnvironment())) {
|
|
80
|
-
// eslint-disable-next-line no-process-exit
|
|
81
80
|
process.exit(1);
|
|
82
81
|
}
|
|
83
82
|
|