@storm-software/linting-tools 1.47.0 → 1.47.2
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/CHANGELOG.md +25 -0
- package/README.md +8 -3
- package/bin/lint.js +43162 -37469
- package/package.json +12 -12
- package/src/cli/index.js +24817 -19465
- package/src/manypkg/index.js +2072 -1140
package/src/manypkg/index.js
CHANGED
|
@@ -2630,7 +2630,7 @@ var require_ansi_styles = __commonJS({
|
|
|
2630
2630
|
});
|
|
2631
2631
|
};
|
|
2632
2632
|
var colorConvert;
|
|
2633
|
-
var makeDynamicStyles = (wrap, targetSpace,
|
|
2633
|
+
var makeDynamicStyles = (wrap, targetSpace, identity2, isBackground) => {
|
|
2634
2634
|
if (colorConvert === void 0) {
|
|
2635
2635
|
colorConvert = require_color_convert();
|
|
2636
2636
|
}
|
|
@@ -2639,7 +2639,7 @@ var require_ansi_styles = __commonJS({
|
|
|
2639
2639
|
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
2640
2640
|
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
2641
2641
|
if (sourceSpace === targetSpace) {
|
|
2642
|
-
styles[name] = wrap(
|
|
2642
|
+
styles[name] = wrap(identity2, offset);
|
|
2643
2643
|
} else if (typeof suite === "object") {
|
|
2644
2644
|
styles[name] = wrap(suite[targetSpace], offset);
|
|
2645
2645
|
}
|
|
@@ -2927,14 +2927,14 @@ var require_templates = __commonJS({
|
|
|
2927
2927
|
const results = [];
|
|
2928
2928
|
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
|
2929
2929
|
let matches;
|
|
2930
|
-
for (const
|
|
2931
|
-
const number = Number(
|
|
2930
|
+
for (const chunk2 of chunks) {
|
|
2931
|
+
const number = Number(chunk2);
|
|
2932
2932
|
if (!Number.isNaN(number)) {
|
|
2933
2933
|
results.push(number);
|
|
2934
|
-
} else if (matches =
|
|
2934
|
+
} else if (matches = chunk2.match(STRING_REGEX)) {
|
|
2935
2935
|
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
|
|
2936
2936
|
} else {
|
|
2937
|
-
throw new Error(`Invalid Chalk template style argument: ${
|
|
2937
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk2} (in style '${name}')`);
|
|
2938
2938
|
}
|
|
2939
2939
|
}
|
|
2940
2940
|
return results;
|
|
@@ -2976,27 +2976,27 @@ var require_templates = __commonJS({
|
|
|
2976
2976
|
module.exports = (chalk3, temporary) => {
|
|
2977
2977
|
const styles = [];
|
|
2978
2978
|
const chunks = [];
|
|
2979
|
-
let
|
|
2979
|
+
let chunk2 = [];
|
|
2980
2980
|
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
2981
2981
|
if (escapeCharacter) {
|
|
2982
|
-
|
|
2982
|
+
chunk2.push(unescape(escapeCharacter));
|
|
2983
2983
|
} else if (style) {
|
|
2984
|
-
const string =
|
|
2985
|
-
|
|
2984
|
+
const string = chunk2.join("");
|
|
2985
|
+
chunk2 = [];
|
|
2986
2986
|
chunks.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
|
|
2987
2987
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
2988
2988
|
} else if (close) {
|
|
2989
2989
|
if (styles.length === 0) {
|
|
2990
2990
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
2991
2991
|
}
|
|
2992
|
-
chunks.push(buildStyle(chalk3, styles)(
|
|
2993
|
-
|
|
2992
|
+
chunks.push(buildStyle(chalk3, styles)(chunk2.join("")));
|
|
2993
|
+
chunk2 = [];
|
|
2994
2994
|
styles.pop();
|
|
2995
2995
|
} else {
|
|
2996
|
-
|
|
2996
|
+
chunk2.push(character);
|
|
2997
2997
|
}
|
|
2998
2998
|
});
|
|
2999
|
-
chunks.push(
|
|
2999
|
+
chunks.push(chunk2.join(""));
|
|
3000
3000
|
if (styles.length > 0) {
|
|
3001
3001
|
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
3002
3002
|
throw new Error(errMessage);
|
|
@@ -3016,7 +3016,7 @@ var require_source = __commonJS({
|
|
|
3016
3016
|
stringReplaceAll,
|
|
3017
3017
|
stringEncaseCRLFWithFirstIndex
|
|
3018
3018
|
} = require_util();
|
|
3019
|
-
var { isArray } = Array;
|
|
3019
|
+
var { isArray: isArray2 } = Array;
|
|
3020
3020
|
var levelMapping = [
|
|
3021
3021
|
"ansi",
|
|
3022
3022
|
"ansi",
|
|
@@ -3124,7 +3124,7 @@ var require_source = __commonJS({
|
|
|
3124
3124
|
};
|
|
3125
3125
|
var createBuilder = (self, _styler, _isEmpty) => {
|
|
3126
3126
|
const builder = (...arguments_) => {
|
|
3127
|
-
if (
|
|
3127
|
+
if (isArray2(arguments_[0]) && isArray2(arguments_[0].raw)) {
|
|
3128
3128
|
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
3129
3129
|
}
|
|
3130
3130
|
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
@@ -3159,7 +3159,7 @@ var require_source = __commonJS({
|
|
|
3159
3159
|
var template;
|
|
3160
3160
|
var chalkTag = (chalk4, ...strings) => {
|
|
3161
3161
|
const [firstString] = strings;
|
|
3162
|
-
if (!
|
|
3162
|
+
if (!isArray2(firstString) || !isArray2(firstString.raw)) {
|
|
3163
3163
|
return strings.join(" ");
|
|
3164
3164
|
}
|
|
3165
3165
|
const arguments_ = strings.slice(1);
|
|
@@ -4094,7 +4094,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4094
4094
|
gracefulQueue = "___graceful-fs.queue";
|
|
4095
4095
|
previousSymbol = "___graceful-fs.previous";
|
|
4096
4096
|
}
|
|
4097
|
-
function
|
|
4097
|
+
function noop4() {
|
|
4098
4098
|
}
|
|
4099
4099
|
function publishQueue(context, queue2) {
|
|
4100
4100
|
Object.defineProperty(context, gracefulQueue, {
|
|
@@ -4103,7 +4103,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4103
4103
|
}
|
|
4104
4104
|
});
|
|
4105
4105
|
}
|
|
4106
|
-
var debug =
|
|
4106
|
+
var debug = noop4;
|
|
4107
4107
|
if (util2.debuglog)
|
|
4108
4108
|
debug = util2.debuglog("gfs4");
|
|
4109
4109
|
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
@@ -6998,15 +6998,15 @@ var require_to_regex_range = __commonJS({
|
|
|
6998
6998
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
6999
6999
|
* Released under the MIT License.
|
|
7000
7000
|
*/
|
|
7001
|
-
var
|
|
7001
|
+
var isNumber2 = require_is_number();
|
|
7002
7002
|
var toRegexRange = (min, max, options) => {
|
|
7003
|
-
if (
|
|
7003
|
+
if (isNumber2(min) === false) {
|
|
7004
7004
|
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
7005
7005
|
}
|
|
7006
7006
|
if (max === void 0 || min === max) {
|
|
7007
7007
|
return String(min);
|
|
7008
7008
|
}
|
|
7009
|
-
if (
|
|
7009
|
+
if (isNumber2(max) === false) {
|
|
7010
7010
|
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
7011
7011
|
}
|
|
7012
7012
|
let opts = { relaxZeros: true, ...options };
|
|
@@ -7218,14 +7218,14 @@ var require_fill_range = __commonJS({
|
|
|
7218
7218
|
*/
|
|
7219
7219
|
var util2 = __require("util");
|
|
7220
7220
|
var toRegexRange = require_to_regex_range();
|
|
7221
|
-
var
|
|
7221
|
+
var isObject2 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
7222
7222
|
var transform = (toNumber) => {
|
|
7223
7223
|
return (value) => toNumber === true ? Number(value) : String(value);
|
|
7224
7224
|
};
|
|
7225
7225
|
var isValidValue = (value) => {
|
|
7226
7226
|
return typeof value === "number" || typeof value === "string" && value !== "";
|
|
7227
7227
|
};
|
|
7228
|
-
var
|
|
7228
|
+
var isNumber2 = (num) => Number.isInteger(+num);
|
|
7229
7229
|
var zeros = (input) => {
|
|
7230
7230
|
let value = `${input}`;
|
|
7231
7231
|
let index = -1;
|
|
@@ -7363,7 +7363,7 @@ var require_fill_range = __commonJS({
|
|
|
7363
7363
|
return range;
|
|
7364
7364
|
};
|
|
7365
7365
|
var fillLetters = (start, end, step = 1, options = {}) => {
|
|
7366
|
-
if (!
|
|
7366
|
+
if (!isNumber2(start) && start.length > 1 || !isNumber2(end) && end.length > 1) {
|
|
7367
7367
|
return invalidRange(start, end, options);
|
|
7368
7368
|
}
|
|
7369
7369
|
let format2 = options.transform || ((val) => String.fromCharCode(val));
|
|
@@ -7397,19 +7397,19 @@ var require_fill_range = __commonJS({
|
|
|
7397
7397
|
if (typeof step === "function") {
|
|
7398
7398
|
return fill(start, end, 1, { transform: step });
|
|
7399
7399
|
}
|
|
7400
|
-
if (
|
|
7400
|
+
if (isObject2(step)) {
|
|
7401
7401
|
return fill(start, end, 0, step);
|
|
7402
7402
|
}
|
|
7403
7403
|
let opts = { ...options };
|
|
7404
7404
|
if (opts.capture === true)
|
|
7405
7405
|
opts.wrap = true;
|
|
7406
7406
|
step = step || opts.step || 1;
|
|
7407
|
-
if (!
|
|
7408
|
-
if (step != null && !
|
|
7407
|
+
if (!isNumber2(step)) {
|
|
7408
|
+
if (step != null && !isObject2(step))
|
|
7409
7409
|
return invalidStep(step, opts);
|
|
7410
7410
|
return fill(start, end, 1, step);
|
|
7411
7411
|
}
|
|
7412
|
-
if (
|
|
7412
|
+
if (isNumber2(start) && isNumber2(end)) {
|
|
7413
7413
|
return fillNumbers(start, end, step, opts);
|
|
7414
7414
|
}
|
|
7415
7415
|
return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
|
|
@@ -9357,7 +9357,7 @@ var require_picomatch = __commonJS({
|
|
|
9357
9357
|
var parse = require_parse2();
|
|
9358
9358
|
var utils = require_utils2();
|
|
9359
9359
|
var constants = require_constants2();
|
|
9360
|
-
var
|
|
9360
|
+
var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
9361
9361
|
var picomatch = (glob, options, returnState = false) => {
|
|
9362
9362
|
if (Array.isArray(glob)) {
|
|
9363
9363
|
const fns = glob.map((input) => picomatch(input, options, returnState));
|
|
@@ -9371,7 +9371,7 @@ var require_picomatch = __commonJS({
|
|
|
9371
9371
|
};
|
|
9372
9372
|
return arrayMatcher;
|
|
9373
9373
|
}
|
|
9374
|
-
const isState =
|
|
9374
|
+
const isState = isObject2(glob) && glob.tokens && glob.input;
|
|
9375
9375
|
if (glob === "" || typeof glob !== "string" && !isState) {
|
|
9376
9376
|
throw new TypeError("Expected pattern to be a non-empty string");
|
|
9377
9377
|
}
|
|
@@ -9508,7 +9508,7 @@ var require_micromatch = __commonJS({
|
|
|
9508
9508
|
var braces = require_braces();
|
|
9509
9509
|
var picomatch = require_picomatch2();
|
|
9510
9510
|
var utils = require_utils2();
|
|
9511
|
-
var
|
|
9511
|
+
var isEmptyString2 = (val) => val === "" || val === "./";
|
|
9512
9512
|
var micromatch = (list, patterns, options) => {
|
|
9513
9513
|
patterns = [].concat(patterns);
|
|
9514
9514
|
list = [].concat(list);
|
|
@@ -9581,7 +9581,7 @@ var require_micromatch = __commonJS({
|
|
|
9581
9581
|
return pattern.some((p) => micromatch.contains(str, p, options));
|
|
9582
9582
|
}
|
|
9583
9583
|
if (typeof pattern === "string") {
|
|
9584
|
-
if (
|
|
9584
|
+
if (isEmptyString2(str) || isEmptyString2(pattern)) {
|
|
9585
9585
|
return false;
|
|
9586
9586
|
}
|
|
9587
9587
|
if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
|
|
@@ -9839,10 +9839,10 @@ var require_string = __commonJS({
|
|
|
9839
9839
|
"use strict";
|
|
9840
9840
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9841
9841
|
exports.isEmpty = exports.isString = void 0;
|
|
9842
|
-
function
|
|
9842
|
+
function isString2(input) {
|
|
9843
9843
|
return typeof input === "string";
|
|
9844
9844
|
}
|
|
9845
|
-
exports.isString =
|
|
9845
|
+
exports.isString = isString2;
|
|
9846
9846
|
function isEmpty(input) {
|
|
9847
9847
|
return input === "";
|
|
9848
9848
|
}
|
|
@@ -10069,8 +10069,8 @@ var require_settings = __commonJS({
|
|
|
10069
10069
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10070
10070
|
var fs2 = require_fs3();
|
|
10071
10071
|
var Settings = class {
|
|
10072
|
-
constructor(
|
|
10073
|
-
this._options =
|
|
10072
|
+
constructor(_options2 = {}) {
|
|
10073
|
+
this._options = _options2;
|
|
10074
10074
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
10075
10075
|
this.fs = fs2.createFileSystemAdapter(this._options.fs);
|
|
10076
10076
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
@@ -10456,8 +10456,8 @@ var require_settings2 = __commonJS({
|
|
|
10456
10456
|
var fsStat = require_out();
|
|
10457
10457
|
var fs2 = require_fs5();
|
|
10458
10458
|
var Settings = class {
|
|
10459
|
-
constructor(
|
|
10460
|
-
this._options =
|
|
10459
|
+
constructor(_options2 = {}) {
|
|
10460
|
+
this._options = _options2;
|
|
10461
10461
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
10462
10462
|
this.fs = fs2.createFileSystemAdapter(this._options.fs);
|
|
10463
10463
|
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep);
|
|
@@ -10540,19 +10540,19 @@ var require_reusify = __commonJS({
|
|
|
10540
10540
|
}
|
|
10541
10541
|
});
|
|
10542
10542
|
|
|
10543
|
-
// node_modules/.pnpm/fastq@1.
|
|
10543
|
+
// node_modules/.pnpm/fastq@1.17.1/node_modules/fastq/queue.js
|
|
10544
10544
|
var require_queue = __commonJS({
|
|
10545
|
-
"node_modules/.pnpm/fastq@1.
|
|
10545
|
+
"node_modules/.pnpm/fastq@1.17.1/node_modules/fastq/queue.js"(exports, module) {
|
|
10546
10546
|
"use strict";
|
|
10547
10547
|
var reusify = require_reusify();
|
|
10548
|
-
function fastqueue(context, worker,
|
|
10548
|
+
function fastqueue(context, worker, _concurrency) {
|
|
10549
10549
|
if (typeof context === "function") {
|
|
10550
|
-
|
|
10550
|
+
_concurrency = worker;
|
|
10551
10551
|
worker = context;
|
|
10552
10552
|
context = null;
|
|
10553
10553
|
}
|
|
10554
|
-
if (
|
|
10555
|
-
throw new Error("fastqueue concurrency must be greater than 1");
|
|
10554
|
+
if (!(_concurrency >= 1)) {
|
|
10555
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
10556
10556
|
}
|
|
10557
10557
|
var cache = reusify(Task);
|
|
10558
10558
|
var queueHead = null;
|
|
@@ -10561,18 +10561,32 @@ var require_queue = __commonJS({
|
|
|
10561
10561
|
var errorHandler = null;
|
|
10562
10562
|
var self = {
|
|
10563
10563
|
push,
|
|
10564
|
-
drain:
|
|
10565
|
-
saturated:
|
|
10564
|
+
drain: noop4,
|
|
10565
|
+
saturated: noop4,
|
|
10566
10566
|
pause,
|
|
10567
10567
|
paused: false,
|
|
10568
|
-
concurrency
|
|
10568
|
+
get concurrency() {
|
|
10569
|
+
return _concurrency;
|
|
10570
|
+
},
|
|
10571
|
+
set concurrency(value) {
|
|
10572
|
+
if (!(value >= 1)) {
|
|
10573
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
10574
|
+
}
|
|
10575
|
+
_concurrency = value;
|
|
10576
|
+
if (self.paused)
|
|
10577
|
+
return;
|
|
10578
|
+
for (; queueHead && _running < _concurrency; ) {
|
|
10579
|
+
_running++;
|
|
10580
|
+
release();
|
|
10581
|
+
}
|
|
10582
|
+
},
|
|
10569
10583
|
running,
|
|
10570
10584
|
resume,
|
|
10571
10585
|
idle,
|
|
10572
10586
|
length,
|
|
10573
10587
|
getQueue,
|
|
10574
10588
|
unshift,
|
|
10575
|
-
empty:
|
|
10589
|
+
empty: noop4,
|
|
10576
10590
|
kill,
|
|
10577
10591
|
killAndDrain,
|
|
10578
10592
|
error: error2
|
|
@@ -10606,7 +10620,12 @@ var require_queue = __commonJS({
|
|
|
10606
10620
|
if (!self.paused)
|
|
10607
10621
|
return;
|
|
10608
10622
|
self.paused = false;
|
|
10609
|
-
|
|
10623
|
+
if (queueHead === null) {
|
|
10624
|
+
_running++;
|
|
10625
|
+
release();
|
|
10626
|
+
return;
|
|
10627
|
+
}
|
|
10628
|
+
for (; queueHead && _running < _concurrency; ) {
|
|
10610
10629
|
_running++;
|
|
10611
10630
|
release();
|
|
10612
10631
|
}
|
|
@@ -10619,9 +10638,9 @@ var require_queue = __commonJS({
|
|
|
10619
10638
|
current.context = context;
|
|
10620
10639
|
current.release = release;
|
|
10621
10640
|
current.value = value;
|
|
10622
|
-
current.callback = done ||
|
|
10641
|
+
current.callback = done || noop4;
|
|
10623
10642
|
current.errorHandler = errorHandler;
|
|
10624
|
-
if (_running
|
|
10643
|
+
if (_running >= _concurrency || self.paused) {
|
|
10625
10644
|
if (queueTail) {
|
|
10626
10645
|
queueTail.next = current;
|
|
10627
10646
|
queueTail = current;
|
|
@@ -10640,8 +10659,9 @@ var require_queue = __commonJS({
|
|
|
10640
10659
|
current.context = context;
|
|
10641
10660
|
current.release = release;
|
|
10642
10661
|
current.value = value;
|
|
10643
|
-
current.callback = done ||
|
|
10644
|
-
|
|
10662
|
+
current.callback = done || noop4;
|
|
10663
|
+
current.errorHandler = errorHandler;
|
|
10664
|
+
if (_running >= _concurrency || self.paused) {
|
|
10645
10665
|
if (queueHead) {
|
|
10646
10666
|
current.next = queueHead;
|
|
10647
10667
|
queueHead = current;
|
|
@@ -10660,7 +10680,7 @@ var require_queue = __commonJS({
|
|
|
10660
10680
|
cache.release(holder);
|
|
10661
10681
|
}
|
|
10662
10682
|
var next = queueHead;
|
|
10663
|
-
if (next) {
|
|
10683
|
+
if (next && _running <= _concurrency) {
|
|
10664
10684
|
if (!self.paused) {
|
|
10665
10685
|
if (queueTail === queueHead) {
|
|
10666
10686
|
queueTail = null;
|
|
@@ -10681,25 +10701,25 @@ var require_queue = __commonJS({
|
|
|
10681
10701
|
function kill() {
|
|
10682
10702
|
queueHead = null;
|
|
10683
10703
|
queueTail = null;
|
|
10684
|
-
self.drain =
|
|
10704
|
+
self.drain = noop4;
|
|
10685
10705
|
}
|
|
10686
10706
|
function killAndDrain() {
|
|
10687
10707
|
queueHead = null;
|
|
10688
10708
|
queueTail = null;
|
|
10689
10709
|
self.drain();
|
|
10690
|
-
self.drain =
|
|
10710
|
+
self.drain = noop4;
|
|
10691
10711
|
}
|
|
10692
10712
|
function error2(handler) {
|
|
10693
10713
|
errorHandler = handler;
|
|
10694
10714
|
}
|
|
10695
10715
|
}
|
|
10696
|
-
function
|
|
10716
|
+
function noop4() {
|
|
10697
10717
|
}
|
|
10698
10718
|
function Task() {
|
|
10699
10719
|
this.value = null;
|
|
10700
|
-
this.callback =
|
|
10720
|
+
this.callback = noop4;
|
|
10701
10721
|
this.next = null;
|
|
10702
|
-
this.release =
|
|
10722
|
+
this.release = noop4;
|
|
10703
10723
|
this.context = null;
|
|
10704
10724
|
this.errorHandler = null;
|
|
10705
10725
|
var self = this;
|
|
@@ -10708,7 +10728,7 @@ var require_queue = __commonJS({
|
|
|
10708
10728
|
var errorHandler = self.errorHandler;
|
|
10709
10729
|
var val = self.value;
|
|
10710
10730
|
self.value = null;
|
|
10711
|
-
self.callback =
|
|
10731
|
+
self.callback = noop4;
|
|
10712
10732
|
if (self.errorHandler) {
|
|
10713
10733
|
errorHandler(err, val);
|
|
10714
10734
|
}
|
|
@@ -10716,9 +10736,9 @@ var require_queue = __commonJS({
|
|
|
10716
10736
|
self.release(self);
|
|
10717
10737
|
};
|
|
10718
10738
|
}
|
|
10719
|
-
function queueAsPromised(context, worker,
|
|
10739
|
+
function queueAsPromised(context, worker, _concurrency) {
|
|
10720
10740
|
if (typeof context === "function") {
|
|
10721
|
-
|
|
10741
|
+
_concurrency = worker;
|
|
10722
10742
|
worker = context;
|
|
10723
10743
|
context = null;
|
|
10724
10744
|
}
|
|
@@ -10727,7 +10747,7 @@ var require_queue = __commonJS({
|
|
|
10727
10747
|
cb(null, res);
|
|
10728
10748
|
}, cb);
|
|
10729
10749
|
}
|
|
10730
|
-
var queue = fastqueue(context, asyncWrapper,
|
|
10750
|
+
var queue = fastqueue(context, asyncWrapper, _concurrency);
|
|
10731
10751
|
var pushCb = queue.push;
|
|
10732
10752
|
var unshiftCb = queue.unshift;
|
|
10733
10753
|
queue.push = push;
|
|
@@ -10744,7 +10764,7 @@ var require_queue = __commonJS({
|
|
|
10744
10764
|
resolve(result);
|
|
10745
10765
|
});
|
|
10746
10766
|
});
|
|
10747
|
-
p.catch(
|
|
10767
|
+
p.catch(noop4);
|
|
10748
10768
|
return p;
|
|
10749
10769
|
}
|
|
10750
10770
|
function unshift(value) {
|
|
@@ -10757,7 +10777,7 @@ var require_queue = __commonJS({
|
|
|
10757
10777
|
resolve(result);
|
|
10758
10778
|
});
|
|
10759
10779
|
});
|
|
10760
|
-
p.catch(
|
|
10780
|
+
p.catch(noop4);
|
|
10761
10781
|
return p;
|
|
10762
10782
|
}
|
|
10763
10783
|
function drained() {
|
|
@@ -11104,8 +11124,8 @@ var require_settings3 = __commonJS({
|
|
|
11104
11124
|
var path2 = __require("path");
|
|
11105
11125
|
var fsScandir = require_out2();
|
|
11106
11126
|
var Settings = class {
|
|
11107
|
-
constructor(
|
|
11108
|
-
this._options =
|
|
11127
|
+
constructor(_options2 = {}) {
|
|
11128
|
+
this._options = _options2;
|
|
11109
11129
|
this.basePath = this._getValue(this._options.basePath, void 0);
|
|
11110
11130
|
this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
|
|
11111
11131
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
@@ -11787,8 +11807,8 @@ var require_settings4 = __commonJS({
|
|
|
11787
11807
|
readdirSync: fs2.readdirSync
|
|
11788
11808
|
};
|
|
11789
11809
|
var Settings = class {
|
|
11790
|
-
constructor(
|
|
11791
|
-
this._options =
|
|
11810
|
+
constructor(_options2 = {}) {
|
|
11811
|
+
this._options = _options2;
|
|
11792
11812
|
this.absolute = this._getValue(this._options.absolute, false);
|
|
11793
11813
|
this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
|
|
11794
11814
|
this.braceExpansion = this._getValue(this._options.braceExpansion, true);
|
|
@@ -12228,8 +12248,8 @@ var require_ignore = __commonJS({
|
|
|
12228
12248
|
}
|
|
12229
12249
|
return ignoreCase ? new RegExp(source, "i") : new RegExp(source);
|
|
12230
12250
|
};
|
|
12231
|
-
var
|
|
12232
|
-
var checkPattern = (pattern) => pattern &&
|
|
12251
|
+
var isString2 = (subject) => typeof subject === "string";
|
|
12252
|
+
var checkPattern = (pattern) => pattern && isString2(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
|
|
12233
12253
|
var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
|
|
12234
12254
|
var IgnoreRule = class {
|
|
12235
12255
|
constructor(origin, pattern, negative, regex) {
|
|
@@ -12259,7 +12279,7 @@ var require_ignore = __commonJS({
|
|
|
12259
12279
|
throw new Ctor(message);
|
|
12260
12280
|
};
|
|
12261
12281
|
var checkPath = (path2, originalPath, doThrow) => {
|
|
12262
|
-
if (!
|
|
12282
|
+
if (!isString2(path2)) {
|
|
12263
12283
|
return doThrow(
|
|
12264
12284
|
`path must be a string, but got \`${originalPath}\``,
|
|
12265
12285
|
TypeError
|
|
@@ -12312,7 +12332,7 @@ var require_ignore = __commonJS({
|
|
|
12312
12332
|
add(pattern) {
|
|
12313
12333
|
this._added = false;
|
|
12314
12334
|
makeArray(
|
|
12315
|
-
|
|
12335
|
+
isString2(pattern) ? splitPattern(pattern) : pattern
|
|
12316
12336
|
).forEach(this._addPattern, this);
|
|
12317
12337
|
if (this._added) {
|
|
12318
12338
|
this._initCache();
|
|
@@ -12795,7 +12815,7 @@ var require_common3 = __commonJS({
|
|
|
12795
12815
|
function isNothing(subject) {
|
|
12796
12816
|
return typeof subject === "undefined" || subject === null;
|
|
12797
12817
|
}
|
|
12798
|
-
function
|
|
12818
|
+
function isObject2(subject) {
|
|
12799
12819
|
return typeof subject === "object" && subject !== null;
|
|
12800
12820
|
}
|
|
12801
12821
|
function toArray(sequence) {
|
|
@@ -12827,7 +12847,7 @@ var require_common3 = __commonJS({
|
|
|
12827
12847
|
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
|
12828
12848
|
}
|
|
12829
12849
|
module.exports.isNothing = isNothing;
|
|
12830
|
-
module.exports.isObject =
|
|
12850
|
+
module.exports.isObject = isObject2;
|
|
12831
12851
|
module.exports.toArray = toArray;
|
|
12832
12852
|
module.exports.repeat = repeat;
|
|
12833
12853
|
module.exports.isNegativeZero = isNegativeZero;
|
|
@@ -12853,7 +12873,7 @@ var require_exception = __commonJS({
|
|
|
12853
12873
|
}
|
|
12854
12874
|
YAMLException.prototype = Object.create(Error.prototype);
|
|
12855
12875
|
YAMLException.prototype.constructor = YAMLException;
|
|
12856
|
-
YAMLException.prototype.toString = function
|
|
12876
|
+
YAMLException.prototype.toString = function toString(compact) {
|
|
12857
12877
|
var result = this.name + ": ";
|
|
12858
12878
|
result += this.reason || "(unknown reason)";
|
|
12859
12879
|
if (!compact && this.mark) {
|
|
@@ -12906,7 +12926,7 @@ var require_mark = __commonJS({
|
|
|
12906
12926
|
snippet = this.buffer.slice(start, end);
|
|
12907
12927
|
return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^";
|
|
12908
12928
|
};
|
|
12909
|
-
Mark.prototype.toString = function
|
|
12929
|
+
Mark.prototype.toString = function toString(compact) {
|
|
12910
12930
|
var snippet, where = "";
|
|
12911
12931
|
if (this.name) {
|
|
12912
12932
|
where += 'in "' + this.name + '" ';
|
|
@@ -13142,14 +13162,14 @@ var require_null = __commonJS({
|
|
|
13142
13162
|
function constructYamlNull() {
|
|
13143
13163
|
return null;
|
|
13144
13164
|
}
|
|
13145
|
-
function
|
|
13165
|
+
function isNull2(object) {
|
|
13146
13166
|
return object === null;
|
|
13147
13167
|
}
|
|
13148
13168
|
module.exports = new Type("tag:yaml.org,2002:null", {
|
|
13149
13169
|
kind: "scalar",
|
|
13150
13170
|
resolve: resolveYamlNull,
|
|
13151
13171
|
construct: constructYamlNull,
|
|
13152
|
-
predicate:
|
|
13172
|
+
predicate: isNull2,
|
|
13153
13173
|
represent: {
|
|
13154
13174
|
canonical: function() {
|
|
13155
13175
|
return "~";
|
|
@@ -13183,14 +13203,14 @@ var require_bool = __commonJS({
|
|
|
13183
13203
|
function constructYamlBoolean(data) {
|
|
13184
13204
|
return data === "true" || data === "True" || data === "TRUE";
|
|
13185
13205
|
}
|
|
13186
|
-
function
|
|
13206
|
+
function isBoolean2(object) {
|
|
13187
13207
|
return Object.prototype.toString.call(object) === "[object Boolean]";
|
|
13188
13208
|
}
|
|
13189
13209
|
module.exports = new Type("tag:yaml.org,2002:bool", {
|
|
13190
13210
|
kind: "scalar",
|
|
13191
13211
|
resolve: resolveYamlBoolean,
|
|
13192
13212
|
construct: constructYamlBoolean,
|
|
13193
|
-
predicate:
|
|
13213
|
+
predicate: isBoolean2,
|
|
13194
13214
|
represent: {
|
|
13195
13215
|
lowercase: function(object) {
|
|
13196
13216
|
return object ? "true" : "false";
|
|
@@ -13324,14 +13344,14 @@ var require_int = __commonJS({
|
|
|
13324
13344
|
}
|
|
13325
13345
|
return sign * parseInt(value, 10);
|
|
13326
13346
|
}
|
|
13327
|
-
function
|
|
13347
|
+
function isInteger2(object) {
|
|
13328
13348
|
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
|
|
13329
13349
|
}
|
|
13330
13350
|
module.exports = new Type("tag:yaml.org,2002:int", {
|
|
13331
13351
|
kind: "scalar",
|
|
13332
13352
|
resolve: resolveYamlInteger,
|
|
13333
13353
|
construct: constructYamlInteger,
|
|
13334
|
-
predicate:
|
|
13354
|
+
predicate: isInteger2,
|
|
13335
13355
|
represent: {
|
|
13336
13356
|
binary: function(obj) {
|
|
13337
13357
|
return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
|
|
@@ -13817,14 +13837,14 @@ var require_undefined = __commonJS({
|
|
|
13817
13837
|
function representJavascriptUndefined() {
|
|
13818
13838
|
return "";
|
|
13819
13839
|
}
|
|
13820
|
-
function
|
|
13840
|
+
function isUndefined2(object) {
|
|
13821
13841
|
return typeof object === "undefined";
|
|
13822
13842
|
}
|
|
13823
13843
|
module.exports = new Type("tag:yaml.org,2002:js/undefined", {
|
|
13824
13844
|
kind: "scalar",
|
|
13825
13845
|
resolve: resolveJavascriptUndefined,
|
|
13826
13846
|
construct: constructJavascriptUndefined,
|
|
13827
|
-
predicate:
|
|
13847
|
+
predicate: isUndefined2,
|
|
13828
13848
|
represent: representJavascriptUndefined
|
|
13829
13849
|
});
|
|
13830
13850
|
}
|
|
@@ -13870,14 +13890,14 @@ var require_regexp = __commonJS({
|
|
|
13870
13890
|
result += "i";
|
|
13871
13891
|
return result;
|
|
13872
13892
|
}
|
|
13873
|
-
function
|
|
13893
|
+
function isRegExp2(object) {
|
|
13874
13894
|
return Object.prototype.toString.call(object) === "[object RegExp]";
|
|
13875
13895
|
}
|
|
13876
13896
|
module.exports = new Type("tag:yaml.org,2002:js/regexp", {
|
|
13877
13897
|
kind: "scalar",
|
|
13878
13898
|
resolve: resolveJavascriptRegExp,
|
|
13879
13899
|
construct: constructJavascriptRegExp,
|
|
13880
|
-
predicate:
|
|
13900
|
+
predicate: isRegExp2,
|
|
13881
13901
|
represent: representJavascriptRegExp
|
|
13882
13902
|
});
|
|
13883
13903
|
}
|
|
@@ -13927,14 +13947,14 @@ var require_function = __commonJS({
|
|
|
13927
13947
|
function representJavascriptFunction(object) {
|
|
13928
13948
|
return object.toString();
|
|
13929
13949
|
}
|
|
13930
|
-
function
|
|
13950
|
+
function isFunction3(object) {
|
|
13931
13951
|
return Object.prototype.toString.call(object) === "[object Function]";
|
|
13932
13952
|
}
|
|
13933
13953
|
module.exports = new Type("tag:yaml.org,2002:js/function", {
|
|
13934
13954
|
kind: "scalar",
|
|
13935
13955
|
resolve: resolveJavascriptFunction,
|
|
13936
13956
|
construct: constructJavascriptFunction,
|
|
13937
|
-
predicate:
|
|
13957
|
+
predicate: isFunction3,
|
|
13938
13958
|
represent: representJavascriptFunction
|
|
13939
13959
|
});
|
|
13940
13960
|
}
|
|
@@ -16634,7 +16654,7 @@ var require_document = __commonJS({
|
|
|
16634
16654
|
var tokenize = require_parse3().tokenize;
|
|
16635
16655
|
var stringify = require_stringify2().stringify;
|
|
16636
16656
|
var analyze = require_analyze().analyze;
|
|
16637
|
-
function
|
|
16657
|
+
function isObject2(x) {
|
|
16638
16658
|
return typeof x === "object" && x !== null;
|
|
16639
16659
|
}
|
|
16640
16660
|
function value_to_tokenlist(value, stack, options, is_key, indent) {
|
|
@@ -16783,7 +16803,7 @@ var require_document = __commonJS({
|
|
|
16783
16803
|
function error2(add) {
|
|
16784
16804
|
return Error("You can't " + (is_unset ? "unset" : "set") + " key '" + key + "'" + add);
|
|
16785
16805
|
}
|
|
16786
|
-
if (!
|
|
16806
|
+
if (!isObject2(object)) {
|
|
16787
16807
|
throw error2(" of an non-object");
|
|
16788
16808
|
}
|
|
16789
16809
|
if (Array.isArray(object)) {
|
|
@@ -16918,7 +16938,7 @@ var require_document = __commonJS({
|
|
|
16918
16938
|
path2 = arg_to_path(path2);
|
|
16919
16939
|
var data = this._data;
|
|
16920
16940
|
for (var i = 0; i < path2.length; i++) {
|
|
16921
|
-
if (!
|
|
16941
|
+
if (!isObject2(data))
|
|
16922
16942
|
return void 0;
|
|
16923
16943
|
data = data[path2[i]];
|
|
16924
16944
|
}
|
|
@@ -16928,7 +16948,7 @@ var require_document = __commonJS({
|
|
|
16928
16948
|
path2 = arg_to_path(path2);
|
|
16929
16949
|
var data = this._data;
|
|
16930
16950
|
for (var i = 0; i < path2.length; i++) {
|
|
16931
|
-
if (!
|
|
16951
|
+
if (!isObject2(data))
|
|
16932
16952
|
return false;
|
|
16933
16953
|
data = data[path2[i]];
|
|
16934
16954
|
}
|
|
@@ -16939,7 +16959,7 @@ var require_document = __commonJS({
|
|
|
16939
16959
|
change([], self._data, value);
|
|
16940
16960
|
return self;
|
|
16941
16961
|
function change(path2, old_data, new_data) {
|
|
16942
|
-
if (!
|
|
16962
|
+
if (!isObject2(new_data) || !isObject2(old_data)) {
|
|
16943
16963
|
if (new_data !== old_data)
|
|
16944
16964
|
self.set(path2, new_data);
|
|
16945
16965
|
} else if (Array.isArray(new_data) != Array.isArray(old_data)) {
|
|
@@ -20229,7 +20249,7 @@ var require_detect_indent = __commonJS({
|
|
|
20229
20249
|
}
|
|
20230
20250
|
});
|
|
20231
20251
|
|
|
20232
|
-
// node_modules/.pnpm/@sindresorhus+is@
|
|
20252
|
+
// node_modules/.pnpm/@sindresorhus+is@6.3.0/node_modules/@sindresorhus/is/dist/index.js
|
|
20233
20253
|
function isTypedArrayName(name) {
|
|
20234
20254
|
return typedArrayTypeNames.includes(name);
|
|
20235
20255
|
}
|
|
@@ -20239,10 +20259,7 @@ function isObjectTypeName(name) {
|
|
|
20239
20259
|
function isPrimitiveTypeName(name) {
|
|
20240
20260
|
return primitiveTypeNames.includes(name);
|
|
20241
20261
|
}
|
|
20242
|
-
function
|
|
20243
|
-
return (value) => typeof value === type;
|
|
20244
|
-
}
|
|
20245
|
-
function is(value) {
|
|
20262
|
+
function detect(value) {
|
|
20246
20263
|
if (value === null) {
|
|
20247
20264
|
return "null";
|
|
20248
20265
|
}
|
|
@@ -20270,13 +20287,13 @@ function is(value) {
|
|
|
20270
20287
|
}
|
|
20271
20288
|
default:
|
|
20272
20289
|
}
|
|
20273
|
-
if (
|
|
20290
|
+
if (isObservable(value)) {
|
|
20274
20291
|
return "Observable";
|
|
20275
20292
|
}
|
|
20276
|
-
if (
|
|
20293
|
+
if (isArray(value)) {
|
|
20277
20294
|
return "Array";
|
|
20278
20295
|
}
|
|
20279
|
-
if (
|
|
20296
|
+
if (isBuffer(value)) {
|
|
20280
20297
|
return "Buffer";
|
|
20281
20298
|
}
|
|
20282
20299
|
const tagType = getObjectType(value);
|
|
@@ -20288,9 +20305,807 @@ function is(value) {
|
|
|
20288
20305
|
}
|
|
20289
20306
|
return "Object";
|
|
20290
20307
|
}
|
|
20291
|
-
|
|
20308
|
+
function hasPromiseApi(value) {
|
|
20309
|
+
return isFunction(value?.then) && isFunction(value?.catch);
|
|
20310
|
+
}
|
|
20311
|
+
function isAbsoluteMod2(remainder) {
|
|
20312
|
+
return (value) => isInteger(value) && Math.abs(value % 2) === remainder;
|
|
20313
|
+
}
|
|
20314
|
+
function isAll(predicate, ...values) {
|
|
20315
|
+
return predicateOnArray(Array.prototype.every, predicate, values);
|
|
20316
|
+
}
|
|
20317
|
+
function isAny(predicate, ...values) {
|
|
20318
|
+
const predicates = isArray(predicate) ? predicate : [predicate];
|
|
20319
|
+
return predicates.some((singlePredicate) => predicateOnArray(Array.prototype.some, singlePredicate, values));
|
|
20320
|
+
}
|
|
20321
|
+
function isArray(value, assertion) {
|
|
20322
|
+
if (!Array.isArray(value)) {
|
|
20323
|
+
return false;
|
|
20324
|
+
}
|
|
20325
|
+
if (!isFunction(assertion)) {
|
|
20326
|
+
return true;
|
|
20327
|
+
}
|
|
20328
|
+
return value.every((element) => assertion(element));
|
|
20329
|
+
}
|
|
20330
|
+
function isArrayBuffer(value) {
|
|
20331
|
+
return getObjectType(value) === "ArrayBuffer";
|
|
20332
|
+
}
|
|
20333
|
+
function isArrayLike(value) {
|
|
20334
|
+
return !isNullOrUndefined(value) && !isFunction(value) && isValidLength(value.length);
|
|
20335
|
+
}
|
|
20336
|
+
function isAsyncFunction(value) {
|
|
20337
|
+
return getObjectType(value) === "AsyncFunction";
|
|
20338
|
+
}
|
|
20339
|
+
function isAsyncGenerator(value) {
|
|
20340
|
+
return isAsyncIterable(value) && isFunction(value.next) && isFunction(value.throw);
|
|
20341
|
+
}
|
|
20342
|
+
function isAsyncGeneratorFunction(value) {
|
|
20343
|
+
return getObjectType(value) === "AsyncGeneratorFunction";
|
|
20344
|
+
}
|
|
20345
|
+
function isAsyncIterable(value) {
|
|
20346
|
+
return isFunction(value?.[Symbol.asyncIterator]);
|
|
20347
|
+
}
|
|
20348
|
+
function isBigint(value) {
|
|
20349
|
+
return typeof value === "bigint";
|
|
20350
|
+
}
|
|
20351
|
+
function isBigInt64Array(value) {
|
|
20352
|
+
return getObjectType(value) === "BigInt64Array";
|
|
20353
|
+
}
|
|
20354
|
+
function isBigUint64Array(value) {
|
|
20355
|
+
return getObjectType(value) === "BigUint64Array";
|
|
20356
|
+
}
|
|
20357
|
+
function isBlob(value) {
|
|
20358
|
+
return getObjectType(value) === "Blob";
|
|
20359
|
+
}
|
|
20360
|
+
function isBoolean(value) {
|
|
20361
|
+
return value === true || value === false;
|
|
20362
|
+
}
|
|
20363
|
+
function isBoundFunction(value) {
|
|
20364
|
+
return isFunction(value) && !Object.prototype.hasOwnProperty.call(value, "prototype");
|
|
20365
|
+
}
|
|
20366
|
+
function isBuffer(value) {
|
|
20367
|
+
return value?.constructor?.isBuffer?.(value) ?? false;
|
|
20368
|
+
}
|
|
20369
|
+
function isClass(value) {
|
|
20370
|
+
return isFunction(value) && value.toString().startsWith("class ");
|
|
20371
|
+
}
|
|
20372
|
+
function isDataView(value) {
|
|
20373
|
+
return getObjectType(value) === "DataView";
|
|
20374
|
+
}
|
|
20375
|
+
function isDate(value) {
|
|
20376
|
+
return getObjectType(value) === "Date";
|
|
20377
|
+
}
|
|
20378
|
+
function isDirectInstanceOf(instance, class_) {
|
|
20379
|
+
if (instance === void 0 || instance === null) {
|
|
20380
|
+
return false;
|
|
20381
|
+
}
|
|
20382
|
+
return Object.getPrototypeOf(instance) === class_.prototype;
|
|
20383
|
+
}
|
|
20384
|
+
function isEmptyArray(value) {
|
|
20385
|
+
return isArray(value) && value.length === 0;
|
|
20386
|
+
}
|
|
20387
|
+
function isEmptyMap(value) {
|
|
20388
|
+
return isMap(value) && value.size === 0;
|
|
20389
|
+
}
|
|
20390
|
+
function isEmptyObject(value) {
|
|
20391
|
+
return isObject(value) && !isMap(value) && !isSet(value) && Object.keys(value).length === 0;
|
|
20392
|
+
}
|
|
20393
|
+
function isEmptySet(value) {
|
|
20394
|
+
return isSet(value) && value.size === 0;
|
|
20395
|
+
}
|
|
20396
|
+
function isEmptyString(value) {
|
|
20397
|
+
return isString(value) && value.length === 0;
|
|
20398
|
+
}
|
|
20399
|
+
function isEmptyStringOrWhitespace(value) {
|
|
20400
|
+
return isEmptyString(value) || isWhitespaceString(value);
|
|
20401
|
+
}
|
|
20402
|
+
function isEnumCase(value, targetEnum) {
|
|
20403
|
+
return Object.values(targetEnum).includes(value);
|
|
20404
|
+
}
|
|
20405
|
+
function isError(value) {
|
|
20406
|
+
return getObjectType(value) === "Error";
|
|
20407
|
+
}
|
|
20408
|
+
function isEvenInteger(value) {
|
|
20409
|
+
return isAbsoluteMod2(0)(value);
|
|
20410
|
+
}
|
|
20411
|
+
function isFalsy(value) {
|
|
20412
|
+
return !value;
|
|
20413
|
+
}
|
|
20414
|
+
function isFloat32Array(value) {
|
|
20415
|
+
return getObjectType(value) === "Float32Array";
|
|
20416
|
+
}
|
|
20417
|
+
function isFloat64Array(value) {
|
|
20418
|
+
return getObjectType(value) === "Float64Array";
|
|
20419
|
+
}
|
|
20420
|
+
function isFormData(value) {
|
|
20421
|
+
return getObjectType(value) === "FormData";
|
|
20422
|
+
}
|
|
20423
|
+
function isFunction(value) {
|
|
20424
|
+
return typeof value === "function";
|
|
20425
|
+
}
|
|
20426
|
+
function isGenerator(value) {
|
|
20427
|
+
return isIterable(value) && isFunction(value?.next) && isFunction(value?.throw);
|
|
20428
|
+
}
|
|
20429
|
+
function isGeneratorFunction(value) {
|
|
20430
|
+
return getObjectType(value) === "GeneratorFunction";
|
|
20431
|
+
}
|
|
20432
|
+
function isHtmlElement(value) {
|
|
20433
|
+
return isObject(value) && value.nodeType === NODE_TYPE_ELEMENT && isString(value.nodeName) && !isPlainObject(value) && DOM_PROPERTIES_TO_CHECK.every((property) => property in value);
|
|
20434
|
+
}
|
|
20435
|
+
function isInfinite(value) {
|
|
20436
|
+
return value === Number.POSITIVE_INFINITY || value === Number.NEGATIVE_INFINITY;
|
|
20437
|
+
}
|
|
20438
|
+
function isInRange(value, range) {
|
|
20439
|
+
if (isNumber(range)) {
|
|
20440
|
+
return value >= Math.min(0, range) && value <= Math.max(range, 0);
|
|
20441
|
+
}
|
|
20442
|
+
if (isArray(range) && range.length === 2) {
|
|
20443
|
+
return value >= Math.min(...range) && value <= Math.max(...range);
|
|
20444
|
+
}
|
|
20445
|
+
throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
|
|
20446
|
+
}
|
|
20447
|
+
function isInt16Array(value) {
|
|
20448
|
+
return getObjectType(value) === "Int16Array";
|
|
20449
|
+
}
|
|
20450
|
+
function isInt32Array(value) {
|
|
20451
|
+
return getObjectType(value) === "Int32Array";
|
|
20452
|
+
}
|
|
20453
|
+
function isInt8Array(value) {
|
|
20454
|
+
return getObjectType(value) === "Int8Array";
|
|
20455
|
+
}
|
|
20456
|
+
function isInteger(value) {
|
|
20457
|
+
return Number.isInteger(value);
|
|
20458
|
+
}
|
|
20459
|
+
function isIterable(value) {
|
|
20460
|
+
return isFunction(value?.[Symbol.iterator]);
|
|
20461
|
+
}
|
|
20462
|
+
function isMap(value) {
|
|
20463
|
+
return getObjectType(value) === "Map";
|
|
20464
|
+
}
|
|
20465
|
+
function isNan(value) {
|
|
20466
|
+
return Number.isNaN(value);
|
|
20467
|
+
}
|
|
20468
|
+
function isNativePromise(value) {
|
|
20469
|
+
return getObjectType(value) === "Promise";
|
|
20470
|
+
}
|
|
20471
|
+
function isNegativeNumber(value) {
|
|
20472
|
+
return isNumber(value) && value < 0;
|
|
20473
|
+
}
|
|
20474
|
+
function isNodeStream(value) {
|
|
20475
|
+
return isObject(value) && isFunction(value.pipe) && !isObservable(value);
|
|
20476
|
+
}
|
|
20477
|
+
function isNonEmptyArray(value) {
|
|
20478
|
+
return isArray(value) && value.length > 0;
|
|
20479
|
+
}
|
|
20480
|
+
function isNonEmptyMap(value) {
|
|
20481
|
+
return isMap(value) && value.size > 0;
|
|
20482
|
+
}
|
|
20483
|
+
function isNonEmptyObject(value) {
|
|
20484
|
+
return isObject(value) && !isMap(value) && !isSet(value) && Object.keys(value).length > 0;
|
|
20485
|
+
}
|
|
20486
|
+
function isNonEmptySet(value) {
|
|
20487
|
+
return isSet(value) && value.size > 0;
|
|
20488
|
+
}
|
|
20489
|
+
function isNonEmptyString(value) {
|
|
20490
|
+
return isString(value) && value.length > 0;
|
|
20491
|
+
}
|
|
20492
|
+
function isNonEmptyStringAndNotWhitespace(value) {
|
|
20493
|
+
return isString(value) && !isEmptyStringOrWhitespace(value);
|
|
20494
|
+
}
|
|
20495
|
+
function isNull(value) {
|
|
20496
|
+
return value === null;
|
|
20497
|
+
}
|
|
20498
|
+
function isNullOrUndefined(value) {
|
|
20499
|
+
return isNull(value) || isUndefined(value);
|
|
20500
|
+
}
|
|
20501
|
+
function isNumber(value) {
|
|
20502
|
+
return typeof value === "number" && !Number.isNaN(value);
|
|
20503
|
+
}
|
|
20504
|
+
function isNumericString(value) {
|
|
20505
|
+
return isString(value) && !isEmptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
|
|
20506
|
+
}
|
|
20507
|
+
function isObject(value) {
|
|
20508
|
+
return !isNull(value) && (typeof value === "object" || isFunction(value));
|
|
20509
|
+
}
|
|
20510
|
+
function isObservable(value) {
|
|
20511
|
+
if (!value) {
|
|
20512
|
+
return false;
|
|
20513
|
+
}
|
|
20514
|
+
if (value === value[Symbol.observable]?.()) {
|
|
20515
|
+
return true;
|
|
20516
|
+
}
|
|
20517
|
+
if (value === value["@@observable"]?.()) {
|
|
20518
|
+
return true;
|
|
20519
|
+
}
|
|
20520
|
+
return false;
|
|
20521
|
+
}
|
|
20522
|
+
function isOddInteger(value) {
|
|
20523
|
+
return isAbsoluteMod2(1)(value);
|
|
20524
|
+
}
|
|
20525
|
+
function isPlainObject(value) {
|
|
20526
|
+
if (typeof value !== "object" || value === null) {
|
|
20527
|
+
return false;
|
|
20528
|
+
}
|
|
20529
|
+
const prototype = Object.getPrototypeOf(value);
|
|
20530
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
20531
|
+
}
|
|
20532
|
+
function isPositiveNumber(value) {
|
|
20533
|
+
return isNumber(value) && value > 0;
|
|
20534
|
+
}
|
|
20535
|
+
function isPrimitive(value) {
|
|
20536
|
+
return isNull(value) || isPrimitiveTypeName(typeof value);
|
|
20537
|
+
}
|
|
20538
|
+
function isPromise(value) {
|
|
20539
|
+
return isNativePromise(value) || hasPromiseApi(value);
|
|
20540
|
+
}
|
|
20541
|
+
function isPropertyKey(value) {
|
|
20542
|
+
return isAny([isString, isNumber, isSymbol], value);
|
|
20543
|
+
}
|
|
20544
|
+
function isRegExp(value) {
|
|
20545
|
+
return getObjectType(value) === "RegExp";
|
|
20546
|
+
}
|
|
20547
|
+
function isSafeInteger(value) {
|
|
20548
|
+
return Number.isSafeInteger(value);
|
|
20549
|
+
}
|
|
20550
|
+
function isSet(value) {
|
|
20551
|
+
return getObjectType(value) === "Set";
|
|
20552
|
+
}
|
|
20553
|
+
function isSharedArrayBuffer(value) {
|
|
20554
|
+
return getObjectType(value) === "SharedArrayBuffer";
|
|
20555
|
+
}
|
|
20556
|
+
function isString(value) {
|
|
20557
|
+
return typeof value === "string";
|
|
20558
|
+
}
|
|
20559
|
+
function isSymbol(value) {
|
|
20560
|
+
return typeof value === "symbol";
|
|
20561
|
+
}
|
|
20562
|
+
function isTruthy(value) {
|
|
20563
|
+
return Boolean(value);
|
|
20564
|
+
}
|
|
20565
|
+
function isTupleLike(value, guards) {
|
|
20566
|
+
if (isArray(guards) && isArray(value) && guards.length === value.length) {
|
|
20567
|
+
return guards.every((guard, index) => guard(value[index]));
|
|
20568
|
+
}
|
|
20569
|
+
return false;
|
|
20570
|
+
}
|
|
20571
|
+
function isTypedArray(value) {
|
|
20572
|
+
return isTypedArrayName(getObjectType(value));
|
|
20573
|
+
}
|
|
20574
|
+
function isUint16Array(value) {
|
|
20575
|
+
return getObjectType(value) === "Uint16Array";
|
|
20576
|
+
}
|
|
20577
|
+
function isUint32Array(value) {
|
|
20578
|
+
return getObjectType(value) === "Uint32Array";
|
|
20579
|
+
}
|
|
20580
|
+
function isUint8Array(value) {
|
|
20581
|
+
return getObjectType(value) === "Uint8Array";
|
|
20582
|
+
}
|
|
20583
|
+
function isUint8ClampedArray(value) {
|
|
20584
|
+
return getObjectType(value) === "Uint8ClampedArray";
|
|
20585
|
+
}
|
|
20586
|
+
function isUndefined(value) {
|
|
20587
|
+
return value === void 0;
|
|
20588
|
+
}
|
|
20589
|
+
function isUrlInstance(value) {
|
|
20590
|
+
return getObjectType(value) === "URL";
|
|
20591
|
+
}
|
|
20592
|
+
function isUrlSearchParams(value) {
|
|
20593
|
+
return getObjectType(value) === "URLSearchParams";
|
|
20594
|
+
}
|
|
20595
|
+
function isUrlString(value) {
|
|
20596
|
+
if (!isString(value)) {
|
|
20597
|
+
return false;
|
|
20598
|
+
}
|
|
20599
|
+
try {
|
|
20600
|
+
new URL(value);
|
|
20601
|
+
return true;
|
|
20602
|
+
} catch {
|
|
20603
|
+
return false;
|
|
20604
|
+
}
|
|
20605
|
+
}
|
|
20606
|
+
function isValidDate(value) {
|
|
20607
|
+
return isDate(value) && !isNan(Number(value));
|
|
20608
|
+
}
|
|
20609
|
+
function isValidLength(value) {
|
|
20610
|
+
return isSafeInteger(value) && value >= 0;
|
|
20611
|
+
}
|
|
20612
|
+
function isWeakMap(value) {
|
|
20613
|
+
return getObjectType(value) === "WeakMap";
|
|
20614
|
+
}
|
|
20615
|
+
function isWeakRef(value) {
|
|
20616
|
+
return getObjectType(value) === "WeakRef";
|
|
20617
|
+
}
|
|
20618
|
+
function isWeakSet(value) {
|
|
20619
|
+
return getObjectType(value) === "WeakSet";
|
|
20620
|
+
}
|
|
20621
|
+
function isWhitespaceString(value) {
|
|
20622
|
+
return isString(value) && /^\s+$/.test(value);
|
|
20623
|
+
}
|
|
20624
|
+
function predicateOnArray(method, predicate, values) {
|
|
20625
|
+
if (!isFunction(predicate)) {
|
|
20626
|
+
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
|
|
20627
|
+
}
|
|
20628
|
+
if (values.length === 0) {
|
|
20629
|
+
throw new TypeError("Invalid number of values");
|
|
20630
|
+
}
|
|
20631
|
+
return method.call(values, predicate);
|
|
20632
|
+
}
|
|
20633
|
+
function typeErrorMessage(description, value) {
|
|
20634
|
+
return `Expected value which is \`${description}\`, received value of type \`${is(value)}\`.`;
|
|
20635
|
+
}
|
|
20636
|
+
function unique(values) {
|
|
20637
|
+
return Array.from(new Set(values));
|
|
20638
|
+
}
|
|
20639
|
+
function typeErrorMessageMultipleValues(expectedType, values) {
|
|
20640
|
+
const uniqueExpectedTypes = unique((isArray(expectedType) ? expectedType : [expectedType]).map((value) => `\`${value}\``));
|
|
20641
|
+
const uniqueValueTypes = unique(values.map((value) => `\`${is(value)}\``));
|
|
20642
|
+
return `Expected values which are ${orFormatter.format(uniqueExpectedTypes)}. Received values of type${uniqueValueTypes.length > 1 ? "s" : ""} ${andFormatter.format(uniqueValueTypes)}.`;
|
|
20643
|
+
}
|
|
20644
|
+
function keysOf(value) {
|
|
20645
|
+
return Object.keys(value);
|
|
20646
|
+
}
|
|
20647
|
+
function isIsMethodName(value) {
|
|
20648
|
+
return isMethodNames.includes(value);
|
|
20649
|
+
}
|
|
20650
|
+
function assertAll(predicate, ...values) {
|
|
20651
|
+
if (!isAll(predicate, ...values)) {
|
|
20652
|
+
const expectedType = isIsMethodName(predicate.name) ? methodTypeMap[predicate.name] : "predicate returns truthy for all values";
|
|
20653
|
+
throw new TypeError(typeErrorMessageMultipleValues(expectedType, values));
|
|
20654
|
+
}
|
|
20655
|
+
}
|
|
20656
|
+
function assertAny(predicate, ...values) {
|
|
20657
|
+
if (!isAny(predicate, ...values)) {
|
|
20658
|
+
const predicates = isArray(predicate) ? predicate : [predicate];
|
|
20659
|
+
const expectedTypes = predicates.map((predicate2) => isIsMethodName(predicate2.name) ? methodTypeMap[predicate2.name] : "predicate returns truthy for any value");
|
|
20660
|
+
throw new TypeError(typeErrorMessageMultipleValues(expectedTypes, values));
|
|
20661
|
+
}
|
|
20662
|
+
}
|
|
20663
|
+
function assertArray(value, assertion, message) {
|
|
20664
|
+
if (!isArray(value)) {
|
|
20665
|
+
throw new TypeError(message ?? typeErrorMessage("Array", value));
|
|
20666
|
+
}
|
|
20667
|
+
if (assertion) {
|
|
20668
|
+
value.forEach(assertion);
|
|
20669
|
+
}
|
|
20670
|
+
}
|
|
20671
|
+
function assertArrayBuffer(value, message) {
|
|
20672
|
+
if (!isArrayBuffer(value)) {
|
|
20673
|
+
throw new TypeError(message ?? typeErrorMessage("ArrayBuffer", value));
|
|
20674
|
+
}
|
|
20675
|
+
}
|
|
20676
|
+
function assertArrayLike(value, message) {
|
|
20677
|
+
if (!isArrayLike(value)) {
|
|
20678
|
+
throw new TypeError(message ?? typeErrorMessage("array-like", value));
|
|
20679
|
+
}
|
|
20680
|
+
}
|
|
20681
|
+
function assertAsyncFunction(value, message) {
|
|
20682
|
+
if (!isAsyncFunction(value)) {
|
|
20683
|
+
throw new TypeError(message ?? typeErrorMessage("AsyncFunction", value));
|
|
20684
|
+
}
|
|
20685
|
+
}
|
|
20686
|
+
function assertAsyncGenerator(value, message) {
|
|
20687
|
+
if (!isAsyncGenerator(value)) {
|
|
20688
|
+
throw new TypeError(message ?? typeErrorMessage("AsyncGenerator", value));
|
|
20689
|
+
}
|
|
20690
|
+
}
|
|
20691
|
+
function assertAsyncGeneratorFunction(value, message) {
|
|
20692
|
+
if (!isAsyncGeneratorFunction(value)) {
|
|
20693
|
+
throw new TypeError(message ?? typeErrorMessage("AsyncGeneratorFunction", value));
|
|
20694
|
+
}
|
|
20695
|
+
}
|
|
20696
|
+
function assertAsyncIterable(value, message) {
|
|
20697
|
+
if (!isAsyncIterable(value)) {
|
|
20698
|
+
throw new TypeError(message ?? typeErrorMessage("AsyncIterable", value));
|
|
20699
|
+
}
|
|
20700
|
+
}
|
|
20701
|
+
function assertBigint(value, message) {
|
|
20702
|
+
if (!isBigint(value)) {
|
|
20703
|
+
throw new TypeError(message ?? typeErrorMessage("bigint", value));
|
|
20704
|
+
}
|
|
20705
|
+
}
|
|
20706
|
+
function assertBigInt64Array(value, message) {
|
|
20707
|
+
if (!isBigInt64Array(value)) {
|
|
20708
|
+
throw new TypeError(message ?? typeErrorMessage("BigInt64Array", value));
|
|
20709
|
+
}
|
|
20710
|
+
}
|
|
20711
|
+
function assertBigUint64Array(value, message) {
|
|
20712
|
+
if (!isBigUint64Array(value)) {
|
|
20713
|
+
throw new TypeError(message ?? typeErrorMessage("BigUint64Array", value));
|
|
20714
|
+
}
|
|
20715
|
+
}
|
|
20716
|
+
function assertBlob(value, message) {
|
|
20717
|
+
if (!isBlob(value)) {
|
|
20718
|
+
throw new TypeError(message ?? typeErrorMessage("Blob", value));
|
|
20719
|
+
}
|
|
20720
|
+
}
|
|
20721
|
+
function assertBoolean(value, message) {
|
|
20722
|
+
if (!isBoolean(value)) {
|
|
20723
|
+
throw new TypeError(message ?? typeErrorMessage("boolean", value));
|
|
20724
|
+
}
|
|
20725
|
+
}
|
|
20726
|
+
function assertBoundFunction(value, message) {
|
|
20727
|
+
if (!isBoundFunction(value)) {
|
|
20728
|
+
throw new TypeError(message ?? typeErrorMessage("Function", value));
|
|
20729
|
+
}
|
|
20730
|
+
}
|
|
20731
|
+
function assertBuffer(value, message) {
|
|
20732
|
+
if (!isBuffer(value)) {
|
|
20733
|
+
throw new TypeError(message ?? typeErrorMessage("Buffer", value));
|
|
20734
|
+
}
|
|
20735
|
+
}
|
|
20736
|
+
function assertClass(value, message) {
|
|
20737
|
+
if (!isClass(value)) {
|
|
20738
|
+
throw new TypeError(message ?? typeErrorMessage("Class", value));
|
|
20739
|
+
}
|
|
20740
|
+
}
|
|
20741
|
+
function assertDataView(value, message) {
|
|
20742
|
+
if (!isDataView(value)) {
|
|
20743
|
+
throw new TypeError(message ?? typeErrorMessage("DataView", value));
|
|
20744
|
+
}
|
|
20745
|
+
}
|
|
20746
|
+
function assertDate(value, message) {
|
|
20747
|
+
if (!isDate(value)) {
|
|
20748
|
+
throw new TypeError(message ?? typeErrorMessage("Date", value));
|
|
20749
|
+
}
|
|
20750
|
+
}
|
|
20751
|
+
function assertDirectInstanceOf(instance, class_, message) {
|
|
20752
|
+
if (!isDirectInstanceOf(instance, class_)) {
|
|
20753
|
+
throw new TypeError(message ?? typeErrorMessage("T", instance));
|
|
20754
|
+
}
|
|
20755
|
+
}
|
|
20756
|
+
function assertEmptyArray(value, message) {
|
|
20757
|
+
if (!isEmptyArray(value)) {
|
|
20758
|
+
throw new TypeError(message ?? typeErrorMessage("empty array", value));
|
|
20759
|
+
}
|
|
20760
|
+
}
|
|
20761
|
+
function assertEmptyMap(value, message) {
|
|
20762
|
+
if (!isEmptyMap(value)) {
|
|
20763
|
+
throw new TypeError(message ?? typeErrorMessage("empty map", value));
|
|
20764
|
+
}
|
|
20765
|
+
}
|
|
20766
|
+
function assertEmptyObject(value, message) {
|
|
20767
|
+
if (!isEmptyObject(value)) {
|
|
20768
|
+
throw new TypeError(message ?? typeErrorMessage("empty object", value));
|
|
20769
|
+
}
|
|
20770
|
+
}
|
|
20771
|
+
function assertEmptySet(value, message) {
|
|
20772
|
+
if (!isEmptySet(value)) {
|
|
20773
|
+
throw new TypeError(message ?? typeErrorMessage("empty set", value));
|
|
20774
|
+
}
|
|
20775
|
+
}
|
|
20776
|
+
function assertEmptyString(value, message) {
|
|
20777
|
+
if (!isEmptyString(value)) {
|
|
20778
|
+
throw new TypeError(message ?? typeErrorMessage("empty string", value));
|
|
20779
|
+
}
|
|
20780
|
+
}
|
|
20781
|
+
function assertEmptyStringOrWhitespace(value, message) {
|
|
20782
|
+
if (!isEmptyStringOrWhitespace(value)) {
|
|
20783
|
+
throw new TypeError(message ?? typeErrorMessage("empty string or whitespace", value));
|
|
20784
|
+
}
|
|
20785
|
+
}
|
|
20786
|
+
function assertEnumCase(value, targetEnum, message) {
|
|
20787
|
+
if (!isEnumCase(value, targetEnum)) {
|
|
20788
|
+
throw new TypeError(message ?? typeErrorMessage("EnumCase", value));
|
|
20789
|
+
}
|
|
20790
|
+
}
|
|
20791
|
+
function assertError(value, message) {
|
|
20792
|
+
if (!isError(value)) {
|
|
20793
|
+
throw new TypeError(message ?? typeErrorMessage("Error", value));
|
|
20794
|
+
}
|
|
20795
|
+
}
|
|
20796
|
+
function assertEvenInteger(value, message) {
|
|
20797
|
+
if (!isEvenInteger(value)) {
|
|
20798
|
+
throw new TypeError(message ?? typeErrorMessage("even integer", value));
|
|
20799
|
+
}
|
|
20800
|
+
}
|
|
20801
|
+
function assertFalsy(value, message) {
|
|
20802
|
+
if (!isFalsy(value)) {
|
|
20803
|
+
throw new TypeError(message ?? typeErrorMessage("falsy", value));
|
|
20804
|
+
}
|
|
20805
|
+
}
|
|
20806
|
+
function assertFloat32Array(value, message) {
|
|
20807
|
+
if (!isFloat32Array(value)) {
|
|
20808
|
+
throw new TypeError(message ?? typeErrorMessage("Float32Array", value));
|
|
20809
|
+
}
|
|
20810
|
+
}
|
|
20811
|
+
function assertFloat64Array(value, message) {
|
|
20812
|
+
if (!isFloat64Array(value)) {
|
|
20813
|
+
throw new TypeError(message ?? typeErrorMessage("Float64Array", value));
|
|
20814
|
+
}
|
|
20815
|
+
}
|
|
20816
|
+
function assertFormData(value, message) {
|
|
20817
|
+
if (!isFormData(value)) {
|
|
20818
|
+
throw new TypeError(message ?? typeErrorMessage("FormData", value));
|
|
20819
|
+
}
|
|
20820
|
+
}
|
|
20821
|
+
function assertFunction(value, message) {
|
|
20822
|
+
if (!isFunction(value)) {
|
|
20823
|
+
throw new TypeError(message ?? typeErrorMessage("Function", value));
|
|
20824
|
+
}
|
|
20825
|
+
}
|
|
20826
|
+
function assertGenerator(value, message) {
|
|
20827
|
+
if (!isGenerator(value)) {
|
|
20828
|
+
throw new TypeError(message ?? typeErrorMessage("Generator", value));
|
|
20829
|
+
}
|
|
20830
|
+
}
|
|
20831
|
+
function assertGeneratorFunction(value, message) {
|
|
20832
|
+
if (!isGeneratorFunction(value)) {
|
|
20833
|
+
throw new TypeError(message ?? typeErrorMessage("GeneratorFunction", value));
|
|
20834
|
+
}
|
|
20835
|
+
}
|
|
20836
|
+
function assertHtmlElement(value, message) {
|
|
20837
|
+
if (!isHtmlElement(value)) {
|
|
20838
|
+
throw new TypeError(message ?? typeErrorMessage("HTMLElement", value));
|
|
20839
|
+
}
|
|
20840
|
+
}
|
|
20841
|
+
function assertInfinite(value, message) {
|
|
20842
|
+
if (!isInfinite(value)) {
|
|
20843
|
+
throw new TypeError(message ?? typeErrorMessage("infinite number", value));
|
|
20844
|
+
}
|
|
20845
|
+
}
|
|
20846
|
+
function assertInRange(value, range, message) {
|
|
20847
|
+
if (!isInRange(value, range)) {
|
|
20848
|
+
throw new TypeError(message ?? typeErrorMessage("in range", value));
|
|
20849
|
+
}
|
|
20850
|
+
}
|
|
20851
|
+
function assertInt16Array(value, message) {
|
|
20852
|
+
if (!isInt16Array(value)) {
|
|
20853
|
+
throw new TypeError(message ?? typeErrorMessage("Int16Array", value));
|
|
20854
|
+
}
|
|
20855
|
+
}
|
|
20856
|
+
function assertInt32Array(value, message) {
|
|
20857
|
+
if (!isInt32Array(value)) {
|
|
20858
|
+
throw new TypeError(message ?? typeErrorMessage("Int32Array", value));
|
|
20859
|
+
}
|
|
20860
|
+
}
|
|
20861
|
+
function assertInt8Array(value, message) {
|
|
20862
|
+
if (!isInt8Array(value)) {
|
|
20863
|
+
throw new TypeError(message ?? typeErrorMessage("Int8Array", value));
|
|
20864
|
+
}
|
|
20865
|
+
}
|
|
20866
|
+
function assertInteger(value, message) {
|
|
20867
|
+
if (!isInteger(value)) {
|
|
20868
|
+
throw new TypeError(message ?? typeErrorMessage("integer", value));
|
|
20869
|
+
}
|
|
20870
|
+
}
|
|
20871
|
+
function assertIterable(value, message) {
|
|
20872
|
+
if (!isIterable(value)) {
|
|
20873
|
+
throw new TypeError(message ?? typeErrorMessage("Iterable", value));
|
|
20874
|
+
}
|
|
20875
|
+
}
|
|
20876
|
+
function assertMap(value, message) {
|
|
20877
|
+
if (!isMap(value)) {
|
|
20878
|
+
throw new TypeError(message ?? typeErrorMessage("Map", value));
|
|
20879
|
+
}
|
|
20880
|
+
}
|
|
20881
|
+
function assertNan(value, message) {
|
|
20882
|
+
if (!isNan(value)) {
|
|
20883
|
+
throw new TypeError(message ?? typeErrorMessage("NaN", value));
|
|
20884
|
+
}
|
|
20885
|
+
}
|
|
20886
|
+
function assertNativePromise(value, message) {
|
|
20887
|
+
if (!isNativePromise(value)) {
|
|
20888
|
+
throw new TypeError(message ?? typeErrorMessage("native Promise", value));
|
|
20889
|
+
}
|
|
20890
|
+
}
|
|
20891
|
+
function assertNegativeNumber(value, message) {
|
|
20892
|
+
if (!isNegativeNumber(value)) {
|
|
20893
|
+
throw new TypeError(message ?? typeErrorMessage("negative number", value));
|
|
20894
|
+
}
|
|
20895
|
+
}
|
|
20896
|
+
function assertNodeStream(value, message) {
|
|
20897
|
+
if (!isNodeStream(value)) {
|
|
20898
|
+
throw new TypeError(message ?? typeErrorMessage("Node.js Stream", value));
|
|
20899
|
+
}
|
|
20900
|
+
}
|
|
20901
|
+
function assertNonEmptyArray(value, message) {
|
|
20902
|
+
if (!isNonEmptyArray(value)) {
|
|
20903
|
+
throw new TypeError(message ?? typeErrorMessage("non-empty array", value));
|
|
20904
|
+
}
|
|
20905
|
+
}
|
|
20906
|
+
function assertNonEmptyMap(value, message) {
|
|
20907
|
+
if (!isNonEmptyMap(value)) {
|
|
20908
|
+
throw new TypeError(message ?? typeErrorMessage("non-empty map", value));
|
|
20909
|
+
}
|
|
20910
|
+
}
|
|
20911
|
+
function assertNonEmptyObject(value, message) {
|
|
20912
|
+
if (!isNonEmptyObject(value)) {
|
|
20913
|
+
throw new TypeError(message ?? typeErrorMessage("non-empty object", value));
|
|
20914
|
+
}
|
|
20915
|
+
}
|
|
20916
|
+
function assertNonEmptySet(value, message) {
|
|
20917
|
+
if (!isNonEmptySet(value)) {
|
|
20918
|
+
throw new TypeError(message ?? typeErrorMessage("non-empty set", value));
|
|
20919
|
+
}
|
|
20920
|
+
}
|
|
20921
|
+
function assertNonEmptyString(value, message) {
|
|
20922
|
+
if (!isNonEmptyString(value)) {
|
|
20923
|
+
throw new TypeError(message ?? typeErrorMessage("non-empty string", value));
|
|
20924
|
+
}
|
|
20925
|
+
}
|
|
20926
|
+
function assertNonEmptyStringAndNotWhitespace(value, message) {
|
|
20927
|
+
if (!isNonEmptyStringAndNotWhitespace(value)) {
|
|
20928
|
+
throw new TypeError(message ?? typeErrorMessage("non-empty string and not whitespace", value));
|
|
20929
|
+
}
|
|
20930
|
+
}
|
|
20931
|
+
function assertNull(value, message) {
|
|
20932
|
+
if (!isNull(value)) {
|
|
20933
|
+
throw new TypeError(message ?? typeErrorMessage("null", value));
|
|
20934
|
+
}
|
|
20935
|
+
}
|
|
20936
|
+
function assertNullOrUndefined(value, message) {
|
|
20937
|
+
if (!isNullOrUndefined(value)) {
|
|
20938
|
+
throw new TypeError(message ?? typeErrorMessage("null or undefined", value));
|
|
20939
|
+
}
|
|
20940
|
+
}
|
|
20941
|
+
function assertNumber(value, message) {
|
|
20942
|
+
if (!isNumber(value)) {
|
|
20943
|
+
throw new TypeError(message ?? typeErrorMessage("number", value));
|
|
20944
|
+
}
|
|
20945
|
+
}
|
|
20946
|
+
function assertNumericString(value, message) {
|
|
20947
|
+
if (!isNumericString(value)) {
|
|
20948
|
+
throw new TypeError(message ?? typeErrorMessage("string with a number", value));
|
|
20949
|
+
}
|
|
20950
|
+
}
|
|
20951
|
+
function assertObject(value, message) {
|
|
20952
|
+
if (!isObject(value)) {
|
|
20953
|
+
throw new TypeError(message ?? typeErrorMessage("Object", value));
|
|
20954
|
+
}
|
|
20955
|
+
}
|
|
20956
|
+
function assertObservable(value, message) {
|
|
20957
|
+
if (!isObservable(value)) {
|
|
20958
|
+
throw new TypeError(message ?? typeErrorMessage("Observable", value));
|
|
20959
|
+
}
|
|
20960
|
+
}
|
|
20961
|
+
function assertOddInteger(value, message) {
|
|
20962
|
+
if (!isOddInteger(value)) {
|
|
20963
|
+
throw new TypeError(message ?? typeErrorMessage("odd integer", value));
|
|
20964
|
+
}
|
|
20965
|
+
}
|
|
20966
|
+
function assertPlainObject(value, message) {
|
|
20967
|
+
if (!isPlainObject(value)) {
|
|
20968
|
+
throw new TypeError(message ?? typeErrorMessage("plain object", value));
|
|
20969
|
+
}
|
|
20970
|
+
}
|
|
20971
|
+
function assertPositiveNumber(value, message) {
|
|
20972
|
+
if (!isPositiveNumber(value)) {
|
|
20973
|
+
throw new TypeError(message ?? typeErrorMessage("positive number", value));
|
|
20974
|
+
}
|
|
20975
|
+
}
|
|
20976
|
+
function assertPrimitive(value, message) {
|
|
20977
|
+
if (!isPrimitive(value)) {
|
|
20978
|
+
throw new TypeError(message ?? typeErrorMessage("primitive", value));
|
|
20979
|
+
}
|
|
20980
|
+
}
|
|
20981
|
+
function assertPromise(value, message) {
|
|
20982
|
+
if (!isPromise(value)) {
|
|
20983
|
+
throw new TypeError(message ?? typeErrorMessage("Promise", value));
|
|
20984
|
+
}
|
|
20985
|
+
}
|
|
20986
|
+
function assertPropertyKey(value, message) {
|
|
20987
|
+
if (!isPropertyKey(value)) {
|
|
20988
|
+
throw new TypeError(message ?? typeErrorMessage("PropertyKey", value));
|
|
20989
|
+
}
|
|
20990
|
+
}
|
|
20991
|
+
function assertRegExp(value, message) {
|
|
20992
|
+
if (!isRegExp(value)) {
|
|
20993
|
+
throw new TypeError(message ?? typeErrorMessage("RegExp", value));
|
|
20994
|
+
}
|
|
20995
|
+
}
|
|
20996
|
+
function assertSafeInteger(value, message) {
|
|
20997
|
+
if (!isSafeInteger(value)) {
|
|
20998
|
+
throw new TypeError(message ?? typeErrorMessage("integer", value));
|
|
20999
|
+
}
|
|
21000
|
+
}
|
|
21001
|
+
function assertSet(value, message) {
|
|
21002
|
+
if (!isSet(value)) {
|
|
21003
|
+
throw new TypeError(message ?? typeErrorMessage("Set", value));
|
|
21004
|
+
}
|
|
21005
|
+
}
|
|
21006
|
+
function assertSharedArrayBuffer(value, message) {
|
|
21007
|
+
if (!isSharedArrayBuffer(value)) {
|
|
21008
|
+
throw new TypeError(message ?? typeErrorMessage("SharedArrayBuffer", value));
|
|
21009
|
+
}
|
|
21010
|
+
}
|
|
21011
|
+
function assertString(value, message) {
|
|
21012
|
+
if (!isString(value)) {
|
|
21013
|
+
throw new TypeError(message ?? typeErrorMessage("string", value));
|
|
21014
|
+
}
|
|
21015
|
+
}
|
|
21016
|
+
function assertSymbol(value, message) {
|
|
21017
|
+
if (!isSymbol(value)) {
|
|
21018
|
+
throw new TypeError(message ?? typeErrorMessage("symbol", value));
|
|
21019
|
+
}
|
|
21020
|
+
}
|
|
21021
|
+
function assertTruthy(value, message) {
|
|
21022
|
+
if (!isTruthy(value)) {
|
|
21023
|
+
throw new TypeError(message ?? typeErrorMessage("truthy", value));
|
|
21024
|
+
}
|
|
21025
|
+
}
|
|
21026
|
+
function assertTupleLike(value, guards, message) {
|
|
21027
|
+
if (!isTupleLike(value, guards)) {
|
|
21028
|
+
throw new TypeError(message ?? typeErrorMessage("tuple-like", value));
|
|
21029
|
+
}
|
|
21030
|
+
}
|
|
21031
|
+
function assertTypedArray(value, message) {
|
|
21032
|
+
if (!isTypedArray(value)) {
|
|
21033
|
+
throw new TypeError(message ?? typeErrorMessage("TypedArray", value));
|
|
21034
|
+
}
|
|
21035
|
+
}
|
|
21036
|
+
function assertUint16Array(value, message) {
|
|
21037
|
+
if (!isUint16Array(value)) {
|
|
21038
|
+
throw new TypeError(message ?? typeErrorMessage("Uint16Array", value));
|
|
21039
|
+
}
|
|
21040
|
+
}
|
|
21041
|
+
function assertUint32Array(value, message) {
|
|
21042
|
+
if (!isUint32Array(value)) {
|
|
21043
|
+
throw new TypeError(message ?? typeErrorMessage("Uint32Array", value));
|
|
21044
|
+
}
|
|
21045
|
+
}
|
|
21046
|
+
function assertUint8Array(value, message) {
|
|
21047
|
+
if (!isUint8Array(value)) {
|
|
21048
|
+
throw new TypeError(message ?? typeErrorMessage("Uint8Array", value));
|
|
21049
|
+
}
|
|
21050
|
+
}
|
|
21051
|
+
function assertUint8ClampedArray(value, message) {
|
|
21052
|
+
if (!isUint8ClampedArray(value)) {
|
|
21053
|
+
throw new TypeError(message ?? typeErrorMessage("Uint8ClampedArray", value));
|
|
21054
|
+
}
|
|
21055
|
+
}
|
|
21056
|
+
function assertUndefined(value, message) {
|
|
21057
|
+
if (!isUndefined(value)) {
|
|
21058
|
+
throw new TypeError(message ?? typeErrorMessage("undefined", value));
|
|
21059
|
+
}
|
|
21060
|
+
}
|
|
21061
|
+
function assertUrlInstance(value, message) {
|
|
21062
|
+
if (!isUrlInstance(value)) {
|
|
21063
|
+
throw new TypeError(message ?? typeErrorMessage("URL", value));
|
|
21064
|
+
}
|
|
21065
|
+
}
|
|
21066
|
+
function assertUrlSearchParams(value, message) {
|
|
21067
|
+
if (!isUrlSearchParams(value)) {
|
|
21068
|
+
throw new TypeError(message ?? typeErrorMessage("URLSearchParams", value));
|
|
21069
|
+
}
|
|
21070
|
+
}
|
|
21071
|
+
function assertUrlString(value, message) {
|
|
21072
|
+
if (!isUrlString(value)) {
|
|
21073
|
+
throw new TypeError(message ?? typeErrorMessage("string with a URL", value));
|
|
21074
|
+
}
|
|
21075
|
+
}
|
|
21076
|
+
function assertValidDate(value, message) {
|
|
21077
|
+
if (!isValidDate(value)) {
|
|
21078
|
+
throw new TypeError(message ?? typeErrorMessage("valid Date", value));
|
|
21079
|
+
}
|
|
21080
|
+
}
|
|
21081
|
+
function assertValidLength(value, message) {
|
|
21082
|
+
if (!isValidLength(value)) {
|
|
21083
|
+
throw new TypeError(message ?? typeErrorMessage("valid length", value));
|
|
21084
|
+
}
|
|
21085
|
+
}
|
|
21086
|
+
function assertWeakMap(value, message) {
|
|
21087
|
+
if (!isWeakMap(value)) {
|
|
21088
|
+
throw new TypeError(message ?? typeErrorMessage("WeakMap", value));
|
|
21089
|
+
}
|
|
21090
|
+
}
|
|
21091
|
+
function assertWeakRef(value, message) {
|
|
21092
|
+
if (!isWeakRef(value)) {
|
|
21093
|
+
throw new TypeError(message ?? typeErrorMessage("WeakRef", value));
|
|
21094
|
+
}
|
|
21095
|
+
}
|
|
21096
|
+
function assertWeakSet(value, message) {
|
|
21097
|
+
if (!isWeakSet(value)) {
|
|
21098
|
+
throw new TypeError(message ?? typeErrorMessage("WeakSet", value));
|
|
21099
|
+
}
|
|
21100
|
+
}
|
|
21101
|
+
function assertWhitespaceString(value, message) {
|
|
21102
|
+
if (!isWhitespaceString(value)) {
|
|
21103
|
+
throw new TypeError(message ?? typeErrorMessage("whitespace string", value));
|
|
21104
|
+
}
|
|
21105
|
+
}
|
|
21106
|
+
var typedArrayTypeNames, objectTypeNames, primitiveTypeNames, assertionTypeDescriptions, getObjectType, is, NODE_TYPE_ELEMENT, DOM_PROPERTIES_TO_CHECK, andFormatter, orFormatter, assert, methodTypeMap, isMethodNames, dist_default;
|
|
20292
21107
|
var init_dist = __esm({
|
|
20293
|
-
"node_modules/.pnpm/@sindresorhus+is@
|
|
21108
|
+
"node_modules/.pnpm/@sindresorhus+is@6.3.0/node_modules/@sindresorhus/is/dist/index.js"() {
|
|
20294
21109
|
typedArrayTypeNames = [
|
|
20295
21110
|
"Int8Array",
|
|
20296
21111
|
"Uint8Array",
|
|
@@ -20344,10 +21159,55 @@ var init_dist = __esm({
|
|
|
20344
21159
|
"boolean",
|
|
20345
21160
|
"symbol"
|
|
20346
21161
|
];
|
|
20347
|
-
|
|
21162
|
+
assertionTypeDescriptions = [
|
|
21163
|
+
"positive number",
|
|
21164
|
+
"negative number",
|
|
21165
|
+
"Class",
|
|
21166
|
+
"string with a number",
|
|
21167
|
+
"null or undefined",
|
|
21168
|
+
"Iterable",
|
|
21169
|
+
"AsyncIterable",
|
|
21170
|
+
"native Promise",
|
|
21171
|
+
"EnumCase",
|
|
21172
|
+
"string with a URL",
|
|
21173
|
+
"truthy",
|
|
21174
|
+
"falsy",
|
|
21175
|
+
"primitive",
|
|
21176
|
+
"integer",
|
|
21177
|
+
"plain object",
|
|
21178
|
+
"TypedArray",
|
|
21179
|
+
"array-like",
|
|
21180
|
+
"tuple-like",
|
|
21181
|
+
"Node.js Stream",
|
|
21182
|
+
"infinite number",
|
|
21183
|
+
"empty array",
|
|
21184
|
+
"non-empty array",
|
|
21185
|
+
"empty string",
|
|
21186
|
+
"empty string or whitespace",
|
|
21187
|
+
"non-empty string",
|
|
21188
|
+
"non-empty string and not whitespace",
|
|
21189
|
+
"empty object",
|
|
21190
|
+
"non-empty object",
|
|
21191
|
+
"empty set",
|
|
21192
|
+
"non-empty set",
|
|
21193
|
+
"empty map",
|
|
21194
|
+
"non-empty map",
|
|
21195
|
+
"PropertyKey",
|
|
21196
|
+
"even integer",
|
|
21197
|
+
"odd integer",
|
|
21198
|
+
"T",
|
|
21199
|
+
"in range",
|
|
21200
|
+
"predicate returns truthy for any value",
|
|
21201
|
+
"predicate returns truthy for all values",
|
|
21202
|
+
"valid Date",
|
|
21203
|
+
"valid length",
|
|
21204
|
+
"whitespace string",
|
|
21205
|
+
...objectTypeNames,
|
|
21206
|
+
...primitiveTypeNames
|
|
21207
|
+
];
|
|
20348
21208
|
getObjectType = (value) => {
|
|
20349
|
-
const objectTypeName = toString.call(value).slice(8, -1);
|
|
20350
|
-
if (/HTML\w+Element/.test(objectTypeName) &&
|
|
21209
|
+
const objectTypeName = Object.prototype.toString.call(value).slice(8, -1);
|
|
21210
|
+
if (/HTML\w+Element/.test(objectTypeName) && isHtmlElement(value)) {
|
|
20351
21211
|
return "HTMLElement";
|
|
20352
21212
|
}
|
|
20353
21213
|
if (isObjectTypeName(objectTypeName)) {
|
|
@@ -20355,111 +21215,107 @@ var init_dist = __esm({
|
|
|
20355
21215
|
}
|
|
20356
21216
|
return void 0;
|
|
20357
21217
|
};
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
|
|
20420
|
-
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
20450
|
-
|
|
20451
|
-
|
|
20452
|
-
|
|
20453
|
-
|
|
20454
|
-
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20458
|
-
|
|
20459
|
-
return value >= Math.min(...range) && value <= Math.max(...range);
|
|
20460
|
-
}
|
|
20461
|
-
throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
|
|
20462
|
-
};
|
|
21218
|
+
is = Object.assign(detect, {
|
|
21219
|
+
all: isAll,
|
|
21220
|
+
any: isAny,
|
|
21221
|
+
array: isArray,
|
|
21222
|
+
arrayBuffer: isArrayBuffer,
|
|
21223
|
+
arrayLike: isArrayLike,
|
|
21224
|
+
asyncFunction: isAsyncFunction,
|
|
21225
|
+
asyncGenerator: isAsyncGenerator,
|
|
21226
|
+
asyncGeneratorFunction: isAsyncGeneratorFunction,
|
|
21227
|
+
asyncIterable: isAsyncIterable,
|
|
21228
|
+
bigint: isBigint,
|
|
21229
|
+
bigInt64Array: isBigInt64Array,
|
|
21230
|
+
bigUint64Array: isBigUint64Array,
|
|
21231
|
+
blob: isBlob,
|
|
21232
|
+
boolean: isBoolean,
|
|
21233
|
+
boundFunction: isBoundFunction,
|
|
21234
|
+
buffer: isBuffer,
|
|
21235
|
+
class: isClass,
|
|
21236
|
+
/** @deprecated Renamed to `class`. */
|
|
21237
|
+
class_: isClass,
|
|
21238
|
+
dataView: isDataView,
|
|
21239
|
+
date: isDate,
|
|
21240
|
+
detect,
|
|
21241
|
+
directInstanceOf: isDirectInstanceOf,
|
|
21242
|
+
/** @deprecated Renamed to `htmlElement` */
|
|
21243
|
+
domElement: isHtmlElement,
|
|
21244
|
+
emptyArray: isEmptyArray,
|
|
21245
|
+
emptyMap: isEmptyMap,
|
|
21246
|
+
emptyObject: isEmptyObject,
|
|
21247
|
+
emptySet: isEmptySet,
|
|
21248
|
+
emptyString: isEmptyString,
|
|
21249
|
+
emptyStringOrWhitespace: isEmptyStringOrWhitespace,
|
|
21250
|
+
enumCase: isEnumCase,
|
|
21251
|
+
error: isError,
|
|
21252
|
+
evenInteger: isEvenInteger,
|
|
21253
|
+
falsy: isFalsy,
|
|
21254
|
+
float32Array: isFloat32Array,
|
|
21255
|
+
float64Array: isFloat64Array,
|
|
21256
|
+
formData: isFormData,
|
|
21257
|
+
function: isFunction,
|
|
21258
|
+
/** @deprecated Renamed to `function`. */
|
|
21259
|
+
function_: isFunction,
|
|
21260
|
+
generator: isGenerator,
|
|
21261
|
+
generatorFunction: isGeneratorFunction,
|
|
21262
|
+
htmlElement: isHtmlElement,
|
|
21263
|
+
infinite: isInfinite,
|
|
21264
|
+
inRange: isInRange,
|
|
21265
|
+
int16Array: isInt16Array,
|
|
21266
|
+
int32Array: isInt32Array,
|
|
21267
|
+
int8Array: isInt8Array,
|
|
21268
|
+
integer: isInteger,
|
|
21269
|
+
iterable: isIterable,
|
|
21270
|
+
map: isMap,
|
|
21271
|
+
nan: isNan,
|
|
21272
|
+
nativePromise: isNativePromise,
|
|
21273
|
+
negativeNumber: isNegativeNumber,
|
|
21274
|
+
nodeStream: isNodeStream,
|
|
21275
|
+
nonEmptyArray: isNonEmptyArray,
|
|
21276
|
+
nonEmptyMap: isNonEmptyMap,
|
|
21277
|
+
nonEmptyObject: isNonEmptyObject,
|
|
21278
|
+
nonEmptySet: isNonEmptySet,
|
|
21279
|
+
nonEmptyString: isNonEmptyString,
|
|
21280
|
+
nonEmptyStringAndNotWhitespace: isNonEmptyStringAndNotWhitespace,
|
|
21281
|
+
null: isNull,
|
|
21282
|
+
/** @deprecated Renamed to `null`. */
|
|
21283
|
+
null_: isNull,
|
|
21284
|
+
nullOrUndefined: isNullOrUndefined,
|
|
21285
|
+
number: isNumber,
|
|
21286
|
+
numericString: isNumericString,
|
|
21287
|
+
object: isObject,
|
|
21288
|
+
observable: isObservable,
|
|
21289
|
+
oddInteger: isOddInteger,
|
|
21290
|
+
plainObject: isPlainObject,
|
|
21291
|
+
positiveNumber: isPositiveNumber,
|
|
21292
|
+
primitive: isPrimitive,
|
|
21293
|
+
promise: isPromise,
|
|
21294
|
+
propertyKey: isPropertyKey,
|
|
21295
|
+
regExp: isRegExp,
|
|
21296
|
+
safeInteger: isSafeInteger,
|
|
21297
|
+
set: isSet,
|
|
21298
|
+
sharedArrayBuffer: isSharedArrayBuffer,
|
|
21299
|
+
string: isString,
|
|
21300
|
+
symbol: isSymbol,
|
|
21301
|
+
truthy: isTruthy,
|
|
21302
|
+
tupleLike: isTupleLike,
|
|
21303
|
+
typedArray: isTypedArray,
|
|
21304
|
+
uint16Array: isUint16Array,
|
|
21305
|
+
uint32Array: isUint32Array,
|
|
21306
|
+
uint8Array: isUint8Array,
|
|
21307
|
+
uint8ClampedArray: isUint8ClampedArray,
|
|
21308
|
+
undefined: isUndefined,
|
|
21309
|
+
urlInstance: isUrlInstance,
|
|
21310
|
+
urlSearchParams: isUrlSearchParams,
|
|
21311
|
+
urlString: isUrlString,
|
|
21312
|
+
validDate: isValidDate,
|
|
21313
|
+
validLength: isValidLength,
|
|
21314
|
+
weakMap: isWeakMap,
|
|
21315
|
+
weakRef: isWeakRef,
|
|
21316
|
+
weakSet: isWeakSet,
|
|
21317
|
+
whitespaceString: isWhitespaceString
|
|
21318
|
+
});
|
|
20463
21319
|
NODE_TYPE_ELEMENT = 1;
|
|
20464
21320
|
DOM_PROPERTIES_TO_CHECK = [
|
|
20465
21321
|
"innerHTML",
|
|
@@ -20468,195 +21324,205 @@ var init_dist = __esm({
|
|
|
20468
21324
|
"attributes",
|
|
20469
21325
|
"nodeValue"
|
|
20470
21326
|
];
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
if (!value) {
|
|
20474
|
-
return false;
|
|
20475
|
-
}
|
|
20476
|
-
if (value === value[Symbol.observable]?.()) {
|
|
20477
|
-
return true;
|
|
20478
|
-
}
|
|
20479
|
-
if (value === value["@@observable"]?.()) {
|
|
20480
|
-
return true;
|
|
20481
|
-
}
|
|
20482
|
-
return false;
|
|
20483
|
-
};
|
|
20484
|
-
is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
|
|
20485
|
-
is.infinite = (value) => value === Number.POSITIVE_INFINITY || value === Number.NEGATIVE_INFINITY;
|
|
20486
|
-
isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
|
|
20487
|
-
is.evenInteger = isAbsoluteMod2(0);
|
|
20488
|
-
is.oddInteger = isAbsoluteMod2(1);
|
|
20489
|
-
is.emptyArray = (value) => is.array(value) && value.length === 0;
|
|
20490
|
-
is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
|
|
20491
|
-
is.emptyString = (value) => is.string(value) && value.length === 0;
|
|
20492
|
-
isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
|
|
20493
|
-
is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
|
|
20494
|
-
is.nonEmptyString = (value) => is.string(value) && value.length > 0;
|
|
20495
|
-
is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
|
|
20496
|
-
is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
|
|
20497
|
-
is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
|
|
20498
|
-
is.emptySet = (value) => is.set(value) && value.size === 0;
|
|
20499
|
-
is.nonEmptySet = (value) => is.set(value) && value.size > 0;
|
|
20500
|
-
is.emptyMap = (value) => is.map(value) && value.size === 0;
|
|
20501
|
-
is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
|
|
20502
|
-
is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
|
|
20503
|
-
is.formData = (value) => isObjectOfType("FormData")(value);
|
|
20504
|
-
is.urlSearchParams = (value) => isObjectOfType("URLSearchParams")(value);
|
|
20505
|
-
predicateOnArray = (method, predicate, values) => {
|
|
20506
|
-
if (!is.function_(predicate)) {
|
|
20507
|
-
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
|
|
20508
|
-
}
|
|
20509
|
-
if (values.length === 0) {
|
|
20510
|
-
throw new TypeError("Invalid number of values");
|
|
20511
|
-
}
|
|
20512
|
-
return method.call(values, predicate);
|
|
20513
|
-
};
|
|
20514
|
-
is.any = (predicate, ...values) => {
|
|
20515
|
-
const predicates = is.array(predicate) ? predicate : [predicate];
|
|
20516
|
-
return predicates.some((singlePredicate) => predicateOnArray(Array.prototype.some, singlePredicate, values));
|
|
20517
|
-
};
|
|
20518
|
-
is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
|
|
20519
|
-
assertType = (condition, description, value, options = {}) => {
|
|
20520
|
-
if (!condition) {
|
|
20521
|
-
const { multipleValues } = options;
|
|
20522
|
-
const valuesMessage = multipleValues ? `received values of types ${[
|
|
20523
|
-
...new Set(value.map((singleValue) => `\`${is(singleValue)}\``))
|
|
20524
|
-
].join(", ")}` : `received value of type \`${is(value)}\``;
|
|
20525
|
-
throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
|
|
20526
|
-
}
|
|
20527
|
-
};
|
|
21327
|
+
andFormatter = new Intl.ListFormat("en", { style: "long", type: "conjunction" });
|
|
21328
|
+
orFormatter = new Intl.ListFormat("en", { style: "long", type: "disjunction" });
|
|
20528
21329
|
assert = {
|
|
20529
|
-
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
|
|
20545
|
-
|
|
20546
|
-
|
|
20547
|
-
|
|
20548
|
-
|
|
20549
|
-
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20567
|
-
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
|
|
20590
|
-
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
21330
|
+
all: assertAll,
|
|
21331
|
+
any: assertAny,
|
|
21332
|
+
array: assertArray,
|
|
21333
|
+
arrayBuffer: assertArrayBuffer,
|
|
21334
|
+
arrayLike: assertArrayLike,
|
|
21335
|
+
asyncFunction: assertAsyncFunction,
|
|
21336
|
+
asyncGenerator: assertAsyncGenerator,
|
|
21337
|
+
asyncGeneratorFunction: assertAsyncGeneratorFunction,
|
|
21338
|
+
asyncIterable: assertAsyncIterable,
|
|
21339
|
+
bigint: assertBigint,
|
|
21340
|
+
bigInt64Array: assertBigInt64Array,
|
|
21341
|
+
bigUint64Array: assertBigUint64Array,
|
|
21342
|
+
blob: assertBlob,
|
|
21343
|
+
boolean: assertBoolean,
|
|
21344
|
+
boundFunction: assertBoundFunction,
|
|
21345
|
+
buffer: assertBuffer,
|
|
21346
|
+
class: assertClass,
|
|
21347
|
+
class_: assertClass,
|
|
21348
|
+
dataView: assertDataView,
|
|
21349
|
+
date: assertDate,
|
|
21350
|
+
directInstanceOf: assertDirectInstanceOf,
|
|
21351
|
+
domElement: assertHtmlElement,
|
|
21352
|
+
emptyArray: assertEmptyArray,
|
|
21353
|
+
emptyMap: assertEmptyMap,
|
|
21354
|
+
emptyObject: assertEmptyObject,
|
|
21355
|
+
emptySet: assertEmptySet,
|
|
21356
|
+
emptyString: assertEmptyString,
|
|
21357
|
+
emptyStringOrWhitespace: assertEmptyStringOrWhitespace,
|
|
21358
|
+
enumCase: assertEnumCase,
|
|
21359
|
+
error: assertError,
|
|
21360
|
+
evenInteger: assertEvenInteger,
|
|
21361
|
+
falsy: assertFalsy,
|
|
21362
|
+
float32Array: assertFloat32Array,
|
|
21363
|
+
float64Array: assertFloat64Array,
|
|
21364
|
+
formData: assertFormData,
|
|
21365
|
+
function: assertFunction,
|
|
21366
|
+
function_: assertFunction,
|
|
21367
|
+
generator: assertGenerator,
|
|
21368
|
+
generatorFunction: assertGeneratorFunction,
|
|
21369
|
+
htmlElement: assertHtmlElement,
|
|
21370
|
+
infinite: assertInfinite,
|
|
21371
|
+
inRange: assertInRange,
|
|
21372
|
+
int16Array: assertInt16Array,
|
|
21373
|
+
int32Array: assertInt32Array,
|
|
21374
|
+
int8Array: assertInt8Array,
|
|
21375
|
+
integer: assertInteger,
|
|
21376
|
+
iterable: assertIterable,
|
|
21377
|
+
map: assertMap,
|
|
21378
|
+
nan: assertNan,
|
|
21379
|
+
nativePromise: assertNativePromise,
|
|
21380
|
+
negativeNumber: assertNegativeNumber,
|
|
21381
|
+
nodeStream: assertNodeStream,
|
|
21382
|
+
nonEmptyArray: assertNonEmptyArray,
|
|
21383
|
+
nonEmptyMap: assertNonEmptyMap,
|
|
21384
|
+
nonEmptyObject: assertNonEmptyObject,
|
|
21385
|
+
nonEmptySet: assertNonEmptySet,
|
|
21386
|
+
nonEmptyString: assertNonEmptyString,
|
|
21387
|
+
nonEmptyStringAndNotWhitespace: assertNonEmptyStringAndNotWhitespace,
|
|
21388
|
+
null: assertNull,
|
|
21389
|
+
null_: assertNull,
|
|
21390
|
+
nullOrUndefined: assertNullOrUndefined,
|
|
21391
|
+
number: assertNumber,
|
|
21392
|
+
numericString: assertNumericString,
|
|
21393
|
+
object: assertObject,
|
|
21394
|
+
observable: assertObservable,
|
|
21395
|
+
oddInteger: assertOddInteger,
|
|
21396
|
+
plainObject: assertPlainObject,
|
|
21397
|
+
positiveNumber: assertPositiveNumber,
|
|
21398
|
+
primitive: assertPrimitive,
|
|
21399
|
+
promise: assertPromise,
|
|
21400
|
+
propertyKey: assertPropertyKey,
|
|
21401
|
+
regExp: assertRegExp,
|
|
21402
|
+
safeInteger: assertSafeInteger,
|
|
21403
|
+
set: assertSet,
|
|
21404
|
+
sharedArrayBuffer: assertSharedArrayBuffer,
|
|
21405
|
+
string: assertString,
|
|
21406
|
+
symbol: assertSymbol,
|
|
21407
|
+
truthy: assertTruthy,
|
|
21408
|
+
tupleLike: assertTupleLike,
|
|
21409
|
+
typedArray: assertTypedArray,
|
|
21410
|
+
uint16Array: assertUint16Array,
|
|
21411
|
+
uint32Array: assertUint32Array,
|
|
21412
|
+
uint8Array: assertUint8Array,
|
|
21413
|
+
uint8ClampedArray: assertUint8ClampedArray,
|
|
21414
|
+
undefined: assertUndefined,
|
|
21415
|
+
urlInstance: assertUrlInstance,
|
|
21416
|
+
urlSearchParams: assertUrlSearchParams,
|
|
21417
|
+
urlString: assertUrlString,
|
|
21418
|
+
validDate: assertValidDate,
|
|
21419
|
+
validLength: assertValidLength,
|
|
21420
|
+
weakMap: assertWeakMap,
|
|
21421
|
+
weakRef: assertWeakRef,
|
|
21422
|
+
weakSet: assertWeakSet,
|
|
21423
|
+
whitespaceString: assertWhitespaceString
|
|
21424
|
+
};
|
|
21425
|
+
methodTypeMap = {
|
|
21426
|
+
isArray: "Array",
|
|
21427
|
+
isArrayBuffer: "ArrayBuffer",
|
|
21428
|
+
isArrayLike: "array-like",
|
|
21429
|
+
isAsyncFunction: "AsyncFunction",
|
|
21430
|
+
isAsyncGenerator: "AsyncGenerator",
|
|
21431
|
+
isAsyncGeneratorFunction: "AsyncGeneratorFunction",
|
|
21432
|
+
isAsyncIterable: "AsyncIterable",
|
|
21433
|
+
isBigint: "bigint",
|
|
21434
|
+
isBigInt64Array: "BigInt64Array",
|
|
21435
|
+
isBigUint64Array: "BigUint64Array",
|
|
21436
|
+
isBlob: "Blob",
|
|
21437
|
+
isBoolean: "boolean",
|
|
21438
|
+
isBoundFunction: "Function",
|
|
21439
|
+
isBuffer: "Buffer",
|
|
21440
|
+
isClass: "Class",
|
|
21441
|
+
isDataView: "DataView",
|
|
21442
|
+
isDate: "Date",
|
|
21443
|
+
isDirectInstanceOf: "T",
|
|
21444
|
+
/** @deprecated */
|
|
21445
|
+
isDomElement: "HTMLElement",
|
|
21446
|
+
isEmptyArray: "empty array",
|
|
21447
|
+
isEmptyMap: "empty map",
|
|
21448
|
+
isEmptyObject: "empty object",
|
|
21449
|
+
isEmptySet: "empty set",
|
|
21450
|
+
isEmptyString: "empty string",
|
|
21451
|
+
isEmptyStringOrWhitespace: "empty string or whitespace",
|
|
21452
|
+
isEnumCase: "EnumCase",
|
|
21453
|
+
isError: "Error",
|
|
21454
|
+
isEvenInteger: "even integer",
|
|
21455
|
+
isFalsy: "falsy",
|
|
21456
|
+
isFloat32Array: "Float32Array",
|
|
21457
|
+
isFloat64Array: "Float64Array",
|
|
21458
|
+
isFormData: "FormData",
|
|
21459
|
+
isFunction: "Function",
|
|
21460
|
+
isGenerator: "Generator",
|
|
21461
|
+
isGeneratorFunction: "GeneratorFunction",
|
|
21462
|
+
isHtmlElement: "HTMLElement",
|
|
21463
|
+
isInfinite: "infinite number",
|
|
21464
|
+
isInRange: "in range",
|
|
21465
|
+
isInt16Array: "Int16Array",
|
|
21466
|
+
isInt32Array: "Int32Array",
|
|
21467
|
+
isInt8Array: "Int8Array",
|
|
21468
|
+
isInteger: "integer",
|
|
21469
|
+
isIterable: "Iterable",
|
|
21470
|
+
isMap: "Map",
|
|
21471
|
+
isNan: "NaN",
|
|
21472
|
+
isNativePromise: "native Promise",
|
|
21473
|
+
isNegativeNumber: "negative number",
|
|
21474
|
+
isNodeStream: "Node.js Stream",
|
|
21475
|
+
isNonEmptyArray: "non-empty array",
|
|
21476
|
+
isNonEmptyMap: "non-empty map",
|
|
21477
|
+
isNonEmptyObject: "non-empty object",
|
|
21478
|
+
isNonEmptySet: "non-empty set",
|
|
21479
|
+
isNonEmptyString: "non-empty string",
|
|
21480
|
+
isNonEmptyStringAndNotWhitespace: "non-empty string and not whitespace",
|
|
21481
|
+
isNull: "null",
|
|
21482
|
+
isNullOrUndefined: "null or undefined",
|
|
21483
|
+
isNumber: "number",
|
|
21484
|
+
isNumericString: "string with a number",
|
|
21485
|
+
isObject: "Object",
|
|
21486
|
+
isObservable: "Observable",
|
|
21487
|
+
isOddInteger: "odd integer",
|
|
21488
|
+
isPlainObject: "plain object",
|
|
21489
|
+
isPositiveNumber: "positive number",
|
|
21490
|
+
isPrimitive: "primitive",
|
|
21491
|
+
isPromise: "Promise",
|
|
21492
|
+
isPropertyKey: "PropertyKey",
|
|
21493
|
+
isRegExp: "RegExp",
|
|
21494
|
+
isSafeInteger: "integer",
|
|
21495
|
+
isSet: "Set",
|
|
21496
|
+
isSharedArrayBuffer: "SharedArrayBuffer",
|
|
21497
|
+
isString: "string",
|
|
21498
|
+
isSymbol: "symbol",
|
|
21499
|
+
isTruthy: "truthy",
|
|
21500
|
+
isTupleLike: "tuple-like",
|
|
21501
|
+
isTypedArray: "TypedArray",
|
|
21502
|
+
isUint16Array: "Uint16Array",
|
|
21503
|
+
isUint32Array: "Uint32Array",
|
|
21504
|
+
isUint8Array: "Uint8Array",
|
|
21505
|
+
isUint8ClampedArray: "Uint8ClampedArray",
|
|
21506
|
+
isUndefined: "undefined",
|
|
21507
|
+
isUrlInstance: "URL",
|
|
21508
|
+
isUrlSearchParams: "URLSearchParams",
|
|
21509
|
+
isUrlString: "string with a URL",
|
|
21510
|
+
isValidDate: "valid Date",
|
|
21511
|
+
isValidLength: "valid length",
|
|
21512
|
+
isWeakMap: "WeakMap",
|
|
21513
|
+
isWeakRef: "WeakRef",
|
|
21514
|
+
isWeakSet: "WeakSet",
|
|
21515
|
+
isWhitespaceString: "whitespace string"
|
|
21516
|
+
};
|
|
21517
|
+
isMethodNames = keysOf(methodTypeMap);
|
|
20652
21518
|
dist_default = is;
|
|
20653
21519
|
}
|
|
20654
21520
|
});
|
|
20655
21521
|
|
|
20656
|
-
// node_modules/.pnpm/p-cancelable@
|
|
20657
|
-
var CancelError, PCancelable;
|
|
21522
|
+
// node_modules/.pnpm/p-cancelable@4.0.1/node_modules/p-cancelable/index.js
|
|
21523
|
+
var CancelError, promiseState, PCancelable;
|
|
20658
21524
|
var init_p_cancelable = __esm({
|
|
20659
|
-
"node_modules/.pnpm/p-cancelable@
|
|
21525
|
+
"node_modules/.pnpm/p-cancelable@4.0.1/node_modules/p-cancelable/index.js"() {
|
|
20660
21526
|
CancelError = class extends Error {
|
|
20661
21527
|
constructor(reason) {
|
|
20662
21528
|
super(reason || "Promise was canceled");
|
|
@@ -20666,132 +21532,115 @@ var init_p_cancelable = __esm({
|
|
|
20666
21532
|
return true;
|
|
20667
21533
|
}
|
|
20668
21534
|
};
|
|
21535
|
+
promiseState = Object.freeze({
|
|
21536
|
+
pending: Symbol("pending"),
|
|
21537
|
+
canceled: Symbol("canceled"),
|
|
21538
|
+
resolved: Symbol("resolved"),
|
|
21539
|
+
rejected: Symbol("rejected")
|
|
21540
|
+
});
|
|
20669
21541
|
PCancelable = class _PCancelable {
|
|
20670
21542
|
static fn(userFunction) {
|
|
20671
|
-
return (...arguments_) => {
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
});
|
|
20676
|
-
};
|
|
21543
|
+
return (...arguments_) => new _PCancelable((resolve, reject, onCancel) => {
|
|
21544
|
+
arguments_.push(onCancel);
|
|
21545
|
+
userFunction(...arguments_).then(resolve, reject);
|
|
21546
|
+
});
|
|
20677
21547
|
}
|
|
21548
|
+
#cancelHandlers = [];
|
|
21549
|
+
#rejectOnCancel = true;
|
|
21550
|
+
#state = promiseState.pending;
|
|
21551
|
+
#promise;
|
|
21552
|
+
#reject;
|
|
20678
21553
|
constructor(executor) {
|
|
20679
|
-
this
|
|
20680
|
-
|
|
20681
|
-
this._isCanceled = false;
|
|
20682
|
-
this._rejectOnCancel = true;
|
|
20683
|
-
this._promise = new Promise((resolve, reject) => {
|
|
20684
|
-
this._reject = reject;
|
|
21554
|
+
this.#promise = new Promise((resolve, reject) => {
|
|
21555
|
+
this.#reject = reject;
|
|
20685
21556
|
const onResolve = (value) => {
|
|
20686
|
-
if (
|
|
20687
|
-
this._isPending = false;
|
|
21557
|
+
if (this.#state !== promiseState.canceled || !onCancel.shouldReject) {
|
|
20688
21558
|
resolve(value);
|
|
21559
|
+
this.#setState(promiseState.resolved);
|
|
20689
21560
|
}
|
|
20690
21561
|
};
|
|
20691
21562
|
const onReject = (error2) => {
|
|
20692
|
-
this.
|
|
20693
|
-
|
|
21563
|
+
if (this.#state !== promiseState.canceled || !onCancel.shouldReject) {
|
|
21564
|
+
reject(error2);
|
|
21565
|
+
this.#setState(promiseState.rejected);
|
|
21566
|
+
}
|
|
20694
21567
|
};
|
|
20695
21568
|
const onCancel = (handler) => {
|
|
20696
|
-
if (
|
|
20697
|
-
throw new Error(
|
|
21569
|
+
if (this.#state !== promiseState.pending) {
|
|
21570
|
+
throw new Error(`The \`onCancel\` handler was attached after the promise ${this.#state.description}.`);
|
|
20698
21571
|
}
|
|
20699
|
-
this.
|
|
21572
|
+
this.#cancelHandlers.push(handler);
|
|
20700
21573
|
};
|
|
20701
21574
|
Object.defineProperties(onCancel, {
|
|
20702
21575
|
shouldReject: {
|
|
20703
|
-
get: () => this
|
|
21576
|
+
get: () => this.#rejectOnCancel,
|
|
20704
21577
|
set: (boolean) => {
|
|
20705
|
-
this
|
|
21578
|
+
this.#rejectOnCancel = boolean;
|
|
20706
21579
|
}
|
|
20707
21580
|
}
|
|
20708
21581
|
});
|
|
20709
21582
|
executor(onResolve, onReject, onCancel);
|
|
20710
21583
|
});
|
|
20711
21584
|
}
|
|
21585
|
+
// eslint-disable-next-line unicorn/no-thenable
|
|
20712
21586
|
then(onFulfilled, onRejected) {
|
|
20713
|
-
return this.
|
|
21587
|
+
return this.#promise.then(onFulfilled, onRejected);
|
|
20714
21588
|
}
|
|
20715
21589
|
catch(onRejected) {
|
|
20716
|
-
return this.
|
|
21590
|
+
return this.#promise.catch(onRejected);
|
|
20717
21591
|
}
|
|
20718
21592
|
finally(onFinally) {
|
|
20719
|
-
return this.
|
|
21593
|
+
return this.#promise.finally(onFinally);
|
|
20720
21594
|
}
|
|
20721
21595
|
cancel(reason) {
|
|
20722
|
-
if (
|
|
21596
|
+
if (this.#state !== promiseState.pending) {
|
|
20723
21597
|
return;
|
|
20724
21598
|
}
|
|
20725
|
-
this.
|
|
20726
|
-
if (this.
|
|
21599
|
+
this.#setState(promiseState.canceled);
|
|
21600
|
+
if (this.#cancelHandlers.length > 0) {
|
|
20727
21601
|
try {
|
|
20728
|
-
for (const handler of this
|
|
21602
|
+
for (const handler of this.#cancelHandlers) {
|
|
20729
21603
|
handler();
|
|
20730
21604
|
}
|
|
20731
21605
|
} catch (error2) {
|
|
20732
|
-
this
|
|
21606
|
+
this.#reject(error2);
|
|
20733
21607
|
return;
|
|
20734
21608
|
}
|
|
20735
21609
|
}
|
|
20736
|
-
if (this
|
|
20737
|
-
this
|
|
21610
|
+
if (this.#rejectOnCancel) {
|
|
21611
|
+
this.#reject(new CancelError(reason));
|
|
20738
21612
|
}
|
|
20739
21613
|
}
|
|
20740
21614
|
get isCanceled() {
|
|
20741
|
-
return this.
|
|
21615
|
+
return this.#state === promiseState.canceled;
|
|
21616
|
+
}
|
|
21617
|
+
#setState(state) {
|
|
21618
|
+
if (this.#state === promiseState.pending) {
|
|
21619
|
+
this.#state = state;
|
|
21620
|
+
}
|
|
20742
21621
|
}
|
|
20743
21622
|
};
|
|
20744
21623
|
Object.setPrototypeOf(PCancelable.prototype, Promise.prototype);
|
|
20745
21624
|
}
|
|
20746
21625
|
});
|
|
20747
21626
|
|
|
20748
|
-
// node_modules/.pnpm/got@
|
|
21627
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/errors.js
|
|
20749
21628
|
function isRequest(x) {
|
|
20750
21629
|
return dist_default.object(x) && "_onResponse" in x;
|
|
20751
21630
|
}
|
|
20752
21631
|
var RequestError, MaxRedirectsError, HTTPError, CacheError, UploadError, TimeoutError, ReadError, RetryError, AbortError;
|
|
20753
21632
|
var init_errors = __esm({
|
|
20754
|
-
"node_modules/.pnpm/got@
|
|
21633
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/errors.js"() {
|
|
20755
21634
|
init_dist();
|
|
20756
21635
|
RequestError = class extends Error {
|
|
21636
|
+
input;
|
|
21637
|
+
code;
|
|
21638
|
+
stack;
|
|
21639
|
+
response;
|
|
21640
|
+
request;
|
|
21641
|
+
timings;
|
|
20757
21642
|
constructor(message, error2, self) {
|
|
20758
|
-
super(message);
|
|
20759
|
-
Object.defineProperty(this, "input", {
|
|
20760
|
-
enumerable: true,
|
|
20761
|
-
configurable: true,
|
|
20762
|
-
writable: true,
|
|
20763
|
-
value: void 0
|
|
20764
|
-
});
|
|
20765
|
-
Object.defineProperty(this, "code", {
|
|
20766
|
-
enumerable: true,
|
|
20767
|
-
configurable: true,
|
|
20768
|
-
writable: true,
|
|
20769
|
-
value: void 0
|
|
20770
|
-
});
|
|
20771
|
-
Object.defineProperty(this, "stack", {
|
|
20772
|
-
enumerable: true,
|
|
20773
|
-
configurable: true,
|
|
20774
|
-
writable: true,
|
|
20775
|
-
value: void 0
|
|
20776
|
-
});
|
|
20777
|
-
Object.defineProperty(this, "response", {
|
|
20778
|
-
enumerable: true,
|
|
20779
|
-
configurable: true,
|
|
20780
|
-
writable: true,
|
|
20781
|
-
value: void 0
|
|
20782
|
-
});
|
|
20783
|
-
Object.defineProperty(this, "request", {
|
|
20784
|
-
enumerable: true,
|
|
20785
|
-
configurable: true,
|
|
20786
|
-
writable: true,
|
|
20787
|
-
value: void 0
|
|
20788
|
-
});
|
|
20789
|
-
Object.defineProperty(this, "timings", {
|
|
20790
|
-
enumerable: true,
|
|
20791
|
-
configurable: true,
|
|
20792
|
-
writable: true,
|
|
20793
|
-
value: void 0
|
|
20794
|
-
});
|
|
21643
|
+
super(message, { cause: error2 });
|
|
20795
21644
|
Error.captureStackTrace(this, this.constructor);
|
|
20796
21645
|
this.name = "RequestError";
|
|
20797
21646
|
this.code = error2.code ?? "ERR_GOT_REQUEST_ERROR";
|
|
@@ -20850,20 +21699,10 @@ var init_errors = __esm({
|
|
|
20850
21699
|
}
|
|
20851
21700
|
};
|
|
20852
21701
|
TimeoutError = class extends RequestError {
|
|
21702
|
+
timings;
|
|
21703
|
+
event;
|
|
20853
21704
|
constructor(error2, timings, request) {
|
|
20854
21705
|
super(error2.message, error2, request);
|
|
20855
|
-
Object.defineProperty(this, "timings", {
|
|
20856
|
-
enumerable: true,
|
|
20857
|
-
configurable: true,
|
|
20858
|
-
writable: true,
|
|
20859
|
-
value: void 0
|
|
20860
|
-
});
|
|
20861
|
-
Object.defineProperty(this, "event", {
|
|
20862
|
-
enumerable: true,
|
|
20863
|
-
configurable: true,
|
|
20864
|
-
writable: true,
|
|
20865
|
-
value: void 0
|
|
20866
|
-
});
|
|
20867
21706
|
this.name = "TimeoutError";
|
|
20868
21707
|
this.event = error2.event;
|
|
20869
21708
|
this.timings = timings;
|
|
@@ -21051,7 +21890,7 @@ var init_source = __esm({
|
|
|
21051
21890
|
}
|
|
21052
21891
|
});
|
|
21053
21892
|
|
|
21054
|
-
// node_modules/.pnpm/normalize-url@8.0.
|
|
21893
|
+
// node_modules/.pnpm/normalize-url@8.0.1/node_modules/normalize-url/index.js
|
|
21055
21894
|
function normalizeUrl(urlString, options) {
|
|
21056
21895
|
options = {
|
|
21057
21896
|
defaultProtocol: "http",
|
|
@@ -21195,7 +22034,7 @@ function normalizeUrl(urlString, options) {
|
|
|
21195
22034
|
}
|
|
21196
22035
|
var DATA_URL_DEFAULT_MIME_TYPE, DATA_URL_DEFAULT_CHARSET, testParameter, supportedProtocols, hasCustomProtocol, normalizeDataURL;
|
|
21197
22036
|
var init_normalize_url = __esm({
|
|
21198
|
-
"node_modules/.pnpm/normalize-url@8.0.
|
|
22037
|
+
"node_modules/.pnpm/normalize-url@8.0.1/node_modules/normalize-url/index.js"() {
|
|
21199
22038
|
DATA_URL_DEFAULT_MIME_TYPE = "text/plain";
|
|
21200
22039
|
DATA_URL_DEFAULT_CHARSET = "us-ascii";
|
|
21201
22040
|
testParameter = (name, filters) => filters.some((filter) => filter instanceof RegExp ? filter.test(name) : filter === name);
|
|
@@ -21207,7 +22046,7 @@ var init_normalize_url = __esm({
|
|
|
21207
22046
|
hasCustomProtocol = (urlString) => {
|
|
21208
22047
|
try {
|
|
21209
22048
|
const { protocol } = new URL(urlString);
|
|
21210
|
-
return protocol.endsWith(":") && !supportedProtocols.has(protocol);
|
|
22049
|
+
return protocol.endsWith(":") && !protocol.includes(".") && !supportedProtocols.has(protocol);
|
|
21211
22050
|
} catch {
|
|
21212
22051
|
return false;
|
|
21213
22052
|
}
|
|
@@ -21259,14 +22098,14 @@ var require_buffer_stream = __commonJS({
|
|
|
21259
22098
|
options = { ...options };
|
|
21260
22099
|
const { array } = options;
|
|
21261
22100
|
let { encoding } = options;
|
|
21262
|
-
const
|
|
22101
|
+
const isBuffer2 = encoding === "buffer";
|
|
21263
22102
|
let objectMode = false;
|
|
21264
22103
|
if (array) {
|
|
21265
|
-
objectMode = !(encoding ||
|
|
22104
|
+
objectMode = !(encoding || isBuffer2);
|
|
21266
22105
|
} else {
|
|
21267
22106
|
encoding = encoding || "utf8";
|
|
21268
22107
|
}
|
|
21269
|
-
if (
|
|
22108
|
+
if (isBuffer2) {
|
|
21270
22109
|
encoding = null;
|
|
21271
22110
|
}
|
|
21272
22111
|
const stream2 = new PassThroughStream2({ objectMode });
|
|
@@ -21275,19 +22114,19 @@ var require_buffer_stream = __commonJS({
|
|
|
21275
22114
|
}
|
|
21276
22115
|
let length = 0;
|
|
21277
22116
|
const chunks = [];
|
|
21278
|
-
stream2.on("data", (
|
|
21279
|
-
chunks.push(
|
|
22117
|
+
stream2.on("data", (chunk2) => {
|
|
22118
|
+
chunks.push(chunk2);
|
|
21280
22119
|
if (objectMode) {
|
|
21281
22120
|
length = chunks.length;
|
|
21282
22121
|
} else {
|
|
21283
|
-
length +=
|
|
22122
|
+
length += chunk2.length;
|
|
21284
22123
|
}
|
|
21285
22124
|
});
|
|
21286
22125
|
stream2.getBufferedValue = () => {
|
|
21287
22126
|
if (array) {
|
|
21288
22127
|
return chunks;
|
|
21289
22128
|
}
|
|
21290
|
-
return
|
|
22129
|
+
return isBuffer2 ? Buffer.concat(chunks, length) : chunks.join("");
|
|
21291
22130
|
};
|
|
21292
22131
|
stream2.getBufferedLength = () => length;
|
|
21293
22132
|
return stream2;
|
|
@@ -21304,13 +22143,13 @@ var require_get_stream = __commonJS({
|
|
|
21304
22143
|
var { promisify: promisify4 } = __require("util");
|
|
21305
22144
|
var bufferStream = require_buffer_stream();
|
|
21306
22145
|
var streamPipelinePromisified = promisify4(stream2.pipeline);
|
|
21307
|
-
var
|
|
22146
|
+
var MaxBufferError2 = class extends Error {
|
|
21308
22147
|
constructor() {
|
|
21309
22148
|
super("maxBuffer exceeded");
|
|
21310
22149
|
this.name = "MaxBufferError";
|
|
21311
22150
|
}
|
|
21312
22151
|
};
|
|
21313
|
-
async function
|
|
22152
|
+
async function getStream2(inputStream, options) {
|
|
21314
22153
|
if (!inputStream) {
|
|
21315
22154
|
throw new Error("Expected a stream");
|
|
21316
22155
|
}
|
|
@@ -21337,16 +22176,16 @@ var require_get_stream = __commonJS({
|
|
|
21337
22176
|
})();
|
|
21338
22177
|
stream3.on("data", () => {
|
|
21339
22178
|
if (stream3.getBufferedLength() > maxBuffer) {
|
|
21340
|
-
rejectPromise(new
|
|
22179
|
+
rejectPromise(new MaxBufferError2());
|
|
21341
22180
|
}
|
|
21342
22181
|
});
|
|
21343
22182
|
});
|
|
21344
22183
|
return stream3.getBufferedValue();
|
|
21345
22184
|
}
|
|
21346
|
-
module.exports =
|
|
21347
|
-
module.exports.buffer = (stream3, options) =>
|
|
21348
|
-
module.exports.array = (stream3, options) =>
|
|
21349
|
-
module.exports.MaxBufferError =
|
|
22185
|
+
module.exports = getStream2;
|
|
22186
|
+
module.exports.buffer = (stream3, options) => getStream2(stream3, { ...options, encoding: "buffer" });
|
|
22187
|
+
module.exports.array = (stream3, options) => getStream2(stream3, { ...options, array: true });
|
|
22188
|
+
module.exports.MaxBufferError = MaxBufferError2;
|
|
21350
22189
|
}
|
|
21351
22190
|
});
|
|
21352
22191
|
|
|
@@ -22014,9 +22853,9 @@ var require_src = __commonJS({
|
|
|
22014
22853
|
}
|
|
22015
22854
|
get(key, options) {
|
|
22016
22855
|
const { store } = this.opts;
|
|
22017
|
-
const
|
|
22018
|
-
const keyPrefixed =
|
|
22019
|
-
if (
|
|
22856
|
+
const isArray2 = Array.isArray(key);
|
|
22857
|
+
const keyPrefixed = isArray2 ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key);
|
|
22858
|
+
if (isArray2 && store.getMany === void 0) {
|
|
22020
22859
|
const promises = [];
|
|
22021
22860
|
for (const key2 of keyPrefixed) {
|
|
22022
22861
|
promises.push(
|
|
@@ -22039,11 +22878,11 @@ var require_src = __commonJS({
|
|
|
22039
22878
|
return data;
|
|
22040
22879
|
});
|
|
22041
22880
|
}
|
|
22042
|
-
return Promise.resolve().then(() =>
|
|
22881
|
+
return Promise.resolve().then(() => isArray2 ? store.getMany(keyPrefixed) : store.get(keyPrefixed)).then((data) => typeof data === "string" ? this.opts.deserialize(data) : this.opts.compression ? this.opts.deserialize(data) : data).then((data) => {
|
|
22043
22882
|
if (data === void 0 || data === null) {
|
|
22044
22883
|
return void 0;
|
|
22045
22884
|
}
|
|
22046
|
-
if (
|
|
22885
|
+
if (isArray2) {
|
|
22047
22886
|
return data.map((row, index) => {
|
|
22048
22887
|
if (typeof row === "string") {
|
|
22049
22888
|
row = this.opts.deserialize(row);
|
|
@@ -22138,8 +22977,8 @@ function mimicResponse(fromStream, toStream) {
|
|
|
22138
22977
|
properties[property] = {
|
|
22139
22978
|
get() {
|
|
22140
22979
|
const value = fromStream[property];
|
|
22141
|
-
const
|
|
22142
|
-
return
|
|
22980
|
+
const isFunction3 = typeof value === "function";
|
|
22981
|
+
return isFunction3 ? value.bind(fromStream) : value;
|
|
22143
22982
|
},
|
|
22144
22983
|
set(value) {
|
|
22145
22984
|
fromStream[property] = value;
|
|
@@ -22503,8 +23342,8 @@ var require_mimic_response = __commonJS({
|
|
|
22503
23342
|
properties[property] = {
|
|
22504
23343
|
get() {
|
|
22505
23344
|
const value = fromStream[property];
|
|
22506
|
-
const
|
|
22507
|
-
return
|
|
23345
|
+
const isFunction3 = typeof value === "function";
|
|
23346
|
+
return isFunction3 ? value.bind(fromStream) : value;
|
|
22508
23347
|
},
|
|
22509
23348
|
set(value) {
|
|
22510
23349
|
fromStream[property] = value;
|
|
@@ -22585,15 +23424,221 @@ var require_decompress_response = __commonJS({
|
|
|
22585
23424
|
}
|
|
22586
23425
|
});
|
|
22587
23426
|
|
|
22588
|
-
// node_modules/.pnpm/
|
|
22589
|
-
var
|
|
22590
|
-
var
|
|
22591
|
-
"node_modules/.pnpm/
|
|
22592
|
-
|
|
23427
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js
|
|
23428
|
+
var getStreamContents, appendFinalChunk, appendChunk, addNewChunk, isAsyncIterable2, getChunkType, objectToString, MaxBufferError;
|
|
23429
|
+
var init_contents = __esm({
|
|
23430
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js"() {
|
|
23431
|
+
getStreamContents = async (stream2, { init: init2, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
23432
|
+
if (!isAsyncIterable2(stream2)) {
|
|
23433
|
+
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
23434
|
+
}
|
|
23435
|
+
const state = init2();
|
|
23436
|
+
state.length = 0;
|
|
23437
|
+
try {
|
|
23438
|
+
for await (const chunk2 of stream2) {
|
|
23439
|
+
const chunkType = getChunkType(chunk2);
|
|
23440
|
+
const convertedChunk = convertChunk[chunkType](chunk2, state);
|
|
23441
|
+
appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
|
|
23442
|
+
}
|
|
23443
|
+
appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer });
|
|
23444
|
+
return finalize(state);
|
|
23445
|
+
} catch (error2) {
|
|
23446
|
+
error2.bufferedData = finalize(state);
|
|
23447
|
+
throw error2;
|
|
23448
|
+
}
|
|
23449
|
+
};
|
|
23450
|
+
appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
|
|
23451
|
+
const convertedChunk = getFinalChunk(state);
|
|
23452
|
+
if (convertedChunk !== void 0) {
|
|
23453
|
+
appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
|
|
23454
|
+
}
|
|
23455
|
+
};
|
|
23456
|
+
appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
|
|
23457
|
+
const chunkSize = getSize(convertedChunk);
|
|
23458
|
+
const newLength = state.length + chunkSize;
|
|
23459
|
+
if (newLength <= maxBuffer) {
|
|
23460
|
+
addNewChunk(convertedChunk, state, addChunk, newLength);
|
|
23461
|
+
return;
|
|
23462
|
+
}
|
|
23463
|
+
const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
|
|
23464
|
+
if (truncatedChunk !== void 0) {
|
|
23465
|
+
addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
|
|
23466
|
+
}
|
|
23467
|
+
throw new MaxBufferError();
|
|
23468
|
+
};
|
|
23469
|
+
addNewChunk = (convertedChunk, state, addChunk, newLength) => {
|
|
23470
|
+
state.contents = addChunk(convertedChunk, state, newLength);
|
|
23471
|
+
state.length = newLength;
|
|
23472
|
+
};
|
|
23473
|
+
isAsyncIterable2 = (stream2) => typeof stream2 === "object" && stream2 !== null && typeof stream2[Symbol.asyncIterator] === "function";
|
|
23474
|
+
getChunkType = (chunk2) => {
|
|
23475
|
+
const typeOfChunk = typeof chunk2;
|
|
23476
|
+
if (typeOfChunk === "string") {
|
|
23477
|
+
return "string";
|
|
23478
|
+
}
|
|
23479
|
+
if (typeOfChunk !== "object" || chunk2 === null) {
|
|
23480
|
+
return "others";
|
|
23481
|
+
}
|
|
23482
|
+
if (globalThis.Buffer?.isBuffer(chunk2)) {
|
|
23483
|
+
return "buffer";
|
|
23484
|
+
}
|
|
23485
|
+
const prototypeName = objectToString.call(chunk2);
|
|
23486
|
+
if (prototypeName === "[object ArrayBuffer]") {
|
|
23487
|
+
return "arrayBuffer";
|
|
23488
|
+
}
|
|
23489
|
+
if (prototypeName === "[object DataView]") {
|
|
23490
|
+
return "dataView";
|
|
23491
|
+
}
|
|
23492
|
+
if (Number.isInteger(chunk2.byteLength) && Number.isInteger(chunk2.byteOffset) && objectToString.call(chunk2.buffer) === "[object ArrayBuffer]") {
|
|
23493
|
+
return "typedArray";
|
|
23494
|
+
}
|
|
23495
|
+
return "others";
|
|
23496
|
+
};
|
|
23497
|
+
({ toString: objectToString } = Object.prototype);
|
|
23498
|
+
MaxBufferError = class extends Error {
|
|
23499
|
+
name = "MaxBufferError";
|
|
23500
|
+
constructor() {
|
|
23501
|
+
super("maxBuffer exceeded");
|
|
23502
|
+
}
|
|
23503
|
+
};
|
|
23504
|
+
}
|
|
23505
|
+
});
|
|
23506
|
+
|
|
23507
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js
|
|
23508
|
+
var noop, throwObjectStream, getLengthProp;
|
|
23509
|
+
var init_utils = __esm({
|
|
23510
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js"() {
|
|
23511
|
+
noop = () => void 0;
|
|
23512
|
+
throwObjectStream = (chunk2) => {
|
|
23513
|
+
throw new Error(`Streams in object mode are not supported: ${String(chunk2)}`);
|
|
23514
|
+
};
|
|
23515
|
+
getLengthProp = (convertedChunk) => convertedChunk.length;
|
|
23516
|
+
}
|
|
23517
|
+
});
|
|
23518
|
+
|
|
23519
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js
|
|
23520
|
+
var init_array = __esm({
|
|
23521
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js"() {
|
|
23522
|
+
init_contents();
|
|
23523
|
+
init_utils();
|
|
23524
|
+
}
|
|
23525
|
+
});
|
|
23526
|
+
|
|
23527
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js
|
|
23528
|
+
async function getStreamAsArrayBuffer(stream2, options) {
|
|
23529
|
+
return getStreamContents(stream2, arrayBufferMethods, options);
|
|
23530
|
+
}
|
|
23531
|
+
var initArrayBuffer, useTextEncoder, textEncoder, useUint8Array, useUint8ArrayWithOffset, truncateArrayBufferChunk, addArrayBufferChunk, resizeArrayBufferSlow, resizeArrayBuffer, getNewContentsLength, SCALE_FACTOR, finalizeArrayBuffer, hasArrayBufferResize, arrayBufferMethods;
|
|
23532
|
+
var init_array_buffer = __esm({
|
|
23533
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js"() {
|
|
23534
|
+
init_contents();
|
|
23535
|
+
init_utils();
|
|
23536
|
+
initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
|
|
23537
|
+
useTextEncoder = (chunk2) => textEncoder.encode(chunk2);
|
|
23538
|
+
textEncoder = new TextEncoder();
|
|
23539
|
+
useUint8Array = (chunk2) => new Uint8Array(chunk2);
|
|
23540
|
+
useUint8ArrayWithOffset = (chunk2) => new Uint8Array(chunk2.buffer, chunk2.byteOffset, chunk2.byteLength);
|
|
23541
|
+
truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
23542
|
+
addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => {
|
|
23543
|
+
const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
|
|
23544
|
+
new Uint8Array(newContents).set(convertedChunk, previousLength);
|
|
23545
|
+
return newContents;
|
|
23546
|
+
};
|
|
23547
|
+
resizeArrayBufferSlow = (contents, length) => {
|
|
23548
|
+
if (length <= contents.byteLength) {
|
|
23549
|
+
return contents;
|
|
23550
|
+
}
|
|
23551
|
+
const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
|
|
23552
|
+
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
|
23553
|
+
return arrayBuffer;
|
|
23554
|
+
};
|
|
23555
|
+
resizeArrayBuffer = (contents, length) => {
|
|
23556
|
+
if (length <= contents.maxByteLength) {
|
|
23557
|
+
contents.resize(length);
|
|
23558
|
+
return contents;
|
|
23559
|
+
}
|
|
23560
|
+
const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) });
|
|
23561
|
+
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
|
23562
|
+
return arrayBuffer;
|
|
23563
|
+
};
|
|
23564
|
+
getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));
|
|
23565
|
+
SCALE_FACTOR = 2;
|
|
23566
|
+
finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length);
|
|
23567
|
+
hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype;
|
|
23568
|
+
arrayBufferMethods = {
|
|
23569
|
+
init: initArrayBuffer,
|
|
23570
|
+
convertChunk: {
|
|
23571
|
+
string: useTextEncoder,
|
|
23572
|
+
buffer: useUint8Array,
|
|
23573
|
+
arrayBuffer: useUint8Array,
|
|
23574
|
+
dataView: useUint8ArrayWithOffset,
|
|
23575
|
+
typedArray: useUint8ArrayWithOffset,
|
|
23576
|
+
others: throwObjectStream
|
|
23577
|
+
},
|
|
23578
|
+
getSize: getLengthProp,
|
|
23579
|
+
truncateChunk: truncateArrayBufferChunk,
|
|
23580
|
+
addChunk: addArrayBufferChunk,
|
|
23581
|
+
getFinalChunk: noop,
|
|
23582
|
+
finalize: finalizeArrayBuffer
|
|
23583
|
+
};
|
|
23584
|
+
}
|
|
23585
|
+
});
|
|
23586
|
+
|
|
23587
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js
|
|
23588
|
+
async function getStreamAsBuffer(stream2, options) {
|
|
23589
|
+
if (!("Buffer" in globalThis)) {
|
|
23590
|
+
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
23591
|
+
}
|
|
23592
|
+
try {
|
|
23593
|
+
return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream2, options));
|
|
23594
|
+
} catch (error2) {
|
|
23595
|
+
if (error2.bufferedData !== void 0) {
|
|
23596
|
+
error2.bufferedData = arrayBufferToNodeBuffer(error2.bufferedData);
|
|
23597
|
+
}
|
|
23598
|
+
throw error2;
|
|
23599
|
+
}
|
|
23600
|
+
}
|
|
23601
|
+
var arrayBufferToNodeBuffer;
|
|
23602
|
+
var init_buffer = __esm({
|
|
23603
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js"() {
|
|
23604
|
+
init_array_buffer();
|
|
23605
|
+
arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer);
|
|
23606
|
+
}
|
|
23607
|
+
});
|
|
23608
|
+
|
|
23609
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js
|
|
23610
|
+
var init_string = __esm({
|
|
23611
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js"() {
|
|
23612
|
+
init_contents();
|
|
23613
|
+
init_utils();
|
|
23614
|
+
}
|
|
23615
|
+
});
|
|
23616
|
+
|
|
23617
|
+
// node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js
|
|
23618
|
+
var init_source2 = __esm({
|
|
23619
|
+
"node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js"() {
|
|
23620
|
+
init_array();
|
|
23621
|
+
init_array_buffer();
|
|
23622
|
+
init_buffer();
|
|
23623
|
+
init_string();
|
|
23624
|
+
init_contents();
|
|
22593
23625
|
}
|
|
22594
23626
|
});
|
|
22595
23627
|
|
|
22596
|
-
// node_modules/.pnpm/form-data-encoder@
|
|
23628
|
+
// node_modules/.pnpm/form-data-encoder@4.0.2/node_modules/form-data-encoder/lib/index.js
|
|
23629
|
+
function* chunk(value) {
|
|
23630
|
+
if (value.byteLength <= MAX_CHUNK_SIZE) {
|
|
23631
|
+
yield value;
|
|
23632
|
+
return;
|
|
23633
|
+
}
|
|
23634
|
+
let offset = 0;
|
|
23635
|
+
while (offset < value.byteLength) {
|
|
23636
|
+
const size = Math.min(value.byteLength - offset, MAX_CHUNK_SIZE);
|
|
23637
|
+
const buffer = value.buffer.slice(offset, offset + size);
|
|
23638
|
+
offset += buffer.byteLength;
|
|
23639
|
+
yield new Uint8Array(buffer);
|
|
23640
|
+
}
|
|
23641
|
+
}
|
|
22597
23642
|
async function* readStream(readable) {
|
|
22598
23643
|
const reader = readable.getReader();
|
|
22599
23644
|
while (true) {
|
|
@@ -22604,24 +23649,11 @@ async function* readStream(readable) {
|
|
|
22604
23649
|
yield value;
|
|
22605
23650
|
}
|
|
22606
23651
|
}
|
|
22607
|
-
|
|
22608
|
-
|
|
22609
|
-
|
|
22610
|
-
init_isFunction();
|
|
22611
|
-
isAsyncIterable = (value) => isFunction(value[Symbol.asyncIterator]);
|
|
22612
|
-
getStreamIterator = (source) => {
|
|
22613
|
-
if (isAsyncIterable(source)) {
|
|
22614
|
-
return source;
|
|
22615
|
-
}
|
|
22616
|
-
if (isFunction(source.getReader)) {
|
|
22617
|
-
return readStream(source);
|
|
22618
|
-
}
|
|
22619
|
-
throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.");
|
|
22620
|
-
};
|
|
23652
|
+
async function* chunkStream(stream2) {
|
|
23653
|
+
for await (const value of stream2) {
|
|
23654
|
+
yield* chunk(value);
|
|
22621
23655
|
}
|
|
22622
|
-
}
|
|
22623
|
-
|
|
22624
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/createBoundary.js
|
|
23656
|
+
}
|
|
22625
23657
|
function createBoundary() {
|
|
22626
23658
|
let size = 16;
|
|
22627
23659
|
let res = "";
|
|
@@ -22630,28 +23662,7 @@ function createBoundary() {
|
|
|
22630
23662
|
}
|
|
22631
23663
|
return res;
|
|
22632
23664
|
}
|
|
22633
|
-
|
|
22634
|
-
var init_createBoundary = __esm({
|
|
22635
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/createBoundary.js"() {
|
|
22636
|
-
alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
22637
|
-
}
|
|
22638
|
-
});
|
|
22639
|
-
|
|
22640
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/normalizeValue.js
|
|
22641
|
-
var normalizeValue;
|
|
22642
|
-
var init_normalizeValue = __esm({
|
|
22643
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/normalizeValue.js"() {
|
|
22644
|
-
normalizeValue = (value) => String(value).replace(/\r|\n/g, (match, i, str) => {
|
|
22645
|
-
if (match === "\r" && str[i + 1] !== "\n" || match === "\n" && str[i - 1] !== "\r") {
|
|
22646
|
-
return "\r\n";
|
|
22647
|
-
}
|
|
22648
|
-
return match;
|
|
22649
|
-
});
|
|
22650
|
-
}
|
|
22651
|
-
});
|
|
22652
|
-
|
|
22653
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/isPlainObject.js
|
|
22654
|
-
function isPlainObject(value) {
|
|
23665
|
+
function isPlainObject2(value) {
|
|
22655
23666
|
if (getType(value) !== "object") {
|
|
22656
23667
|
return false;
|
|
22657
23668
|
}
|
|
@@ -22662,14 +23673,6 @@ function isPlainObject(value) {
|
|
|
22662
23673
|
const Ctor = pp.constructor && pp.constructor.toString();
|
|
22663
23674
|
return Ctor === Object.toString();
|
|
22664
23675
|
}
|
|
22665
|
-
var getType;
|
|
22666
|
-
var init_isPlainObject = __esm({
|
|
22667
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/isPlainObject.js"() {
|
|
22668
|
-
getType = (value) => Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
|
|
22669
|
-
}
|
|
22670
|
-
});
|
|
22671
|
-
|
|
22672
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/proxyHeaders.js
|
|
22673
23676
|
function getProperty(target, prop) {
|
|
22674
23677
|
if (typeof prop === "string") {
|
|
22675
23678
|
for (const [name, value] of Object.entries(target)) {
|
|
@@ -22680,90 +23683,88 @@ function getProperty(target, prop) {
|
|
|
22680
23683
|
}
|
|
22681
23684
|
return void 0;
|
|
22682
23685
|
}
|
|
22683
|
-
var proxyHeaders;
|
|
22684
|
-
var
|
|
22685
|
-
"node_modules/.pnpm/form-data-encoder@
|
|
22686
|
-
|
|
22687
|
-
|
|
22688
|
-
|
|
23686
|
+
var __accessCheck, __privateGet, __privateAdd, __privateSet, __privateMethod, isFunction2, isAsyncIterable3, MAX_CHUNK_SIZE, getStreamIterator, alphabet, normalizeValue, getType, proxyHeaders, isFormData2, escapeName, isFile, defaultOptions, readonlyProp, _CRLF, _CRLF_BYTES, _CRLF_BYTES_LENGTH, _DASHES, _encoder, _footer, _form, _options, _getFieldHeader, getFieldHeader_fn, _getContentLength, getContentLength_fn, FormDataEncoder;
|
|
23687
|
+
var init_lib = __esm({
|
|
23688
|
+
"node_modules/.pnpm/form-data-encoder@4.0.2/node_modules/form-data-encoder/lib/index.js"() {
|
|
23689
|
+
__accessCheck = (obj, member, msg) => {
|
|
23690
|
+
if (!member.has(obj))
|
|
23691
|
+
throw TypeError("Cannot " + msg);
|
|
23692
|
+
};
|
|
23693
|
+
__privateGet = (obj, member, getter) => {
|
|
23694
|
+
__accessCheck(obj, member, "read from private field");
|
|
23695
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
23696
|
+
};
|
|
23697
|
+
__privateAdd = (obj, member, value) => {
|
|
23698
|
+
if (member.has(obj))
|
|
23699
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
23700
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
23701
|
+
};
|
|
23702
|
+
__privateSet = (obj, member, value, setter) => {
|
|
23703
|
+
__accessCheck(obj, member, "write to private field");
|
|
23704
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23705
|
+
return value;
|
|
23706
|
+
};
|
|
23707
|
+
__privateMethod = (obj, member, method) => {
|
|
23708
|
+
__accessCheck(obj, member, "access private method");
|
|
23709
|
+
return method;
|
|
23710
|
+
};
|
|
23711
|
+
isFunction2 = (value) => typeof value === "function";
|
|
23712
|
+
isAsyncIterable3 = (value) => isFunction2(value[Symbol.asyncIterator]);
|
|
23713
|
+
MAX_CHUNK_SIZE = 65536;
|
|
23714
|
+
getStreamIterator = (source) => {
|
|
23715
|
+
if (isAsyncIterable3(source)) {
|
|
23716
|
+
return chunkStream(source);
|
|
23717
|
+
}
|
|
23718
|
+
if (isFunction2(source.getReader)) {
|
|
23719
|
+
return chunkStream(readStream(source));
|
|
23720
|
+
}
|
|
23721
|
+
throw new TypeError(
|
|
23722
|
+
"Unsupported data source: Expected either ReadableStream or async iterable."
|
|
23723
|
+
);
|
|
23724
|
+
};
|
|
23725
|
+
alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
23726
|
+
normalizeValue = (value) => String(value).replace(/\r|\n/g, (match, i, str) => {
|
|
23727
|
+
if (match === "\r" && str[i + 1] !== "\n" || match === "\n" && str[i - 1] !== "\r") {
|
|
23728
|
+
return "\r\n";
|
|
23729
|
+
}
|
|
23730
|
+
return match;
|
|
22689
23731
|
});
|
|
22690
|
-
|
|
22691
|
-
|
|
22692
|
-
|
|
22693
|
-
|
|
22694
|
-
|
|
22695
|
-
|
|
22696
|
-
|
|
22697
|
-
|
|
22698
|
-
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
-
|
|
22702
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/escapeName.js
|
|
22703
|
-
var escapeName;
|
|
22704
|
-
var init_escapeName = __esm({
|
|
22705
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/escapeName.js"() {
|
|
23732
|
+
getType = (value) => Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
|
|
23733
|
+
proxyHeaders = (object) => new Proxy(
|
|
23734
|
+
object,
|
|
23735
|
+
{
|
|
23736
|
+
get: (target, prop) => getProperty(target, prop),
|
|
23737
|
+
has: (target, prop) => getProperty(target, prop) !== void 0
|
|
23738
|
+
}
|
|
23739
|
+
);
|
|
23740
|
+
isFormData2 = (value) => Boolean(
|
|
23741
|
+
value && isFunction2(value.constructor) && value[Symbol.toStringTag] === "FormData" && isFunction2(value.append) && isFunction2(value.getAll) && isFunction2(value.entries) && isFunction2(value[Symbol.iterator])
|
|
23742
|
+
);
|
|
22706
23743
|
escapeName = (name) => String(name).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
|
|
22707
|
-
|
|
22708
|
-
|
|
22709
|
-
|
|
22710
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/isFile.js
|
|
22711
|
-
var isFile;
|
|
22712
|
-
var init_isFile = __esm({
|
|
22713
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/util/isFile.js"() {
|
|
22714
|
-
init_isFunction();
|
|
22715
|
-
isFile = (value) => Boolean(value && typeof value === "object" && isFunction(value.constructor) && value[Symbol.toStringTag] === "File" && isFunction(value.stream) && value.name != null);
|
|
22716
|
-
}
|
|
22717
|
-
});
|
|
22718
|
-
|
|
22719
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/FormDataEncoder.js
|
|
22720
|
-
var __classPrivateFieldSet, __classPrivateFieldGet, _FormDataEncoder_instances, _FormDataEncoder_CRLF, _FormDataEncoder_CRLF_BYTES, _FormDataEncoder_CRLF_BYTES_LENGTH, _FormDataEncoder_DASHES, _FormDataEncoder_encoder, _FormDataEncoder_footer, _FormDataEncoder_form, _FormDataEncoder_options, _FormDataEncoder_getFieldHeader, _FormDataEncoder_getContentLength, defaultOptions, readonlyProp, FormDataEncoder;
|
|
22721
|
-
var init_FormDataEncoder = __esm({
|
|
22722
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/FormDataEncoder.js"() {
|
|
22723
|
-
init_getStreamIterator();
|
|
22724
|
-
init_createBoundary();
|
|
22725
|
-
init_normalizeValue();
|
|
22726
|
-
init_isPlainObject();
|
|
22727
|
-
init_proxyHeaders();
|
|
22728
|
-
init_isFormData();
|
|
22729
|
-
init_escapeName();
|
|
22730
|
-
init_isFile();
|
|
22731
|
-
__classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
22732
|
-
if (kind === "m")
|
|
22733
|
-
throw new TypeError("Private method is not writable");
|
|
22734
|
-
if (kind === "a" && !f)
|
|
22735
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
22736
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
22737
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
22738
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
22739
|
-
};
|
|
22740
|
-
__classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
22741
|
-
if (kind === "a" && !f)
|
|
22742
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
22743
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
22744
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
22745
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
22746
|
-
};
|
|
23744
|
+
isFile = (value) => Boolean(
|
|
23745
|
+
value && typeof value === "object" && isFunction2(value.constructor) && value[Symbol.toStringTag] === "File" && isFunction2(value.stream) && value.name != null
|
|
23746
|
+
);
|
|
22747
23747
|
defaultOptions = {
|
|
22748
23748
|
enableAdditionalHeaders: false
|
|
22749
23749
|
};
|
|
22750
23750
|
readonlyProp = { writable: false, configurable: false };
|
|
22751
23751
|
FormDataEncoder = class {
|
|
22752
23752
|
constructor(form, boundaryOrOptions, options) {
|
|
22753
|
-
|
|
22754
|
-
|
|
22755
|
-
|
|
22756
|
-
|
|
22757
|
-
|
|
22758
|
-
|
|
22759
|
-
|
|
22760
|
-
|
|
22761
|
-
|
|
22762
|
-
|
|
23753
|
+
__privateAdd(this, _getFieldHeader);
|
|
23754
|
+
__privateAdd(this, _getContentLength);
|
|
23755
|
+
__privateAdd(this, _CRLF, "\r\n");
|
|
23756
|
+
__privateAdd(this, _CRLF_BYTES, void 0);
|
|
23757
|
+
__privateAdd(this, _CRLF_BYTES_LENGTH, void 0);
|
|
23758
|
+
__privateAdd(this, _DASHES, "-".repeat(2));
|
|
23759
|
+
__privateAdd(this, _encoder, new TextEncoder());
|
|
23760
|
+
__privateAdd(this, _footer, void 0);
|
|
23761
|
+
__privateAdd(this, _form, void 0);
|
|
23762
|
+
__privateAdd(this, _options, void 0);
|
|
23763
|
+
if (!isFormData2(form)) {
|
|
22763
23764
|
throw new TypeError("Expected first argument to be a FormData instance.");
|
|
22764
23765
|
}
|
|
22765
23766
|
let boundary;
|
|
22766
|
-
if (
|
|
23767
|
+
if (isPlainObject2(boundaryOrOptions)) {
|
|
22767
23768
|
options = boundaryOrOptions;
|
|
22768
23769
|
} else {
|
|
22769
23770
|
boundary = boundaryOrOptions;
|
|
@@ -22774,20 +23775,22 @@ var init_FormDataEncoder = __esm({
|
|
|
22774
23775
|
if (typeof boundary !== "string") {
|
|
22775
23776
|
throw new TypeError("Expected boundary argument to be a string.");
|
|
22776
23777
|
}
|
|
22777
|
-
if (options && !
|
|
23778
|
+
if (options && !isPlainObject2(options)) {
|
|
22778
23779
|
throw new TypeError("Expected options argument to be an object.");
|
|
22779
23780
|
}
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
|
|
22783
|
-
|
|
23781
|
+
__privateSet(this, _form, Array.from(form.entries()));
|
|
23782
|
+
__privateSet(this, _options, { ...defaultOptions, ...options });
|
|
23783
|
+
__privateSet(this, _CRLF_BYTES, __privateGet(this, _encoder).encode(__privateGet(this, _CRLF)));
|
|
23784
|
+
__privateSet(this, _CRLF_BYTES_LENGTH, __privateGet(this, _CRLF_BYTES).byteLength);
|
|
22784
23785
|
this.boundary = `form-data-boundary-${boundary}`;
|
|
22785
23786
|
this.contentType = `multipart/form-data; boundary=${this.boundary}`;
|
|
22786
|
-
|
|
23787
|
+
__privateSet(this, _footer, __privateGet(this, _encoder).encode(
|
|
23788
|
+
`${__privateGet(this, _DASHES)}${this.boundary}${__privateGet(this, _DASHES)}${__privateGet(this, _CRLF).repeat(2)}`
|
|
23789
|
+
));
|
|
22787
23790
|
const headers = {
|
|
22788
23791
|
"Content-Type": this.contentType
|
|
22789
23792
|
};
|
|
22790
|
-
const contentLength =
|
|
23793
|
+
const contentLength = __privateMethod(this, _getContentLength, getContentLength_fn).call(this);
|
|
22791
23794
|
if (contentLength) {
|
|
22792
23795
|
this.contentLength = contentLength;
|
|
22793
23796
|
headers["Content-Length"] = contentLength;
|
|
@@ -22800,97 +23803,166 @@ var init_FormDataEncoder = __esm({
|
|
|
22800
23803
|
headers: readonlyProp
|
|
22801
23804
|
});
|
|
22802
23805
|
}
|
|
22803
|
-
|
|
22804
|
-
|
|
22805
|
-
|
|
23806
|
+
/**
|
|
23807
|
+
* Creates an iterator allowing to go through form-data parts (with metadata).
|
|
23808
|
+
* This method **will not** read the files and **will not** split values big into smaller chunks.
|
|
23809
|
+
*
|
|
23810
|
+
* Using this method, you can convert form-data content into Blob:
|
|
23811
|
+
*
|
|
23812
|
+
* @example
|
|
23813
|
+
*
|
|
23814
|
+
* ```ts
|
|
23815
|
+
* import {Readable} from "stream"
|
|
23816
|
+
*
|
|
23817
|
+
* import {FormDataEncoder} from "form-data-encoder"
|
|
23818
|
+
*
|
|
23819
|
+
* import {FormData} from "formdata-polyfill/esm-min.js"
|
|
23820
|
+
* import {fileFrom} from "fetch-blob/form.js"
|
|
23821
|
+
* import {File} from "fetch-blob/file.js"
|
|
23822
|
+
* import {Blob} from "fetch-blob"
|
|
23823
|
+
*
|
|
23824
|
+
* import fetch from "node-fetch"
|
|
23825
|
+
*
|
|
23826
|
+
* const form = new FormData()
|
|
23827
|
+
*
|
|
23828
|
+
* form.set("field", "Just a random string")
|
|
23829
|
+
* form.set("file", new File(["Using files is class amazing"]))
|
|
23830
|
+
* form.set("fileFromPath", await fileFrom("path/to/a/file.txt"))
|
|
23831
|
+
*
|
|
23832
|
+
* const encoder = new FormDataEncoder(form)
|
|
23833
|
+
*
|
|
23834
|
+
* const options = {
|
|
23835
|
+
* method: "post",
|
|
23836
|
+
* body: new Blob(encoder, {type: encoder.contentType})
|
|
23837
|
+
* }
|
|
23838
|
+
*
|
|
23839
|
+
* const response = await fetch("https://httpbin.org/post", options)
|
|
23840
|
+
*
|
|
23841
|
+
* console.log(await response.json())
|
|
23842
|
+
* ```
|
|
23843
|
+
*/
|
|
22806
23844
|
*values() {
|
|
22807
|
-
for (const [name, raw] of
|
|
22808
|
-
const value = isFile(raw) ? raw :
|
|
22809
|
-
|
|
23845
|
+
for (const [name, raw] of __privateGet(this, _form)) {
|
|
23846
|
+
const value = isFile(raw) ? raw : __privateGet(this, _encoder).encode(
|
|
23847
|
+
normalizeValue(raw)
|
|
23848
|
+
);
|
|
23849
|
+
yield __privateMethod(this, _getFieldHeader, getFieldHeader_fn).call(this, name, value);
|
|
22810
23850
|
yield value;
|
|
22811
|
-
yield
|
|
23851
|
+
yield __privateGet(this, _CRLF_BYTES);
|
|
22812
23852
|
}
|
|
22813
|
-
yield
|
|
23853
|
+
yield __privateGet(this, _footer);
|
|
22814
23854
|
}
|
|
23855
|
+
/**
|
|
23856
|
+
* Creates an async iterator allowing to perform the encoding by portions.
|
|
23857
|
+
* This method reads through files and splits big values into smaller pieces (65536 bytes per each).
|
|
23858
|
+
*
|
|
23859
|
+
* @example
|
|
23860
|
+
*
|
|
23861
|
+
* ```ts
|
|
23862
|
+
* import {Readable} from "stream"
|
|
23863
|
+
*
|
|
23864
|
+
* import {FormData, File, fileFromPath} from "formdata-node"
|
|
23865
|
+
* import {FormDataEncoder} from "form-data-encoder"
|
|
23866
|
+
*
|
|
23867
|
+
* import fetch from "node-fetch"
|
|
23868
|
+
*
|
|
23869
|
+
* const form = new FormData()
|
|
23870
|
+
*
|
|
23871
|
+
* form.set("field", "Just a random string")
|
|
23872
|
+
* form.set("file", new File(["Using files is class amazing"], "file.txt"))
|
|
23873
|
+
* form.set("fileFromPath", await fileFromPath("path/to/a/file.txt"))
|
|
23874
|
+
*
|
|
23875
|
+
* const encoder = new FormDataEncoder(form)
|
|
23876
|
+
*
|
|
23877
|
+
* const options = {
|
|
23878
|
+
* method: "post",
|
|
23879
|
+
* headers: encoder.headers,
|
|
23880
|
+
* body: Readable.from(encoder.encode()) // or Readable.from(encoder)
|
|
23881
|
+
* }
|
|
23882
|
+
*
|
|
23883
|
+
* const response = await fetch("https://httpbin.org/post", options)
|
|
23884
|
+
*
|
|
23885
|
+
* console.log(await response.json())
|
|
23886
|
+
* ```
|
|
23887
|
+
*/
|
|
22815
23888
|
async *encode() {
|
|
22816
23889
|
for (const part of this.values()) {
|
|
22817
23890
|
if (isFile(part)) {
|
|
22818
23891
|
yield* getStreamIterator(part.stream());
|
|
22819
23892
|
} else {
|
|
22820
|
-
yield part;
|
|
23893
|
+
yield* chunk(part);
|
|
22821
23894
|
}
|
|
22822
23895
|
}
|
|
22823
23896
|
}
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
if (isFile(value)) {
|
|
22829
|
-
header += `; filename="${escapeName(value.name)}"${__classPrivateFieldGet(this, _FormDataEncoder_CRLF, "f")}`;
|
|
22830
|
-
header += `Content-Type: ${value.type || "application/octet-stream"}`;
|
|
22831
|
-
}
|
|
22832
|
-
const size = isFile(value) ? value.size : value.byteLength;
|
|
22833
|
-
if (__classPrivateFieldGet(this, _FormDataEncoder_options, "f").enableAdditionalHeaders === true && size != null && !isNaN(size)) {
|
|
22834
|
-
header += `${__classPrivateFieldGet(this, _FormDataEncoder_CRLF, "f")}Content-Length: ${isFile(value) ? value.size : value.byteLength}`;
|
|
22835
|
-
}
|
|
22836
|
-
return __classPrivateFieldGet(this, _FormDataEncoder_encoder, "f").encode(`${header}${__classPrivateFieldGet(this, _FormDataEncoder_CRLF, "f").repeat(2)}`);
|
|
22837
|
-
}, _FormDataEncoder_getContentLength = function _FormDataEncoder_getContentLength2() {
|
|
22838
|
-
let length = 0;
|
|
22839
|
-
for (const [name, raw] of __classPrivateFieldGet(this, _FormDataEncoder_form, "f")) {
|
|
22840
|
-
const value = isFile(raw) ? raw : __classPrivateFieldGet(this, _FormDataEncoder_encoder, "f").encode(normalizeValue(raw));
|
|
22841
|
-
const size = isFile(value) ? value.size : value.byteLength;
|
|
22842
|
-
if (size == null || isNaN(size)) {
|
|
22843
|
-
return void 0;
|
|
22844
|
-
}
|
|
22845
|
-
length += __classPrivateFieldGet(this, _FormDataEncoder_instances, "m", _FormDataEncoder_getFieldHeader).call(this, name, value).byteLength;
|
|
22846
|
-
length += size;
|
|
22847
|
-
length += __classPrivateFieldGet(this, _FormDataEncoder_CRLF_BYTES_LENGTH, "f");
|
|
22848
|
-
}
|
|
22849
|
-
return String(length + __classPrivateFieldGet(this, _FormDataEncoder_footer, "f").byteLength);
|
|
22850
|
-
}, Symbol.iterator)]() {
|
|
23897
|
+
/**
|
|
23898
|
+
* Creates an iterator allowing to read through the encoder data using for...of loops
|
|
23899
|
+
*/
|
|
23900
|
+
[Symbol.iterator]() {
|
|
22851
23901
|
return this.values();
|
|
22852
23902
|
}
|
|
23903
|
+
/**
|
|
23904
|
+
* Creates an **async** iterator allowing to read through the encoder data using for-await...of loops
|
|
23905
|
+
*/
|
|
22853
23906
|
[Symbol.asyncIterator]() {
|
|
22854
23907
|
return this.encode();
|
|
22855
23908
|
}
|
|
22856
23909
|
};
|
|
23910
|
+
_CRLF = /* @__PURE__ */ new WeakMap();
|
|
23911
|
+
_CRLF_BYTES = /* @__PURE__ */ new WeakMap();
|
|
23912
|
+
_CRLF_BYTES_LENGTH = /* @__PURE__ */ new WeakMap();
|
|
23913
|
+
_DASHES = /* @__PURE__ */ new WeakMap();
|
|
23914
|
+
_encoder = /* @__PURE__ */ new WeakMap();
|
|
23915
|
+
_footer = /* @__PURE__ */ new WeakMap();
|
|
23916
|
+
_form = /* @__PURE__ */ new WeakMap();
|
|
23917
|
+
_options = /* @__PURE__ */ new WeakMap();
|
|
23918
|
+
_getFieldHeader = /* @__PURE__ */ new WeakSet();
|
|
23919
|
+
getFieldHeader_fn = function(name, value) {
|
|
23920
|
+
let header = "";
|
|
23921
|
+
header += `${__privateGet(this, _DASHES)}${this.boundary}${__privateGet(this, _CRLF)}`;
|
|
23922
|
+
header += `Content-Disposition: form-data; name="${escapeName(name)}"`;
|
|
23923
|
+
if (isFile(value)) {
|
|
23924
|
+
header += `; filename="${escapeName(value.name)}"${__privateGet(this, _CRLF)}`;
|
|
23925
|
+
header += `Content-Type: ${value.type || "application/octet-stream"}`;
|
|
23926
|
+
}
|
|
23927
|
+
if (__privateGet(this, _options).enableAdditionalHeaders === true) {
|
|
23928
|
+
const size = isFile(value) ? value.size : value.byteLength;
|
|
23929
|
+
if (size != null && !isNaN(size)) {
|
|
23930
|
+
header += `${__privateGet(this, _CRLF)}Content-Length: ${size}`;
|
|
23931
|
+
}
|
|
23932
|
+
}
|
|
23933
|
+
return __privateGet(this, _encoder).encode(`${header}${__privateGet(this, _CRLF).repeat(2)}`);
|
|
23934
|
+
};
|
|
23935
|
+
_getContentLength = /* @__PURE__ */ new WeakSet();
|
|
23936
|
+
getContentLength_fn = function() {
|
|
23937
|
+
let length = 0;
|
|
23938
|
+
for (const [name, raw] of __privateGet(this, _form)) {
|
|
23939
|
+
const value = isFile(raw) ? raw : __privateGet(this, _encoder).encode(
|
|
23940
|
+
normalizeValue(raw)
|
|
23941
|
+
);
|
|
23942
|
+
const size = isFile(value) ? value.size : value.byteLength;
|
|
23943
|
+
if (size == null || isNaN(size)) {
|
|
23944
|
+
return void 0;
|
|
23945
|
+
}
|
|
23946
|
+
length += __privateMethod(this, _getFieldHeader, getFieldHeader_fn).call(this, name, value).byteLength;
|
|
23947
|
+
length += size;
|
|
23948
|
+
length += __privateGet(this, _CRLF_BYTES_LENGTH);
|
|
23949
|
+
}
|
|
23950
|
+
return String(length + __privateGet(this, _footer).byteLength);
|
|
23951
|
+
};
|
|
22857
23952
|
}
|
|
22858
23953
|
});
|
|
22859
23954
|
|
|
22860
|
-
// node_modules/.pnpm/
|
|
22861
|
-
|
|
22862
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/FileLike.js"() {
|
|
22863
|
-
}
|
|
22864
|
-
});
|
|
22865
|
-
|
|
22866
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/FormDataLike.js
|
|
22867
|
-
var init_FormDataLike = __esm({
|
|
22868
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/FormDataLike.js"() {
|
|
22869
|
-
}
|
|
22870
|
-
});
|
|
22871
|
-
|
|
22872
|
-
// node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/index.js
|
|
22873
|
-
var init_lib = __esm({
|
|
22874
|
-
"node_modules/.pnpm/form-data-encoder@2.1.4/node_modules/form-data-encoder/lib/index.js"() {
|
|
22875
|
-
init_FormDataEncoder();
|
|
22876
|
-
init_FileLike();
|
|
22877
|
-
init_FormDataLike();
|
|
22878
|
-
init_isFile();
|
|
22879
|
-
init_isFormData();
|
|
22880
|
-
}
|
|
22881
|
-
});
|
|
22882
|
-
|
|
22883
|
-
// node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/utils/is-form-data.js
|
|
22884
|
-
function isFormData2(body) {
|
|
23955
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/is-form-data.js
|
|
23956
|
+
function isFormData3(body) {
|
|
22885
23957
|
return dist_default.nodeStream(body) && dist_default.function_(body.getBoundary);
|
|
22886
23958
|
}
|
|
22887
23959
|
var init_is_form_data = __esm({
|
|
22888
|
-
"node_modules/.pnpm/got@
|
|
23960
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/is-form-data.js"() {
|
|
22889
23961
|
init_dist();
|
|
22890
23962
|
}
|
|
22891
23963
|
});
|
|
22892
23964
|
|
|
22893
|
-
// node_modules/.pnpm/got@
|
|
23965
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/get-body-size.js
|
|
22894
23966
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
22895
23967
|
import { promisify } from "node:util";
|
|
22896
23968
|
async function getBodySize(body, headers) {
|
|
@@ -22906,19 +23978,19 @@ async function getBodySize(body, headers) {
|
|
|
22906
23978
|
if (dist_default.buffer(body)) {
|
|
22907
23979
|
return body.length;
|
|
22908
23980
|
}
|
|
22909
|
-
if (
|
|
23981
|
+
if (isFormData3(body)) {
|
|
22910
23982
|
return promisify(body.getLength.bind(body))();
|
|
22911
23983
|
}
|
|
22912
23984
|
return void 0;
|
|
22913
23985
|
}
|
|
22914
23986
|
var init_get_body_size = __esm({
|
|
22915
|
-
"node_modules/.pnpm/got@
|
|
23987
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/get-body-size.js"() {
|
|
22916
23988
|
init_dist();
|
|
22917
23989
|
init_is_form_data();
|
|
22918
23990
|
}
|
|
22919
23991
|
});
|
|
22920
23992
|
|
|
22921
|
-
// node_modules/.pnpm/got@
|
|
23993
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/proxy-events.js
|
|
22922
23994
|
function proxyEvents(from, to, events) {
|
|
22923
23995
|
const eventFunctions = {};
|
|
22924
23996
|
for (const event of events) {
|
|
@@ -22935,11 +24007,11 @@ function proxyEvents(from, to, events) {
|
|
|
22935
24007
|
};
|
|
22936
24008
|
}
|
|
22937
24009
|
var init_proxy_events = __esm({
|
|
22938
|
-
"node_modules/.pnpm/got@
|
|
24010
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/proxy-events.js"() {
|
|
22939
24011
|
}
|
|
22940
24012
|
});
|
|
22941
24013
|
|
|
22942
|
-
// node_modules/.pnpm/got@
|
|
24014
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/unhandle.js
|
|
22943
24015
|
function unhandle() {
|
|
22944
24016
|
const handlers = [];
|
|
22945
24017
|
return {
|
|
@@ -22957,15 +24029,15 @@ function unhandle() {
|
|
|
22957
24029
|
};
|
|
22958
24030
|
}
|
|
22959
24031
|
var init_unhandle = __esm({
|
|
22960
|
-
"node_modules/.pnpm/got@
|
|
24032
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/unhandle.js"() {
|
|
22961
24033
|
}
|
|
22962
24034
|
});
|
|
22963
24035
|
|
|
22964
|
-
// node_modules/.pnpm/got@
|
|
24036
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/timed-out.js
|
|
22965
24037
|
import net from "node:net";
|
|
22966
24038
|
function timedOut(request, delays, options) {
|
|
22967
24039
|
if (reentry in request) {
|
|
22968
|
-
return
|
|
24040
|
+
return noop2;
|
|
22969
24041
|
}
|
|
22970
24042
|
request[reentry] = true;
|
|
22971
24043
|
const cancelers = [];
|
|
@@ -22995,13 +24067,13 @@ function timedOut(request, delays, options) {
|
|
|
22995
24067
|
throw error2;
|
|
22996
24068
|
}
|
|
22997
24069
|
});
|
|
22998
|
-
if (
|
|
24070
|
+
if (delays.request !== void 0) {
|
|
22999
24071
|
const cancelTimeout = addTimeout(delays.request, timeoutHandler, "request");
|
|
23000
24072
|
once(request, "response", (response) => {
|
|
23001
24073
|
once(response, "end", cancelTimeout);
|
|
23002
24074
|
});
|
|
23003
24075
|
}
|
|
23004
|
-
if (
|
|
24076
|
+
if (delays.socket !== void 0) {
|
|
23005
24077
|
const { socket } = delays;
|
|
23006
24078
|
const socketTimeoutHandler = () => {
|
|
23007
24079
|
timeoutHandler(socket, "socket");
|
|
@@ -23011,16 +24083,16 @@ function timedOut(request, delays, options) {
|
|
|
23011
24083
|
request.removeListener("timeout", socketTimeoutHandler);
|
|
23012
24084
|
});
|
|
23013
24085
|
}
|
|
23014
|
-
const hasLookup =
|
|
23015
|
-
const hasConnect =
|
|
23016
|
-
const hasSecureConnect =
|
|
23017
|
-
const hasSend =
|
|
24086
|
+
const hasLookup = delays.lookup !== void 0;
|
|
24087
|
+
const hasConnect = delays.connect !== void 0;
|
|
24088
|
+
const hasSecureConnect = delays.secureConnect !== void 0;
|
|
24089
|
+
const hasSend = delays.send !== void 0;
|
|
23018
24090
|
if (hasLookup || hasConnect || hasSecureConnect || hasSend) {
|
|
23019
24091
|
once(request, "socket", (socket) => {
|
|
23020
24092
|
const { socketPath } = request;
|
|
23021
24093
|
if (socket.connecting) {
|
|
23022
24094
|
const hasPath = Boolean(socketPath ?? net.isIP(hostname ?? host ?? "") !== 0);
|
|
23023
|
-
if (hasLookup && !hasPath &&
|
|
24095
|
+
if (hasLookup && !hasPath && socket.address().address === void 0) {
|
|
23024
24096
|
const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, "lookup");
|
|
23025
24097
|
once(socket, "lookup", cancelTimeout);
|
|
23026
24098
|
}
|
|
@@ -23055,13 +24127,13 @@ function timedOut(request, delays, options) {
|
|
|
23055
24127
|
}
|
|
23056
24128
|
});
|
|
23057
24129
|
}
|
|
23058
|
-
if (
|
|
24130
|
+
if (delays.response !== void 0) {
|
|
23059
24131
|
once(request, "upload-complete", () => {
|
|
23060
24132
|
const cancelTimeout = addTimeout(delays.response, timeoutHandler, "response");
|
|
23061
24133
|
once(request, "response", cancelTimeout);
|
|
23062
24134
|
});
|
|
23063
24135
|
}
|
|
23064
|
-
if (
|
|
24136
|
+
if (delays.read !== void 0) {
|
|
23065
24137
|
once(request, "response", (response) => {
|
|
23066
24138
|
const cancelTimeout = addTimeout(delays.read, timeoutHandler, "read");
|
|
23067
24139
|
once(response, "end", cancelTimeout);
|
|
@@ -23069,28 +24141,19 @@ function timedOut(request, delays, options) {
|
|
|
23069
24141
|
}
|
|
23070
24142
|
return cancelTimeouts;
|
|
23071
24143
|
}
|
|
23072
|
-
var reentry,
|
|
24144
|
+
var reentry, noop2, TimeoutError2;
|
|
23073
24145
|
var init_timed_out = __esm({
|
|
23074
|
-
"node_modules/.pnpm/got@
|
|
24146
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/timed-out.js"() {
|
|
23075
24147
|
init_unhandle();
|
|
23076
24148
|
reentry = Symbol("reentry");
|
|
23077
|
-
|
|
24149
|
+
noop2 = () => {
|
|
23078
24150
|
};
|
|
23079
24151
|
TimeoutError2 = class extends Error {
|
|
24152
|
+
event;
|
|
24153
|
+
code;
|
|
23080
24154
|
constructor(threshold, event) {
|
|
23081
24155
|
super(`Timeout awaiting '${event}' for ${threshold}ms`);
|
|
23082
|
-
|
|
23083
|
-
enumerable: true,
|
|
23084
|
-
configurable: true,
|
|
23085
|
-
writable: true,
|
|
23086
|
-
value: event
|
|
23087
|
-
});
|
|
23088
|
-
Object.defineProperty(this, "code", {
|
|
23089
|
-
enumerable: true,
|
|
23090
|
-
configurable: true,
|
|
23091
|
-
writable: true,
|
|
23092
|
-
value: void 0
|
|
23093
|
-
});
|
|
24156
|
+
this.event = event;
|
|
23094
24157
|
this.name = "TimeoutError";
|
|
23095
24158
|
this.code = "ETIMEDOUT";
|
|
23096
24159
|
}
|
|
@@ -23098,7 +24161,7 @@ var init_timed_out = __esm({
|
|
|
23098
24161
|
}
|
|
23099
24162
|
});
|
|
23100
24163
|
|
|
23101
|
-
// node_modules/.pnpm/got@
|
|
24164
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/url-to-options.js
|
|
23102
24165
|
function urlToOptions(url) {
|
|
23103
24166
|
url = url;
|
|
23104
24167
|
const options = {
|
|
@@ -23120,29 +24183,19 @@ function urlToOptions(url) {
|
|
|
23120
24183
|
return options;
|
|
23121
24184
|
}
|
|
23122
24185
|
var init_url_to_options = __esm({
|
|
23123
|
-
"node_modules/.pnpm/got@
|
|
24186
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/url-to-options.js"() {
|
|
23124
24187
|
init_dist();
|
|
23125
24188
|
}
|
|
23126
24189
|
});
|
|
23127
24190
|
|
|
23128
|
-
// node_modules/.pnpm/got@
|
|
24191
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/weakable-map.js
|
|
23129
24192
|
var WeakableMap;
|
|
23130
24193
|
var init_weakable_map = __esm({
|
|
23131
|
-
"node_modules/.pnpm/got@
|
|
24194
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/weakable-map.js"() {
|
|
23132
24195
|
WeakableMap = class {
|
|
24196
|
+
weakMap;
|
|
24197
|
+
map;
|
|
23133
24198
|
constructor() {
|
|
23134
|
-
Object.defineProperty(this, "weakMap", {
|
|
23135
|
-
enumerable: true,
|
|
23136
|
-
configurable: true,
|
|
23137
|
-
writable: true,
|
|
23138
|
-
value: void 0
|
|
23139
|
-
});
|
|
23140
|
-
Object.defineProperty(this, "map", {
|
|
23141
|
-
enumerable: true,
|
|
23142
|
-
configurable: true,
|
|
23143
|
-
writable: true,
|
|
23144
|
-
value: void 0
|
|
23145
|
-
});
|
|
23146
24199
|
this.weakMap = /* @__PURE__ */ new WeakMap();
|
|
23147
24200
|
this.map = /* @__PURE__ */ new Map();
|
|
23148
24201
|
}
|
|
@@ -23169,10 +24222,10 @@ var init_weakable_map = __esm({
|
|
|
23169
24222
|
}
|
|
23170
24223
|
});
|
|
23171
24224
|
|
|
23172
|
-
// node_modules/.pnpm/got@
|
|
24225
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/calculate-retry-delay.js
|
|
23173
24226
|
var calculateRetryDelay, calculate_retry_delay_default;
|
|
23174
24227
|
var init_calculate_retry_delay = __esm({
|
|
23175
|
-
"node_modules/.pnpm/got@
|
|
24228
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/calculate-retry-delay.js"() {
|
|
23176
24229
|
calculateRetryDelay = ({ attemptCount, retryOptions, error: error2, retryAfter, computedValue }) => {
|
|
23177
24230
|
if (error2.name === "RetryError") {
|
|
23178
24231
|
return 1;
|
|
@@ -23214,8 +24267,8 @@ import {
|
|
|
23214
24267
|
} from "node:dns";
|
|
23215
24268
|
import { promisify as promisify2 } from "node:util";
|
|
23216
24269
|
import os from "node:os";
|
|
23217
|
-
var AsyncResolver, kCacheableLookupCreateConnection, kCacheableLookupInstance, kExpires, supportsALL, verifyAgent, map4to6, getIfaceInfo,
|
|
23218
|
-
var
|
|
24270
|
+
var AsyncResolver, kCacheableLookupCreateConnection, kCacheableLookupInstance, kExpires, supportsALL, verifyAgent, map4to6, getIfaceInfo, isIterable2, ignoreNoResultErrors, ttl, all, all4, all6, CacheableLookup;
|
|
24271
|
+
var init_source3 = __esm({
|
|
23219
24272
|
"node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js"() {
|
|
23220
24273
|
({ Resolver: AsyncResolver } = dnsPromises);
|
|
23221
24274
|
kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
@@ -23256,7 +24309,7 @@ var init_source2 = __esm({
|
|
|
23256
24309
|
}
|
|
23257
24310
|
return { has4, has6 };
|
|
23258
24311
|
};
|
|
23259
|
-
|
|
24312
|
+
isIterable2 = (map) => {
|
|
23260
24313
|
return Symbol.iterator in map;
|
|
23261
24314
|
};
|
|
23262
24315
|
ignoreNoResultErrors = (dnsPromise) => {
|
|
@@ -23475,7 +24528,7 @@ var init_source2 = __esm({
|
|
|
23475
24528
|
throw cacheError;
|
|
23476
24529
|
};
|
|
23477
24530
|
}
|
|
23478
|
-
if (
|
|
24531
|
+
if (isIterable2(this._cache)) {
|
|
23479
24532
|
this._tick(cacheTtl);
|
|
23480
24533
|
}
|
|
23481
24534
|
}
|
|
@@ -23670,9 +24723,9 @@ var require_quick_lru = __commonJS({
|
|
|
23670
24723
|
}
|
|
23671
24724
|
});
|
|
23672
24725
|
|
|
23673
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
24726
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/delay-async-destroy.js
|
|
23674
24727
|
var require_delay_async_destroy = __commonJS({
|
|
23675
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
24728
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/delay-async-destroy.js"(exports, module) {
|
|
23676
24729
|
"use strict";
|
|
23677
24730
|
module.exports = (stream2) => {
|
|
23678
24731
|
if (stream2.listenerCount("error") !== 0) {
|
|
@@ -23700,11 +24753,11 @@ var require_delay_async_destroy = __commonJS({
|
|
|
23700
24753
|
}
|
|
23701
24754
|
});
|
|
23702
24755
|
|
|
23703
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
24756
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/agent.js
|
|
23704
24757
|
var require_agent = __commonJS({
|
|
23705
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
24758
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/agent.js"(exports, module) {
|
|
23706
24759
|
"use strict";
|
|
23707
|
-
var { URL:
|
|
24760
|
+
var { URL: URL2 } = __require("url");
|
|
23708
24761
|
var EventEmitter3 = __require("events");
|
|
23709
24762
|
var tls = __require("tls");
|
|
23710
24763
|
var http22 = __require("http2");
|
|
@@ -23874,8 +24927,8 @@ var require_agent = __commonJS({
|
|
|
23874
24927
|
}
|
|
23875
24928
|
try {
|
|
23876
24929
|
if (typeof origin === "string") {
|
|
23877
|
-
origin = new
|
|
23878
|
-
} else if (!(origin instanceof
|
|
24930
|
+
origin = new URL2(origin);
|
|
24931
|
+
} else if (!(origin instanceof URL2)) {
|
|
23879
24932
|
throw new TypeError("The `origin` argument needs to be a string or an URL object");
|
|
23880
24933
|
}
|
|
23881
24934
|
if (options) {
|
|
@@ -24238,9 +25291,9 @@ var require_agent = __commonJS({
|
|
|
24238
25291
|
}
|
|
24239
25292
|
});
|
|
24240
25293
|
|
|
24241
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25294
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/incoming-message.js
|
|
24242
25295
|
var require_incoming_message = __commonJS({
|
|
24243
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25296
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/incoming-message.js"(exports, module) {
|
|
24244
25297
|
"use strict";
|
|
24245
25298
|
var { Readable } = __require("stream");
|
|
24246
25299
|
var IncomingMessage = class extends Readable {
|
|
@@ -24300,9 +25353,9 @@ var require_incoming_message = __commonJS({
|
|
|
24300
25353
|
}
|
|
24301
25354
|
});
|
|
24302
25355
|
|
|
24303
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25356
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-events.js
|
|
24304
25357
|
var require_proxy_events = __commonJS({
|
|
24305
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25358
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-events.js"(exports, module) {
|
|
24306
25359
|
"use strict";
|
|
24307
25360
|
module.exports = (from, to, events) => {
|
|
24308
25361
|
for (const event of events) {
|
|
@@ -24312,9 +25365,9 @@ var require_proxy_events = __commonJS({
|
|
|
24312
25365
|
}
|
|
24313
25366
|
});
|
|
24314
25367
|
|
|
24315
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25368
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/errors.js
|
|
24316
25369
|
var require_errors = __commonJS({
|
|
24317
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25370
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/errors.js"(exports, module) {
|
|
24318
25371
|
"use strict";
|
|
24319
25372
|
var makeError = (Base, key, getMessage) => {
|
|
24320
25373
|
module.exports[key] = class NodeError extends Base {
|
|
@@ -24367,9 +25420,9 @@ var require_errors = __commonJS({
|
|
|
24367
25420
|
}
|
|
24368
25421
|
});
|
|
24369
25422
|
|
|
24370
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25423
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js
|
|
24371
25424
|
var require_is_request_pseudo_header = __commonJS({
|
|
24372
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25425
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js"(exports, module) {
|
|
24373
25426
|
"use strict";
|
|
24374
25427
|
module.exports = (header) => {
|
|
24375
25428
|
switch (header) {
|
|
@@ -24385,9 +25438,9 @@ var require_is_request_pseudo_header = __commonJS({
|
|
|
24385
25438
|
}
|
|
24386
25439
|
});
|
|
24387
25440
|
|
|
24388
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25441
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-name.js
|
|
24389
25442
|
var require_validate_header_name = __commonJS({
|
|
24390
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25443
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-name.js"(exports, module) {
|
|
24391
25444
|
"use strict";
|
|
24392
25445
|
var { ERR_INVALID_HTTP_TOKEN } = require_errors();
|
|
24393
25446
|
var isRequestPseudoHeader = require_is_request_pseudo_header();
|
|
@@ -24400,9 +25453,9 @@ var require_validate_header_name = __commonJS({
|
|
|
24400
25453
|
}
|
|
24401
25454
|
});
|
|
24402
25455
|
|
|
24403
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25456
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-value.js
|
|
24404
25457
|
var require_validate_header_value = __commonJS({
|
|
24405
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25458
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-value.js"(exports, module) {
|
|
24406
25459
|
"use strict";
|
|
24407
25460
|
var {
|
|
24408
25461
|
ERR_HTTP_INVALID_HEADER_VALUE,
|
|
@@ -24420,9 +25473,9 @@ var require_validate_header_value = __commonJS({
|
|
|
24420
25473
|
}
|
|
24421
25474
|
});
|
|
24422
25475
|
|
|
24423
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25476
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-socket-handler.js
|
|
24424
25477
|
var require_proxy_socket_handler = __commonJS({
|
|
24425
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25478
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-socket-handler.js"(exports, module) {
|
|
24426
25479
|
"use strict";
|
|
24427
25480
|
var { ERR_HTTP2_NO_SOCKET_MANIPULATION } = require_errors();
|
|
24428
25481
|
var proxySocketHandler = {
|
|
@@ -24509,11 +25562,11 @@ var require_proxy_socket_handler = __commonJS({
|
|
|
24509
25562
|
}
|
|
24510
25563
|
});
|
|
24511
25564
|
|
|
24512
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
25565
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/client-request.js
|
|
24513
25566
|
var require_client_request = __commonJS({
|
|
24514
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
25567
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/client-request.js"(exports, module) {
|
|
24515
25568
|
"use strict";
|
|
24516
|
-
var { URL:
|
|
25569
|
+
var { URL: URL2, urlToHttpOptions } = __require("url");
|
|
24517
25570
|
var http22 = __require("http2");
|
|
24518
25571
|
var { Writable } = __require("stream");
|
|
24519
25572
|
var { Agent, globalAgent } = require_agent();
|
|
@@ -24548,8 +25601,8 @@ var require_client_request = __commonJS({
|
|
|
24548
25601
|
emitClose: false
|
|
24549
25602
|
});
|
|
24550
25603
|
if (typeof input === "string") {
|
|
24551
|
-
input = urlToHttpOptions(new
|
|
24552
|
-
} else if (input instanceof
|
|
25604
|
+
input = urlToHttpOptions(new URL2(input));
|
|
25605
|
+
} else if (input instanceof URL2) {
|
|
24553
25606
|
input = urlToHttpOptions(input);
|
|
24554
25607
|
} else {
|
|
24555
25608
|
input = { ...input };
|
|
@@ -24612,7 +25665,7 @@ var require_client_request = __commonJS({
|
|
|
24612
25665
|
options.session = options.tlsSession;
|
|
24613
25666
|
options.path = options.socketPath;
|
|
24614
25667
|
this[kOptions] = options;
|
|
24615
|
-
this[kOrigin] = new
|
|
25668
|
+
this[kOrigin] = new URL2(`${this.protocol}//${options.servername || options.host}:${options.port}`);
|
|
24616
25669
|
const reuseSocket = options._reuseSocket;
|
|
24617
25670
|
if (reuseSocket) {
|
|
24618
25671
|
options.createConnection = (...args) => {
|
|
@@ -24658,13 +25711,13 @@ var require_client_request = __commonJS({
|
|
|
24658
25711
|
get _mustNotHaveABody() {
|
|
24659
25712
|
return this.method === "GET" || this.method === "HEAD" || this.method === "DELETE";
|
|
24660
25713
|
}
|
|
24661
|
-
_write(
|
|
25714
|
+
_write(chunk2, encoding, callback) {
|
|
24662
25715
|
if (this._mustNotHaveABody) {
|
|
24663
25716
|
callback(new Error("The GET, HEAD and DELETE methods must NOT have a body"));
|
|
24664
25717
|
return;
|
|
24665
25718
|
}
|
|
24666
25719
|
this.flushHeaders();
|
|
24667
|
-
const callWrite = () => this._request.write(
|
|
25720
|
+
const callWrite = () => this._request.write(chunk2, encoding, callback);
|
|
24668
25721
|
if (this._request) {
|
|
24669
25722
|
callWrite();
|
|
24670
25723
|
} else {
|
|
@@ -24765,8 +25818,8 @@ var require_client_request = __commonJS({
|
|
|
24765
25818
|
stream2.destroy();
|
|
24766
25819
|
}
|
|
24767
25820
|
} else {
|
|
24768
|
-
stream2.on("data", (
|
|
24769
|
-
if (!response._dumped && !response.push(
|
|
25821
|
+
stream2.on("data", (chunk2) => {
|
|
25822
|
+
if (!response._dumped && !response.push(chunk2)) {
|
|
24770
25823
|
stream2.pause();
|
|
24771
25824
|
}
|
|
24772
25825
|
});
|
|
@@ -24966,9 +26019,9 @@ var require_resolve_alpn = __commonJS({
|
|
|
24966
26019
|
}
|
|
24967
26020
|
});
|
|
24968
26021
|
|
|
24969
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26022
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/calculate-server-name.js
|
|
24970
26023
|
var require_calculate_server_name = __commonJS({
|
|
24971
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26024
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/calculate-server-name.js"(exports, module) {
|
|
24972
26025
|
"use strict";
|
|
24973
26026
|
var { isIP } = __require("net");
|
|
24974
26027
|
var assert2 = __require("assert");
|
|
@@ -24994,11 +26047,11 @@ var require_calculate_server_name = __commonJS({
|
|
|
24994
26047
|
}
|
|
24995
26048
|
});
|
|
24996
26049
|
|
|
24997
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26050
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/auto.js
|
|
24998
26051
|
var require_auto = __commonJS({
|
|
24999
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26052
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/auto.js"(exports, module) {
|
|
25000
26053
|
"use strict";
|
|
25001
|
-
var { URL:
|
|
26054
|
+
var { URL: URL2, urlToHttpOptions } = __require("url");
|
|
25002
26055
|
var http3 = __require("http");
|
|
25003
26056
|
var https2 = __require("https");
|
|
25004
26057
|
var resolveALPN = require_resolve_alpn();
|
|
@@ -25069,8 +26122,8 @@ var require_auto = __commonJS({
|
|
|
25069
26122
|
var defaultResolveProtocol = createResolveProtocol(cache, queue);
|
|
25070
26123
|
module.exports = async (input, options, callback) => {
|
|
25071
26124
|
if (typeof input === "string") {
|
|
25072
|
-
input = urlToHttpOptions(new
|
|
25073
|
-
} else if (input instanceof
|
|
26125
|
+
input = urlToHttpOptions(new URL2(input));
|
|
26126
|
+
} else if (input instanceof URL2) {
|
|
25074
26127
|
input = urlToHttpOptions(input);
|
|
25075
26128
|
} else {
|
|
25076
26129
|
input = { ...input };
|
|
@@ -25144,6 +26197,18 @@ var require_auto = __commonJS({
|
|
|
25144
26197
|
} else if (agent) {
|
|
25145
26198
|
options.agent = agent.http;
|
|
25146
26199
|
}
|
|
26200
|
+
if (options.headers) {
|
|
26201
|
+
options.headers = { ...options.headers };
|
|
26202
|
+
if (options.headers[":authority"]) {
|
|
26203
|
+
if (!options.headers.host) {
|
|
26204
|
+
options.headers.host = options.headers[":authority"];
|
|
26205
|
+
}
|
|
26206
|
+
delete options.headers[":authority"];
|
|
26207
|
+
}
|
|
26208
|
+
delete options.headers[":method"];
|
|
26209
|
+
delete options.headers[":scheme"];
|
|
26210
|
+
delete options.headers[":path"];
|
|
26211
|
+
}
|
|
25147
26212
|
return delayAsyncDestroy(http3.request(options, callback));
|
|
25148
26213
|
};
|
|
25149
26214
|
module.exports.protocolCache = cache;
|
|
@@ -25152,9 +26217,9 @@ var require_auto = __commonJS({
|
|
|
25152
26217
|
}
|
|
25153
26218
|
});
|
|
25154
26219
|
|
|
25155
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26220
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/js-stream-socket.js
|
|
25156
26221
|
var require_js_stream_socket = __commonJS({
|
|
25157
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26222
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/js-stream-socket.js"(exports, module) {
|
|
25158
26223
|
"use strict";
|
|
25159
26224
|
var stream2 = __require("stream");
|
|
25160
26225
|
var tls = __require("tls");
|
|
@@ -25163,9 +26228,9 @@ var require_js_stream_socket = __commonJS({
|
|
|
25163
26228
|
}
|
|
25164
26229
|
});
|
|
25165
26230
|
|
|
25166
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26231
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.js
|
|
25167
26232
|
var require_unexpected_status_code_error = __commonJS({
|
|
25168
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26233
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.js"(exports, module) {
|
|
25169
26234
|
"use strict";
|
|
25170
26235
|
var UnexpectedStatusCodeError = class extends Error {
|
|
25171
26236
|
constructor(statusCode, statusMessage = "") {
|
|
@@ -25178,9 +26243,9 @@ var require_unexpected_status_code_error = __commonJS({
|
|
|
25178
26243
|
}
|
|
25179
26244
|
});
|
|
25180
26245
|
|
|
25181
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26246
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/check-type.js
|
|
25182
26247
|
var require_check_type = __commonJS({
|
|
25183
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26248
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/check-type.js"(exports, module) {
|
|
25184
26249
|
"use strict";
|
|
25185
26250
|
var checkType = (name, value, types2) => {
|
|
25186
26251
|
const valid = types2.some((type) => {
|
|
@@ -25199,18 +26264,18 @@ var require_check_type = __commonJS({
|
|
|
25199
26264
|
}
|
|
25200
26265
|
});
|
|
25201
26266
|
|
|
25202
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26267
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/initialize.js
|
|
25203
26268
|
var require_initialize = __commonJS({
|
|
25204
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26269
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/initialize.js"(exports, module) {
|
|
25205
26270
|
"use strict";
|
|
25206
|
-
var { URL:
|
|
26271
|
+
var { URL: URL2 } = __require("url");
|
|
25207
26272
|
var checkType = require_check_type();
|
|
25208
26273
|
module.exports = (self, proxyOptions) => {
|
|
25209
26274
|
checkType("proxyOptions", proxyOptions, ["object"]);
|
|
25210
26275
|
checkType("proxyOptions.headers", proxyOptions.headers, ["object", "undefined"]);
|
|
25211
26276
|
checkType("proxyOptions.raw", proxyOptions.raw, ["boolean", "undefined"]);
|
|
25212
|
-
checkType("proxyOptions.url", proxyOptions.url, [
|
|
25213
|
-
const url = new
|
|
26277
|
+
checkType("proxyOptions.url", proxyOptions.url, [URL2, "string"]);
|
|
26278
|
+
const url = new URL2(proxyOptions.url);
|
|
25214
26279
|
self.proxyOptions = {
|
|
25215
26280
|
raw: true,
|
|
25216
26281
|
...proxyOptions,
|
|
@@ -25221,9 +26286,9 @@ var require_initialize = __commonJS({
|
|
|
25221
26286
|
}
|
|
25222
26287
|
});
|
|
25223
26288
|
|
|
25224
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26289
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/get-auth-headers.js
|
|
25225
26290
|
var require_get_auth_headers = __commonJS({
|
|
25226
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26291
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/get-auth-headers.js"(exports, module) {
|
|
25227
26292
|
"use strict";
|
|
25228
26293
|
module.exports = (self) => {
|
|
25229
26294
|
const { username, password } = self.proxyOptions.url;
|
|
@@ -25240,9 +26305,9 @@ var require_get_auth_headers = __commonJS({
|
|
|
25240
26305
|
}
|
|
25241
26306
|
});
|
|
25242
26307
|
|
|
25243
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26308
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h1-over-h2.js
|
|
25244
26309
|
var require_h1_over_h2 = __commonJS({
|
|
25245
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26310
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h1-over-h2.js"(exports, module) {
|
|
25246
26311
|
"use strict";
|
|
25247
26312
|
var tls = __require("tls");
|
|
25248
26313
|
var http3 = __require("http");
|
|
@@ -25319,9 +26384,9 @@ var require_h1_over_h2 = __commonJS({
|
|
|
25319
26384
|
}
|
|
25320
26385
|
});
|
|
25321
26386
|
|
|
25322
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26387
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-hx.js
|
|
25323
26388
|
var require_h2_over_hx = __commonJS({
|
|
25324
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26389
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-hx.js"(exports, module) {
|
|
25325
26390
|
"use strict";
|
|
25326
26391
|
var { Agent } = require_agent();
|
|
25327
26392
|
var JSStreamSocket = require_js_stream_socket();
|
|
@@ -25357,9 +26422,9 @@ var require_h2_over_hx = __commonJS({
|
|
|
25357
26422
|
}
|
|
25358
26423
|
});
|
|
25359
26424
|
|
|
25360
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26425
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h2.js
|
|
25361
26426
|
var require_h2_over_h2 = __commonJS({
|
|
25362
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26427
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h2.js"(exports, module) {
|
|
25363
26428
|
"use strict";
|
|
25364
26429
|
var { globalAgent } = require_agent();
|
|
25365
26430
|
var Http2OverHttpX = require_h2_over_hx();
|
|
@@ -25389,15 +26454,15 @@ var require_h2_over_h2 = __commonJS({
|
|
|
25389
26454
|
}
|
|
25390
26455
|
});
|
|
25391
26456
|
|
|
25392
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26457
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h1.js
|
|
25393
26458
|
var require_h2_over_h1 = __commonJS({
|
|
25394
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26459
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h1.js"(exports, module) {
|
|
25395
26460
|
"use strict";
|
|
25396
26461
|
var http3 = __require("http");
|
|
25397
26462
|
var https2 = __require("https");
|
|
25398
26463
|
var Http2OverHttpX = require_h2_over_hx();
|
|
25399
26464
|
var getAuthorizationHeaders = require_get_auth_headers();
|
|
25400
|
-
var
|
|
26465
|
+
var getStream2 = (request) => new Promise((resolve, reject) => {
|
|
25401
26466
|
const onConnect = (response, socket, head) => {
|
|
25402
26467
|
socket.unshift(head);
|
|
25403
26468
|
request.off("error", reject);
|
|
@@ -25423,7 +26488,7 @@ var require_h2_over_h1 = __commonJS({
|
|
|
25423
26488
|
},
|
|
25424
26489
|
method: "CONNECT"
|
|
25425
26490
|
}).end();
|
|
25426
|
-
return
|
|
26491
|
+
return getStream2(request);
|
|
25427
26492
|
}
|
|
25428
26493
|
};
|
|
25429
26494
|
module.exports = {
|
|
@@ -25433,9 +26498,9 @@ var require_h2_over_h1 = __commonJS({
|
|
|
25433
26498
|
}
|
|
25434
26499
|
});
|
|
25435
26500
|
|
|
25436
|
-
// node_modules/.pnpm/http2-wrapper@2.2.
|
|
26501
|
+
// node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/index.js
|
|
25437
26502
|
var require_source3 = __commonJS({
|
|
25438
|
-
"node_modules/.pnpm/http2-wrapper@2.2.
|
|
26503
|
+
"node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/index.js"(exports, module) {
|
|
25439
26504
|
"use strict";
|
|
25440
26505
|
var http22 = __require("http2");
|
|
25441
26506
|
var {
|
|
@@ -25484,14 +26549,14 @@ var require_source3 = __commonJS({
|
|
|
25484
26549
|
}
|
|
25485
26550
|
});
|
|
25486
26551
|
|
|
25487
|
-
// node_modules/.pnpm/got@
|
|
26552
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/parse-link-header.js
|
|
25488
26553
|
function parseLinkHeader(link) {
|
|
25489
26554
|
const parsed = [];
|
|
25490
26555
|
const items = link.split(",");
|
|
25491
26556
|
for (const item of items) {
|
|
25492
26557
|
const [rawUriReference, ...rawLinkParameters] = item.split(";");
|
|
25493
26558
|
const trimmedUriReference = rawUriReference.trim();
|
|
25494
|
-
if (trimmedUriReference[0] !== "<" || trimmedUriReference
|
|
26559
|
+
if (trimmedUriReference[0] !== "<" || trimmedUriReference.at(-1) !== ">") {
|
|
25495
26560
|
throw new Error(`Invalid format of the Link header reference: ${trimmedUriReference}`);
|
|
25496
26561
|
}
|
|
25497
26562
|
const reference = trimmedUriReference.slice(1, -1);
|
|
@@ -25517,17 +26582,16 @@ function parseLinkHeader(link) {
|
|
|
25517
26582
|
return parsed;
|
|
25518
26583
|
}
|
|
25519
26584
|
var init_parse_link_header = __esm({
|
|
25520
|
-
"node_modules/.pnpm/got@
|
|
26585
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/parse-link-header.js"() {
|
|
25521
26586
|
}
|
|
25522
26587
|
});
|
|
25523
26588
|
|
|
25524
|
-
// node_modules/.pnpm/got@
|
|
26589
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/options.js
|
|
25525
26590
|
import process2 from "node:process";
|
|
25526
26591
|
import { promisify as promisify3, inspect } from "node:util";
|
|
25527
|
-
import { URL as URL2, URLSearchParams } from "node:url";
|
|
25528
26592
|
import { checkServerIdentity } from "node:tls";
|
|
25529
|
-
import http from "node:http";
|
|
25530
26593
|
import https from "node:https";
|
|
26594
|
+
import http from "node:http";
|
|
25531
26595
|
function validateSearchParameters(searchParameters) {
|
|
25532
26596
|
for (const key in searchParameters) {
|
|
25533
26597
|
const value = searchParameters[key];
|
|
@@ -25536,10 +26600,10 @@ function validateSearchParameters(searchParameters) {
|
|
|
25536
26600
|
}
|
|
25537
26601
|
var import_http2_wrapper, major, minor, globalCache, globalDnsCache, getGlobalDnsCache, defaultInternals, cloneInternals, cloneRaw, getHttp2TimeoutOption, init, Options;
|
|
25538
26602
|
var init_options = __esm({
|
|
25539
|
-
"node_modules/.pnpm/got@
|
|
26603
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/options.js"() {
|
|
25540
26604
|
init_dist();
|
|
25541
26605
|
init_lowercase_keys();
|
|
25542
|
-
|
|
26606
|
+
init_source3();
|
|
25543
26607
|
import_http2_wrapper = __toESM(require_source3(), 1);
|
|
25544
26608
|
init_lib();
|
|
25545
26609
|
init_parse_link_header();
|
|
@@ -25690,7 +26754,7 @@ var init_options = __esm({
|
|
|
25690
26754
|
const next = parsed.find((entry) => entry.parameters.rel === "next" || entry.parameters.rel === '"next"');
|
|
25691
26755
|
if (next) {
|
|
25692
26756
|
return {
|
|
25693
|
-
url: new
|
|
26757
|
+
url: new URL(next.reference, response.url)
|
|
25694
26758
|
};
|
|
25695
26759
|
}
|
|
25696
26760
|
return false;
|
|
@@ -25705,7 +26769,7 @@ var init_options = __esm({
|
|
|
25705
26769
|
setHost: true,
|
|
25706
26770
|
maxHeaderSize: void 0,
|
|
25707
26771
|
signal: void 0,
|
|
25708
|
-
enableUnixSockets:
|
|
26772
|
+
enableUnixSockets: false
|
|
25709
26773
|
};
|
|
25710
26774
|
cloneInternals = (internals) => {
|
|
25711
26775
|
const { hooks, retry } = internals;
|
|
@@ -25819,31 +26883,11 @@ var init_options = __esm({
|
|
|
25819
26883
|
}
|
|
25820
26884
|
};
|
|
25821
26885
|
Options = class _Options {
|
|
26886
|
+
_unixOptions;
|
|
26887
|
+
_internals;
|
|
26888
|
+
_merging;
|
|
26889
|
+
_init;
|
|
25822
26890
|
constructor(input, options, defaults2) {
|
|
25823
|
-
Object.defineProperty(this, "_unixOptions", {
|
|
25824
|
-
enumerable: true,
|
|
25825
|
-
configurable: true,
|
|
25826
|
-
writable: true,
|
|
25827
|
-
value: void 0
|
|
25828
|
-
});
|
|
25829
|
-
Object.defineProperty(this, "_internals", {
|
|
25830
|
-
enumerable: true,
|
|
25831
|
-
configurable: true,
|
|
25832
|
-
writable: true,
|
|
25833
|
-
value: void 0
|
|
25834
|
-
});
|
|
25835
|
-
Object.defineProperty(this, "_merging", {
|
|
25836
|
-
enumerable: true,
|
|
25837
|
-
configurable: true,
|
|
25838
|
-
writable: true,
|
|
25839
|
-
value: void 0
|
|
25840
|
-
});
|
|
25841
|
-
Object.defineProperty(this, "_init", {
|
|
25842
|
-
enumerable: true,
|
|
25843
|
-
configurable: true,
|
|
25844
|
-
writable: true,
|
|
25845
|
-
value: void 0
|
|
25846
|
-
});
|
|
25847
26891
|
assert.any([dist_default.string, dist_default.urlInstance, dist_default.object, dist_default.undefined], input);
|
|
25848
26892
|
assert.any([dist_default.object, dist_default.undefined], options);
|
|
25849
26893
|
assert.any([dist_default.object, dist_default.undefined], defaults2);
|
|
@@ -25911,7 +26955,11 @@ var init_options = __esm({
|
|
|
25911
26955
|
if (!(key in this)) {
|
|
25912
26956
|
throw new Error(`Unexpected option: ${key}`);
|
|
25913
26957
|
}
|
|
25914
|
-
|
|
26958
|
+
const value = options[key];
|
|
26959
|
+
if (value === void 0) {
|
|
26960
|
+
continue;
|
|
26961
|
+
}
|
|
26962
|
+
this[key] = value;
|
|
25915
26963
|
push = true;
|
|
25916
26964
|
}
|
|
25917
26965
|
if (push) {
|
|
@@ -26103,7 +27151,7 @@ var init_options = __esm({
|
|
|
26103
27151
|
return this._internals.body;
|
|
26104
27152
|
}
|
|
26105
27153
|
set body(value) {
|
|
26106
|
-
assert.any([dist_default.string, dist_default.buffer, dist_default.nodeStream, dist_default.generator, dist_default.asyncGenerator,
|
|
27154
|
+
assert.any([dist_default.string, dist_default.buffer, dist_default.nodeStream, dist_default.generator, dist_default.asyncGenerator, isFormData2, dist_default.undefined], value);
|
|
26107
27155
|
if (dist_default.nodeStream(value)) {
|
|
26108
27156
|
assert.truthy(value.readable);
|
|
26109
27157
|
}
|
|
@@ -26181,7 +27229,7 @@ var init_options = __esm({
|
|
|
26181
27229
|
throw new Error("`url` must not start with a slash");
|
|
26182
27230
|
}
|
|
26183
27231
|
const urlString = `${this.prefixUrl}${value.toString()}`;
|
|
26184
|
-
const url = new
|
|
27232
|
+
const url = new URL(urlString);
|
|
26185
27233
|
this._internals.url = url;
|
|
26186
27234
|
if (url.protocol === "unix:") {
|
|
26187
27235
|
url.href = `http://unix${url.pathname}${url.search}`;
|
|
@@ -26253,8 +27301,6 @@ var init_options = __esm({
|
|
|
26253
27301
|
/**
|
|
26254
27302
|
You can abort the `request` using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
|
26255
27303
|
|
|
26256
|
-
*Requires Node.js 16 or later.*
|
|
26257
|
-
|
|
26258
27304
|
@example
|
|
26259
27305
|
```
|
|
26260
27306
|
import got from 'got';
|
|
@@ -26270,11 +27316,9 @@ var init_options = __esm({
|
|
|
26270
27316
|
}, 100);
|
|
26271
27317
|
```
|
|
26272
27318
|
*/
|
|
26273
|
-
// TODO: Replace `any` with `AbortSignal` when targeting Node 16.
|
|
26274
27319
|
get signal() {
|
|
26275
27320
|
return this._internals.signal;
|
|
26276
27321
|
}
|
|
26277
|
-
// TODO: Replace `any` with `AbortSignal` when targeting Node 16.
|
|
26278
27322
|
set signal(value) {
|
|
26279
27323
|
assert.object(value);
|
|
26280
27324
|
this._internals.signal = value;
|
|
@@ -26474,7 +27518,9 @@ var init_options = __esm({
|
|
|
26474
27518
|
}
|
|
26475
27519
|
}
|
|
26476
27520
|
/**
|
|
26477
|
-
|
|
27521
|
+
Whether redirect responses should be followed automatically.
|
|
27522
|
+
|
|
27523
|
+
Optionally, pass a function to dynamically decide based on the response object.
|
|
26478
27524
|
|
|
26479
27525
|
Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`.
|
|
26480
27526
|
This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4). You can optionally turn on this behavior also for other redirect codes - see `methodRewriting`.
|
|
@@ -26485,7 +27531,7 @@ var init_options = __esm({
|
|
|
26485
27531
|
return this._internals.followRedirect;
|
|
26486
27532
|
}
|
|
26487
27533
|
set followRedirect(value) {
|
|
26488
|
-
assert.boolean
|
|
27534
|
+
assert.any([dist_default.boolean, dist_default.function_], value);
|
|
26489
27535
|
this._internals.followRedirect = value;
|
|
26490
27536
|
}
|
|
26491
27537
|
get followRedirects() {
|
|
@@ -27118,14 +28164,16 @@ var init_options = __esm({
|
|
|
27118
28164
|
}
|
|
27119
28165
|
});
|
|
27120
28166
|
|
|
27121
|
-
// node_modules/.pnpm/got@
|
|
28167
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/response.js
|
|
27122
28168
|
var isResponseOk, ParseError, parseBody;
|
|
27123
28169
|
var init_response = __esm({
|
|
27124
|
-
"node_modules/.pnpm/got@
|
|
28170
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/response.js"() {
|
|
27125
28171
|
init_errors();
|
|
27126
28172
|
isResponseOk = (response) => {
|
|
27127
28173
|
const { statusCode } = response;
|
|
27128
|
-
const
|
|
28174
|
+
const { followRedirect } = response.request.options;
|
|
28175
|
+
const shouldFollow = typeof followRedirect === "function" ? followRedirect(response) : followRedirect;
|
|
28176
|
+
const limitStatusCode = shouldFollow ? 299 : 399;
|
|
27129
28177
|
return statusCode >= 200 && statusCode <= limitStatusCode || statusCode === 304;
|
|
27130
28178
|
};
|
|
27131
28179
|
ParseError = class extends RequestError {
|
|
@@ -27159,40 +28207,39 @@ var init_response = __esm({
|
|
|
27159
28207
|
}
|
|
27160
28208
|
});
|
|
27161
28209
|
|
|
27162
|
-
// node_modules/.pnpm/got@
|
|
28210
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/is-client-request.js
|
|
27163
28211
|
function isClientRequest(clientRequest) {
|
|
27164
28212
|
return clientRequest.writable && !clientRequest.writableEnded;
|
|
27165
28213
|
}
|
|
27166
28214
|
var is_client_request_default;
|
|
27167
28215
|
var init_is_client_request = __esm({
|
|
27168
|
-
"node_modules/.pnpm/got@
|
|
28216
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/is-client-request.js"() {
|
|
27169
28217
|
is_client_request_default = isClientRequest;
|
|
27170
28218
|
}
|
|
27171
28219
|
});
|
|
27172
28220
|
|
|
27173
|
-
// node_modules/.pnpm/got@
|
|
28221
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/is-unix-socket-url.js
|
|
27174
28222
|
function isUnixSocketURL(url) {
|
|
27175
28223
|
return url.protocol === "unix:" || url.hostname === "unix";
|
|
27176
28224
|
}
|
|
27177
28225
|
var init_is_unix_socket_url = __esm({
|
|
27178
|
-
"node_modules/.pnpm/got@
|
|
28226
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/utils/is-unix-socket-url.js"() {
|
|
27179
28227
|
}
|
|
27180
28228
|
});
|
|
27181
28229
|
|
|
27182
|
-
// node_modules/.pnpm/got@
|
|
28230
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/index.js
|
|
27183
28231
|
import process3 from "node:process";
|
|
27184
28232
|
import { Buffer as Buffer3 } from "node:buffer";
|
|
27185
28233
|
import { Duplex } from "node:stream";
|
|
27186
|
-
import { URL as URL3, URLSearchParams as URLSearchParams2 } from "node:url";
|
|
27187
28234
|
import http2, { ServerResponse } from "node:http";
|
|
27188
|
-
var import_decompress_response,
|
|
28235
|
+
var import_decompress_response, supportsBrotli, methodsWithoutBody, cacheableStore, redirectCodes, proxiedRequestEvents, noop3, Request;
|
|
27189
28236
|
var init_core = __esm({
|
|
27190
|
-
"node_modules/.pnpm/got@
|
|
28237
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/core/index.js"() {
|
|
27191
28238
|
init_source();
|
|
27192
28239
|
init_dist2();
|
|
27193
28240
|
import_decompress_response = __toESM(require_decompress_response(), 1);
|
|
27194
28241
|
init_dist();
|
|
27195
|
-
|
|
28242
|
+
init_source2();
|
|
27196
28243
|
init_lib();
|
|
27197
28244
|
init_get_body_size();
|
|
27198
28245
|
init_is_form_data();
|
|
@@ -27206,7 +28253,6 @@ var init_core = __esm({
|
|
|
27206
28253
|
init_is_client_request();
|
|
27207
28254
|
init_is_unix_socket_url();
|
|
27208
28255
|
init_errors();
|
|
27209
|
-
({ buffer: getBuffer } = import_get_stream2.default);
|
|
27210
28256
|
supportsBrotli = dist_default.string(process3.versions.brotli);
|
|
27211
28257
|
methodsWithoutBody = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
27212
28258
|
cacheableStore = new WeakableMap();
|
|
@@ -27218,9 +28264,37 @@ var init_core = __esm({
|
|
|
27218
28264
|
"information",
|
|
27219
28265
|
"upgrade"
|
|
27220
28266
|
];
|
|
27221
|
-
|
|
28267
|
+
noop3 = () => {
|
|
27222
28268
|
};
|
|
27223
28269
|
Request = class _Request extends Duplex {
|
|
28270
|
+
// @ts-expect-error - Ignoring for now.
|
|
28271
|
+
["constructor"];
|
|
28272
|
+
_noPipe;
|
|
28273
|
+
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/9568
|
|
28274
|
+
options;
|
|
28275
|
+
response;
|
|
28276
|
+
requestUrl;
|
|
28277
|
+
redirectUrls;
|
|
28278
|
+
retryCount;
|
|
28279
|
+
_stopRetry;
|
|
28280
|
+
_downloadedSize;
|
|
28281
|
+
_uploadedSize;
|
|
28282
|
+
_stopReading;
|
|
28283
|
+
_pipedServerResponses;
|
|
28284
|
+
_request;
|
|
28285
|
+
_responseSize;
|
|
28286
|
+
_bodySize;
|
|
28287
|
+
_unproxyEvents;
|
|
28288
|
+
_isFromCache;
|
|
28289
|
+
_cannotHaveBody;
|
|
28290
|
+
_triggerRead;
|
|
28291
|
+
_cancelTimeouts;
|
|
28292
|
+
_removeListeners;
|
|
28293
|
+
_nativeResponse;
|
|
28294
|
+
_flushed;
|
|
28295
|
+
_aborted;
|
|
28296
|
+
// We need this because `this._request` if `undefined` when using cache
|
|
28297
|
+
_requestInitialized;
|
|
27224
28298
|
constructor(url, options, defaults2) {
|
|
27225
28299
|
super({
|
|
27226
28300
|
// Don't destroy immediately, as the error may be emitted on unsuccessful retry
|
|
@@ -27228,172 +28302,22 @@ var init_core = __esm({
|
|
|
27228
28302
|
// It needs to be zero because we're just proxying the data to another stream
|
|
27229
28303
|
highWaterMark: 0
|
|
27230
28304
|
});
|
|
27231
|
-
Object.defineProperty(this, "constructor", {
|
|
27232
|
-
enumerable: true,
|
|
27233
|
-
configurable: true,
|
|
27234
|
-
writable: true,
|
|
27235
|
-
value: void 0
|
|
27236
|
-
});
|
|
27237
|
-
Object.defineProperty(this, "_noPipe", {
|
|
27238
|
-
enumerable: true,
|
|
27239
|
-
configurable: true,
|
|
27240
|
-
writable: true,
|
|
27241
|
-
value: void 0
|
|
27242
|
-
});
|
|
27243
|
-
Object.defineProperty(this, "options", {
|
|
27244
|
-
enumerable: true,
|
|
27245
|
-
configurable: true,
|
|
27246
|
-
writable: true,
|
|
27247
|
-
value: void 0
|
|
27248
|
-
});
|
|
27249
|
-
Object.defineProperty(this, "response", {
|
|
27250
|
-
enumerable: true,
|
|
27251
|
-
configurable: true,
|
|
27252
|
-
writable: true,
|
|
27253
|
-
value: void 0
|
|
27254
|
-
});
|
|
27255
|
-
Object.defineProperty(this, "requestUrl", {
|
|
27256
|
-
enumerable: true,
|
|
27257
|
-
configurable: true,
|
|
27258
|
-
writable: true,
|
|
27259
|
-
value: void 0
|
|
27260
|
-
});
|
|
27261
|
-
Object.defineProperty(this, "redirectUrls", {
|
|
27262
|
-
enumerable: true,
|
|
27263
|
-
configurable: true,
|
|
27264
|
-
writable: true,
|
|
27265
|
-
value: void 0
|
|
27266
|
-
});
|
|
27267
|
-
Object.defineProperty(this, "retryCount", {
|
|
27268
|
-
enumerable: true,
|
|
27269
|
-
configurable: true,
|
|
27270
|
-
writable: true,
|
|
27271
|
-
value: void 0
|
|
27272
|
-
});
|
|
27273
|
-
Object.defineProperty(this, "_stopRetry", {
|
|
27274
|
-
enumerable: true,
|
|
27275
|
-
configurable: true,
|
|
27276
|
-
writable: true,
|
|
27277
|
-
value: void 0
|
|
27278
|
-
});
|
|
27279
|
-
Object.defineProperty(this, "_downloadedSize", {
|
|
27280
|
-
enumerable: true,
|
|
27281
|
-
configurable: true,
|
|
27282
|
-
writable: true,
|
|
27283
|
-
value: void 0
|
|
27284
|
-
});
|
|
27285
|
-
Object.defineProperty(this, "_uploadedSize", {
|
|
27286
|
-
enumerable: true,
|
|
27287
|
-
configurable: true,
|
|
27288
|
-
writable: true,
|
|
27289
|
-
value: void 0
|
|
27290
|
-
});
|
|
27291
|
-
Object.defineProperty(this, "_stopReading", {
|
|
27292
|
-
enumerable: true,
|
|
27293
|
-
configurable: true,
|
|
27294
|
-
writable: true,
|
|
27295
|
-
value: void 0
|
|
27296
|
-
});
|
|
27297
|
-
Object.defineProperty(this, "_pipedServerResponses", {
|
|
27298
|
-
enumerable: true,
|
|
27299
|
-
configurable: true,
|
|
27300
|
-
writable: true,
|
|
27301
|
-
value: void 0
|
|
27302
|
-
});
|
|
27303
|
-
Object.defineProperty(this, "_request", {
|
|
27304
|
-
enumerable: true,
|
|
27305
|
-
configurable: true,
|
|
27306
|
-
writable: true,
|
|
27307
|
-
value: void 0
|
|
27308
|
-
});
|
|
27309
|
-
Object.defineProperty(this, "_responseSize", {
|
|
27310
|
-
enumerable: true,
|
|
27311
|
-
configurable: true,
|
|
27312
|
-
writable: true,
|
|
27313
|
-
value: void 0
|
|
27314
|
-
});
|
|
27315
|
-
Object.defineProperty(this, "_bodySize", {
|
|
27316
|
-
enumerable: true,
|
|
27317
|
-
configurable: true,
|
|
27318
|
-
writable: true,
|
|
27319
|
-
value: void 0
|
|
27320
|
-
});
|
|
27321
|
-
Object.defineProperty(this, "_unproxyEvents", {
|
|
27322
|
-
enumerable: true,
|
|
27323
|
-
configurable: true,
|
|
27324
|
-
writable: true,
|
|
27325
|
-
value: void 0
|
|
27326
|
-
});
|
|
27327
|
-
Object.defineProperty(this, "_isFromCache", {
|
|
27328
|
-
enumerable: true,
|
|
27329
|
-
configurable: true,
|
|
27330
|
-
writable: true,
|
|
27331
|
-
value: void 0
|
|
27332
|
-
});
|
|
27333
|
-
Object.defineProperty(this, "_cannotHaveBody", {
|
|
27334
|
-
enumerable: true,
|
|
27335
|
-
configurable: true,
|
|
27336
|
-
writable: true,
|
|
27337
|
-
value: void 0
|
|
27338
|
-
});
|
|
27339
|
-
Object.defineProperty(this, "_triggerRead", {
|
|
27340
|
-
enumerable: true,
|
|
27341
|
-
configurable: true,
|
|
27342
|
-
writable: true,
|
|
27343
|
-
value: void 0
|
|
27344
|
-
});
|
|
27345
|
-
Object.defineProperty(this, "_cancelTimeouts", {
|
|
27346
|
-
enumerable: true,
|
|
27347
|
-
configurable: true,
|
|
27348
|
-
writable: true,
|
|
27349
|
-
value: void 0
|
|
27350
|
-
});
|
|
27351
|
-
Object.defineProperty(this, "_removeListeners", {
|
|
27352
|
-
enumerable: true,
|
|
27353
|
-
configurable: true,
|
|
27354
|
-
writable: true,
|
|
27355
|
-
value: void 0
|
|
27356
|
-
});
|
|
27357
|
-
Object.defineProperty(this, "_nativeResponse", {
|
|
27358
|
-
enumerable: true,
|
|
27359
|
-
configurable: true,
|
|
27360
|
-
writable: true,
|
|
27361
|
-
value: void 0
|
|
27362
|
-
});
|
|
27363
|
-
Object.defineProperty(this, "_flushed", {
|
|
27364
|
-
enumerable: true,
|
|
27365
|
-
configurable: true,
|
|
27366
|
-
writable: true,
|
|
27367
|
-
value: void 0
|
|
27368
|
-
});
|
|
27369
|
-
Object.defineProperty(this, "_aborted", {
|
|
27370
|
-
enumerable: true,
|
|
27371
|
-
configurable: true,
|
|
27372
|
-
writable: true,
|
|
27373
|
-
value: void 0
|
|
27374
|
-
});
|
|
27375
|
-
Object.defineProperty(this, "_requestInitialized", {
|
|
27376
|
-
enumerable: true,
|
|
27377
|
-
configurable: true,
|
|
27378
|
-
writable: true,
|
|
27379
|
-
value: void 0
|
|
27380
|
-
});
|
|
27381
28305
|
this._downloadedSize = 0;
|
|
27382
28306
|
this._uploadedSize = 0;
|
|
27383
28307
|
this._stopReading = false;
|
|
27384
28308
|
this._pipedServerResponses = /* @__PURE__ */ new Set();
|
|
27385
28309
|
this._cannotHaveBody = false;
|
|
27386
|
-
this._unproxyEvents =
|
|
28310
|
+
this._unproxyEvents = noop3;
|
|
27387
28311
|
this._triggerRead = false;
|
|
27388
|
-
this._cancelTimeouts =
|
|
27389
|
-
this._removeListeners =
|
|
28312
|
+
this._cancelTimeouts = noop3;
|
|
28313
|
+
this._removeListeners = noop3;
|
|
27390
28314
|
this._jobs = [];
|
|
27391
28315
|
this._flushed = false;
|
|
27392
28316
|
this._requestInitialized = false;
|
|
27393
28317
|
this._aborted = false;
|
|
27394
28318
|
this.redirectUrls = [];
|
|
27395
28319
|
this.retryCount = 0;
|
|
27396
|
-
this._stopRetry =
|
|
28320
|
+
this._stopRetry = noop3;
|
|
27397
28321
|
this.on("pipe", (source) => {
|
|
27398
28322
|
if (source?.headers) {
|
|
27399
28323
|
Object.assign(this.options.headers, source.headers);
|
|
@@ -27448,7 +28372,7 @@ var init_core = __esm({
|
|
|
27448
28372
|
} else {
|
|
27449
28373
|
this.options.signal.addEventListener("abort", abort);
|
|
27450
28374
|
this._removeListeners = () => {
|
|
27451
|
-
this.options.signal
|
|
28375
|
+
this.options.signal?.removeEventListener("abort", abort);
|
|
27452
28376
|
};
|
|
27453
28377
|
}
|
|
27454
28378
|
}
|
|
@@ -27584,9 +28508,9 @@ var init_core = __esm({
|
|
|
27584
28508
|
}
|
|
27585
28509
|
}
|
|
27586
28510
|
}
|
|
27587
|
-
_write(
|
|
28511
|
+
_write(chunk2, encoding, callback) {
|
|
27588
28512
|
const write = () => {
|
|
27589
|
-
this._writeRequest(
|
|
28513
|
+
this._writeRequest(chunk2, encoding, callback);
|
|
27590
28514
|
};
|
|
27591
28515
|
if (this._requestInitialized) {
|
|
27592
28516
|
write();
|
|
@@ -27666,7 +28590,7 @@ var init_core = __esm({
|
|
|
27666
28590
|
}
|
|
27667
28591
|
const noContentType = !dist_default.string(headers["content-type"]);
|
|
27668
28592
|
if (isBody) {
|
|
27669
|
-
if (
|
|
28593
|
+
if (isFormData2(options.body)) {
|
|
27670
28594
|
const encoder = new FormDataEncoder(options.body);
|
|
27671
28595
|
if (noContentType) {
|
|
27672
28596
|
headers["content-type"] = encoder.headers["Content-Type"];
|
|
@@ -27676,7 +28600,7 @@ var init_core = __esm({
|
|
|
27676
28600
|
}
|
|
27677
28601
|
options.body = encoder.encode();
|
|
27678
28602
|
}
|
|
27679
|
-
if (
|
|
28603
|
+
if (isFormData3(options.body) && noContentType) {
|
|
27680
28604
|
headers["content-type"] = `multipart/form-data; boundary=${options.body.getBoundary()}`;
|
|
27681
28605
|
}
|
|
27682
28606
|
} else if (isForm) {
|
|
@@ -27685,7 +28609,7 @@ var init_core = __esm({
|
|
|
27685
28609
|
}
|
|
27686
28610
|
const { form } = options;
|
|
27687
28611
|
options.form = void 0;
|
|
27688
|
-
options.body = new
|
|
28612
|
+
options.body = new URLSearchParams(form).toString();
|
|
27689
28613
|
} else {
|
|
27690
28614
|
if (noContentType) {
|
|
27691
28615
|
headers["content-type"] = "application/json";
|
|
@@ -27767,65 +28691,68 @@ var init_core = __esm({
|
|
|
27767
28691
|
if (this.isAborted) {
|
|
27768
28692
|
return;
|
|
27769
28693
|
}
|
|
27770
|
-
if (
|
|
27771
|
-
|
|
27772
|
-
|
|
27773
|
-
|
|
27774
|
-
|
|
27775
|
-
this.
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
this._request = void 0;
|
|
27779
|
-
const updatedOptions = new Options(void 0, void 0, this.options);
|
|
27780
|
-
const serverRequestedGet = statusCode === 303 && updatedOptions.method !== "GET" && updatedOptions.method !== "HEAD";
|
|
27781
|
-
const canRewrite = statusCode !== 307 && statusCode !== 308;
|
|
27782
|
-
const userRequestedGet = updatedOptions.methodRewriting && canRewrite;
|
|
27783
|
-
if (serverRequestedGet || userRequestedGet) {
|
|
27784
|
-
updatedOptions.method = "GET";
|
|
27785
|
-
updatedOptions.body = void 0;
|
|
27786
|
-
updatedOptions.json = void 0;
|
|
27787
|
-
updatedOptions.form = void 0;
|
|
27788
|
-
delete updatedOptions.headers["content-length"];
|
|
27789
|
-
}
|
|
27790
|
-
try {
|
|
27791
|
-
const redirectBuffer = Buffer3.from(response.headers.location, "binary").toString();
|
|
27792
|
-
const redirectUrl = new URL3(redirectBuffer, url);
|
|
27793
|
-
if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) {
|
|
27794
|
-
this._beforeError(new RequestError("Cannot redirect to UNIX socket", {}, this));
|
|
28694
|
+
if (response.headers.location && redirectCodes.has(statusCode)) {
|
|
28695
|
+
const shouldFollow = typeof options.followRedirect === "function" ? options.followRedirect(typedResponse) : options.followRedirect;
|
|
28696
|
+
if (shouldFollow) {
|
|
28697
|
+
response.resume();
|
|
28698
|
+
this._cancelTimeouts();
|
|
28699
|
+
this._unproxyEvents();
|
|
28700
|
+
if (this.redirectUrls.length >= options.maxRedirects) {
|
|
28701
|
+
this._beforeError(new MaxRedirectsError(this));
|
|
27795
28702
|
return;
|
|
27796
28703
|
}
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
28704
|
+
this._request = void 0;
|
|
28705
|
+
const updatedOptions = new Options(void 0, void 0, this.options);
|
|
28706
|
+
const serverRequestedGet = statusCode === 303 && updatedOptions.method !== "GET" && updatedOptions.method !== "HEAD";
|
|
28707
|
+
const canRewrite = statusCode !== 307 && statusCode !== 308;
|
|
28708
|
+
const userRequestedGet = updatedOptions.methodRewriting && canRewrite;
|
|
28709
|
+
if (serverRequestedGet || userRequestedGet) {
|
|
28710
|
+
updatedOptions.method = "GET";
|
|
28711
|
+
updatedOptions.body = void 0;
|
|
28712
|
+
updatedOptions.json = void 0;
|
|
28713
|
+
updatedOptions.form = void 0;
|
|
28714
|
+
delete updatedOptions.headers["content-length"];
|
|
28715
|
+
}
|
|
28716
|
+
try {
|
|
28717
|
+
const redirectBuffer = Buffer3.from(response.headers.location, "binary").toString();
|
|
28718
|
+
const redirectUrl = new URL(redirectBuffer, url);
|
|
28719
|
+
if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) {
|
|
28720
|
+
this._beforeError(new RequestError("Cannot redirect to UNIX socket", {}, this));
|
|
28721
|
+
return;
|
|
27803
28722
|
}
|
|
27804
|
-
if (
|
|
27805
|
-
|
|
28723
|
+
if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) {
|
|
28724
|
+
if ("host" in updatedOptions.headers) {
|
|
28725
|
+
delete updatedOptions.headers.host;
|
|
28726
|
+
}
|
|
28727
|
+
if ("cookie" in updatedOptions.headers) {
|
|
28728
|
+
delete updatedOptions.headers.cookie;
|
|
28729
|
+
}
|
|
28730
|
+
if ("authorization" in updatedOptions.headers) {
|
|
28731
|
+
delete updatedOptions.headers.authorization;
|
|
28732
|
+
}
|
|
28733
|
+
if (updatedOptions.username || updatedOptions.password) {
|
|
28734
|
+
updatedOptions.username = "";
|
|
28735
|
+
updatedOptions.password = "";
|
|
28736
|
+
}
|
|
28737
|
+
} else {
|
|
28738
|
+
redirectUrl.username = updatedOptions.username;
|
|
28739
|
+
redirectUrl.password = updatedOptions.password;
|
|
27806
28740
|
}
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
28741
|
+
this.redirectUrls.push(redirectUrl);
|
|
28742
|
+
updatedOptions.prefixUrl = "";
|
|
28743
|
+
updatedOptions.url = redirectUrl;
|
|
28744
|
+
for (const hook of updatedOptions.hooks.beforeRedirect) {
|
|
28745
|
+
await hook(updatedOptions, typedResponse);
|
|
27810
28746
|
}
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
}
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
for (const hook of updatedOptions.hooks.beforeRedirect) {
|
|
27819
|
-
await hook(updatedOptions, typedResponse);
|
|
27820
|
-
}
|
|
27821
|
-
this.emit("redirect", updatedOptions, typedResponse);
|
|
27822
|
-
this.options = updatedOptions;
|
|
27823
|
-
await this._makeRequest();
|
|
27824
|
-
} catch (error2) {
|
|
27825
|
-
this._beforeError(error2);
|
|
28747
|
+
this.emit("redirect", updatedOptions, typedResponse);
|
|
28748
|
+
this.options = updatedOptions;
|
|
28749
|
+
await this._makeRequest();
|
|
28750
|
+
} catch (error2) {
|
|
28751
|
+
this._beforeError(error2);
|
|
28752
|
+
return;
|
|
28753
|
+
}
|
|
27826
28754
|
return;
|
|
27827
28755
|
}
|
|
27828
|
-
return;
|
|
27829
28756
|
}
|
|
27830
28757
|
if (options.isStream && options.throwHttpErrors && !isResponseOk(typedResponse)) {
|
|
27831
28758
|
this._beforeError(new HTTPError(typedResponse));
|
|
@@ -27872,7 +28799,7 @@ var init_core = __esm({
|
|
|
27872
28799
|
return false;
|
|
27873
28800
|
}
|
|
27874
28801
|
try {
|
|
27875
|
-
const rawBody = await
|
|
28802
|
+
const rawBody = await getStreamAsBuffer(from);
|
|
27876
28803
|
if (!this.isAborted) {
|
|
27877
28804
|
this.response.rawBody = rawBody;
|
|
27878
28805
|
return true;
|
|
@@ -27912,9 +28839,9 @@ var init_core = __esm({
|
|
|
27912
28839
|
this._sendBody();
|
|
27913
28840
|
this.emit("request", request);
|
|
27914
28841
|
}
|
|
27915
|
-
async _asyncWrite(
|
|
28842
|
+
async _asyncWrite(chunk2) {
|
|
27916
28843
|
return new Promise((resolve, reject) => {
|
|
27917
|
-
super.write(
|
|
28844
|
+
super.write(chunk2, (error2) => {
|
|
27918
28845
|
if (error2) {
|
|
27919
28846
|
reject(error2);
|
|
27920
28847
|
return;
|
|
@@ -27931,8 +28858,8 @@ var init_core = __esm({
|
|
|
27931
28858
|
} else if (dist_default.generator(body) || dist_default.asyncGenerator(body)) {
|
|
27932
28859
|
(async () => {
|
|
27933
28860
|
try {
|
|
27934
|
-
for await (const
|
|
27935
|
-
await this._asyncWrite(
|
|
28861
|
+
for await (const chunk2 of body) {
|
|
28862
|
+
await this._asyncWrite(chunk2);
|
|
27936
28863
|
}
|
|
27937
28864
|
super.end();
|
|
27938
28865
|
} catch (error2) {
|
|
@@ -28091,13 +29018,13 @@ var init_core = __esm({
|
|
|
28091
29018
|
}
|
|
28092
29019
|
this.destroy(error2);
|
|
28093
29020
|
}
|
|
28094
|
-
_writeRequest(
|
|
29021
|
+
_writeRequest(chunk2, encoding, callback) {
|
|
28095
29022
|
if (!this._request || this._request.destroyed) {
|
|
28096
29023
|
return;
|
|
28097
29024
|
}
|
|
28098
|
-
this._request.write(
|
|
29025
|
+
this._request.write(chunk2, encoding, (error2) => {
|
|
28099
29026
|
if (!error2 && !this._request.destroyed) {
|
|
28100
|
-
this._uploadedSize += Buffer3.byteLength(
|
|
29027
|
+
this._uploadedSize += Buffer3.byteLength(chunk2, encoding);
|
|
28101
29028
|
const progress = this.uploadProgress;
|
|
28102
29029
|
if (progress.percent < 1) {
|
|
28103
29030
|
this.emit("uploadProgress", progress);
|
|
@@ -28200,10 +29127,10 @@ var init_core = __esm({
|
|
|
28200
29127
|
}
|
|
28201
29128
|
});
|
|
28202
29129
|
|
|
28203
|
-
// node_modules/.pnpm/got@
|
|
29130
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/as-promise/types.js
|
|
28204
29131
|
var CancelError2;
|
|
28205
29132
|
var init_types2 = __esm({
|
|
28206
|
-
"node_modules/.pnpm/got@
|
|
29133
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/as-promise/types.js"() {
|
|
28207
29134
|
init_errors();
|
|
28208
29135
|
CancelError2 = class extends RequestError {
|
|
28209
29136
|
constructor(request) {
|
|
@@ -28221,7 +29148,7 @@ var init_types2 = __esm({
|
|
|
28221
29148
|
}
|
|
28222
29149
|
});
|
|
28223
29150
|
|
|
28224
|
-
// node_modules/.pnpm/got@
|
|
29151
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/as-promise/index.js
|
|
28225
29152
|
import { EventEmitter as EventEmitter2 } from "node:events";
|
|
28226
29153
|
function asPromise(firstRequest) {
|
|
28227
29154
|
let globalRequest;
|
|
@@ -28253,7 +29180,12 @@ function asPromise(firstRequest) {
|
|
|
28253
29180
|
try {
|
|
28254
29181
|
response.body = parseBody(response, options.responseType, options.parseJson, options.encoding);
|
|
28255
29182
|
} catch (error2) {
|
|
28256
|
-
|
|
29183
|
+
try {
|
|
29184
|
+
response.body = response.rawBody.toString();
|
|
29185
|
+
} catch (error3) {
|
|
29186
|
+
request._beforeError(new ParseError(error3, response));
|
|
29187
|
+
return;
|
|
29188
|
+
}
|
|
28257
29189
|
if (isResponseOk(response)) {
|
|
28258
29190
|
request._beforeError(error2);
|
|
28259
29191
|
return;
|
|
@@ -28353,7 +29285,7 @@ function asPromise(firstRequest) {
|
|
|
28353
29285
|
}
|
|
28354
29286
|
var proxiedRequestEvents2;
|
|
28355
29287
|
var init_as_promise = __esm({
|
|
28356
|
-
"node_modules/.pnpm/got@
|
|
29288
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/as-promise/index.js"() {
|
|
28357
29289
|
init_dist();
|
|
28358
29290
|
init_p_cancelable();
|
|
28359
29291
|
init_errors();
|
|
@@ -28371,10 +29303,10 @@ var init_as_promise = __esm({
|
|
|
28371
29303
|
}
|
|
28372
29304
|
});
|
|
28373
29305
|
|
|
28374
|
-
// node_modules/.pnpm/got@
|
|
29306
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/create.js
|
|
28375
29307
|
var delay, isGotInstance, aliases, create, create_default;
|
|
28376
29308
|
var init_create = __esm({
|
|
28377
|
-
"node_modules/.pnpm/got@
|
|
29309
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/create.js"() {
|
|
28378
29310
|
init_dist();
|
|
28379
29311
|
init_as_promise();
|
|
28380
29312
|
init_core();
|
|
@@ -28551,16 +29483,16 @@ var init_create = __esm({
|
|
|
28551
29483
|
}
|
|
28552
29484
|
});
|
|
28553
29485
|
|
|
28554
|
-
// node_modules/.pnpm/got@
|
|
29486
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/types.js
|
|
28555
29487
|
var init_types3 = __esm({
|
|
28556
|
-
"node_modules/.pnpm/got@
|
|
29488
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/types.js"() {
|
|
28557
29489
|
}
|
|
28558
29490
|
});
|
|
28559
29491
|
|
|
28560
|
-
// node_modules/.pnpm/got@
|
|
29492
|
+
// node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/index.js
|
|
28561
29493
|
var defaults, got, source_default2;
|
|
28562
|
-
var
|
|
28563
|
-
"node_modules/.pnpm/got@
|
|
29494
|
+
var init_source4 = __esm({
|
|
29495
|
+
"node_modules/.pnpm/got@14.2.1/node_modules/got/dist/source/index.js"() {
|
|
28564
29496
|
init_create();
|
|
28565
29497
|
init_options();
|
|
28566
29498
|
init_options();
|
|
@@ -29002,7 +29934,7 @@ var require_minimist = __commonJS({
|
|
|
29002
29934
|
var key = keys[keys.length - 1];
|
|
29003
29935
|
return key in o;
|
|
29004
29936
|
}
|
|
29005
|
-
function
|
|
29937
|
+
function isNumber2(x) {
|
|
29006
29938
|
if (typeof x === "number") {
|
|
29007
29939
|
return true;
|
|
29008
29940
|
}
|
|
@@ -29102,7 +30034,7 @@ var require_minimist = __commonJS({
|
|
|
29102
30034
|
return;
|
|
29103
30035
|
}
|
|
29104
30036
|
}
|
|
29105
|
-
var value2 = !flags.strings[key2] &&
|
|
30037
|
+
var value2 = !flags.strings[key2] && isNumber2(val) ? Number(val) : val;
|
|
29106
30038
|
setKey(argv, key2.split("."), value2);
|
|
29107
30039
|
(aliases2[key2] || []).forEach(function(x) {
|
|
29108
30040
|
setKey(argv, x.split("."), value2);
|
|
@@ -29184,7 +30116,7 @@ var require_minimist = __commonJS({
|
|
|
29184
30116
|
}
|
|
29185
30117
|
} else {
|
|
29186
30118
|
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
|
29187
|
-
argv._.push(flags.strings._ || !
|
|
30119
|
+
argv._.push(flags.strings._ || !isNumber2(arg) ? arg : Number(arg));
|
|
29188
30120
|
}
|
|
29189
30121
|
if (opts.stopEarly) {
|
|
29190
30122
|
argv._.push.apply(argv._, args.slice(i + 1));
|
|
@@ -29734,7 +30666,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
29734
30666
|
gracefulQueue = "___graceful-fs.queue";
|
|
29735
30667
|
previousSymbol = "___graceful-fs.previous";
|
|
29736
30668
|
}
|
|
29737
|
-
function
|
|
30669
|
+
function noop4() {
|
|
29738
30670
|
}
|
|
29739
30671
|
function publishQueue(context, queue2) {
|
|
29740
30672
|
Object.defineProperty(context, gracefulQueue, {
|
|
@@ -29743,7 +30675,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
29743
30675
|
}
|
|
29744
30676
|
});
|
|
29745
30677
|
}
|
|
29746
|
-
var debug =
|
|
30678
|
+
var debug = noop4;
|
|
29747
30679
|
if (util2.debuglog)
|
|
29748
30680
|
debug = util2.debuglog("gfs4");
|
|
29749
30681
|
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
@@ -30581,8 +31513,8 @@ var require_util2 = __commonJS({
|
|
|
30581
31513
|
const typeList = [].concat(types2[key]);
|
|
30582
31514
|
const isPath = typeList.indexOf(path2) !== -1;
|
|
30583
31515
|
const isBool = typeList.indexOf(Boolean) !== -1;
|
|
30584
|
-
const
|
|
30585
|
-
const
|
|
31516
|
+
const isString2 = typeList.indexOf(String) !== -1;
|
|
31517
|
+
const isNumber2 = typeList.indexOf(Number) !== -1;
|
|
30586
31518
|
field = `${field}`.trim();
|
|
30587
31519
|
if (/^".*"$/.test(field)) {
|
|
30588
31520
|
try {
|
|
@@ -30591,7 +31523,7 @@ var require_util2 = __commonJS({
|
|
|
30591
31523
|
throw new Error(`Failed parsing JSON config key ${key}: ${field}`);
|
|
30592
31524
|
}
|
|
30593
31525
|
}
|
|
30594
|
-
if (isBool && !
|
|
31526
|
+
if (isBool && !isString2 && field === "") {
|
|
30595
31527
|
return true;
|
|
30596
31528
|
}
|
|
30597
31529
|
switch (field) {
|
|
@@ -30616,7 +31548,7 @@ var require_util2 = __commonJS({
|
|
|
30616
31548
|
}
|
|
30617
31549
|
field = path2.resolve(field);
|
|
30618
31550
|
}
|
|
30619
|
-
if (
|
|
31551
|
+
if (isNumber2 && !isNaN(field)) {
|
|
30620
31552
|
field = Number(field);
|
|
30621
31553
|
}
|
|
30622
31554
|
return field;
|
|
@@ -32734,7 +33666,7 @@ var require_range = __commonJS({
|
|
|
32734
33666
|
this.set = [first];
|
|
32735
33667
|
} else if (this.set.length > 1) {
|
|
32736
33668
|
for (const c of this.set) {
|
|
32737
|
-
if (c.length === 1 &&
|
|
33669
|
+
if (c.length === 1 && isAny2(c[0])) {
|
|
32738
33670
|
this.set = [c];
|
|
32739
33671
|
break;
|
|
32740
33672
|
}
|
|
@@ -32840,7 +33772,7 @@ var require_range = __commonJS({
|
|
|
32840
33772
|
} = require_re();
|
|
32841
33773
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants4();
|
|
32842
33774
|
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
32843
|
-
var
|
|
33775
|
+
var isAny2 = (c) => c.value === "";
|
|
32844
33776
|
var isSatisfiable = (comparators, options) => {
|
|
32845
33777
|
let result = true;
|
|
32846
33778
|
const remainingComparators = comparators.slice();
|
|
@@ -33800,7 +34732,7 @@ async function packageJson(packageName, options) {
|
|
|
33800
34732
|
var import_registry_auth_token, import_semver4, agentOptions, httpAgent, httpsAgent, PackageNotFoundError, VersionNotFoundError;
|
|
33801
34733
|
var init_package_json = __esm({
|
|
33802
34734
|
"node_modules/.pnpm/package-json@8.1.1/node_modules/package-json/index.js"() {
|
|
33803
|
-
|
|
34735
|
+
init_source4();
|
|
33804
34736
|
init_registry_url();
|
|
33805
34737
|
import_registry_auth_token = __toESM(require_registry_auth_token(), 1);
|
|
33806
34738
|
import_semver4 = __toESM(require_semver3(), 1);
|
|
@@ -33825,7 +34757,7 @@ var init_package_json = __esm({
|
|
|
33825
34757
|
}
|
|
33826
34758
|
});
|
|
33827
34759
|
|
|
33828
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
34760
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/utils.ts
|
|
33829
34761
|
var semver = __toESM(require_semver());
|
|
33830
34762
|
var import_sembear = __toESM(require_sembear_cjs());
|
|
33831
34763
|
var NORMAL_DEPENDENCY_TYPES = [
|
|
@@ -33923,7 +34855,7 @@ function makeCheck(check) {
|
|
|
33923
34855
|
return check;
|
|
33924
34856
|
}
|
|
33925
34857
|
|
|
33926
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
34858
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/EXTERNAL_MISMATCH.ts
|
|
33927
34859
|
var import_semver = __toESM(require_semver());
|
|
33928
34860
|
var EXTERNAL_MISMATCH_default = makeCheck({
|
|
33929
34861
|
validate: (workspace, allWorkspace) => {
|
|
@@ -33962,7 +34894,7 @@ var EXTERNAL_MISMATCH_default = makeCheck({
|
|
|
33962
34894
|
type: "all"
|
|
33963
34895
|
});
|
|
33964
34896
|
|
|
33965
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
34897
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/INTERNAL_MISMATCH.ts
|
|
33966
34898
|
var import_semver2 = __toESM(require_semver());
|
|
33967
34899
|
var INTERNAL_MISMATCH_default = makeCheck({
|
|
33968
34900
|
validate: (workspace, allWorkspaces) => {
|
|
@@ -34001,7 +34933,7 @@ var INTERNAL_MISMATCH_default = makeCheck({
|
|
|
34001
34933
|
type: "all"
|
|
34002
34934
|
});
|
|
34003
34935
|
|
|
34004
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
34936
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/INVALID_DEV_AND_PEER_DEPENDENCY_RELATIONSHIP.ts
|
|
34005
34937
|
var import_sembear2 = __toESM(require_sembear_cjs());
|
|
34006
34938
|
var import_semver3 = __toESM(require_semver());
|
|
34007
34939
|
var INVALID_DEV_AND_PEER_DEPENDENCY_RELATIONSHIP_default = makeCheck({
|
|
@@ -34068,7 +35000,7 @@ var INVALID_DEV_AND_PEER_DEPENDENCY_RELATIONSHIP_default = makeCheck({
|
|
|
34068
35000
|
}
|
|
34069
35001
|
});
|
|
34070
35002
|
|
|
34071
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35003
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/INVALID_PACKAGE_NAME.ts
|
|
34072
35004
|
var import_validate_npm_package_name = __toESM(require_validate_npm_package_name());
|
|
34073
35005
|
var INVALID_PACKAGE_NAME_default = makeCheck({
|
|
34074
35006
|
type: "all",
|
|
@@ -34111,7 +35043,7 @@ ${error2.errors.join(
|
|
|
34111
35043
|
}
|
|
34112
35044
|
});
|
|
34113
35045
|
|
|
34114
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35046
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/MULTIPLE_DEPENDENCY_TYPES.ts
|
|
34115
35047
|
var MULTIPLE_DEPENDENCY_TYPES_default = makeCheck({
|
|
34116
35048
|
validate: (workspace, allWorkspaces) => {
|
|
34117
35049
|
let dependencies = /* @__PURE__ */ new Set();
|
|
@@ -34152,7 +35084,7 @@ var MULTIPLE_DEPENDENCY_TYPES_default = makeCheck({
|
|
|
34152
35084
|
print: (error2) => `${error2.workspace.packageJson.name} has a dependency and a ${error2.dependencyType === "devDependencies" ? "devDependency" : "optionalDependency"} on ${error2.dependencyName}, this is unnecessary, it should be removed from ${error2.dependencyType}`
|
|
34153
35085
|
});
|
|
34154
35086
|
|
|
34155
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35087
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/ROOT_HAS_DEV_DEPENDENCIES.ts
|
|
34156
35088
|
var import_chalk = __toESM(require_source());
|
|
34157
35089
|
var ROOT_HAS_DEV_DEPENDENCIES_default = makeCheck({
|
|
34158
35090
|
type: "root",
|
|
@@ -34180,7 +35112,7 @@ var ROOT_HAS_DEV_DEPENDENCIES_default = makeCheck({
|
|
|
34180
35112
|
}
|
|
34181
35113
|
});
|
|
34182
35114
|
|
|
34183
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35115
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/UNSORTED_DEPENDENCIES.ts
|
|
34184
35116
|
var UNSORTED_DEPENDENCIES_default = makeCheck({
|
|
34185
35117
|
type: "all",
|
|
34186
35118
|
validate: (workspace) => {
|
|
@@ -34203,7 +35135,7 @@ var UNSORTED_DEPENDENCIES_default = makeCheck({
|
|
|
34203
35135
|
print: (error2) => `${error2.workspace.packageJson.name}'s dependencies are unsorted, this can cause large diffs when packages are added, resulting in dependencies being sorted`
|
|
34204
35136
|
});
|
|
34205
35137
|
|
|
34206
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35138
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/INCORRECT_REPOSITORY_FIELD.ts
|
|
34207
35139
|
var import_parse_github_url = __toESM(require_parse_github_url());
|
|
34208
35140
|
var import_normalize_path = __toESM(require_normalize_path());
|
|
34209
35141
|
var INCORRECT_REPOSITORY_FIELD_default = makeCheck({
|
|
@@ -34271,7 +35203,7 @@ var INCORRECT_REPOSITORY_FIELD_default = makeCheck({
|
|
|
34271
35203
|
}
|
|
34272
35204
|
});
|
|
34273
35205
|
|
|
34274
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35206
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/WORKSPACE_REQUIRED.ts
|
|
34275
35207
|
var WORKSPACE_REQUIRED_default = makeCheck({
|
|
34276
35208
|
validate: (workspace, allWorkspaces, root, opts) => {
|
|
34277
35209
|
if (opts.workspaceProtocol !== "require")
|
|
@@ -34305,7 +35237,7 @@ var WORKSPACE_REQUIRED_default = makeCheck({
|
|
|
34305
35237
|
type: "all"
|
|
34306
35238
|
});
|
|
34307
35239
|
|
|
34308
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35240
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/checks/index.ts
|
|
34309
35241
|
var checks = {
|
|
34310
35242
|
EXTERNAL_MISMATCH: EXTERNAL_MISMATCH_default,
|
|
34311
35243
|
INTERNAL_MISMATCH: INTERNAL_MISMATCH_default,
|
|
@@ -34318,7 +35250,7 @@ var checks = {
|
|
|
34318
35250
|
WORKSPACE_REQUIRED: WORKSPACE_REQUIRED_default
|
|
34319
35251
|
};
|
|
34320
35252
|
|
|
34321
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35253
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/errors.ts
|
|
34322
35254
|
var ExitError = class extends Error {
|
|
34323
35255
|
code;
|
|
34324
35256
|
constructor(code) {
|
|
@@ -34327,7 +35259,7 @@ var ExitError = class extends Error {
|
|
|
34327
35259
|
}
|
|
34328
35260
|
};
|
|
34329
35261
|
|
|
34330
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35262
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/npm-tag.ts
|
|
34331
35263
|
var import_get_packages = __toESM(require_manypkg_get_packages_cjs());
|
|
34332
35264
|
var import_spawndamnit = __toESM(require_spawndamnit());
|
|
34333
35265
|
var import_p_limit = __toESM(require_p_limit());
|
|
@@ -34368,11 +35300,11 @@ async function npmTagAll([tag, _, otp]) {
|
|
|
34368
35300
|
);
|
|
34369
35301
|
}
|
|
34370
35302
|
|
|
34371
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35303
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/run.ts
|
|
34372
35304
|
var import_get_packages2 = __toESM(require_manypkg_get_packages_cjs());
|
|
34373
35305
|
var import_spawndamnit2 = __toESM(require_spawndamnit());
|
|
34374
35306
|
|
|
34375
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35307
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/logger.ts
|
|
34376
35308
|
var import_chalk2 = __toESM(require_source());
|
|
34377
35309
|
import util from "util";
|
|
34378
35310
|
function format(args, messageType, scope) {
|
|
@@ -34388,7 +35320,7 @@ function error(message, scope) {
|
|
|
34388
35320
|
console.error(format([message], "error", scope));
|
|
34389
35321
|
}
|
|
34390
35322
|
|
|
34391
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35323
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/run.ts
|
|
34392
35324
|
async function runCmd(args, cwd) {
|
|
34393
35325
|
let { packages, rootDir } = await (0, import_get_packages2.getPackages)(cwd);
|
|
34394
35326
|
const exactMatchingPackage = packages.find((pkg) => {
|
|
@@ -34422,12 +35354,12 @@ ${matchingPackages.map((x) => x.packageJson.name).join("\n")}`
|
|
|
34422
35354
|
}
|
|
34423
35355
|
}
|
|
34424
35356
|
|
|
34425
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35357
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/upgrade.ts
|
|
34426
35358
|
var import_get_packages3 = __toESM(require_manypkg_get_packages_cjs());
|
|
34427
35359
|
var import_semver5 = __toESM(require_semver());
|
|
34428
35360
|
var import_p_limit2 = __toESM(require_p_limit());
|
|
34429
35361
|
|
|
34430
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35362
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/utils.ts
|
|
34431
35363
|
var fs = __toESM(require_lib());
|
|
34432
35364
|
var import_spawndamnit3 = __toESM(require_spawndamnit());
|
|
34433
35365
|
var import_detect_indent = __toESM(require_detect_indent());
|
|
@@ -34456,7 +35388,7 @@ async function install(toolType, cwd) {
|
|
|
34456
35388
|
);
|
|
34457
35389
|
}
|
|
34458
35390
|
|
|
34459
|
-
// node_modules/.pnpm/@manypkg+cli@0.21.
|
|
35391
|
+
// node_modules/.pnpm/@manypkg+cli@0.21.4/node_modules/@manypkg/cli/src/upgrade.ts
|
|
34460
35392
|
async function upgradeDependency([name, tag = "latest"]) {
|
|
34461
35393
|
let { packages, tool, rootPackage, rootDir } = await (0, import_get_packages3.getPackages)(
|
|
34462
35394
|
process.cwd()
|
|
@@ -34472,7 +35404,7 @@ async function upgradeDependency([name, tag = "latest"]) {
|
|
|
34472
35404
|
return;
|
|
34473
35405
|
let packageNames = Object.keys(deps);
|
|
34474
35406
|
packageNames.forEach((pkgName) => {
|
|
34475
|
-
if (isScope && pkgName.startsWith(name) || pkgName === name) {
|
|
35407
|
+
if (isScope && pkgName.startsWith(`${name}/`) || pkgName === name) {
|
|
34476
35408
|
requiresUpdate = true;
|
|
34477
35409
|
packagesToUpdate.add(pkgName);
|
|
34478
35410
|
}
|
|
@@ -34488,7 +35420,7 @@ async function upgradeDependency([name, tag = "latest"]) {
|
|
|
34488
35420
|
return;
|
|
34489
35421
|
let packageNames = Object.keys(deps);
|
|
34490
35422
|
packageNames.forEach((pkgName) => {
|
|
34491
|
-
if (isScope && pkgName.startsWith(name) || pkgName === name) {
|
|
35423
|
+
if (isScope && pkgName.startsWith(`${name}/`) || pkgName === name) {
|
|
34492
35424
|
rootRequiresUpdate = true;
|
|
34493
35425
|
packagesToUpdate.add(pkgName);
|
|
34494
35426
|
}
|