@modern-js/repo-generator 3.4.15 → 3.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1649 -1319
- package/package.json +12 -12
- package/src/index.ts +8 -10
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
|
};
|
@@ -9653,11 +9656,11 @@ var require_ms = __commonJS({
|
|
9653
9656
|
}
|
9654
9657
|
});
|
9655
9658
|
|
9656
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
9659
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js
|
9657
9660
|
var require_common = __commonJS({
|
9658
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
9661
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/common.js"(exports, module2) {
|
9659
9662
|
"use strict";
|
9660
|
-
function setup(
|
9663
|
+
function setup(env2) {
|
9661
9664
|
createDebug.debug = createDebug;
|
9662
9665
|
createDebug.default = createDebug;
|
9663
9666
|
createDebug.coerce = coerce;
|
@@ -9666,8 +9669,8 @@ var require_common = __commonJS({
|
|
9666
9669
|
createDebug.enabled = enabled;
|
9667
9670
|
createDebug.humanize = require_ms();
|
9668
9671
|
createDebug.destroy = destroy2;
|
9669
|
-
Object.keys(
|
9670
|
-
createDebug[key] =
|
9672
|
+
Object.keys(env2).forEach((key) => {
|
9673
|
+
createDebug[key] = env2[key];
|
9671
9674
|
});
|
9672
9675
|
createDebug.names = [];
|
9673
9676
|
createDebug.skips = [];
|
@@ -9817,9 +9820,9 @@ var require_common = __commonJS({
|
|
9817
9820
|
}
|
9818
9821
|
});
|
9819
9822
|
|
9820
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
9823
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js
|
9821
9824
|
var require_browser = __commonJS({
|
9822
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
9825
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/browser.js"(exports, module2) {
|
9823
9826
|
"use strict";
|
9824
9827
|
exports.formatArgs = formatArgs;
|
9825
9828
|
exports.save = save;
|
@@ -9987,120 +9990,147 @@ var require_browser = __commonJS({
|
|
9987
9990
|
}
|
9988
9991
|
});
|
9989
9992
|
|
9990
|
-
// ../../../../node_modules/.pnpm/
|
9991
|
-
var
|
9992
|
-
|
9993
|
-
|
9994
|
-
|
9995
|
-
argv = argv || process.argv;
|
9996
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
9997
|
-
const pos = argv.indexOf(prefix + flag);
|
9998
|
-
const terminatorPos = argv.indexOf("--");
|
9999
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
10000
|
-
};
|
10001
|
-
}
|
9993
|
+
// ../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js
|
9994
|
+
var supports_color_exports = {};
|
9995
|
+
__export(supports_color_exports, {
|
9996
|
+
createSupportsColor: () => createSupportsColor,
|
9997
|
+
default: () => supports_color_default
|
10002
9998
|
});
|
10003
|
-
|
10004
|
-
|
10005
|
-
|
10006
|
-
|
10007
|
-
|
10008
|
-
|
10009
|
-
|
10010
|
-
|
10011
|
-
|
10012
|
-
|
10013
|
-
forceColor = false;
|
10014
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
10015
|
-
forceColor = true;
|
9999
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
10000
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
10001
|
+
const position = argv.indexOf(prefix + flag);
|
10002
|
+
const terminatorPosition = argv.indexOf("--");
|
10003
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
10004
|
+
}
|
10005
|
+
function envForceColor() {
|
10006
|
+
if ("FORCE_COLOR" in env) {
|
10007
|
+
if (env.FORCE_COLOR === "true") {
|
10008
|
+
return 1;
|
10016
10009
|
}
|
10017
|
-
if (
|
10018
|
-
|
10010
|
+
if (env.FORCE_COLOR === "false") {
|
10011
|
+
return 0;
|
10019
10012
|
}
|
10020
|
-
|
10021
|
-
|
10022
|
-
|
10023
|
-
|
10024
|
-
|
10025
|
-
|
10026
|
-
|
10027
|
-
|
10028
|
-
|
10029
|
-
|
10013
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
10014
|
+
}
|
10015
|
+
}
|
10016
|
+
function translateLevel(level) {
|
10017
|
+
if (level === 0) {
|
10018
|
+
return false;
|
10019
|
+
}
|
10020
|
+
return {
|
10021
|
+
level,
|
10022
|
+
hasBasic: true,
|
10023
|
+
has256: level >= 2,
|
10024
|
+
has16m: level >= 3
|
10025
|
+
};
|
10026
|
+
}
|
10027
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
10028
|
+
const noFlagForceColor = envForceColor();
|
10029
|
+
if (noFlagForceColor !== void 0) {
|
10030
|
+
flagForceColor = noFlagForceColor;
|
10031
|
+
}
|
10032
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
10033
|
+
if (forceColor === 0) {
|
10034
|
+
return 0;
|
10035
|
+
}
|
10036
|
+
if (sniffFlags) {
|
10037
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
10038
|
+
return 3;
|
10030
10039
|
}
|
10031
|
-
|
10032
|
-
|
10033
|
-
|
10034
|
-
|
10035
|
-
|
10036
|
-
|
10037
|
-
|
10038
|
-
|
10039
|
-
|
10040
|
-
|
10041
|
-
|
10042
|
-
|
10043
|
-
|
10044
|
-
|
10045
|
-
|
10046
|
-
|
10047
|
-
|
10048
|
-
|
10049
|
-
|
10050
|
-
|
10051
|
-
|
10052
|
-
|
10053
|
-
|
10054
|
-
|
10055
|
-
|
10056
|
-
|
10057
|
-
|
10058
|
-
|
10059
|
-
|
10060
|
-
|
10061
|
-
|
10062
|
-
|
10063
|
-
|
10064
|
-
|
10065
|
-
|
10066
|
-
|
10067
|
-
|
10068
|
-
|
10069
|
-
|
10070
|
-
|
10071
|
-
|
10040
|
+
if (hasFlag("color=256")) {
|
10041
|
+
return 2;
|
10042
|
+
}
|
10043
|
+
}
|
10044
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
10045
|
+
return 1;
|
10046
|
+
}
|
10047
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
10048
|
+
return 0;
|
10049
|
+
}
|
10050
|
+
const min = forceColor || 0;
|
10051
|
+
if (env.TERM === "dumb") {
|
10052
|
+
return min;
|
10053
|
+
}
|
10054
|
+
if (import_node_process.default.platform === "win32") {
|
10055
|
+
const osRelease = import_node_os.default.release().split(".");
|
10056
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
10057
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
10058
|
+
}
|
10059
|
+
return 1;
|
10060
|
+
}
|
10061
|
+
if ("CI" in env) {
|
10062
|
+
if ("GITHUB_ACTIONS" in env) {
|
10063
|
+
return 3;
|
10064
|
+
}
|
10065
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
10066
|
+
return 1;
|
10067
|
+
}
|
10068
|
+
return min;
|
10069
|
+
}
|
10070
|
+
if ("TEAMCITY_VERSION" in env) {
|
10071
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
10072
|
+
}
|
10073
|
+
if (env.COLORTERM === "truecolor") {
|
10074
|
+
return 3;
|
10075
|
+
}
|
10076
|
+
if (env.TERM === "xterm-kitty") {
|
10077
|
+
return 3;
|
10078
|
+
}
|
10079
|
+
if ("TERM_PROGRAM" in env) {
|
10080
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
10081
|
+
switch (env.TERM_PROGRAM) {
|
10082
|
+
case "iTerm.app": {
|
10083
|
+
return version >= 3 ? 3 : 2;
|
10072
10084
|
}
|
10073
|
-
|
10085
|
+
case "Apple_Terminal": {
|
10074
10086
|
return 2;
|
10075
10087
|
}
|
10076
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
10077
|
-
return 1;
|
10078
|
-
}
|
10079
|
-
if ("COLORTERM" in env) {
|
10080
|
-
return 1;
|
10081
|
-
}
|
10082
|
-
if (env.TERM === "dumb") {
|
10083
|
-
return min;
|
10084
|
-
}
|
10085
|
-
return min;
|
10086
10088
|
}
|
10087
|
-
|
10088
|
-
|
10089
|
-
|
10089
|
+
}
|
10090
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
10091
|
+
return 2;
|
10092
|
+
}
|
10093
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
10094
|
+
return 1;
|
10095
|
+
}
|
10096
|
+
if ("COLORTERM" in env) {
|
10097
|
+
return 1;
|
10098
|
+
}
|
10099
|
+
return min;
|
10100
|
+
}
|
10101
|
+
function createSupportsColor(stream4, options = {}) {
|
10102
|
+
const level = _supportsColor(stream4, {
|
10103
|
+
streamIsTTY: stream4 && stream4.isTTY,
|
10104
|
+
...options
|
10105
|
+
});
|
10106
|
+
return translateLevel(level);
|
10107
|
+
}
|
10108
|
+
var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
|
10109
|
+
var init_supports_color = __esm({
|
10110
|
+
"../../../../node_modules/.pnpm/supports-color@9.3.1/node_modules/supports-color/index.js"() {
|
10111
|
+
"use strict";
|
10112
|
+
import_node_process = __toESM(require("process"));
|
10113
|
+
import_node_os = __toESM(require("os"));
|
10114
|
+
import_node_tty = __toESM(require("tty"));
|
10115
|
+
({ env } = import_node_process.default);
|
10116
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
10117
|
+
flagForceColor = 0;
|
10118
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
10119
|
+
flagForceColor = 1;
|
10090
10120
|
}
|
10091
|
-
|
10092
|
-
|
10093
|
-
|
10094
|
-
stderr: getSupportLevel(process.stderr)
|
10121
|
+
supportsColor = {
|
10122
|
+
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
10123
|
+
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
10095
10124
|
};
|
10125
|
+
supports_color_default = supportsColor;
|
10096
10126
|
}
|
10097
10127
|
});
|
10098
10128
|
|
10099
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
10129
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js
|
10100
10130
|
var require_node = __commonJS({
|
10101
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
10131
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/node.js"(exports, module2) {
|
10102
10132
|
"use strict";
|
10103
|
-
var
|
10133
|
+
var tty2 = require("tty");
|
10104
10134
|
var util2 = require("util");
|
10105
10135
|
exports.init = init;
|
10106
10136
|
exports.log = log;
|
@@ -10115,8 +10145,8 @@ var require_node = __commonJS({
|
|
10115
10145
|
);
|
10116
10146
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
10117
10147
|
try {
|
10118
|
-
const
|
10119
|
-
if (
|
10148
|
+
const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
|
10149
|
+
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
10120
10150
|
exports.colors = [
|
10121
10151
|
20,
|
10122
10152
|
21,
|
@@ -10218,7 +10248,7 @@ var require_node = __commonJS({
|
|
10218
10248
|
return obj;
|
10219
10249
|
}, {});
|
10220
10250
|
function useColors() {
|
10221
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) :
|
10251
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
10222
10252
|
}
|
10223
10253
|
function formatArgs(args) {
|
10224
10254
|
const { namespace: name, useColors: useColors2 } = this;
|
@@ -10271,9 +10301,9 @@ var require_node = __commonJS({
|
|
10271
10301
|
}
|
10272
10302
|
});
|
10273
10303
|
|
10274
|
-
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
10304
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js
|
10275
10305
|
var require_src = __commonJS({
|
10276
|
-
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@
|
10306
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@9.3.1/node_modules/debug/src/index.js"(exports, module2) {
|
10277
10307
|
"use strict";
|
10278
10308
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
10279
10309
|
module2.exports = require_browser();
|
@@ -10283,9 +10313,9 @@ var require_src = __commonJS({
|
|
10283
10313
|
}
|
10284
10314
|
});
|
10285
10315
|
|
10286
|
-
// ../../../../node_modules/.pnpm/follow-redirects@1.15.
|
10316
|
+
// ../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/debug.js
|
10287
10317
|
var require_debug = __commonJS({
|
10288
|
-
"../../../../node_modules/.pnpm/follow-redirects@1.15.
|
10318
|
+
"../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/debug.js"(exports, module2) {
|
10289
10319
|
"use strict";
|
10290
10320
|
var debug;
|
10291
10321
|
module2.exports = function() {
|
@@ -10304,9 +10334,9 @@ var require_debug = __commonJS({
|
|
10304
10334
|
}
|
10305
10335
|
});
|
10306
10336
|
|
10307
|
-
// ../../../../node_modules/.pnpm/follow-redirects@1.15.
|
10337
|
+
// ../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js
|
10308
10338
|
var require_follow_redirects = __commonJS({
|
10309
|
-
"../../../../node_modules/.pnpm/follow-redirects@1.15.
|
10339
|
+
"../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js"(exports, module2) {
|
10310
10340
|
"use strict";
|
10311
10341
|
var url2 = require("url");
|
10312
10342
|
var URL2 = url2.URL;
|
@@ -10627,7 +10657,7 @@ var require_follow_redirects = __commonJS({
|
|
10627
10657
|
this._isRedirect = true;
|
10628
10658
|
spreadUrlObject(redirectUrl, this._options);
|
10629
10659
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
10630
|
-
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
10660
|
+
removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
|
10631
10661
|
}
|
10632
10662
|
if (isFunction5(beforeRedirect)) {
|
10633
10663
|
var responseDetails = {
|
@@ -18504,15 +18534,15 @@ var require_runtime = __commonJS({
|
|
18504
18534
|
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] + ").");
|
18505
18535
|
}
|
18506
18536
|
}
|
18507
|
-
function template(templateSpec,
|
18508
|
-
if (!
|
18537
|
+
function template(templateSpec, env2) {
|
18538
|
+
if (!env2) {
|
18509
18539
|
throw new _exception2["default"]("No environment passed to template");
|
18510
18540
|
}
|
18511
18541
|
if (!templateSpec || !templateSpec.main) {
|
18512
18542
|
throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
|
18513
18543
|
}
|
18514
18544
|
templateSpec.main.decorator = templateSpec.main_d;
|
18515
|
-
|
18545
|
+
env2.VM.checkRevision(templateSpec.compiler);
|
18516
18546
|
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
18517
18547
|
function invokePartialWrapper(partial, context, options) {
|
18518
18548
|
if (options.hash) {
|
@@ -18521,14 +18551,14 @@ var require_runtime = __commonJS({
|
|
18521
18551
|
options.ids[0] = true;
|
18522
18552
|
}
|
18523
18553
|
}
|
18524
|
-
partial =
|
18554
|
+
partial = env2.VM.resolvePartial.call(this, partial, context, options);
|
18525
18555
|
var extendedOptions = Utils.extend({}, options, {
|
18526
18556
|
hooks: this.hooks,
|
18527
18557
|
protoAccessControl: this.protoAccessControl
|
18528
18558
|
});
|
18529
|
-
var result =
|
18530
|
-
if (result == null &&
|
18531
|
-
options.partials[options.name] =
|
18559
|
+
var result = env2.VM.invokePartial.call(this, partial, context, extendedOptions);
|
18560
|
+
if (result == null && env2.compile) {
|
18561
|
+
options.partials[options.name] = env2.compile(partial, templateSpec.compilerOptions, env2);
|
18532
18562
|
result = options.partials[options.name](context, extendedOptions);
|
18533
18563
|
}
|
18534
18564
|
if (result != null) {
|
@@ -18613,7 +18643,7 @@ var require_runtime = __commonJS({
|
|
18613
18643
|
},
|
18614
18644
|
// An empty object to use as replacement for null-contexts
|
18615
18645
|
nullContext: Object.seal({}),
|
18616
|
-
noop:
|
18646
|
+
noop: env2.VM.noop,
|
18617
18647
|
compilerInfo: templateSpec.compiler
|
18618
18648
|
};
|
18619
18649
|
function ret(context) {
|
@@ -18640,14 +18670,14 @@ var require_runtime = __commonJS({
|
|
18640
18670
|
ret.isTop = true;
|
18641
18671
|
ret._setup = function(options) {
|
18642
18672
|
if (!options.partial) {
|
18643
|
-
var mergedHelpers = Utils.extend({},
|
18673
|
+
var mergedHelpers = Utils.extend({}, env2.helpers, options.helpers);
|
18644
18674
|
wrapHelpersToPassLookupProperty(mergedHelpers, container);
|
18645
18675
|
container.helpers = mergedHelpers;
|
18646
18676
|
if (templateSpec.usePartial) {
|
18647
|
-
container.partials = container.mergeIfNeeded(options.partials,
|
18677
|
+
container.partials = container.mergeIfNeeded(options.partials, env2.partials);
|
18648
18678
|
}
|
18649
18679
|
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
18650
|
-
container.decorators = Utils.extend({},
|
18680
|
+
container.decorators = Utils.extend({}, env2.decorators, options.decorators);
|
18651
18681
|
}
|
18652
18682
|
container.hooks = {};
|
18653
18683
|
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
@@ -20449,7 +20479,7 @@ var require_compiler = __commonJS({
|
|
20449
20479
|
}
|
20450
20480
|
}
|
20451
20481
|
};
|
20452
|
-
function precompile(input, options,
|
20482
|
+
function precompile(input, options, env2) {
|
20453
20483
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
20454
20484
|
throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
|
20455
20485
|
}
|
@@ -20460,10 +20490,10 @@ var require_compiler = __commonJS({
|
|
20460
20490
|
if (options.compat) {
|
20461
20491
|
options.useDepths = true;
|
20462
20492
|
}
|
20463
|
-
var ast =
|
20464
|
-
return new
|
20493
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options);
|
20494
|
+
return new env2.JavaScriptCompiler().compile(environment, options);
|
20465
20495
|
}
|
20466
|
-
function compile3(input, options,
|
20496
|
+
function compile3(input, options, env2) {
|
20467
20497
|
if (options === void 0)
|
20468
20498
|
options = {};
|
20469
20499
|
if (input == null || typeof input !== "string" && input.type !== "Program") {
|
@@ -20478,8 +20508,8 @@ var require_compiler = __commonJS({
|
|
20478
20508
|
}
|
20479
20509
|
var compiled = void 0;
|
20480
20510
|
function compileInput() {
|
20481
|
-
var ast =
|
20482
|
-
return
|
20511
|
+
var ast = env2.parse(input, options), environment = new env2.Compiler().compile(ast, options), templateSpec = new env2.JavaScriptCompiler().compile(environment, options, void 0, true);
|
20512
|
+
return env2.template(templateSpec);
|
20483
20513
|
}
|
20484
20514
|
function ret(context, execOptions) {
|
20485
20515
|
if (!compiled) {
|
@@ -23555,9 +23585,9 @@ var require_lib = __commonJS({
|
|
23555
23585
|
}
|
23556
23586
|
});
|
23557
23587
|
|
23558
|
-
// ../../../../node_modules/.pnpm/@modern-js+utils@2.58.
|
23588
|
+
// ../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
|
23559
23589
|
var require_chalk = __commonJS({
|
23560
|
-
"../../../../node_modules/.pnpm/@modern-js+utils@2.58.
|
23590
|
+
"../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
|
23561
23591
|
"use strict";
|
23562
23592
|
(() => {
|
23563
23593
|
var e = { 44: (e2, t2, n2) => {
|
@@ -24686,13 +24716,13 @@ var require_chalk = __commonJS({
|
|
24686
24716
|
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
24687
24717
|
}
|
24688
24718
|
}
|
24689
|
-
function
|
24719
|
+
function translateLevel2(e3) {
|
24690
24720
|
if (e3 === 0) {
|
24691
24721
|
return false;
|
24692
24722
|
}
|
24693
24723
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
24694
24724
|
}
|
24695
|
-
function
|
24725
|
+
function supportsColor2(e3, t3) {
|
24696
24726
|
if (c === 0) {
|
24697
24727
|
return 0;
|
24698
24728
|
}
|
@@ -24749,10 +24779,10 @@ var require_chalk = __commonJS({
|
|
24749
24779
|
return n3;
|
24750
24780
|
}
|
24751
24781
|
function getSupportLevel(e3) {
|
24752
|
-
const t3 =
|
24753
|
-
return
|
24782
|
+
const t3 = supportsColor2(e3, e3 && e3.isTTY);
|
24783
|
+
return translateLevel2(t3);
|
24754
24784
|
}
|
24755
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
24785
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel2(supportsColor2(true, s.isatty(1))), stderr: translateLevel2(supportsColor2(true, s.isatty(2))) };
|
24756
24786
|
}, 37: (e2) => {
|
24757
24787
|
"use strict";
|
24758
24788
|
e2.exports = require("os");
|
@@ -29678,7 +29708,7 @@ var require_innerFrom = __commonJS({
|
|
29678
29708
|
exports.fromIterable = fromIterable;
|
29679
29709
|
function fromAsyncIterable(asyncIterable) {
|
29680
29710
|
return new Observable_1.Observable(function(subscriber) {
|
29681
|
-
|
29711
|
+
process3(asyncIterable, subscriber).catch(function(err) {
|
29682
29712
|
return subscriber.error(err);
|
29683
29713
|
});
|
29684
29714
|
});
|
@@ -29688,7 +29718,7 @@ var require_innerFrom = __commonJS({
|
|
29688
29718
|
return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
|
29689
29719
|
}
|
29690
29720
|
exports.fromReadableStreamLike = fromReadableStreamLike;
|
29691
|
-
function
|
29721
|
+
function process3(asyncIterable, subscriber) {
|
29692
29722
|
var asyncIterable_1, asyncIterable_1_1;
|
29693
29723
|
var e_2, _a2;
|
29694
29724
|
return __awaiter6(this, void 0, void 0, function() {
|
@@ -36969,11 +36999,11 @@ var require_signals = __commonJS({
|
|
36969
36999
|
var require_signal_exit = __commonJS({
|
36970
37000
|
"../../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
36971
37001
|
"use strict";
|
36972
|
-
var
|
36973
|
-
var processOk = function(
|
36974
|
-
return
|
37002
|
+
var process3 = global.process;
|
37003
|
+
var processOk = function(process4) {
|
37004
|
+
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";
|
36975
37005
|
};
|
36976
|
-
if (!processOk(
|
37006
|
+
if (!processOk(process3)) {
|
36977
37007
|
module2.exports = function() {
|
36978
37008
|
return function() {
|
36979
37009
|
};
|
@@ -36981,15 +37011,15 @@ var require_signal_exit = __commonJS({
|
|
36981
37011
|
} else {
|
36982
37012
|
assert = require("assert");
|
36983
37013
|
signals = require_signals();
|
36984
|
-
isWin = /^win/i.test(
|
37014
|
+
isWin = /^win/i.test(process3.platform);
|
36985
37015
|
EE = require("events");
|
36986
37016
|
if (typeof EE !== "function") {
|
36987
37017
|
EE = EE.EventEmitter;
|
36988
37018
|
}
|
36989
|
-
if (
|
36990
|
-
emitter =
|
37019
|
+
if (process3.__signal_exit_emitter__) {
|
37020
|
+
emitter = process3.__signal_exit_emitter__;
|
36991
37021
|
} else {
|
36992
|
-
emitter =
|
37022
|
+
emitter = process3.__signal_exit_emitter__ = new EE();
|
36993
37023
|
emitter.count = 0;
|
36994
37024
|
emitter.emitted = {};
|
36995
37025
|
}
|
@@ -37026,12 +37056,12 @@ var require_signal_exit = __commonJS({
|
|
37026
37056
|
loaded = false;
|
37027
37057
|
signals.forEach(function(sig) {
|
37028
37058
|
try {
|
37029
|
-
|
37059
|
+
process3.removeListener(sig, sigListeners[sig]);
|
37030
37060
|
} catch (er) {
|
37031
37061
|
}
|
37032
37062
|
});
|
37033
|
-
|
37034
|
-
|
37063
|
+
process3.emit = originalProcessEmit;
|
37064
|
+
process3.reallyExit = originalProcessReallyExit;
|
37035
37065
|
emitter.count -= 1;
|
37036
37066
|
};
|
37037
37067
|
module2.exports.unload = unload;
|
@@ -37048,7 +37078,7 @@ var require_signal_exit = __commonJS({
|
|
37048
37078
|
if (!processOk(global.process)) {
|
37049
37079
|
return;
|
37050
37080
|
}
|
37051
|
-
var listeners =
|
37081
|
+
var listeners = process3.listeners(sig);
|
37052
37082
|
if (listeners.length === emitter.count) {
|
37053
37083
|
unload();
|
37054
37084
|
emit("exit", null, sig);
|
@@ -37056,7 +37086,7 @@ var require_signal_exit = __commonJS({
|
|
37056
37086
|
if (isWin && sig === "SIGHUP") {
|
37057
37087
|
sig = "SIGINT";
|
37058
37088
|
}
|
37059
|
-
|
37089
|
+
process3.kill(process3.pid, sig);
|
37060
37090
|
}
|
37061
37091
|
};
|
37062
37092
|
});
|
@@ -37072,36 +37102,36 @@ var require_signal_exit = __commonJS({
|
|
37072
37102
|
emitter.count += 1;
|
37073
37103
|
signals = signals.filter(function(sig) {
|
37074
37104
|
try {
|
37075
|
-
|
37105
|
+
process3.on(sig, sigListeners[sig]);
|
37076
37106
|
return true;
|
37077
37107
|
} catch (er) {
|
37078
37108
|
return false;
|
37079
37109
|
}
|
37080
37110
|
});
|
37081
|
-
|
37082
|
-
|
37111
|
+
process3.emit = processEmit;
|
37112
|
+
process3.reallyExit = processReallyExit;
|
37083
37113
|
};
|
37084
37114
|
module2.exports.load = load;
|
37085
|
-
originalProcessReallyExit =
|
37115
|
+
originalProcessReallyExit = process3.reallyExit;
|
37086
37116
|
processReallyExit = function processReallyExit2(code) {
|
37087
37117
|
if (!processOk(global.process)) {
|
37088
37118
|
return;
|
37089
37119
|
}
|
37090
|
-
|
37120
|
+
process3.exitCode = code || /* istanbul ignore next */
|
37091
37121
|
0;
|
37092
|
-
emit("exit",
|
37093
|
-
emit("afterexit",
|
37094
|
-
originalProcessReallyExit.call(
|
37122
|
+
emit("exit", process3.exitCode, null);
|
37123
|
+
emit("afterexit", process3.exitCode, null);
|
37124
|
+
originalProcessReallyExit.call(process3, process3.exitCode);
|
37095
37125
|
};
|
37096
|
-
originalProcessEmit =
|
37126
|
+
originalProcessEmit = process3.emit;
|
37097
37127
|
processEmit = function processEmit2(ev, arg) {
|
37098
37128
|
if (ev === "exit" && processOk(global.process)) {
|
37099
37129
|
if (arg !== void 0) {
|
37100
|
-
|
37130
|
+
process3.exitCode = arg;
|
37101
37131
|
}
|
37102
37132
|
var ret = originalProcessEmit.apply(this, arguments);
|
37103
|
-
emit("exit",
|
37104
|
-
emit("afterexit",
|
37133
|
+
emit("exit", process3.exitCode, null);
|
37134
|
+
emit("afterexit", process3.exitCode, null);
|
37105
37135
|
return ret;
|
37106
37136
|
} else {
|
37107
37137
|
return originalProcessEmit.apply(this, arguments);
|
@@ -44174,7 +44204,7 @@ var require_end_of_stream = __commonJS({
|
|
44174
44204
|
}
|
44175
44205
|
function noop2() {
|
44176
44206
|
}
|
44177
|
-
function
|
44207
|
+
function isRequest2(stream4) {
|
44178
44208
|
return stream4.setHeader && typeof stream4.abort === "function";
|
44179
44209
|
}
|
44180
44210
|
function eos(stream4, opts, callback) {
|
@@ -44222,7 +44252,7 @@ var require_end_of_stream = __commonJS({
|
|
44222
44252
|
var onrequest = function onrequest2() {
|
44223
44253
|
stream4.req.on("finish", onfinish);
|
44224
44254
|
};
|
44225
|
-
if (
|
44255
|
+
if (isRequest2(stream4)) {
|
44226
44256
|
stream4.on("complete", onfinish);
|
44227
44257
|
stream4.on("abort", onclose);
|
44228
44258
|
if (stream4.req)
|
@@ -45486,7 +45516,7 @@ var require_pipeline = __commonJS({
|
|
45486
45516
|
if (err)
|
45487
45517
|
throw err;
|
45488
45518
|
}
|
45489
|
-
function
|
45519
|
+
function isRequest2(stream4) {
|
45490
45520
|
return stream4.setHeader && typeof stream4.abort === "function";
|
45491
45521
|
}
|
45492
45522
|
function destroyer(stream4, reading, writing, callback) {
|
@@ -45513,7 +45543,7 @@ var require_pipeline = __commonJS({
|
|
45513
45543
|
if (destroyed)
|
45514
45544
|
return;
|
45515
45545
|
destroyed = true;
|
45516
|
-
if (
|
45546
|
+
if (isRequest2(stream4))
|
45517
45547
|
return stream4.abort();
|
45518
45548
|
if (typeof stream4.destroy === "function")
|
45519
45549
|
return stream4.destroy();
|
@@ -58607,9 +58637,9 @@ var require_esprima = __commonJS({
|
|
58607
58637
|
}();
|
58608
58638
|
exports2.ComputedMemberExpression = ComputedMemberExpression;
|
58609
58639
|
var ConditionalExpression = function() {
|
58610
|
-
function ConditionalExpression2(
|
58640
|
+
function ConditionalExpression2(test2, consequent, alternate) {
|
58611
58641
|
this.type = syntax_1.Syntax.ConditionalExpression;
|
58612
|
-
this.test =
|
58642
|
+
this.test = test2;
|
58613
58643
|
this.consequent = consequent;
|
58614
58644
|
this.alternate = alternate;
|
58615
58645
|
}
|
@@ -58641,10 +58671,10 @@ var require_esprima = __commonJS({
|
|
58641
58671
|
}();
|
58642
58672
|
exports2.Directive = Directive;
|
58643
58673
|
var DoWhileStatement = function() {
|
58644
|
-
function DoWhileStatement2(body,
|
58674
|
+
function DoWhileStatement2(body, test2) {
|
58645
58675
|
this.type = syntax_1.Syntax.DoWhileStatement;
|
58646
58676
|
this.body = body;
|
58647
|
-
this.test =
|
58677
|
+
this.test = test2;
|
58648
58678
|
}
|
58649
58679
|
return DoWhileStatement2;
|
58650
58680
|
}();
|
@@ -58721,10 +58751,10 @@ var require_esprima = __commonJS({
|
|
58721
58751
|
}();
|
58722
58752
|
exports2.ForOfStatement = ForOfStatement;
|
58723
58753
|
var ForStatement = function() {
|
58724
|
-
function ForStatement2(init,
|
58754
|
+
function ForStatement2(init, test2, update, body) {
|
58725
58755
|
this.type = syntax_1.Syntax.ForStatement;
|
58726
58756
|
this.init = init;
|
58727
|
-
this.test =
|
58757
|
+
this.test = test2;
|
58728
58758
|
this.update = update;
|
58729
58759
|
this.body = body;
|
58730
58760
|
}
|
@@ -58766,9 +58796,9 @@ var require_esprima = __commonJS({
|
|
58766
58796
|
}();
|
58767
58797
|
exports2.Identifier = Identifier;
|
58768
58798
|
var IfStatement = function() {
|
58769
|
-
function IfStatement2(
|
58799
|
+
function IfStatement2(test2, consequent, alternate) {
|
58770
58800
|
this.type = syntax_1.Syntax.IfStatement;
|
58771
|
-
this.test =
|
58801
|
+
this.test = test2;
|
58772
58802
|
this.consequent = consequent;
|
58773
58803
|
this.alternate = alternate;
|
58774
58804
|
}
|
@@ -58964,9 +58994,9 @@ var require_esprima = __commonJS({
|
|
58964
58994
|
}();
|
58965
58995
|
exports2.Super = Super;
|
58966
58996
|
var SwitchCase = function() {
|
58967
|
-
function SwitchCase2(
|
58997
|
+
function SwitchCase2(test2, consequent) {
|
58968
58998
|
this.type = syntax_1.Syntax.SwitchCase;
|
58969
|
-
this.test =
|
58999
|
+
this.test = test2;
|
58970
59000
|
this.consequent = consequent;
|
58971
59001
|
}
|
58972
59002
|
return SwitchCase2;
|
@@ -59072,9 +59102,9 @@ var require_esprima = __commonJS({
|
|
59072
59102
|
}();
|
59073
59103
|
exports2.VariableDeclarator = VariableDeclarator;
|
59074
59104
|
var WhileStatement = function() {
|
59075
|
-
function WhileStatement2(
|
59105
|
+
function WhileStatement2(test2, body) {
|
59076
59106
|
this.type = syntax_1.Syntax.WhileStatement;
|
59077
|
-
this.test =
|
59107
|
+
this.test = test2;
|
59078
59108
|
this.body = body;
|
59079
59109
|
}
|
59080
59110
|
return WhileStatement2;
|
@@ -60774,7 +60804,7 @@ var require_esprima = __commonJS({
|
|
60774
60804
|
var alternate = null;
|
60775
60805
|
this.expectKeyword("if");
|
60776
60806
|
this.expect("(");
|
60777
|
-
var
|
60807
|
+
var test2 = this.parseExpression();
|
60778
60808
|
if (!this.match(")") && this.config.tolerant) {
|
60779
60809
|
this.tolerateUnexpectedToken(this.nextToken());
|
60780
60810
|
consequent = this.finalize(this.createNode(), new Node.EmptyStatement());
|
@@ -60786,7 +60816,7 @@ var require_esprima = __commonJS({
|
|
60786
60816
|
alternate = this.parseIfClause();
|
60787
60817
|
}
|
60788
60818
|
}
|
60789
|
-
return this.finalize(node, new Node.IfStatement(
|
60819
|
+
return this.finalize(node, new Node.IfStatement(test2, consequent, alternate));
|
60790
60820
|
};
|
60791
60821
|
Parser3.prototype.parseDoWhileStatement = function() {
|
60792
60822
|
var node = this.createNode();
|
@@ -60797,7 +60827,7 @@ var require_esprima = __commonJS({
|
|
60797
60827
|
this.context.inIteration = previousInIteration;
|
60798
60828
|
this.expectKeyword("while");
|
60799
60829
|
this.expect("(");
|
60800
|
-
var
|
60830
|
+
var test2 = this.parseExpression();
|
60801
60831
|
if (!this.match(")") && this.config.tolerant) {
|
60802
60832
|
this.tolerateUnexpectedToken(this.nextToken());
|
60803
60833
|
} else {
|
@@ -60806,14 +60836,14 @@ var require_esprima = __commonJS({
|
|
60806
60836
|
this.nextToken();
|
60807
60837
|
}
|
60808
60838
|
}
|
60809
|
-
return this.finalize(node, new Node.DoWhileStatement(body,
|
60839
|
+
return this.finalize(node, new Node.DoWhileStatement(body, test2));
|
60810
60840
|
};
|
60811
60841
|
Parser3.prototype.parseWhileStatement = function() {
|
60812
60842
|
var node = this.createNode();
|
60813
60843
|
var body;
|
60814
60844
|
this.expectKeyword("while");
|
60815
60845
|
this.expect("(");
|
60816
|
-
var
|
60846
|
+
var test2 = this.parseExpression();
|
60817
60847
|
if (!this.match(")") && this.config.tolerant) {
|
60818
60848
|
this.tolerateUnexpectedToken(this.nextToken());
|
60819
60849
|
body = this.finalize(this.createNode(), new Node.EmptyStatement());
|
@@ -60824,11 +60854,11 @@ var require_esprima = __commonJS({
|
|
60824
60854
|
body = this.parseStatement();
|
60825
60855
|
this.context.inIteration = previousInIteration;
|
60826
60856
|
}
|
60827
|
-
return this.finalize(node, new Node.WhileStatement(
|
60857
|
+
return this.finalize(node, new Node.WhileStatement(test2, body));
|
60828
60858
|
};
|
60829
60859
|
Parser3.prototype.parseForStatement = function() {
|
60830
60860
|
var init = null;
|
60831
|
-
var
|
60861
|
+
var test2 = null;
|
60832
60862
|
var update = null;
|
60833
60863
|
var forIn = true;
|
60834
60864
|
var left, right;
|
@@ -60938,7 +60968,7 @@ var require_esprima = __commonJS({
|
|
60938
60968
|
}
|
60939
60969
|
if (typeof left === "undefined") {
|
60940
60970
|
if (!this.match(";")) {
|
60941
|
-
|
60971
|
+
test2 = this.parseExpression();
|
60942
60972
|
}
|
60943
60973
|
this.expect(";");
|
60944
60974
|
if (!this.match(")")) {
|
@@ -60956,7 +60986,7 @@ var require_esprima = __commonJS({
|
|
60956
60986
|
body = this.isolateCoverGrammar(this.parseStatement);
|
60957
60987
|
this.context.inIteration = previousInIteration;
|
60958
60988
|
}
|
60959
|
-
return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init,
|
60989
|
+
return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init, test2, update, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body));
|
60960
60990
|
};
|
60961
60991
|
Parser3.prototype.parseContinueStatement = function() {
|
60962
60992
|
var node = this.createNode();
|
@@ -61025,13 +61055,13 @@ var require_esprima = __commonJS({
|
|
61025
61055
|
};
|
61026
61056
|
Parser3.prototype.parseSwitchCase = function() {
|
61027
61057
|
var node = this.createNode();
|
61028
|
-
var
|
61058
|
+
var test2;
|
61029
61059
|
if (this.matchKeyword("default")) {
|
61030
61060
|
this.nextToken();
|
61031
|
-
|
61061
|
+
test2 = null;
|
61032
61062
|
} else {
|
61033
61063
|
this.expectKeyword("case");
|
61034
|
-
|
61064
|
+
test2 = this.parseExpression();
|
61035
61065
|
}
|
61036
61066
|
this.expect(":");
|
61037
61067
|
var consequent = [];
|
@@ -61041,7 +61071,7 @@ var require_esprima = __commonJS({
|
|
61041
61071
|
}
|
61042
61072
|
consequent.push(this.parseStatementListItem());
|
61043
61073
|
}
|
61044
|
-
return this.finalize(node, new Node.SwitchCase(
|
61074
|
+
return this.finalize(node, new Node.SwitchCase(test2, consequent));
|
61045
61075
|
};
|
61046
61076
|
Parser3.prototype.parseSwitchStatement = function() {
|
61047
61077
|
var node = this.createNode();
|
@@ -68844,9 +68874,8 @@ __export(src_exports, {
|
|
68844
68874
|
default: () => src_default
|
68845
68875
|
});
|
68846
68876
|
module.exports = __toCommonJS(src_exports);
|
68847
|
-
var import_lodash14 = require("@modern-js/utils/lodash");
|
68848
68877
|
|
68849
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68878
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
68850
68879
|
var LoggerLevel;
|
68851
68880
|
(function(LoggerLevel2) {
|
68852
68881
|
LoggerLevel2["Error"] = "error";
|
@@ -68867,7 +68896,7 @@ var LevelPriority = [
|
|
68867
68896
|
"stream"
|
68868
68897
|
];
|
68869
68898
|
|
68870
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68899
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
68871
68900
|
var import_utils = require("@modern-js/utils");
|
68872
68901
|
var Logger = class {
|
68873
68902
|
get currentLevelIndex() {
|
@@ -68928,22 +68957,22 @@ var Logger = class {
|
|
68928
68957
|
}
|
68929
68958
|
};
|
68930
68959
|
|
68931
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68960
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
68932
68961
|
var import_path7 = __toESM(require("path"));
|
68933
68962
|
|
68934
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68963
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
68935
68964
|
var import_events = require("events");
|
68936
68965
|
var import_path4 = __toESM(require("path"));
|
68937
68966
|
|
68938
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68967
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
68939
68968
|
var import_path2 = __toESM(require("path"));
|
68940
68969
|
var import_utils3 = require("@modern-js/utils");
|
68941
68970
|
|
68942
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68971
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
68943
68972
|
var import_path = __toESM(require("path"));
|
68944
68973
|
var import_utils2 = require("@modern-js/utils");
|
68945
68974
|
|
68946
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68975
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
68947
68976
|
var IMAGE_EXT_LIST = [
|
68948
68977
|
".jpg",
|
68949
68978
|
".jpeg",
|
@@ -68957,7 +68986,7 @@ var IMAGE_EXT_LIST = [
|
|
68957
68986
|
".wmf"
|
68958
68987
|
];
|
68959
68988
|
|
68960
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68989
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
68961
68990
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
68962
68991
|
var FsResource = class {
|
68963
68992
|
async value() {
|
@@ -68980,7 +69009,7 @@ var FsResource = class {
|
|
68980
69009
|
}
|
68981
69010
|
};
|
68982
69011
|
|
68983
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69012
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
68984
69013
|
var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
|
68985
69014
|
(0, import_utils3.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
|
68986
69015
|
});
|
@@ -69005,11 +69034,11 @@ var FsMaterial = class {
|
|
69005
69034
|
}
|
69006
69035
|
};
|
69007
69036
|
|
69008
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69037
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
69009
69038
|
var import_path3 = __toESM(require("path"));
|
69010
69039
|
var import_utils5 = require("@modern-js/utils");
|
69011
69040
|
|
69012
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69041
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
69013
69042
|
var import_utils4 = require("@modern-js/utils");
|
69014
69043
|
async function fsExists(path17) {
|
69015
69044
|
try {
|
@@ -69020,7 +69049,7 @@ async function fsExists(path17) {
|
|
69020
69049
|
}
|
69021
69050
|
}
|
69022
69051
|
|
69023
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69052
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
69024
69053
|
var MaxTimes = 5;
|
69025
69054
|
async function getGeneratorDir(generator) {
|
69026
69055
|
let result = generator;
|
@@ -69039,7 +69068,7 @@ async function getGeneratorDir(generator) {
|
|
69039
69068
|
return result;
|
69040
69069
|
}
|
69041
69070
|
|
69042
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69071
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
69043
69072
|
var nodeRequire = (path17) => {
|
69044
69073
|
try {
|
69045
69074
|
const module2 = __non_webpack_require__(path17);
|
@@ -69056,7 +69085,7 @@ var nodeRequire = (path17) => {
|
|
69056
69085
|
}
|
69057
69086
|
};
|
69058
69087
|
|
69059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69088
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
69060
69089
|
var import_utils6 = require("@modern-js/utils");
|
69061
69090
|
var GeneratorCore = class {
|
69062
69091
|
get lifeCycleMethod() {
|
@@ -69256,10 +69285,10 @@ check path: ${import_utils6.chalk.blue.underline(generator)} exist a package.jso
|
|
69256
69285
|
}
|
69257
69286
|
};
|
69258
69287
|
|
69259
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69288
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
69260
69289
|
var import_path6 = __toESM(require("path"));
|
69261
69290
|
|
69262
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69291
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
69263
69292
|
var import_path5 = __toESM(require("path"));
|
69264
69293
|
var import_utils7 = require("@modern-js/utils");
|
69265
69294
|
async function canUseYarn() {
|
@@ -69339,7 +69368,7 @@ async function runInstall(targetDir, registryUrl, logger2) {
|
|
69339
69368
|
}
|
69340
69369
|
}
|
69341
69370
|
|
69342
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69371
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
69343
69372
|
async function timeoutPromise(promise, ms, reason = "Operation") {
|
69344
69373
|
let timeoutId = null;
|
69345
69374
|
const delayPromise = (ms2) => new Promise((resolve) => {
|
@@ -69361,24 +69390,24 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
69361
69390
|
}
|
69362
69391
|
}
|
69363
69392
|
|
69364
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69393
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
69365
69394
|
var import_os = __toESM(require("os"));
|
69366
69395
|
|
69367
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69396
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
69368
69397
|
var NPM_API_TIMEOUT = 3e4;
|
69369
69398
|
var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
|
69370
69399
|
|
69371
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69372
|
-
var
|
69400
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
69401
|
+
var import_utils36 = require("@modern-js/utils");
|
69373
69402
|
|
69374
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69403
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/bind.js
|
69375
69404
|
function bind(fn, thisArg) {
|
69376
69405
|
return function wrap() {
|
69377
69406
|
return fn.apply(thisArg, arguments);
|
69378
69407
|
};
|
69379
69408
|
}
|
69380
69409
|
|
69381
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69410
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/utils.js
|
69382
69411
|
var { toString } = Object.prototype;
|
69383
69412
|
var { getPrototypeOf } = Object;
|
69384
69413
|
var kindOf = ((cache) => (thing) => {
|
@@ -69428,6 +69457,7 @@ var isFormData = (thing) => {
|
|
69428
69457
|
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
69429
69458
|
};
|
69430
69459
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
69460
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
69431
69461
|
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
69432
69462
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
69433
69463
|
if (obj === null || typeof obj === "undefined") {
|
@@ -69637,8 +69667,7 @@ var toObjectSet = (arrayOrString, delimiter) => {
|
|
69637
69667
|
var noop = () => {
|
69638
69668
|
};
|
69639
69669
|
var toFiniteNumber = (value, defaultValue) => {
|
69640
|
-
value = +value;
|
69641
|
-
return Number.isFinite(value) ? value : defaultValue;
|
69670
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
69642
69671
|
};
|
69643
69672
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
69644
69673
|
var DIGIT = "0123456789";
|
@@ -69682,6 +69711,26 @@ var toJSONObject = (obj) => {
|
|
69682
69711
|
};
|
69683
69712
|
var isAsyncFn = kindOfTest("AsyncFunction");
|
69684
69713
|
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
69714
|
+
var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
69715
|
+
if (setImmediateSupported) {
|
69716
|
+
return setImmediate;
|
69717
|
+
}
|
69718
|
+
return postMessageSupported ? ((token, callbacks) => {
|
69719
|
+
_global.addEventListener("message", ({ source, data }) => {
|
69720
|
+
if (source === _global && data === token) {
|
69721
|
+
callbacks.length && callbacks.shift()();
|
69722
|
+
}
|
69723
|
+
}, false);
|
69724
|
+
return (cb) => {
|
69725
|
+
callbacks.push(cb);
|
69726
|
+
_global.postMessage(token, "*");
|
69727
|
+
};
|
69728
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
69729
|
+
})(
|
69730
|
+
typeof setImmediate === "function",
|
69731
|
+
isFunction(_global.postMessage)
|
69732
|
+
);
|
69733
|
+
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
69685
69734
|
var utils_default = {
|
69686
69735
|
isArray,
|
69687
69736
|
isArrayBuffer,
|
@@ -69693,6 +69742,10 @@ var utils_default = {
|
|
69693
69742
|
isBoolean,
|
69694
69743
|
isObject,
|
69695
69744
|
isPlainObject,
|
69745
|
+
isReadableStream,
|
69746
|
+
isRequest,
|
69747
|
+
isResponse,
|
69748
|
+
isHeaders,
|
69696
69749
|
isUndefined,
|
69697
69750
|
isDate,
|
69698
69751
|
isFile,
|
@@ -69734,10 +69787,12 @@ var utils_default = {
|
|
69734
69787
|
isSpecCompliantForm,
|
69735
69788
|
toJSONObject,
|
69736
69789
|
isAsyncFn,
|
69737
|
-
isThenable
|
69790
|
+
isThenable,
|
69791
|
+
setImmediate: _setImmediate,
|
69792
|
+
asap
|
69738
69793
|
};
|
69739
69794
|
|
69740
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69795
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/AxiosError.js
|
69741
69796
|
function AxiosError(message, code, config, request, response) {
|
69742
69797
|
Error.call(this);
|
69743
69798
|
if (Error.captureStackTrace) {
|
@@ -69809,11 +69864,11 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
69809
69864
|
};
|
69810
69865
|
var AxiosError_default = AxiosError;
|
69811
69866
|
|
69812
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69867
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/classes/FormData.js
|
69813
69868
|
var import_form_data = __toESM(require_form_data());
|
69814
69869
|
var FormData_default = import_form_data.default;
|
69815
69870
|
|
69816
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69871
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/toFormData.js
|
69817
69872
|
function isVisitable(thing) {
|
69818
69873
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
69819
69874
|
}
|
@@ -69928,7 +69983,7 @@ function toFormData(obj, formData, options) {
|
|
69928
69983
|
}
|
69929
69984
|
var toFormData_default = toFormData;
|
69930
69985
|
|
69931
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69986
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
69932
69987
|
function encode(str) {
|
69933
69988
|
const charMap = {
|
69934
69989
|
"!": "%21",
|
@@ -69961,7 +70016,7 @@ prototype2.toString = function toString2(encoder) {
|
|
69961
70016
|
};
|
69962
70017
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
69963
70018
|
|
69964
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70019
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/buildURL.js
|
69965
70020
|
function encode2(val) {
|
69966
70021
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
69967
70022
|
}
|
@@ -69987,7 +70042,7 @@ function buildURL(url2, params, options) {
|
|
69987
70042
|
return url2;
|
69988
70043
|
}
|
69989
70044
|
|
69990
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70045
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/InterceptorManager.js
|
69991
70046
|
var InterceptorManager = class {
|
69992
70047
|
constructor() {
|
69993
70048
|
this.handlers = [];
|
@@ -70051,18 +70106,18 @@ var InterceptorManager = class {
|
|
70051
70106
|
};
|
70052
70107
|
var InterceptorManager_default = InterceptorManager;
|
70053
70108
|
|
70054
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70109
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/defaults/transitional.js
|
70055
70110
|
var transitional_default = {
|
70056
70111
|
silentJSONParsing: true,
|
70057
70112
|
forcedJSONParsing: true,
|
70058
70113
|
clarifyTimeoutError: false
|
70059
70114
|
};
|
70060
70115
|
|
70061
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70116
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
70062
70117
|
var import_url = __toESM(require("url"));
|
70063
70118
|
var URLSearchParams_default = import_url.default.URLSearchParams;
|
70064
70119
|
|
70065
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70120
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/index.js
|
70066
70121
|
var node_default = {
|
70067
70122
|
isNode: true,
|
70068
70123
|
classes: {
|
@@ -70073,12 +70128,13 @@ var node_default = {
|
|
70073
70128
|
protocols: ["http", "https", "file", "data"]
|
70074
70129
|
};
|
70075
70130
|
|
70076
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70131
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/common/utils.js
|
70077
70132
|
var utils_exports = {};
|
70078
70133
|
__export(utils_exports, {
|
70079
70134
|
hasBrowserEnv: () => hasBrowserEnv,
|
70080
70135
|
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
70081
|
-
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv
|
70136
|
+
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
70137
|
+
origin: () => origin
|
70082
70138
|
});
|
70083
70139
|
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
70084
70140
|
var hasStandardBrowserEnv = ((product) => {
|
@@ -70088,14 +70144,15 @@ var hasStandardBrowserWebWorkerEnv = (() => {
|
|
70088
70144
|
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
70089
70145
|
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
70090
70146
|
})();
|
70147
|
+
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
70091
70148
|
|
70092
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70149
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/index.js
|
70093
70150
|
var platform_default = {
|
70094
70151
|
...utils_exports,
|
70095
70152
|
...node_default
|
70096
70153
|
};
|
70097
70154
|
|
70098
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70155
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
70099
70156
|
function toURLEncodedForm(data, options) {
|
70100
70157
|
return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
|
70101
70158
|
visitor: function(value, key, path17, helpers) {
|
@@ -70108,7 +70165,7 @@ function toURLEncodedForm(data, options) {
|
|
70108
70165
|
}, options));
|
70109
70166
|
}
|
70110
70167
|
|
70111
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70168
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToJSON.js
|
70112
70169
|
function parsePropPath(name) {
|
70113
70170
|
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
70114
70171
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
@@ -70162,7 +70219,7 @@ function formDataToJSON(formData) {
|
|
70162
70219
|
}
|
70163
70220
|
var formDataToJSON_default = formDataToJSON;
|
70164
70221
|
|
70165
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70222
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/defaults/index.js
|
70166
70223
|
function stringifySafely(rawValue, parser, encoder) {
|
70167
70224
|
if (utils_default.isString(rawValue)) {
|
70168
70225
|
try {
|
@@ -70178,7 +70235,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
70178
70235
|
}
|
70179
70236
|
var defaults = {
|
70180
70237
|
transitional: transitional_default,
|
70181
|
-
adapter: ["xhr", "http"],
|
70238
|
+
adapter: ["xhr", "http", "fetch"],
|
70182
70239
|
transformRequest: [function transformRequest(data, headers) {
|
70183
70240
|
const contentType = headers.getContentType() || "";
|
70184
70241
|
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
@@ -70190,7 +70247,7 @@ var defaults = {
|
|
70190
70247
|
if (isFormData2) {
|
70191
70248
|
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
70192
70249
|
}
|
70193
|
-
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
|
70250
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
70194
70251
|
return data;
|
70195
70252
|
}
|
70196
70253
|
if (utils_default.isArrayBufferView(data)) {
|
@@ -70224,6 +70281,9 @@ var defaults = {
|
|
70224
70281
|
const transitional2 = this.transitional || defaults.transitional;
|
70225
70282
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
70226
70283
|
const JSONRequested = this.responseType === "json";
|
70284
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
70285
|
+
return data;
|
70286
|
+
}
|
70227
70287
|
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
70228
70288
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
70229
70289
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
@@ -70268,7 +70328,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method
|
|
70268
70328
|
});
|
70269
70329
|
var defaults_default = defaults;
|
70270
70330
|
|
70271
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70331
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/parseHeaders.js
|
70272
70332
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
70273
70333
|
"age",
|
70274
70334
|
"authorization",
|
@@ -70313,7 +70373,7 @@ var parseHeaders_default = (rawHeaders) => {
|
|
70313
70373
|
return parsed;
|
70314
70374
|
};
|
70315
70375
|
|
70316
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70376
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/AxiosHeaders.js
|
70317
70377
|
var $internals = Symbol("internals");
|
70318
70378
|
function normalizeHeader(header) {
|
70319
70379
|
return header && String(header).trim().toLowerCase();
|
@@ -70387,6 +70447,10 @@ var AxiosHeaders = class {
|
|
70387
70447
|
setHeaders(header, valueOrRewrite);
|
70388
70448
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
70389
70449
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
70450
|
+
} else if (utils_default.isHeaders(header)) {
|
70451
|
+
for (const [key, value] of header.entries()) {
|
70452
|
+
setHeader(value, key, rewrite);
|
70453
|
+
}
|
70390
70454
|
} else {
|
70391
70455
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
70392
70456
|
}
|
@@ -70531,7 +70595,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
70531
70595
|
utils_default.freezeMethods(AxiosHeaders);
|
70532
70596
|
var AxiosHeaders_default = AxiosHeaders;
|
70533
70597
|
|
70534
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70598
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/transformData.js
|
70535
70599
|
function transformData(fns, response) {
|
70536
70600
|
const config = this || defaults_default;
|
70537
70601
|
const context = response || config;
|
@@ -70544,12 +70608,12 @@ function transformData(fns, response) {
|
|
70544
70608
|
return data;
|
70545
70609
|
}
|
70546
70610
|
|
70547
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70611
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/isCancel.js
|
70548
70612
|
function isCancel(value) {
|
70549
70613
|
return !!(value && value.__CANCEL__);
|
70550
70614
|
}
|
70551
70615
|
|
70552
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70616
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/CanceledError.js
|
70553
70617
|
function CanceledError(message, config, request) {
|
70554
70618
|
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
70555
70619
|
this.name = "CanceledError";
|
@@ -70559,7 +70623,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
70559
70623
|
});
|
70560
70624
|
var CanceledError_default = CanceledError;
|
70561
70625
|
|
70562
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70626
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/settle.js
|
70563
70627
|
function settle(resolve, reject, response) {
|
70564
70628
|
const validateStatus2 = response.config.validateStatus;
|
70565
70629
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
@@ -70575,17 +70639,17 @@ function settle(resolve, reject, response) {
|
|
70575
70639
|
}
|
70576
70640
|
}
|
70577
70641
|
|
70578
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70642
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
70579
70643
|
function isAbsoluteURL(url2) {
|
70580
70644
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
70581
70645
|
}
|
70582
70646
|
|
70583
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70647
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/combineURLs.js
|
70584
70648
|
function combineURLs(baseURL, relativeURL) {
|
70585
70649
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
70586
70650
|
}
|
70587
70651
|
|
70588
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70652
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/buildFullPath.js
|
70589
70653
|
function buildFullPath(baseURL, requestedURL) {
|
70590
70654
|
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
70591
70655
|
return combineURLs(baseURL, requestedURL);
|
@@ -70593,7 +70657,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
70593
70657
|
return requestedURL;
|
70594
70658
|
}
|
70595
70659
|
|
70596
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70660
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70597
70661
|
var import_proxy_from_env = __toESM(require_proxy_from_env());
|
70598
70662
|
var import_http = __toESM(require("http"));
|
70599
70663
|
var import_https = __toESM(require("https"));
|
@@ -70601,16 +70665,16 @@ var import_util2 = __toESM(require("util"));
|
|
70601
70665
|
var import_follow_redirects = __toESM(require_follow_redirects());
|
70602
70666
|
var import_zlib = __toESM(require("zlib"));
|
70603
70667
|
|
70604
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70605
|
-
var VERSION = "1.
|
70668
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/env/data.js
|
70669
|
+
var VERSION = "1.7.4";
|
70606
70670
|
|
70607
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70671
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/parseProtocol.js
|
70608
70672
|
function parseProtocol(url2) {
|
70609
70673
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
70610
70674
|
return match && match[1] || "";
|
70611
70675
|
}
|
70612
70676
|
|
70613
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70677
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/fromDataURI.js
|
70614
70678
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
70615
70679
|
function fromDataURI(uri, asBlob, options) {
|
70616
70680
|
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
@@ -70639,39 +70703,263 @@ function fromDataURI(uri, asBlob, options) {
|
|
70639
70703
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
70640
70704
|
}
|
70641
70705
|
|
70642
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70706
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70643
70707
|
var import_stream4 = __toESM(require("stream"));
|
70644
70708
|
|
70645
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70709
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
70646
70710
|
var import_stream = __toESM(require("stream"));
|
70647
|
-
|
70648
|
-
|
70649
|
-
|
70650
|
-
|
70651
|
-
|
70652
|
-
|
70653
|
-
|
70654
|
-
|
70655
|
-
|
70656
|
-
|
70657
|
-
|
70658
|
-
|
70711
|
+
var kInternals = Symbol("internals");
|
70712
|
+
var AxiosTransformStream = class extends import_stream.default.Transform {
|
70713
|
+
constructor(options) {
|
70714
|
+
options = utils_default.toFlatObject(options, {
|
70715
|
+
maxRate: 0,
|
70716
|
+
chunkSize: 64 * 1024,
|
70717
|
+
minChunkSize: 100,
|
70718
|
+
timeWindow: 500,
|
70719
|
+
ticksRate: 2,
|
70720
|
+
samplesCount: 15
|
70721
|
+
}, null, (prop, source) => {
|
70722
|
+
return !utils_default.isUndefined(source[prop]);
|
70723
|
+
});
|
70724
|
+
super({
|
70725
|
+
readableHighWaterMark: options.chunkSize
|
70726
|
+
});
|
70727
|
+
const internals = this[kInternals] = {
|
70728
|
+
timeWindow: options.timeWindow,
|
70729
|
+
chunkSize: options.chunkSize,
|
70730
|
+
maxRate: options.maxRate,
|
70731
|
+
minChunkSize: options.minChunkSize,
|
70732
|
+
bytesSeen: 0,
|
70733
|
+
isCaptured: false,
|
70734
|
+
notifiedBytesLoaded: 0,
|
70735
|
+
ts: Date.now(),
|
70736
|
+
bytes: 0,
|
70737
|
+
onReadCallback: null
|
70738
|
+
};
|
70739
|
+
this.on("newListener", (event) => {
|
70740
|
+
if (event === "progress") {
|
70741
|
+
if (!internals.isCaptured) {
|
70742
|
+
internals.isCaptured = true;
|
70743
|
+
}
|
70659
70744
|
}
|
70660
|
-
|
70661
|
-
|
70745
|
+
});
|
70746
|
+
}
|
70747
|
+
_read(size) {
|
70748
|
+
const internals = this[kInternals];
|
70749
|
+
if (internals.onReadCallback) {
|
70750
|
+
internals.onReadCallback();
|
70662
70751
|
}
|
70663
|
-
|
70664
|
-
|
70665
|
-
|
70666
|
-
|
70667
|
-
|
70668
|
-
|
70752
|
+
return super._read(size);
|
70753
|
+
}
|
70754
|
+
_transform(chunk, encoding, callback) {
|
70755
|
+
const internals = this[kInternals];
|
70756
|
+
const maxRate = internals.maxRate;
|
70757
|
+
const readableHighWaterMark = this.readableHighWaterMark;
|
70758
|
+
const timeWindow = internals.timeWindow;
|
70759
|
+
const divider = 1e3 / timeWindow;
|
70760
|
+
const bytesThreshold = maxRate / divider;
|
70761
|
+
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
70762
|
+
const pushChunk = (_chunk, _callback) => {
|
70763
|
+
const bytes = Buffer.byteLength(_chunk);
|
70764
|
+
internals.bytesSeen += bytes;
|
70765
|
+
internals.bytes += bytes;
|
70766
|
+
internals.isCaptured && this.emit("progress", internals.bytesSeen);
|
70767
|
+
if (this.push(_chunk)) {
|
70768
|
+
process.nextTick(_callback);
|
70769
|
+
} else {
|
70770
|
+
internals.onReadCallback = () => {
|
70771
|
+
internals.onReadCallback = null;
|
70772
|
+
process.nextTick(_callback);
|
70773
|
+
};
|
70774
|
+
}
|
70775
|
+
};
|
70776
|
+
const transformChunk = (_chunk, _callback) => {
|
70777
|
+
const chunkSize = Buffer.byteLength(_chunk);
|
70778
|
+
let chunkRemainder = null;
|
70779
|
+
let maxChunkSize = readableHighWaterMark;
|
70780
|
+
let bytesLeft;
|
70781
|
+
let passed = 0;
|
70782
|
+
if (maxRate) {
|
70783
|
+
const now = Date.now();
|
70784
|
+
if (!internals.ts || (passed = now - internals.ts) >= timeWindow) {
|
70785
|
+
internals.ts = now;
|
70786
|
+
bytesLeft = bytesThreshold - internals.bytes;
|
70787
|
+
internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;
|
70788
|
+
passed = 0;
|
70789
|
+
}
|
70790
|
+
bytesLeft = bytesThreshold - internals.bytes;
|
70791
|
+
}
|
70792
|
+
if (maxRate) {
|
70793
|
+
if (bytesLeft <= 0) {
|
70794
|
+
return setTimeout(() => {
|
70795
|
+
_callback(null, _chunk);
|
70796
|
+
}, timeWindow - passed);
|
70797
|
+
}
|
70798
|
+
if (bytesLeft < maxChunkSize) {
|
70799
|
+
maxChunkSize = bytesLeft;
|
70800
|
+
}
|
70801
|
+
}
|
70802
|
+
if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
|
70803
|
+
chunkRemainder = _chunk.subarray(maxChunkSize);
|
70804
|
+
_chunk = _chunk.subarray(0, maxChunkSize);
|
70805
|
+
}
|
70806
|
+
pushChunk(_chunk, chunkRemainder ? () => {
|
70807
|
+
process.nextTick(_callback, null, chunkRemainder);
|
70808
|
+
} : _callback);
|
70809
|
+
};
|
70810
|
+
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
70811
|
+
if (err) {
|
70812
|
+
return callback(err);
|
70813
|
+
}
|
70814
|
+
if (_chunk) {
|
70815
|
+
transformChunk(_chunk, transformNextChunk);
|
70816
|
+
} else {
|
70817
|
+
callback(null);
|
70818
|
+
}
|
70819
|
+
});
|
70820
|
+
}
|
70821
|
+
};
|
70822
|
+
var AxiosTransformStream_default = AxiosTransformStream;
|
70823
|
+
|
70824
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70825
|
+
var import_events2 = require("events");
|
70826
|
+
|
70827
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToStream.js
|
70828
|
+
var import_util = require("util");
|
70829
|
+
var import_stream2 = require("stream");
|
70830
|
+
|
70831
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/readBlob.js
|
70832
|
+
var { asyncIterator } = Symbol;
|
70833
|
+
var readBlob = async function* (blob) {
|
70834
|
+
if (blob.stream) {
|
70835
|
+
yield* blob.stream();
|
70836
|
+
} else if (blob.arrayBuffer) {
|
70837
|
+
yield await blob.arrayBuffer();
|
70838
|
+
} else if (blob[asyncIterator]) {
|
70839
|
+
yield* blob[asyncIterator]();
|
70840
|
+
} else {
|
70841
|
+
yield blob;
|
70842
|
+
}
|
70843
|
+
};
|
70844
|
+
var readBlob_default = readBlob;
|
70845
|
+
|
70846
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToStream.js
|
70847
|
+
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
|
70848
|
+
var textEncoder = new import_util.TextEncoder();
|
70849
|
+
var CRLF = "\r\n";
|
70850
|
+
var CRLF_BYTES = textEncoder.encode(CRLF);
|
70851
|
+
var CRLF_BYTES_COUNT = 2;
|
70852
|
+
var FormDataPart = class {
|
70853
|
+
constructor(name, value) {
|
70854
|
+
const { escapeName } = this.constructor;
|
70855
|
+
const isStringValue = utils_default.isString(value);
|
70856
|
+
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
|
70857
|
+
if (isStringValue) {
|
70858
|
+
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
70859
|
+
} else {
|
70860
|
+
headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
|
70669
70861
|
}
|
70862
|
+
this.headers = textEncoder.encode(headers + CRLF);
|
70863
|
+
this.contentLength = isStringValue ? value.byteLength : value.size;
|
70864
|
+
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
70865
|
+
this.name = name;
|
70866
|
+
this.value = value;
|
70867
|
+
}
|
70868
|
+
async *encode() {
|
70869
|
+
yield this.headers;
|
70870
|
+
const { value } = this;
|
70871
|
+
if (utils_default.isTypedArray(value)) {
|
70872
|
+
yield value;
|
70873
|
+
} else {
|
70874
|
+
yield* readBlob_default(value);
|
70875
|
+
}
|
70876
|
+
yield CRLF_BYTES;
|
70877
|
+
}
|
70878
|
+
static escapeName(name) {
|
70879
|
+
return String(name).replace(/[\r\n"]/g, (match) => ({
|
70880
|
+
"\r": "%0D",
|
70881
|
+
"\n": "%0A",
|
70882
|
+
'"': "%22"
|
70883
|
+
})[match]);
|
70884
|
+
}
|
70885
|
+
};
|
70886
|
+
var formDataToStream = (form, headersHandler, options) => {
|
70887
|
+
const {
|
70888
|
+
tag = "form-data-boundary",
|
70889
|
+
size = 25,
|
70890
|
+
boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
|
70891
|
+
} = options || {};
|
70892
|
+
if (!utils_default.isFormData(form)) {
|
70893
|
+
throw TypeError("FormData instance required");
|
70894
|
+
}
|
70895
|
+
if (boundary.length < 1 || boundary.length > 70) {
|
70896
|
+
throw Error("boundary must be 10-70 characters long");
|
70897
|
+
}
|
70898
|
+
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
70899
|
+
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
|
70900
|
+
let contentLength = footerBytes.byteLength;
|
70901
|
+
const parts = Array.from(form.entries()).map(([name, value]) => {
|
70902
|
+
const part = new FormDataPart(name, value);
|
70903
|
+
contentLength += part.size;
|
70904
|
+
return part;
|
70905
|
+
});
|
70906
|
+
contentLength += boundaryBytes.byteLength * parts.length;
|
70907
|
+
contentLength = utils_default.toFiniteNumber(contentLength);
|
70908
|
+
const computedHeaders = {
|
70909
|
+
"Content-Type": `multipart/form-data; boundary=${boundary}`
|
70670
70910
|
};
|
70671
|
-
|
70672
|
-
|
70911
|
+
if (Number.isFinite(contentLength)) {
|
70912
|
+
computedHeaders["Content-Length"] = contentLength;
|
70913
|
+
}
|
70914
|
+
headersHandler && headersHandler(computedHeaders);
|
70915
|
+
return import_stream2.Readable.from(async function* () {
|
70916
|
+
for (const part of parts) {
|
70917
|
+
yield boundaryBytes;
|
70918
|
+
yield* part.encode();
|
70919
|
+
}
|
70920
|
+
yield footerBytes;
|
70921
|
+
}());
|
70922
|
+
};
|
70923
|
+
var formDataToStream_default = formDataToStream;
|
70924
|
+
|
70925
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
70926
|
+
var import_stream3 = __toESM(require("stream"));
|
70927
|
+
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
70928
|
+
__transform(chunk, encoding, callback) {
|
70929
|
+
this.push(chunk);
|
70930
|
+
callback();
|
70931
|
+
}
|
70932
|
+
_transform(chunk, encoding, callback) {
|
70933
|
+
if (chunk.length !== 0) {
|
70934
|
+
this._transform = this.__transform;
|
70935
|
+
if (chunk[0] !== 120) {
|
70936
|
+
const header = Buffer.alloc(2);
|
70937
|
+
header[0] = 120;
|
70938
|
+
header[1] = 156;
|
70939
|
+
this.push(header, encoding);
|
70940
|
+
}
|
70941
|
+
}
|
70942
|
+
this.__transform(chunk, encoding, callback);
|
70943
|
+
}
|
70944
|
+
};
|
70945
|
+
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
70946
|
+
|
70947
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/callbackify.js
|
70948
|
+
var callbackify = (fn, reducer) => {
|
70949
|
+
return utils_default.isAsyncFn(fn) ? function(...args) {
|
70950
|
+
const cb = args.pop();
|
70951
|
+
fn.apply(this, args).then((value) => {
|
70952
|
+
try {
|
70953
|
+
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
70954
|
+
} catch (err) {
|
70955
|
+
cb(err);
|
70956
|
+
}
|
70957
|
+
}, cb);
|
70958
|
+
} : fn;
|
70959
|
+
};
|
70960
|
+
var callbackify_default = callbackify;
|
70673
70961
|
|
70674
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70962
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/speedometer.js
|
70675
70963
|
function speedometer(samplesCount, min) {
|
70676
70964
|
samplesCount = samplesCount || 10;
|
70677
70965
|
const bytes = new Array(samplesCount);
|
@@ -70707,295 +70995,77 @@ function speedometer(samplesCount, min) {
|
|
70707
70995
|
}
|
70708
70996
|
var speedometer_default = speedometer;
|
70709
70997
|
|
70710
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70711
|
-
|
70712
|
-
|
70713
|
-
|
70714
|
-
|
70715
|
-
|
70716
|
-
|
70717
|
-
|
70718
|
-
|
70719
|
-
|
70720
|
-
|
70721
|
-
|
70722
|
-
|
70723
|
-
|
70724
|
-
|
70725
|
-
|
70726
|
-
|
70727
|
-
const
|
70728
|
-
|
70729
|
-
|
70730
|
-
timeWindow: options.timeWindow,
|
70731
|
-
ticksRate: options.ticksRate,
|
70732
|
-
chunkSize: options.chunkSize,
|
70733
|
-
maxRate: options.maxRate,
|
70734
|
-
minChunkSize: options.minChunkSize,
|
70735
|
-
bytesSeen: 0,
|
70736
|
-
isCaptured: false,
|
70737
|
-
notifiedBytesLoaded: 0,
|
70738
|
-
ts: Date.now(),
|
70739
|
-
bytes: 0,
|
70740
|
-
onReadCallback: null
|
70741
|
-
};
|
70742
|
-
const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
|
70743
|
-
this.on("newListener", (event) => {
|
70744
|
-
if (event === "progress") {
|
70745
|
-
if (!internals.isCaptured) {
|
70746
|
-
internals.isCaptured = true;
|
70747
|
-
}
|
70748
|
-
}
|
70749
|
-
});
|
70750
|
-
let bytesNotified = 0;
|
70751
|
-
internals.updateProgress = throttle_default(function throttledHandler() {
|
70752
|
-
const totalBytes = internals.length;
|
70753
|
-
const bytesTransferred = internals.bytesSeen;
|
70754
|
-
const progressBytes = bytesTransferred - bytesNotified;
|
70755
|
-
if (!progressBytes || self3.destroyed)
|
70756
|
-
return;
|
70757
|
-
const rate = _speedometer(progressBytes);
|
70758
|
-
bytesNotified = bytesTransferred;
|
70759
|
-
process.nextTick(() => {
|
70760
|
-
self3.emit("progress", {
|
70761
|
-
"loaded": bytesTransferred,
|
70762
|
-
"total": totalBytes,
|
70763
|
-
"progress": totalBytes ? bytesTransferred / totalBytes : void 0,
|
70764
|
-
"bytes": progressBytes,
|
70765
|
-
"rate": rate ? rate : void 0,
|
70766
|
-
"estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
|
70767
|
-
});
|
70768
|
-
});
|
70769
|
-
}, internals.ticksRate);
|
70770
|
-
const onFinish = () => {
|
70771
|
-
internals.updateProgress(true);
|
70772
|
-
};
|
70773
|
-
this.once("end", onFinish);
|
70774
|
-
this.once("error", onFinish);
|
70775
|
-
}
|
70776
|
-
_read(size) {
|
70777
|
-
const internals = this[kInternals];
|
70778
|
-
if (internals.onReadCallback) {
|
70779
|
-
internals.onReadCallback();
|
70780
|
-
}
|
70781
|
-
return super._read(size);
|
70782
|
-
}
|
70783
|
-
_transform(chunk, encoding, callback) {
|
70784
|
-
const self3 = this;
|
70785
|
-
const internals = this[kInternals];
|
70786
|
-
const maxRate = internals.maxRate;
|
70787
|
-
const readableHighWaterMark = this.readableHighWaterMark;
|
70788
|
-
const timeWindow = internals.timeWindow;
|
70789
|
-
const divider = 1e3 / timeWindow;
|
70790
|
-
const bytesThreshold = maxRate / divider;
|
70791
|
-
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
70792
|
-
function pushChunk(_chunk, _callback) {
|
70793
|
-
const bytes = Buffer.byteLength(_chunk);
|
70794
|
-
internals.bytesSeen += bytes;
|
70795
|
-
internals.bytes += bytes;
|
70796
|
-
if (internals.isCaptured) {
|
70797
|
-
internals.updateProgress();
|
70798
|
-
}
|
70799
|
-
if (self3.push(_chunk)) {
|
70800
|
-
process.nextTick(_callback);
|
70801
|
-
} else {
|
70802
|
-
internals.onReadCallback = () => {
|
70803
|
-
internals.onReadCallback = null;
|
70804
|
-
process.nextTick(_callback);
|
70805
|
-
};
|
70806
|
-
}
|
70807
|
-
}
|
70808
|
-
const transformChunk = (_chunk, _callback) => {
|
70809
|
-
const chunkSize = Buffer.byteLength(_chunk);
|
70810
|
-
let chunkRemainder = null;
|
70811
|
-
let maxChunkSize = readableHighWaterMark;
|
70812
|
-
let bytesLeft;
|
70813
|
-
let passed = 0;
|
70814
|
-
if (maxRate) {
|
70815
|
-
const now = Date.now();
|
70816
|
-
if (!internals.ts || (passed = now - internals.ts) >= timeWindow) {
|
70817
|
-
internals.ts = now;
|
70818
|
-
bytesLeft = bytesThreshold - internals.bytes;
|
70819
|
-
internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;
|
70820
|
-
passed = 0;
|
70821
|
-
}
|
70822
|
-
bytesLeft = bytesThreshold - internals.bytes;
|
70823
|
-
}
|
70824
|
-
if (maxRate) {
|
70825
|
-
if (bytesLeft <= 0) {
|
70826
|
-
return setTimeout(() => {
|
70827
|
-
_callback(null, _chunk);
|
70828
|
-
}, timeWindow - passed);
|
70829
|
-
}
|
70830
|
-
if (bytesLeft < maxChunkSize) {
|
70831
|
-
maxChunkSize = bytesLeft;
|
70832
|
-
}
|
70833
|
-
}
|
70834
|
-
if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
|
70835
|
-
chunkRemainder = _chunk.subarray(maxChunkSize);
|
70836
|
-
_chunk = _chunk.subarray(0, maxChunkSize);
|
70837
|
-
}
|
70838
|
-
pushChunk(_chunk, chunkRemainder ? () => {
|
70839
|
-
process.nextTick(_callback, null, chunkRemainder);
|
70840
|
-
} : _callback);
|
70841
|
-
};
|
70842
|
-
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
70843
|
-
if (err) {
|
70844
|
-
return callback(err);
|
70845
|
-
}
|
70846
|
-
if (_chunk) {
|
70847
|
-
transformChunk(_chunk, transformNextChunk);
|
70848
|
-
} else {
|
70849
|
-
callback(null);
|
70850
|
-
}
|
70851
|
-
});
|
70852
|
-
}
|
70853
|
-
setLength(length) {
|
70854
|
-
this[kInternals].length = +length;
|
70855
|
-
return this;
|
70856
|
-
}
|
70857
|
-
};
|
70858
|
-
var AxiosTransformStream_default = AxiosTransformStream;
|
70859
|
-
|
70860
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
|
70861
|
-
var import_events2 = __toESM(require("events"));
|
70862
|
-
|
70863
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToStream.js
|
70864
|
-
var import_util = require("util");
|
70865
|
-
var import_stream2 = require("stream");
|
70866
|
-
|
70867
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/readBlob.js
|
70868
|
-
var { asyncIterator } = Symbol;
|
70869
|
-
var readBlob = async function* (blob) {
|
70870
|
-
if (blob.stream) {
|
70871
|
-
yield* blob.stream();
|
70872
|
-
} else if (blob.arrayBuffer) {
|
70873
|
-
yield await blob.arrayBuffer();
|
70874
|
-
} else if (blob[asyncIterator]) {
|
70875
|
-
yield* blob[asyncIterator]();
|
70876
|
-
} else {
|
70877
|
-
yield blob;
|
70878
|
-
}
|
70879
|
-
};
|
70880
|
-
var readBlob_default = readBlob;
|
70881
|
-
|
70882
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToStream.js
|
70883
|
-
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
|
70884
|
-
var textEncoder = new import_util.TextEncoder();
|
70885
|
-
var CRLF = "\r\n";
|
70886
|
-
var CRLF_BYTES = textEncoder.encode(CRLF);
|
70887
|
-
var CRLF_BYTES_COUNT = 2;
|
70888
|
-
var FormDataPart = class {
|
70889
|
-
constructor(name, value) {
|
70890
|
-
const { escapeName } = this.constructor;
|
70891
|
-
const isStringValue = utils_default.isString(value);
|
70892
|
-
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
|
70893
|
-
if (isStringValue) {
|
70894
|
-
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
70895
|
-
} else {
|
70896
|
-
headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
|
70897
|
-
}
|
70898
|
-
this.headers = textEncoder.encode(headers + CRLF);
|
70899
|
-
this.contentLength = isStringValue ? value.byteLength : value.size;
|
70900
|
-
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
70901
|
-
this.name = name;
|
70902
|
-
this.value = value;
|
70903
|
-
}
|
70904
|
-
async *encode() {
|
70905
|
-
yield this.headers;
|
70906
|
-
const { value } = this;
|
70907
|
-
if (utils_default.isTypedArray(value)) {
|
70908
|
-
yield value;
|
70998
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/throttle.js
|
70999
|
+
function throttle(fn, freq) {
|
71000
|
+
let timestamp = 0;
|
71001
|
+
let threshold = 1e3 / freq;
|
71002
|
+
let lastArgs;
|
71003
|
+
let timer;
|
71004
|
+
const invoke = (args, now = Date.now()) => {
|
71005
|
+
timestamp = now;
|
71006
|
+
lastArgs = null;
|
71007
|
+
if (timer) {
|
71008
|
+
clearTimeout(timer);
|
71009
|
+
timer = null;
|
71010
|
+
}
|
71011
|
+
fn.apply(null, args);
|
71012
|
+
};
|
71013
|
+
const throttled = (...args) => {
|
71014
|
+
const now = Date.now();
|
71015
|
+
const passed = now - timestamp;
|
71016
|
+
if (passed >= threshold) {
|
71017
|
+
invoke(args, now);
|
70909
71018
|
} else {
|
70910
|
-
|
71019
|
+
lastArgs = args;
|
71020
|
+
if (!timer) {
|
71021
|
+
timer = setTimeout(() => {
|
71022
|
+
timer = null;
|
71023
|
+
invoke(lastArgs);
|
71024
|
+
}, threshold - passed);
|
71025
|
+
}
|
70911
71026
|
}
|
70912
|
-
yield CRLF_BYTES;
|
70913
|
-
}
|
70914
|
-
static escapeName(name) {
|
70915
|
-
return String(name).replace(/[\r\n"]/g, (match) => ({
|
70916
|
-
"\r": "%0D",
|
70917
|
-
"\n": "%0A",
|
70918
|
-
'"': "%22"
|
70919
|
-
})[match]);
|
70920
|
-
}
|
70921
|
-
};
|
70922
|
-
var formDataToStream = (form, headersHandler, options) => {
|
70923
|
-
const {
|
70924
|
-
tag = "form-data-boundary",
|
70925
|
-
size = 25,
|
70926
|
-
boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
|
70927
|
-
} = options || {};
|
70928
|
-
if (!utils_default.isFormData(form)) {
|
70929
|
-
throw TypeError("FormData instance required");
|
70930
|
-
}
|
70931
|
-
if (boundary.length < 1 || boundary.length > 70) {
|
70932
|
-
throw Error("boundary must be 10-70 characters long");
|
70933
|
-
}
|
70934
|
-
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
70935
|
-
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
|
70936
|
-
let contentLength = footerBytes.byteLength;
|
70937
|
-
const parts = Array.from(form.entries()).map(([name, value]) => {
|
70938
|
-
const part = new FormDataPart(name, value);
|
70939
|
-
contentLength += part.size;
|
70940
|
-
return part;
|
70941
|
-
});
|
70942
|
-
contentLength += boundaryBytes.byteLength * parts.length;
|
70943
|
-
contentLength = utils_default.toFiniteNumber(contentLength);
|
70944
|
-
const computedHeaders = {
|
70945
|
-
"Content-Type": `multipart/form-data; boundary=${boundary}`
|
70946
71027
|
};
|
70947
|
-
|
70948
|
-
|
70949
|
-
|
70950
|
-
|
70951
|
-
return import_stream2.Readable.from(async function* () {
|
70952
|
-
for (const part of parts) {
|
70953
|
-
yield boundaryBytes;
|
70954
|
-
yield* part.encode();
|
70955
|
-
}
|
70956
|
-
yield footerBytes;
|
70957
|
-
}());
|
70958
|
-
};
|
70959
|
-
var formDataToStream_default = formDataToStream;
|
71028
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
71029
|
+
return [throttled, flush];
|
71030
|
+
}
|
71031
|
+
var throttle_default = throttle;
|
70960
71032
|
|
70961
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70962
|
-
var
|
70963
|
-
|
70964
|
-
|
70965
|
-
|
70966
|
-
|
70967
|
-
|
70968
|
-
|
70969
|
-
|
70970
|
-
|
70971
|
-
|
70972
|
-
|
70973
|
-
|
70974
|
-
|
70975
|
-
|
70976
|
-
|
70977
|
-
|
70978
|
-
|
70979
|
-
|
71033
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/progressEventReducer.js
|
71034
|
+
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
71035
|
+
let bytesNotified = 0;
|
71036
|
+
const _speedometer = speedometer_default(50, 250);
|
71037
|
+
return throttle_default((e) => {
|
71038
|
+
const loaded = e.loaded;
|
71039
|
+
const total = e.lengthComputable ? e.total : void 0;
|
71040
|
+
const progressBytes = loaded - bytesNotified;
|
71041
|
+
const rate = _speedometer(progressBytes);
|
71042
|
+
const inRange = loaded <= total;
|
71043
|
+
bytesNotified = loaded;
|
71044
|
+
const data = {
|
71045
|
+
loaded,
|
71046
|
+
total,
|
71047
|
+
progress: total ? loaded / total : void 0,
|
71048
|
+
bytes: progressBytes,
|
71049
|
+
rate: rate ? rate : void 0,
|
71050
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
71051
|
+
event: e,
|
71052
|
+
lengthComputable: total != null,
|
71053
|
+
[isDownloadStream ? "download" : "upload"]: true
|
71054
|
+
};
|
71055
|
+
listener(data);
|
71056
|
+
}, freq);
|
70980
71057
|
};
|
70981
|
-
var
|
70982
|
-
|
70983
|
-
|
70984
|
-
|
70985
|
-
|
70986
|
-
|
70987
|
-
|
70988
|
-
try {
|
70989
|
-
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
70990
|
-
} catch (err) {
|
70991
|
-
cb(err);
|
70992
|
-
}
|
70993
|
-
}, cb);
|
70994
|
-
} : fn;
|
71058
|
+
var progressEventDecorator = (total, throttled) => {
|
71059
|
+
const lengthComputable = total != null;
|
71060
|
+
return [(loaded) => throttled[0]({
|
71061
|
+
lengthComputable,
|
71062
|
+
total,
|
71063
|
+
loaded
|
71064
|
+
}), throttled[1]];
|
70995
71065
|
};
|
70996
|
-
var
|
71066
|
+
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
70997
71067
|
|
70998
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
71068
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70999
71069
|
var zlibOptions = {
|
71000
71070
|
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
71001
71071
|
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
@@ -71010,6 +71080,10 @@ var isHttps = /https:?/;
|
|
71010
71080
|
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
71011
71081
|
return protocol + ":";
|
71012
71082
|
});
|
71083
|
+
var flushOnFinish = (stream4, [throttled, flush]) => {
|
71084
|
+
stream4.on("end", flush).on("error", flush);
|
71085
|
+
return throttled;
|
71086
|
+
};
|
71013
71087
|
function dispatchBeforeRedirect(options, responseDetails) {
|
71014
71088
|
if (options.beforeRedirects.proxy) {
|
71015
71089
|
options.beforeRedirects.proxy(options);
|
@@ -71103,7 +71177,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71103
71177
|
});
|
71104
71178
|
};
|
71105
71179
|
}
|
71106
|
-
const emitter = new import_events2.
|
71180
|
+
const emitter = new import_events2.EventEmitter();
|
71107
71181
|
const onFinished = () => {
|
71108
71182
|
if (config.cancelToken) {
|
71109
71183
|
config.cancelToken.unsubscribe(abort);
|
@@ -71131,7 +71205,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71131
71205
|
}
|
71132
71206
|
}
|
71133
71207
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
71134
|
-
const parsed = new URL(fullPath,
|
71208
|
+
const parsed = new URL(fullPath, utils_default.hasBrowserEnv ? platform_default.origin : void 0);
|
71135
71209
|
const protocol = parsed.protocol || supportedProtocols[0];
|
71136
71210
|
if (protocol === "data:") {
|
71137
71211
|
let convertedData;
|
@@ -71175,8 +71249,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71175
71249
|
}
|
71176
71250
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
71177
71251
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
71178
|
-
const onDownloadProgress = config
|
71179
|
-
const onUploadProgress = config.onUploadProgress;
|
71252
|
+
const { onUploadProgress, onDownloadProgress } = config;
|
71180
71253
|
const maxRate = config.maxRate;
|
71181
71254
|
let maxUploadRate = void 0;
|
71182
71255
|
let maxDownloadRate = void 0;
|
@@ -71235,14 +71308,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71235
71308
|
data = import_stream4.default.Readable.from(data, { objectMode: false });
|
71236
71309
|
}
|
71237
71310
|
data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
|
71238
|
-
length: contentLength,
|
71239
71311
|
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
71240
71312
|
})], utils_default.noop);
|
71241
|
-
onUploadProgress && data.on("progress", (
|
71242
|
-
|
71243
|
-
|
71244
|
-
|
71245
|
-
|
71313
|
+
onUploadProgress && data.on("progress", flushOnFinish(
|
71314
|
+
data,
|
71315
|
+
progressEventDecorator(
|
71316
|
+
contentLength,
|
71317
|
+
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
71318
|
+
)
|
71319
|
+
));
|
71246
71320
|
}
|
71247
71321
|
let auth = void 0;
|
71248
71322
|
if (config.auth) {
|
@@ -71323,16 +71397,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71323
71397
|
return;
|
71324
71398
|
const streams = [res];
|
71325
71399
|
const responseLength = +res.headers["content-length"];
|
71326
|
-
if (onDownloadProgress) {
|
71400
|
+
if (onDownloadProgress || maxDownloadRate) {
|
71327
71401
|
const transformStream = new AxiosTransformStream_default({
|
71328
|
-
length: utils_default.toFiniteNumber(responseLength),
|
71329
71402
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
71330
71403
|
});
|
71331
|
-
onDownloadProgress && transformStream.on("progress", (
|
71332
|
-
|
71333
|
-
|
71334
|
-
|
71335
|
-
|
71404
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(
|
71405
|
+
transformStream,
|
71406
|
+
progressEventDecorator(
|
71407
|
+
responseLength,
|
71408
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
71409
|
+
)
|
71410
|
+
));
|
71336
71411
|
streams.push(transformStream);
|
71337
71412
|
}
|
71338
71413
|
let responseStream = res;
|
@@ -71494,40 +71569,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71494
71569
|
});
|
71495
71570
|
};
|
71496
71571
|
|
71497
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
71498
|
-
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
71499
|
-
// Standard browser envs support document.cookie
|
71500
|
-
{
|
71501
|
-
write(name, value, expires, path17, domain, secure) {
|
71502
|
-
const cookie = [name + "=" + encodeURIComponent(value)];
|
71503
|
-
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
71504
|
-
utils_default.isString(path17) && cookie.push("path=" + path17);
|
71505
|
-
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
71506
|
-
secure === true && cookie.push("secure");
|
71507
|
-
document.cookie = cookie.join("; ");
|
71508
|
-
},
|
71509
|
-
read(name) {
|
71510
|
-
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
71511
|
-
return match ? decodeURIComponent(match[3]) : null;
|
71512
|
-
},
|
71513
|
-
remove(name) {
|
71514
|
-
this.write(name, "", Date.now() - 864e5);
|
71515
|
-
}
|
71516
|
-
}
|
71517
|
-
) : (
|
71518
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
71519
|
-
{
|
71520
|
-
write() {
|
71521
|
-
},
|
71522
|
-
read() {
|
71523
|
-
return null;
|
71524
|
-
},
|
71525
|
-
remove() {
|
71526
|
-
}
|
71527
|
-
}
|
71528
|
-
);
|
71529
|
-
|
71530
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
71572
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
71531
71573
|
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
|
71532
71574
|
// Standard browser envs have full support of the APIs needed to test
|
71533
71575
|
// whether the request URL is of the same origin as current location.
|
@@ -71568,63 +71610,172 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
|
|
71568
71610
|
}()
|
71569
71611
|
);
|
71570
71612
|
|
71571
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
71572
|
-
|
71573
|
-
|
71574
|
-
|
71575
|
-
|
71576
|
-
|
71577
|
-
|
71578
|
-
|
71579
|
-
|
71580
|
-
|
71581
|
-
|
71582
|
-
|
71583
|
-
|
71584
|
-
|
71585
|
-
|
71586
|
-
|
71587
|
-
|
71588
|
-
|
71589
|
-
|
71590
|
-
|
71591
|
-
|
71592
|
-
|
71613
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/cookies.js
|
71614
|
+
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
71615
|
+
// Standard browser envs support document.cookie
|
71616
|
+
{
|
71617
|
+
write(name, value, expires, path17, domain, secure) {
|
71618
|
+
const cookie = [name + "=" + encodeURIComponent(value)];
|
71619
|
+
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
71620
|
+
utils_default.isString(path17) && cookie.push("path=" + path17);
|
71621
|
+
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
71622
|
+
secure === true && cookie.push("secure");
|
71623
|
+
document.cookie = cookie.join("; ");
|
71624
|
+
},
|
71625
|
+
read(name) {
|
71626
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
71627
|
+
return match ? decodeURIComponent(match[3]) : null;
|
71628
|
+
},
|
71629
|
+
remove(name) {
|
71630
|
+
this.write(name, "", Date.now() - 864e5);
|
71631
|
+
}
|
71632
|
+
}
|
71633
|
+
) : (
|
71634
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
71635
|
+
{
|
71636
|
+
write() {
|
71637
|
+
},
|
71638
|
+
read() {
|
71639
|
+
return null;
|
71640
|
+
},
|
71641
|
+
remove() {
|
71642
|
+
}
|
71643
|
+
}
|
71644
|
+
);
|
71645
|
+
|
71646
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/mergeConfig.js
|
71647
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
71648
|
+
function mergeConfig(config1, config2) {
|
71649
|
+
config2 = config2 || {};
|
71650
|
+
const config = {};
|
71651
|
+
function getMergedValue(target, source, caseless) {
|
71652
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
71653
|
+
return utils_default.merge.call({ caseless }, target, source);
|
71654
|
+
} else if (utils_default.isPlainObject(source)) {
|
71655
|
+
return utils_default.merge({}, source);
|
71656
|
+
} else if (utils_default.isArray(source)) {
|
71657
|
+
return source.slice();
|
71658
|
+
}
|
71659
|
+
return source;
|
71660
|
+
}
|
71661
|
+
function mergeDeepProperties(a, b, caseless) {
|
71662
|
+
if (!utils_default.isUndefined(b)) {
|
71663
|
+
return getMergedValue(a, b, caseless);
|
71664
|
+
} else if (!utils_default.isUndefined(a)) {
|
71665
|
+
return getMergedValue(void 0, a, caseless);
|
71666
|
+
}
|
71667
|
+
}
|
71668
|
+
function valueFromConfig2(a, b) {
|
71669
|
+
if (!utils_default.isUndefined(b)) {
|
71670
|
+
return getMergedValue(void 0, b);
|
71671
|
+
}
|
71672
|
+
}
|
71673
|
+
function defaultToConfig2(a, b) {
|
71674
|
+
if (!utils_default.isUndefined(b)) {
|
71675
|
+
return getMergedValue(void 0, b);
|
71676
|
+
} else if (!utils_default.isUndefined(a)) {
|
71677
|
+
return getMergedValue(void 0, a);
|
71678
|
+
}
|
71679
|
+
}
|
71680
|
+
function mergeDirectKeys(a, b, prop) {
|
71681
|
+
if (prop in config2) {
|
71682
|
+
return getMergedValue(a, b);
|
71683
|
+
} else if (prop in config1) {
|
71684
|
+
return getMergedValue(void 0, a);
|
71685
|
+
}
|
71686
|
+
}
|
71687
|
+
const mergeMap = {
|
71688
|
+
url: valueFromConfig2,
|
71689
|
+
method: valueFromConfig2,
|
71690
|
+
data: valueFromConfig2,
|
71691
|
+
baseURL: defaultToConfig2,
|
71692
|
+
transformRequest: defaultToConfig2,
|
71693
|
+
transformResponse: defaultToConfig2,
|
71694
|
+
paramsSerializer: defaultToConfig2,
|
71695
|
+
timeout: defaultToConfig2,
|
71696
|
+
timeoutMessage: defaultToConfig2,
|
71697
|
+
withCredentials: defaultToConfig2,
|
71698
|
+
withXSRFToken: defaultToConfig2,
|
71699
|
+
adapter: defaultToConfig2,
|
71700
|
+
responseType: defaultToConfig2,
|
71701
|
+
xsrfCookieName: defaultToConfig2,
|
71702
|
+
xsrfHeaderName: defaultToConfig2,
|
71703
|
+
onUploadProgress: defaultToConfig2,
|
71704
|
+
onDownloadProgress: defaultToConfig2,
|
71705
|
+
decompress: defaultToConfig2,
|
71706
|
+
maxContentLength: defaultToConfig2,
|
71707
|
+
maxBodyLength: defaultToConfig2,
|
71708
|
+
beforeRedirect: defaultToConfig2,
|
71709
|
+
transport: defaultToConfig2,
|
71710
|
+
httpAgent: defaultToConfig2,
|
71711
|
+
httpsAgent: defaultToConfig2,
|
71712
|
+
cancelToken: defaultToConfig2,
|
71713
|
+
socketPath: defaultToConfig2,
|
71714
|
+
responseEncoding: defaultToConfig2,
|
71715
|
+
validateStatus: mergeDirectKeys,
|
71716
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
71593
71717
|
};
|
71718
|
+
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
71719
|
+
const merge9 = mergeMap[prop] || mergeDeepProperties;
|
71720
|
+
const configValue = merge9(config1[prop], config2[prop], prop);
|
71721
|
+
utils_default.isUndefined(configValue) && merge9 !== mergeDirectKeys || (config[prop] = configValue);
|
71722
|
+
});
|
71723
|
+
return config;
|
71594
71724
|
}
|
71725
|
+
|
71726
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/resolveConfig.js
|
71727
|
+
var resolveConfig_default = (config) => {
|
71728
|
+
const newConfig = mergeConfig({}, config);
|
71729
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
71730
|
+
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
71731
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
71732
|
+
if (auth) {
|
71733
|
+
headers.set(
|
71734
|
+
"Authorization",
|
71735
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
71736
|
+
);
|
71737
|
+
}
|
71738
|
+
let contentType;
|
71739
|
+
if (utils_default.isFormData(data)) {
|
71740
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
71741
|
+
headers.setContentType(void 0);
|
71742
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
71743
|
+
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
71744
|
+
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
71745
|
+
}
|
71746
|
+
}
|
71747
|
+
if (platform_default.hasStandardBrowserEnv) {
|
71748
|
+
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
71749
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
71750
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
71751
|
+
if (xsrfValue) {
|
71752
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
71753
|
+
}
|
71754
|
+
}
|
71755
|
+
}
|
71756
|
+
return newConfig;
|
71757
|
+
};
|
71758
|
+
|
71759
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/xhr.js
|
71595
71760
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
71596
71761
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
71597
71762
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
71598
|
-
|
71599
|
-
|
71600
|
-
|
71763
|
+
const _config = resolveConfig_default(config);
|
71764
|
+
let requestData = _config.data;
|
71765
|
+
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
71766
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
71601
71767
|
let onCanceled;
|
71768
|
+
let uploadThrottled, downloadThrottled;
|
71769
|
+
let flushUpload, flushDownload;
|
71602
71770
|
function done() {
|
71603
|
-
|
71604
|
-
|
71605
|
-
|
71606
|
-
|
71607
|
-
config.signal.removeEventListener("abort", onCanceled);
|
71608
|
-
}
|
71609
|
-
}
|
71610
|
-
let contentType;
|
71611
|
-
if (utils_default.isFormData(requestData)) {
|
71612
|
-
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
71613
|
-
requestHeaders.setContentType(false);
|
71614
|
-
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
71615
|
-
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
71616
|
-
requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
71617
|
-
}
|
71771
|
+
flushUpload && flushUpload();
|
71772
|
+
flushDownload && flushDownload();
|
71773
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
71774
|
+
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
71618
71775
|
}
|
71619
71776
|
let request = new XMLHttpRequest();
|
71620
|
-
|
71621
|
-
|
71622
|
-
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
71623
|
-
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
71624
|
-
}
|
71625
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
71626
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
71627
|
-
request.timeout = config.timeout;
|
71777
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
71778
|
+
request.timeout = _config.timeout;
|
71628
71779
|
function onloadend() {
|
71629
71780
|
if (!request) {
|
71630
71781
|
return;
|
@@ -71675,10 +71826,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71675
71826
|
request = null;
|
71676
71827
|
};
|
71677
71828
|
request.ontimeout = function handleTimeout() {
|
71678
|
-
let timeoutErrorMessage =
|
71679
|
-
const transitional2 =
|
71680
|
-
if (
|
71681
|
-
timeoutErrorMessage =
|
71829
|
+
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
71830
|
+
const transitional2 = _config.transitional || transitional_default;
|
71831
|
+
if (_config.timeoutErrorMessage) {
|
71832
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
71682
71833
|
}
|
71683
71834
|
reject(new AxiosError_default(
|
71684
71835
|
timeoutErrorMessage,
|
@@ -71688,34 +71839,28 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71688
71839
|
));
|
71689
71840
|
request = null;
|
71690
71841
|
};
|
71691
|
-
if (platform_default.hasStandardBrowserEnv) {
|
71692
|
-
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
71693
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(fullPath)) {
|
71694
|
-
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
|
71695
|
-
if (xsrfValue) {
|
71696
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
71697
|
-
}
|
71698
|
-
}
|
71699
|
-
}
|
71700
71842
|
requestData === void 0 && requestHeaders.setContentType(null);
|
71701
71843
|
if ("setRequestHeader" in request) {
|
71702
71844
|
utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
71703
71845
|
request.setRequestHeader(key, val);
|
71704
71846
|
});
|
71705
71847
|
}
|
71706
|
-
if (!utils_default.isUndefined(
|
71707
|
-
request.withCredentials = !!
|
71848
|
+
if (!utils_default.isUndefined(_config.withCredentials)) {
|
71849
|
+
request.withCredentials = !!_config.withCredentials;
|
71708
71850
|
}
|
71709
71851
|
if (responseType && responseType !== "json") {
|
71710
|
-
request.responseType =
|
71852
|
+
request.responseType = _config.responseType;
|
71711
71853
|
}
|
71712
|
-
if (
|
71713
|
-
|
71854
|
+
if (onDownloadProgress) {
|
71855
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
71856
|
+
request.addEventListener("progress", downloadThrottled);
|
71714
71857
|
}
|
71715
|
-
if (
|
71716
|
-
|
71858
|
+
if (onUploadProgress && request.upload) {
|
71859
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
71860
|
+
request.upload.addEventListener("progress", uploadThrottled);
|
71861
|
+
request.upload.addEventListener("loadend", flushUpload);
|
71717
71862
|
}
|
71718
|
-
if (
|
71863
|
+
if (_config.cancelToken || _config.signal) {
|
71719
71864
|
onCanceled = (cancel) => {
|
71720
71865
|
if (!request) {
|
71721
71866
|
return;
|
@@ -71724,12 +71869,12 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71724
71869
|
request.abort();
|
71725
71870
|
request = null;
|
71726
71871
|
};
|
71727
|
-
|
71728
|
-
if (
|
71729
|
-
|
71872
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
71873
|
+
if (_config.signal) {
|
71874
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
71730
71875
|
}
|
71731
71876
|
}
|
71732
|
-
const protocol = parseProtocol(
|
71877
|
+
const protocol = parseProtocol(_config.url);
|
71733
71878
|
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
71734
71879
|
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
71735
71880
|
return;
|
@@ -71738,10 +71883,268 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71738
71883
|
});
|
71739
71884
|
};
|
71740
71885
|
|
71741
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
71886
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/composeSignals.js
|
71887
|
+
var composeSignals = (signals, timeout) => {
|
71888
|
+
let controller = new AbortController();
|
71889
|
+
let aborted;
|
71890
|
+
const onabort = function(cancel) {
|
71891
|
+
if (!aborted) {
|
71892
|
+
aborted = true;
|
71893
|
+
unsubscribe();
|
71894
|
+
const err = cancel instanceof Error ? cancel : this.reason;
|
71895
|
+
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
71896
|
+
}
|
71897
|
+
};
|
71898
|
+
let timer = timeout && setTimeout(() => {
|
71899
|
+
onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
|
71900
|
+
}, timeout);
|
71901
|
+
const unsubscribe = () => {
|
71902
|
+
if (signals) {
|
71903
|
+
timer && clearTimeout(timer);
|
71904
|
+
timer = null;
|
71905
|
+
signals.forEach((signal2) => {
|
71906
|
+
signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort));
|
71907
|
+
});
|
71908
|
+
signals = null;
|
71909
|
+
}
|
71910
|
+
};
|
71911
|
+
signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort));
|
71912
|
+
const { signal } = controller;
|
71913
|
+
signal.unsubscribe = unsubscribe;
|
71914
|
+
return [signal, () => {
|
71915
|
+
timer && clearTimeout(timer);
|
71916
|
+
timer = null;
|
71917
|
+
}];
|
71918
|
+
};
|
71919
|
+
var composeSignals_default = composeSignals;
|
71920
|
+
|
71921
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/trackStream.js
|
71922
|
+
var streamChunk = function* (chunk, chunkSize) {
|
71923
|
+
let len = chunk.byteLength;
|
71924
|
+
if (!chunkSize || len < chunkSize) {
|
71925
|
+
yield chunk;
|
71926
|
+
return;
|
71927
|
+
}
|
71928
|
+
let pos = 0;
|
71929
|
+
let end;
|
71930
|
+
while (pos < len) {
|
71931
|
+
end = pos + chunkSize;
|
71932
|
+
yield chunk.slice(pos, end);
|
71933
|
+
pos = end;
|
71934
|
+
}
|
71935
|
+
};
|
71936
|
+
var readBytes = async function* (iterable, chunkSize, encode3) {
|
71937
|
+
for await (const chunk of iterable) {
|
71938
|
+
yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize);
|
71939
|
+
}
|
71940
|
+
};
|
71941
|
+
var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => {
|
71942
|
+
const iterator = readBytes(stream4, chunkSize, encode3);
|
71943
|
+
let bytes = 0;
|
71944
|
+
let done;
|
71945
|
+
let _onFinish = (e) => {
|
71946
|
+
if (!done) {
|
71947
|
+
done = true;
|
71948
|
+
onFinish && onFinish(e);
|
71949
|
+
}
|
71950
|
+
};
|
71951
|
+
return new ReadableStream({
|
71952
|
+
async pull(controller) {
|
71953
|
+
try {
|
71954
|
+
const { done: done2, value } = await iterator.next();
|
71955
|
+
if (done2) {
|
71956
|
+
_onFinish();
|
71957
|
+
controller.close();
|
71958
|
+
return;
|
71959
|
+
}
|
71960
|
+
let len = value.byteLength;
|
71961
|
+
if (onProgress) {
|
71962
|
+
let loadedBytes = bytes += len;
|
71963
|
+
onProgress(loadedBytes);
|
71964
|
+
}
|
71965
|
+
controller.enqueue(new Uint8Array(value));
|
71966
|
+
} catch (err) {
|
71967
|
+
_onFinish(err);
|
71968
|
+
throw err;
|
71969
|
+
}
|
71970
|
+
},
|
71971
|
+
cancel(reason) {
|
71972
|
+
_onFinish(reason);
|
71973
|
+
return iterator.return();
|
71974
|
+
}
|
71975
|
+
}, {
|
71976
|
+
highWaterMark: 2
|
71977
|
+
});
|
71978
|
+
};
|
71979
|
+
|
71980
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/fetch.js
|
71981
|
+
var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
71982
|
+
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
71983
|
+
var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
71984
|
+
var test = (fn, ...args) => {
|
71985
|
+
try {
|
71986
|
+
return !!fn(...args);
|
71987
|
+
} catch (e) {
|
71988
|
+
return false;
|
71989
|
+
}
|
71990
|
+
};
|
71991
|
+
var supportsRequestStream = isReadableStreamSupported && test(() => {
|
71992
|
+
let duplexAccessed = false;
|
71993
|
+
const hasContentType = new Request(platform_default.origin, {
|
71994
|
+
body: new ReadableStream(),
|
71995
|
+
method: "POST",
|
71996
|
+
get duplex() {
|
71997
|
+
duplexAccessed = true;
|
71998
|
+
return "half";
|
71999
|
+
}
|
72000
|
+
}).headers.has("Content-Type");
|
72001
|
+
return duplexAccessed && !hasContentType;
|
72002
|
+
});
|
72003
|
+
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
72004
|
+
var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
72005
|
+
var resolvers = {
|
72006
|
+
stream: supportsResponseStream && ((res) => res.body)
|
72007
|
+
};
|
72008
|
+
isFetchSupported && ((res) => {
|
72009
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
72010
|
+
!resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
72011
|
+
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
|
72012
|
+
});
|
72013
|
+
});
|
72014
|
+
})(new Response());
|
72015
|
+
var getBodyLength = async (body) => {
|
72016
|
+
if (body == null) {
|
72017
|
+
return 0;
|
72018
|
+
}
|
72019
|
+
if (utils_default.isBlob(body)) {
|
72020
|
+
return body.size;
|
72021
|
+
}
|
72022
|
+
if (utils_default.isSpecCompliantForm(body)) {
|
72023
|
+
return (await new Request(body).arrayBuffer()).byteLength;
|
72024
|
+
}
|
72025
|
+
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
72026
|
+
return body.byteLength;
|
72027
|
+
}
|
72028
|
+
if (utils_default.isURLSearchParams(body)) {
|
72029
|
+
body = body + "";
|
72030
|
+
}
|
72031
|
+
if (utils_default.isString(body)) {
|
72032
|
+
return (await encodeText(body)).byteLength;
|
72033
|
+
}
|
72034
|
+
};
|
72035
|
+
var resolveBodyLength = async (headers, body) => {
|
72036
|
+
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
72037
|
+
return length == null ? getBodyLength(body) : length;
|
72038
|
+
};
|
72039
|
+
var fetch_default = isFetchSupported && (async (config) => {
|
72040
|
+
let {
|
72041
|
+
url: url2,
|
72042
|
+
method,
|
72043
|
+
data,
|
72044
|
+
signal,
|
72045
|
+
cancelToken,
|
72046
|
+
timeout,
|
72047
|
+
onDownloadProgress,
|
72048
|
+
onUploadProgress,
|
72049
|
+
responseType,
|
72050
|
+
headers,
|
72051
|
+
withCredentials = "same-origin",
|
72052
|
+
fetchOptions
|
72053
|
+
} = resolveConfig_default(config);
|
72054
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
72055
|
+
let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : [];
|
72056
|
+
let finished, request;
|
72057
|
+
const onFinish = () => {
|
72058
|
+
!finished && setTimeout(() => {
|
72059
|
+
composedSignal && composedSignal.unsubscribe();
|
72060
|
+
});
|
72061
|
+
finished = true;
|
72062
|
+
};
|
72063
|
+
let requestContentLength;
|
72064
|
+
try {
|
72065
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
72066
|
+
let _request = new Request(url2, {
|
72067
|
+
method: "POST",
|
72068
|
+
body: data,
|
72069
|
+
duplex: "half"
|
72070
|
+
});
|
72071
|
+
let contentTypeHeader;
|
72072
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
72073
|
+
headers.setContentType(contentTypeHeader);
|
72074
|
+
}
|
72075
|
+
if (_request.body) {
|
72076
|
+
const [onProgress, flush] = progressEventDecorator(
|
72077
|
+
requestContentLength,
|
72078
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
72079
|
+
);
|
72080
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
72081
|
+
}
|
72082
|
+
}
|
72083
|
+
if (!utils_default.isString(withCredentials)) {
|
72084
|
+
withCredentials = withCredentials ? "include" : "omit";
|
72085
|
+
}
|
72086
|
+
request = new Request(url2, {
|
72087
|
+
...fetchOptions,
|
72088
|
+
signal: composedSignal,
|
72089
|
+
method: method.toUpperCase(),
|
72090
|
+
headers: headers.normalize().toJSON(),
|
72091
|
+
body: data,
|
72092
|
+
duplex: "half",
|
72093
|
+
credentials: withCredentials
|
72094
|
+
});
|
72095
|
+
let response = await fetch(request);
|
72096
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
72097
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
|
72098
|
+
const options = {};
|
72099
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
72100
|
+
options[prop] = response[prop];
|
72101
|
+
});
|
72102
|
+
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
72103
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
72104
|
+
responseContentLength,
|
72105
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
72106
|
+
) || [];
|
72107
|
+
response = new Response(
|
72108
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
72109
|
+
flush && flush();
|
72110
|
+
isStreamResponse && onFinish();
|
72111
|
+
}, encodeText),
|
72112
|
+
options
|
72113
|
+
);
|
72114
|
+
}
|
72115
|
+
responseType = responseType || "text";
|
72116
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
|
72117
|
+
!isStreamResponse && onFinish();
|
72118
|
+
stopTimeout && stopTimeout();
|
72119
|
+
return await new Promise((resolve, reject) => {
|
72120
|
+
settle(resolve, reject, {
|
72121
|
+
data: responseData,
|
72122
|
+
headers: AxiosHeaders_default.from(response.headers),
|
72123
|
+
status: response.status,
|
72124
|
+
statusText: response.statusText,
|
72125
|
+
config,
|
72126
|
+
request
|
72127
|
+
});
|
72128
|
+
});
|
72129
|
+
} catch (err) {
|
72130
|
+
onFinish();
|
72131
|
+
if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
|
72132
|
+
throw Object.assign(
|
72133
|
+
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
|
72134
|
+
{
|
72135
|
+
cause: err.cause || err
|
72136
|
+
}
|
72137
|
+
);
|
72138
|
+
}
|
72139
|
+
throw AxiosError_default.from(err, err && err.code, config, request);
|
72140
|
+
}
|
72141
|
+
});
|
72142
|
+
|
72143
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/adapters.js
|
71742
72144
|
var knownAdapters = {
|
71743
72145
|
http: http_default,
|
71744
|
-
xhr: xhr_default
|
72146
|
+
xhr: xhr_default,
|
72147
|
+
fetch: fetch_default
|
71745
72148
|
};
|
71746
72149
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
71747
72150
|
if (fn) {
|
@@ -71791,7 +72194,7 @@ var adapters_default = {
|
|
71791
72194
|
adapters: knownAdapters
|
71792
72195
|
};
|
71793
72196
|
|
71794
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72197
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/dispatchRequest.js
|
71795
72198
|
function throwIfCancellationRequested(config) {
|
71796
72199
|
if (config.cancelToken) {
|
71797
72200
|
config.cancelToken.throwIfRequested();
|
@@ -71836,87 +72239,7 @@ function dispatchRequest(config) {
|
|
71836
72239
|
});
|
71837
72240
|
}
|
71838
72241
|
|
71839
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
71840
|
-
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
|
71841
|
-
function mergeConfig(config1, config2) {
|
71842
|
-
config2 = config2 || {};
|
71843
|
-
const config = {};
|
71844
|
-
function getMergedValue(target, source, caseless) {
|
71845
|
-
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
71846
|
-
return utils_default.merge.call({ caseless }, target, source);
|
71847
|
-
} else if (utils_default.isPlainObject(source)) {
|
71848
|
-
return utils_default.merge({}, source);
|
71849
|
-
} else if (utils_default.isArray(source)) {
|
71850
|
-
return source.slice();
|
71851
|
-
}
|
71852
|
-
return source;
|
71853
|
-
}
|
71854
|
-
function mergeDeepProperties(a, b, caseless) {
|
71855
|
-
if (!utils_default.isUndefined(b)) {
|
71856
|
-
return getMergedValue(a, b, caseless);
|
71857
|
-
} else if (!utils_default.isUndefined(a)) {
|
71858
|
-
return getMergedValue(void 0, a, caseless);
|
71859
|
-
}
|
71860
|
-
}
|
71861
|
-
function valueFromConfig2(a, b) {
|
71862
|
-
if (!utils_default.isUndefined(b)) {
|
71863
|
-
return getMergedValue(void 0, b);
|
71864
|
-
}
|
71865
|
-
}
|
71866
|
-
function defaultToConfig2(a, b) {
|
71867
|
-
if (!utils_default.isUndefined(b)) {
|
71868
|
-
return getMergedValue(void 0, b);
|
71869
|
-
} else if (!utils_default.isUndefined(a)) {
|
71870
|
-
return getMergedValue(void 0, a);
|
71871
|
-
}
|
71872
|
-
}
|
71873
|
-
function mergeDirectKeys(a, b, prop) {
|
71874
|
-
if (prop in config2) {
|
71875
|
-
return getMergedValue(a, b);
|
71876
|
-
} else if (prop in config1) {
|
71877
|
-
return getMergedValue(void 0, a);
|
71878
|
-
}
|
71879
|
-
}
|
71880
|
-
const mergeMap = {
|
71881
|
-
url: valueFromConfig2,
|
71882
|
-
method: valueFromConfig2,
|
71883
|
-
data: valueFromConfig2,
|
71884
|
-
baseURL: defaultToConfig2,
|
71885
|
-
transformRequest: defaultToConfig2,
|
71886
|
-
transformResponse: defaultToConfig2,
|
71887
|
-
paramsSerializer: defaultToConfig2,
|
71888
|
-
timeout: defaultToConfig2,
|
71889
|
-
timeoutMessage: defaultToConfig2,
|
71890
|
-
withCredentials: defaultToConfig2,
|
71891
|
-
withXSRFToken: defaultToConfig2,
|
71892
|
-
adapter: defaultToConfig2,
|
71893
|
-
responseType: defaultToConfig2,
|
71894
|
-
xsrfCookieName: defaultToConfig2,
|
71895
|
-
xsrfHeaderName: defaultToConfig2,
|
71896
|
-
onUploadProgress: defaultToConfig2,
|
71897
|
-
onDownloadProgress: defaultToConfig2,
|
71898
|
-
decompress: defaultToConfig2,
|
71899
|
-
maxContentLength: defaultToConfig2,
|
71900
|
-
maxBodyLength: defaultToConfig2,
|
71901
|
-
beforeRedirect: defaultToConfig2,
|
71902
|
-
transport: defaultToConfig2,
|
71903
|
-
httpAgent: defaultToConfig2,
|
71904
|
-
httpsAgent: defaultToConfig2,
|
71905
|
-
cancelToken: defaultToConfig2,
|
71906
|
-
socketPath: defaultToConfig2,
|
71907
|
-
responseEncoding: defaultToConfig2,
|
71908
|
-
validateStatus: mergeDirectKeys,
|
71909
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
71910
|
-
};
|
71911
|
-
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
71912
|
-
const merge9 = mergeMap[prop] || mergeDeepProperties;
|
71913
|
-
const configValue = merge9(config1[prop], config2[prop], prop);
|
71914
|
-
utils_default.isUndefined(configValue) && merge9 !== mergeDirectKeys || (config[prop] = configValue);
|
71915
|
-
});
|
71916
|
-
return config;
|
71917
|
-
}
|
71918
|
-
|
71919
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/validator.js
|
72242
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/validator.js
|
71920
72243
|
var validators = {};
|
71921
72244
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
71922
72245
|
validators[type] = function validator(thing) {
|
@@ -71974,7 +72297,7 @@ var validator_default = {
|
|
71974
72297
|
validators
|
71975
72298
|
};
|
71976
72299
|
|
71977
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72300
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/Axios.js
|
71978
72301
|
var validators2 = validator_default.validators;
|
71979
72302
|
var Axios = class {
|
71980
72303
|
constructor(instanceConfig) {
|
@@ -72000,10 +72323,13 @@ var Axios = class {
|
|
72000
72323
|
let dummy;
|
72001
72324
|
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
|
72002
72325
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
72003
|
-
|
72004
|
-
err.stack
|
72005
|
-
|
72006
|
-
err.stack
|
72326
|
+
try {
|
72327
|
+
if (!err.stack) {
|
72328
|
+
err.stack = stack;
|
72329
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
72330
|
+
err.stack += "\n" + stack;
|
72331
|
+
}
|
72332
|
+
} catch (e) {
|
72007
72333
|
}
|
72008
72334
|
}
|
72009
72335
|
throw err;
|
@@ -72134,7 +72460,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
|
|
72134
72460
|
});
|
72135
72461
|
var Axios_default = Axios;
|
72136
72462
|
|
72137
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72463
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/CancelToken.js
|
72138
72464
|
var CancelToken = class _CancelToken {
|
72139
72465
|
constructor(executor) {
|
72140
72466
|
if (typeof executor !== "function") {
|
@@ -72224,19 +72550,19 @@ var CancelToken = class _CancelToken {
|
|
72224
72550
|
};
|
72225
72551
|
var CancelToken_default = CancelToken;
|
72226
72552
|
|
72227
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72553
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/spread.js
|
72228
72554
|
function spread(callback) {
|
72229
72555
|
return function wrap(arr) {
|
72230
72556
|
return callback.apply(null, arr);
|
72231
72557
|
};
|
72232
72558
|
}
|
72233
72559
|
|
72234
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72560
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isAxiosError.js
|
72235
72561
|
function isAxiosError(payload) {
|
72236
72562
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
72237
72563
|
}
|
72238
72564
|
|
72239
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72565
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/HttpStatusCode.js
|
72240
72566
|
var HttpStatusCode = {
|
72241
72567
|
Continue: 100,
|
72242
72568
|
SwitchingProtocols: 101,
|
@@ -72307,7 +72633,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
72307
72633
|
});
|
72308
72634
|
var HttpStatusCode_default = HttpStatusCode;
|
72309
72635
|
|
72310
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72636
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/axios.js
|
72311
72637
|
function createInstance(defaultConfig) {
|
72312
72638
|
const context = new Axios_default(defaultConfig);
|
72313
72639
|
const instance = bind(Axios_default.prototype.request, context);
|
@@ -72340,7 +72666,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
|
|
72340
72666
|
axios.default = axios;
|
72341
72667
|
var axios_default = axios;
|
72342
72668
|
|
72343
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72669
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/index.js
|
72344
72670
|
var {
|
72345
72671
|
Axios: Axios2,
|
72346
72672
|
AxiosError: AxiosError2,
|
@@ -72360,11 +72686,11 @@ var {
|
|
72360
72686
|
mergeConfig: mergeConfig2
|
72361
72687
|
} = axios_default;
|
72362
72688
|
|
72363
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72689
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
72364
72690
|
var import_tar = __toESM(require_tar());
|
72365
72691
|
|
72366
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72367
|
-
var
|
72692
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
72693
|
+
var import_utils34 = require("@modern-js/utils");
|
72368
72694
|
async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
72369
72695
|
const { registryUrl } = options || {};
|
72370
72696
|
const params = [
|
@@ -72377,7 +72703,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
72377
72703
|
params.push("--registry");
|
72378
72704
|
params.push(registryUrl);
|
72379
72705
|
}
|
72380
|
-
const getPkgInfoPromise = (0,
|
72706
|
+
const getPkgInfoPromise = (0, import_utils34.execa)("npm", params);
|
72381
72707
|
const { stdout } = await timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm tarball of '${pkgName}'`);
|
72382
72708
|
try {
|
72383
72709
|
const pkgDistInfo = JSON.parse(stdout);
|
@@ -72387,8 +72713,8 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
72387
72713
|
}
|
72388
72714
|
}
|
72389
72715
|
|
72390
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72391
|
-
var
|
72716
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
72717
|
+
var import_utils35 = require("@modern-js/utils");
|
72392
72718
|
async function getNpmVersion(packageName, options) {
|
72393
72719
|
const { version, registryUrl } = options || {};
|
72394
72720
|
const params = [
|
@@ -72404,15 +72730,15 @@ async function getNpmVersion(packageName, options) {
|
|
72404
72730
|
params.push("--registry");
|
72405
72731
|
params.push(registryUrl);
|
72406
72732
|
}
|
72407
|
-
const getPkgInfoPromise = (0,
|
72733
|
+
const getPkgInfoPromise = (0, import_utils35.execa)("npm", params);
|
72408
72734
|
const { stdout } = await timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm version of '${packageName}'`);
|
72409
72735
|
return stdout;
|
72410
72736
|
}
|
72411
72737
|
|
72412
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72738
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
72413
72739
|
async function isValidCache(cacheDir) {
|
72414
72740
|
if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
|
72415
|
-
const preCacheTimeStr = await
|
72741
|
+
const preCacheTimeStr = await import_utils36.fs.readFile(`${cacheDir}/.codesmith.completed`, {
|
72416
72742
|
encoding: "utf-8"
|
72417
72743
|
});
|
72418
72744
|
const preCacheTime = preCacheTimeStr ? new Date(preCacheTimeStr) : /* @__PURE__ */ new Date(0);
|
@@ -72435,7 +72761,7 @@ async function downloadAndDecompressTargz(tarballPkg, targetDir) {
|
|
72435
72761
|
}
|
72436
72762
|
const randomId = Math.floor(Math.random() * 1e4);
|
72437
72763
|
const tempTgzFilePath = `${import_os.default.tmpdir()}/temp-${randomId}.tgz`;
|
72438
|
-
const dest =
|
72764
|
+
const dest = import_utils36.fs.createWriteStream(tempTgzFilePath);
|
72439
72765
|
await new Promise((resolve, reject) => {
|
72440
72766
|
response.data.pipe(dest);
|
72441
72767
|
response.data.on("error", (err) => {
|
@@ -72446,7 +72772,7 @@ async function downloadAndDecompressTargz(tarballPkg, targetDir) {
|
|
72446
72772
|
});
|
72447
72773
|
});
|
72448
72774
|
await new Promise((resolve, reject) => {
|
72449
|
-
|
72775
|
+
import_utils36.fs.createReadStream(tempTgzFilePath).pipe(import_tar.default.x({
|
72450
72776
|
strip: 1,
|
72451
72777
|
C: `${targetDir}`
|
72452
72778
|
})).on("finish", () => {
|
@@ -72460,7 +72786,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72460
72786
|
var _logger_debug;
|
72461
72787
|
const { registryUrl, install, logger: logger2 } = options;
|
72462
72788
|
let version;
|
72463
|
-
if (!
|
72789
|
+
if (!import_utils36.semver.valid(pkgVersion)) {
|
72464
72790
|
version = await getNpmVersion(pkgName, {
|
72465
72791
|
registryUrl,
|
72466
72792
|
version: pkgVersion
|
@@ -72476,8 +72802,8 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72476
72802
|
if (await fsExists(targetDir) && await isValidCache(targetDir)) {
|
72477
72803
|
return targetDir;
|
72478
72804
|
}
|
72479
|
-
await
|
72480
|
-
await
|
72805
|
+
await import_utils36.fs.remove(targetDir);
|
72806
|
+
await import_utils36.fs.mkdirp(targetDir);
|
72481
72807
|
const tarballPkg = await getNpmTarballUrl(pkgName, version, {
|
72482
72808
|
registryUrl
|
72483
72809
|
});
|
@@ -72485,14 +72811,14 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72485
72811
|
if (install) {
|
72486
72812
|
await runInstall(targetDir, registryUrl, logger2);
|
72487
72813
|
}
|
72488
|
-
await
|
72814
|
+
await import_utils36.fs.writeFile(`${targetDir}/.codesmith.completed`, (/* @__PURE__ */ new Date()).toISOString(), {
|
72489
72815
|
encoding: "utf-8"
|
72490
72816
|
});
|
72491
72817
|
return targetDir;
|
72492
72818
|
}
|
72493
72819
|
|
72494
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72495
|
-
var
|
72820
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
72821
|
+
var import_utils37 = require("@modern-js/utils");
|
72496
72822
|
function getPackageInfo(packageName) {
|
72497
72823
|
if (!packageName) {
|
72498
72824
|
throw new Error("package is not exisit");
|
@@ -72501,7 +72827,7 @@ function getPackageInfo(packageName) {
|
|
72501
72827
|
let pkgVersion = "latest";
|
72502
72828
|
let pkgName = packageName;
|
72503
72829
|
if (!packageName.startsWith("@") && splitAt.length === 2 || packageName.startsWith("@") && splitAt.length === 3) {
|
72504
|
-
const semverValid =
|
72830
|
+
const semverValid = import_utils37.semver.valid(splitAt[splitAt.length - 1]);
|
72505
72831
|
if (semverValid === null) {
|
72506
72832
|
pkgVersion = splitAt[splitAt.length - 1];
|
72507
72833
|
pkgName = packageName.slice(0, packageName.lastIndexOf("@"));
|
@@ -72516,7 +72842,7 @@ function getPackageInfo(packageName) {
|
|
72516
72842
|
};
|
72517
72843
|
}
|
72518
72844
|
|
72519
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72845
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
72520
72846
|
var MaterialsManager = class {
|
72521
72847
|
loadLocalGenerator(generator) {
|
72522
72848
|
if (!import_path6.default.isAbsolute(generator)) {
|
@@ -72544,7 +72870,7 @@ var MaterialsManager = class {
|
|
72544
72870
|
}
|
72545
72871
|
};
|
72546
72872
|
|
72547
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72873
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
72548
72874
|
var CodeSmith = class {
|
72549
72875
|
async forge({ tasks, pwd }) {
|
72550
72876
|
var _this_logger_timing, _this_logger;
|
@@ -72585,13 +72911,13 @@ var CodeSmith = class {
|
|
72585
72911
|
}
|
72586
72912
|
};
|
72587
72913
|
|
72588
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
72914
|
+
// ../../../../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
|
72589
72915
|
var import_ejs = __toESM(require_ejs());
|
72590
72916
|
function renderString(template, fullData) {
|
72591
72917
|
return import_ejs.default.render(template, fullData) || "";
|
72592
72918
|
}
|
72593
72919
|
|
72594
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
72920
|
+
// ../../../../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
|
72595
72921
|
var EjsAPI = class {
|
72596
72922
|
async renderTemplate(templateResource, target, parameters = {}) {
|
72597
72923
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -72623,17 +72949,17 @@ var EjsAPI = class {
|
|
72623
72949
|
}
|
72624
72950
|
};
|
72625
72951
|
|
72626
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
72952
|
+
// ../../../../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
|
72627
72953
|
var import_path8 = __toESM(require("path"));
|
72628
|
-
var
|
72954
|
+
var import_utils40 = require("@modern-js/utils");
|
72629
72955
|
var FsAPI = class {
|
72630
72956
|
async renderFile(resource, target) {
|
72631
72957
|
if (resource._type !== FS_RESOURCE) {
|
72632
72958
|
throw new Error("resource not match");
|
72633
72959
|
}
|
72634
72960
|
const filePath = import_path8.default.resolve(this.generatorCore.outputPath, target.toString());
|
72635
|
-
await
|
72636
|
-
await
|
72961
|
+
await import_utils40.fs.mkdirp(import_path8.default.dirname(filePath));
|
72962
|
+
await import_utils40.fs.copyFile(resource.filePath, filePath);
|
72637
72963
|
}
|
72638
72964
|
async renderDir(material, findGlob, target, options) {
|
72639
72965
|
const resourceMap = await material.find(findGlob, {
|
@@ -72650,11 +72976,11 @@ var FsAPI = class {
|
|
72650
72976
|
}
|
72651
72977
|
};
|
72652
72978
|
|
72653
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
72654
|
-
var
|
72979
|
+
// ../../../../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
|
72980
|
+
var import_utils41 = require("@modern-js/utils");
|
72655
72981
|
async function canUseGit() {
|
72656
72982
|
try {
|
72657
|
-
await (0,
|
72983
|
+
await (0, import_utils41.execa)("git", [
|
72658
72984
|
"--version"
|
72659
72985
|
], {
|
72660
72986
|
env: process.env
|
@@ -72666,7 +72992,7 @@ async function canUseGit() {
|
|
72666
72992
|
}
|
72667
72993
|
async function isInGitRepo(cwd) {
|
72668
72994
|
try {
|
72669
|
-
await (0,
|
72995
|
+
await (0, import_utils41.execa)("git", [
|
72670
72996
|
"rev-parse",
|
72671
72997
|
"--is-inside-work-tree"
|
72672
72998
|
], {
|
@@ -72679,13 +73005,13 @@ async function isInGitRepo(cwd) {
|
|
72679
73005
|
}
|
72680
73006
|
}
|
72681
73007
|
async function initGitRepo(cwd, defaultBranch) {
|
72682
|
-
await (0,
|
73008
|
+
await (0, import_utils41.execa)("git", [
|
72683
73009
|
"init"
|
72684
73010
|
], {
|
72685
73011
|
env: process.env,
|
72686
73012
|
cwd
|
72687
73013
|
});
|
72688
|
-
const { stdout } = await (0,
|
73014
|
+
const { stdout } = await (0, import_utils41.execa)("git", [
|
72689
73015
|
"symbolic-ref",
|
72690
73016
|
"--short",
|
72691
73017
|
"HEAD"
|
@@ -72694,7 +73020,7 @@ async function initGitRepo(cwd, defaultBranch) {
|
|
72694
73020
|
cwd
|
72695
73021
|
});
|
72696
73022
|
if (stdout !== defaultBranch) {
|
72697
|
-
await (0,
|
73023
|
+
await (0, import_utils41.execa)("git", [
|
72698
73024
|
"checkout",
|
72699
73025
|
"-b",
|
72700
73026
|
defaultBranch
|
@@ -72705,7 +73031,7 @@ async function initGitRepo(cwd, defaultBranch) {
|
|
72705
73031
|
}
|
72706
73032
|
}
|
72707
73033
|
async function gitAdd(cwd) {
|
72708
|
-
await (0,
|
73034
|
+
await (0, import_utils41.execa)("git", [
|
72709
73035
|
"add",
|
72710
73036
|
"-A"
|
72711
73037
|
], {
|
@@ -72714,7 +73040,7 @@ async function gitAdd(cwd) {
|
|
72714
73040
|
});
|
72715
73041
|
}
|
72716
73042
|
async function gitCommit(cwd, commitMessage) {
|
72717
|
-
await (0,
|
73043
|
+
await (0, import_utils41.execa)("git", [
|
72718
73044
|
"commit",
|
72719
73045
|
"-m",
|
72720
73046
|
commitMessage,
|
@@ -72725,7 +73051,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
72725
73051
|
});
|
72726
73052
|
}
|
72727
73053
|
|
72728
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
73054
|
+
// ../../../../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
|
72729
73055
|
var GitAPI = class {
|
72730
73056
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
72731
73057
|
const canUse = await canUseGit();
|
@@ -72775,7 +73101,7 @@ var GitAPI = class {
|
|
72775
73101
|
}
|
72776
73102
|
};
|
72777
73103
|
|
72778
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
73104
|
+
// ../../../../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
|
72779
73105
|
var import_handlebars = __toESM(require_lib());
|
72780
73106
|
function renderString2(template, fullData, registers) {
|
72781
73107
|
const helpers = {
|
@@ -72789,7 +73115,7 @@ function renderString2(template, fullData, registers) {
|
|
72789
73115
|
return import_handlebars.default.compile(template)(fullData) || "";
|
72790
73116
|
}
|
72791
73117
|
|
72792
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
73118
|
+
// ../../../../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
|
72793
73119
|
var HandlebarsAPI = class {
|
72794
73120
|
async registerHelp(helpers) {
|
72795
73121
|
this.registers.helpers = {
|
@@ -72837,11 +73163,11 @@ var HandlebarsAPI = class {
|
|
72837
73163
|
}
|
72838
73164
|
};
|
72839
73165
|
|
72840
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
72841
|
-
var
|
73166
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
73167
|
+
var import_utils44 = require("@modern-js/utils");
|
72842
73168
|
async function canUseNvm() {
|
72843
73169
|
try {
|
72844
|
-
await (0,
|
73170
|
+
await (0, import_utils44.execa)("source ~/.nvm/nvm.sh", {
|
72845
73171
|
env: process.env,
|
72846
73172
|
shell: true
|
72847
73173
|
});
|
@@ -72852,7 +73178,7 @@ async function canUseNvm() {
|
|
72852
73178
|
}
|
72853
73179
|
async function canUseNpm() {
|
72854
73180
|
try {
|
72855
|
-
await (0,
|
73181
|
+
await (0, import_utils44.execa)("npm", [
|
72856
73182
|
"--version"
|
72857
73183
|
], {
|
72858
73184
|
env: process.env
|
@@ -72864,7 +73190,7 @@ async function canUseNpm() {
|
|
72864
73190
|
}
|
72865
73191
|
async function canUseYarn2() {
|
72866
73192
|
try {
|
72867
|
-
await (0,
|
73193
|
+
await (0, import_utils44.execa)("yarn", [
|
72868
73194
|
"--version"
|
72869
73195
|
], {
|
72870
73196
|
env: process.env
|
@@ -72876,7 +73202,7 @@ async function canUseYarn2() {
|
|
72876
73202
|
}
|
72877
73203
|
async function canUsePnpm2() {
|
72878
73204
|
try {
|
72879
|
-
await (0,
|
73205
|
+
await (0, import_utils44.execa)("pnpm", [
|
72880
73206
|
"--version"
|
72881
73207
|
], {
|
72882
73208
|
env: process.env
|
@@ -72887,10 +73213,10 @@ async function canUsePnpm2() {
|
|
72887
73213
|
}
|
72888
73214
|
}
|
72889
73215
|
|
72890
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
72891
|
-
var
|
73216
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
73217
|
+
var import_utils45 = require("@modern-js/utils");
|
72892
73218
|
function execaWithStreamLog(command, args, options) {
|
72893
|
-
const promise = (0,
|
73219
|
+
const promise = (0, import_utils45.execa)(command, args, {
|
72894
73220
|
...options,
|
72895
73221
|
stdin: "inherit",
|
72896
73222
|
stdout: "inherit",
|
@@ -72899,7 +73225,7 @@ function execaWithStreamLog(command, args, options) {
|
|
72899
73225
|
return promise;
|
72900
73226
|
}
|
72901
73227
|
async function runInstallWithNvm(command, options) {
|
72902
|
-
await (0,
|
73228
|
+
await (0, import_utils45.execa)(`~/.nvm/nvm-exec ${command}`, {
|
72903
73229
|
...options,
|
72904
73230
|
shell: true,
|
72905
73231
|
stdin: "inherit",
|
@@ -72983,7 +73309,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
72983
73309
|
throw new Error("please install pnpm first");
|
72984
73310
|
}
|
72985
73311
|
|
72986
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
73312
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
72987
73313
|
var NpmAPI = class {
|
72988
73314
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
72989
73315
|
return npmInstall({
|
@@ -73011,7 +73337,7 @@ var NpmAPI = class {
|
|
73011
73337
|
}
|
73012
73338
|
};
|
73013
73339
|
|
73014
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
73340
|
+
// ../../../../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/index.js
|
73015
73341
|
var import_lodash2 = require("@modern-js/utils/lodash");
|
73016
73342
|
|
73017
73343
|
// ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
|
@@ -82646,10 +82972,10 @@ var Schema = (
|
|
82646
82972
|
}()
|
82647
82973
|
);
|
82648
82974
|
|
82649
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
82975
|
+
// ../../../../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
|
82650
82976
|
var import_inquirer = __toESM(require_inquirer());
|
82651
82977
|
|
82652
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
82978
|
+
// ../../../../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
|
82653
82979
|
var import_lodash = require("@modern-js/utils/lodash");
|
82654
82980
|
function validateSchema(schema) {
|
82655
82981
|
const { type, properties } = schema;
|
@@ -82741,7 +83067,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
82741
83067
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
82742
83068
|
}
|
82743
83069
|
|
82744
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83070
|
+
// ../../../../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
|
82745
83071
|
var compileRule = (rule, scope) => {
|
82746
83072
|
const state = Schema.compile(rule, {
|
82747
83073
|
$self: {},
|
@@ -82845,7 +83171,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
82845
83171
|
return answers;
|
82846
83172
|
}
|
82847
83173
|
|
82848
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83174
|
+
// ../../../../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
|
82849
83175
|
var CLIReader = class {
|
82850
83176
|
getAnswers() {
|
82851
83177
|
return this.answers;
|
@@ -82874,7 +83200,7 @@ var CLIReader = class {
|
|
82874
83200
|
}
|
82875
83201
|
};
|
82876
83202
|
|
82877
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83203
|
+
// ../../../../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/index.js
|
82878
83204
|
var FormilyAPI = class {
|
82879
83205
|
mergeAnswers(answers, configValue) {
|
82880
83206
|
const inputData = (0, import_lodash2.merge)(answers, configValue);
|
@@ -82896,8 +83222,8 @@ var FormilyAPI = class {
|
|
82896
83222
|
}
|
82897
83223
|
};
|
82898
83224
|
|
82899
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
82900
|
-
var
|
83225
|
+
// ../../../../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
|
83226
|
+
var import_utils49 = require("@modern-js/utils");
|
82901
83227
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
82902
83228
|
var import_comment_json = __toESM(require_src3());
|
82903
83229
|
var import_inquirer3 = __toESM(require_inquirer2());
|
@@ -82965,7 +83291,7 @@ var I18n = class {
|
|
82965
83291
|
}
|
82966
83292
|
};
|
82967
83293
|
|
82968
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83294
|
+
// ../../../../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
|
82969
83295
|
var EN_LOCALE = {
|
82970
83296
|
environment: {
|
82971
83297
|
node_version: "please upgrade node to lts version",
|
@@ -82992,7 +83318,7 @@ var EN_LOCALE = {
|
|
82992
83318
|
}
|
82993
83319
|
};
|
82994
83320
|
|
82995
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83321
|
+
// ../../../../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
|
82996
83322
|
var ZH_LOCALE = {
|
82997
83323
|
environment: {
|
82998
83324
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -83019,16 +83345,16 @@ var ZH_LOCALE = {
|
|
83019
83345
|
}
|
83020
83346
|
};
|
83021
83347
|
|
83022
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83348
|
+
// ../../../../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
|
83023
83349
|
var i18n = new I18n();
|
83024
83350
|
var localeKeys = i18n.init("zh", {
|
83025
83351
|
zh: ZH_LOCALE,
|
83026
83352
|
en: EN_LOCALE
|
83027
83353
|
});
|
83028
83354
|
|
83029
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83355
|
+
// ../../../../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
|
83030
83356
|
var import_path10 = __toESM(require("path"));
|
83031
|
-
var
|
83357
|
+
var import_utils48 = require("@modern-js/utils");
|
83032
83358
|
var NODE_MAJOR_VERSION_MAP = {
|
83033
83359
|
"lts/*": 18,
|
83034
83360
|
"lts/argon": 4,
|
@@ -83041,7 +83367,7 @@ var NODE_MAJOR_VERSION_MAP = {
|
|
83041
83367
|
"lts/hydrogen": 18
|
83042
83368
|
};
|
83043
83369
|
async function getNoteVersion() {
|
83044
|
-
const result = await (0,
|
83370
|
+
const result = await (0, import_utils48.execa)("node", [
|
83045
83371
|
"--version"
|
83046
83372
|
]);
|
83047
83373
|
return result.stdout.slice(1);
|
@@ -83053,10 +83379,10 @@ async function checkUseNvm(cwd, logger2) {
|
|
83053
83379
|
if (!await fsExists(import_path10.default.join(cwd, ".nvmrc"))) {
|
83054
83380
|
return false;
|
83055
83381
|
}
|
83056
|
-
const nvmrcContent = (await
|
83382
|
+
const nvmrcContent = (await import_utils48.fs.readFile(import_path10.default.join(cwd, ".nvmrc"), "utf-8")).replace("\n", "");
|
83057
83383
|
const expectNodeVersion = NODE_MAJOR_VERSION_MAP[nvmrcContent] || nvmrcContent;
|
83058
83384
|
const currentNodeVersion = await getNoteVersion();
|
83059
|
-
if (expectNodeVersion ===
|
83385
|
+
if (expectNodeVersion === import_utils48.semver.major(currentNodeVersion)) {
|
83060
83386
|
return false;
|
83061
83387
|
}
|
83062
83388
|
if (!await canUseNvm()) {
|
@@ -83074,7 +83400,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
83074
83400
|
}
|
83075
83401
|
}
|
83076
83402
|
|
83077
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83403
|
+
// ../../../../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
|
83078
83404
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
83079
83405
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
83080
83406
|
for (const question of questions) {
|
@@ -83102,10 +83428,10 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
83102
83428
|
return questions;
|
83103
83429
|
}
|
83104
83430
|
|
83105
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83431
|
+
// ../../../../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
|
83106
83432
|
var AppAPI = class {
|
83107
83433
|
async checkEnvironment(nodeVersion) {
|
83108
|
-
if (
|
83434
|
+
if (import_utils49.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
83109
83435
|
this.generatorCore.logger.warn(i18n.t(localeKeys.environment.node_version));
|
83110
83436
|
return false;
|
83111
83437
|
}
|
@@ -83128,7 +83454,7 @@ var AppAPI = class {
|
|
83128
83454
|
}
|
83129
83455
|
let intallPromise;
|
83130
83456
|
if (command) {
|
83131
|
-
intallPromise = (0,
|
83457
|
+
intallPromise = (0, import_utils49.execa)(command, [], {
|
83132
83458
|
shell: true,
|
83133
83459
|
stdin: "inherit",
|
83134
83460
|
stdout: "inherit",
|
@@ -83259,17 +83585,17 @@ var AppAPI = class {
|
|
83259
83585
|
}
|
83260
83586
|
async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
|
83261
83587
|
const { filePath } = this.generatorContext.materials.default.get(workspaceName);
|
83262
|
-
if (!
|
83588
|
+
if (!import_utils49.fs.existsSync(filePath)) {
|
83263
83589
|
return;
|
83264
83590
|
}
|
83265
|
-
const content = await
|
83591
|
+
const content = await import_utils49.fs.readFile(filePath);
|
83266
83592
|
const workspace = (0, import_comment_json.parse)(content.toString());
|
83267
83593
|
workspace.folders = [
|
83268
83594
|
folder,
|
83269
83595
|
...workspace.folders || []
|
83270
83596
|
];
|
83271
83597
|
const indent = 2;
|
83272
|
-
await
|
83598
|
+
await import_utils49.fs.writeFile(filePath, (0, import_comment_json.stringify)(workspace, null, indent), {
|
83273
83599
|
encoding: "utf-8"
|
83274
83600
|
});
|
83275
83601
|
}
|
@@ -83397,6 +83723,98 @@ var I18n2 = class {
|
|
83397
83723
|
}
|
83398
83724
|
};
|
83399
83725
|
|
83726
|
+
// ../../generator-common/dist/esm-node/locale/en.js
|
83727
|
+
var EN_LOCALE2 = {
|
83728
|
+
solution: {
|
83729
|
+
self: "Please select the type of project you want to create:",
|
83730
|
+
mwa: "Web App",
|
83731
|
+
module: "Npm Module",
|
83732
|
+
custom: "Custom Solution",
|
83733
|
+
default: "Default"
|
83734
|
+
},
|
83735
|
+
scenes: {
|
83736
|
+
self: "Please select the project scenario:"
|
83737
|
+
},
|
83738
|
+
sub_solution: {
|
83739
|
+
self: "Please select the type of project you want to create:",
|
83740
|
+
mwa: "Web App",
|
83741
|
+
module: "Npm Module"
|
83742
|
+
},
|
83743
|
+
action: {
|
83744
|
+
self: "Please select the operation you want:",
|
83745
|
+
function: {
|
83746
|
+
self: "Enable Features",
|
83747
|
+
question: "Please select the feature name:",
|
83748
|
+
tailwindcss: "Enable Tailwind CSS",
|
83749
|
+
bff: "Enable BFF",
|
83750
|
+
micro_frontend: "Enable Micro Frontend",
|
83751
|
+
i18n: "Enable Internationalization (i18n)",
|
83752
|
+
storybookV7: "Enable Storybook V7",
|
83753
|
+
runtime_api: "Enable Runtime API",
|
83754
|
+
ssg: "Enable SSG",
|
83755
|
+
polyfill: "Enable UA-based Polyfill Feature",
|
83756
|
+
proxy: "Enable Global Proxy",
|
83757
|
+
swc: "Enable SWC Compile",
|
83758
|
+
module_doc: "Enable Module Doc"
|
83759
|
+
},
|
83760
|
+
element: {
|
83761
|
+
self: "Create Element",
|
83762
|
+
question: "Please select the type of element to create:",
|
83763
|
+
entry: 'New "entry"',
|
83764
|
+
server: 'New "Custom Web Server" source code directory'
|
83765
|
+
},
|
83766
|
+
refactor: {
|
83767
|
+
self: "Automatic Refactor",
|
83768
|
+
question: "Please select the type of refactoring:",
|
83769
|
+
react_router_5: "Use React Router v5"
|
83770
|
+
}
|
83771
|
+
},
|
83772
|
+
boolean: {
|
83773
|
+
yes: "Yes",
|
83774
|
+
no: "No"
|
83775
|
+
},
|
83776
|
+
language: {
|
83777
|
+
self: "Please select the programming language:"
|
83778
|
+
},
|
83779
|
+
packageManager: {
|
83780
|
+
self: "Please select the package manager:"
|
83781
|
+
},
|
83782
|
+
entry: {
|
83783
|
+
name: "Please fill in the entry name:",
|
83784
|
+
no_empty: "The entry name cannot be empty!",
|
83785
|
+
no_pages: 'The entry name cannot be "pages"!'
|
83786
|
+
},
|
83787
|
+
packageName: {
|
83788
|
+
self: "Please fill in the project name:",
|
83789
|
+
sub_name: "Please fill in the sub-project name:",
|
83790
|
+
no_empty: "The package name cannot be empty!"
|
83791
|
+
},
|
83792
|
+
packagePath: {
|
83793
|
+
self: "Please fill in the sub-project directory name:",
|
83794
|
+
no_empty: "The package path cannot be empty!",
|
83795
|
+
format: "Only lowercase letters, numbers and delimiters (-), and underscore (_), and directory delimiters (/) can be used in package path."
|
83796
|
+
},
|
83797
|
+
framework: {
|
83798
|
+
self: "Please select the framework:",
|
83799
|
+
egg: "Egg",
|
83800
|
+
express: "Express",
|
83801
|
+
koa: "Koa",
|
83802
|
+
nest: "Nest"
|
83803
|
+
},
|
83804
|
+
bff: {
|
83805
|
+
bffType: {
|
83806
|
+
self: "Please select the BFF type:",
|
83807
|
+
func: "Function",
|
83808
|
+
framework: "Framework"
|
83809
|
+
}
|
83810
|
+
},
|
83811
|
+
buildTools: {
|
83812
|
+
self: "Please select the bundler:",
|
83813
|
+
webpack: "webpack",
|
83814
|
+
rspack: "Rspack (experimental)"
|
83815
|
+
}
|
83816
|
+
};
|
83817
|
+
|
83400
83818
|
// ../../generator-common/dist/esm-node/locale/zh.js
|
83401
83819
|
var ZH_LOCALE2 = {
|
83402
83820
|
solution: {
|
@@ -83489,98 +83907,6 @@ var ZH_LOCALE2 = {
|
|
83489
83907
|
}
|
83490
83908
|
};
|
83491
83909
|
|
83492
|
-
// ../../generator-common/dist/esm-node/locale/en.js
|
83493
|
-
var EN_LOCALE2 = {
|
83494
|
-
solution: {
|
83495
|
-
self: "Please select the type of project you want to create:",
|
83496
|
-
mwa: "Web App",
|
83497
|
-
module: "Npm Module",
|
83498
|
-
custom: "Custom Solution",
|
83499
|
-
default: "Default"
|
83500
|
-
},
|
83501
|
-
scenes: {
|
83502
|
-
self: "Please select the project scenario:"
|
83503
|
-
},
|
83504
|
-
sub_solution: {
|
83505
|
-
self: "Please select the type of project you want to create:",
|
83506
|
-
mwa: "Web App",
|
83507
|
-
module: "Npm Module"
|
83508
|
-
},
|
83509
|
-
action: {
|
83510
|
-
self: "Please select the operation you want:",
|
83511
|
-
function: {
|
83512
|
-
self: "Enable Features",
|
83513
|
-
question: "Please select the feature name:",
|
83514
|
-
tailwindcss: "Enable Tailwind CSS",
|
83515
|
-
bff: "Enable BFF",
|
83516
|
-
micro_frontend: "Enable Micro Frontend",
|
83517
|
-
i18n: "Enable Internationalization (i18n)",
|
83518
|
-
storybookV7: "Enable Storybook V7",
|
83519
|
-
runtime_api: "Enable Runtime API",
|
83520
|
-
ssg: "Enable SSG",
|
83521
|
-
polyfill: "Enable UA-based Polyfill Feature",
|
83522
|
-
proxy: "Enable Global Proxy",
|
83523
|
-
swc: "Enable SWC Compile",
|
83524
|
-
module_doc: "Enable Module Doc"
|
83525
|
-
},
|
83526
|
-
element: {
|
83527
|
-
self: "Create Element",
|
83528
|
-
question: "Please select the type of element to create:",
|
83529
|
-
entry: 'New "entry"',
|
83530
|
-
server: 'New "Custom Web Server" source code directory'
|
83531
|
-
},
|
83532
|
-
refactor: {
|
83533
|
-
self: "Automatic Refactor",
|
83534
|
-
question: "Please select the type of refactoring:",
|
83535
|
-
react_router_5: "Use React Router v5"
|
83536
|
-
}
|
83537
|
-
},
|
83538
|
-
boolean: {
|
83539
|
-
yes: "Yes",
|
83540
|
-
no: "No"
|
83541
|
-
},
|
83542
|
-
language: {
|
83543
|
-
self: "Please select the programming language:"
|
83544
|
-
},
|
83545
|
-
packageManager: {
|
83546
|
-
self: "Please select the package manager:"
|
83547
|
-
},
|
83548
|
-
entry: {
|
83549
|
-
name: "Please fill in the entry name:",
|
83550
|
-
no_empty: "The entry name cannot be empty!",
|
83551
|
-
no_pages: 'The entry name cannot be "pages"!'
|
83552
|
-
},
|
83553
|
-
packageName: {
|
83554
|
-
self: "Please fill in the project name:",
|
83555
|
-
sub_name: "Please fill in the sub-project name:",
|
83556
|
-
no_empty: "The package name cannot be empty!"
|
83557
|
-
},
|
83558
|
-
packagePath: {
|
83559
|
-
self: "Please fill in the sub-project directory name:",
|
83560
|
-
no_empty: "The package path cannot be empty!",
|
83561
|
-
format: "Only lowercase letters, numbers and delimiters (-), and underscore (_), and directory delimiters (/) can be used in package path."
|
83562
|
-
},
|
83563
|
-
framework: {
|
83564
|
-
self: "Please select the framework:",
|
83565
|
-
egg: "Egg",
|
83566
|
-
express: "Express",
|
83567
|
-
koa: "Koa",
|
83568
|
-
nest: "Nest"
|
83569
|
-
},
|
83570
|
-
bff: {
|
83571
|
-
bffType: {
|
83572
|
-
self: "Please select the BFF type:",
|
83573
|
-
func: "Function",
|
83574
|
-
framework: "Framework"
|
83575
|
-
}
|
83576
|
-
},
|
83577
|
-
buildTools: {
|
83578
|
-
self: "Please select the bundler:",
|
83579
|
-
webpack: "webpack",
|
83580
|
-
rspack: "Rspack (experimental)"
|
83581
|
-
}
|
83582
|
-
};
|
83583
|
-
|
83584
83910
|
// ../../generator-common/dist/esm-node/locale/index.js
|
83585
83911
|
var i18n2 = new I18n2();
|
83586
83912
|
var localeKeys2 = i18n2.init("en", {
|
@@ -83597,9 +83923,9 @@ var BooleanConfig;
|
|
83597
83923
|
|
83598
83924
|
// ../../generator-common/dist/esm-node/common/solution.js
|
83599
83925
|
var Solution;
|
83600
|
-
(function(
|
83601
|
-
|
83602
|
-
|
83926
|
+
(function(Solution2) {
|
83927
|
+
Solution2["MWA"] = "mwa";
|
83928
|
+
Solution2["Module"] = "module";
|
83603
83929
|
})(Solution || (Solution = {}));
|
83604
83930
|
var SolutionText = {
|
83605
83931
|
["mwa"]: () => i18n2.t(localeKeys2.solution.mwa),
|
@@ -83638,7 +83964,8 @@ var getSolutionSchema = (extra = {}) => {
|
|
83638
83964
|
};
|
83639
83965
|
};
|
83640
83966
|
var getScenesSchema = (extra = {}) => {
|
83641
|
-
|
83967
|
+
var _extra_customPlugin;
|
83968
|
+
const hasPlugin = (extra === null || extra === void 0 ? void 0 : (_extra_customPlugin = extra.customPlugin) === null || _extra_customPlugin === void 0 ? void 0 : _extra_customPlugin[extra === null || extra === void 0 ? void 0 : extra.solution]) && extra.customPlugin[extra === null || extra === void 0 ? void 0 : extra.solution].length > 0;
|
83642
83969
|
return {
|
83643
83970
|
type: "object",
|
83644
83971
|
properties: hasPlugin ? {
|
@@ -83748,7 +84075,7 @@ var getPackageNameSchema = (extra = {}) => {
|
|
83748
84075
|
};
|
83749
84076
|
|
83750
84077
|
// ../../generator-common/dist/esm-node/common/packagePath.js
|
83751
|
-
var PackagePathRegex =
|
84078
|
+
var PackagePathRegex = /^[a-z0-9-_]+[a-z0-9-\/_]*$/;
|
83752
84079
|
var getPackagePathSchema = (extra) => {
|
83753
84080
|
return {
|
83754
84081
|
type: "string",
|
@@ -84203,34 +84530,185 @@ var SolutionSchemas = {
|
|
84203
84530
|
custom: getBaseSchema
|
84204
84531
|
};
|
84205
84532
|
|
84206
|
-
//
|
84207
|
-
|
84208
|
-
|
84533
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
|
84534
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
84535
|
+
try {
|
84536
|
+
var info = gen[key](arg);
|
84537
|
+
var value = info.value;
|
84538
|
+
} catch (error) {
|
84539
|
+
reject(error);
|
84540
|
+
return;
|
84541
|
+
}
|
84542
|
+
if (info.done)
|
84543
|
+
resolve(value);
|
84544
|
+
else
|
84545
|
+
Promise.resolve(value).then(_next, _throw);
|
84546
|
+
}
|
84547
|
+
function _async_to_generator(fn) {
|
84548
|
+
return function() {
|
84549
|
+
var self3 = this, args = arguments;
|
84550
|
+
return new Promise(function(resolve, reject) {
|
84551
|
+
var gen = fn.apply(self3, args);
|
84552
|
+
function _next(value) {
|
84553
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
84554
|
+
}
|
84555
|
+
function _throw(err) {
|
84556
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
84557
|
+
}
|
84558
|
+
_next(void 0);
|
84559
|
+
});
|
84560
|
+
};
|
84561
|
+
}
|
84209
84562
|
|
84210
|
-
//
|
84211
|
-
function
|
84212
|
-
|
84213
|
-
"
|
84214
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
84215
|
-
].join("|");
|
84216
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
84563
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
|
84564
|
+
function _class_call_check(instance, Constructor) {
|
84565
|
+
if (!(instance instanceof Constructor))
|
84566
|
+
throw new TypeError("Cannot call a class as a function");
|
84217
84567
|
}
|
84218
|
-
|
84219
|
-
|
84220
|
-
|
84568
|
+
|
84569
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
84570
|
+
function _define_property(obj, key, value) {
|
84571
|
+
if (key in obj) {
|
84572
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
84573
|
+
} else
|
84574
|
+
obj[key] = value;
|
84575
|
+
return obj;
|
84576
|
+
}
|
84577
|
+
|
84578
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
|
84579
|
+
function _object_spread(target) {
|
84580
|
+
for (var i = 1; i < arguments.length; i++) {
|
84581
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
84582
|
+
var ownKeys2 = Object.keys(source);
|
84583
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
84584
|
+
ownKeys2 = ownKeys2.concat(
|
84585
|
+
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
84586
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
84587
|
+
})
|
84588
|
+
);
|
84589
|
+
}
|
84590
|
+
ownKeys2.forEach(function(key) {
|
84591
|
+
_define_property(target, key, source[key]);
|
84592
|
+
});
|
84221
84593
|
}
|
84222
|
-
return
|
84594
|
+
return target;
|
84223
84595
|
}
|
84224
84596
|
|
84225
|
-
//
|
84226
|
-
|
84227
|
-
|
84228
|
-
|
84229
|
-
|
84230
|
-
|
84231
|
-
|
84597
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
|
84598
|
+
function ownKeys(object, enumerableOnly) {
|
84599
|
+
var keys = Object.keys(object);
|
84600
|
+
if (Object.getOwnPropertySymbols) {
|
84601
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
84602
|
+
if (enumerableOnly) {
|
84603
|
+
symbols = symbols.filter(function(sym) {
|
84604
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
84605
|
+
});
|
84606
|
+
}
|
84607
|
+
keys.push.apply(keys, symbols);
|
84232
84608
|
}
|
84233
|
-
|
84609
|
+
return keys;
|
84610
|
+
}
|
84611
|
+
function _object_spread_props(target, source) {
|
84612
|
+
source = source != null ? source : {};
|
84613
|
+
if (Object.getOwnPropertyDescriptors)
|
84614
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
84615
|
+
else {
|
84616
|
+
ownKeys(Object(source)).forEach(function(key) {
|
84617
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
84618
|
+
});
|
84619
|
+
}
|
84620
|
+
return target;
|
84621
|
+
}
|
84622
|
+
|
84623
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
|
84624
|
+
function _object_without_properties_loose(source, excluded) {
|
84625
|
+
if (source == null)
|
84626
|
+
return {};
|
84627
|
+
var target = {};
|
84628
|
+
var sourceKeys = Object.keys(source);
|
84629
|
+
var key, i;
|
84630
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
84631
|
+
key = sourceKeys[i];
|
84632
|
+
if (excluded.indexOf(key) >= 0)
|
84633
|
+
continue;
|
84634
|
+
target[key] = source[key];
|
84635
|
+
}
|
84636
|
+
return target;
|
84637
|
+
}
|
84638
|
+
|
84639
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
|
84640
|
+
function _object_without_properties(source, excluded) {
|
84641
|
+
if (source == null)
|
84642
|
+
return {};
|
84643
|
+
var target = _object_without_properties_loose(source, excluded);
|
84644
|
+
var key, i;
|
84645
|
+
if (Object.getOwnPropertySymbols) {
|
84646
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
84647
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
84648
|
+
key = sourceSymbolKeys[i];
|
84649
|
+
if (excluded.indexOf(key) >= 0)
|
84650
|
+
continue;
|
84651
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
84652
|
+
continue;
|
84653
|
+
target[key] = source[key];
|
84654
|
+
}
|
84655
|
+
}
|
84656
|
+
return target;
|
84657
|
+
}
|
84658
|
+
|
84659
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
|
84660
|
+
function _array_like_to_array(arr, len) {
|
84661
|
+
if (len == null || len > arr.length)
|
84662
|
+
len = arr.length;
|
84663
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
84664
|
+
arr2[i] = arr[i];
|
84665
|
+
return arr2;
|
84666
|
+
}
|
84667
|
+
|
84668
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
|
84669
|
+
function _array_without_holes(arr) {
|
84670
|
+
if (Array.isArray(arr))
|
84671
|
+
return _array_like_to_array(arr);
|
84672
|
+
}
|
84673
|
+
|
84674
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
|
84675
|
+
function _iterable_to_array(iter) {
|
84676
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
84677
|
+
return Array.from(iter);
|
84678
|
+
}
|
84679
|
+
}
|
84680
|
+
|
84681
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
|
84682
|
+
function _non_iterable_spread() {
|
84683
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
84684
|
+
}
|
84685
|
+
|
84686
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
|
84687
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
84688
|
+
if (!o)
|
84689
|
+
return;
|
84690
|
+
if (typeof o === "string")
|
84691
|
+
return _array_like_to_array(o, minLen);
|
84692
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
84693
|
+
if (n === "Object" && o.constructor)
|
84694
|
+
n = o.constructor.name;
|
84695
|
+
if (n === "Map" || n === "Set")
|
84696
|
+
return Array.from(n);
|
84697
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
84698
|
+
return _array_like_to_array(o, minLen);
|
84699
|
+
}
|
84700
|
+
|
84701
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
|
84702
|
+
function _to_consumable_array(arr) {
|
84703
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
84704
|
+
}
|
84705
|
+
|
84706
|
+
// ../../generator-plugin/dist/esm/index.js
|
84707
|
+
var import_path17 = __toESM(require("path"));
|
84708
|
+
|
84709
|
+
// ../../generator-utils/dist/esm/index.js
|
84710
|
+
var import_path12 = __toESM(require("path"));
|
84711
|
+
var import_utils52 = require("@modern-js/utils");
|
84234
84712
|
|
84235
84713
|
// ../../generator-utils/dist/esm/locale/en.js
|
84236
84714
|
var EN_LOCALE3 = {
|
@@ -84242,6 +84720,16 @@ var EN_LOCALE3 = {
|
|
84242
84720
|
}
|
84243
84721
|
};
|
84244
84722
|
|
84723
|
+
// ../../generator-utils/dist/esm/locale/zh.js
|
84724
|
+
var ZH_LOCALE3 = {
|
84725
|
+
packageName: {
|
84726
|
+
exit: "项目名称 {value} 已存在"
|
84727
|
+
},
|
84728
|
+
packagePath: {
|
84729
|
+
exit: "目录 {value} 已存在"
|
84730
|
+
}
|
84731
|
+
};
|
84732
|
+
|
84245
84733
|
// ../../generator-utils/dist/esm/locale/index.js
|
84246
84734
|
var i18n3 = new I18n2();
|
84247
84735
|
var localeKeys3 = i18n3.init("en", {
|
@@ -84250,9 +84738,9 @@ var localeKeys3 = i18n3.init("en", {
|
|
84250
84738
|
});
|
84251
84739
|
|
84252
84740
|
// ../../generator-utils/dist/esm/utils/package.js
|
84253
|
-
var
|
84741
|
+
var import_utils51 = require("@modern-js/utils");
|
84254
84742
|
async function isPackageExist(packageName, registry2) {
|
84255
|
-
if (await (0,
|
84743
|
+
if (await (0, import_utils51.canUseNpm)()) {
|
84256
84744
|
try {
|
84257
84745
|
const args = [
|
84258
84746
|
"view",
|
@@ -84262,8 +84750,8 @@ async function isPackageExist(packageName, registry2) {
|
|
84262
84750
|
if (registry2) {
|
84263
84751
|
args.push(`--registry=${registry2}`);
|
84264
84752
|
}
|
84265
|
-
const result = await (0,
|
84266
|
-
return (0,
|
84753
|
+
const result = await (0, import_utils51.execa)("npm", args);
|
84754
|
+
return (0, import_utils51.stripAnsi)(result.stdout);
|
84267
84755
|
} catch (e) {
|
84268
84756
|
return false;
|
84269
84757
|
}
|
@@ -84271,7 +84759,7 @@ async function isPackageExist(packageName, registry2) {
|
|
84271
84759
|
throw new Error("not found npm, please install npm before");
|
84272
84760
|
}
|
84273
84761
|
async function isPackageDeprecated(packageName, registry2) {
|
84274
|
-
if (await (0,
|
84762
|
+
if (await (0, import_utils51.canUseNpm)()) {
|
84275
84763
|
const args = [
|
84276
84764
|
"view",
|
84277
84765
|
packageName,
|
@@ -84280,13 +84768,13 @@ async function isPackageDeprecated(packageName, registry2) {
|
|
84280
84768
|
if (registry2) {
|
84281
84769
|
args.push(`--registry=${registry2}`);
|
84282
84770
|
}
|
84283
|
-
const result = await (0,
|
84284
|
-
return (0,
|
84771
|
+
const result = await (0, import_utils51.execa)("npm", args);
|
84772
|
+
return (0, import_utils51.stripAnsi)(result.stdout);
|
84285
84773
|
}
|
84286
84774
|
throw new Error("not found npm, please install npm before");
|
84287
84775
|
}
|
84288
84776
|
function semverDecrease(version) {
|
84289
|
-
const versionObj =
|
84777
|
+
const versionObj = import_utils51.semver.parse(version, {
|
84290
84778
|
loose: true
|
84291
84779
|
});
|
84292
84780
|
if (!versionObj) {
|
@@ -84296,8 +84784,8 @@ function semverDecrease(version) {
|
|
84296
84784
|
versionObj.prerelease = [];
|
84297
84785
|
versionObj.patch--;
|
84298
84786
|
const result = versionObj.format();
|
84299
|
-
if (!
|
84300
|
-
|
84787
|
+
if (!import_utils51.semver.valid(result)) {
|
84788
|
+
import_utils51.logger.debug(`Version ${result} is not valid semver`);
|
84301
84789
|
return version;
|
84302
84790
|
}
|
84303
84791
|
return result;
|
@@ -84307,7 +84795,7 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
|
|
84307
84795
|
let version = currentVersion;
|
84308
84796
|
while (times) {
|
84309
84797
|
if (!await isPackageExist(`${packageName}@${version}`, registry2) || await isPackageDeprecated(`${packageName}@${version}`, registry2)) {
|
84310
|
-
version =
|
84798
|
+
version = import_utils51.semver.inc(version, "patch");
|
84311
84799
|
times--;
|
84312
84800
|
continue;
|
84313
84801
|
}
|
@@ -84325,6 +84813,21 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
|
|
84325
84813
|
return currentVersion;
|
84326
84814
|
}
|
84327
84815
|
|
84816
|
+
// ../../generator-utils/dist/esm/utils/stripAnsi.js
|
84817
|
+
function ansiRegex2({ onlyFirst = false } = {}) {
|
84818
|
+
const pattern = [
|
84819
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
84820
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
84821
|
+
].join("|");
|
84822
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
84823
|
+
}
|
84824
|
+
function stripAnsi3(string) {
|
84825
|
+
if (typeof string !== "string") {
|
84826
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
84827
|
+
}
|
84828
|
+
return string.replace(ansiRegex2(), "");
|
84829
|
+
}
|
84830
|
+
|
84328
84831
|
// ../../generator-utils/dist/esm/utils/getGeneratorPath.js
|
84329
84832
|
var import_path11 = __toESM(require("path"));
|
84330
84833
|
var getGeneratorPath = (generator, distTag, paths) => {
|
@@ -84341,13 +84844,13 @@ var getGeneratorPath = (generator, distTag, paths) => {
|
|
84341
84844
|
};
|
84342
84845
|
|
84343
84846
|
// ../../generator-utils/dist/esm/index.js
|
84344
|
-
var
|
84847
|
+
var import_utils53 = require("@modern-js/utils");
|
84345
84848
|
async function getPackageVersion(packageName, registry2) {
|
84346
|
-
const spinner = (0,
|
84849
|
+
const spinner = (0, import_utils52.ora)({
|
84347
84850
|
text: "Load Generator...",
|
84348
84851
|
spinner: "runner"
|
84349
84852
|
}).start();
|
84350
|
-
if (await (0,
|
84853
|
+
if (await (0, import_utils52.canUsePnpm)()) {
|
84351
84854
|
const args = [
|
84352
84855
|
"info",
|
84353
84856
|
packageName,
|
@@ -84356,11 +84859,11 @@ async function getPackageVersion(packageName, registry2) {
|
|
84356
84859
|
if (registry2) {
|
84357
84860
|
args.push(`--registry=${registry2}`);
|
84358
84861
|
}
|
84359
|
-
const result = await (0,
|
84862
|
+
const result = await (0, import_utils52.execa)("pnpm", args);
|
84360
84863
|
spinner.stop();
|
84361
|
-
return
|
84864
|
+
return stripAnsi3(result.stdout);
|
84362
84865
|
}
|
84363
|
-
if (await (0,
|
84866
|
+
if (await (0, import_utils52.canUseNpm)()) {
|
84364
84867
|
const args = [
|
84365
84868
|
"view",
|
84366
84869
|
packageName,
|
@@ -84369,9 +84872,9 @@ async function getPackageVersion(packageName, registry2) {
|
|
84369
84872
|
if (registry2) {
|
84370
84873
|
args.push(`--registry=${registry2}`);
|
84371
84874
|
}
|
84372
|
-
const result = await (0,
|
84875
|
+
const result = await (0, import_utils52.execa)("npm", args);
|
84373
84876
|
spinner.stop();
|
84374
|
-
return
|
84877
|
+
return stripAnsi3(result.stdout);
|
84375
84878
|
}
|
84376
84879
|
spinner.stop();
|
84377
84880
|
throw new Error("not found npm, please install npm before");
|
@@ -84399,8 +84902,8 @@ async function getModernPluginVersion(solution, packageName, options = {
|
|
84399
84902
|
]
|
84400
84903
|
}), "../..", "package.json");
|
84401
84904
|
}
|
84402
|
-
if (
|
84403
|
-
const pkgInfo =
|
84905
|
+
if (import_utils52.fs.existsSync(pkgPath)) {
|
84906
|
+
const pkgInfo = import_utils52.fs.readJSONSync(pkgPath);
|
84404
84907
|
const modernVersion = pkgInfo.version;
|
84405
84908
|
if (typeof modernVersion !== "string") {
|
84406
84909
|
return getLatetPluginVersion();
|
@@ -84414,181 +84917,7 @@ async function getModernPluginVersion(solution, packageName, options = {
|
|
84414
84917
|
return getLatetPluginVersion();
|
84415
84918
|
}
|
84416
84919
|
|
84417
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
|
84418
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
84419
|
-
try {
|
84420
|
-
var info = gen[key](arg);
|
84421
|
-
var value = info.value;
|
84422
|
-
} catch (error) {
|
84423
|
-
reject(error);
|
84424
|
-
return;
|
84425
|
-
}
|
84426
|
-
if (info.done)
|
84427
|
-
resolve(value);
|
84428
|
-
else
|
84429
|
-
Promise.resolve(value).then(_next, _throw);
|
84430
|
-
}
|
84431
|
-
function _async_to_generator(fn) {
|
84432
|
-
return function() {
|
84433
|
-
var self3 = this, args = arguments;
|
84434
|
-
return new Promise(function(resolve, reject) {
|
84435
|
-
var gen = fn.apply(self3, args);
|
84436
|
-
function _next(value) {
|
84437
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
84438
|
-
}
|
84439
|
-
function _throw(err) {
|
84440
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
84441
|
-
}
|
84442
|
-
_next(void 0);
|
84443
|
-
});
|
84444
|
-
};
|
84445
|
-
}
|
84446
|
-
|
84447
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
|
84448
|
-
function _class_call_check(instance, Constructor) {
|
84449
|
-
if (!(instance instanceof Constructor))
|
84450
|
-
throw new TypeError("Cannot call a class as a function");
|
84451
|
-
}
|
84452
|
-
|
84453
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
84454
|
-
function _define_property(obj, key, value) {
|
84455
|
-
if (key in obj) {
|
84456
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
84457
|
-
} else
|
84458
|
-
obj[key] = value;
|
84459
|
-
return obj;
|
84460
|
-
}
|
84461
|
-
|
84462
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
|
84463
|
-
function _object_spread(target) {
|
84464
|
-
for (var i = 1; i < arguments.length; i++) {
|
84465
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
84466
|
-
var ownKeys2 = Object.keys(source);
|
84467
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
84468
|
-
ownKeys2 = ownKeys2.concat(
|
84469
|
-
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
84470
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
84471
|
-
})
|
84472
|
-
);
|
84473
|
-
}
|
84474
|
-
ownKeys2.forEach(function(key) {
|
84475
|
-
_define_property(target, key, source[key]);
|
84476
|
-
});
|
84477
|
-
}
|
84478
|
-
return target;
|
84479
|
-
}
|
84480
|
-
|
84481
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
|
84482
|
-
function ownKeys(object, enumerableOnly) {
|
84483
|
-
var keys = Object.keys(object);
|
84484
|
-
if (Object.getOwnPropertySymbols) {
|
84485
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
84486
|
-
if (enumerableOnly) {
|
84487
|
-
symbols = symbols.filter(function(sym) {
|
84488
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
84489
|
-
});
|
84490
|
-
}
|
84491
|
-
keys.push.apply(keys, symbols);
|
84492
|
-
}
|
84493
|
-
return keys;
|
84494
|
-
}
|
84495
|
-
function _object_spread_props(target, source) {
|
84496
|
-
source = source != null ? source : {};
|
84497
|
-
if (Object.getOwnPropertyDescriptors)
|
84498
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
84499
|
-
else {
|
84500
|
-
ownKeys(Object(source)).forEach(function(key) {
|
84501
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
84502
|
-
});
|
84503
|
-
}
|
84504
|
-
return target;
|
84505
|
-
}
|
84506
|
-
|
84507
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
|
84508
|
-
function _object_without_properties_loose(source, excluded) {
|
84509
|
-
if (source == null)
|
84510
|
-
return {};
|
84511
|
-
var target = {};
|
84512
|
-
var sourceKeys = Object.keys(source);
|
84513
|
-
var key, i;
|
84514
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
84515
|
-
key = sourceKeys[i];
|
84516
|
-
if (excluded.indexOf(key) >= 0)
|
84517
|
-
continue;
|
84518
|
-
target[key] = source[key];
|
84519
|
-
}
|
84520
|
-
return target;
|
84521
|
-
}
|
84522
|
-
|
84523
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
|
84524
|
-
function _object_without_properties(source, excluded) {
|
84525
|
-
if (source == null)
|
84526
|
-
return {};
|
84527
|
-
var target = _object_without_properties_loose(source, excluded);
|
84528
|
-
var key, i;
|
84529
|
-
if (Object.getOwnPropertySymbols) {
|
84530
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
84531
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
84532
|
-
key = sourceSymbolKeys[i];
|
84533
|
-
if (excluded.indexOf(key) >= 0)
|
84534
|
-
continue;
|
84535
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
84536
|
-
continue;
|
84537
|
-
target[key] = source[key];
|
84538
|
-
}
|
84539
|
-
}
|
84540
|
-
return target;
|
84541
|
-
}
|
84542
|
-
|
84543
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
|
84544
|
-
function _array_like_to_array(arr, len) {
|
84545
|
-
if (len == null || len > arr.length)
|
84546
|
-
len = arr.length;
|
84547
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
84548
|
-
arr2[i] = arr[i];
|
84549
|
-
return arr2;
|
84550
|
-
}
|
84551
|
-
|
84552
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
|
84553
|
-
function _array_without_holes(arr) {
|
84554
|
-
if (Array.isArray(arr))
|
84555
|
-
return _array_like_to_array(arr);
|
84556
|
-
}
|
84557
|
-
|
84558
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
|
84559
|
-
function _iterable_to_array(iter) {
|
84560
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
84561
|
-
return Array.from(iter);
|
84562
|
-
}
|
84563
|
-
}
|
84564
|
-
|
84565
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
|
84566
|
-
function _non_iterable_spread() {
|
84567
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
84568
|
-
}
|
84569
|
-
|
84570
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
|
84571
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
84572
|
-
if (!o)
|
84573
|
-
return;
|
84574
|
-
if (typeof o === "string")
|
84575
|
-
return _array_like_to_array(o, minLen);
|
84576
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
84577
|
-
if (n === "Object" && o.constructor)
|
84578
|
-
n = o.constructor.name;
|
84579
|
-
if (n === "Map" || n === "Set")
|
84580
|
-
return Array.from(n);
|
84581
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
84582
|
-
return _array_like_to_array(o, minLen);
|
84583
|
-
}
|
84584
|
-
|
84585
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
|
84586
|
-
function _to_consumable_array(arr) {
|
84587
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
84588
|
-
}
|
84589
|
-
|
84590
84920
|
// ../../generator-plugin/dist/esm/index.js
|
84591
|
-
var import_path17 = __toESM(require("path"));
|
84592
84921
|
var import_lodash13 = require("@modern-js/utils/lodash");
|
84593
84922
|
|
84594
84923
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_create_class.js
|
@@ -84613,11 +84942,11 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
84613
84942
|
// ../../generator-plugin/dist/esm/context/file.js
|
84614
84943
|
var import_path14 = __toESM(require("path"));
|
84615
84944
|
|
84616
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84945
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
84617
84946
|
var import_comment_json2 = __toESM(require_src3());
|
84618
84947
|
var declarationUpdate = __toESM(require_dist());
|
84619
84948
|
|
84620
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84949
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
84621
84950
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
84622
84951
|
const originJsonValue = await resource.value();
|
84623
84952
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
@@ -84630,13 +84959,13 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
84630
84959
|
return newJsonString;
|
84631
84960
|
}
|
84632
84961
|
|
84633
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84962
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
84634
84963
|
var JsonAPI = class {
|
84635
84964
|
async get(resource) {
|
84636
84965
|
const originJsonValue = await resource.value();
|
84637
84966
|
try {
|
84638
|
-
const
|
84639
|
-
return
|
84967
|
+
const origin2 = import_comment_json2.default.parse(originJsonValue.content);
|
84968
|
+
return origin2;
|
84640
84969
|
} catch (e) {
|
84641
84970
|
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
84642
84971
|
throw new Error("resource content is not a legal json");
|
@@ -84646,8 +84975,8 @@ var JsonAPI = class {
|
|
84646
84975
|
await editJson(this.generatorCore, resource, async () => {
|
84647
84976
|
const originJsonValue = await resource.value();
|
84648
84977
|
try {
|
84649
|
-
const
|
84650
|
-
const newObj = import_comment_json2.default.assign(
|
84978
|
+
const origin2 = import_comment_json2.default.parse(originJsonValue.content);
|
84979
|
+
const newObj = import_comment_json2.default.assign(origin2, obj);
|
84651
84980
|
const jsonIntent = 2;
|
84652
84981
|
return import_comment_json2.default.stringify(newObj, void 0, jsonIntent);
|
84653
84982
|
} catch (e) {
|
@@ -84676,7 +85005,7 @@ var JsonAPI = class {
|
|
84676
85005
|
|
84677
85006
|
// ../../generator-plugin/dist/esm/utils/file.js
|
84678
85007
|
var import_path13 = __toESM(require("path"));
|
84679
|
-
var
|
85008
|
+
var import_utils55 = require("@modern-js/utils");
|
84680
85009
|
var FileType;
|
84681
85010
|
(function(FileType22) {
|
84682
85011
|
FileType22["Text"] = "text";
|
@@ -84701,7 +85030,7 @@ function _fileExists() {
|
|
84701
85030
|
]);
|
84702
85031
|
return [
|
84703
85032
|
4,
|
84704
|
-
|
85033
|
+
import_utils53.fs.access(filePath)
|
84705
85034
|
];
|
84706
85035
|
case 1:
|
84707
85036
|
_state.sent();
|
@@ -84735,7 +85064,7 @@ function dropFileRootPath(file, rootPath) {
|
|
84735
85064
|
}
|
84736
85065
|
function isAbsoluteOrRelativeFileTo(relativePath) {
|
84737
85066
|
var isFile2 = function(file) {
|
84738
|
-
return
|
85067
|
+
return import_utils53.fs.existsSync(file) && import_utils53.fs.lstatSync(file).isFile();
|
84739
85068
|
};
|
84740
85069
|
return function(fileName) {
|
84741
85070
|
return isFile2(fileName) || isFile2(import_path13.default.join(relativePath, fileName));
|
@@ -84762,7 +85091,7 @@ function _addFile() {
|
|
84762
85091
|
}
|
84763
85092
|
return [
|
84764
85093
|
4,
|
84765
|
-
|
85094
|
+
import_utils53.fs.mkdir(import_path13.default.dirname(fileDestPath), {
|
84766
85095
|
recursive: true
|
84767
85096
|
})
|
84768
85097
|
];
|
@@ -84776,13 +85105,13 @@ function _addFile() {
|
|
84776
85105
|
];
|
84777
85106
|
return [
|
84778
85107
|
4,
|
84779
|
-
|
85108
|
+
import_utils53.fs.readFile(absTemplatePath)
|
84780
85109
|
];
|
84781
85110
|
case 3:
|
84782
85111
|
rawTemplate = _state.sent();
|
84783
85112
|
return [
|
84784
85113
|
4,
|
84785
|
-
|
85114
|
+
import_utils53.fs.writeFile(fileDestPath, rawTemplate)
|
84786
85115
|
];
|
84787
85116
|
case 4:
|
84788
85117
|
_state.sent();
|
@@ -84799,7 +85128,7 @@ function _addFile() {
|
|
84799
85128
|
];
|
84800
85129
|
return [
|
84801
85130
|
4,
|
84802
|
-
|
85131
|
+
import_utils53.fs.readFile(absTemplatePath, "utf8")
|
84803
85132
|
];
|
84804
85133
|
case 6:
|
84805
85134
|
template = _state.sent();
|
@@ -84807,7 +85136,7 @@ function _addFile() {
|
|
84807
85136
|
case 7:
|
84808
85137
|
return [
|
84809
85138
|
4,
|
84810
|
-
|
85139
|
+
import_utils53.fs.writeFile(fileDestPath, renderString3(template, config.data || {}, ((_config_templateFile = config.templateFile) === null || _config_templateFile === void 0 ? void 0 : _config_templateFile.endsWith(".ejs")) ? "ejs" : "handlebars"), "utf8")
|
84811
85140
|
];
|
84812
85141
|
case 8:
|
84813
85142
|
_state.sent();
|
@@ -84841,7 +85170,7 @@ function _addManyFiles() {
|
|
84841
85170
|
return import_path13.default.join(templatePath, templateFile2);
|
84842
85171
|
});
|
84843
85172
|
config.templateBase = ((_config_templateBase = config.templateBase) === null || _config_templateBase === void 0 ? void 0 : _config_templateBase.startsWith(import_path13.default.sep)) ? config.templateBase : "".concat(import_path13.default.sep).concat(config.templateBase || "");
|
84844
|
-
templateFiles =
|
85173
|
+
templateFiles = import_utils55.globby.sync(config.templateFiles, {
|
84845
85174
|
braceExpansion: false,
|
84846
85175
|
dot: config.dot
|
84847
85176
|
}).map(function(filePath) {
|
@@ -84925,6 +85254,20 @@ function _addManyFiles() {
|
|
84925
85254
|
return _addManyFiles.apply(this, arguments);
|
84926
85255
|
}
|
84927
85256
|
|
85257
|
+
// ../../generator-plugin/dist/esm/context/ejs.js
|
85258
|
+
var import_ejs2 = __toESM(require_ejs());
|
85259
|
+
var PluginEjsAPI = /* @__PURE__ */ function() {
|
85260
|
+
"use strict";
|
85261
|
+
function PluginEjsAPI2() {
|
85262
|
+
_class_call_check(this, PluginEjsAPI2);
|
85263
|
+
}
|
85264
|
+
var _proto = PluginEjsAPI2.prototype;
|
85265
|
+
_proto.renderString = function renderString3(template, data) {
|
85266
|
+
return import_ejs2.default.render(template, data) || "";
|
85267
|
+
};
|
85268
|
+
return PluginEjsAPI2;
|
85269
|
+
}();
|
85270
|
+
|
84928
85271
|
// ../../generator-plugin/dist/esm/context/handlebars.js
|
84929
85272
|
var handlebars2 = __toESM(require_lib());
|
84930
85273
|
var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
@@ -84966,20 +85309,6 @@ var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
|
84966
85309
|
return PluginHandlebarsAPI2;
|
84967
85310
|
}();
|
84968
85311
|
|
84969
|
-
// ../../generator-plugin/dist/esm/context/ejs.js
|
84970
|
-
var import_ejs2 = __toESM(require_ejs());
|
84971
|
-
var PluginEjsAPI = /* @__PURE__ */ function() {
|
84972
|
-
"use strict";
|
84973
|
-
function PluginEjsAPI2() {
|
84974
|
-
_class_call_check(this, PluginEjsAPI2);
|
84975
|
-
}
|
84976
|
-
var _proto = PluginEjsAPI2.prototype;
|
84977
|
-
_proto.renderString = function renderString3(template, data) {
|
84978
|
-
return import_ejs2.default.render(template, data) || "";
|
84979
|
-
};
|
84980
|
-
return PluginEjsAPI2;
|
84981
|
-
}();
|
84982
|
-
|
84983
85312
|
// ../../generator-plugin/dist/esm/context/file.js
|
84984
85313
|
var FileType2;
|
84985
85314
|
(function(FileType22) {
|
@@ -85108,14 +85437,14 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85108
85437
|
case 0:
|
85109
85438
|
return [
|
85110
85439
|
4,
|
85111
|
-
|
85440
|
+
import_utils53.fs.readFile(import_path14.default.join(_this.projectPath, fileName), "utf-8")
|
85112
85441
|
];
|
85113
85442
|
case 1:
|
85114
85443
|
content = _state.sent();
|
85115
85444
|
newContent = update(content.split("\n"));
|
85116
85445
|
return [
|
85117
85446
|
4,
|
85118
|
-
|
85447
|
+
import_utils53.fs.writeFile(import_path14.default.join(_this.projectPath, fileName), newContent.join("\n"), "utf-8")
|
85119
85448
|
];
|
85120
85449
|
case 2:
|
85121
85450
|
_state.sent();
|
@@ -85146,7 +85475,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85146
85475
|
];
|
85147
85476
|
return [
|
85148
85477
|
4,
|
85149
|
-
|
85478
|
+
import_utils53.fs.rm(file)
|
85150
85479
|
];
|
85151
85480
|
case 2:
|
85152
85481
|
_state.sent();
|
@@ -85177,7 +85506,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85177
85506
|
]);
|
85178
85507
|
return [
|
85179
85508
|
4,
|
85180
|
-
|
85509
|
+
import_utils53.fs.stat(dir)
|
85181
85510
|
];
|
85182
85511
|
case 2:
|
85183
85512
|
stat = _state.sent();
|
@@ -85188,7 +85517,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85188
85517
|
];
|
85189
85518
|
return [
|
85190
85519
|
4,
|
85191
|
-
|
85520
|
+
import_utils53.fs.rm(dir, {
|
85192
85521
|
recursive: true
|
85193
85522
|
})
|
85194
85523
|
];
|
@@ -85231,7 +85560,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85231
85560
|
return __generator(this, function(_state) {
|
85232
85561
|
return [
|
85233
85562
|
2,
|
85234
|
-
|
85563
|
+
import_utils53.fs.readdir(import_path14.default.join(_this.projectPath, dir))
|
85235
85564
|
];
|
85236
85565
|
});
|
85237
85566
|
})();
|
@@ -85533,91 +85862,9 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
85533
85862
|
return PluginInputContext2;
|
85534
85863
|
}();
|
85535
85864
|
|
85536
|
-
// ../../generator-plugin/dist/esm/context/npm.js
|
85537
|
-
var PluginNpmAPI = /* @__PURE__ */ function() {
|
85538
|
-
"use strict";
|
85539
|
-
function PluginNpmAPI2(projectPath, packageManager) {
|
85540
|
-
_class_call_check(this, PluginNpmAPI2);
|
85541
|
-
this.projectPath = "";
|
85542
|
-
this.projectPath = projectPath;
|
85543
|
-
this.packageManager = packageManager;
|
85544
|
-
}
|
85545
|
-
var _proto = PluginNpmAPI2.prototype;
|
85546
|
-
_proto.install = function install() {
|
85547
|
-
var _this = this;
|
85548
|
-
return _async_to_generator(function() {
|
85549
|
-
return __generator(this, function(_state) {
|
85550
|
-
switch (_state.label) {
|
85551
|
-
case 0:
|
85552
|
-
if (!(_this.packageManager === PackageManager.Pnpm))
|
85553
|
-
return [
|
85554
|
-
3,
|
85555
|
-
2
|
85556
|
-
];
|
85557
|
-
return [
|
85558
|
-
4,
|
85559
|
-
pnpmInstall({
|
85560
|
-
cwd: _this.projectPath
|
85561
|
-
})
|
85562
|
-
];
|
85563
|
-
case 1:
|
85564
|
-
_state.sent();
|
85565
|
-
return [
|
85566
|
-
3,
|
85567
|
-
6
|
85568
|
-
];
|
85569
|
-
case 2:
|
85570
|
-
if (!(_this.packageManager === PackageManager.Yarn))
|
85571
|
-
return [
|
85572
|
-
3,
|
85573
|
-
4
|
85574
|
-
];
|
85575
|
-
return [
|
85576
|
-
4,
|
85577
|
-
yarnInstall({
|
85578
|
-
cwd: _this.projectPath
|
85579
|
-
})
|
85580
|
-
];
|
85581
|
-
case 3:
|
85582
|
-
_state.sent();
|
85583
|
-
return [
|
85584
|
-
3,
|
85585
|
-
6
|
85586
|
-
];
|
85587
|
-
case 4:
|
85588
|
-
return [
|
85589
|
-
4,
|
85590
|
-
npmInstall({
|
85591
|
-
cwd: _this.projectPath
|
85592
|
-
})
|
85593
|
-
];
|
85594
|
-
case 5:
|
85595
|
-
_state.sent();
|
85596
|
-
_state.label = 6;
|
85597
|
-
case 6:
|
85598
|
-
return [
|
85599
|
-
2
|
85600
|
-
];
|
85601
|
-
}
|
85602
|
-
});
|
85603
|
-
})();
|
85604
|
-
};
|
85605
|
-
_create_class(PluginNpmAPI2, [
|
85606
|
-
{
|
85607
|
-
key: "method",
|
85608
|
-
get: function get4() {
|
85609
|
-
return {
|
85610
|
-
install: this.install.bind(this)
|
85611
|
-
};
|
85612
|
-
}
|
85613
|
-
}
|
85614
|
-
]);
|
85615
|
-
return PluginNpmAPI2;
|
85616
|
-
}();
|
85617
|
-
|
85618
85865
|
// ../../new-action/dist/esm/utils/index.js
|
85619
85866
|
var import_path15 = __toESM(require("path"));
|
85620
|
-
var
|
85867
|
+
var import_utils56 = require("@modern-js/utils");
|
85621
85868
|
var swap = (obj) => {
|
85622
85869
|
return Object.keys(obj).reduce((acc, key) => {
|
85623
85870
|
acc[obj[key]] = key;
|
@@ -85627,20 +85874,20 @@ var swap = (obj) => {
|
|
85627
85874
|
var dependenceToSolution = swap(SolutionToolsMap);
|
85628
85875
|
function alreadyRepo(cwd = process.cwd()) {
|
85629
85876
|
try {
|
85630
|
-
return
|
85877
|
+
return import_utils53.fs.existsSync(import_path15.default.resolve(cwd, "package.json"));
|
85631
85878
|
} catch (e) {
|
85632
85879
|
return false;
|
85633
85880
|
}
|
85634
85881
|
}
|
85635
85882
|
var readJson = (jsonPath) => {
|
85636
|
-
if (!
|
85883
|
+
if (!import_utils53.fs.existsSync(jsonPath)) {
|
85637
85884
|
return {};
|
85638
85885
|
}
|
85639
|
-
const jsonStr =
|
85886
|
+
const jsonStr = import_utils53.fs.readFileSync(jsonPath, {
|
85640
85887
|
encoding: "utf8"
|
85641
85888
|
});
|
85642
85889
|
try {
|
85643
|
-
return
|
85890
|
+
return import_utils56.json5.parse(jsonStr);
|
85644
85891
|
} catch (error) {
|
85645
85892
|
throw Error(`${jsonPath} is not a valid json, please check and try again.`);
|
85646
85893
|
}
|
@@ -85675,8 +85922,8 @@ function getGeneratorPath2(generator, distTag) {
|
|
85675
85922
|
}
|
85676
85923
|
async function usePluginNameExport(solution, options) {
|
85677
85924
|
const solutionVersion = await getModernPluginVersion(solution, SolutionToolsMap[Solution.MWA], options);
|
85678
|
-
if (
|
85679
|
-
return
|
85925
|
+
if (import_utils56.semver.valid(solutionVersion) && import_utils56.semver.gte(solutionVersion, "2.0.0")) {
|
85926
|
+
return import_utils56.semver.gt(solutionVersion, "2.24.0");
|
85680
85927
|
}
|
85681
85928
|
return true;
|
85682
85929
|
}
|
@@ -85757,7 +86004,7 @@ var MWANewAction = async (options) => {
|
|
85757
86004
|
noNeedInstall: !needInstall
|
85758
86005
|
}, ans, {
|
85759
86006
|
locale: UserConfig.locale || locale,
|
85760
|
-
packageManager: UserConfig.packageManager || await (0,
|
86007
|
+
packageManager: UserConfig.packageManager || await (0, import_utils53.getPackageManager)(cwd),
|
85761
86008
|
distTag
|
85762
86009
|
}, {
|
85763
86010
|
devDependencies: devDependency ? {
|
@@ -85858,7 +86105,7 @@ var ModuleNewAction = async (options) => {
|
|
85858
86105
|
noNeedInstall: !needInstall
|
85859
86106
|
}, ans, {
|
85860
86107
|
locale: UserConfig.locale || locale,
|
85861
|
-
packageManager: UserConfig.packageManager || await (0,
|
86108
|
+
packageManager: UserConfig.packageManager || await (0, import_utils53.getPackageManager)(cwd),
|
85862
86109
|
distTag
|
85863
86110
|
}, {
|
85864
86111
|
devDependencies: devDependency ? {
|
@@ -86012,6 +86259,88 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
86012
86259
|
return PluginNewAPI2;
|
86013
86260
|
}();
|
86014
86261
|
|
86262
|
+
// ../../generator-plugin/dist/esm/context/npm.js
|
86263
|
+
var PluginNpmAPI = /* @__PURE__ */ function() {
|
86264
|
+
"use strict";
|
86265
|
+
function PluginNpmAPI2(projectPath, packageManager) {
|
86266
|
+
_class_call_check(this, PluginNpmAPI2);
|
86267
|
+
this.projectPath = "";
|
86268
|
+
this.projectPath = projectPath;
|
86269
|
+
this.packageManager = packageManager;
|
86270
|
+
}
|
86271
|
+
var _proto = PluginNpmAPI2.prototype;
|
86272
|
+
_proto.install = function install() {
|
86273
|
+
var _this = this;
|
86274
|
+
return _async_to_generator(function() {
|
86275
|
+
return __generator(this, function(_state) {
|
86276
|
+
switch (_state.label) {
|
86277
|
+
case 0:
|
86278
|
+
if (!(_this.packageManager === PackageManager.Pnpm))
|
86279
|
+
return [
|
86280
|
+
3,
|
86281
|
+
2
|
86282
|
+
];
|
86283
|
+
return [
|
86284
|
+
4,
|
86285
|
+
pnpmInstall({
|
86286
|
+
cwd: _this.projectPath
|
86287
|
+
})
|
86288
|
+
];
|
86289
|
+
case 1:
|
86290
|
+
_state.sent();
|
86291
|
+
return [
|
86292
|
+
3,
|
86293
|
+
6
|
86294
|
+
];
|
86295
|
+
case 2:
|
86296
|
+
if (!(_this.packageManager === PackageManager.Yarn))
|
86297
|
+
return [
|
86298
|
+
3,
|
86299
|
+
4
|
86300
|
+
];
|
86301
|
+
return [
|
86302
|
+
4,
|
86303
|
+
yarnInstall({
|
86304
|
+
cwd: _this.projectPath
|
86305
|
+
})
|
86306
|
+
];
|
86307
|
+
case 3:
|
86308
|
+
_state.sent();
|
86309
|
+
return [
|
86310
|
+
3,
|
86311
|
+
6
|
86312
|
+
];
|
86313
|
+
case 4:
|
86314
|
+
return [
|
86315
|
+
4,
|
86316
|
+
npmInstall({
|
86317
|
+
cwd: _this.projectPath
|
86318
|
+
})
|
86319
|
+
];
|
86320
|
+
case 5:
|
86321
|
+
_state.sent();
|
86322
|
+
_state.label = 6;
|
86323
|
+
case 6:
|
86324
|
+
return [
|
86325
|
+
2
|
86326
|
+
];
|
86327
|
+
}
|
86328
|
+
});
|
86329
|
+
})();
|
86330
|
+
};
|
86331
|
+
_create_class(PluginNpmAPI2, [
|
86332
|
+
{
|
86333
|
+
key: "method",
|
86334
|
+
get: function get4() {
|
86335
|
+
return {
|
86336
|
+
install: this.install.bind(this)
|
86337
|
+
};
|
86338
|
+
}
|
86339
|
+
}
|
86340
|
+
]);
|
86341
|
+
return PluginNpmAPI2;
|
86342
|
+
}();
|
86343
|
+
|
86015
86344
|
// ../../generator-plugin/dist/esm/context/index.js
|
86016
86345
|
var LifeCycle2;
|
86017
86346
|
(function(LifeCycle22) {
|
@@ -86073,6 +86402,29 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
86073
86402
|
return PluginContext2;
|
86074
86403
|
}();
|
86075
86404
|
|
86405
|
+
// ../../generator-plugin/dist/esm/locale/en.js
|
86406
|
+
var EN_LOCALE4 = {
|
86407
|
+
setup_plugin: "Get plugin info...",
|
86408
|
+
plugin_no_meta_error: "plugin {plugin} should has meta filed in package.json",
|
86409
|
+
install_plugin: "Install plugin...",
|
86410
|
+
run_plugin: "Run plugin..."
|
86411
|
+
};
|
86412
|
+
|
86413
|
+
// ../../generator-plugin/dist/esm/locale/zh.js
|
86414
|
+
var ZH_LOCALE4 = {
|
86415
|
+
setup_plugin: "获取插件信息中...",
|
86416
|
+
plugin_no_meta_error: "插件 {plugin} 应在 package.json 中添加 meta 信息",
|
86417
|
+
install_plugin: "正在安装生成器插件...",
|
86418
|
+
run_plugin: "正在执行插件操作..."
|
86419
|
+
};
|
86420
|
+
|
86421
|
+
// ../../generator-plugin/dist/esm/locale/index.js
|
86422
|
+
var i18n4 = new I18n2();
|
86423
|
+
var localeKeys4 = i18n4.init("en", {
|
86424
|
+
zh: ZH_LOCALE4,
|
86425
|
+
en: EN_LOCALE4
|
86426
|
+
});
|
86427
|
+
|
86076
86428
|
// ../../generator-plugin/dist/esm/utils/index.js
|
86077
86429
|
var import_path16 = __toESM(require("path"));
|
86078
86430
|
|
@@ -86107,7 +86459,7 @@ function _getPackageMeta() {
|
|
86107
86459
|
params.push("--registry");
|
86108
86460
|
params.push(registryUrl);
|
86109
86461
|
}
|
86110
|
-
getPkgInfoPromise = (0,
|
86462
|
+
getPkgInfoPromise = (0, import_utils53.execa)("npm", params);
|
86111
86463
|
return [
|
86112
86464
|
4,
|
86113
86465
|
timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT2, "Get npm version of '".concat(packageName, "'"))
|
@@ -86206,29 +86558,6 @@ function _installPlugins() {
|
|
86206
86558
|
return _installPlugins.apply(this, arguments);
|
86207
86559
|
}
|
86208
86560
|
|
86209
|
-
// ../../generator-plugin/dist/esm/locale/zh.js
|
86210
|
-
var ZH_LOCALE4 = {
|
86211
|
-
setup_plugin: "获取插件信息中...",
|
86212
|
-
plugin_no_meta_error: "插件 {plugin} 应在 package.json 中添加 meta 信息",
|
86213
|
-
install_plugin: "正在安装生成器插件...",
|
86214
|
-
run_plugin: "正在执行插件操作..."
|
86215
|
-
};
|
86216
|
-
|
86217
|
-
// ../../generator-plugin/dist/esm/locale/en.js
|
86218
|
-
var EN_LOCALE4 = {
|
86219
|
-
setup_plugin: "Get plugin info...",
|
86220
|
-
plugin_no_meta_error: "plugin {plugin} should has meta filed in package.json",
|
86221
|
-
install_plugin: "Install plugin...",
|
86222
|
-
run_plugin: "Run plugin..."
|
86223
|
-
};
|
86224
|
-
|
86225
|
-
// ../../generator-plugin/dist/esm/locale/index.js
|
86226
|
-
var i18n4 = new I18n2();
|
86227
|
-
var localeKeys4 = i18n4.init("en", {
|
86228
|
-
zh: ZH_LOCALE4,
|
86229
|
-
en: EN_LOCALE4
|
86230
|
-
});
|
86231
|
-
|
86232
86561
|
// ../../generator-plugin/dist/esm/index.js
|
86233
86562
|
var GeneratorPlugin = /* @__PURE__ */ function() {
|
86234
86563
|
"use strict";
|
@@ -86275,7 +86604,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
86275
86604
|
];
|
86276
86605
|
return [
|
86277
86606
|
4,
|
86278
|
-
|
86607
|
+
import_utils53.fs.readJSON(import_path17.default.join(process.cwd(), plugin.slice(5), "package.json"))
|
86279
86608
|
];
|
86280
86609
|
case 1:
|
86281
86610
|
pkgJSON = _state2.sent();
|
@@ -86291,7 +86620,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
86291
86620
|
];
|
86292
86621
|
return [
|
86293
86622
|
4,
|
86294
|
-
|
86623
|
+
import_utils53.fs.readJSON(import_path17.default.join(plugin, "package.json"))
|
86295
86624
|
];
|
86296
86625
|
case 3:
|
86297
86626
|
pkgJSON = _state2.sent();
|
@@ -86668,6 +86997,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
86668
86997
|
}();
|
86669
86998
|
|
86670
86999
|
// src/index.ts
|
87000
|
+
var import_lodash14 = require("@modern-js/utils/lodash");
|
86671
87001
|
var mergeDefaultConfig = (context) => {
|
86672
87002
|
const { defaultSolution } = context.config;
|
86673
87003
|
if (defaultSolution) {
|