@modern-js/repo-generator 3.4.15 → 3.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1045 -717
- package/package.json +12 -12
- package/src/index.ts +2 -4
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();
|
@@ -68846,7 +68876,7 @@ __export(src_exports, {
|
|
68846
68876
|
module.exports = __toCommonJS(src_exports);
|
68847
68877
|
var import_lodash14 = require("@modern-js/utils/lodash");
|
68848
68878
|
|
68849
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68879
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
68850
68880
|
var LoggerLevel;
|
68851
68881
|
(function(LoggerLevel2) {
|
68852
68882
|
LoggerLevel2["Error"] = "error";
|
@@ -68867,7 +68897,7 @@ var LevelPriority = [
|
|
68867
68897
|
"stream"
|
68868
68898
|
];
|
68869
68899
|
|
68870
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68900
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
68871
68901
|
var import_utils = require("@modern-js/utils");
|
68872
68902
|
var Logger = class {
|
68873
68903
|
get currentLevelIndex() {
|
@@ -68928,22 +68958,22 @@ var Logger = class {
|
|
68928
68958
|
}
|
68929
68959
|
};
|
68930
68960
|
|
68931
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68961
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
68932
68962
|
var import_path7 = __toESM(require("path"));
|
68933
68963
|
|
68934
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68964
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
68935
68965
|
var import_events = require("events");
|
68936
68966
|
var import_path4 = __toESM(require("path"));
|
68937
68967
|
|
68938
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68968
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
68939
68969
|
var import_path2 = __toESM(require("path"));
|
68940
68970
|
var import_utils3 = require("@modern-js/utils");
|
68941
68971
|
|
68942
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68972
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
68943
68973
|
var import_path = __toESM(require("path"));
|
68944
68974
|
var import_utils2 = require("@modern-js/utils");
|
68945
68975
|
|
68946
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68976
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
68947
68977
|
var IMAGE_EXT_LIST = [
|
68948
68978
|
".jpg",
|
68949
68979
|
".jpeg",
|
@@ -68957,7 +68987,7 @@ var IMAGE_EXT_LIST = [
|
|
68957
68987
|
".wmf"
|
68958
68988
|
];
|
68959
68989
|
|
68960
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68990
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
68961
68991
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
68962
68992
|
var FsResource = class {
|
68963
68993
|
async value() {
|
@@ -68980,7 +69010,7 @@ var FsResource = class {
|
|
68980
69010
|
}
|
68981
69011
|
};
|
68982
69012
|
|
68983
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69013
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
68984
69014
|
var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
|
68985
69015
|
(0, import_utils3.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
|
68986
69016
|
});
|
@@ -69005,11 +69035,11 @@ var FsMaterial = class {
|
|
69005
69035
|
}
|
69006
69036
|
};
|
69007
69037
|
|
69008
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69038
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
69009
69039
|
var import_path3 = __toESM(require("path"));
|
69010
69040
|
var import_utils5 = require("@modern-js/utils");
|
69011
69041
|
|
69012
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69042
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
69013
69043
|
var import_utils4 = require("@modern-js/utils");
|
69014
69044
|
async function fsExists(path17) {
|
69015
69045
|
try {
|
@@ -69020,7 +69050,7 @@ async function fsExists(path17) {
|
|
69020
69050
|
}
|
69021
69051
|
}
|
69022
69052
|
|
69023
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69053
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
69024
69054
|
var MaxTimes = 5;
|
69025
69055
|
async function getGeneratorDir(generator) {
|
69026
69056
|
let result = generator;
|
@@ -69039,7 +69069,7 @@ async function getGeneratorDir(generator) {
|
|
69039
69069
|
return result;
|
69040
69070
|
}
|
69041
69071
|
|
69042
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69072
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
69043
69073
|
var nodeRequire = (path17) => {
|
69044
69074
|
try {
|
69045
69075
|
const module2 = __non_webpack_require__(path17);
|
@@ -69056,7 +69086,7 @@ var nodeRequire = (path17) => {
|
|
69056
69086
|
}
|
69057
69087
|
};
|
69058
69088
|
|
69059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69089
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
69060
69090
|
var import_utils6 = require("@modern-js/utils");
|
69061
69091
|
var GeneratorCore = class {
|
69062
69092
|
get lifeCycleMethod() {
|
@@ -69256,10 +69286,10 @@ check path: ${import_utils6.chalk.blue.underline(generator)} exist a package.jso
|
|
69256
69286
|
}
|
69257
69287
|
};
|
69258
69288
|
|
69259
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69289
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
69260
69290
|
var import_path6 = __toESM(require("path"));
|
69261
69291
|
|
69262
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69292
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
69263
69293
|
var import_path5 = __toESM(require("path"));
|
69264
69294
|
var import_utils7 = require("@modern-js/utils");
|
69265
69295
|
async function canUseYarn() {
|
@@ -69339,7 +69369,7 @@ async function runInstall(targetDir, registryUrl, logger2) {
|
|
69339
69369
|
}
|
69340
69370
|
}
|
69341
69371
|
|
69342
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69372
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
69343
69373
|
async function timeoutPromise(promise, ms, reason = "Operation") {
|
69344
69374
|
let timeoutId = null;
|
69345
69375
|
const delayPromise = (ms2) => new Promise((resolve) => {
|
@@ -69361,24 +69391,24 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
69361
69391
|
}
|
69362
69392
|
}
|
69363
69393
|
|
69364
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69394
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
69365
69395
|
var import_os = __toESM(require("os"));
|
69366
69396
|
|
69367
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69397
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
69368
69398
|
var NPM_API_TIMEOUT = 3e4;
|
69369
69399
|
var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
|
69370
69400
|
|
69371
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69372
|
-
var
|
69401
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
69402
|
+
var import_utils36 = require("@modern-js/utils");
|
69373
69403
|
|
69374
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69404
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/bind.js
|
69375
69405
|
function bind(fn, thisArg) {
|
69376
69406
|
return function wrap() {
|
69377
69407
|
return fn.apply(thisArg, arguments);
|
69378
69408
|
};
|
69379
69409
|
}
|
69380
69410
|
|
69381
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69411
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/utils.js
|
69382
69412
|
var { toString } = Object.prototype;
|
69383
69413
|
var { getPrototypeOf } = Object;
|
69384
69414
|
var kindOf = ((cache) => (thing) => {
|
@@ -69428,6 +69458,7 @@ var isFormData = (thing) => {
|
|
69428
69458
|
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
69429
69459
|
};
|
69430
69460
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
69461
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
69431
69462
|
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
69432
69463
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
69433
69464
|
if (obj === null || typeof obj === "undefined") {
|
@@ -69637,8 +69668,7 @@ var toObjectSet = (arrayOrString, delimiter) => {
|
|
69637
69668
|
var noop = () => {
|
69638
69669
|
};
|
69639
69670
|
var toFiniteNumber = (value, defaultValue) => {
|
69640
|
-
value = +value;
|
69641
|
-
return Number.isFinite(value) ? value : defaultValue;
|
69671
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
69642
69672
|
};
|
69643
69673
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
69644
69674
|
var DIGIT = "0123456789";
|
@@ -69682,6 +69712,26 @@ var toJSONObject = (obj) => {
|
|
69682
69712
|
};
|
69683
69713
|
var isAsyncFn = kindOfTest("AsyncFunction");
|
69684
69714
|
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
69715
|
+
var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
69716
|
+
if (setImmediateSupported) {
|
69717
|
+
return setImmediate;
|
69718
|
+
}
|
69719
|
+
return postMessageSupported ? ((token, callbacks) => {
|
69720
|
+
_global.addEventListener("message", ({ source, data }) => {
|
69721
|
+
if (source === _global && data === token) {
|
69722
|
+
callbacks.length && callbacks.shift()();
|
69723
|
+
}
|
69724
|
+
}, false);
|
69725
|
+
return (cb) => {
|
69726
|
+
callbacks.push(cb);
|
69727
|
+
_global.postMessage(token, "*");
|
69728
|
+
};
|
69729
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
69730
|
+
})(
|
69731
|
+
typeof setImmediate === "function",
|
69732
|
+
isFunction(_global.postMessage)
|
69733
|
+
);
|
69734
|
+
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
69685
69735
|
var utils_default = {
|
69686
69736
|
isArray,
|
69687
69737
|
isArrayBuffer,
|
@@ -69693,6 +69743,10 @@ var utils_default = {
|
|
69693
69743
|
isBoolean,
|
69694
69744
|
isObject,
|
69695
69745
|
isPlainObject,
|
69746
|
+
isReadableStream,
|
69747
|
+
isRequest,
|
69748
|
+
isResponse,
|
69749
|
+
isHeaders,
|
69696
69750
|
isUndefined,
|
69697
69751
|
isDate,
|
69698
69752
|
isFile,
|
@@ -69734,10 +69788,12 @@ var utils_default = {
|
|
69734
69788
|
isSpecCompliantForm,
|
69735
69789
|
toJSONObject,
|
69736
69790
|
isAsyncFn,
|
69737
|
-
isThenable
|
69791
|
+
isThenable,
|
69792
|
+
setImmediate: _setImmediate,
|
69793
|
+
asap
|
69738
69794
|
};
|
69739
69795
|
|
69740
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69796
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/AxiosError.js
|
69741
69797
|
function AxiosError(message, code, config, request, response) {
|
69742
69798
|
Error.call(this);
|
69743
69799
|
if (Error.captureStackTrace) {
|
@@ -69809,11 +69865,11 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
69809
69865
|
};
|
69810
69866
|
var AxiosError_default = AxiosError;
|
69811
69867
|
|
69812
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69868
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/classes/FormData.js
|
69813
69869
|
var import_form_data = __toESM(require_form_data());
|
69814
69870
|
var FormData_default = import_form_data.default;
|
69815
69871
|
|
69816
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69872
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/toFormData.js
|
69817
69873
|
function isVisitable(thing) {
|
69818
69874
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
69819
69875
|
}
|
@@ -69928,7 +69984,7 @@ function toFormData(obj, formData, options) {
|
|
69928
69984
|
}
|
69929
69985
|
var toFormData_default = toFormData;
|
69930
69986
|
|
69931
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
69987
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
69932
69988
|
function encode(str) {
|
69933
69989
|
const charMap = {
|
69934
69990
|
"!": "%21",
|
@@ -69961,7 +70017,7 @@ prototype2.toString = function toString2(encoder) {
|
|
69961
70017
|
};
|
69962
70018
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
69963
70019
|
|
69964
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70020
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/buildURL.js
|
69965
70021
|
function encode2(val) {
|
69966
70022
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
69967
70023
|
}
|
@@ -69987,7 +70043,7 @@ function buildURL(url2, params, options) {
|
|
69987
70043
|
return url2;
|
69988
70044
|
}
|
69989
70045
|
|
69990
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70046
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/InterceptorManager.js
|
69991
70047
|
var InterceptorManager = class {
|
69992
70048
|
constructor() {
|
69993
70049
|
this.handlers = [];
|
@@ -70051,18 +70107,18 @@ var InterceptorManager = class {
|
|
70051
70107
|
};
|
70052
70108
|
var InterceptorManager_default = InterceptorManager;
|
70053
70109
|
|
70054
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70110
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/defaults/transitional.js
|
70055
70111
|
var transitional_default = {
|
70056
70112
|
silentJSONParsing: true,
|
70057
70113
|
forcedJSONParsing: true,
|
70058
70114
|
clarifyTimeoutError: false
|
70059
70115
|
};
|
70060
70116
|
|
70061
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70117
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
70062
70118
|
var import_url = __toESM(require("url"));
|
70063
70119
|
var URLSearchParams_default = import_url.default.URLSearchParams;
|
70064
70120
|
|
70065
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70121
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/index.js
|
70066
70122
|
var node_default = {
|
70067
70123
|
isNode: true,
|
70068
70124
|
classes: {
|
@@ -70073,12 +70129,13 @@ var node_default = {
|
|
70073
70129
|
protocols: ["http", "https", "file", "data"]
|
70074
70130
|
};
|
70075
70131
|
|
70076
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70132
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/common/utils.js
|
70077
70133
|
var utils_exports = {};
|
70078
70134
|
__export(utils_exports, {
|
70079
70135
|
hasBrowserEnv: () => hasBrowserEnv,
|
70080
70136
|
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
70081
|
-
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv
|
70137
|
+
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
70138
|
+
origin: () => origin
|
70082
70139
|
});
|
70083
70140
|
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
70084
70141
|
var hasStandardBrowserEnv = ((product) => {
|
@@ -70088,14 +70145,15 @@ var hasStandardBrowserWebWorkerEnv = (() => {
|
|
70088
70145
|
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
70089
70146
|
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
70090
70147
|
})();
|
70148
|
+
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
70091
70149
|
|
70092
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70150
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/index.js
|
70093
70151
|
var platform_default = {
|
70094
70152
|
...utils_exports,
|
70095
70153
|
...node_default
|
70096
70154
|
};
|
70097
70155
|
|
70098
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70156
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
70099
70157
|
function toURLEncodedForm(data, options) {
|
70100
70158
|
return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
|
70101
70159
|
visitor: function(value, key, path17, helpers) {
|
@@ -70108,7 +70166,7 @@ function toURLEncodedForm(data, options) {
|
|
70108
70166
|
}, options));
|
70109
70167
|
}
|
70110
70168
|
|
70111
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70169
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToJSON.js
|
70112
70170
|
function parsePropPath(name) {
|
70113
70171
|
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
70114
70172
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
@@ -70162,7 +70220,7 @@ function formDataToJSON(formData) {
|
|
70162
70220
|
}
|
70163
70221
|
var formDataToJSON_default = formDataToJSON;
|
70164
70222
|
|
70165
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70223
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/defaults/index.js
|
70166
70224
|
function stringifySafely(rawValue, parser, encoder) {
|
70167
70225
|
if (utils_default.isString(rawValue)) {
|
70168
70226
|
try {
|
@@ -70178,7 +70236,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
70178
70236
|
}
|
70179
70237
|
var defaults = {
|
70180
70238
|
transitional: transitional_default,
|
70181
|
-
adapter: ["xhr", "http"],
|
70239
|
+
adapter: ["xhr", "http", "fetch"],
|
70182
70240
|
transformRequest: [function transformRequest(data, headers) {
|
70183
70241
|
const contentType = headers.getContentType() || "";
|
70184
70242
|
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
@@ -70190,7 +70248,7 @@ var defaults = {
|
|
70190
70248
|
if (isFormData2) {
|
70191
70249
|
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
70192
70250
|
}
|
70193
|
-
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
|
70251
|
+
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
70252
|
return data;
|
70195
70253
|
}
|
70196
70254
|
if (utils_default.isArrayBufferView(data)) {
|
@@ -70224,6 +70282,9 @@ var defaults = {
|
|
70224
70282
|
const transitional2 = this.transitional || defaults.transitional;
|
70225
70283
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
70226
70284
|
const JSONRequested = this.responseType === "json";
|
70285
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
70286
|
+
return data;
|
70287
|
+
}
|
70227
70288
|
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
70228
70289
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
70229
70290
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
@@ -70268,7 +70329,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method
|
|
70268
70329
|
});
|
70269
70330
|
var defaults_default = defaults;
|
70270
70331
|
|
70271
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70332
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/parseHeaders.js
|
70272
70333
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
70273
70334
|
"age",
|
70274
70335
|
"authorization",
|
@@ -70313,7 +70374,7 @@ var parseHeaders_default = (rawHeaders) => {
|
|
70313
70374
|
return parsed;
|
70314
70375
|
};
|
70315
70376
|
|
70316
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70377
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/AxiosHeaders.js
|
70317
70378
|
var $internals = Symbol("internals");
|
70318
70379
|
function normalizeHeader(header) {
|
70319
70380
|
return header && String(header).trim().toLowerCase();
|
@@ -70387,6 +70448,10 @@ var AxiosHeaders = class {
|
|
70387
70448
|
setHeaders(header, valueOrRewrite);
|
70388
70449
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
70389
70450
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
70451
|
+
} else if (utils_default.isHeaders(header)) {
|
70452
|
+
for (const [key, value] of header.entries()) {
|
70453
|
+
setHeader(value, key, rewrite);
|
70454
|
+
}
|
70390
70455
|
} else {
|
70391
70456
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
70392
70457
|
}
|
@@ -70531,7 +70596,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
70531
70596
|
utils_default.freezeMethods(AxiosHeaders);
|
70532
70597
|
var AxiosHeaders_default = AxiosHeaders;
|
70533
70598
|
|
70534
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70599
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/transformData.js
|
70535
70600
|
function transformData(fns, response) {
|
70536
70601
|
const config = this || defaults_default;
|
70537
70602
|
const context = response || config;
|
@@ -70544,12 +70609,12 @@ function transformData(fns, response) {
|
|
70544
70609
|
return data;
|
70545
70610
|
}
|
70546
70611
|
|
70547
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70612
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/isCancel.js
|
70548
70613
|
function isCancel(value) {
|
70549
70614
|
return !!(value && value.__CANCEL__);
|
70550
70615
|
}
|
70551
70616
|
|
70552
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70617
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/CanceledError.js
|
70553
70618
|
function CanceledError(message, config, request) {
|
70554
70619
|
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
70555
70620
|
this.name = "CanceledError";
|
@@ -70559,7 +70624,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
70559
70624
|
});
|
70560
70625
|
var CanceledError_default = CanceledError;
|
70561
70626
|
|
70562
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70627
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/settle.js
|
70563
70628
|
function settle(resolve, reject, response) {
|
70564
70629
|
const validateStatus2 = response.config.validateStatus;
|
70565
70630
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
@@ -70575,17 +70640,17 @@ function settle(resolve, reject, response) {
|
|
70575
70640
|
}
|
70576
70641
|
}
|
70577
70642
|
|
70578
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70643
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
70579
70644
|
function isAbsoluteURL(url2) {
|
70580
70645
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
70581
70646
|
}
|
70582
70647
|
|
70583
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70648
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/combineURLs.js
|
70584
70649
|
function combineURLs(baseURL, relativeURL) {
|
70585
70650
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
70586
70651
|
}
|
70587
70652
|
|
70588
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70653
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/buildFullPath.js
|
70589
70654
|
function buildFullPath(baseURL, requestedURL) {
|
70590
70655
|
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
70591
70656
|
return combineURLs(baseURL, requestedURL);
|
@@ -70593,7 +70658,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
70593
70658
|
return requestedURL;
|
70594
70659
|
}
|
70595
70660
|
|
70596
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70661
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70597
70662
|
var import_proxy_from_env = __toESM(require_proxy_from_env());
|
70598
70663
|
var import_http = __toESM(require("http"));
|
70599
70664
|
var import_https = __toESM(require("https"));
|
@@ -70601,16 +70666,16 @@ var import_util2 = __toESM(require("util"));
|
|
70601
70666
|
var import_follow_redirects = __toESM(require_follow_redirects());
|
70602
70667
|
var import_zlib = __toESM(require("zlib"));
|
70603
70668
|
|
70604
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70605
|
-
var VERSION = "1.
|
70669
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/env/data.js
|
70670
|
+
var VERSION = "1.7.4";
|
70606
70671
|
|
70607
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70672
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/parseProtocol.js
|
70608
70673
|
function parseProtocol(url2) {
|
70609
70674
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
70610
70675
|
return match && match[1] || "";
|
70611
70676
|
}
|
70612
70677
|
|
70613
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70678
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/fromDataURI.js
|
70614
70679
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
70615
70680
|
function fromDataURI(uri, asBlob, options) {
|
70616
70681
|
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
@@ -70639,75 +70704,11 @@ function fromDataURI(uri, asBlob, options) {
|
|
70639
70704
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
70640
70705
|
}
|
70641
70706
|
|
70642
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70707
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70643
70708
|
var import_stream4 = __toESM(require("stream"));
|
70644
70709
|
|
70645
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70710
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
70646
70711
|
var import_stream = __toESM(require("stream"));
|
70647
|
-
|
70648
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/throttle.js
|
70649
|
-
function throttle(fn, freq) {
|
70650
|
-
let timestamp = 0;
|
70651
|
-
const threshold = 1e3 / freq;
|
70652
|
-
let timer = null;
|
70653
|
-
return function throttled(force, args) {
|
70654
|
-
const now = Date.now();
|
70655
|
-
if (force || now - timestamp > threshold) {
|
70656
|
-
if (timer) {
|
70657
|
-
clearTimeout(timer);
|
70658
|
-
timer = null;
|
70659
|
-
}
|
70660
|
-
timestamp = now;
|
70661
|
-
return fn.apply(null, args);
|
70662
|
-
}
|
70663
|
-
if (!timer) {
|
70664
|
-
timer = setTimeout(() => {
|
70665
|
-
timer = null;
|
70666
|
-
timestamp = Date.now();
|
70667
|
-
return fn.apply(null, args);
|
70668
|
-
}, threshold - (now - timestamp));
|
70669
|
-
}
|
70670
|
-
};
|
70671
|
-
}
|
70672
|
-
var throttle_default = throttle;
|
70673
|
-
|
70674
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/speedometer.js
|
70675
|
-
function speedometer(samplesCount, min) {
|
70676
|
-
samplesCount = samplesCount || 10;
|
70677
|
-
const bytes = new Array(samplesCount);
|
70678
|
-
const timestamps = new Array(samplesCount);
|
70679
|
-
let head = 0;
|
70680
|
-
let tail = 0;
|
70681
|
-
let firstSampleTS;
|
70682
|
-
min = min !== void 0 ? min : 1e3;
|
70683
|
-
return function push(chunkLength) {
|
70684
|
-
const now = Date.now();
|
70685
|
-
const startedAt = timestamps[tail];
|
70686
|
-
if (!firstSampleTS) {
|
70687
|
-
firstSampleTS = now;
|
70688
|
-
}
|
70689
|
-
bytes[head] = chunkLength;
|
70690
|
-
timestamps[head] = now;
|
70691
|
-
let i = tail;
|
70692
|
-
let bytesCount = 0;
|
70693
|
-
while (i !== head) {
|
70694
|
-
bytesCount += bytes[i++];
|
70695
|
-
i = i % samplesCount;
|
70696
|
-
}
|
70697
|
-
head = (head + 1) % samplesCount;
|
70698
|
-
if (head === tail) {
|
70699
|
-
tail = (tail + 1) % samplesCount;
|
70700
|
-
}
|
70701
|
-
if (now - firstSampleTS < min) {
|
70702
|
-
return;
|
70703
|
-
}
|
70704
|
-
const passed = startedAt && now - startedAt;
|
70705
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
70706
|
-
};
|
70707
|
-
}
|
70708
|
-
var speedometer_default = speedometer;
|
70709
|
-
|
70710
|
-
// ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
70711
70712
|
var kInternals = Symbol("internals");
|
70712
70713
|
var AxiosTransformStream = class extends import_stream.default.Transform {
|
70713
70714
|
constructor(options) {
|
@@ -70724,11 +70725,8 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70724
70725
|
super({
|
70725
70726
|
readableHighWaterMark: options.chunkSize
|
70726
70727
|
});
|
70727
|
-
const self3 = this;
|
70728
70728
|
const internals = this[kInternals] = {
|
70729
|
-
length: options.length,
|
70730
70729
|
timeWindow: options.timeWindow,
|
70731
|
-
ticksRate: options.ticksRate,
|
70732
70730
|
chunkSize: options.chunkSize,
|
70733
70731
|
maxRate: options.maxRate,
|
70734
70732
|
minChunkSize: options.minChunkSize,
|
@@ -70739,7 +70737,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70739
70737
|
bytes: 0,
|
70740
70738
|
onReadCallback: null
|
70741
70739
|
};
|
70742
|
-
const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
|
70743
70740
|
this.on("newListener", (event) => {
|
70744
70741
|
if (event === "progress") {
|
70745
70742
|
if (!internals.isCaptured) {
|
@@ -70747,31 +70744,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70747
70744
|
}
|
70748
70745
|
}
|
70749
70746
|
});
|
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
70747
|
}
|
70776
70748
|
_read(size) {
|
70777
70749
|
const internals = this[kInternals];
|
@@ -70781,7 +70753,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70781
70753
|
return super._read(size);
|
70782
70754
|
}
|
70783
70755
|
_transform(chunk, encoding, callback) {
|
70784
|
-
const self3 = this;
|
70785
70756
|
const internals = this[kInternals];
|
70786
70757
|
const maxRate = internals.maxRate;
|
70787
70758
|
const readableHighWaterMark = this.readableHighWaterMark;
|
@@ -70789,14 +70760,12 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70789
70760
|
const divider = 1e3 / timeWindow;
|
70790
70761
|
const bytesThreshold = maxRate / divider;
|
70791
70762
|
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
70792
|
-
|
70763
|
+
const pushChunk = (_chunk, _callback) => {
|
70793
70764
|
const bytes = Buffer.byteLength(_chunk);
|
70794
70765
|
internals.bytesSeen += bytes;
|
70795
70766
|
internals.bytes += bytes;
|
70796
|
-
|
70797
|
-
|
70798
|
-
}
|
70799
|
-
if (self3.push(_chunk)) {
|
70767
|
+
internals.isCaptured && this.emit("progress", internals.bytesSeen);
|
70768
|
+
if (this.push(_chunk)) {
|
70800
70769
|
process.nextTick(_callback);
|
70801
70770
|
} else {
|
70802
70771
|
internals.onReadCallback = () => {
|
@@ -70804,7 +70773,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70804
70773
|
process.nextTick(_callback);
|
70805
70774
|
};
|
70806
70775
|
}
|
70807
|
-
}
|
70776
|
+
};
|
70808
70777
|
const transformChunk = (_chunk, _callback) => {
|
70809
70778
|
const chunkSize = Buffer.byteLength(_chunk);
|
70810
70779
|
let chunkRemainder = null;
|
@@ -70850,21 +70819,17 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
70850
70819
|
}
|
70851
70820
|
});
|
70852
70821
|
}
|
70853
|
-
setLength(length) {
|
70854
|
-
this[kInternals].length = +length;
|
70855
|
-
return this;
|
70856
|
-
}
|
70857
70822
|
};
|
70858
70823
|
var AxiosTransformStream_default = AxiosTransformStream;
|
70859
70824
|
|
70860
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70861
|
-
var import_events2 =
|
70825
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70826
|
+
var import_events2 = require("events");
|
70862
70827
|
|
70863
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70828
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToStream.js
|
70864
70829
|
var import_util = require("util");
|
70865
70830
|
var import_stream2 = require("stream");
|
70866
70831
|
|
70867
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70832
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/readBlob.js
|
70868
70833
|
var { asyncIterator } = Symbol;
|
70869
70834
|
var readBlob = async function* (blob) {
|
70870
70835
|
if (blob.stream) {
|
@@ -70879,7 +70844,7 @@ var readBlob = async function* (blob) {
|
|
70879
70844
|
};
|
70880
70845
|
var readBlob_default = readBlob;
|
70881
70846
|
|
70882
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70847
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToStream.js
|
70883
70848
|
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
|
70884
70849
|
var textEncoder = new import_util.TextEncoder();
|
70885
70850
|
var CRLF = "\r\n";
|
@@ -70958,7 +70923,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
70958
70923
|
};
|
70959
70924
|
var formDataToStream_default = formDataToStream;
|
70960
70925
|
|
70961
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70926
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
70962
70927
|
var import_stream3 = __toESM(require("stream"));
|
70963
70928
|
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
70964
70929
|
__transform(chunk, encoding, callback) {
|
@@ -70980,7 +70945,7 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
70980
70945
|
};
|
70981
70946
|
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
70982
70947
|
|
70983
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70948
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/callbackify.js
|
70984
70949
|
var callbackify = (fn, reducer) => {
|
70985
70950
|
return utils_default.isAsyncFn(fn) ? function(...args) {
|
70986
70951
|
const cb = args.pop();
|
@@ -70995,7 +70960,113 @@ var callbackify = (fn, reducer) => {
|
|
70995
70960
|
};
|
70996
70961
|
var callbackify_default = callbackify;
|
70997
70962
|
|
70998
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
70963
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/speedometer.js
|
70964
|
+
function speedometer(samplesCount, min) {
|
70965
|
+
samplesCount = samplesCount || 10;
|
70966
|
+
const bytes = new Array(samplesCount);
|
70967
|
+
const timestamps = new Array(samplesCount);
|
70968
|
+
let head = 0;
|
70969
|
+
let tail = 0;
|
70970
|
+
let firstSampleTS;
|
70971
|
+
min = min !== void 0 ? min : 1e3;
|
70972
|
+
return function push(chunkLength) {
|
70973
|
+
const now = Date.now();
|
70974
|
+
const startedAt = timestamps[tail];
|
70975
|
+
if (!firstSampleTS) {
|
70976
|
+
firstSampleTS = now;
|
70977
|
+
}
|
70978
|
+
bytes[head] = chunkLength;
|
70979
|
+
timestamps[head] = now;
|
70980
|
+
let i = tail;
|
70981
|
+
let bytesCount = 0;
|
70982
|
+
while (i !== head) {
|
70983
|
+
bytesCount += bytes[i++];
|
70984
|
+
i = i % samplesCount;
|
70985
|
+
}
|
70986
|
+
head = (head + 1) % samplesCount;
|
70987
|
+
if (head === tail) {
|
70988
|
+
tail = (tail + 1) % samplesCount;
|
70989
|
+
}
|
70990
|
+
if (now - firstSampleTS < min) {
|
70991
|
+
return;
|
70992
|
+
}
|
70993
|
+
const passed = startedAt && now - startedAt;
|
70994
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
70995
|
+
};
|
70996
|
+
}
|
70997
|
+
var speedometer_default = speedometer;
|
70998
|
+
|
70999
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/throttle.js
|
71000
|
+
function throttle(fn, freq) {
|
71001
|
+
let timestamp = 0;
|
71002
|
+
let threshold = 1e3 / freq;
|
71003
|
+
let lastArgs;
|
71004
|
+
let timer;
|
71005
|
+
const invoke = (args, now = Date.now()) => {
|
71006
|
+
timestamp = now;
|
71007
|
+
lastArgs = null;
|
71008
|
+
if (timer) {
|
71009
|
+
clearTimeout(timer);
|
71010
|
+
timer = null;
|
71011
|
+
}
|
71012
|
+
fn.apply(null, args);
|
71013
|
+
};
|
71014
|
+
const throttled = (...args) => {
|
71015
|
+
const now = Date.now();
|
71016
|
+
const passed = now - timestamp;
|
71017
|
+
if (passed >= threshold) {
|
71018
|
+
invoke(args, now);
|
71019
|
+
} else {
|
71020
|
+
lastArgs = args;
|
71021
|
+
if (!timer) {
|
71022
|
+
timer = setTimeout(() => {
|
71023
|
+
timer = null;
|
71024
|
+
invoke(lastArgs);
|
71025
|
+
}, threshold - passed);
|
71026
|
+
}
|
71027
|
+
}
|
71028
|
+
};
|
71029
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
71030
|
+
return [throttled, flush];
|
71031
|
+
}
|
71032
|
+
var throttle_default = throttle;
|
71033
|
+
|
71034
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/progressEventReducer.js
|
71035
|
+
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
71036
|
+
let bytesNotified = 0;
|
71037
|
+
const _speedometer = speedometer_default(50, 250);
|
71038
|
+
return throttle_default((e) => {
|
71039
|
+
const loaded = e.loaded;
|
71040
|
+
const total = e.lengthComputable ? e.total : void 0;
|
71041
|
+
const progressBytes = loaded - bytesNotified;
|
71042
|
+
const rate = _speedometer(progressBytes);
|
71043
|
+
const inRange = loaded <= total;
|
71044
|
+
bytesNotified = loaded;
|
71045
|
+
const data = {
|
71046
|
+
loaded,
|
71047
|
+
total,
|
71048
|
+
progress: total ? loaded / total : void 0,
|
71049
|
+
bytes: progressBytes,
|
71050
|
+
rate: rate ? rate : void 0,
|
71051
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
71052
|
+
event: e,
|
71053
|
+
lengthComputable: total != null,
|
71054
|
+
[isDownloadStream ? "download" : "upload"]: true
|
71055
|
+
};
|
71056
|
+
listener(data);
|
71057
|
+
}, freq);
|
71058
|
+
};
|
71059
|
+
var progressEventDecorator = (total, throttled) => {
|
71060
|
+
const lengthComputable = total != null;
|
71061
|
+
return [(loaded) => throttled[0]({
|
71062
|
+
lengthComputable,
|
71063
|
+
total,
|
71064
|
+
loaded
|
71065
|
+
}), throttled[1]];
|
71066
|
+
};
|
71067
|
+
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
71068
|
+
|
71069
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
|
70999
71070
|
var zlibOptions = {
|
71000
71071
|
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
71001
71072
|
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
@@ -71010,6 +71081,10 @@ var isHttps = /https:?/;
|
|
71010
71081
|
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
71011
71082
|
return protocol + ":";
|
71012
71083
|
});
|
71084
|
+
var flushOnFinish = (stream4, [throttled, flush]) => {
|
71085
|
+
stream4.on("end", flush).on("error", flush);
|
71086
|
+
return throttled;
|
71087
|
+
};
|
71013
71088
|
function dispatchBeforeRedirect(options, responseDetails) {
|
71014
71089
|
if (options.beforeRedirects.proxy) {
|
71015
71090
|
options.beforeRedirects.proxy(options);
|
@@ -71103,7 +71178,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71103
71178
|
});
|
71104
71179
|
};
|
71105
71180
|
}
|
71106
|
-
const emitter = new import_events2.
|
71181
|
+
const emitter = new import_events2.EventEmitter();
|
71107
71182
|
const onFinished = () => {
|
71108
71183
|
if (config.cancelToken) {
|
71109
71184
|
config.cancelToken.unsubscribe(abort);
|
@@ -71131,7 +71206,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71131
71206
|
}
|
71132
71207
|
}
|
71133
71208
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
71134
|
-
const parsed = new URL(fullPath,
|
71209
|
+
const parsed = new URL(fullPath, utils_default.hasBrowserEnv ? platform_default.origin : void 0);
|
71135
71210
|
const protocol = parsed.protocol || supportedProtocols[0];
|
71136
71211
|
if (protocol === "data:") {
|
71137
71212
|
let convertedData;
|
@@ -71175,8 +71250,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71175
71250
|
}
|
71176
71251
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
71177
71252
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
71178
|
-
const onDownloadProgress = config
|
71179
|
-
const onUploadProgress = config.onUploadProgress;
|
71253
|
+
const { onUploadProgress, onDownloadProgress } = config;
|
71180
71254
|
const maxRate = config.maxRate;
|
71181
71255
|
let maxUploadRate = void 0;
|
71182
71256
|
let maxDownloadRate = void 0;
|
@@ -71235,14 +71309,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71235
71309
|
data = import_stream4.default.Readable.from(data, { objectMode: false });
|
71236
71310
|
}
|
71237
71311
|
data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
|
71238
|
-
length: contentLength,
|
71239
71312
|
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
71240
71313
|
})], utils_default.noop);
|
71241
|
-
onUploadProgress && data.on("progress", (
|
71242
|
-
|
71243
|
-
|
71244
|
-
|
71245
|
-
|
71314
|
+
onUploadProgress && data.on("progress", flushOnFinish(
|
71315
|
+
data,
|
71316
|
+
progressEventDecorator(
|
71317
|
+
contentLength,
|
71318
|
+
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
71319
|
+
)
|
71320
|
+
));
|
71246
71321
|
}
|
71247
71322
|
let auth = void 0;
|
71248
71323
|
if (config.auth) {
|
@@ -71323,16 +71398,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71323
71398
|
return;
|
71324
71399
|
const streams = [res];
|
71325
71400
|
const responseLength = +res.headers["content-length"];
|
71326
|
-
if (onDownloadProgress) {
|
71401
|
+
if (onDownloadProgress || maxDownloadRate) {
|
71327
71402
|
const transformStream = new AxiosTransformStream_default({
|
71328
|
-
length: utils_default.toFiniteNumber(responseLength),
|
71329
71403
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
71330
71404
|
});
|
71331
|
-
onDownloadProgress && transformStream.on("progress", (
|
71332
|
-
|
71333
|
-
|
71334
|
-
|
71335
|
-
|
71405
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(
|
71406
|
+
transformStream,
|
71407
|
+
progressEventDecorator(
|
71408
|
+
responseLength,
|
71409
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
71410
|
+
)
|
71411
|
+
));
|
71336
71412
|
streams.push(transformStream);
|
71337
71413
|
}
|
71338
71414
|
let responseStream = res;
|
@@ -71494,40 +71570,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
71494
71570
|
});
|
71495
71571
|
};
|
71496
71572
|
|
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
|
71573
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
71531
71574
|
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
|
71532
71575
|
// Standard browser envs have full support of the APIs needed to test
|
71533
71576
|
// whether the request URL is of the same origin as current location.
|
@@ -71568,63 +71611,172 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
|
|
71568
71611
|
}()
|
71569
71612
|
);
|
71570
71613
|
|
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
|
-
|
71614
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/cookies.js
|
71615
|
+
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
71616
|
+
// Standard browser envs support document.cookie
|
71617
|
+
{
|
71618
|
+
write(name, value, expires, path17, domain, secure) {
|
71619
|
+
const cookie = [name + "=" + encodeURIComponent(value)];
|
71620
|
+
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
71621
|
+
utils_default.isString(path17) && cookie.push("path=" + path17);
|
71622
|
+
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
71623
|
+
secure === true && cookie.push("secure");
|
71624
|
+
document.cookie = cookie.join("; ");
|
71625
|
+
},
|
71626
|
+
read(name) {
|
71627
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
71628
|
+
return match ? decodeURIComponent(match[3]) : null;
|
71629
|
+
},
|
71630
|
+
remove(name) {
|
71631
|
+
this.write(name, "", Date.now() - 864e5);
|
71632
|
+
}
|
71633
|
+
}
|
71634
|
+
) : (
|
71635
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
71636
|
+
{
|
71637
|
+
write() {
|
71638
|
+
},
|
71639
|
+
read() {
|
71640
|
+
return null;
|
71641
|
+
},
|
71642
|
+
remove() {
|
71643
|
+
}
|
71644
|
+
}
|
71645
|
+
);
|
71646
|
+
|
71647
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/mergeConfig.js
|
71648
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
71649
|
+
function mergeConfig(config1, config2) {
|
71650
|
+
config2 = config2 || {};
|
71651
|
+
const config = {};
|
71652
|
+
function getMergedValue(target, source, caseless) {
|
71653
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
71654
|
+
return utils_default.merge.call({ caseless }, target, source);
|
71655
|
+
} else if (utils_default.isPlainObject(source)) {
|
71656
|
+
return utils_default.merge({}, source);
|
71657
|
+
} else if (utils_default.isArray(source)) {
|
71658
|
+
return source.slice();
|
71659
|
+
}
|
71660
|
+
return source;
|
71661
|
+
}
|
71662
|
+
function mergeDeepProperties(a, b, caseless) {
|
71663
|
+
if (!utils_default.isUndefined(b)) {
|
71664
|
+
return getMergedValue(a, b, caseless);
|
71665
|
+
} else if (!utils_default.isUndefined(a)) {
|
71666
|
+
return getMergedValue(void 0, a, caseless);
|
71667
|
+
}
|
71668
|
+
}
|
71669
|
+
function valueFromConfig2(a, b) {
|
71670
|
+
if (!utils_default.isUndefined(b)) {
|
71671
|
+
return getMergedValue(void 0, b);
|
71672
|
+
}
|
71673
|
+
}
|
71674
|
+
function defaultToConfig2(a, b) {
|
71675
|
+
if (!utils_default.isUndefined(b)) {
|
71676
|
+
return getMergedValue(void 0, b);
|
71677
|
+
} else if (!utils_default.isUndefined(a)) {
|
71678
|
+
return getMergedValue(void 0, a);
|
71679
|
+
}
|
71680
|
+
}
|
71681
|
+
function mergeDirectKeys(a, b, prop) {
|
71682
|
+
if (prop in config2) {
|
71683
|
+
return getMergedValue(a, b);
|
71684
|
+
} else if (prop in config1) {
|
71685
|
+
return getMergedValue(void 0, a);
|
71686
|
+
}
|
71687
|
+
}
|
71688
|
+
const mergeMap = {
|
71689
|
+
url: valueFromConfig2,
|
71690
|
+
method: valueFromConfig2,
|
71691
|
+
data: valueFromConfig2,
|
71692
|
+
baseURL: defaultToConfig2,
|
71693
|
+
transformRequest: defaultToConfig2,
|
71694
|
+
transformResponse: defaultToConfig2,
|
71695
|
+
paramsSerializer: defaultToConfig2,
|
71696
|
+
timeout: defaultToConfig2,
|
71697
|
+
timeoutMessage: defaultToConfig2,
|
71698
|
+
withCredentials: defaultToConfig2,
|
71699
|
+
withXSRFToken: defaultToConfig2,
|
71700
|
+
adapter: defaultToConfig2,
|
71701
|
+
responseType: defaultToConfig2,
|
71702
|
+
xsrfCookieName: defaultToConfig2,
|
71703
|
+
xsrfHeaderName: defaultToConfig2,
|
71704
|
+
onUploadProgress: defaultToConfig2,
|
71705
|
+
onDownloadProgress: defaultToConfig2,
|
71706
|
+
decompress: defaultToConfig2,
|
71707
|
+
maxContentLength: defaultToConfig2,
|
71708
|
+
maxBodyLength: defaultToConfig2,
|
71709
|
+
beforeRedirect: defaultToConfig2,
|
71710
|
+
transport: defaultToConfig2,
|
71711
|
+
httpAgent: defaultToConfig2,
|
71712
|
+
httpsAgent: defaultToConfig2,
|
71713
|
+
cancelToken: defaultToConfig2,
|
71714
|
+
socketPath: defaultToConfig2,
|
71715
|
+
responseEncoding: defaultToConfig2,
|
71716
|
+
validateStatus: mergeDirectKeys,
|
71717
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
71593
71718
|
};
|
71719
|
+
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
71720
|
+
const merge9 = mergeMap[prop] || mergeDeepProperties;
|
71721
|
+
const configValue = merge9(config1[prop], config2[prop], prop);
|
71722
|
+
utils_default.isUndefined(configValue) && merge9 !== mergeDirectKeys || (config[prop] = configValue);
|
71723
|
+
});
|
71724
|
+
return config;
|
71594
71725
|
}
|
71726
|
+
|
71727
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/resolveConfig.js
|
71728
|
+
var resolveConfig_default = (config) => {
|
71729
|
+
const newConfig = mergeConfig({}, config);
|
71730
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
71731
|
+
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
71732
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
71733
|
+
if (auth) {
|
71734
|
+
headers.set(
|
71735
|
+
"Authorization",
|
71736
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
71737
|
+
);
|
71738
|
+
}
|
71739
|
+
let contentType;
|
71740
|
+
if (utils_default.isFormData(data)) {
|
71741
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
71742
|
+
headers.setContentType(void 0);
|
71743
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
71744
|
+
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
71745
|
+
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
71746
|
+
}
|
71747
|
+
}
|
71748
|
+
if (platform_default.hasStandardBrowserEnv) {
|
71749
|
+
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
71750
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
71751
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
71752
|
+
if (xsrfValue) {
|
71753
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
71754
|
+
}
|
71755
|
+
}
|
71756
|
+
}
|
71757
|
+
return newConfig;
|
71758
|
+
};
|
71759
|
+
|
71760
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/xhr.js
|
71595
71761
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
71596
71762
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
71597
71763
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
71598
|
-
|
71599
|
-
|
71600
|
-
|
71764
|
+
const _config = resolveConfig_default(config);
|
71765
|
+
let requestData = _config.data;
|
71766
|
+
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
71767
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
71601
71768
|
let onCanceled;
|
71769
|
+
let uploadThrottled, downloadThrottled;
|
71770
|
+
let flushUpload, flushDownload;
|
71602
71771
|
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
|
-
}
|
71772
|
+
flushUpload && flushUpload();
|
71773
|
+
flushDownload && flushDownload();
|
71774
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
71775
|
+
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
71618
71776
|
}
|
71619
71777
|
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;
|
71778
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
71779
|
+
request.timeout = _config.timeout;
|
71628
71780
|
function onloadend() {
|
71629
71781
|
if (!request) {
|
71630
71782
|
return;
|
@@ -71675,10 +71827,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71675
71827
|
request = null;
|
71676
71828
|
};
|
71677
71829
|
request.ontimeout = function handleTimeout() {
|
71678
|
-
let timeoutErrorMessage =
|
71679
|
-
const transitional2 =
|
71680
|
-
if (
|
71681
|
-
timeoutErrorMessage =
|
71830
|
+
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
71831
|
+
const transitional2 = _config.transitional || transitional_default;
|
71832
|
+
if (_config.timeoutErrorMessage) {
|
71833
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
71682
71834
|
}
|
71683
71835
|
reject(new AxiosError_default(
|
71684
71836
|
timeoutErrorMessage,
|
@@ -71688,34 +71840,28 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71688
71840
|
));
|
71689
71841
|
request = null;
|
71690
71842
|
};
|
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
71843
|
requestData === void 0 && requestHeaders.setContentType(null);
|
71701
71844
|
if ("setRequestHeader" in request) {
|
71702
71845
|
utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
71703
71846
|
request.setRequestHeader(key, val);
|
71704
71847
|
});
|
71705
71848
|
}
|
71706
|
-
if (!utils_default.isUndefined(
|
71707
|
-
request.withCredentials = !!
|
71849
|
+
if (!utils_default.isUndefined(_config.withCredentials)) {
|
71850
|
+
request.withCredentials = !!_config.withCredentials;
|
71708
71851
|
}
|
71709
71852
|
if (responseType && responseType !== "json") {
|
71710
|
-
request.responseType =
|
71853
|
+
request.responseType = _config.responseType;
|
71711
71854
|
}
|
71712
|
-
if (
|
71713
|
-
|
71855
|
+
if (onDownloadProgress) {
|
71856
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
71857
|
+
request.addEventListener("progress", downloadThrottled);
|
71714
71858
|
}
|
71715
|
-
if (
|
71716
|
-
|
71859
|
+
if (onUploadProgress && request.upload) {
|
71860
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
71861
|
+
request.upload.addEventListener("progress", uploadThrottled);
|
71862
|
+
request.upload.addEventListener("loadend", flushUpload);
|
71717
71863
|
}
|
71718
|
-
if (
|
71864
|
+
if (_config.cancelToken || _config.signal) {
|
71719
71865
|
onCanceled = (cancel) => {
|
71720
71866
|
if (!request) {
|
71721
71867
|
return;
|
@@ -71724,12 +71870,12 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71724
71870
|
request.abort();
|
71725
71871
|
request = null;
|
71726
71872
|
};
|
71727
|
-
|
71728
|
-
if (
|
71729
|
-
|
71873
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
71874
|
+
if (_config.signal) {
|
71875
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
71730
71876
|
}
|
71731
71877
|
}
|
71732
|
-
const protocol = parseProtocol(
|
71878
|
+
const protocol = parseProtocol(_config.url);
|
71733
71879
|
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
71734
71880
|
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
71735
71881
|
return;
|
@@ -71738,10 +71884,268 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
71738
71884
|
});
|
71739
71885
|
};
|
71740
71886
|
|
71741
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
71887
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/composeSignals.js
|
71888
|
+
var composeSignals = (signals, timeout) => {
|
71889
|
+
let controller = new AbortController();
|
71890
|
+
let aborted;
|
71891
|
+
const onabort = function(cancel) {
|
71892
|
+
if (!aborted) {
|
71893
|
+
aborted = true;
|
71894
|
+
unsubscribe();
|
71895
|
+
const err = cancel instanceof Error ? cancel : this.reason;
|
71896
|
+
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
71897
|
+
}
|
71898
|
+
};
|
71899
|
+
let timer = timeout && setTimeout(() => {
|
71900
|
+
onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
|
71901
|
+
}, timeout);
|
71902
|
+
const unsubscribe = () => {
|
71903
|
+
if (signals) {
|
71904
|
+
timer && clearTimeout(timer);
|
71905
|
+
timer = null;
|
71906
|
+
signals.forEach((signal2) => {
|
71907
|
+
signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort));
|
71908
|
+
});
|
71909
|
+
signals = null;
|
71910
|
+
}
|
71911
|
+
};
|
71912
|
+
signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort));
|
71913
|
+
const { signal } = controller;
|
71914
|
+
signal.unsubscribe = unsubscribe;
|
71915
|
+
return [signal, () => {
|
71916
|
+
timer && clearTimeout(timer);
|
71917
|
+
timer = null;
|
71918
|
+
}];
|
71919
|
+
};
|
71920
|
+
var composeSignals_default = composeSignals;
|
71921
|
+
|
71922
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/trackStream.js
|
71923
|
+
var streamChunk = function* (chunk, chunkSize) {
|
71924
|
+
let len = chunk.byteLength;
|
71925
|
+
if (!chunkSize || len < chunkSize) {
|
71926
|
+
yield chunk;
|
71927
|
+
return;
|
71928
|
+
}
|
71929
|
+
let pos = 0;
|
71930
|
+
let end;
|
71931
|
+
while (pos < len) {
|
71932
|
+
end = pos + chunkSize;
|
71933
|
+
yield chunk.slice(pos, end);
|
71934
|
+
pos = end;
|
71935
|
+
}
|
71936
|
+
};
|
71937
|
+
var readBytes = async function* (iterable, chunkSize, encode3) {
|
71938
|
+
for await (const chunk of iterable) {
|
71939
|
+
yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize);
|
71940
|
+
}
|
71941
|
+
};
|
71942
|
+
var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => {
|
71943
|
+
const iterator = readBytes(stream4, chunkSize, encode3);
|
71944
|
+
let bytes = 0;
|
71945
|
+
let done;
|
71946
|
+
let _onFinish = (e) => {
|
71947
|
+
if (!done) {
|
71948
|
+
done = true;
|
71949
|
+
onFinish && onFinish(e);
|
71950
|
+
}
|
71951
|
+
};
|
71952
|
+
return new ReadableStream({
|
71953
|
+
async pull(controller) {
|
71954
|
+
try {
|
71955
|
+
const { done: done2, value } = await iterator.next();
|
71956
|
+
if (done2) {
|
71957
|
+
_onFinish();
|
71958
|
+
controller.close();
|
71959
|
+
return;
|
71960
|
+
}
|
71961
|
+
let len = value.byteLength;
|
71962
|
+
if (onProgress) {
|
71963
|
+
let loadedBytes = bytes += len;
|
71964
|
+
onProgress(loadedBytes);
|
71965
|
+
}
|
71966
|
+
controller.enqueue(new Uint8Array(value));
|
71967
|
+
} catch (err) {
|
71968
|
+
_onFinish(err);
|
71969
|
+
throw err;
|
71970
|
+
}
|
71971
|
+
},
|
71972
|
+
cancel(reason) {
|
71973
|
+
_onFinish(reason);
|
71974
|
+
return iterator.return();
|
71975
|
+
}
|
71976
|
+
}, {
|
71977
|
+
highWaterMark: 2
|
71978
|
+
});
|
71979
|
+
};
|
71980
|
+
|
71981
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/fetch.js
|
71982
|
+
var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
71983
|
+
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
71984
|
+
var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
71985
|
+
var test = (fn, ...args) => {
|
71986
|
+
try {
|
71987
|
+
return !!fn(...args);
|
71988
|
+
} catch (e) {
|
71989
|
+
return false;
|
71990
|
+
}
|
71991
|
+
};
|
71992
|
+
var supportsRequestStream = isReadableStreamSupported && test(() => {
|
71993
|
+
let duplexAccessed = false;
|
71994
|
+
const hasContentType = new Request(platform_default.origin, {
|
71995
|
+
body: new ReadableStream(),
|
71996
|
+
method: "POST",
|
71997
|
+
get duplex() {
|
71998
|
+
duplexAccessed = true;
|
71999
|
+
return "half";
|
72000
|
+
}
|
72001
|
+
}).headers.has("Content-Type");
|
72002
|
+
return duplexAccessed && !hasContentType;
|
72003
|
+
});
|
72004
|
+
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
72005
|
+
var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
72006
|
+
var resolvers = {
|
72007
|
+
stream: supportsResponseStream && ((res) => res.body)
|
72008
|
+
};
|
72009
|
+
isFetchSupported && ((res) => {
|
72010
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
72011
|
+
!resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
72012
|
+
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
|
72013
|
+
});
|
72014
|
+
});
|
72015
|
+
})(new Response());
|
72016
|
+
var getBodyLength = async (body) => {
|
72017
|
+
if (body == null) {
|
72018
|
+
return 0;
|
72019
|
+
}
|
72020
|
+
if (utils_default.isBlob(body)) {
|
72021
|
+
return body.size;
|
72022
|
+
}
|
72023
|
+
if (utils_default.isSpecCompliantForm(body)) {
|
72024
|
+
return (await new Request(body).arrayBuffer()).byteLength;
|
72025
|
+
}
|
72026
|
+
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
72027
|
+
return body.byteLength;
|
72028
|
+
}
|
72029
|
+
if (utils_default.isURLSearchParams(body)) {
|
72030
|
+
body = body + "";
|
72031
|
+
}
|
72032
|
+
if (utils_default.isString(body)) {
|
72033
|
+
return (await encodeText(body)).byteLength;
|
72034
|
+
}
|
72035
|
+
};
|
72036
|
+
var resolveBodyLength = async (headers, body) => {
|
72037
|
+
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
72038
|
+
return length == null ? getBodyLength(body) : length;
|
72039
|
+
};
|
72040
|
+
var fetch_default = isFetchSupported && (async (config) => {
|
72041
|
+
let {
|
72042
|
+
url: url2,
|
72043
|
+
method,
|
72044
|
+
data,
|
72045
|
+
signal,
|
72046
|
+
cancelToken,
|
72047
|
+
timeout,
|
72048
|
+
onDownloadProgress,
|
72049
|
+
onUploadProgress,
|
72050
|
+
responseType,
|
72051
|
+
headers,
|
72052
|
+
withCredentials = "same-origin",
|
72053
|
+
fetchOptions
|
72054
|
+
} = resolveConfig_default(config);
|
72055
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
72056
|
+
let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : [];
|
72057
|
+
let finished, request;
|
72058
|
+
const onFinish = () => {
|
72059
|
+
!finished && setTimeout(() => {
|
72060
|
+
composedSignal && composedSignal.unsubscribe();
|
72061
|
+
});
|
72062
|
+
finished = true;
|
72063
|
+
};
|
72064
|
+
let requestContentLength;
|
72065
|
+
try {
|
72066
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
72067
|
+
let _request = new Request(url2, {
|
72068
|
+
method: "POST",
|
72069
|
+
body: data,
|
72070
|
+
duplex: "half"
|
72071
|
+
});
|
72072
|
+
let contentTypeHeader;
|
72073
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
72074
|
+
headers.setContentType(contentTypeHeader);
|
72075
|
+
}
|
72076
|
+
if (_request.body) {
|
72077
|
+
const [onProgress, flush] = progressEventDecorator(
|
72078
|
+
requestContentLength,
|
72079
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
72080
|
+
);
|
72081
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
72082
|
+
}
|
72083
|
+
}
|
72084
|
+
if (!utils_default.isString(withCredentials)) {
|
72085
|
+
withCredentials = withCredentials ? "include" : "omit";
|
72086
|
+
}
|
72087
|
+
request = new Request(url2, {
|
72088
|
+
...fetchOptions,
|
72089
|
+
signal: composedSignal,
|
72090
|
+
method: method.toUpperCase(),
|
72091
|
+
headers: headers.normalize().toJSON(),
|
72092
|
+
body: data,
|
72093
|
+
duplex: "half",
|
72094
|
+
credentials: withCredentials
|
72095
|
+
});
|
72096
|
+
let response = await fetch(request);
|
72097
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
72098
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
|
72099
|
+
const options = {};
|
72100
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
72101
|
+
options[prop] = response[prop];
|
72102
|
+
});
|
72103
|
+
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
72104
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
72105
|
+
responseContentLength,
|
72106
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
72107
|
+
) || [];
|
72108
|
+
response = new Response(
|
72109
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
72110
|
+
flush && flush();
|
72111
|
+
isStreamResponse && onFinish();
|
72112
|
+
}, encodeText),
|
72113
|
+
options
|
72114
|
+
);
|
72115
|
+
}
|
72116
|
+
responseType = responseType || "text";
|
72117
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
|
72118
|
+
!isStreamResponse && onFinish();
|
72119
|
+
stopTimeout && stopTimeout();
|
72120
|
+
return await new Promise((resolve, reject) => {
|
72121
|
+
settle(resolve, reject, {
|
72122
|
+
data: responseData,
|
72123
|
+
headers: AxiosHeaders_default.from(response.headers),
|
72124
|
+
status: response.status,
|
72125
|
+
statusText: response.statusText,
|
72126
|
+
config,
|
72127
|
+
request
|
72128
|
+
});
|
72129
|
+
});
|
72130
|
+
} catch (err) {
|
72131
|
+
onFinish();
|
72132
|
+
if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
|
72133
|
+
throw Object.assign(
|
72134
|
+
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
|
72135
|
+
{
|
72136
|
+
cause: err.cause || err
|
72137
|
+
}
|
72138
|
+
);
|
72139
|
+
}
|
72140
|
+
throw AxiosError_default.from(err, err && err.code, config, request);
|
72141
|
+
}
|
72142
|
+
});
|
72143
|
+
|
72144
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/adapters.js
|
71742
72145
|
var knownAdapters = {
|
71743
72146
|
http: http_default,
|
71744
|
-
xhr: xhr_default
|
72147
|
+
xhr: xhr_default,
|
72148
|
+
fetch: fetch_default
|
71745
72149
|
};
|
71746
72150
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
71747
72151
|
if (fn) {
|
@@ -71791,7 +72195,7 @@ var adapters_default = {
|
|
71791
72195
|
adapters: knownAdapters
|
71792
72196
|
};
|
71793
72197
|
|
71794
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72198
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/dispatchRequest.js
|
71795
72199
|
function throwIfCancellationRequested(config) {
|
71796
72200
|
if (config.cancelToken) {
|
71797
72201
|
config.cancelToken.throwIfRequested();
|
@@ -71836,87 +72240,7 @@ function dispatchRequest(config) {
|
|
71836
72240
|
});
|
71837
72241
|
}
|
71838
72242
|
|
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
|
72243
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/validator.js
|
71920
72244
|
var validators = {};
|
71921
72245
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
71922
72246
|
validators[type] = function validator(thing) {
|
@@ -71974,7 +72298,7 @@ var validator_default = {
|
|
71974
72298
|
validators
|
71975
72299
|
};
|
71976
72300
|
|
71977
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72301
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/Axios.js
|
71978
72302
|
var validators2 = validator_default.validators;
|
71979
72303
|
var Axios = class {
|
71980
72304
|
constructor(instanceConfig) {
|
@@ -72000,10 +72324,13 @@ var Axios = class {
|
|
72000
72324
|
let dummy;
|
72001
72325
|
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
|
72002
72326
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
72003
|
-
|
72004
|
-
err.stack
|
72005
|
-
|
72006
|
-
err.stack
|
72327
|
+
try {
|
72328
|
+
if (!err.stack) {
|
72329
|
+
err.stack = stack;
|
72330
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
72331
|
+
err.stack += "\n" + stack;
|
72332
|
+
}
|
72333
|
+
} catch (e) {
|
72007
72334
|
}
|
72008
72335
|
}
|
72009
72336
|
throw err;
|
@@ -72134,7 +72461,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
|
|
72134
72461
|
});
|
72135
72462
|
var Axios_default = Axios;
|
72136
72463
|
|
72137
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72464
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/CancelToken.js
|
72138
72465
|
var CancelToken = class _CancelToken {
|
72139
72466
|
constructor(executor) {
|
72140
72467
|
if (typeof executor !== "function") {
|
@@ -72224,19 +72551,19 @@ var CancelToken = class _CancelToken {
|
|
72224
72551
|
};
|
72225
72552
|
var CancelToken_default = CancelToken;
|
72226
72553
|
|
72227
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72554
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/spread.js
|
72228
72555
|
function spread(callback) {
|
72229
72556
|
return function wrap(arr) {
|
72230
72557
|
return callback.apply(null, arr);
|
72231
72558
|
};
|
72232
72559
|
}
|
72233
72560
|
|
72234
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72561
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isAxiosError.js
|
72235
72562
|
function isAxiosError(payload) {
|
72236
72563
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
72237
72564
|
}
|
72238
72565
|
|
72239
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72566
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/HttpStatusCode.js
|
72240
72567
|
var HttpStatusCode = {
|
72241
72568
|
Continue: 100,
|
72242
72569
|
SwitchingProtocols: 101,
|
@@ -72307,7 +72634,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
72307
72634
|
});
|
72308
72635
|
var HttpStatusCode_default = HttpStatusCode;
|
72309
72636
|
|
72310
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72637
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/axios.js
|
72311
72638
|
function createInstance(defaultConfig) {
|
72312
72639
|
const context = new Axios_default(defaultConfig);
|
72313
72640
|
const instance = bind(Axios_default.prototype.request, context);
|
@@ -72340,7 +72667,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
|
|
72340
72667
|
axios.default = axios;
|
72341
72668
|
var axios_default = axios;
|
72342
72669
|
|
72343
|
-
// ../../../../node_modules/.pnpm/axios@1.
|
72670
|
+
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/index.js
|
72344
72671
|
var {
|
72345
72672
|
Axios: Axios2,
|
72346
72673
|
AxiosError: AxiosError2,
|
@@ -72360,11 +72687,11 @@ var {
|
|
72360
72687
|
mergeConfig: mergeConfig2
|
72361
72688
|
} = axios_default;
|
72362
72689
|
|
72363
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72690
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
72364
72691
|
var import_tar = __toESM(require_tar());
|
72365
72692
|
|
72366
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72367
|
-
var
|
72693
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
72694
|
+
var import_utils34 = require("@modern-js/utils");
|
72368
72695
|
async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
72369
72696
|
const { registryUrl } = options || {};
|
72370
72697
|
const params = [
|
@@ -72377,7 +72704,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
72377
72704
|
params.push("--registry");
|
72378
72705
|
params.push(registryUrl);
|
72379
72706
|
}
|
72380
|
-
const getPkgInfoPromise = (0,
|
72707
|
+
const getPkgInfoPromise = (0, import_utils34.execa)("npm", params);
|
72381
72708
|
const { stdout } = await timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm tarball of '${pkgName}'`);
|
72382
72709
|
try {
|
72383
72710
|
const pkgDistInfo = JSON.parse(stdout);
|
@@ -72387,8 +72714,8 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
72387
72714
|
}
|
72388
72715
|
}
|
72389
72716
|
|
72390
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72391
|
-
var
|
72717
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
72718
|
+
var import_utils35 = require("@modern-js/utils");
|
72392
72719
|
async function getNpmVersion(packageName, options) {
|
72393
72720
|
const { version, registryUrl } = options || {};
|
72394
72721
|
const params = [
|
@@ -72404,15 +72731,15 @@ async function getNpmVersion(packageName, options) {
|
|
72404
72731
|
params.push("--registry");
|
72405
72732
|
params.push(registryUrl);
|
72406
72733
|
}
|
72407
|
-
const getPkgInfoPromise = (0,
|
72734
|
+
const getPkgInfoPromise = (0, import_utils35.execa)("npm", params);
|
72408
72735
|
const { stdout } = await timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm version of '${packageName}'`);
|
72409
72736
|
return stdout;
|
72410
72737
|
}
|
72411
72738
|
|
72412
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72739
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
72413
72740
|
async function isValidCache(cacheDir) {
|
72414
72741
|
if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
|
72415
|
-
const preCacheTimeStr = await
|
72742
|
+
const preCacheTimeStr = await import_utils36.fs.readFile(`${cacheDir}/.codesmith.completed`, {
|
72416
72743
|
encoding: "utf-8"
|
72417
72744
|
});
|
72418
72745
|
const preCacheTime = preCacheTimeStr ? new Date(preCacheTimeStr) : /* @__PURE__ */ new Date(0);
|
@@ -72435,7 +72762,7 @@ async function downloadAndDecompressTargz(tarballPkg, targetDir) {
|
|
72435
72762
|
}
|
72436
72763
|
const randomId = Math.floor(Math.random() * 1e4);
|
72437
72764
|
const tempTgzFilePath = `${import_os.default.tmpdir()}/temp-${randomId}.tgz`;
|
72438
|
-
const dest =
|
72765
|
+
const dest = import_utils36.fs.createWriteStream(tempTgzFilePath);
|
72439
72766
|
await new Promise((resolve, reject) => {
|
72440
72767
|
response.data.pipe(dest);
|
72441
72768
|
response.data.on("error", (err) => {
|
@@ -72446,7 +72773,7 @@ async function downloadAndDecompressTargz(tarballPkg, targetDir) {
|
|
72446
72773
|
});
|
72447
72774
|
});
|
72448
72775
|
await new Promise((resolve, reject) => {
|
72449
|
-
|
72776
|
+
import_utils36.fs.createReadStream(tempTgzFilePath).pipe(import_tar.default.x({
|
72450
72777
|
strip: 1,
|
72451
72778
|
C: `${targetDir}`
|
72452
72779
|
})).on("finish", () => {
|
@@ -72460,7 +72787,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72460
72787
|
var _logger_debug;
|
72461
72788
|
const { registryUrl, install, logger: logger2 } = options;
|
72462
72789
|
let version;
|
72463
|
-
if (!
|
72790
|
+
if (!import_utils36.semver.valid(pkgVersion)) {
|
72464
72791
|
version = await getNpmVersion(pkgName, {
|
72465
72792
|
registryUrl,
|
72466
72793
|
version: pkgVersion
|
@@ -72476,8 +72803,8 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72476
72803
|
if (await fsExists(targetDir) && await isValidCache(targetDir)) {
|
72477
72804
|
return targetDir;
|
72478
72805
|
}
|
72479
|
-
await
|
72480
|
-
await
|
72806
|
+
await import_utils36.fs.remove(targetDir);
|
72807
|
+
await import_utils36.fs.mkdirp(targetDir);
|
72481
72808
|
const tarballPkg = await getNpmTarballUrl(pkgName, version, {
|
72482
72809
|
registryUrl
|
72483
72810
|
});
|
@@ -72485,14 +72812,14 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72485
72812
|
if (install) {
|
72486
72813
|
await runInstall(targetDir, registryUrl, logger2);
|
72487
72814
|
}
|
72488
|
-
await
|
72815
|
+
await import_utils36.fs.writeFile(`${targetDir}/.codesmith.completed`, (/* @__PURE__ */ new Date()).toISOString(), {
|
72489
72816
|
encoding: "utf-8"
|
72490
72817
|
});
|
72491
72818
|
return targetDir;
|
72492
72819
|
}
|
72493
72820
|
|
72494
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72495
|
-
var
|
72821
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
72822
|
+
var import_utils37 = require("@modern-js/utils");
|
72496
72823
|
function getPackageInfo(packageName) {
|
72497
72824
|
if (!packageName) {
|
72498
72825
|
throw new Error("package is not exisit");
|
@@ -72501,7 +72828,7 @@ function getPackageInfo(packageName) {
|
|
72501
72828
|
let pkgVersion = "latest";
|
72502
72829
|
let pkgName = packageName;
|
72503
72830
|
if (!packageName.startsWith("@") && splitAt.length === 2 || packageName.startsWith("@") && splitAt.length === 3) {
|
72504
|
-
const semverValid =
|
72831
|
+
const semverValid = import_utils37.semver.valid(splitAt[splitAt.length - 1]);
|
72505
72832
|
if (semverValid === null) {
|
72506
72833
|
pkgVersion = splitAt[splitAt.length - 1];
|
72507
72834
|
pkgName = packageName.slice(0, packageName.lastIndexOf("@"));
|
@@ -72516,7 +72843,7 @@ function getPackageInfo(packageName) {
|
|
72516
72843
|
};
|
72517
72844
|
}
|
72518
72845
|
|
72519
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72846
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
72520
72847
|
var MaterialsManager = class {
|
72521
72848
|
loadLocalGenerator(generator) {
|
72522
72849
|
if (!import_path6.default.isAbsolute(generator)) {
|
@@ -72544,7 +72871,7 @@ var MaterialsManager = class {
|
|
72544
72871
|
}
|
72545
72872
|
};
|
72546
72873
|
|
72547
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72874
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
72548
72875
|
var CodeSmith = class {
|
72549
72876
|
async forge({ tasks, pwd }) {
|
72550
72877
|
var _this_logger_timing, _this_logger;
|
@@ -72585,13 +72912,13 @@ var CodeSmith = class {
|
|
72585
72912
|
}
|
72586
72913
|
};
|
72587
72914
|
|
72588
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
72915
|
+
// ../../../../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
72916
|
var import_ejs = __toESM(require_ejs());
|
72590
72917
|
function renderString(template, fullData) {
|
72591
72918
|
return import_ejs.default.render(template, fullData) || "";
|
72592
72919
|
}
|
72593
72920
|
|
72594
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
72921
|
+
// ../../../../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
72922
|
var EjsAPI = class {
|
72596
72923
|
async renderTemplate(templateResource, target, parameters = {}) {
|
72597
72924
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -72623,17 +72950,17 @@ var EjsAPI = class {
|
|
72623
72950
|
}
|
72624
72951
|
};
|
72625
72952
|
|
72626
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
72953
|
+
// ../../../../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
72954
|
var import_path8 = __toESM(require("path"));
|
72628
|
-
var
|
72955
|
+
var import_utils40 = require("@modern-js/utils");
|
72629
72956
|
var FsAPI = class {
|
72630
72957
|
async renderFile(resource, target) {
|
72631
72958
|
if (resource._type !== FS_RESOURCE) {
|
72632
72959
|
throw new Error("resource not match");
|
72633
72960
|
}
|
72634
72961
|
const filePath = import_path8.default.resolve(this.generatorCore.outputPath, target.toString());
|
72635
|
-
await
|
72636
|
-
await
|
72962
|
+
await import_utils40.fs.mkdirp(import_path8.default.dirname(filePath));
|
72963
|
+
await import_utils40.fs.copyFile(resource.filePath, filePath);
|
72637
72964
|
}
|
72638
72965
|
async renderDir(material, findGlob, target, options) {
|
72639
72966
|
const resourceMap = await material.find(findGlob, {
|
@@ -72650,11 +72977,11 @@ var FsAPI = class {
|
|
72650
72977
|
}
|
72651
72978
|
};
|
72652
72979
|
|
72653
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
72654
|
-
var
|
72980
|
+
// ../../../../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
|
72981
|
+
var import_utils41 = require("@modern-js/utils");
|
72655
72982
|
async function canUseGit() {
|
72656
72983
|
try {
|
72657
|
-
await (0,
|
72984
|
+
await (0, import_utils41.execa)("git", [
|
72658
72985
|
"--version"
|
72659
72986
|
], {
|
72660
72987
|
env: process.env
|
@@ -72666,7 +72993,7 @@ async function canUseGit() {
|
|
72666
72993
|
}
|
72667
72994
|
async function isInGitRepo(cwd) {
|
72668
72995
|
try {
|
72669
|
-
await (0,
|
72996
|
+
await (0, import_utils41.execa)("git", [
|
72670
72997
|
"rev-parse",
|
72671
72998
|
"--is-inside-work-tree"
|
72672
72999
|
], {
|
@@ -72679,13 +73006,13 @@ async function isInGitRepo(cwd) {
|
|
72679
73006
|
}
|
72680
73007
|
}
|
72681
73008
|
async function initGitRepo(cwd, defaultBranch) {
|
72682
|
-
await (0,
|
73009
|
+
await (0, import_utils41.execa)("git", [
|
72683
73010
|
"init"
|
72684
73011
|
], {
|
72685
73012
|
env: process.env,
|
72686
73013
|
cwd
|
72687
73014
|
});
|
72688
|
-
const { stdout } = await (0,
|
73015
|
+
const { stdout } = await (0, import_utils41.execa)("git", [
|
72689
73016
|
"symbolic-ref",
|
72690
73017
|
"--short",
|
72691
73018
|
"HEAD"
|
@@ -72694,7 +73021,7 @@ async function initGitRepo(cwd, defaultBranch) {
|
|
72694
73021
|
cwd
|
72695
73022
|
});
|
72696
73023
|
if (stdout !== defaultBranch) {
|
72697
|
-
await (0,
|
73024
|
+
await (0, import_utils41.execa)("git", [
|
72698
73025
|
"checkout",
|
72699
73026
|
"-b",
|
72700
73027
|
defaultBranch
|
@@ -72705,7 +73032,7 @@ async function initGitRepo(cwd, defaultBranch) {
|
|
72705
73032
|
}
|
72706
73033
|
}
|
72707
73034
|
async function gitAdd(cwd) {
|
72708
|
-
await (0,
|
73035
|
+
await (0, import_utils41.execa)("git", [
|
72709
73036
|
"add",
|
72710
73037
|
"-A"
|
72711
73038
|
], {
|
@@ -72714,7 +73041,7 @@ async function gitAdd(cwd) {
|
|
72714
73041
|
});
|
72715
73042
|
}
|
72716
73043
|
async function gitCommit(cwd, commitMessage) {
|
72717
|
-
await (0,
|
73044
|
+
await (0, import_utils41.execa)("git", [
|
72718
73045
|
"commit",
|
72719
73046
|
"-m",
|
72720
73047
|
commitMessage,
|
@@ -72725,7 +73052,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
72725
73052
|
});
|
72726
73053
|
}
|
72727
73054
|
|
72728
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
73055
|
+
// ../../../../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
73056
|
var GitAPI = class {
|
72730
73057
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
72731
73058
|
const canUse = await canUseGit();
|
@@ -72775,7 +73102,7 @@ var GitAPI = class {
|
|
72775
73102
|
}
|
72776
73103
|
};
|
72777
73104
|
|
72778
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
73105
|
+
// ../../../../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
73106
|
var import_handlebars = __toESM(require_lib());
|
72780
73107
|
function renderString2(template, fullData, registers) {
|
72781
73108
|
const helpers = {
|
@@ -72789,7 +73116,7 @@ function renderString2(template, fullData, registers) {
|
|
72789
73116
|
return import_handlebars.default.compile(template)(fullData) || "";
|
72790
73117
|
}
|
72791
73118
|
|
72792
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
73119
|
+
// ../../../../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
73120
|
var HandlebarsAPI = class {
|
72794
73121
|
async registerHelp(helpers) {
|
72795
73122
|
this.registers.helpers = {
|
@@ -72837,11 +73164,11 @@ var HandlebarsAPI = class {
|
|
72837
73164
|
}
|
72838
73165
|
};
|
72839
73166
|
|
72840
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
72841
|
-
var
|
73167
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
73168
|
+
var import_utils44 = require("@modern-js/utils");
|
72842
73169
|
async function canUseNvm() {
|
72843
73170
|
try {
|
72844
|
-
await (0,
|
73171
|
+
await (0, import_utils44.execa)("source ~/.nvm/nvm.sh", {
|
72845
73172
|
env: process.env,
|
72846
73173
|
shell: true
|
72847
73174
|
});
|
@@ -72852,7 +73179,7 @@ async function canUseNvm() {
|
|
72852
73179
|
}
|
72853
73180
|
async function canUseNpm() {
|
72854
73181
|
try {
|
72855
|
-
await (0,
|
73182
|
+
await (0, import_utils44.execa)("npm", [
|
72856
73183
|
"--version"
|
72857
73184
|
], {
|
72858
73185
|
env: process.env
|
@@ -72864,7 +73191,7 @@ async function canUseNpm() {
|
|
72864
73191
|
}
|
72865
73192
|
async function canUseYarn2() {
|
72866
73193
|
try {
|
72867
|
-
await (0,
|
73194
|
+
await (0, import_utils44.execa)("yarn", [
|
72868
73195
|
"--version"
|
72869
73196
|
], {
|
72870
73197
|
env: process.env
|
@@ -72876,7 +73203,7 @@ async function canUseYarn2() {
|
|
72876
73203
|
}
|
72877
73204
|
async function canUsePnpm2() {
|
72878
73205
|
try {
|
72879
|
-
await (0,
|
73206
|
+
await (0, import_utils44.execa)("pnpm", [
|
72880
73207
|
"--version"
|
72881
73208
|
], {
|
72882
73209
|
env: process.env
|
@@ -72887,10 +73214,10 @@ async function canUsePnpm2() {
|
|
72887
73214
|
}
|
72888
73215
|
}
|
72889
73216
|
|
72890
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
72891
|
-
var
|
73217
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
73218
|
+
var import_utils45 = require("@modern-js/utils");
|
72892
73219
|
function execaWithStreamLog(command, args, options) {
|
72893
|
-
const promise = (0,
|
73220
|
+
const promise = (0, import_utils45.execa)(command, args, {
|
72894
73221
|
...options,
|
72895
73222
|
stdin: "inherit",
|
72896
73223
|
stdout: "inherit",
|
@@ -72899,7 +73226,7 @@ function execaWithStreamLog(command, args, options) {
|
|
72899
73226
|
return promise;
|
72900
73227
|
}
|
72901
73228
|
async function runInstallWithNvm(command, options) {
|
72902
|
-
await (0,
|
73229
|
+
await (0, import_utils45.execa)(`~/.nvm/nvm-exec ${command}`, {
|
72903
73230
|
...options,
|
72904
73231
|
shell: true,
|
72905
73232
|
stdin: "inherit",
|
@@ -72983,7 +73310,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
72983
73310
|
throw new Error("please install pnpm first");
|
72984
73311
|
}
|
72985
73312
|
|
72986
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
73313
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
72987
73314
|
var NpmAPI = class {
|
72988
73315
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
72989
73316
|
return npmInstall({
|
@@ -73011,7 +73338,7 @@ var NpmAPI = class {
|
|
73011
73338
|
}
|
73012
73339
|
};
|
73013
73340
|
|
73014
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
73341
|
+
// ../../../../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
73342
|
var import_lodash2 = require("@modern-js/utils/lodash");
|
73016
73343
|
|
73017
73344
|
// ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
|
@@ -82646,10 +82973,10 @@ var Schema = (
|
|
82646
82973
|
}()
|
82647
82974
|
);
|
82648
82975
|
|
82649
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
82976
|
+
// ../../../../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
82977
|
var import_inquirer = __toESM(require_inquirer());
|
82651
82978
|
|
82652
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
82979
|
+
// ../../../../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
82980
|
var import_lodash = require("@modern-js/utils/lodash");
|
82654
82981
|
function validateSchema(schema) {
|
82655
82982
|
const { type, properties } = schema;
|
@@ -82741,7 +83068,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
82741
83068
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
82742
83069
|
}
|
82743
83070
|
|
82744
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83071
|
+
// ../../../../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
83072
|
var compileRule = (rule, scope) => {
|
82746
83073
|
const state = Schema.compile(rule, {
|
82747
83074
|
$self: {},
|
@@ -82845,7 +83172,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
82845
83172
|
return answers;
|
82846
83173
|
}
|
82847
83174
|
|
82848
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83175
|
+
// ../../../../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
83176
|
var CLIReader = class {
|
82850
83177
|
getAnswers() {
|
82851
83178
|
return this.answers;
|
@@ -82874,7 +83201,7 @@ var CLIReader = class {
|
|
82874
83201
|
}
|
82875
83202
|
};
|
82876
83203
|
|
82877
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83204
|
+
// ../../../../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
83205
|
var FormilyAPI = class {
|
82879
83206
|
mergeAnswers(answers, configValue) {
|
82880
83207
|
const inputData = (0, import_lodash2.merge)(answers, configValue);
|
@@ -82896,8 +83223,8 @@ var FormilyAPI = class {
|
|
82896
83223
|
}
|
82897
83224
|
};
|
82898
83225
|
|
82899
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
82900
|
-
var
|
83226
|
+
// ../../../../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
|
83227
|
+
var import_utils49 = require("@modern-js/utils");
|
82901
83228
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
82902
83229
|
var import_comment_json = __toESM(require_src3());
|
82903
83230
|
var import_inquirer3 = __toESM(require_inquirer2());
|
@@ -82965,7 +83292,7 @@ var I18n = class {
|
|
82965
83292
|
}
|
82966
83293
|
};
|
82967
83294
|
|
82968
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83295
|
+
// ../../../../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
83296
|
var EN_LOCALE = {
|
82970
83297
|
environment: {
|
82971
83298
|
node_version: "please upgrade node to lts version",
|
@@ -82992,7 +83319,7 @@ var EN_LOCALE = {
|
|
82992
83319
|
}
|
82993
83320
|
};
|
82994
83321
|
|
82995
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83322
|
+
// ../../../../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
83323
|
var ZH_LOCALE = {
|
82997
83324
|
environment: {
|
82998
83325
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -83019,16 +83346,16 @@ var ZH_LOCALE = {
|
|
83019
83346
|
}
|
83020
83347
|
};
|
83021
83348
|
|
83022
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83349
|
+
// ../../../../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
83350
|
var i18n = new I18n();
|
83024
83351
|
var localeKeys = i18n.init("zh", {
|
83025
83352
|
zh: ZH_LOCALE,
|
83026
83353
|
en: EN_LOCALE
|
83027
83354
|
});
|
83028
83355
|
|
83029
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83356
|
+
// ../../../../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
83357
|
var import_path10 = __toESM(require("path"));
|
83031
|
-
var
|
83358
|
+
var import_utils48 = require("@modern-js/utils");
|
83032
83359
|
var NODE_MAJOR_VERSION_MAP = {
|
83033
83360
|
"lts/*": 18,
|
83034
83361
|
"lts/argon": 4,
|
@@ -83041,7 +83368,7 @@ var NODE_MAJOR_VERSION_MAP = {
|
|
83041
83368
|
"lts/hydrogen": 18
|
83042
83369
|
};
|
83043
83370
|
async function getNoteVersion() {
|
83044
|
-
const result = await (0,
|
83371
|
+
const result = await (0, import_utils48.execa)("node", [
|
83045
83372
|
"--version"
|
83046
83373
|
]);
|
83047
83374
|
return result.stdout.slice(1);
|
@@ -83053,10 +83380,10 @@ async function checkUseNvm(cwd, logger2) {
|
|
83053
83380
|
if (!await fsExists(import_path10.default.join(cwd, ".nvmrc"))) {
|
83054
83381
|
return false;
|
83055
83382
|
}
|
83056
|
-
const nvmrcContent = (await
|
83383
|
+
const nvmrcContent = (await import_utils48.fs.readFile(import_path10.default.join(cwd, ".nvmrc"), "utf-8")).replace("\n", "");
|
83057
83384
|
const expectNodeVersion = NODE_MAJOR_VERSION_MAP[nvmrcContent] || nvmrcContent;
|
83058
83385
|
const currentNodeVersion = await getNoteVersion();
|
83059
|
-
if (expectNodeVersion ===
|
83386
|
+
if (expectNodeVersion === import_utils48.semver.major(currentNodeVersion)) {
|
83060
83387
|
return false;
|
83061
83388
|
}
|
83062
83389
|
if (!await canUseNvm()) {
|
@@ -83074,7 +83401,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
83074
83401
|
}
|
83075
83402
|
}
|
83076
83403
|
|
83077
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83404
|
+
// ../../../../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
83405
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
83079
83406
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
83080
83407
|
for (const question of questions) {
|
@@ -83102,10 +83429,10 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
83102
83429
|
return questions;
|
83103
83430
|
}
|
83104
83431
|
|
83105
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83432
|
+
// ../../../../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
83433
|
var AppAPI = class {
|
83107
83434
|
async checkEnvironment(nodeVersion) {
|
83108
|
-
if (
|
83435
|
+
if (import_utils49.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
83109
83436
|
this.generatorCore.logger.warn(i18n.t(localeKeys.environment.node_version));
|
83110
83437
|
return false;
|
83111
83438
|
}
|
@@ -83128,7 +83455,7 @@ var AppAPI = class {
|
|
83128
83455
|
}
|
83129
83456
|
let intallPromise;
|
83130
83457
|
if (command) {
|
83131
|
-
intallPromise = (0,
|
83458
|
+
intallPromise = (0, import_utils49.execa)(command, [], {
|
83132
83459
|
shell: true,
|
83133
83460
|
stdin: "inherit",
|
83134
83461
|
stdout: "inherit",
|
@@ -83259,17 +83586,17 @@ var AppAPI = class {
|
|
83259
83586
|
}
|
83260
83587
|
async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
|
83261
83588
|
const { filePath } = this.generatorContext.materials.default.get(workspaceName);
|
83262
|
-
if (!
|
83589
|
+
if (!import_utils49.fs.existsSync(filePath)) {
|
83263
83590
|
return;
|
83264
83591
|
}
|
83265
|
-
const content = await
|
83592
|
+
const content = await import_utils49.fs.readFile(filePath);
|
83266
83593
|
const workspace = (0, import_comment_json.parse)(content.toString());
|
83267
83594
|
workspace.folders = [
|
83268
83595
|
folder,
|
83269
83596
|
...workspace.folders || []
|
83270
83597
|
];
|
83271
83598
|
const indent = 2;
|
83272
|
-
await
|
83599
|
+
await import_utils49.fs.writeFile(filePath, (0, import_comment_json.stringify)(workspace, null, indent), {
|
83273
83600
|
encoding: "utf-8"
|
83274
83601
|
});
|
83275
83602
|
}
|
@@ -83597,9 +83924,9 @@ var BooleanConfig;
|
|
83597
83924
|
|
83598
83925
|
// ../../generator-common/dist/esm-node/common/solution.js
|
83599
83926
|
var Solution;
|
83600
|
-
(function(
|
83601
|
-
|
83602
|
-
|
83927
|
+
(function(Solution2) {
|
83928
|
+
Solution2["MWA"] = "mwa";
|
83929
|
+
Solution2["Module"] = "module";
|
83603
83930
|
})(Solution || (Solution = {}));
|
83604
83931
|
var SolutionText = {
|
83605
83932
|
["mwa"]: () => i18n2.t(localeKeys2.solution.mwa),
|
@@ -83638,7 +83965,8 @@ var getSolutionSchema = (extra = {}) => {
|
|
83638
83965
|
};
|
83639
83966
|
};
|
83640
83967
|
var getScenesSchema = (extra = {}) => {
|
83641
|
-
|
83968
|
+
var _extra_customPlugin;
|
83969
|
+
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
83970
|
return {
|
83643
83971
|
type: "object",
|
83644
83972
|
properties: hasPlugin ? {
|
@@ -83748,7 +84076,7 @@ var getPackageNameSchema = (extra = {}) => {
|
|
83748
84076
|
};
|
83749
84077
|
|
83750
84078
|
// ../../generator-common/dist/esm-node/common/packagePath.js
|
83751
|
-
var PackagePathRegex =
|
84079
|
+
var PackagePathRegex = /^[a-z0-9-_]+[a-z0-9-\/_]*$/;
|
83752
84080
|
var getPackagePathSchema = (extra) => {
|
83753
84081
|
return {
|
83754
84082
|
type: "string",
|
@@ -84205,7 +84533,7 @@ var SolutionSchemas = {
|
|
84205
84533
|
|
84206
84534
|
// ../../generator-utils/dist/esm/index.js
|
84207
84535
|
var import_path12 = __toESM(require("path"));
|
84208
|
-
var
|
84536
|
+
var import_utils52 = require("@modern-js/utils");
|
84209
84537
|
|
84210
84538
|
// ../../generator-utils/dist/esm/utils/stripAnsi.js
|
84211
84539
|
function ansiRegex2({ onlyFirst = false } = {}) {
|
@@ -84250,9 +84578,9 @@ var localeKeys3 = i18n3.init("en", {
|
|
84250
84578
|
});
|
84251
84579
|
|
84252
84580
|
// ../../generator-utils/dist/esm/utils/package.js
|
84253
|
-
var
|
84581
|
+
var import_utils51 = require("@modern-js/utils");
|
84254
84582
|
async function isPackageExist(packageName, registry2) {
|
84255
|
-
if (await (0,
|
84583
|
+
if (await (0, import_utils51.canUseNpm)()) {
|
84256
84584
|
try {
|
84257
84585
|
const args = [
|
84258
84586
|
"view",
|
@@ -84262,8 +84590,8 @@ async function isPackageExist(packageName, registry2) {
|
|
84262
84590
|
if (registry2) {
|
84263
84591
|
args.push(`--registry=${registry2}`);
|
84264
84592
|
}
|
84265
|
-
const result = await (0,
|
84266
|
-
return (0,
|
84593
|
+
const result = await (0, import_utils51.execa)("npm", args);
|
84594
|
+
return (0, import_utils51.stripAnsi)(result.stdout);
|
84267
84595
|
} catch (e) {
|
84268
84596
|
return false;
|
84269
84597
|
}
|
@@ -84271,7 +84599,7 @@ async function isPackageExist(packageName, registry2) {
|
|
84271
84599
|
throw new Error("not found npm, please install npm before");
|
84272
84600
|
}
|
84273
84601
|
async function isPackageDeprecated(packageName, registry2) {
|
84274
|
-
if (await (0,
|
84602
|
+
if (await (0, import_utils51.canUseNpm)()) {
|
84275
84603
|
const args = [
|
84276
84604
|
"view",
|
84277
84605
|
packageName,
|
@@ -84280,13 +84608,13 @@ async function isPackageDeprecated(packageName, registry2) {
|
|
84280
84608
|
if (registry2) {
|
84281
84609
|
args.push(`--registry=${registry2}`);
|
84282
84610
|
}
|
84283
|
-
const result = await (0,
|
84284
|
-
return (0,
|
84611
|
+
const result = await (0, import_utils51.execa)("npm", args);
|
84612
|
+
return (0, import_utils51.stripAnsi)(result.stdout);
|
84285
84613
|
}
|
84286
84614
|
throw new Error("not found npm, please install npm before");
|
84287
84615
|
}
|
84288
84616
|
function semverDecrease(version) {
|
84289
|
-
const versionObj =
|
84617
|
+
const versionObj = import_utils51.semver.parse(version, {
|
84290
84618
|
loose: true
|
84291
84619
|
});
|
84292
84620
|
if (!versionObj) {
|
@@ -84296,8 +84624,8 @@ function semverDecrease(version) {
|
|
84296
84624
|
versionObj.prerelease = [];
|
84297
84625
|
versionObj.patch--;
|
84298
84626
|
const result = versionObj.format();
|
84299
|
-
if (!
|
84300
|
-
|
84627
|
+
if (!import_utils51.semver.valid(result)) {
|
84628
|
+
import_utils51.logger.debug(`Version ${result} is not valid semver`);
|
84301
84629
|
return version;
|
84302
84630
|
}
|
84303
84631
|
return result;
|
@@ -84307,7 +84635,7 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
|
|
84307
84635
|
let version = currentVersion;
|
84308
84636
|
while (times) {
|
84309
84637
|
if (!await isPackageExist(`${packageName}@${version}`, registry2) || await isPackageDeprecated(`${packageName}@${version}`, registry2)) {
|
84310
|
-
version =
|
84638
|
+
version = import_utils51.semver.inc(version, "patch");
|
84311
84639
|
times--;
|
84312
84640
|
continue;
|
84313
84641
|
}
|
@@ -84341,13 +84669,13 @@ var getGeneratorPath = (generator, distTag, paths) => {
|
|
84341
84669
|
};
|
84342
84670
|
|
84343
84671
|
// ../../generator-utils/dist/esm/index.js
|
84344
|
-
var
|
84672
|
+
var import_utils53 = require("@modern-js/utils");
|
84345
84673
|
async function getPackageVersion(packageName, registry2) {
|
84346
|
-
const spinner = (0,
|
84674
|
+
const spinner = (0, import_utils52.ora)({
|
84347
84675
|
text: "Load Generator...",
|
84348
84676
|
spinner: "runner"
|
84349
84677
|
}).start();
|
84350
|
-
if (await (0,
|
84678
|
+
if (await (0, import_utils52.canUsePnpm)()) {
|
84351
84679
|
const args = [
|
84352
84680
|
"info",
|
84353
84681
|
packageName,
|
@@ -84356,11 +84684,11 @@ async function getPackageVersion(packageName, registry2) {
|
|
84356
84684
|
if (registry2) {
|
84357
84685
|
args.push(`--registry=${registry2}`);
|
84358
84686
|
}
|
84359
|
-
const result = await (0,
|
84687
|
+
const result = await (0, import_utils52.execa)("pnpm", args);
|
84360
84688
|
spinner.stop();
|
84361
84689
|
return stripAnsi2(result.stdout);
|
84362
84690
|
}
|
84363
|
-
if (await (0,
|
84691
|
+
if (await (0, import_utils52.canUseNpm)()) {
|
84364
84692
|
const args = [
|
84365
84693
|
"view",
|
84366
84694
|
packageName,
|
@@ -84369,7 +84697,7 @@ async function getPackageVersion(packageName, registry2) {
|
|
84369
84697
|
if (registry2) {
|
84370
84698
|
args.push(`--registry=${registry2}`);
|
84371
84699
|
}
|
84372
|
-
const result = await (0,
|
84700
|
+
const result = await (0, import_utils52.execa)("npm", args);
|
84373
84701
|
spinner.stop();
|
84374
84702
|
return stripAnsi2(result.stdout);
|
84375
84703
|
}
|
@@ -84399,8 +84727,8 @@ async function getModernPluginVersion(solution, packageName, options = {
|
|
84399
84727
|
]
|
84400
84728
|
}), "../..", "package.json");
|
84401
84729
|
}
|
84402
|
-
if (
|
84403
|
-
const pkgInfo =
|
84730
|
+
if (import_utils52.fs.existsSync(pkgPath)) {
|
84731
|
+
const pkgInfo = import_utils52.fs.readJSONSync(pkgPath);
|
84404
84732
|
const modernVersion = pkgInfo.version;
|
84405
84733
|
if (typeof modernVersion !== "string") {
|
84406
84734
|
return getLatetPluginVersion();
|
@@ -84613,11 +84941,11 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
84613
84941
|
// ../../generator-plugin/dist/esm/context/file.js
|
84614
84942
|
var import_path14 = __toESM(require("path"));
|
84615
84943
|
|
84616
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84944
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
84617
84945
|
var import_comment_json2 = __toESM(require_src3());
|
84618
84946
|
var declarationUpdate = __toESM(require_dist());
|
84619
84947
|
|
84620
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84948
|
+
// ../../../../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
84949
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
84622
84950
|
const originJsonValue = await resource.value();
|
84623
84951
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
@@ -84630,13 +84958,13 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
84630
84958
|
return newJsonString;
|
84631
84959
|
}
|
84632
84960
|
|
84633
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84961
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
84634
84962
|
var JsonAPI = class {
|
84635
84963
|
async get(resource) {
|
84636
84964
|
const originJsonValue = await resource.value();
|
84637
84965
|
try {
|
84638
|
-
const
|
84639
|
-
return
|
84966
|
+
const origin2 = import_comment_json2.default.parse(originJsonValue.content);
|
84967
|
+
return origin2;
|
84640
84968
|
} catch (e) {
|
84641
84969
|
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
84642
84970
|
throw new Error("resource content is not a legal json");
|
@@ -84646,8 +84974,8 @@ var JsonAPI = class {
|
|
84646
84974
|
await editJson(this.generatorCore, resource, async () => {
|
84647
84975
|
const originJsonValue = await resource.value();
|
84648
84976
|
try {
|
84649
|
-
const
|
84650
|
-
const newObj = import_comment_json2.default.assign(
|
84977
|
+
const origin2 = import_comment_json2.default.parse(originJsonValue.content);
|
84978
|
+
const newObj = import_comment_json2.default.assign(origin2, obj);
|
84651
84979
|
const jsonIntent = 2;
|
84652
84980
|
return import_comment_json2.default.stringify(newObj, void 0, jsonIntent);
|
84653
84981
|
} catch (e) {
|
@@ -84676,7 +85004,7 @@ var JsonAPI = class {
|
|
84676
85004
|
|
84677
85005
|
// ../../generator-plugin/dist/esm/utils/file.js
|
84678
85006
|
var import_path13 = __toESM(require("path"));
|
84679
|
-
var
|
85007
|
+
var import_utils55 = require("@modern-js/utils");
|
84680
85008
|
var FileType;
|
84681
85009
|
(function(FileType22) {
|
84682
85010
|
FileType22["Text"] = "text";
|
@@ -84701,7 +85029,7 @@ function _fileExists() {
|
|
84701
85029
|
]);
|
84702
85030
|
return [
|
84703
85031
|
4,
|
84704
|
-
|
85032
|
+
import_utils53.fs.access(filePath)
|
84705
85033
|
];
|
84706
85034
|
case 1:
|
84707
85035
|
_state.sent();
|
@@ -84735,7 +85063,7 @@ function dropFileRootPath(file, rootPath) {
|
|
84735
85063
|
}
|
84736
85064
|
function isAbsoluteOrRelativeFileTo(relativePath) {
|
84737
85065
|
var isFile2 = function(file) {
|
84738
|
-
return
|
85066
|
+
return import_utils53.fs.existsSync(file) && import_utils53.fs.lstatSync(file).isFile();
|
84739
85067
|
};
|
84740
85068
|
return function(fileName) {
|
84741
85069
|
return isFile2(fileName) || isFile2(import_path13.default.join(relativePath, fileName));
|
@@ -84762,7 +85090,7 @@ function _addFile() {
|
|
84762
85090
|
}
|
84763
85091
|
return [
|
84764
85092
|
4,
|
84765
|
-
|
85093
|
+
import_utils53.fs.mkdir(import_path13.default.dirname(fileDestPath), {
|
84766
85094
|
recursive: true
|
84767
85095
|
})
|
84768
85096
|
];
|
@@ -84776,13 +85104,13 @@ function _addFile() {
|
|
84776
85104
|
];
|
84777
85105
|
return [
|
84778
85106
|
4,
|
84779
|
-
|
85107
|
+
import_utils53.fs.readFile(absTemplatePath)
|
84780
85108
|
];
|
84781
85109
|
case 3:
|
84782
85110
|
rawTemplate = _state.sent();
|
84783
85111
|
return [
|
84784
85112
|
4,
|
84785
|
-
|
85113
|
+
import_utils53.fs.writeFile(fileDestPath, rawTemplate)
|
84786
85114
|
];
|
84787
85115
|
case 4:
|
84788
85116
|
_state.sent();
|
@@ -84799,7 +85127,7 @@ function _addFile() {
|
|
84799
85127
|
];
|
84800
85128
|
return [
|
84801
85129
|
4,
|
84802
|
-
|
85130
|
+
import_utils53.fs.readFile(absTemplatePath, "utf8")
|
84803
85131
|
];
|
84804
85132
|
case 6:
|
84805
85133
|
template = _state.sent();
|
@@ -84807,7 +85135,7 @@ function _addFile() {
|
|
84807
85135
|
case 7:
|
84808
85136
|
return [
|
84809
85137
|
4,
|
84810
|
-
|
85138
|
+
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
85139
|
];
|
84812
85140
|
case 8:
|
84813
85141
|
_state.sent();
|
@@ -84841,7 +85169,7 @@ function _addManyFiles() {
|
|
84841
85169
|
return import_path13.default.join(templatePath, templateFile2);
|
84842
85170
|
});
|
84843
85171
|
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 =
|
85172
|
+
templateFiles = import_utils55.globby.sync(config.templateFiles, {
|
84845
85173
|
braceExpansion: false,
|
84846
85174
|
dot: config.dot
|
84847
85175
|
}).map(function(filePath) {
|
@@ -85108,14 +85436,14 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85108
85436
|
case 0:
|
85109
85437
|
return [
|
85110
85438
|
4,
|
85111
|
-
|
85439
|
+
import_utils53.fs.readFile(import_path14.default.join(_this.projectPath, fileName), "utf-8")
|
85112
85440
|
];
|
85113
85441
|
case 1:
|
85114
85442
|
content = _state.sent();
|
85115
85443
|
newContent = update(content.split("\n"));
|
85116
85444
|
return [
|
85117
85445
|
4,
|
85118
|
-
|
85446
|
+
import_utils53.fs.writeFile(import_path14.default.join(_this.projectPath, fileName), newContent.join("\n"), "utf-8")
|
85119
85447
|
];
|
85120
85448
|
case 2:
|
85121
85449
|
_state.sent();
|
@@ -85146,7 +85474,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85146
85474
|
];
|
85147
85475
|
return [
|
85148
85476
|
4,
|
85149
|
-
|
85477
|
+
import_utils53.fs.rm(file)
|
85150
85478
|
];
|
85151
85479
|
case 2:
|
85152
85480
|
_state.sent();
|
@@ -85177,7 +85505,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85177
85505
|
]);
|
85178
85506
|
return [
|
85179
85507
|
4,
|
85180
|
-
|
85508
|
+
import_utils53.fs.stat(dir)
|
85181
85509
|
];
|
85182
85510
|
case 2:
|
85183
85511
|
stat = _state.sent();
|
@@ -85188,7 +85516,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85188
85516
|
];
|
85189
85517
|
return [
|
85190
85518
|
4,
|
85191
|
-
|
85519
|
+
import_utils53.fs.rm(dir, {
|
85192
85520
|
recursive: true
|
85193
85521
|
})
|
85194
85522
|
];
|
@@ -85231,7 +85559,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
85231
85559
|
return __generator(this, function(_state) {
|
85232
85560
|
return [
|
85233
85561
|
2,
|
85234
|
-
|
85562
|
+
import_utils53.fs.readdir(import_path14.default.join(_this.projectPath, dir))
|
85235
85563
|
];
|
85236
85564
|
});
|
85237
85565
|
})();
|
@@ -85617,7 +85945,7 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
|
|
85617
85945
|
|
85618
85946
|
// ../../new-action/dist/esm/utils/index.js
|
85619
85947
|
var import_path15 = __toESM(require("path"));
|
85620
|
-
var
|
85948
|
+
var import_utils56 = require("@modern-js/utils");
|
85621
85949
|
var swap = (obj) => {
|
85622
85950
|
return Object.keys(obj).reduce((acc, key) => {
|
85623
85951
|
acc[obj[key]] = key;
|
@@ -85627,20 +85955,20 @@ var swap = (obj) => {
|
|
85627
85955
|
var dependenceToSolution = swap(SolutionToolsMap);
|
85628
85956
|
function alreadyRepo(cwd = process.cwd()) {
|
85629
85957
|
try {
|
85630
|
-
return
|
85958
|
+
return import_utils53.fs.existsSync(import_path15.default.resolve(cwd, "package.json"));
|
85631
85959
|
} catch (e) {
|
85632
85960
|
return false;
|
85633
85961
|
}
|
85634
85962
|
}
|
85635
85963
|
var readJson = (jsonPath) => {
|
85636
|
-
if (!
|
85964
|
+
if (!import_utils53.fs.existsSync(jsonPath)) {
|
85637
85965
|
return {};
|
85638
85966
|
}
|
85639
|
-
const jsonStr =
|
85967
|
+
const jsonStr = import_utils53.fs.readFileSync(jsonPath, {
|
85640
85968
|
encoding: "utf8"
|
85641
85969
|
});
|
85642
85970
|
try {
|
85643
|
-
return
|
85971
|
+
return import_utils56.json5.parse(jsonStr);
|
85644
85972
|
} catch (error) {
|
85645
85973
|
throw Error(`${jsonPath} is not a valid json, please check and try again.`);
|
85646
85974
|
}
|
@@ -85675,8 +86003,8 @@ function getGeneratorPath2(generator, distTag) {
|
|
85675
86003
|
}
|
85676
86004
|
async function usePluginNameExport(solution, options) {
|
85677
86005
|
const solutionVersion = await getModernPluginVersion(solution, SolutionToolsMap[Solution.MWA], options);
|
85678
|
-
if (
|
85679
|
-
return
|
86006
|
+
if (import_utils56.semver.valid(solutionVersion) && import_utils56.semver.gte(solutionVersion, "2.0.0")) {
|
86007
|
+
return import_utils56.semver.gt(solutionVersion, "2.24.0");
|
85680
86008
|
}
|
85681
86009
|
return true;
|
85682
86010
|
}
|
@@ -85757,7 +86085,7 @@ var MWANewAction = async (options) => {
|
|
85757
86085
|
noNeedInstall: !needInstall
|
85758
86086
|
}, ans, {
|
85759
86087
|
locale: UserConfig.locale || locale,
|
85760
|
-
packageManager: UserConfig.packageManager || await (0,
|
86088
|
+
packageManager: UserConfig.packageManager || await (0, import_utils53.getPackageManager)(cwd),
|
85761
86089
|
distTag
|
85762
86090
|
}, {
|
85763
86091
|
devDependencies: devDependency ? {
|
@@ -85858,7 +86186,7 @@ var ModuleNewAction = async (options) => {
|
|
85858
86186
|
noNeedInstall: !needInstall
|
85859
86187
|
}, ans, {
|
85860
86188
|
locale: UserConfig.locale || locale,
|
85861
|
-
packageManager: UserConfig.packageManager || await (0,
|
86189
|
+
packageManager: UserConfig.packageManager || await (0, import_utils53.getPackageManager)(cwd),
|
85862
86190
|
distTag
|
85863
86191
|
}, {
|
85864
86192
|
devDependencies: devDependency ? {
|
@@ -86107,7 +86435,7 @@ function _getPackageMeta() {
|
|
86107
86435
|
params.push("--registry");
|
86108
86436
|
params.push(registryUrl);
|
86109
86437
|
}
|
86110
|
-
getPkgInfoPromise = (0,
|
86438
|
+
getPkgInfoPromise = (0, import_utils53.execa)("npm", params);
|
86111
86439
|
return [
|
86112
86440
|
4,
|
86113
86441
|
timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT2, "Get npm version of '".concat(packageName, "'"))
|
@@ -86275,7 +86603,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
86275
86603
|
];
|
86276
86604
|
return [
|
86277
86605
|
4,
|
86278
|
-
|
86606
|
+
import_utils53.fs.readJSON(import_path17.default.join(process.cwd(), plugin.slice(5), "package.json"))
|
86279
86607
|
];
|
86280
86608
|
case 1:
|
86281
86609
|
pkgJSON = _state2.sent();
|
@@ -86291,7 +86619,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
86291
86619
|
];
|
86292
86620
|
return [
|
86293
86621
|
4,
|
86294
|
-
|
86622
|
+
import_utils53.fs.readJSON(import_path17.default.join(plugin, "package.json"))
|
86295
86623
|
];
|
86296
86624
|
case 3:
|
86297
86625
|
pkgJSON = _state2.sent();
|