@modern-js/upgrade-generator 3.4.15 → 3.4.17
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 +346 -316
- package/package.json +10 -10
- package/src/index.ts +11 -11
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();
|
|
@@ -52659,12 +52689,12 @@ __export(src_exports, {
|
|
|
52659
52689
|
module.exports = __toCommonJS(src_exports);
|
|
52660
52690
|
var import_path6 = __toESM(require("path"));
|
|
52661
52691
|
|
|
52662
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
52692
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
52663
52693
|
var import_path = __toESM(require("path"));
|
|
52664
52694
|
var import_utils = require("@modern-js/utils");
|
|
52665
52695
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
52666
52696
|
|
|
52667
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
52697
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
52668
52698
|
var import_utils2 = require("@modern-js/utils");
|
|
52669
52699
|
async function fsExists(path6) {
|
|
52670
52700
|
try {
|
|
@@ -52675,13 +52705,13 @@ async function fsExists(path6) {
|
|
|
52675
52705
|
}
|
|
52676
52706
|
}
|
|
52677
52707
|
|
|
52678
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
52708
|
+
// ../../../../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
|
|
52679
52709
|
var import_ejs = __toESM(require_ejs());
|
|
52680
52710
|
function renderString(template, fullData) {
|
|
52681
52711
|
return import_ejs.default.render(template, fullData) || "";
|
|
52682
52712
|
}
|
|
52683
52713
|
|
|
52684
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
52714
|
+
// ../../../../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
|
|
52685
52715
|
var EjsAPI = class {
|
|
52686
52716
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
52687
52717
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -52713,7 +52743,7 @@ var EjsAPI = class {
|
|
|
52713
52743
|
}
|
|
52714
52744
|
};
|
|
52715
52745
|
|
|
52716
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
|
52746
|
+
// ../../../../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
|
|
52717
52747
|
var import_path2 = __toESM(require("path"));
|
|
52718
52748
|
var import_utils4 = require("@modern-js/utils");
|
|
52719
52749
|
var FsAPI = class {
|
|
@@ -52740,7 +52770,7 @@ var FsAPI = class {
|
|
|
52740
52770
|
}
|
|
52741
52771
|
};
|
|
52742
52772
|
|
|
52743
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
52773
|
+
// ../../../../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
|
|
52744
52774
|
var import_utils5 = require("@modern-js/utils");
|
|
52745
52775
|
async function canUseGit() {
|
|
52746
52776
|
try {
|
|
@@ -52815,7 +52845,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
52815
52845
|
});
|
|
52816
52846
|
}
|
|
52817
52847
|
|
|
52818
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
52848
|
+
// ../../../../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
|
|
52819
52849
|
var GitAPI = class {
|
|
52820
52850
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
52821
52851
|
const canUse = await canUseGit();
|
|
@@ -52865,7 +52895,7 @@ var GitAPI = class {
|
|
|
52865
52895
|
}
|
|
52866
52896
|
};
|
|
52867
52897
|
|
|
52868
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
52898
|
+
// ../../../../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
|
|
52869
52899
|
var import_handlebars = __toESM(require_lib());
|
|
52870
52900
|
function renderString2(template, fullData, registers) {
|
|
52871
52901
|
const helpers = {
|
|
@@ -52879,7 +52909,7 @@ function renderString2(template, fullData, registers) {
|
|
|
52879
52909
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
52880
52910
|
}
|
|
52881
52911
|
|
|
52882
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
52912
|
+
// ../../../../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
|
|
52883
52913
|
var HandlebarsAPI = class {
|
|
52884
52914
|
async registerHelp(helpers) {
|
|
52885
52915
|
this.registers.helpers = {
|
|
@@ -52927,7 +52957,7 @@ var HandlebarsAPI = class {
|
|
|
52927
52957
|
}
|
|
52928
52958
|
};
|
|
52929
52959
|
|
|
52930
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
52960
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
52931
52961
|
var import_utils8 = require("@modern-js/utils");
|
|
52932
52962
|
async function canUseNvm() {
|
|
52933
52963
|
try {
|
|
@@ -52977,7 +53007,7 @@ async function canUsePnpm() {
|
|
|
52977
53007
|
}
|
|
52978
53008
|
}
|
|
52979
53009
|
|
|
52980
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53010
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
52981
53011
|
var import_utils9 = require("@modern-js/utils");
|
|
52982
53012
|
function execaWithStreamLog(command, args, options) {
|
|
52983
53013
|
const promise = (0, import_utils9.execa)(command, args, {
|
|
@@ -53073,7 +53103,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53073
53103
|
throw new Error("please install pnpm first");
|
|
53074
53104
|
}
|
|
53075
53105
|
|
|
53076
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53106
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53077
53107
|
var NpmAPI = class {
|
|
53078
53108
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53079
53109
|
return npmInstall({
|
|
@@ -62657,10 +62687,10 @@ var Schema = (
|
|
|
62657
62687
|
}()
|
|
62658
62688
|
);
|
|
62659
62689
|
|
|
62660
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62690
|
+
// ../../../../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
|
|
62661
62691
|
var import_inquirer = __toESM(require_inquirer());
|
|
62662
62692
|
|
|
62663
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62693
|
+
// ../../../../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
|
|
62664
62694
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
62665
62695
|
function validateSchema(schema) {
|
|
62666
62696
|
const { type, properties } = schema;
|
|
@@ -62752,7 +62782,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
62752
62782
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
62753
62783
|
}
|
|
62754
62784
|
|
|
62755
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62785
|
+
// ../../../../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
|
|
62756
62786
|
var compileRule = (rule, scope) => {
|
|
62757
62787
|
const state = Schema.compile(rule, {
|
|
62758
62788
|
$self: {},
|
|
@@ -62856,7 +62886,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
62856
62886
|
return answers;
|
|
62857
62887
|
}
|
|
62858
62888
|
|
|
62859
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
62889
|
+
// ../../../../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
|
|
62860
62890
|
var CLIReader = class {
|
|
62861
62891
|
getAnswers() {
|
|
62862
62892
|
return this.answers;
|
|
@@ -62885,7 +62915,7 @@ var CLIReader = class {
|
|
|
62885
62915
|
}
|
|
62886
62916
|
};
|
|
62887
62917
|
|
|
62888
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
62918
|
+
// ../../../../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
|
|
62889
62919
|
var import_utils13 = require("@modern-js/utils");
|
|
62890
62920
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
62891
62921
|
var import_comment_json = __toESM(require_src2());
|
|
@@ -62954,7 +62984,7 @@ var I18n = class {
|
|
|
62954
62984
|
}
|
|
62955
62985
|
};
|
|
62956
62986
|
|
|
62957
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
62987
|
+
// ../../../../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
|
|
62958
62988
|
var EN_LOCALE = {
|
|
62959
62989
|
environment: {
|
|
62960
62990
|
node_version: "please upgrade node to lts version",
|
|
@@ -62981,7 +63011,7 @@ var EN_LOCALE = {
|
|
|
62981
63011
|
}
|
|
62982
63012
|
};
|
|
62983
63013
|
|
|
62984
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63014
|
+
// ../../../../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
|
|
62985
63015
|
var ZH_LOCALE = {
|
|
62986
63016
|
environment: {
|
|
62987
63017
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63008,14 +63038,14 @@ var ZH_LOCALE = {
|
|
|
63008
63038
|
}
|
|
63009
63039
|
};
|
|
63010
63040
|
|
|
63011
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63041
|
+
// ../../../../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
|
|
63012
63042
|
var i18n = new I18n();
|
|
63013
63043
|
var localeKeys = i18n.init("zh", {
|
|
63014
63044
|
zh: ZH_LOCALE,
|
|
63015
63045
|
en: EN_LOCALE
|
|
63016
63046
|
});
|
|
63017
63047
|
|
|
63018
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63048
|
+
// ../../../../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
|
|
63019
63049
|
var import_path4 = __toESM(require("path"));
|
|
63020
63050
|
var import_utils12 = require("@modern-js/utils");
|
|
63021
63051
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63063,7 +63093,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63063
63093
|
}
|
|
63064
63094
|
}
|
|
63065
63095
|
|
|
63066
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63096
|
+
// ../../../../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
|
|
63067
63097
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
|
63068
63098
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63069
63099
|
for (const question of questions) {
|
|
@@ -63091,7 +63121,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63091
63121
|
return questions;
|
|
63092
63122
|
}
|
|
63093
63123
|
|
|
63094
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63124
|
+
// ../../../../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
|
|
63095
63125
|
var AppAPI = class {
|
|
63096
63126
|
async checkEnvironment(nodeVersion) {
|
|
63097
63127
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -63323,11 +63353,11 @@ var AppAPI = class {
|
|
|
63323
63353
|
}
|
|
63324
63354
|
};
|
|
63325
63355
|
|
|
63326
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63356
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63327
63357
|
var import_comment_json2 = __toESM(require_src2());
|
|
63328
63358
|
var declarationUpdate = __toESM(require_dist());
|
|
63329
63359
|
|
|
63330
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63360
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
63331
63361
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
63332
63362
|
const originJsonValue = await resource.value();
|
|
63333
63363
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -63340,7 +63370,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
63340
63370
|
return newJsonString;
|
|
63341
63371
|
}
|
|
63342
63372
|
|
|
63343
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63373
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63344
63374
|
var JsonAPI = class {
|
|
63345
63375
|
async get(resource) {
|
|
63346
63376
|
const originJsonValue = await resource.value();
|
|
@@ -63384,10 +63414,6 @@ var JsonAPI = class {
|
|
|
63384
63414
|
}
|
|
63385
63415
|
};
|
|
63386
63416
|
|
|
63387
|
-
// ../../generator-utils/dist/esm/index.js
|
|
63388
|
-
var import_path5 = __toESM(require("path"));
|
|
63389
|
-
var import_utils17 = require("@modern-js/utils");
|
|
63390
|
-
|
|
63391
63417
|
// ../../../cli/plugin-i18n/dist/esm-node/index.js
|
|
63392
63418
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
63393
63419
|
|
|
@@ -63451,98 +63477,6 @@ var I18n2 = class {
|
|
|
63451
63477
|
}
|
|
63452
63478
|
};
|
|
63453
63479
|
|
|
63454
|
-
// ../../generator-common/dist/esm-node/locale/zh.js
|
|
63455
|
-
var ZH_LOCALE2 = {
|
|
63456
|
-
solution: {
|
|
63457
|
-
self: "请选择你想创建的工程类型",
|
|
63458
|
-
mwa: "Web 应用",
|
|
63459
|
-
module: "Npm 模块",
|
|
63460
|
-
custom: "自定义",
|
|
63461
|
-
default: "默认"
|
|
63462
|
-
},
|
|
63463
|
-
scenes: {
|
|
63464
|
-
self: "请选择项目场景"
|
|
63465
|
-
},
|
|
63466
|
-
sub_solution: {
|
|
63467
|
-
self: "请选择你想创建的工程类型",
|
|
63468
|
-
mwa: "Web 应用",
|
|
63469
|
-
module: "Npm 模块"
|
|
63470
|
-
},
|
|
63471
|
-
action: {
|
|
63472
|
-
self: "请选择你想要的操作",
|
|
63473
|
-
function: {
|
|
63474
|
-
self: "启用可选功能",
|
|
63475
|
-
question: "请选择功能名称",
|
|
63476
|
-
tailwindcss: "启用「Tailwind CSS」 支持",
|
|
63477
|
-
bff: "启用「BFF」功能",
|
|
63478
|
-
micro_frontend: "启用「微前端」模式",
|
|
63479
|
-
i18n: "启用「国际化(i18n)」功能",
|
|
63480
|
-
storybookV7: "启用「Storybook」V7",
|
|
63481
|
-
runtime_api: "启用「Runtime API」",
|
|
63482
|
-
ssg: "启用「SSG」功能",
|
|
63483
|
-
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
63484
|
-
proxy: "启用「全局代理」",
|
|
63485
|
-
swc: "启用「SWC 编译」",
|
|
63486
|
-
module_doc: "启动「模块文档」功能"
|
|
63487
|
-
},
|
|
63488
|
-
element: {
|
|
63489
|
-
self: "创建工程元素",
|
|
63490
|
-
question: "请选择创建元素类型",
|
|
63491
|
-
entry: "新建「应用入口」",
|
|
63492
|
-
server: "新建「自定义 Web Server」源码目录"
|
|
63493
|
-
},
|
|
63494
|
-
refactor: {
|
|
63495
|
-
self: "自动重构",
|
|
63496
|
-
question: "请选择重构类型",
|
|
63497
|
-
react_router_5: "使用 React Router v5"
|
|
63498
|
-
}
|
|
63499
|
-
},
|
|
63500
|
-
boolean: {
|
|
63501
|
-
yes: "是",
|
|
63502
|
-
no: "否"
|
|
63503
|
-
},
|
|
63504
|
-
language: {
|
|
63505
|
-
self: "请选择开发语言"
|
|
63506
|
-
},
|
|
63507
|
-
packageManager: {
|
|
63508
|
-
self: "请选择包管理工具"
|
|
63509
|
-
},
|
|
63510
|
-
entry: {
|
|
63511
|
-
name: "请填写入口名称",
|
|
63512
|
-
no_empty: "入口名称不能为空!",
|
|
63513
|
-
no_pages: '入口名称不支持 "pages"!'
|
|
63514
|
-
},
|
|
63515
|
-
packageName: {
|
|
63516
|
-
self: "请填写项目名称",
|
|
63517
|
-
sub_name: "请填写子项目名称",
|
|
63518
|
-
no_empty: "项目名称不能为空!"
|
|
63519
|
-
},
|
|
63520
|
-
packagePath: {
|
|
63521
|
-
self: "请填写子项目目录名称",
|
|
63522
|
-
no_empty: "目录名称不能为空!",
|
|
63523
|
-
format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
|
|
63524
|
-
},
|
|
63525
|
-
framework: {
|
|
63526
|
-
self: "请选择运行时框架",
|
|
63527
|
-
egg: "Egg",
|
|
63528
|
-
express: "Express",
|
|
63529
|
-
koa: "Koa",
|
|
63530
|
-
nest: "Nest"
|
|
63531
|
-
},
|
|
63532
|
-
bff: {
|
|
63533
|
-
bffType: {
|
|
63534
|
-
self: "请选择 BFF 类型",
|
|
63535
|
-
func: "函数模式",
|
|
63536
|
-
framework: "框架模式"
|
|
63537
|
-
}
|
|
63538
|
-
},
|
|
63539
|
-
buildTools: {
|
|
63540
|
-
self: "请选择构建工具",
|
|
63541
|
-
webpack: "webpack",
|
|
63542
|
-
rspack: "Rspack (实验性)"
|
|
63543
|
-
}
|
|
63544
|
-
};
|
|
63545
|
-
|
|
63546
63480
|
// ../../generator-common/dist/esm-node/locale/en.js
|
|
63547
63481
|
var EN_LOCALE2 = {
|
|
63548
63482
|
solution: {
|
|
@@ -63635,6 +63569,98 @@ var EN_LOCALE2 = {
|
|
|
63635
63569
|
}
|
|
63636
63570
|
};
|
|
63637
63571
|
|
|
63572
|
+
// ../../generator-common/dist/esm-node/locale/zh.js
|
|
63573
|
+
var ZH_LOCALE2 = {
|
|
63574
|
+
solution: {
|
|
63575
|
+
self: "请选择你想创建的工程类型",
|
|
63576
|
+
mwa: "Web 应用",
|
|
63577
|
+
module: "Npm 模块",
|
|
63578
|
+
custom: "自定义",
|
|
63579
|
+
default: "默认"
|
|
63580
|
+
},
|
|
63581
|
+
scenes: {
|
|
63582
|
+
self: "请选择项目场景"
|
|
63583
|
+
},
|
|
63584
|
+
sub_solution: {
|
|
63585
|
+
self: "请选择你想创建的工程类型",
|
|
63586
|
+
mwa: "Web 应用",
|
|
63587
|
+
module: "Npm 模块"
|
|
63588
|
+
},
|
|
63589
|
+
action: {
|
|
63590
|
+
self: "请选择你想要的操作",
|
|
63591
|
+
function: {
|
|
63592
|
+
self: "启用可选功能",
|
|
63593
|
+
question: "请选择功能名称",
|
|
63594
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
|
63595
|
+
bff: "启用「BFF」功能",
|
|
63596
|
+
micro_frontend: "启用「微前端」模式",
|
|
63597
|
+
i18n: "启用「国际化(i18n)」功能",
|
|
63598
|
+
storybookV7: "启用「Storybook」V7",
|
|
63599
|
+
runtime_api: "启用「Runtime API」",
|
|
63600
|
+
ssg: "启用「SSG」功能",
|
|
63601
|
+
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
63602
|
+
proxy: "启用「全局代理」",
|
|
63603
|
+
swc: "启用「SWC 编译」",
|
|
63604
|
+
module_doc: "启动「模块文档」功能"
|
|
63605
|
+
},
|
|
63606
|
+
element: {
|
|
63607
|
+
self: "创建工程元素",
|
|
63608
|
+
question: "请选择创建元素类型",
|
|
63609
|
+
entry: "新建「应用入口」",
|
|
63610
|
+
server: "新建「自定义 Web Server」源码目录"
|
|
63611
|
+
},
|
|
63612
|
+
refactor: {
|
|
63613
|
+
self: "自动重构",
|
|
63614
|
+
question: "请选择重构类型",
|
|
63615
|
+
react_router_5: "使用 React Router v5"
|
|
63616
|
+
}
|
|
63617
|
+
},
|
|
63618
|
+
boolean: {
|
|
63619
|
+
yes: "是",
|
|
63620
|
+
no: "否"
|
|
63621
|
+
},
|
|
63622
|
+
language: {
|
|
63623
|
+
self: "请选择开发语言"
|
|
63624
|
+
},
|
|
63625
|
+
packageManager: {
|
|
63626
|
+
self: "请选择包管理工具"
|
|
63627
|
+
},
|
|
63628
|
+
entry: {
|
|
63629
|
+
name: "请填写入口名称",
|
|
63630
|
+
no_empty: "入口名称不能为空!",
|
|
63631
|
+
no_pages: '入口名称不支持 "pages"!'
|
|
63632
|
+
},
|
|
63633
|
+
packageName: {
|
|
63634
|
+
self: "请填写项目名称",
|
|
63635
|
+
sub_name: "请填写子项目名称",
|
|
63636
|
+
no_empty: "项目名称不能为空!"
|
|
63637
|
+
},
|
|
63638
|
+
packagePath: {
|
|
63639
|
+
self: "请填写子项目目录名称",
|
|
63640
|
+
no_empty: "目录名称不能为空!",
|
|
63641
|
+
format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
|
|
63642
|
+
},
|
|
63643
|
+
framework: {
|
|
63644
|
+
self: "请选择运行时框架",
|
|
63645
|
+
egg: "Egg",
|
|
63646
|
+
express: "Express",
|
|
63647
|
+
koa: "Koa",
|
|
63648
|
+
nest: "Nest"
|
|
63649
|
+
},
|
|
63650
|
+
bff: {
|
|
63651
|
+
bffType: {
|
|
63652
|
+
self: "请选择 BFF 类型",
|
|
63653
|
+
func: "函数模式",
|
|
63654
|
+
framework: "框架模式"
|
|
63655
|
+
}
|
|
63656
|
+
},
|
|
63657
|
+
buildTools: {
|
|
63658
|
+
self: "请选择构建工具",
|
|
63659
|
+
webpack: "webpack",
|
|
63660
|
+
rspack: "Rspack (实验性)"
|
|
63661
|
+
}
|
|
63662
|
+
};
|
|
63663
|
+
|
|
63638
63664
|
// ../../generator-common/dist/esm-node/locale/index.js
|
|
63639
63665
|
var i18n2 = new I18n2();
|
|
63640
63666
|
var localeKeys2 = i18n2.init("en", {
|
|
@@ -63644,9 +63670,9 @@ var localeKeys2 = i18n2.init("en", {
|
|
|
63644
63670
|
|
|
63645
63671
|
// ../../generator-common/dist/esm-node/common/solution.js
|
|
63646
63672
|
var Solution;
|
|
63647
|
-
(function(
|
|
63648
|
-
|
|
63649
|
-
|
|
63673
|
+
(function(Solution2) {
|
|
63674
|
+
Solution2["MWA"] = "mwa";
|
|
63675
|
+
Solution2["Module"] = "module";
|
|
63650
63676
|
})(Solution || (Solution = {}));
|
|
63651
63677
|
var SolutionText = {
|
|
63652
63678
|
["mwa"]: () => i18n2.t(localeKeys2.solution.mwa),
|
|
@@ -63665,20 +63691,9 @@ var PackageManager;
|
|
|
63665
63691
|
PackageManager2["Npm"] = "npm";
|
|
63666
63692
|
})(PackageManager || (PackageManager = {}));
|
|
63667
63693
|
|
|
63668
|
-
// ../../generator-utils/dist/esm/
|
|
63669
|
-
|
|
63670
|
-
|
|
63671
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
63672
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
63673
|
-
].join("|");
|
|
63674
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
63675
|
-
}
|
|
63676
|
-
function stripAnsi2(string) {
|
|
63677
|
-
if (typeof string !== "string") {
|
|
63678
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
63679
|
-
}
|
|
63680
|
-
return string.replace(ansiRegex2(), "");
|
|
63681
|
-
}
|
|
63694
|
+
// ../../generator-utils/dist/esm/index.js
|
|
63695
|
+
var import_path5 = __toESM(require("path"));
|
|
63696
|
+
var import_utils17 = require("@modern-js/utils");
|
|
63682
63697
|
|
|
63683
63698
|
// ../../generator-utils/dist/esm/utils/package.js
|
|
63684
63699
|
var import_utils16 = require("@modern-js/utils");
|
|
@@ -63756,6 +63771,21 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
|
|
|
63756
63771
|
return currentVersion;
|
|
63757
63772
|
}
|
|
63758
63773
|
|
|
63774
|
+
// ../../generator-utils/dist/esm/utils/stripAnsi.js
|
|
63775
|
+
function ansiRegex2({ onlyFirst = false } = {}) {
|
|
63776
|
+
const pattern = [
|
|
63777
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
63778
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
63779
|
+
].join("|");
|
|
63780
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
63781
|
+
}
|
|
63782
|
+
function stripAnsi3(string) {
|
|
63783
|
+
if (typeof string !== "string") {
|
|
63784
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
63785
|
+
}
|
|
63786
|
+
return string.replace(ansiRegex2(), "");
|
|
63787
|
+
}
|
|
63788
|
+
|
|
63759
63789
|
// ../../generator-utils/dist/esm/index.js
|
|
63760
63790
|
var import_utils18 = require("@modern-js/utils");
|
|
63761
63791
|
async function getPackageVersion(packageName, registry2) {
|
|
@@ -63774,7 +63804,7 @@ async function getPackageVersion(packageName, registry2) {
|
|
|
63774
63804
|
}
|
|
63775
63805
|
const result = await (0, import_utils17.execa)("pnpm", args);
|
|
63776
63806
|
spinner.stop();
|
|
63777
|
-
return
|
|
63807
|
+
return stripAnsi3(result.stdout);
|
|
63778
63808
|
}
|
|
63779
63809
|
if (await (0, import_utils17.canUseNpm)()) {
|
|
63780
63810
|
const args = [
|
|
@@ -63787,7 +63817,7 @@ async function getPackageVersion(packageName, registry2) {
|
|
|
63787
63817
|
}
|
|
63788
63818
|
const result = await (0, import_utils17.execa)("npm", args);
|
|
63789
63819
|
spinner.stop();
|
|
63790
|
-
return
|
|
63820
|
+
return stripAnsi3(result.stdout);
|
|
63791
63821
|
}
|
|
63792
63822
|
spinner.stop();
|
|
63793
63823
|
throw new Error("not found npm, please install npm before");
|
|
@@ -63802,6 +63832,19 @@ async function getPackageObj(context) {
|
|
|
63802
63832
|
return JSON.parse(pkgStr);
|
|
63803
63833
|
}
|
|
63804
63834
|
|
|
63835
|
+
// src/locale/en.ts
|
|
63836
|
+
var EN_LOCALE3 = {
|
|
63837
|
+
projectType: "Project Type",
|
|
63838
|
+
modernVersion: "Modern.js Latest Version",
|
|
63839
|
+
alreadyLatest: `The current version of Modern.js is the latest`,
|
|
63840
|
+
tooltip: {
|
|
63841
|
+
no_solution: "You should install Modern.js solution tools first",
|
|
63842
|
+
more_solution: "The project is not allowed to contain more than one solution tool"
|
|
63843
|
+
},
|
|
63844
|
+
success: "Upgrade Modern.js package version success!",
|
|
63845
|
+
updateHusky: "Upgrade husky to v8"
|
|
63846
|
+
};
|
|
63847
|
+
|
|
63805
63848
|
// src/locale/zh.ts
|
|
63806
63849
|
var ZH_LOCALE3 = {
|
|
63807
63850
|
projectType: "项目类型",
|
|
@@ -63818,19 +63861,6 @@ var ZH_LOCALE3 = {
|
|
|
63818
63861
|
updateHusky: "升级 Husky 至 v8"
|
|
63819
63862
|
};
|
|
63820
63863
|
|
|
63821
|
-
// src/locale/en.ts
|
|
63822
|
-
var EN_LOCALE3 = {
|
|
63823
|
-
projectType: "Project Type",
|
|
63824
|
-
modernVersion: "Modern.js Latest Version",
|
|
63825
|
-
alreadyLatest: `The current version of Modern.js is the latest`,
|
|
63826
|
-
tooltip: {
|
|
63827
|
-
no_solution: "You should install Modern.js solution tools first",
|
|
63828
|
-
more_solution: "The project is not allowed to contain more than one solution tool"
|
|
63829
|
-
},
|
|
63830
|
-
success: "Upgrade Modern.js package version success!",
|
|
63831
|
-
updateHusky: "Upgrade husky to v8"
|
|
63832
|
-
};
|
|
63833
|
-
|
|
63834
63864
|
// src/locale/index.ts
|
|
63835
63865
|
var i18n3 = new I18n2();
|
|
63836
63866
|
var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
|
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.17",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@modern-js/codesmith": "2.4.
|
|
27
|
-
"@modern-js/codesmith-api-app": "2.4.
|
|
28
|
-
"@modern-js/codesmith-api-json": "2.4.
|
|
29
|
-
"@modern-js/
|
|
30
|
-
"@modern-js/generator-utils": "3.4.
|
|
31
|
-
"@modern-js/
|
|
32
|
-
"@modern-js/utils": "2.58.
|
|
26
|
+
"@modern-js/codesmith": "2.4.1",
|
|
27
|
+
"@modern-js/codesmith-api-app": "2.4.1",
|
|
28
|
+
"@modern-js/codesmith-api-json": "2.4.1",
|
|
29
|
+
"@modern-js/generator-common": "3.4.17",
|
|
30
|
+
"@modern-js/generator-utils": "3.4.17",
|
|
31
|
+
"@modern-js/plugin-i18n": "2.58.3",
|
|
32
|
+
"@modern-js/utils": "2.58.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/jest": "^29",
|
|
36
36
|
"@types/node": "^14",
|
|
37
37
|
"jest": "^29",
|
|
38
38
|
"typescript": "^5",
|
|
39
|
-
"@scripts/build": "2.58.
|
|
40
|
-
"@scripts/jest-config": "2.58.
|
|
39
|
+
"@scripts/build": "2.58.3",
|
|
40
|
+
"@scripts/jest-config": "2.58.3"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
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 {
|
|
6
|
-
|
|
6
|
+
PackageManager,
|
|
7
|
+
type Solution,
|
|
8
|
+
SolutionText,
|
|
9
|
+
SolutionToolsMap,
|
|
10
|
+
} from '@modern-js/generator-common';
|
|
11
|
+
import {
|
|
12
|
+
fs,
|
|
7
13
|
getAvailableVersion,
|
|
8
14
|
getModernVersion,
|
|
9
15
|
getPackageManager,
|
|
10
16
|
getPackageObj,
|
|
11
|
-
semver,
|
|
12
|
-
fs,
|
|
13
|
-
isPackageExist,
|
|
14
17
|
getPackageVersion,
|
|
18
|
+
isPackageExist,
|
|
19
|
+
ora,
|
|
20
|
+
semver,
|
|
15
21
|
} from '@modern-js/generator-utils';
|
|
16
|
-
import {
|
|
17
|
-
PackageManager,
|
|
18
|
-
Solution,
|
|
19
|
-
SolutionText,
|
|
20
|
-
SolutionToolsMap,
|
|
21
|
-
} from '@modern-js/generator-common';
|
|
22
22
|
import { i18n, localeKeys } from './locale';
|
|
23
23
|
|
|
24
24
|
// Special modern.js dependencies, the plugin version maybe not same with other modern.js plugin
|