@modern-js/bff-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 +3 -9
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();
|
|
@@ -53330,12 +53360,12 @@ async function getModernConfigFile(appDir) {
|
|
|
53330
53360
|
return isTsProject(appDir) ? "modern.config.ts" : "modern.config.js";
|
|
53331
53361
|
}
|
|
53332
53362
|
|
|
53333
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
53363
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
53334
53364
|
var import_path2 = __toESM(require("path"));
|
|
53335
53365
|
var import_utils6 = require("@modern-js/utils");
|
|
53336
53366
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
53337
53367
|
|
|
53338
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
|
53368
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
53339
53369
|
var import_utils7 = require("@modern-js/utils");
|
|
53340
53370
|
async function fsExists(path6) {
|
|
53341
53371
|
try {
|
|
@@ -53346,13 +53376,13 @@ async function fsExists(path6) {
|
|
|
53346
53376
|
}
|
|
53347
53377
|
}
|
|
53348
53378
|
|
|
53349
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
53379
|
+
// ../../../../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
|
|
53350
53380
|
var import_ejs = __toESM(require_ejs());
|
|
53351
53381
|
function renderString(template, fullData) {
|
|
53352
53382
|
return import_ejs.default.render(template, fullData) || "";
|
|
53353
53383
|
}
|
|
53354
53384
|
|
|
53355
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
|
53385
|
+
// ../../../../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
|
|
53356
53386
|
var EjsAPI = class {
|
|
53357
53387
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
53358
53388
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -53384,7 +53414,7 @@ var EjsAPI = class {
|
|
|
53384
53414
|
}
|
|
53385
53415
|
};
|
|
53386
53416
|
|
|
53387
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
|
53417
|
+
// ../../../../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
|
|
53388
53418
|
var import_path3 = __toESM(require("path"));
|
|
53389
53419
|
var import_utils9 = require("@modern-js/utils");
|
|
53390
53420
|
var FsAPI = class {
|
|
@@ -53411,7 +53441,7 @@ var FsAPI = class {
|
|
|
53411
53441
|
}
|
|
53412
53442
|
};
|
|
53413
53443
|
|
|
53414
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
53444
|
+
// ../../../../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
|
|
53415
53445
|
var import_utils10 = require("@modern-js/utils");
|
|
53416
53446
|
async function canUseGit() {
|
|
53417
53447
|
try {
|
|
@@ -53486,7 +53516,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
53486
53516
|
});
|
|
53487
53517
|
}
|
|
53488
53518
|
|
|
53489
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
|
53519
|
+
// ../../../../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
|
|
53490
53520
|
var GitAPI = class {
|
|
53491
53521
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
53492
53522
|
const canUse = await canUseGit();
|
|
@@ -53536,7 +53566,7 @@ var GitAPI = class {
|
|
|
53536
53566
|
}
|
|
53537
53567
|
};
|
|
53538
53568
|
|
|
53539
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
53569
|
+
// ../../../../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
|
|
53540
53570
|
var import_handlebars = __toESM(require_lib());
|
|
53541
53571
|
function renderString2(template, fullData, registers) {
|
|
53542
53572
|
const helpers = {
|
|
@@ -53550,7 +53580,7 @@ function renderString2(template, fullData, registers) {
|
|
|
53550
53580
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
53551
53581
|
}
|
|
53552
53582
|
|
|
53553
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
|
53583
|
+
// ../../../../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
|
|
53554
53584
|
var HandlebarsAPI = class {
|
|
53555
53585
|
async registerHelp(helpers) {
|
|
53556
53586
|
this.registers.helpers = {
|
|
@@ -53598,7 +53628,7 @@ var HandlebarsAPI = class {
|
|
|
53598
53628
|
}
|
|
53599
53629
|
};
|
|
53600
53630
|
|
|
53601
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53631
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
53602
53632
|
var import_utils13 = require("@modern-js/utils");
|
|
53603
53633
|
async function canUseNvm() {
|
|
53604
53634
|
try {
|
|
@@ -53648,7 +53678,7 @@ async function canUsePnpm3() {
|
|
|
53648
53678
|
}
|
|
53649
53679
|
}
|
|
53650
53680
|
|
|
53651
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53681
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
53652
53682
|
var import_utils14 = require("@modern-js/utils");
|
|
53653
53683
|
function execaWithStreamLog(command, args, options) {
|
|
53654
53684
|
const promise = (0, import_utils14.execa)(command, args, {
|
|
@@ -53744,7 +53774,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53744
53774
|
throw new Error("please install pnpm first");
|
|
53745
53775
|
}
|
|
53746
53776
|
|
|
53747
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
|
53777
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53748
53778
|
var NpmAPI = class {
|
|
53749
53779
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53750
53780
|
return npmInstall({
|
|
@@ -63328,10 +63358,10 @@ var Schema = (
|
|
|
63328
63358
|
}()
|
|
63329
63359
|
);
|
|
63330
63360
|
|
|
63331
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63361
|
+
// ../../../../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
|
|
63332
63362
|
var import_inquirer = __toESM(require_inquirer());
|
|
63333
63363
|
|
|
63334
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63364
|
+
// ../../../../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
|
|
63335
63365
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
63336
63366
|
function validateSchema(schema) {
|
|
63337
63367
|
const { type, properties } = schema;
|
|
@@ -63423,7 +63453,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
63423
63453
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
63424
63454
|
}
|
|
63425
63455
|
|
|
63426
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63456
|
+
// ../../../../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
|
|
63427
63457
|
var compileRule = (rule, scope) => {
|
|
63428
63458
|
const state = Schema.compile(rule, {
|
|
63429
63459
|
$self: {},
|
|
@@ -63527,7 +63557,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
63527
63557
|
return answers;
|
|
63528
63558
|
}
|
|
63529
63559
|
|
|
63530
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
|
63560
|
+
// ../../../../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
|
|
63531
63561
|
var CLIReader = class {
|
|
63532
63562
|
getAnswers() {
|
|
63533
63563
|
return this.answers;
|
|
@@ -63556,7 +63586,7 @@ var CLIReader = class {
|
|
|
63556
63586
|
}
|
|
63557
63587
|
};
|
|
63558
63588
|
|
|
63559
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63589
|
+
// ../../../../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
|
|
63560
63590
|
var import_utils18 = require("@modern-js/utils");
|
|
63561
63591
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
63562
63592
|
var import_comment_json = __toESM(require_src2());
|
|
@@ -63625,7 +63655,7 @@ var I18n2 = class {
|
|
|
63625
63655
|
}
|
|
63626
63656
|
};
|
|
63627
63657
|
|
|
63628
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63658
|
+
// ../../../../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
|
|
63629
63659
|
var EN_LOCALE2 = {
|
|
63630
63660
|
environment: {
|
|
63631
63661
|
node_version: "please upgrade node to lts version",
|
|
@@ -63652,7 +63682,7 @@ var EN_LOCALE2 = {
|
|
|
63652
63682
|
}
|
|
63653
63683
|
};
|
|
63654
63684
|
|
|
63655
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63685
|
+
// ../../../../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
|
|
63656
63686
|
var ZH_LOCALE2 = {
|
|
63657
63687
|
environment: {
|
|
63658
63688
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63679,14 +63709,14 @@ var ZH_LOCALE2 = {
|
|
|
63679
63709
|
}
|
|
63680
63710
|
};
|
|
63681
63711
|
|
|
63682
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63712
|
+
// ../../../../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
|
|
63683
63713
|
var i18n2 = new I18n2();
|
|
63684
63714
|
var localeKeys2 = i18n2.init("zh", {
|
|
63685
63715
|
zh: ZH_LOCALE2,
|
|
63686
63716
|
en: EN_LOCALE2
|
|
63687
63717
|
});
|
|
63688
63718
|
|
|
63689
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63719
|
+
// ../../../../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
|
|
63690
63720
|
var import_path5 = __toESM(require("path"));
|
|
63691
63721
|
var import_utils17 = require("@modern-js/utils");
|
|
63692
63722
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63734,7 +63764,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63734
63764
|
}
|
|
63735
63765
|
}
|
|
63736
63766
|
|
|
63737
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63767
|
+
// ../../../../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
|
|
63738
63768
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
63739
63769
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63740
63770
|
for (const question of questions) {
|
|
@@ -63762,7 +63792,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63762
63792
|
return questions;
|
|
63763
63793
|
}
|
|
63764
63794
|
|
|
63765
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
|
63795
|
+
// ../../../../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
|
|
63766
63796
|
var AppAPI = class {
|
|
63767
63797
|
async checkEnvironment(nodeVersion) {
|
|
63768
63798
|
if (import_utils18.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -63994,11 +64024,11 @@ var AppAPI = class {
|
|
|
63994
64024
|
}
|
|
63995
64025
|
};
|
|
63996
64026
|
|
|
63997
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
64027
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63998
64028
|
var import_comment_json2 = __toESM(require_src2());
|
|
63999
64029
|
var declarationUpdate = __toESM(require_dist());
|
|
64000
64030
|
|
|
64001
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
64031
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
64002
64032
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
64003
64033
|
const originJsonValue = await resource.value();
|
|
64004
64034
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -64011,7 +64041,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
64011
64041
|
return newJsonString;
|
|
64012
64042
|
}
|
|
64013
64043
|
|
|
64014
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
|
64044
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64015
64045
|
var JsonAPI = class {
|
|
64016
64046
|
async get(resource) {
|
|
64017
64047
|
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/generator-
|
|
38
|
-
"@modern-js/generator-
|
|
39
|
-
"@scripts/
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
37
|
+
"@modern-js/generator-common": "3.4.16",
|
|
38
|
+
"@modern-js/generator-utils": "3.4.16",
|
|
39
|
+
"@scripts/jest-config": "2.58.2",
|
|
40
|
+
"@modern-js/plugin-i18n": "2.58.2",
|
|
41
|
+
"@scripts/build": "2.58.2"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
readTsConfigByFile,
|
|
9
9
|
getModernConfigFile,
|
|
10
10
|
} from '@modern-js/generator-utils';
|
|
11
|
-
import { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
|
|
11
|
+
import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
|
|
12
12
|
import { AppAPI } from '@modern-js/codesmith-api-app';
|
|
13
13
|
import { JsonAPI } from '@modern-js/codesmith-api-json';
|
|
14
14
|
import {
|
|
@@ -79,9 +79,7 @@ export const handleTemplateFile = async (
|
|
|
79
79
|
|
|
80
80
|
if (framework === Framework.Express || framework === Framework.Koa) {
|
|
81
81
|
updateInfo = {
|
|
82
|
-
[`devDependencies.@types/${
|
|
83
|
-
framework as string
|
|
84
|
-
}`]: `~${await getPackageVersion(`@types/${framework as string}`)}`,
|
|
82
|
+
[`devDependencies.@types/${framework as string}`]: `~${await getPackageVersion(`@types/${framework as string}`)}`,
|
|
85
83
|
};
|
|
86
84
|
}
|
|
87
85
|
|
|
@@ -101,9 +99,7 @@ export const handleTemplateFile = async (
|
|
|
101
99
|
'dependencies.@modern-js/plugin-bff': `${await getBffPluginVersion(
|
|
102
100
|
'@modern-js/plugin-bff',
|
|
103
101
|
)}`,
|
|
104
|
-
[`dependencies.@modern-js/plugin-${
|
|
105
|
-
framework as string
|
|
106
|
-
}`]: `${await getBffPluginVersion(
|
|
102
|
+
[`dependencies.@modern-js/plugin-${framework as string}`]: `${await getBffPluginVersion(
|
|
107
103
|
`@modern-js/plugin-${framework as string}`,
|
|
108
104
|
)}`,
|
|
109
105
|
'devDependencies.ts-node': '~10.8.1',
|
|
@@ -236,7 +232,6 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
|
236
232
|
commonI18n.changeLanguage({ locale });
|
|
237
233
|
|
|
238
234
|
if (!(await appApi.checkEnvironment())) {
|
|
239
|
-
// eslint-disable-next-line no-process-exit
|
|
240
235
|
process.exit(1);
|
|
241
236
|
}
|
|
242
237
|
|
|
@@ -247,7 +242,6 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
|
247
242
|
try {
|
|
248
243
|
await handleTemplateFile(context, generator, appApi);
|
|
249
244
|
} catch (e) {
|
|
250
|
-
// eslint-disable-next-line no-process-exit
|
|
251
245
|
process.exit(1);
|
|
252
246
|
}
|
|
253
247
|
|