@modern-js/server-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 +10 -10
- package/src/index.ts +1 -3
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();
|
|
@@ -53118,12 +53148,12 @@ function isTsProject(appDir) {
|
|
|
53118
53148
|
return import_utils3.fs.existsSync(import_path2.default.join(appDir, "tsconfig.json"));
|
|
53119
53149
|
}
|
|
53120
53150
|
|
|
53121
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
53151
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
53122
53152
|
var import_path3 = __toESM(require("path"));
|
|
53123
53153
|
var import_utils5 = require("@modern-js/utils");
|
|
53124
53154
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
53125
53155
|
|
|
53126
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
53156
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
53127
53157
|
var import_utils6 = require("@modern-js/utils");
|
|
53128
53158
|
async function fsExists(path7) {
|
|
53129
53159
|
try {
|
|
@@ -53134,13 +53164,13 @@ async function fsExists(path7) {
|
|
|
53134
53164
|
}
|
|
53135
53165
|
}
|
|
53136
53166
|
|
|
53137
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
53167
|
+
// ../../../../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
|
|
53138
53168
|
var import_ejs = __toESM(require_ejs());
|
|
53139
53169
|
function renderString(template, fullData) {
|
|
53140
53170
|
return import_ejs.default.render(template, fullData) || "";
|
|
53141
53171
|
}
|
|
53142
53172
|
|
|
53143
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
53173
|
+
// ../../../../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
|
|
53144
53174
|
var EjsAPI = class {
|
|
53145
53175
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
53146
53176
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -53172,7 +53202,7 @@ var EjsAPI = class {
|
|
|
53172
53202
|
}
|
|
53173
53203
|
};
|
|
53174
53204
|
|
|
53175
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
|
53205
|
+
// ../../../../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
|
|
53176
53206
|
var import_path4 = __toESM(require("path"));
|
|
53177
53207
|
var import_utils8 = require("@modern-js/utils");
|
|
53178
53208
|
var FsAPI = class {
|
|
@@ -53199,7 +53229,7 @@ var FsAPI = class {
|
|
|
53199
53229
|
}
|
|
53200
53230
|
};
|
|
53201
53231
|
|
|
53202
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
53232
|
+
// ../../../../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
|
|
53203
53233
|
var import_utils9 = require("@modern-js/utils");
|
|
53204
53234
|
async function canUseGit() {
|
|
53205
53235
|
try {
|
|
@@ -53274,7 +53304,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
53274
53304
|
});
|
|
53275
53305
|
}
|
|
53276
53306
|
|
|
53277
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
53307
|
+
// ../../../../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
|
|
53278
53308
|
var GitAPI = class {
|
|
53279
53309
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
53280
53310
|
const canUse = await canUseGit();
|
|
@@ -53324,7 +53354,7 @@ var GitAPI = class {
|
|
|
53324
53354
|
}
|
|
53325
53355
|
};
|
|
53326
53356
|
|
|
53327
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
53357
|
+
// ../../../../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
|
|
53328
53358
|
var import_handlebars = __toESM(require_lib());
|
|
53329
53359
|
function renderString2(template, fullData, registers) {
|
|
53330
53360
|
const helpers = {
|
|
@@ -53338,7 +53368,7 @@ function renderString2(template, fullData, registers) {
|
|
|
53338
53368
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
53339
53369
|
}
|
|
53340
53370
|
|
|
53341
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
53371
|
+
// ../../../../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
|
|
53342
53372
|
var HandlebarsAPI = class {
|
|
53343
53373
|
async registerHelp(helpers) {
|
|
53344
53374
|
this.registers.helpers = {
|
|
@@ -53386,7 +53416,7 @@ var HandlebarsAPI = class {
|
|
|
53386
53416
|
}
|
|
53387
53417
|
};
|
|
53388
53418
|
|
|
53389
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53419
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
53390
53420
|
var import_utils12 = require("@modern-js/utils");
|
|
53391
53421
|
async function canUseNvm() {
|
|
53392
53422
|
try {
|
|
@@ -53436,7 +53466,7 @@ async function canUsePnpm3() {
|
|
|
53436
53466
|
}
|
|
53437
53467
|
}
|
|
53438
53468
|
|
|
53439
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53469
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
53440
53470
|
var import_utils13 = require("@modern-js/utils");
|
|
53441
53471
|
function execaWithStreamLog(command, args, options) {
|
|
53442
53472
|
const promise = (0, import_utils13.execa)(command, args, {
|
|
@@ -53532,7 +53562,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53532
53562
|
throw new Error("please install pnpm first");
|
|
53533
53563
|
}
|
|
53534
53564
|
|
|
53535
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53565
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53536
53566
|
var NpmAPI = class {
|
|
53537
53567
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53538
53568
|
return npmInstall({
|
|
@@ -63116,10 +63146,10 @@ var Schema = (
|
|
|
63116
63146
|
}()
|
|
63117
63147
|
);
|
|
63118
63148
|
|
|
63119
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63149
|
+
// ../../../../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
|
|
63120
63150
|
var import_inquirer = __toESM(require_inquirer());
|
|
63121
63151
|
|
|
63122
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63152
|
+
// ../../../../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
|
|
63123
63153
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
63124
63154
|
function validateSchema(schema) {
|
|
63125
63155
|
const { type, properties } = schema;
|
|
@@ -63211,7 +63241,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
63211
63241
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
63212
63242
|
}
|
|
63213
63243
|
|
|
63214
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63244
|
+
// ../../../../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
|
|
63215
63245
|
var compileRule = (rule, scope) => {
|
|
63216
63246
|
const state = Schema.compile(rule, {
|
|
63217
63247
|
$self: {},
|
|
@@ -63315,7 +63345,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
63315
63345
|
return answers;
|
|
63316
63346
|
}
|
|
63317
63347
|
|
|
63318
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63348
|
+
// ../../../../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
|
|
63319
63349
|
var CLIReader = class {
|
|
63320
63350
|
getAnswers() {
|
|
63321
63351
|
return this.answers;
|
|
@@ -63344,7 +63374,7 @@ var CLIReader = class {
|
|
|
63344
63374
|
}
|
|
63345
63375
|
};
|
|
63346
63376
|
|
|
63347
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63377
|
+
// ../../../../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
|
|
63348
63378
|
var import_utils17 = require("@modern-js/utils");
|
|
63349
63379
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
63350
63380
|
var import_comment_json = __toESM(require_src2());
|
|
@@ -63413,7 +63443,7 @@ var I18n2 = class {
|
|
|
63413
63443
|
}
|
|
63414
63444
|
};
|
|
63415
63445
|
|
|
63416
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63446
|
+
// ../../../../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
|
|
63417
63447
|
var EN_LOCALE2 = {
|
|
63418
63448
|
environment: {
|
|
63419
63449
|
node_version: "please upgrade node to lts version",
|
|
@@ -63440,7 +63470,7 @@ var EN_LOCALE2 = {
|
|
|
63440
63470
|
}
|
|
63441
63471
|
};
|
|
63442
63472
|
|
|
63443
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63473
|
+
// ../../../../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
|
|
63444
63474
|
var ZH_LOCALE2 = {
|
|
63445
63475
|
environment: {
|
|
63446
63476
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63467,14 +63497,14 @@ var ZH_LOCALE2 = {
|
|
|
63467
63497
|
}
|
|
63468
63498
|
};
|
|
63469
63499
|
|
|
63470
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63500
|
+
// ../../../../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
|
|
63471
63501
|
var i18n2 = new I18n2();
|
|
63472
63502
|
var localeKeys2 = i18n2.init("zh", {
|
|
63473
63503
|
zh: ZH_LOCALE2,
|
|
63474
63504
|
en: EN_LOCALE2
|
|
63475
63505
|
});
|
|
63476
63506
|
|
|
63477
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63507
|
+
// ../../../../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
|
|
63478
63508
|
var import_path6 = __toESM(require("path"));
|
|
63479
63509
|
var import_utils16 = require("@modern-js/utils");
|
|
63480
63510
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63522,7 +63552,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63522
63552
|
}
|
|
63523
63553
|
}
|
|
63524
63554
|
|
|
63525
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63555
|
+
// ../../../../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
|
|
63526
63556
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
63527
63557
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63528
63558
|
for (const question of questions) {
|
|
@@ -63550,7 +63580,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63550
63580
|
return questions;
|
|
63551
63581
|
}
|
|
63552
63582
|
|
|
63553
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63583
|
+
// ../../../../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
|
|
63554
63584
|
var AppAPI = class {
|
|
63555
63585
|
async checkEnvironment(nodeVersion) {
|
|
63556
63586
|
if (import_utils17.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -63782,11 +63812,11 @@ var AppAPI = class {
|
|
|
63782
63812
|
}
|
|
63783
63813
|
};
|
|
63784
63814
|
|
|
63785
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63815
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63786
63816
|
var import_comment_json2 = __toESM(require_src2());
|
|
63787
63817
|
var declarationUpdate = __toESM(require_dist());
|
|
63788
63818
|
|
|
63789
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63819
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
63790
63820
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
63791
63821
|
const originJsonValue = await resource.value();
|
|
63792
63822
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -63799,7 +63829,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
63799
63829
|
return newJsonString;
|
|
63800
63830
|
}
|
|
63801
63831
|
|
|
63802
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
63832
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63803
63833
|
var JsonAPI = class {
|
|
63804
63834
|
async get(resource) {
|
|
63805
63835
|
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
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"/dist/index.js"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modern-js/utils": "2.58.
|
|
27
|
+
"@modern-js/utils": "2.58.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@modern-js/codesmith": "2.4.
|
|
31
|
-
"@modern-js/codesmith-api-app": "2.4.
|
|
32
|
-
"@modern-js/codesmith-api-json": "2.4.
|
|
30
|
+
"@modern-js/codesmith": "2.4.1",
|
|
31
|
+
"@modern-js/codesmith-api-app": "2.4.1",
|
|
32
|
+
"@modern-js/codesmith-api-json": "2.4.1",
|
|
33
33
|
"@types/jest": "^29",
|
|
34
34
|
"@types/node": "^14",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
-
"@modern-js/
|
|
38
|
-
"@modern-js/generator
|
|
39
|
-
"@modern-js/generator-utils": "3.4.
|
|
40
|
-
"@scripts/build": "2.58.
|
|
41
|
-
"@scripts/jest-config": "2.58.
|
|
37
|
+
"@modern-js/generator-common": "3.4.16",
|
|
38
|
+
"@modern-js/dependence-generator": "3.4.16",
|
|
39
|
+
"@modern-js/generator-utils": "3.4.16",
|
|
40
|
+
"@scripts/build": "2.58.2",
|
|
41
|
+
"@scripts/jest-config": "2.58.2"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
readTsConfigByFile,
|
|
7
7
|
getGeneratorPath,
|
|
8
8
|
} from '@modern-js/generator-utils';
|
|
9
|
-
import { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
|
|
9
|
+
import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
|
|
10
10
|
import { AppAPI } from '@modern-js/codesmith-api-app';
|
|
11
11
|
import { JsonAPI } from '@modern-js/codesmith-api-json';
|
|
12
12
|
import {
|
|
@@ -44,7 +44,6 @@ const handleTemplateFile = async (
|
|
|
44
44
|
const files = fs.readdirSync('server');
|
|
45
45
|
if (files.length > 0) {
|
|
46
46
|
generator.logger.warn("'server' is already exist");
|
|
47
|
-
// eslint-disable-next-line no-process-exit
|
|
48
47
|
process.exit(1);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
@@ -109,7 +108,6 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
|
109
108
|
appApi.i18n.changeLanguage({ locale });
|
|
110
109
|
|
|
111
110
|
if (!(await appApi.checkEnvironment())) {
|
|
112
|
-
// eslint-disable-next-line no-process-exit
|
|
113
111
|
process.exit(1);
|
|
114
112
|
}
|
|
115
113
|
|