@modern-js/bff-generator 3.3.7 → 3.3.9
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 +188 -223
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -5,9 +5,6 @@ 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
|
-
};
|
|
11
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
12
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
10
|
};
|
|
@@ -8757,15 +8754,15 @@ var require_runtime = __commonJS({
|
|
|
8757
8754
|
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] + ").");
|
|
8758
8755
|
}
|
|
8759
8756
|
}
|
|
8760
|
-
function template(templateSpec,
|
|
8761
|
-
if (!
|
|
8757
|
+
function template(templateSpec, env) {
|
|
8758
|
+
if (!env) {
|
|
8762
8759
|
throw new _exception2["default"]("No environment passed to template");
|
|
8763
8760
|
}
|
|
8764
8761
|
if (!templateSpec || !templateSpec.main) {
|
|
8765
8762
|
throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
|
|
8766
8763
|
}
|
|
8767
8764
|
templateSpec.main.decorator = templateSpec.main_d;
|
|
8768
|
-
|
|
8765
|
+
env.VM.checkRevision(templateSpec.compiler);
|
|
8769
8766
|
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
|
8770
8767
|
function invokePartialWrapper(partial, context, options) {
|
|
8771
8768
|
if (options.hash) {
|
|
@@ -8774,14 +8771,14 @@ var require_runtime = __commonJS({
|
|
|
8774
8771
|
options.ids[0] = true;
|
|
8775
8772
|
}
|
|
8776
8773
|
}
|
|
8777
|
-
partial =
|
|
8774
|
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
|
8778
8775
|
var extendedOptions = Utils.extend({}, options, {
|
|
8779
8776
|
hooks: this.hooks,
|
|
8780
8777
|
protoAccessControl: this.protoAccessControl
|
|
8781
8778
|
});
|
|
8782
|
-
var result =
|
|
8783
|
-
if (result == null &&
|
|
8784
|
-
options.partials[options.name] =
|
|
8779
|
+
var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
|
|
8780
|
+
if (result == null && env.compile) {
|
|
8781
|
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
|
8785
8782
|
result = options.partials[options.name](context, extendedOptions);
|
|
8786
8783
|
}
|
|
8787
8784
|
if (result != null) {
|
|
@@ -8866,7 +8863,7 @@ var require_runtime = __commonJS({
|
|
|
8866
8863
|
},
|
|
8867
8864
|
// An empty object to use as replacement for null-contexts
|
|
8868
8865
|
nullContext: Object.seal({}),
|
|
8869
|
-
noop:
|
|
8866
|
+
noop: env.VM.noop,
|
|
8870
8867
|
compilerInfo: templateSpec.compiler
|
|
8871
8868
|
};
|
|
8872
8869
|
function ret(context) {
|
|
@@ -8893,14 +8890,14 @@ var require_runtime = __commonJS({
|
|
|
8893
8890
|
ret.isTop = true;
|
|
8894
8891
|
ret._setup = function(options) {
|
|
8895
8892
|
if (!options.partial) {
|
|
8896
|
-
var mergedHelpers = Utils.extend({},
|
|
8893
|
+
var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
|
|
8897
8894
|
wrapHelpersToPassLookupProperty(mergedHelpers, container);
|
|
8898
8895
|
container.helpers = mergedHelpers;
|
|
8899
8896
|
if (templateSpec.usePartial) {
|
|
8900
|
-
container.partials = container.mergeIfNeeded(options.partials,
|
|
8897
|
+
container.partials = container.mergeIfNeeded(options.partials, env.partials);
|
|
8901
8898
|
}
|
|
8902
8899
|
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
|
8903
|
-
container.decorators = Utils.extend({},
|
|
8900
|
+
container.decorators = Utils.extend({}, env.decorators, options.decorators);
|
|
8904
8901
|
}
|
|
8905
8902
|
container.hooks = {};
|
|
8906
8903
|
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
|
@@ -10702,7 +10699,7 @@ var require_compiler = __commonJS({
|
|
|
10702
10699
|
}
|
|
10703
10700
|
}
|
|
10704
10701
|
};
|
|
10705
|
-
function precompile(input, options,
|
|
10702
|
+
function precompile(input, options, env) {
|
|
10706
10703
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
|
10707
10704
|
throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
|
|
10708
10705
|
}
|
|
@@ -10713,10 +10710,10 @@ var require_compiler = __commonJS({
|
|
|
10713
10710
|
if (options.compat) {
|
|
10714
10711
|
options.useDepths = true;
|
|
10715
10712
|
}
|
|
10716
|
-
var ast =
|
|
10717
|
-
return new
|
|
10713
|
+
var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options);
|
|
10714
|
+
return new env.JavaScriptCompiler().compile(environment, options);
|
|
10718
10715
|
}
|
|
10719
|
-
function compile2(input, options,
|
|
10716
|
+
function compile2(input, options, env) {
|
|
10720
10717
|
if (options === void 0)
|
|
10721
10718
|
options = {};
|
|
10722
10719
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
|
@@ -10731,8 +10728,8 @@ var require_compiler = __commonJS({
|
|
|
10731
10728
|
}
|
|
10732
10729
|
var compiled = void 0;
|
|
10733
10730
|
function compileInput() {
|
|
10734
|
-
var ast =
|
|
10735
|
-
return
|
|
10731
|
+
var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options), templateSpec = new env.JavaScriptCompiler().compile(environment, options, void 0, true);
|
|
10732
|
+
return env.template(templateSpec);
|
|
10736
10733
|
}
|
|
10737
10734
|
function ret(context, execOptions) {
|
|
10738
10735
|
if (!compiled) {
|
|
@@ -15658,13 +15655,13 @@ var require_chalk = __commonJS({
|
|
|
15658
15655
|
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
|
15659
15656
|
}
|
|
15660
15657
|
}
|
|
15661
|
-
function
|
|
15658
|
+
function translateLevel(e3) {
|
|
15662
15659
|
if (e3 === 0) {
|
|
15663
15660
|
return false;
|
|
15664
15661
|
}
|
|
15665
15662
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
15666
15663
|
}
|
|
15667
|
-
function
|
|
15664
|
+
function supportsColor(e3, t3) {
|
|
15668
15665
|
if (c === 0) {
|
|
15669
15666
|
return 0;
|
|
15670
15667
|
}
|
|
@@ -15721,10 +15718,10 @@ var require_chalk = __commonJS({
|
|
|
15721
15718
|
return n3;
|
|
15722
15719
|
}
|
|
15723
15720
|
function getSupportLevel(e3) {
|
|
15724
|
-
const t3 =
|
|
15725
|
-
return
|
|
15721
|
+
const t3 = supportsColor(e3, e3 && e3.isTTY);
|
|
15722
|
+
return translateLevel(t3);
|
|
15726
15723
|
}
|
|
15727
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
|
15724
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, s.isatty(1))), stderr: translateLevel(supportsColor(true, s.isatty(2))) };
|
|
15728
15725
|
}, 37: (e2) => {
|
|
15729
15726
|
"use strict";
|
|
15730
15727
|
e2.exports = require("os");
|
|
@@ -20650,7 +20647,7 @@ var require_innerFrom = __commonJS({
|
|
|
20650
20647
|
exports.fromIterable = fromIterable;
|
|
20651
20648
|
function fromAsyncIterable(asyncIterable) {
|
|
20652
20649
|
return new Observable_1.Observable(function(subscriber) {
|
|
20653
|
-
|
|
20650
|
+
process2(asyncIterable, subscriber).catch(function(err) {
|
|
20654
20651
|
return subscriber.error(err);
|
|
20655
20652
|
});
|
|
20656
20653
|
});
|
|
@@ -20660,7 +20657,7 @@ var require_innerFrom = __commonJS({
|
|
|
20660
20657
|
return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
|
|
20661
20658
|
}
|
|
20662
20659
|
exports.fromReadableStreamLike = fromReadableStreamLike;
|
|
20663
|
-
function
|
|
20660
|
+
function process2(asyncIterable, subscriber) {
|
|
20664
20661
|
var asyncIterable_1, asyncIterable_1_1;
|
|
20665
20662
|
var e_2, _a2;
|
|
20666
20663
|
return __awaiter6(this, void 0, void 0, function() {
|
|
@@ -27941,11 +27938,11 @@ var require_signals = __commonJS({
|
|
|
27941
27938
|
var require_signal_exit = __commonJS({
|
|
27942
27939
|
"../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
27943
27940
|
"use strict";
|
|
27944
|
-
var
|
|
27945
|
-
var processOk = function(
|
|
27946
|
-
return
|
|
27941
|
+
var process2 = global.process;
|
|
27942
|
+
var processOk = function(process3) {
|
|
27943
|
+
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
27947
27944
|
};
|
|
27948
|
-
if (!processOk(
|
|
27945
|
+
if (!processOk(process2)) {
|
|
27949
27946
|
module2.exports = function() {
|
|
27950
27947
|
return function() {
|
|
27951
27948
|
};
|
|
@@ -27953,15 +27950,15 @@ var require_signal_exit = __commonJS({
|
|
|
27953
27950
|
} else {
|
|
27954
27951
|
assert = require("assert");
|
|
27955
27952
|
signals = require_signals();
|
|
27956
|
-
isWin = /^win/i.test(
|
|
27953
|
+
isWin = /^win/i.test(process2.platform);
|
|
27957
27954
|
EE = require("events");
|
|
27958
27955
|
if (typeof EE !== "function") {
|
|
27959
27956
|
EE = EE.EventEmitter;
|
|
27960
27957
|
}
|
|
27961
|
-
if (
|
|
27962
|
-
emitter =
|
|
27958
|
+
if (process2.__signal_exit_emitter__) {
|
|
27959
|
+
emitter = process2.__signal_exit_emitter__;
|
|
27963
27960
|
} else {
|
|
27964
|
-
emitter =
|
|
27961
|
+
emitter = process2.__signal_exit_emitter__ = new EE();
|
|
27965
27962
|
emitter.count = 0;
|
|
27966
27963
|
emitter.emitted = {};
|
|
27967
27964
|
}
|
|
@@ -27998,12 +27995,12 @@ var require_signal_exit = __commonJS({
|
|
|
27998
27995
|
loaded = false;
|
|
27999
27996
|
signals.forEach(function(sig) {
|
|
28000
27997
|
try {
|
|
28001
|
-
|
|
27998
|
+
process2.removeListener(sig, sigListeners[sig]);
|
|
28002
27999
|
} catch (er) {
|
|
28003
28000
|
}
|
|
28004
28001
|
});
|
|
28005
|
-
|
|
28006
|
-
|
|
28002
|
+
process2.emit = originalProcessEmit;
|
|
28003
|
+
process2.reallyExit = originalProcessReallyExit;
|
|
28007
28004
|
emitter.count -= 1;
|
|
28008
28005
|
};
|
|
28009
28006
|
module2.exports.unload = unload;
|
|
@@ -28020,7 +28017,7 @@ var require_signal_exit = __commonJS({
|
|
|
28020
28017
|
if (!processOk(global.process)) {
|
|
28021
28018
|
return;
|
|
28022
28019
|
}
|
|
28023
|
-
var listeners =
|
|
28020
|
+
var listeners = process2.listeners(sig);
|
|
28024
28021
|
if (listeners.length === emitter.count) {
|
|
28025
28022
|
unload();
|
|
28026
28023
|
emit("exit", null, sig);
|
|
@@ -28028,7 +28025,7 @@ var require_signal_exit = __commonJS({
|
|
|
28028
28025
|
if (isWin && sig === "SIGHUP") {
|
|
28029
28026
|
sig = "SIGINT";
|
|
28030
28027
|
}
|
|
28031
|
-
|
|
28028
|
+
process2.kill(process2.pid, sig);
|
|
28032
28029
|
}
|
|
28033
28030
|
};
|
|
28034
28031
|
});
|
|
@@ -28044,36 +28041,36 @@ var require_signal_exit = __commonJS({
|
|
|
28044
28041
|
emitter.count += 1;
|
|
28045
28042
|
signals = signals.filter(function(sig) {
|
|
28046
28043
|
try {
|
|
28047
|
-
|
|
28044
|
+
process2.on(sig, sigListeners[sig]);
|
|
28048
28045
|
return true;
|
|
28049
28046
|
} catch (er) {
|
|
28050
28047
|
return false;
|
|
28051
28048
|
}
|
|
28052
28049
|
});
|
|
28053
|
-
|
|
28054
|
-
|
|
28050
|
+
process2.emit = processEmit;
|
|
28051
|
+
process2.reallyExit = processReallyExit;
|
|
28055
28052
|
};
|
|
28056
28053
|
module2.exports.load = load;
|
|
28057
|
-
originalProcessReallyExit =
|
|
28054
|
+
originalProcessReallyExit = process2.reallyExit;
|
|
28058
28055
|
processReallyExit = function processReallyExit2(code) {
|
|
28059
28056
|
if (!processOk(global.process)) {
|
|
28060
28057
|
return;
|
|
28061
28058
|
}
|
|
28062
|
-
|
|
28059
|
+
process2.exitCode = code || /* istanbul ignore next */
|
|
28063
28060
|
0;
|
|
28064
|
-
emit("exit",
|
|
28065
|
-
emit("afterexit",
|
|
28066
|
-
originalProcessReallyExit.call(
|
|
28061
|
+
emit("exit", process2.exitCode, null);
|
|
28062
|
+
emit("afterexit", process2.exitCode, null);
|
|
28063
|
+
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
28067
28064
|
};
|
|
28068
|
-
originalProcessEmit =
|
|
28065
|
+
originalProcessEmit = process2.emit;
|
|
28069
28066
|
processEmit = function processEmit2(ev, arg) {
|
|
28070
28067
|
if (ev === "exit" && processOk(global.process)) {
|
|
28071
28068
|
if (arg !== void 0) {
|
|
28072
|
-
|
|
28069
|
+
process2.exitCode = arg;
|
|
28073
28070
|
}
|
|
28074
28071
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
28075
|
-
emit("exit",
|
|
28076
|
-
emit("afterexit",
|
|
28072
|
+
emit("exit", process2.exitCode, null);
|
|
28073
|
+
emit("afterexit", process2.exitCode, null);
|
|
28077
28074
|
return ret;
|
|
28078
28075
|
} else {
|
|
28079
28076
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -51168,11 +51165,11 @@ var require_ms = __commonJS({
|
|
|
51168
51165
|
}
|
|
51169
51166
|
});
|
|
51170
51167
|
|
|
51171
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51168
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js
|
|
51172
51169
|
var require_common2 = __commonJS({
|
|
51173
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51170
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js"(exports, module2) {
|
|
51174
51171
|
"use strict";
|
|
51175
|
-
function setup(
|
|
51172
|
+
function setup(env) {
|
|
51176
51173
|
createDebug.debug = createDebug;
|
|
51177
51174
|
createDebug.default = createDebug;
|
|
51178
51175
|
createDebug.coerce = coerce;
|
|
@@ -51181,8 +51178,8 @@ var require_common2 = __commonJS({
|
|
|
51181
51178
|
createDebug.enabled = enabled;
|
|
51182
51179
|
createDebug.humanize = require_ms();
|
|
51183
51180
|
createDebug.destroy = destroy2;
|
|
51184
|
-
Object.keys(
|
|
51185
|
-
createDebug[key] =
|
|
51181
|
+
Object.keys(env).forEach((key) => {
|
|
51182
|
+
createDebug[key] = env[key];
|
|
51186
51183
|
});
|
|
51187
51184
|
createDebug.names = [];
|
|
51188
51185
|
createDebug.skips = [];
|
|
@@ -51332,9 +51329,9 @@ var require_common2 = __commonJS({
|
|
|
51332
51329
|
}
|
|
51333
51330
|
});
|
|
51334
51331
|
|
|
51335
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51332
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js
|
|
51336
51333
|
var require_browser = __commonJS({
|
|
51337
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51334
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports, module2) {
|
|
51338
51335
|
"use strict";
|
|
51339
51336
|
exports.formatArgs = formatArgs;
|
|
51340
51337
|
exports.save = save;
|
|
@@ -51502,147 +51499,120 @@ var require_browser = __commonJS({
|
|
|
51502
51499
|
}
|
|
51503
51500
|
});
|
|
51504
51501
|
|
|
51505
|
-
// ../../../../node_modules/.pnpm/
|
|
51506
|
-
var
|
|
51507
|
-
|
|
51508
|
-
|
|
51509
|
-
|
|
51510
|
-
|
|
51511
|
-
|
|
51512
|
-
|
|
51513
|
-
|
|
51514
|
-
|
|
51515
|
-
|
|
51516
|
-
}
|
|
51517
|
-
function envForceColor() {
|
|
51518
|
-
if ("FORCE_COLOR" in env) {
|
|
51519
|
-
if (env.FORCE_COLOR === "true") {
|
|
51520
|
-
return 1;
|
|
51521
|
-
}
|
|
51522
|
-
if (env.FORCE_COLOR === "false") {
|
|
51523
|
-
return 0;
|
|
51524
|
-
}
|
|
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;
|
|
51551
|
-
}
|
|
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;
|
|
51502
|
+
// ../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
51503
|
+
var require_has_flag = __commonJS({
|
|
51504
|
+
"../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
|
51505
|
+
"use strict";
|
|
51506
|
+
module2.exports = (flag, argv) => {
|
|
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
|
+
};
|
|
51565
51513
|
}
|
|
51566
|
-
|
|
51567
|
-
|
|
51568
|
-
|
|
51569
|
-
|
|
51514
|
+
});
|
|
51515
|
+
|
|
51516
|
+
// ../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
51517
|
+
var require_supports_color = __commonJS({
|
|
51518
|
+
"../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
|
|
51519
|
+
"use strict";
|
|
51520
|
+
var os = require("os");
|
|
51521
|
+
var hasFlag = require_has_flag();
|
|
51522
|
+
var env = process.env;
|
|
51523
|
+
var forceColor;
|
|
51524
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
51525
|
+
forceColor = false;
|
|
51526
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
51527
|
+
forceColor = true;
|
|
51570
51528
|
}
|
|
51571
|
-
|
|
51572
|
-
|
|
51573
|
-
if ("CI" in env) {
|
|
51574
|
-
if ("GITHUB_ACTIONS" in env) {
|
|
51575
|
-
return 3;
|
|
51529
|
+
if ("FORCE_COLOR" in env) {
|
|
51530
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
51576
51531
|
}
|
|
51577
|
-
|
|
51578
|
-
|
|
51532
|
+
function translateLevel(level) {
|
|
51533
|
+
if (level === 0) {
|
|
51534
|
+
return false;
|
|
51535
|
+
}
|
|
51536
|
+
return {
|
|
51537
|
+
level,
|
|
51538
|
+
hasBasic: true,
|
|
51539
|
+
has256: level >= 2,
|
|
51540
|
+
has16m: level >= 3
|
|
51541
|
+
};
|
|
51579
51542
|
}
|
|
51580
|
-
|
|
51581
|
-
|
|
51582
|
-
|
|
51583
|
-
|
|
51584
|
-
|
|
51585
|
-
|
|
51586
|
-
|
|
51587
|
-
|
|
51588
|
-
|
|
51589
|
-
|
|
51590
|
-
|
|
51591
|
-
|
|
51592
|
-
|
|
51593
|
-
|
|
51594
|
-
|
|
51595
|
-
|
|
51543
|
+
function supportsColor(stream) {
|
|
51544
|
+
if (forceColor === false) {
|
|
51545
|
+
return 0;
|
|
51546
|
+
}
|
|
51547
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
51548
|
+
return 3;
|
|
51549
|
+
}
|
|
51550
|
+
if (hasFlag("color=256")) {
|
|
51551
|
+
return 2;
|
|
51552
|
+
}
|
|
51553
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
51554
|
+
return 0;
|
|
51555
|
+
}
|
|
51556
|
+
const min = forceColor ? 1 : 0;
|
|
51557
|
+
if (process.platform === "win32") {
|
|
51558
|
+
const osRelease = os.release().split(".");
|
|
51559
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
51560
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
51561
|
+
}
|
|
51562
|
+
return 1;
|
|
51563
|
+
}
|
|
51564
|
+
if ("CI" in env) {
|
|
51565
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
51566
|
+
return 1;
|
|
51567
|
+
}
|
|
51568
|
+
return min;
|
|
51569
|
+
}
|
|
51570
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
51571
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
51572
|
+
}
|
|
51573
|
+
if (env.COLORTERM === "truecolor") {
|
|
51574
|
+
return 3;
|
|
51596
51575
|
}
|
|
51597
|
-
|
|
51576
|
+
if ("TERM_PROGRAM" in env) {
|
|
51577
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
51578
|
+
switch (env.TERM_PROGRAM) {
|
|
51579
|
+
case "iTerm.app":
|
|
51580
|
+
return version >= 3 ? 3 : 2;
|
|
51581
|
+
case "Apple_Terminal":
|
|
51582
|
+
return 2;
|
|
51583
|
+
}
|
|
51584
|
+
}
|
|
51585
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
51598
51586
|
return 2;
|
|
51599
51587
|
}
|
|
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;
|
|
51600
51598
|
}
|
|
51601
|
-
|
|
51602
|
-
|
|
51603
|
-
|
|
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;
|
|
51599
|
+
function getSupportLevel(stream) {
|
|
51600
|
+
const level = supportsColor(stream);
|
|
51601
|
+
return translateLevel(level);
|
|
51632
51602
|
}
|
|
51633
|
-
|
|
51634
|
-
|
|
51635
|
-
|
|
51603
|
+
module2.exports = {
|
|
51604
|
+
supportsColor: getSupportLevel,
|
|
51605
|
+
stdout: getSupportLevel(process.stdout),
|
|
51606
|
+
stderr: getSupportLevel(process.stderr)
|
|
51636
51607
|
};
|
|
51637
|
-
supports_color_default = supportsColor;
|
|
51638
51608
|
}
|
|
51639
51609
|
});
|
|
51640
51610
|
|
|
51641
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51611
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js
|
|
51642
51612
|
var require_node2 = __commonJS({
|
|
51643
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51613
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js"(exports, module2) {
|
|
51644
51614
|
"use strict";
|
|
51645
|
-
var
|
|
51615
|
+
var tty = require("tty");
|
|
51646
51616
|
var util = require("util");
|
|
51647
51617
|
exports.init = init;
|
|
51648
51618
|
exports.log = log;
|
|
@@ -51657,8 +51627,8 @@ var require_node2 = __commonJS({
|
|
|
51657
51627
|
);
|
|
51658
51628
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
51659
51629
|
try {
|
|
51660
|
-
const
|
|
51661
|
-
if (
|
|
51630
|
+
const supportsColor = require_supports_color();
|
|
51631
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
51662
51632
|
exports.colors = [
|
|
51663
51633
|
20,
|
|
51664
51634
|
21,
|
|
@@ -51760,7 +51730,7 @@ var require_node2 = __commonJS({
|
|
|
51760
51730
|
return obj;
|
|
51761
51731
|
}, {});
|
|
51762
51732
|
function useColors() {
|
|
51763
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) :
|
|
51733
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
51764
51734
|
}
|
|
51765
51735
|
function formatArgs(args) {
|
|
51766
51736
|
const { namespace: name, useColors: useColors2 } = this;
|
|
@@ -51813,9 +51783,9 @@ var require_node2 = __commonJS({
|
|
|
51813
51783
|
}
|
|
51814
51784
|
});
|
|
51815
51785
|
|
|
51816
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51786
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js
|
|
51817
51787
|
var require_src3 = __commonJS({
|
|
51818
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
51788
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js"(exports, module2) {
|
|
51819
51789
|
"use strict";
|
|
51820
51790
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
51821
51791
|
module2.exports = require_browser();
|
|
@@ -52802,7 +52772,6 @@ var ZH_LOCALE = {
|
|
|
52802
52772
|
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
52803
52773
|
proxy: "启用「全局代理」",
|
|
52804
52774
|
swc: "启用「SWC 编译」",
|
|
52805
|
-
rspack: "启用「Rspack 构建」(实验性)",
|
|
52806
52775
|
module_doc: "启动「模块文档」功能"
|
|
52807
52776
|
},
|
|
52808
52777
|
element: {
|
|
@@ -52901,7 +52870,6 @@ var EN_LOCALE = {
|
|
|
52901
52870
|
polyfill: "Enable UA-based Polyfill Feature",
|
|
52902
52871
|
proxy: "Enable Global Proxy",
|
|
52903
52872
|
swc: "Enable SWC Compile",
|
|
52904
|
-
rspack: "Enable Rspack Build (experimental)",
|
|
52905
52873
|
module_doc: "Enable Module Doc"
|
|
52906
52874
|
},
|
|
52907
52875
|
element: {
|
|
@@ -53080,7 +53048,6 @@ var ActionFunction;
|
|
|
53080
53048
|
ActionFunction2["Polyfill"] = "polyfill";
|
|
53081
53049
|
ActionFunction2["Proxy"] = "proxy";
|
|
53082
53050
|
ActionFunction2["SWC"] = "swc";
|
|
53083
|
-
ActionFunction2["Rspack"] = "rspack";
|
|
53084
53051
|
ActionFunction2["ModuleDoc"] = "module_doc";
|
|
53085
53052
|
})(ActionFunction || (ActionFunction = {}));
|
|
53086
53053
|
var ActionRefactor;
|
|
@@ -53095,7 +53062,6 @@ var MWAActionTypes = [
|
|
|
53095
53062
|
ActionType.Refactor
|
|
53096
53063
|
];
|
|
53097
53064
|
var MWAActionFunctions = [
|
|
53098
|
-
ActionFunction.Rspack,
|
|
53099
53065
|
ActionFunction.TailwindCSS,
|
|
53100
53066
|
ActionFunction.BFF,
|
|
53101
53067
|
ActionFunction.SSG,
|
|
@@ -53159,8 +53125,7 @@ var MWANewActionGenerators = {
|
|
|
53159
53125
|
[ActionFunction.SSG]: "@modern-js/ssg-generator",
|
|
53160
53126
|
[ActionFunction.Polyfill]: "@modern-js/dependence-generator",
|
|
53161
53127
|
[ActionFunction.Proxy]: "@modern-js/dependence-generator",
|
|
53162
|
-
[ActionFunction.SWC]: "@modern-js/dependence-generator"
|
|
53163
|
-
[ActionFunction.Rspack]: "@modern-js/rspack-generator"
|
|
53128
|
+
[ActionFunction.SWC]: "@modern-js/dependence-generator"
|
|
53164
53129
|
},
|
|
53165
53130
|
[ActionType.Refactor]: {
|
|
53166
53131
|
[ActionRefactor.ReactRouter5]: "@modern-js/router-v5-generator"
|
|
@@ -53415,12 +53380,12 @@ function _define_property2(obj, key, value) {
|
|
|
53415
53380
|
return obj;
|
|
53416
53381
|
}
|
|
53417
53382
|
|
|
53418
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
53383
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
53419
53384
|
var import_utils18 = require("@modern-js/utils");
|
|
53420
53385
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
53421
53386
|
var import_comment_json = __toESM(require_src2());
|
|
53422
53387
|
|
|
53423
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53388
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
53424
53389
|
var import_utils6 = require("@modern-js/utils");
|
|
53425
53390
|
async function canUseNvm() {
|
|
53426
53391
|
try {
|
|
@@ -53470,7 +53435,7 @@ async function canUsePnpm3() {
|
|
|
53470
53435
|
}
|
|
53471
53436
|
}
|
|
53472
53437
|
|
|
53473
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53438
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
53474
53439
|
var import_utils7 = require("@modern-js/utils");
|
|
53475
53440
|
function execaWithStreamLog(command, args, options) {
|
|
53476
53441
|
const promise = (0, import_utils7.execa)(command, args, {
|
|
@@ -53566,7 +53531,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53566
53531
|
throw new Error("please install pnpm first");
|
|
53567
53532
|
}
|
|
53568
53533
|
|
|
53569
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53534
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53570
53535
|
var NpmAPI = class {
|
|
53571
53536
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53572
53537
|
return npmInstall({
|
|
@@ -53595,7 +53560,7 @@ var NpmAPI = class {
|
|
|
53595
53560
|
}
|
|
53596
53561
|
};
|
|
53597
53562
|
|
|
53598
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53563
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
53599
53564
|
var import_utils9 = require("@modern-js/utils");
|
|
53600
53565
|
async function canUseGit() {
|
|
53601
53566
|
try {
|
|
@@ -53670,7 +53635,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
53670
53635
|
});
|
|
53671
53636
|
}
|
|
53672
53637
|
|
|
53673
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53638
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
53674
53639
|
var GitAPI = class {
|
|
53675
53640
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
53676
53641
|
const canUse = await canUseGit();
|
|
@@ -53722,12 +53687,12 @@ var GitAPI = class {
|
|
|
53722
53687
|
}
|
|
53723
53688
|
};
|
|
53724
53689
|
|
|
53725
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53690
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
53726
53691
|
var import_path2 = __toESM(require("path"));
|
|
53727
53692
|
var import_utils11 = require("@modern-js/utils");
|
|
53728
53693
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
53729
53694
|
|
|
53730
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53695
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
53731
53696
|
var import_utils12 = require("@modern-js/utils");
|
|
53732
53697
|
async function fsExists(path6) {
|
|
53733
53698
|
try {
|
|
@@ -53738,7 +53703,7 @@ async function fsExists(path6) {
|
|
|
53738
53703
|
}
|
|
53739
53704
|
}
|
|
53740
53705
|
|
|
53741
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53706
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
53742
53707
|
var import_handlebars = __toESM(require_lib());
|
|
53743
53708
|
function renderString(template, fullData, registers) {
|
|
53744
53709
|
const helpers = {
|
|
@@ -53752,7 +53717,7 @@ function renderString(template, fullData, registers) {
|
|
|
53752
53717
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
53753
53718
|
}
|
|
53754
53719
|
|
|
53755
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53720
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
53756
53721
|
var HandlebarsAPI = class {
|
|
53757
53722
|
async registerHelp(helpers) {
|
|
53758
53723
|
this.registers.helpers = {
|
|
@@ -53802,13 +53767,13 @@ var HandlebarsAPI = class {
|
|
|
53802
53767
|
}
|
|
53803
53768
|
};
|
|
53804
53769
|
|
|
53805
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53770
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
53806
53771
|
var import_ejs = __toESM(require_ejs());
|
|
53807
53772
|
function renderString2(template, fullData) {
|
|
53808
53773
|
return import_ejs.default.render(template, fullData) || "";
|
|
53809
53774
|
}
|
|
53810
53775
|
|
|
53811
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53776
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
53812
53777
|
var EjsAPI = class {
|
|
53813
53778
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
53814
53779
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -53841,7 +53806,7 @@ var EjsAPI = class {
|
|
|
53841
53806
|
}
|
|
53842
53807
|
};
|
|
53843
53808
|
|
|
53844
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
53809
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
53845
53810
|
var import_path3 = __toESM(require("path"));
|
|
53846
53811
|
var import_utils15 = require("@modern-js/utils");
|
|
53847
53812
|
var FsAPI = class {
|
|
@@ -63425,10 +63390,10 @@ var Schema = (
|
|
|
63425
63390
|
}()
|
|
63426
63391
|
);
|
|
63427
63392
|
|
|
63428
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63393
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
63429
63394
|
var import_inquirer = __toESM(require_inquirer());
|
|
63430
63395
|
|
|
63431
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63396
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
63432
63397
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
63433
63398
|
function validateSchema(schema) {
|
|
63434
63399
|
const { type, properties } = schema;
|
|
@@ -63520,7 +63485,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
63520
63485
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
63521
63486
|
}
|
|
63522
63487
|
|
|
63523
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63488
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
63524
63489
|
var compileRule = (rule, scope) => {
|
|
63525
63490
|
const state = Schema.compile(rule, {
|
|
63526
63491
|
$self: {},
|
|
@@ -63624,7 +63589,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
63624
63589
|
return answers;
|
|
63625
63590
|
}
|
|
63626
63591
|
|
|
63627
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63592
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
63628
63593
|
var CLIReader = class {
|
|
63629
63594
|
getAnswers() {
|
|
63630
63595
|
return this.answers;
|
|
@@ -63655,7 +63620,7 @@ var CLIReader = class {
|
|
|
63655
63620
|
}
|
|
63656
63621
|
};
|
|
63657
63622
|
|
|
63658
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63623
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63659
63624
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
63660
63625
|
|
|
63661
63626
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -63721,7 +63686,7 @@ var I18n2 = class {
|
|
|
63721
63686
|
}
|
|
63722
63687
|
};
|
|
63723
63688
|
|
|
63724
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63689
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
63725
63690
|
var ZH_LOCALE2 = {
|
|
63726
63691
|
environment: {
|
|
63727
63692
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63748,7 +63713,7 @@ var ZH_LOCALE2 = {
|
|
|
63748
63713
|
}
|
|
63749
63714
|
};
|
|
63750
63715
|
|
|
63751
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63716
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
63752
63717
|
var EN_LOCALE2 = {
|
|
63753
63718
|
environment: {
|
|
63754
63719
|
node_version: "please upgrade node to lts version",
|
|
@@ -63775,14 +63740,14 @@ var EN_LOCALE2 = {
|
|
|
63775
63740
|
}
|
|
63776
63741
|
};
|
|
63777
63742
|
|
|
63778
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63743
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
63779
63744
|
var i18n2 = new I18n2();
|
|
63780
63745
|
var localeKeys2 = i18n2.init("zh", {
|
|
63781
63746
|
zh: ZH_LOCALE2,
|
|
63782
63747
|
en: EN_LOCALE2
|
|
63783
63748
|
});
|
|
63784
63749
|
|
|
63785
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63750
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
63786
63751
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
63787
63752
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63788
63753
|
for (const question of questions) {
|
|
@@ -63810,7 +63775,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63810
63775
|
return questions;
|
|
63811
63776
|
}
|
|
63812
63777
|
|
|
63813
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63778
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
63814
63779
|
var import_path5 = __toESM(require("path"));
|
|
63815
63780
|
var import_utils17 = require("@modern-js/utils");
|
|
63816
63781
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63858,7 +63823,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63858
63823
|
}
|
|
63859
63824
|
}
|
|
63860
63825
|
|
|
63861
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63826
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63862
63827
|
var AppAPI = class {
|
|
63863
63828
|
async checkEnvironment(nodeVersion) {
|
|
63864
63829
|
if (import_utils18.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -64098,11 +64063,11 @@ var AppAPI = class {
|
|
|
64098
64063
|
}
|
|
64099
64064
|
};
|
|
64100
64065
|
|
|
64101
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64066
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.4/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64102
64067
|
var import_comment_json2 = __toESM(require_src2());
|
|
64103
64068
|
var declarationUpdate = __toESM(require_dist());
|
|
64104
64069
|
|
|
64105
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64070
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.4/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
64106
64071
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
64107
64072
|
const originJsonValue = await resource.value();
|
|
64108
64073
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -64115,7 +64080,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
64115
64080
|
return newJsonString;
|
|
64116
64081
|
}
|
|
64117
64082
|
|
|
64118
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64083
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.4/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64119
64084
|
var JsonAPI = class {
|
|
64120
64085
|
async get(resource) {
|
|
64121
64086
|
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.3.
|
|
18
|
+
"version": "3.3.9",
|
|
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.
|
|
27
|
+
"@modern-js/utils": "2.47.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@modern-js/codesmith": "2.3.
|
|
31
|
-
"@modern-js/codesmith-api-app": "2.3.
|
|
32
|
-
"@modern-js/codesmith-api-json": "2.3.
|
|
30
|
+
"@modern-js/codesmith": "2.3.4",
|
|
31
|
+
"@modern-js/codesmith-api-app": "2.3.4",
|
|
32
|
+
"@modern-js/codesmith-api-json": "2.3.4",
|
|
33
33
|
"@types/jest": "^29",
|
|
34
34
|
"@types/node": "^14",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
-
"@modern-js/generator-common": "3.3.
|
|
38
|
-
"@modern-js/
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@scripts/jest-config": "2.
|
|
37
|
+
"@modern-js/generator-common": "3.3.9",
|
|
38
|
+
"@modern-js/plugin-i18n": "2.47.0",
|
|
39
|
+
"@modern-js/generator-utils": "3.3.9",
|
|
40
|
+
"@scripts/build": "2.47.0",
|
|
41
|
+
"@scripts/jest-config": "2.47.0"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|