@modern-js/upgrade-generator 3.1.26 → 3.1.28
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 +203 -236
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -22,6 +22,9 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
return a;
|
|
23
23
|
};
|
|
24
24
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __esm = (fn, res) => function __init() {
|
|
26
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
27
|
+
};
|
|
25
28
|
var __commonJS = (cb, mod) => function __require() {
|
|
26
29
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27
30
|
};
|
|
@@ -3500,13 +3503,13 @@ var require_chalk = __commonJS({
|
|
|
3500
3503
|
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
|
3501
3504
|
}
|
|
3502
3505
|
}
|
|
3503
|
-
function
|
|
3506
|
+
function translateLevel2(e3) {
|
|
3504
3507
|
if (e3 === 0) {
|
|
3505
3508
|
return false;
|
|
3506
3509
|
}
|
|
3507
3510
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
3508
3511
|
}
|
|
3509
|
-
function
|
|
3512
|
+
function supportsColor2(e3, t3) {
|
|
3510
3513
|
if (c === 0) {
|
|
3511
3514
|
return 0;
|
|
3512
3515
|
}
|
|
@@ -3563,10 +3566,10 @@ var require_chalk = __commonJS({
|
|
|
3563
3566
|
return n3;
|
|
3564
3567
|
}
|
|
3565
3568
|
function getSupportLevel(e3) {
|
|
3566
|
-
const t3 =
|
|
3567
|
-
return
|
|
3569
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
|
3570
|
+
return translateLevel2(t3);
|
|
3568
3571
|
}
|
|
3569
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
|
3572
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, s.isatty(1))), stderr: translateLevel2(supportsColor2(true, s.isatty(2))) };
|
|
3570
3573
|
}, 37: (e2) => {
|
|
3571
3574
|
"use strict";
|
|
3572
3575
|
e2.exports = require("os");
|
|
@@ -12641,13 +12644,13 @@ var require_debug = __commonJS({
|
|
|
12641
12644
|
c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
|
|
12642
12645
|
}
|
|
12643
12646
|
}
|
|
12644
|
-
function
|
|
12647
|
+
function translateLevel2(e3) {
|
|
12645
12648
|
if (e3 === 0) {
|
|
12646
12649
|
return false;
|
|
12647
12650
|
}
|
|
12648
12651
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
12649
12652
|
}
|
|
12650
|
-
function
|
|
12653
|
+
function supportsColor2(e3, t3) {
|
|
12651
12654
|
if (c === 0) {
|
|
12652
12655
|
return 0;
|
|
12653
12656
|
}
|
|
@@ -12704,10 +12707,10 @@ var require_debug = __commonJS({
|
|
|
12704
12707
|
return r3;
|
|
12705
12708
|
}
|
|
12706
12709
|
function getSupportLevel(e3) {
|
|
12707
|
-
const t3 =
|
|
12708
|
-
return
|
|
12710
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
|
12711
|
+
return translateLevel2(t3);
|
|
12709
12712
|
}
|
|
12710
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
|
12713
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, n.isatty(1))), stderr: translateLevel2(supportsColor2(true, n.isatty(2))) };
|
|
12711
12714
|
}, 37: (e2) => {
|
|
12712
12715
|
"use strict";
|
|
12713
12716
|
e2.exports = require("os");
|
|
@@ -43528,15 +43531,15 @@ var require_runtime = __commonJS({
|
|
|
43528
43531
|
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] + ").");
|
|
43529
43532
|
}
|
|
43530
43533
|
}
|
|
43531
|
-
function template(templateSpec,
|
|
43532
|
-
if (!
|
|
43534
|
+
function template(templateSpec, env2) {
|
|
43535
|
+
if (!env2) {
|
|
43533
43536
|
throw new _exception2["default"]("No environment passed to template");
|
|
43534
43537
|
}
|
|
43535
43538
|
if (!templateSpec || !templateSpec.main) {
|
|
43536
43539
|
throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
|
|
43537
43540
|
}
|
|
43538
43541
|
templateSpec.main.decorator = templateSpec.main_d;
|
|
43539
|
-
|
|
43542
|
+
env2.VM.checkRevision(templateSpec.compiler);
|
|
43540
43543
|
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
|
43541
43544
|
function invokePartialWrapper(partial, context, options) {
|
|
43542
43545
|
if (options.hash) {
|
|
@@ -43545,14 +43548,14 @@ var require_runtime = __commonJS({
|
|
|
43545
43548
|
options.ids[0] = true;
|
|
43546
43549
|
}
|
|
43547
43550
|
}
|
|
43548
|
-
partial =
|
|
43551
|
+
partial = env2.VM.resolvePartial.call(this, partial, context, options);
|
|
43549
43552
|
var extendedOptions = Utils.extend({}, options, {
|
|
43550
43553
|
hooks: this.hooks,
|
|
43551
43554
|
protoAccessControl: this.protoAccessControl
|
|
43552
43555
|
});
|
|
43553
|
-
var result =
|
|
43554
|
-
if (result == null &&
|
|
43555
|
-
options.partials[options.name] =
|
|
43556
|
+
var result = env2.VM.invokePartial.call(this, partial, context, extendedOptions);
|
|
43557
|
+
if (result == null && env2.compile) {
|
|
43558
|
+
options.partials[options.name] = env2.compile(partial, templateSpec.compilerOptions, env2);
|
|
43556
43559
|
result = options.partials[options.name](context, extendedOptions);
|
|
43557
43560
|
}
|
|
43558
43561
|
if (result != null) {
|
|
@@ -43637,7 +43640,7 @@ var require_runtime = __commonJS({
|
|
|
43637
43640
|
},
|
|
43638
43641
|
// An empty object to use as replacement for null-contexts
|
|
43639
43642
|
nullContext: Object.seal({}),
|
|
43640
|
-
noop:
|
|
43643
|
+
noop: env2.VM.noop,
|
|
43641
43644
|
compilerInfo: templateSpec.compiler
|
|
43642
43645
|
};
|
|
43643
43646
|
function ret(context) {
|
|
@@ -43664,14 +43667,14 @@ var require_runtime = __commonJS({
|
|
|
43664
43667
|
ret.isTop = true;
|
|
43665
43668
|
ret._setup = function(options) {
|
|
43666
43669
|
if (!options.partial) {
|
|
43667
|
-
var mergedHelpers = Utils.extend({},
|
|
43670
|
+
var mergedHelpers = Utils.extend({}, env2.helpers, options.helpers);
|
|
43668
43671
|
wrapHelpersToPassLookupProperty(mergedHelpers, container);
|
|
43669
43672
|
container.helpers = mergedHelpers;
|
|
43670
43673
|
if (templateSpec.usePartial) {
|
|
43671
|
-
container.partials = container.mergeIfNeeded(options.partials,
|
|
43674
|
+
container.partials = container.mergeIfNeeded(options.partials, env2.partials);
|
|
43672
43675
|
}
|
|
43673
43676
|
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
|
43674
|
-
container.decorators = Utils.extend({},
|
|
43677
|
+
container.decorators = Utils.extend({}, env2.decorators, options.decorators);
|
|
43675
43678
|
}
|
|
43676
43679
|
container.hooks = {};
|
|
43677
43680
|
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
|
@@ -45473,7 +45476,7 @@ var require_compiler = __commonJS({
|
|
|
45473
45476
|
}
|
|
45474
45477
|
}
|
|
45475
45478
|
};
|
|
45476
|
-
function precompile(input, options,
|
|
45479
|
+
function precompile(input, options, env2) {
|
|
45477
45480
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
|
45478
45481
|
throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
|
|
45479
45482
|
}
|
|
@@ -45484,10 +45487,10 @@ var require_compiler = __commonJS({
|
|
|
45484
45487
|
if (options.compat) {
|
|
45485
45488
|
options.useDepths = true;
|
|
45486
45489
|
}
|
|
45487
|
-
var ast =
|
|
45488
|
-
return new
|
|
45490
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options);
|
|
45491
|
+
return new env2.JavaScriptCompiler().compile(environment, options);
|
|
45489
45492
|
}
|
|
45490
|
-
function compile2(input, options,
|
|
45493
|
+
function compile2(input, options, env2) {
|
|
45491
45494
|
if (options === void 0)
|
|
45492
45495
|
options = {};
|
|
45493
45496
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
|
@@ -45502,8 +45505,8 @@ var require_compiler = __commonJS({
|
|
|
45502
45505
|
}
|
|
45503
45506
|
var compiled = void 0;
|
|
45504
45507
|
function compileInput() {
|
|
45505
|
-
var ast =
|
|
45506
|
-
return
|
|
45508
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options), templateSpec = new env2.JavaScriptCompiler().compile(environment, options, void 0, true);
|
|
45509
|
+
return env2.template(templateSpec);
|
|
45507
45510
|
}
|
|
45508
45511
|
function ret(context, execOptions) {
|
|
45509
45512
|
if (!compiled) {
|
|
@@ -54107,7 +54110,7 @@ var require_innerFrom = __commonJS({
|
|
|
54107
54110
|
exports.fromIterable = fromIterable;
|
|
54108
54111
|
function fromAsyncIterable(asyncIterable) {
|
|
54109
54112
|
return new Observable_1.Observable(function(subscriber) {
|
|
54110
|
-
|
|
54113
|
+
process3(asyncIterable, subscriber).catch(function(err) {
|
|
54111
54114
|
return subscriber.error(err);
|
|
54112
54115
|
});
|
|
54113
54116
|
});
|
|
@@ -54117,7 +54120,7 @@ var require_innerFrom = __commonJS({
|
|
|
54117
54120
|
return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
|
|
54118
54121
|
}
|
|
54119
54122
|
exports.fromReadableStreamLike = fromReadableStreamLike;
|
|
54120
|
-
function
|
|
54123
|
+
function process3(asyncIterable, subscriber) {
|
|
54121
54124
|
var asyncIterable_1, asyncIterable_1_1;
|
|
54122
54125
|
var e_2, _a2;
|
|
54123
54126
|
return __awaiter6(this, void 0, void 0, function() {
|
|
@@ -61396,11 +61399,11 @@ var require_signals = __commonJS({
|
|
|
61396
61399
|
// ../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
61397
61400
|
var require_signal_exit = __commonJS({
|
|
61398
61401
|
"../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
61399
|
-
var
|
|
61400
|
-
var processOk = function(
|
|
61401
|
-
return
|
|
61402
|
+
var process3 = global.process;
|
|
61403
|
+
var processOk = function(process4) {
|
|
61404
|
+
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";
|
|
61402
61405
|
};
|
|
61403
|
-
if (!processOk(
|
|
61406
|
+
if (!processOk(process3)) {
|
|
61404
61407
|
module2.exports = function() {
|
|
61405
61408
|
return function() {
|
|
61406
61409
|
};
|
|
@@ -61408,15 +61411,15 @@ var require_signal_exit = __commonJS({
|
|
|
61408
61411
|
} else {
|
|
61409
61412
|
assert = require("assert");
|
|
61410
61413
|
signals = require_signals();
|
|
61411
|
-
isWin = /^win/i.test(
|
|
61414
|
+
isWin = /^win/i.test(process3.platform);
|
|
61412
61415
|
EE = require("events");
|
|
61413
61416
|
if (typeof EE !== "function") {
|
|
61414
61417
|
EE = EE.EventEmitter;
|
|
61415
61418
|
}
|
|
61416
|
-
if (
|
|
61417
|
-
emitter =
|
|
61419
|
+
if (process3.__signal_exit_emitter__) {
|
|
61420
|
+
emitter = process3.__signal_exit_emitter__;
|
|
61418
61421
|
} else {
|
|
61419
|
-
emitter =
|
|
61422
|
+
emitter = process3.__signal_exit_emitter__ = new EE();
|
|
61420
61423
|
emitter.count = 0;
|
|
61421
61424
|
emitter.emitted = {};
|
|
61422
61425
|
}
|
|
@@ -61453,12 +61456,12 @@ var require_signal_exit = __commonJS({
|
|
|
61453
61456
|
loaded = false;
|
|
61454
61457
|
signals.forEach(function(sig) {
|
|
61455
61458
|
try {
|
|
61456
|
-
|
|
61459
|
+
process3.removeListener(sig, sigListeners[sig]);
|
|
61457
61460
|
} catch (er) {
|
|
61458
61461
|
}
|
|
61459
61462
|
});
|
|
61460
|
-
|
|
61461
|
-
|
|
61463
|
+
process3.emit = originalProcessEmit;
|
|
61464
|
+
process3.reallyExit = originalProcessReallyExit;
|
|
61462
61465
|
emitter.count -= 1;
|
|
61463
61466
|
};
|
|
61464
61467
|
module2.exports.unload = unload;
|
|
@@ -61475,7 +61478,7 @@ var require_signal_exit = __commonJS({
|
|
|
61475
61478
|
if (!processOk(global.process)) {
|
|
61476
61479
|
return;
|
|
61477
61480
|
}
|
|
61478
|
-
var listeners =
|
|
61481
|
+
var listeners = process3.listeners(sig);
|
|
61479
61482
|
if (listeners.length === emitter.count) {
|
|
61480
61483
|
unload();
|
|
61481
61484
|
emit("exit", null, sig);
|
|
@@ -61483,7 +61486,7 @@ var require_signal_exit = __commonJS({
|
|
|
61483
61486
|
if (isWin && sig === "SIGHUP") {
|
|
61484
61487
|
sig = "SIGINT";
|
|
61485
61488
|
}
|
|
61486
|
-
|
|
61489
|
+
process3.kill(process3.pid, sig);
|
|
61487
61490
|
}
|
|
61488
61491
|
};
|
|
61489
61492
|
});
|
|
@@ -61499,36 +61502,36 @@ var require_signal_exit = __commonJS({
|
|
|
61499
61502
|
emitter.count += 1;
|
|
61500
61503
|
signals = signals.filter(function(sig) {
|
|
61501
61504
|
try {
|
|
61502
|
-
|
|
61505
|
+
process3.on(sig, sigListeners[sig]);
|
|
61503
61506
|
return true;
|
|
61504
61507
|
} catch (er) {
|
|
61505
61508
|
return false;
|
|
61506
61509
|
}
|
|
61507
61510
|
});
|
|
61508
|
-
|
|
61509
|
-
|
|
61511
|
+
process3.emit = processEmit;
|
|
61512
|
+
process3.reallyExit = processReallyExit;
|
|
61510
61513
|
};
|
|
61511
61514
|
module2.exports.load = load;
|
|
61512
|
-
originalProcessReallyExit =
|
|
61515
|
+
originalProcessReallyExit = process3.reallyExit;
|
|
61513
61516
|
processReallyExit = function processReallyExit2(code) {
|
|
61514
61517
|
if (!processOk(global.process)) {
|
|
61515
61518
|
return;
|
|
61516
61519
|
}
|
|
61517
|
-
|
|
61520
|
+
process3.exitCode = code || /* istanbul ignore next */
|
|
61518
61521
|
0;
|
|
61519
|
-
emit("exit",
|
|
61520
|
-
emit("afterexit",
|
|
61521
|
-
originalProcessReallyExit.call(
|
|
61522
|
+
emit("exit", process3.exitCode, null);
|
|
61523
|
+
emit("afterexit", process3.exitCode, null);
|
|
61524
|
+
originalProcessReallyExit.call(process3, process3.exitCode);
|
|
61522
61525
|
};
|
|
61523
|
-
originalProcessEmit =
|
|
61526
|
+
originalProcessEmit = process3.emit;
|
|
61524
61527
|
processEmit = function processEmit2(ev, arg) {
|
|
61525
61528
|
if (ev === "exit" && processOk(global.process)) {
|
|
61526
61529
|
if (arg !== void 0) {
|
|
61527
|
-
|
|
61530
|
+
process3.exitCode = arg;
|
|
61528
61531
|
}
|
|
61529
61532
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
61530
|
-
emit("exit",
|
|
61531
|
-
emit("afterexit",
|
|
61533
|
+
emit("exit", process3.exitCode, null);
|
|
61534
|
+
emit("afterexit", process3.exitCode, null);
|
|
61532
61535
|
return ret;
|
|
61533
61536
|
} else {
|
|
61534
61537
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -84457,10 +84460,10 @@ var require_ms = __commonJS({
|
|
|
84457
84460
|
}
|
|
84458
84461
|
});
|
|
84459
84462
|
|
|
84460
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
84463
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js
|
|
84461
84464
|
var require_common2 = __commonJS({
|
|
84462
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
84463
|
-
function setup(
|
|
84465
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js"(exports, module2) {
|
|
84466
|
+
function setup(env2) {
|
|
84464
84467
|
createDebug.debug = createDebug;
|
|
84465
84468
|
createDebug.default = createDebug;
|
|
84466
84469
|
createDebug.coerce = coerce;
|
|
@@ -84469,8 +84472,8 @@ var require_common2 = __commonJS({
|
|
|
84469
84472
|
createDebug.enabled = enabled;
|
|
84470
84473
|
createDebug.humanize = require_ms();
|
|
84471
84474
|
createDebug.destroy = destroy2;
|
|
84472
|
-
Object.keys(
|
|
84473
|
-
createDebug[key] =
|
|
84475
|
+
Object.keys(env2).forEach((key) => {
|
|
84476
|
+
createDebug[key] = env2[key];
|
|
84474
84477
|
});
|
|
84475
84478
|
createDebug.names = [];
|
|
84476
84479
|
createDebug.skips = [];
|
|
@@ -84620,9 +84623,9 @@ var require_common2 = __commonJS({
|
|
|
84620
84623
|
}
|
|
84621
84624
|
});
|
|
84622
84625
|
|
|
84623
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
84626
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js
|
|
84624
84627
|
var require_browser = __commonJS({
|
|
84625
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
84628
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js"(exports, module2) {
|
|
84626
84629
|
exports.formatArgs = formatArgs;
|
|
84627
84630
|
exports.save = save;
|
|
84628
84631
|
exports.load = load;
|
|
@@ -84789,136 +84792,144 @@ var require_browser = __commonJS({
|
|
|
84789
84792
|
}
|
|
84790
84793
|
});
|
|
84791
84794
|
|
|
84792
|
-
// ../../../../node_modules/.pnpm/
|
|
84793
|
-
var
|
|
84794
|
-
|
|
84795
|
-
|
|
84796
|
-
|
|
84797
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
84798
|
-
const position = argv.indexOf(prefix + flag);
|
|
84799
|
-
const terminatorPosition = argv.indexOf("--");
|
|
84800
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
84801
|
-
};
|
|
84802
|
-
}
|
|
84795
|
+
// ../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js
|
|
84796
|
+
var supports_color_exports = {};
|
|
84797
|
+
__export(supports_color_exports, {
|
|
84798
|
+
createSupportsColor: () => createSupportsColor,
|
|
84799
|
+
default: () => supports_color_default
|
|
84803
84800
|
});
|
|
84804
|
-
|
|
84805
|
-
|
|
84806
|
-
|
|
84807
|
-
|
|
84808
|
-
|
|
84809
|
-
|
|
84810
|
-
|
|
84811
|
-
|
|
84812
|
-
|
|
84813
|
-
|
|
84814
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
84815
|
-
flagForceColor = 0;
|
|
84816
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
84817
|
-
flagForceColor = 1;
|
|
84801
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
84802
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
84803
|
+
const position = argv.indexOf(prefix + flag);
|
|
84804
|
+
const terminatorPosition = argv.indexOf("--");
|
|
84805
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
84806
|
+
}
|
|
84807
|
+
function envForceColor() {
|
|
84808
|
+
if ("FORCE_COLOR" in env) {
|
|
84809
|
+
if (env.FORCE_COLOR === "true") {
|
|
84810
|
+
return 1;
|
|
84818
84811
|
}
|
|
84819
|
-
|
|
84820
|
-
|
|
84821
|
-
if (env.FORCE_COLOR === "true") {
|
|
84822
|
-
return 1;
|
|
84823
|
-
}
|
|
84824
|
-
if (env.FORCE_COLOR === "false") {
|
|
84825
|
-
return 0;
|
|
84826
|
-
}
|
|
84827
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
84828
|
-
}
|
|
84812
|
+
if (env.FORCE_COLOR === "false") {
|
|
84813
|
+
return 0;
|
|
84829
84814
|
}
|
|
84830
|
-
|
|
84831
|
-
|
|
84832
|
-
|
|
84833
|
-
|
|
84834
|
-
|
|
84835
|
-
|
|
84836
|
-
|
|
84837
|
-
|
|
84838
|
-
|
|
84839
|
-
|
|
84815
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
84816
|
+
}
|
|
84817
|
+
}
|
|
84818
|
+
function translateLevel(level) {
|
|
84819
|
+
if (level === 0) {
|
|
84820
|
+
return false;
|
|
84821
|
+
}
|
|
84822
|
+
return {
|
|
84823
|
+
level,
|
|
84824
|
+
hasBasic: true,
|
|
84825
|
+
has256: level >= 2,
|
|
84826
|
+
has16m: level >= 3
|
|
84827
|
+
};
|
|
84828
|
+
}
|
|
84829
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
84830
|
+
const noFlagForceColor = envForceColor();
|
|
84831
|
+
if (noFlagForceColor !== void 0) {
|
|
84832
|
+
flagForceColor = noFlagForceColor;
|
|
84833
|
+
}
|
|
84834
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
84835
|
+
if (forceColor === 0) {
|
|
84836
|
+
return 0;
|
|
84837
|
+
}
|
|
84838
|
+
if (sniffFlags) {
|
|
84839
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
84840
|
+
return 3;
|
|
84840
84841
|
}
|
|
84841
|
-
|
|
84842
|
-
|
|
84843
|
-
|
|
84844
|
-
|
|
84845
|
-
|
|
84846
|
-
|
|
84847
|
-
|
|
84848
|
-
|
|
84849
|
-
|
|
84850
|
-
|
|
84851
|
-
|
|
84852
|
-
|
|
84853
|
-
|
|
84854
|
-
|
|
84855
|
-
|
|
84856
|
-
|
|
84857
|
-
|
|
84858
|
-
|
|
84859
|
-
|
|
84860
|
-
|
|
84861
|
-
|
|
84862
|
-
|
|
84863
|
-
|
|
84864
|
-
|
|
84865
|
-
|
|
84866
|
-
|
|
84867
|
-
|
|
84868
|
-
|
|
84869
|
-
|
|
84870
|
-
|
|
84871
|
-
|
|
84872
|
-
|
|
84873
|
-
|
|
84874
|
-
|
|
84875
|
-
|
|
84876
|
-
|
|
84877
|
-
|
|
84878
|
-
|
|
84879
|
-
|
|
84880
|
-
|
|
84881
|
-
|
|
84882
|
-
|
|
84883
|
-
|
|
84884
|
-
|
|
84885
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
84886
|
-
switch (env.TERM_PROGRAM) {
|
|
84887
|
-
case "iTerm.app":
|
|
84888
|
-
return version >= 3 ? 3 : 2;
|
|
84889
|
-
case "Apple_Terminal":
|
|
84890
|
-
return 2;
|
|
84891
|
-
}
|
|
84842
|
+
if (hasFlag("color=256")) {
|
|
84843
|
+
return 2;
|
|
84844
|
+
}
|
|
84845
|
+
}
|
|
84846
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
84847
|
+
return 1;
|
|
84848
|
+
}
|
|
84849
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
84850
|
+
return 0;
|
|
84851
|
+
}
|
|
84852
|
+
const min = forceColor || 0;
|
|
84853
|
+
if (env.TERM === "dumb") {
|
|
84854
|
+
return min;
|
|
84855
|
+
}
|
|
84856
|
+
if (import_node_process.default.platform === "win32") {
|
|
84857
|
+
const osRelease = import_node_os.default.release().split(".");
|
|
84858
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
84859
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
84860
|
+
}
|
|
84861
|
+
return 1;
|
|
84862
|
+
}
|
|
84863
|
+
if ("CI" in env) {
|
|
84864
|
+
if ("GITHUB_ACTIONS" in env) {
|
|
84865
|
+
return 3;
|
|
84866
|
+
}
|
|
84867
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
84868
|
+
return 1;
|
|
84869
|
+
}
|
|
84870
|
+
return min;
|
|
84871
|
+
}
|
|
84872
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
84873
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
84874
|
+
}
|
|
84875
|
+
if (env.COLORTERM === "truecolor") {
|
|
84876
|
+
return 3;
|
|
84877
|
+
}
|
|
84878
|
+
if (env.TERM === "xterm-kitty") {
|
|
84879
|
+
return 3;
|
|
84880
|
+
}
|
|
84881
|
+
if ("TERM_PROGRAM" in env) {
|
|
84882
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
84883
|
+
switch (env.TERM_PROGRAM) {
|
|
84884
|
+
case "iTerm.app": {
|
|
84885
|
+
return version >= 3 ? 3 : 2;
|
|
84892
84886
|
}
|
|
84893
|
-
|
|
84887
|
+
case "Apple_Terminal": {
|
|
84894
84888
|
return 2;
|
|
84895
84889
|
}
|
|
84896
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
84897
|
-
return 1;
|
|
84898
|
-
}
|
|
84899
|
-
if ("COLORTERM" in env) {
|
|
84900
|
-
return 1;
|
|
84901
|
-
}
|
|
84902
|
-
return min;
|
|
84903
84890
|
}
|
|
84904
|
-
|
|
84905
|
-
|
|
84906
|
-
|
|
84907
|
-
|
|
84908
|
-
|
|
84891
|
+
}
|
|
84892
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
84893
|
+
return 2;
|
|
84894
|
+
}
|
|
84895
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
84896
|
+
return 1;
|
|
84897
|
+
}
|
|
84898
|
+
if ("COLORTERM" in env) {
|
|
84899
|
+
return 1;
|
|
84900
|
+
}
|
|
84901
|
+
return min;
|
|
84902
|
+
}
|
|
84903
|
+
function createSupportsColor(stream, options = {}) {
|
|
84904
|
+
const level = _supportsColor(stream, __spreadValues({
|
|
84905
|
+
streamIsTTY: stream && stream.isTTY
|
|
84906
|
+
}, options));
|
|
84907
|
+
return translateLevel(level);
|
|
84908
|
+
}
|
|
84909
|
+
var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
|
|
84910
|
+
var init_supports_color = __esm({
|
|
84911
|
+
"../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js"() {
|
|
84912
|
+
import_node_process = __toESM(require("process"));
|
|
84913
|
+
import_node_os = __toESM(require("os"));
|
|
84914
|
+
import_node_tty = __toESM(require("tty"));
|
|
84915
|
+
({ env } = import_node_process.default);
|
|
84916
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
84917
|
+
flagForceColor = 0;
|
|
84918
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
84919
|
+
flagForceColor = 1;
|
|
84909
84920
|
}
|
|
84910
|
-
|
|
84911
|
-
|
|
84912
|
-
|
|
84913
|
-
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
84921
|
+
supportsColor = {
|
|
84922
|
+
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
|
84923
|
+
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
|
84914
84924
|
};
|
|
84925
|
+
supports_color_default = supportsColor;
|
|
84915
84926
|
}
|
|
84916
84927
|
});
|
|
84917
84928
|
|
|
84918
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
84929
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js
|
|
84919
84930
|
var require_node2 = __commonJS({
|
|
84920
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
84921
|
-
var
|
|
84931
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js"(exports, module2) {
|
|
84932
|
+
var tty2 = require("tty");
|
|
84922
84933
|
var util = require("util");
|
|
84923
84934
|
exports.init = init;
|
|
84924
84935
|
exports.log = log;
|
|
@@ -84933,8 +84944,8 @@ var require_node2 = __commonJS({
|
|
|
84933
84944
|
);
|
|
84934
84945
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
84935
84946
|
try {
|
|
84936
|
-
const
|
|
84937
|
-
if (
|
|
84947
|
+
const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
|
|
84948
|
+
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
|
84938
84949
|
exports.colors = [
|
|
84939
84950
|
20,
|
|
84940
84951
|
21,
|
|
@@ -85036,7 +85047,7 @@ var require_node2 = __commonJS({
|
|
|
85036
85047
|
return obj;
|
|
85037
85048
|
}, {});
|
|
85038
85049
|
function useColors() {
|
|
85039
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) :
|
|
85050
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
|
85040
85051
|
}
|
|
85041
85052
|
function formatArgs(args) {
|
|
85042
85053
|
const { namespace: name, useColors: useColors2 } = this;
|
|
@@ -85089,9 +85100,9 @@ var require_node2 = __commonJS({
|
|
|
85089
85100
|
}
|
|
85090
85101
|
});
|
|
85091
85102
|
|
|
85092
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
85103
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js
|
|
85093
85104
|
var require_src3 = __commonJS({
|
|
85094
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
|
85105
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js"(exports, module2) {
|
|
85095
85106
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
85096
85107
|
module2.exports = require_browser();
|
|
85097
85108
|
} else {
|
|
@@ -89493,13 +89504,13 @@ var require_chalk2 = __commonJS({
|
|
|
89493
89504
|
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
|
89494
89505
|
}
|
|
89495
89506
|
}
|
|
89496
|
-
function
|
|
89507
|
+
function translateLevel2(e3) {
|
|
89497
89508
|
if (e3 === 0) {
|
|
89498
89509
|
return false;
|
|
89499
89510
|
}
|
|
89500
89511
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
89501
89512
|
}
|
|
89502
|
-
function
|
|
89513
|
+
function supportsColor2(e3, t3) {
|
|
89503
89514
|
if (c === 0) {
|
|
89504
89515
|
return 0;
|
|
89505
89516
|
}
|
|
@@ -89556,10 +89567,10 @@ var require_chalk2 = __commonJS({
|
|
|
89556
89567
|
return n3;
|
|
89557
89568
|
}
|
|
89558
89569
|
function getSupportLevel(e3) {
|
|
89559
|
-
const t3 =
|
|
89560
|
-
return
|
|
89570
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
|
89571
|
+
return translateLevel2(t3);
|
|
89561
89572
|
}
|
|
89562
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
|
89573
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, s.isatty(1))), stderr: translateLevel2(supportsColor2(true, s.isatty(2))) };
|
|
89563
89574
|
}, 37: (e2) => {
|
|
89564
89575
|
"use strict";
|
|
89565
89576
|
e2.exports = require("os");
|
|
@@ -98634,13 +98645,13 @@ var require_debug2 = __commonJS({
|
|
|
98634
98645
|
c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
|
|
98635
98646
|
}
|
|
98636
98647
|
}
|
|
98637
|
-
function
|
|
98648
|
+
function translateLevel2(e3) {
|
|
98638
98649
|
if (e3 === 0) {
|
|
98639
98650
|
return false;
|
|
98640
98651
|
}
|
|
98641
98652
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
98642
98653
|
}
|
|
98643
|
-
function
|
|
98654
|
+
function supportsColor2(e3, t3) {
|
|
98644
98655
|
if (c === 0) {
|
|
98645
98656
|
return 0;
|
|
98646
98657
|
}
|
|
@@ -98697,10 +98708,10 @@ var require_debug2 = __commonJS({
|
|
|
98697
98708
|
return r3;
|
|
98698
98709
|
}
|
|
98699
98710
|
function getSupportLevel(e3) {
|
|
98700
|
-
const t3 =
|
|
98701
|
-
return
|
|
98711
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
|
98712
|
+
return translateLevel2(t3);
|
|
98702
98713
|
}
|
|
98703
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
|
98714
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, n.isatty(1))), stderr: translateLevel2(supportsColor2(true, n.isatty(2))) };
|
|
98704
98715
|
}, 37: (e2) => {
|
|
98705
98716
|
"use strict";
|
|
98706
98717
|
e2.exports = require("os");
|
|
@@ -117307,49 +117318,6 @@ var require_prettyInstructions = __commonJS({
|
|
|
117307
117318
|
}
|
|
117308
117319
|
});
|
|
117309
117320
|
|
|
117310
|
-
// ../../../toolkit/utils/dist/cjs/cli/print.js
|
|
117311
|
-
var require_print = __commonJS({
|
|
117312
|
-
"../../../toolkit/utils/dist/cjs/cli/print.js"(exports) {
|
|
117313
|
-
"use strict";
|
|
117314
|
-
Object.defineProperty(exports, "__esModule", {
|
|
117315
|
-
value: true
|
|
117316
|
-
});
|
|
117317
|
-
Object.defineProperty(exports, "printBuildError", {
|
|
117318
|
-
enumerable: true,
|
|
117319
|
-
get: function() {
|
|
117320
|
-
return printBuildError;
|
|
117321
|
-
}
|
|
117322
|
-
});
|
|
117323
|
-
var _compiled = require_compiled();
|
|
117324
|
-
var _logger = require_logger2();
|
|
117325
|
-
function printBuildError(err) {
|
|
117326
|
-
const message = err != null && err.message;
|
|
117327
|
-
const stack = err != null && err.stack;
|
|
117328
|
-
if (stack && typeof message === "string" && message.indexOf("from Terser") !== -1) {
|
|
117329
|
-
try {
|
|
117330
|
-
const matched = /(.+)\[(.+):(.+),(.+)\]\[.+\]/.exec(stack);
|
|
117331
|
-
if (!matched) {
|
|
117332
|
-
throw new Error("Using errors for control flow is bad.");
|
|
117333
|
-
}
|
|
117334
|
-
const problemPath = matched[2];
|
|
117335
|
-
const line = matched[3];
|
|
117336
|
-
const column = matched[4];
|
|
117337
|
-
_logger.logger.error(`Failed to minify the code from this file:
|
|
117338
|
-
|
|
117339
|
-
${_compiled.chalk.yellow(` ${problemPath}:${line}${column !== "0" ? ":" + column : ""}`)}
|
|
117340
|
-
`);
|
|
117341
|
-
} catch (ignored) {
|
|
117342
|
-
_logger.logger.error(`Failed to minify the bundle. ${err}
|
|
117343
|
-
`);
|
|
117344
|
-
}
|
|
117345
|
-
} else {
|
|
117346
|
-
_logger.logger.error((message || err) + "\n");
|
|
117347
|
-
}
|
|
117348
|
-
_logger.logger.log();
|
|
117349
|
-
}
|
|
117350
|
-
}
|
|
117351
|
-
});
|
|
117352
|
-
|
|
117353
117321
|
// ../../../toolkit/utils/dist/cjs/cli/require.js
|
|
117354
117322
|
var require_require = __commonJS({
|
|
117355
117323
|
"../../../toolkit/utils/dist/cjs/cli/require.js"(exports, module2) {
|
|
@@ -117582,7 +117550,6 @@ var require_cli = __commonJS({
|
|
|
117582
117550
|
_export_star._(require_pathSerializer(), exports);
|
|
117583
117551
|
_export_star._(require_port(), exports);
|
|
117584
117552
|
_export_star._(require_prettyInstructions(), exports);
|
|
117585
|
-
_export_star._(require_print(), exports);
|
|
117586
117553
|
_export_star._(require_require(), exports);
|
|
117587
117554
|
_export_star._(require_runtimeExports(), exports);
|
|
117588
117555
|
_export_star._(require_watch(), exports);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.1.
|
|
18
|
+
"version": "3.1.28",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator-common": "3.1.
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
33
|
+
"@modern-js/generator-common": "3.1.28",
|
|
34
|
+
"@modern-js/plugin-i18n": "2.26.0",
|
|
35
|
+
"@scripts/build": "2.26.0",
|
|
36
|
+
"@modern-js/generator-utils": "3.1.28",
|
|
37
|
+
"@scripts/jest-config": "2.26.0"
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"publishConfig": {
|