@bugbug-io/cli 14.19.1 → 14.21.0
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e4c7cfe-bf6b-52a3-91ab-a0fc48aa74b7")}catch(e){}}();
|
|
3
3
|
import { createRequire as __nodeCreateRequire } from 'node:module';
|
|
4
4
|
const require = __nodeCreateRequire(import.meta.url);
|
|
5
5
|
import {
|
|
@@ -54,13 +54,13 @@ var require_ms = __commonJS({
|
|
|
54
54
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
|
-
function parse4(
|
|
58
|
-
|
|
59
|
-
if (
|
|
57
|
+
function parse4(str2) {
|
|
58
|
+
str2 = String(str2);
|
|
59
|
+
if (str2.length > 100) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
63
|
-
|
|
63
|
+
str2
|
|
64
64
|
);
|
|
65
65
|
if (!match) {
|
|
66
66
|
return;
|
|
@@ -664,7 +664,7 @@ var require_node = __commonJS({
|
|
|
664
664
|
var { formatters } = module2.exports;
|
|
665
665
|
formatters.o = function(v) {
|
|
666
666
|
this.inspectOpts.colors = this.useColors;
|
|
667
|
-
return util2.inspect(v, this.inspectOpts).split("\n").map((
|
|
667
|
+
return util2.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" ");
|
|
668
668
|
};
|
|
669
669
|
formatters.O = function(v) {
|
|
670
670
|
this.inspectOpts.colors = this.useColors;
|
|
@@ -2205,13 +2205,13 @@ var require_Collection = __commonJS({
|
|
|
2205
2205
|
var require_stringifyComment = __commonJS({
|
|
2206
2206
|
"../../node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
2207
2207
|
"use strict";
|
|
2208
|
-
var stringifyComment = (
|
|
2208
|
+
var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
|
|
2209
2209
|
function indentComment(comment, indent) {
|
|
2210
2210
|
if (/^\n+$/.test(comment))
|
|
2211
2211
|
return comment.substring(1);
|
|
2212
2212
|
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
2213
2213
|
}
|
|
2214
|
-
var lineComment = (
|
|
2214
|
+
var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
|
|
2215
2215
|
exports.indentComment = indentComment;
|
|
2216
2216
|
exports.lineComment = lineComment;
|
|
2217
2217
|
exports.stringifyComment = stringifyComment;
|
|
@@ -2365,16 +2365,16 @@ var require_stringifyString = __commonJS({
|
|
|
2365
2365
|
lineWidth: ctx.options.lineWidth,
|
|
2366
2366
|
minContentWidth: ctx.options.minContentWidth
|
|
2367
2367
|
});
|
|
2368
|
-
var containsDocumentMarker = (
|
|
2369
|
-
function lineLengthOverLimit(
|
|
2368
|
+
var containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2);
|
|
2369
|
+
function lineLengthOverLimit(str2, lineWidth, indentLength) {
|
|
2370
2370
|
if (!lineWidth || lineWidth < 0)
|
|
2371
2371
|
return false;
|
|
2372
2372
|
const limit = lineWidth - indentLength;
|
|
2373
|
-
const strLen =
|
|
2373
|
+
const strLen = str2.length;
|
|
2374
2374
|
if (strLen <= limit)
|
|
2375
2375
|
return false;
|
|
2376
2376
|
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
2377
|
-
if (
|
|
2377
|
+
if (str2[i] === "\n") {
|
|
2378
2378
|
if (i - start > limit)
|
|
2379
2379
|
return true;
|
|
2380
2380
|
start = i + 1;
|
|
@@ -2391,11 +2391,11 @@ var require_stringifyString = __commonJS({
|
|
|
2391
2391
|
const { implicitKey } = ctx;
|
|
2392
2392
|
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
2393
2393
|
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
2394
|
-
let
|
|
2394
|
+
let str2 = "";
|
|
2395
2395
|
let start = 0;
|
|
2396
2396
|
for (let i = 0, ch = json2[i]; ch; ch = json2[++i]) {
|
|
2397
2397
|
if (ch === " " && json2[i + 1] === "\\" && json2[i + 2] === "n") {
|
|
2398
|
-
|
|
2398
|
+
str2 += json2.slice(start, i) + "\\ ";
|
|
2399
2399
|
i += 1;
|
|
2400
2400
|
start = i;
|
|
2401
2401
|
ch = "\\";
|
|
@@ -2404,38 +2404,38 @@ var require_stringifyString = __commonJS({
|
|
|
2404
2404
|
switch (json2[i + 1]) {
|
|
2405
2405
|
case "u":
|
|
2406
2406
|
{
|
|
2407
|
-
|
|
2407
|
+
str2 += json2.slice(start, i);
|
|
2408
2408
|
const code = json2.substr(i + 2, 4);
|
|
2409
2409
|
switch (code) {
|
|
2410
2410
|
case "0000":
|
|
2411
|
-
|
|
2411
|
+
str2 += "\\0";
|
|
2412
2412
|
break;
|
|
2413
2413
|
case "0007":
|
|
2414
|
-
|
|
2414
|
+
str2 += "\\a";
|
|
2415
2415
|
break;
|
|
2416
2416
|
case "000b":
|
|
2417
|
-
|
|
2417
|
+
str2 += "\\v";
|
|
2418
2418
|
break;
|
|
2419
2419
|
case "001b":
|
|
2420
|
-
|
|
2420
|
+
str2 += "\\e";
|
|
2421
2421
|
break;
|
|
2422
2422
|
case "0085":
|
|
2423
|
-
|
|
2423
|
+
str2 += "\\N";
|
|
2424
2424
|
break;
|
|
2425
2425
|
case "00a0":
|
|
2426
|
-
|
|
2426
|
+
str2 += "\\_";
|
|
2427
2427
|
break;
|
|
2428
2428
|
case "2028":
|
|
2429
|
-
|
|
2429
|
+
str2 += "\\L";
|
|
2430
2430
|
break;
|
|
2431
2431
|
case "2029":
|
|
2432
|
-
|
|
2432
|
+
str2 += "\\P";
|
|
2433
2433
|
break;
|
|
2434
2434
|
default:
|
|
2435
2435
|
if (code.substr(0, 2) === "00")
|
|
2436
|
-
|
|
2436
|
+
str2 += "\\x" + code.substr(2);
|
|
2437
2437
|
else
|
|
2438
|
-
|
|
2438
|
+
str2 += json2.substr(i, 6);
|
|
2439
2439
|
}
|
|
2440
2440
|
i += 5;
|
|
2441
2441
|
start = i + 1;
|
|
@@ -2445,14 +2445,14 @@ var require_stringifyString = __commonJS({
|
|
|
2445
2445
|
if (implicitKey || json2[i + 2] === '"' || json2.length < minMultiLineLength) {
|
|
2446
2446
|
i += 1;
|
|
2447
2447
|
} else {
|
|
2448
|
-
|
|
2448
|
+
str2 += json2.slice(start, i) + "\n\n";
|
|
2449
2449
|
while (json2[i + 2] === "\\" && json2[i + 3] === "n" && json2[i + 4] !== '"') {
|
|
2450
|
-
|
|
2450
|
+
str2 += "\n";
|
|
2451
2451
|
i += 2;
|
|
2452
2452
|
}
|
|
2453
|
-
|
|
2453
|
+
str2 += indent;
|
|
2454
2454
|
if (json2[i + 2] === " ")
|
|
2455
|
-
|
|
2455
|
+
str2 += "\\";
|
|
2456
2456
|
i += 1;
|
|
2457
2457
|
start = i + 1;
|
|
2458
2458
|
}
|
|
@@ -2461,8 +2461,8 @@ var require_stringifyString = __commonJS({
|
|
|
2461
2461
|
i += 1;
|
|
2462
2462
|
}
|
|
2463
2463
|
}
|
|
2464
|
-
|
|
2465
|
-
return implicitKey ?
|
|
2464
|
+
str2 = start ? str2 + json2.slice(start) : json2;
|
|
2465
|
+
return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
2466
2466
|
}
|
|
2467
2467
|
function singleQuotedString(value, ctx) {
|
|
2468
2468
|
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
@@ -2590,15 +2590,15 @@ ${indent}${start}${value}${end}`;
|
|
|
2590
2590
|
return quotedString(value, ctx);
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
|
-
const
|
|
2593
|
+
const str2 = value.replace(/\n+/g, `$&
|
|
2594
2594
|
${indent}`);
|
|
2595
2595
|
if (actualString) {
|
|
2596
|
-
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(
|
|
2596
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2);
|
|
2597
2597
|
const { compat, tags } = ctx.doc.schema;
|
|
2598
2598
|
if (tags.some(test) || compat?.some(test))
|
|
2599
2599
|
return quotedString(value, ctx);
|
|
2600
2600
|
}
|
|
2601
|
-
return implicitKey ?
|
|
2601
|
+
return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));
|
|
2602
2602
|
}
|
|
2603
2603
|
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
2604
2604
|
const { implicitKey, inFlow } = ctx;
|
|
@@ -2750,11 +2750,11 @@ var require_stringify = __commonJS({
|
|
|
2750
2750
|
const props = stringifyProps(node3, tagObj, ctx);
|
|
2751
2751
|
if (props.length > 0)
|
|
2752
2752
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
2753
|
-
const
|
|
2753
|
+
const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node3, ctx, onComment, onChompKeep) : identity.isScalar(node3) ? stringifyString.stringifyString(node3, ctx, onComment, onChompKeep) : node3.toString(ctx, onComment, onChompKeep);
|
|
2754
2754
|
if (!props)
|
|
2755
|
-
return
|
|
2756
|
-
return identity.isScalar(node3) ||
|
|
2757
|
-
${ctx.indent}${
|
|
2755
|
+
return str2;
|
|
2756
|
+
return identity.isScalar(node3) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props}
|
|
2757
|
+
${ctx.indent}${str2}`;
|
|
2758
2758
|
}
|
|
2759
2759
|
exports.createStringifyContext = createStringifyContext;
|
|
2760
2760
|
exports.stringify = stringify3;
|
|
@@ -2789,8 +2789,8 @@ var require_stringifyPair = __commonJS({
|
|
|
2789
2789
|
});
|
|
2790
2790
|
let keyCommentDone = false;
|
|
2791
2791
|
let chompKeep = false;
|
|
2792
|
-
let
|
|
2793
|
-
if (!explicitKey && !ctx.inFlow &&
|
|
2792
|
+
let str2 = stringify3.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
2793
|
+
if (!explicitKey && !ctx.inFlow && str2.length > 1024) {
|
|
2794
2794
|
if (simpleKeys)
|
|
2795
2795
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
2796
2796
|
explicitKey = true;
|
|
@@ -2799,27 +2799,27 @@ var require_stringifyPair = __commonJS({
|
|
|
2799
2799
|
if (allNullValues || value == null) {
|
|
2800
2800
|
if (keyCommentDone && onComment)
|
|
2801
2801
|
onComment();
|
|
2802
|
-
return
|
|
2802
|
+
return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2;
|
|
2803
2803
|
}
|
|
2804
2804
|
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
2805
|
-
|
|
2805
|
+
str2 = `? ${str2}`;
|
|
2806
2806
|
if (keyComment && !keyCommentDone) {
|
|
2807
|
-
|
|
2807
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
2808
2808
|
} else if (chompKeep && onChompKeep)
|
|
2809
2809
|
onChompKeep();
|
|
2810
|
-
return
|
|
2810
|
+
return str2;
|
|
2811
2811
|
}
|
|
2812
2812
|
if (keyCommentDone)
|
|
2813
2813
|
keyComment = null;
|
|
2814
2814
|
if (explicitKey) {
|
|
2815
2815
|
if (keyComment)
|
|
2816
|
-
|
|
2817
|
-
|
|
2816
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
2817
|
+
str2 = `? ${str2}
|
|
2818
2818
|
${indent}:`;
|
|
2819
2819
|
} else {
|
|
2820
|
-
|
|
2820
|
+
str2 = `${str2}:`;
|
|
2821
2821
|
if (keyComment)
|
|
2822
|
-
|
|
2822
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
2823
2823
|
}
|
|
2824
2824
|
let vsb, vcb, valueComment;
|
|
2825
2825
|
if (identity.isNode(value)) {
|
|
@@ -2835,7 +2835,7 @@ ${indent}:`;
|
|
|
2835
2835
|
}
|
|
2836
2836
|
ctx.implicitKey = false;
|
|
2837
2837
|
if (!explicitKey && !keyComment && identity.isScalar(value))
|
|
2838
|
-
ctx.indentAtStart =
|
|
2838
|
+
ctx.indentAtStart = str2.length + 1;
|
|
2839
2839
|
chompKeep = false;
|
|
2840
2840
|
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
2841
2841
|
ctx.indent = ctx.indent.substring(2);
|
|
@@ -2879,16 +2879,16 @@ ${ctx.indent}`;
|
|
|
2879
2879
|
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
2880
2880
|
ws2 = "";
|
|
2881
2881
|
}
|
|
2882
|
-
|
|
2882
|
+
str2 += ws2 + valueStr;
|
|
2883
2883
|
if (ctx.inFlow) {
|
|
2884
2884
|
if (valueCommentDone && onComment)
|
|
2885
2885
|
onComment();
|
|
2886
2886
|
} else if (valueComment && !valueCommentDone) {
|
|
2887
|
-
|
|
2887
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment));
|
|
2888
2888
|
} else if (chompKeep && onChompKeep) {
|
|
2889
2889
|
onChompKeep();
|
|
2890
2890
|
}
|
|
2891
|
-
return
|
|
2891
|
+
return str2;
|
|
2892
2892
|
}
|
|
2893
2893
|
exports.stringifyPair = stringifyPair;
|
|
2894
2894
|
}
|
|
@@ -3115,31 +3115,31 @@ var require_stringifyCollection = __commonJS({
|
|
|
3115
3115
|
}
|
|
3116
3116
|
}
|
|
3117
3117
|
chompKeep = false;
|
|
3118
|
-
let
|
|
3118
|
+
let str3 = stringify3.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
3119
3119
|
if (comment2)
|
|
3120
|
-
|
|
3120
|
+
str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2));
|
|
3121
3121
|
if (chompKeep && comment2)
|
|
3122
3122
|
chompKeep = false;
|
|
3123
|
-
lines.push(blockItemPrefix +
|
|
3123
|
+
lines.push(blockItemPrefix + str3);
|
|
3124
3124
|
}
|
|
3125
|
-
let
|
|
3125
|
+
let str2;
|
|
3126
3126
|
if (lines.length === 0) {
|
|
3127
|
-
|
|
3127
|
+
str2 = flowChars.start + flowChars.end;
|
|
3128
3128
|
} else {
|
|
3129
|
-
|
|
3129
|
+
str2 = lines[0];
|
|
3130
3130
|
for (let i = 1; i < lines.length; ++i) {
|
|
3131
3131
|
const line = lines[i];
|
|
3132
|
-
|
|
3132
|
+
str2 += line ? `
|
|
3133
3133
|
${indent}${line}` : "\n";
|
|
3134
3134
|
}
|
|
3135
3135
|
}
|
|
3136
3136
|
if (comment) {
|
|
3137
|
-
|
|
3137
|
+
str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent);
|
|
3138
3138
|
if (onComment)
|
|
3139
3139
|
onComment();
|
|
3140
3140
|
} else if (chompKeep && onChompKeep)
|
|
3141
3141
|
onChompKeep();
|
|
3142
|
-
return
|
|
3142
|
+
return str2;
|
|
3143
3143
|
}
|
|
3144
3144
|
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
3145
3145
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
@@ -3182,21 +3182,21 @@ ${indent}${line}` : "\n";
|
|
|
3182
3182
|
}
|
|
3183
3183
|
if (comment)
|
|
3184
3184
|
reqNewline = true;
|
|
3185
|
-
let
|
|
3186
|
-
reqNewline || (reqNewline = lines.length > linesAtValue ||
|
|
3185
|
+
let str2 = stringify3.stringify(item, itemCtx, () => comment = null);
|
|
3186
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n"));
|
|
3187
3187
|
if (i < items.length - 1) {
|
|
3188
|
-
|
|
3188
|
+
str2 += ",";
|
|
3189
3189
|
} else if (ctx.options.trailingComma) {
|
|
3190
3190
|
if (ctx.options.lineWidth > 0) {
|
|
3191
|
-
reqNewline || (reqNewline = lines.reduce((sum2, line) => sum2 + line.length + 2, 2) + (
|
|
3191
|
+
reqNewline || (reqNewline = lines.reduce((sum2, line) => sum2 + line.length + 2, 2) + (str2.length + 2) > ctx.options.lineWidth);
|
|
3192
3192
|
}
|
|
3193
3193
|
if (reqNewline) {
|
|
3194
|
-
|
|
3194
|
+
str2 += ",";
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
3197
|
if (comment)
|
|
3198
|
-
|
|
3199
|
-
lines.push(
|
|
3198
|
+
str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment));
|
|
3199
|
+
lines.push(str2);
|
|
3200
3200
|
linesAtValue = lines.length;
|
|
3201
3201
|
}
|
|
3202
3202
|
const { start, end } = flowChars;
|
|
@@ -3208,11 +3208,11 @@ ${indent}${line}` : "\n";
|
|
|
3208
3208
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
3209
3209
|
}
|
|
3210
3210
|
if (reqNewline) {
|
|
3211
|
-
let
|
|
3211
|
+
let str2 = start;
|
|
3212
3212
|
for (const line of lines)
|
|
3213
|
-
|
|
3213
|
+
str2 += line ? `
|
|
3214
3214
|
${indentStep}${indent}${line}` : "\n";
|
|
3215
|
-
return `${
|
|
3215
|
+
return `${str2}
|
|
3216
3216
|
${indent}${end}`;
|
|
3217
3217
|
} else {
|
|
3218
3218
|
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
@@ -3544,7 +3544,7 @@ var require_string = __commonJS({
|
|
|
3544
3544
|
identify: (value) => typeof value === "string",
|
|
3545
3545
|
default: true,
|
|
3546
3546
|
tag: "tag:yaml.org,2002:str",
|
|
3547
|
-
resolve: (
|
|
3547
|
+
resolve: (str2) => str2,
|
|
3548
3548
|
stringify(item, ctx, onComment, onChompKeep) {
|
|
3549
3549
|
ctx = Object.assign({ actualString: true }, ctx);
|
|
3550
3550
|
return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);
|
|
@@ -3582,7 +3582,7 @@ var require_bool = __commonJS({
|
|
|
3582
3582
|
default: true,
|
|
3583
3583
|
tag: "tag:yaml.org,2002:bool",
|
|
3584
3584
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
3585
|
-
resolve: (
|
|
3585
|
+
resolve: (str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"),
|
|
3586
3586
|
stringify({ source, value }, ctx) {
|
|
3587
3587
|
if (source && boolTag.test.test(source)) {
|
|
3588
3588
|
const sv = source[0] === "t" || source[0] === "T";
|
|
@@ -3603,9 +3603,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
3603
3603
|
function stringifyNumber({ format: format2, minFractionDigits, tag, value }) {
|
|
3604
3604
|
if (typeof value === "bigint")
|
|
3605
3605
|
return String(value);
|
|
3606
|
-
const
|
|
3607
|
-
if (!isFinite(
|
|
3608
|
-
return isNaN(
|
|
3606
|
+
const num2 = typeof value === "number" ? value : Number(value);
|
|
3607
|
+
if (!isFinite(num2))
|
|
3608
|
+
return isNaN(num2) ? ".nan" : num2 < 0 ? "-.inf" : ".inf";
|
|
3609
3609
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
3610
3610
|
if (!format2 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
3611
3611
|
let i = n.indexOf(".");
|
|
@@ -3634,7 +3634,7 @@ var require_float = __commonJS({
|
|
|
3634
3634
|
default: true,
|
|
3635
3635
|
tag: "tag:yaml.org,2002:float",
|
|
3636
3636
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
3637
|
-
resolve: (
|
|
3637
|
+
resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
3638
3638
|
stringify: stringifyNumber.stringifyNumber
|
|
3639
3639
|
};
|
|
3640
3640
|
var floatExp = {
|
|
@@ -3643,10 +3643,10 @@ var require_float = __commonJS({
|
|
|
3643
3643
|
tag: "tag:yaml.org,2002:float",
|
|
3644
3644
|
format: "EXP",
|
|
3645
3645
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
3646
|
-
resolve: (
|
|
3646
|
+
resolve: (str2) => parseFloat(str2),
|
|
3647
3647
|
stringify(node3) {
|
|
3648
|
-
const
|
|
3649
|
-
return isFinite(
|
|
3648
|
+
const num2 = Number(node3.value);
|
|
3649
|
+
return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node3);
|
|
3650
3650
|
}
|
|
3651
3651
|
};
|
|
3652
3652
|
var float = {
|
|
@@ -3654,11 +3654,11 @@ var require_float = __commonJS({
|
|
|
3654
3654
|
default: true,
|
|
3655
3655
|
tag: "tag:yaml.org,2002:float",
|
|
3656
3656
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
3657
|
-
resolve(
|
|
3658
|
-
const node3 = new Scalar.Scalar(parseFloat(
|
|
3659
|
-
const dot =
|
|
3660
|
-
if (dot !== -1 &&
|
|
3661
|
-
node3.minFractionDigits =
|
|
3657
|
+
resolve(str2) {
|
|
3658
|
+
const node3 = new Scalar.Scalar(parseFloat(str2));
|
|
3659
|
+
const dot = str2.indexOf(".");
|
|
3660
|
+
if (dot !== -1 && str2[str2.length - 1] === "0")
|
|
3661
|
+
node3.minFractionDigits = str2.length - dot - 1;
|
|
3662
3662
|
return node3;
|
|
3663
3663
|
},
|
|
3664
3664
|
stringify: stringifyNumber.stringifyNumber
|
|
@@ -3675,7 +3675,7 @@ var require_int = __commonJS({
|
|
|
3675
3675
|
"use strict";
|
|
3676
3676
|
var stringifyNumber = require_stringifyNumber();
|
|
3677
3677
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
3678
|
-
var intResolve = (
|
|
3678
|
+
var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
|
|
3679
3679
|
function intStringify(node3, radix, prefix) {
|
|
3680
3680
|
const { value } = node3;
|
|
3681
3681
|
if (intIdentify(value) && value >= 0)
|
|
@@ -3688,7 +3688,7 @@ var require_int = __commonJS({
|
|
|
3688
3688
|
tag: "tag:yaml.org,2002:int",
|
|
3689
3689
|
format: "OCT",
|
|
3690
3690
|
test: /^0o[0-7]+$/,
|
|
3691
|
-
resolve: (
|
|
3691
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt),
|
|
3692
3692
|
stringify: (node3) => intStringify(node3, 8, "0o")
|
|
3693
3693
|
};
|
|
3694
3694
|
var int2 = {
|
|
@@ -3696,7 +3696,7 @@ var require_int = __commonJS({
|
|
|
3696
3696
|
default: true,
|
|
3697
3697
|
tag: "tag:yaml.org,2002:int",
|
|
3698
3698
|
test: /^[-+]?[0-9]+$/,
|
|
3699
|
-
resolve: (
|
|
3699
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
|
|
3700
3700
|
stringify: stringifyNumber.stringifyNumber
|
|
3701
3701
|
};
|
|
3702
3702
|
var intHex = {
|
|
@@ -3705,7 +3705,7 @@ var require_int = __commonJS({
|
|
|
3705
3705
|
tag: "tag:yaml.org,2002:int",
|
|
3706
3706
|
format: "HEX",
|
|
3707
3707
|
test: /^0x[0-9a-fA-F]+$/,
|
|
3708
|
-
resolve: (
|
|
3708
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
|
|
3709
3709
|
stringify: (node3) => intStringify(node3, 16, "0x")
|
|
3710
3710
|
};
|
|
3711
3711
|
exports.int = int2;
|
|
@@ -3758,7 +3758,7 @@ var require_schema2 = __commonJS({
|
|
|
3758
3758
|
identify: (value) => typeof value === "string",
|
|
3759
3759
|
default: true,
|
|
3760
3760
|
tag: "tag:yaml.org,2002:str",
|
|
3761
|
-
resolve: (
|
|
3761
|
+
resolve: (str2) => str2,
|
|
3762
3762
|
stringify: stringifyJSON
|
|
3763
3763
|
},
|
|
3764
3764
|
{
|
|
@@ -3775,7 +3775,7 @@ var require_schema2 = __commonJS({
|
|
|
3775
3775
|
default: true,
|
|
3776
3776
|
tag: "tag:yaml.org,2002:bool",
|
|
3777
3777
|
test: /^true$|^false$/,
|
|
3778
|
-
resolve: (
|
|
3778
|
+
resolve: (str2) => str2 === "true",
|
|
3779
3779
|
stringify: stringifyJSON
|
|
3780
3780
|
},
|
|
3781
3781
|
{
|
|
@@ -3783,7 +3783,7 @@ var require_schema2 = __commonJS({
|
|
|
3783
3783
|
default: true,
|
|
3784
3784
|
tag: "tag:yaml.org,2002:int",
|
|
3785
3785
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
3786
|
-
resolve: (
|
|
3786
|
+
resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10),
|
|
3787
3787
|
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
3788
3788
|
},
|
|
3789
3789
|
{
|
|
@@ -3791,7 +3791,7 @@ var require_schema2 = __commonJS({
|
|
|
3791
3791
|
default: true,
|
|
3792
3792
|
tag: "tag:yaml.org,2002:float",
|
|
3793
3793
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
3794
|
-
resolve: (
|
|
3794
|
+
resolve: (str2) => parseFloat(str2),
|
|
3795
3795
|
stringify: stringifyJSON
|
|
3796
3796
|
}
|
|
3797
3797
|
];
|
|
@@ -3799,9 +3799,9 @@ var require_schema2 = __commonJS({
|
|
|
3799
3799
|
default: true,
|
|
3800
3800
|
tag: "",
|
|
3801
3801
|
test: /^/,
|
|
3802
|
-
resolve(
|
|
3803
|
-
onError2(`Unresolved plain scalar ${JSON.stringify(
|
|
3804
|
-
return
|
|
3802
|
+
resolve(str2, onError2) {
|
|
3803
|
+
onError2(`Unresolved plain scalar ${JSON.stringify(str2)}`);
|
|
3804
|
+
return str2;
|
|
3805
3805
|
}
|
|
3806
3806
|
};
|
|
3807
3807
|
var schema = [map2.map, seq.seq].concat(jsonScalars, jsonError);
|
|
@@ -3833,10 +3833,10 @@ var require_binary = __commonJS({
|
|
|
3833
3833
|
if (typeof node_buffer.Buffer === "function") {
|
|
3834
3834
|
return node_buffer.Buffer.from(src, "base64");
|
|
3835
3835
|
} else if (typeof atob === "function") {
|
|
3836
|
-
const
|
|
3837
|
-
const buffer = new Uint8Array(
|
|
3838
|
-
for (let i = 0; i <
|
|
3839
|
-
buffer[i] =
|
|
3836
|
+
const str2 = atob(src.replace(/[\n\r]/g, ""));
|
|
3837
|
+
const buffer = new Uint8Array(str2.length);
|
|
3838
|
+
for (let i = 0; i < str2.length; ++i)
|
|
3839
|
+
buffer[i] = str2.charCodeAt(i);
|
|
3840
3840
|
return buffer;
|
|
3841
3841
|
} else {
|
|
3842
3842
|
onError2("This environment does not support reading binary tags; either Buffer or atob is required");
|
|
@@ -3847,28 +3847,28 @@ var require_binary = __commonJS({
|
|
|
3847
3847
|
if (!value)
|
|
3848
3848
|
return "";
|
|
3849
3849
|
const buf = value;
|
|
3850
|
-
let
|
|
3850
|
+
let str2;
|
|
3851
3851
|
if (typeof node_buffer.Buffer === "function") {
|
|
3852
|
-
|
|
3852
|
+
str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
|
|
3853
3853
|
} else if (typeof btoa === "function") {
|
|
3854
3854
|
let s = "";
|
|
3855
3855
|
for (let i = 0; i < buf.length; ++i)
|
|
3856
3856
|
s += String.fromCharCode(buf[i]);
|
|
3857
|
-
|
|
3857
|
+
str2 = btoa(s);
|
|
3858
3858
|
} else {
|
|
3859
3859
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
3860
3860
|
}
|
|
3861
3861
|
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
|
3862
3862
|
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
3863
3863
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
3864
|
-
const n = Math.ceil(
|
|
3864
|
+
const n = Math.ceil(str2.length / lineWidth);
|
|
3865
3865
|
const lines = new Array(n);
|
|
3866
3866
|
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
|
|
3867
|
-
lines[i] =
|
|
3867
|
+
lines[i] = str2.substr(o, lineWidth);
|
|
3868
3868
|
}
|
|
3869
|
-
|
|
3869
|
+
str2 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
3870
3870
|
}
|
|
3871
|
-
return stringifyString.stringifyString({ comment, type, value:
|
|
3871
|
+
return stringifyString.stringifyString({ comment, type, value: str2 }, ctx, onComment, onChompKeep);
|
|
3872
3872
|
}
|
|
3873
3873
|
};
|
|
3874
3874
|
exports.binary = binary;
|
|
@@ -4074,7 +4074,7 @@ var require_float2 = __commonJS({
|
|
|
4074
4074
|
default: true,
|
|
4075
4075
|
tag: "tag:yaml.org,2002:float",
|
|
4076
4076
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
4077
|
-
resolve: (
|
|
4077
|
+
resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
4078
4078
|
stringify: stringifyNumber.stringifyNumber
|
|
4079
4079
|
};
|
|
4080
4080
|
var floatExp = {
|
|
@@ -4083,10 +4083,10 @@ var require_float2 = __commonJS({
|
|
|
4083
4083
|
tag: "tag:yaml.org,2002:float",
|
|
4084
4084
|
format: "EXP",
|
|
4085
4085
|
test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
4086
|
-
resolve: (
|
|
4086
|
+
resolve: (str2) => parseFloat(str2.replace(/_/g, "")),
|
|
4087
4087
|
stringify(node3) {
|
|
4088
|
-
const
|
|
4089
|
-
return isFinite(
|
|
4088
|
+
const num2 = Number(node3.value);
|
|
4089
|
+
return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node3);
|
|
4090
4090
|
}
|
|
4091
4091
|
};
|
|
4092
4092
|
var float = {
|
|
@@ -4094,11 +4094,11 @@ var require_float2 = __commonJS({
|
|
|
4094
4094
|
default: true,
|
|
4095
4095
|
tag: "tag:yaml.org,2002:float",
|
|
4096
4096
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
4097
|
-
resolve(
|
|
4098
|
-
const node3 = new Scalar.Scalar(parseFloat(
|
|
4099
|
-
const dot =
|
|
4097
|
+
resolve(str2) {
|
|
4098
|
+
const node3 = new Scalar.Scalar(parseFloat(str2.replace(/_/g, "")));
|
|
4099
|
+
const dot = str2.indexOf(".");
|
|
4100
4100
|
if (dot !== -1) {
|
|
4101
|
-
const f =
|
|
4101
|
+
const f = str2.substring(dot + 1).replace(/_/g, "");
|
|
4102
4102
|
if (f[f.length - 1] === "0")
|
|
4103
4103
|
node3.minFractionDigits = f.length;
|
|
4104
4104
|
}
|
|
@@ -4118,34 +4118,34 @@ var require_int2 = __commonJS({
|
|
|
4118
4118
|
"use strict";
|
|
4119
4119
|
var stringifyNumber = require_stringifyNumber();
|
|
4120
4120
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
4121
|
-
function intResolve(
|
|
4122
|
-
const sign =
|
|
4121
|
+
function intResolve(str2, offset, radix, { intAsBigInt }) {
|
|
4122
|
+
const sign = str2[0];
|
|
4123
4123
|
if (sign === "-" || sign === "+")
|
|
4124
4124
|
offset += 1;
|
|
4125
|
-
|
|
4125
|
+
str2 = str2.substring(offset).replace(/_/g, "");
|
|
4126
4126
|
if (intAsBigInt) {
|
|
4127
4127
|
switch (radix) {
|
|
4128
4128
|
case 2:
|
|
4129
|
-
|
|
4129
|
+
str2 = `0b${str2}`;
|
|
4130
4130
|
break;
|
|
4131
4131
|
case 8:
|
|
4132
|
-
|
|
4132
|
+
str2 = `0o${str2}`;
|
|
4133
4133
|
break;
|
|
4134
4134
|
case 16:
|
|
4135
|
-
|
|
4135
|
+
str2 = `0x${str2}`;
|
|
4136
4136
|
break;
|
|
4137
4137
|
}
|
|
4138
|
-
const n2 = BigInt(
|
|
4138
|
+
const n2 = BigInt(str2);
|
|
4139
4139
|
return sign === "-" ? BigInt(-1) * n2 : n2;
|
|
4140
4140
|
}
|
|
4141
|
-
const n = parseInt(
|
|
4141
|
+
const n = parseInt(str2, radix);
|
|
4142
4142
|
return sign === "-" ? -1 * n : n;
|
|
4143
4143
|
}
|
|
4144
4144
|
function intStringify(node3, radix, prefix) {
|
|
4145
4145
|
const { value } = node3;
|
|
4146
4146
|
if (intIdentify(value)) {
|
|
4147
|
-
const
|
|
4148
|
-
return value < 0 ? "-" + prefix +
|
|
4147
|
+
const str2 = value.toString(radix);
|
|
4148
|
+
return value < 0 ? "-" + prefix + str2.substr(1) : prefix + str2;
|
|
4149
4149
|
}
|
|
4150
4150
|
return stringifyNumber.stringifyNumber(node3);
|
|
4151
4151
|
}
|
|
@@ -4155,7 +4155,7 @@ var require_int2 = __commonJS({
|
|
|
4155
4155
|
tag: "tag:yaml.org,2002:int",
|
|
4156
4156
|
format: "BIN",
|
|
4157
4157
|
test: /^[-+]?0b[0-1_]+$/,
|
|
4158
|
-
resolve: (
|
|
4158
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 2, opt),
|
|
4159
4159
|
stringify: (node3) => intStringify(node3, 2, "0b")
|
|
4160
4160
|
};
|
|
4161
4161
|
var intOct = {
|
|
@@ -4164,7 +4164,7 @@ var require_int2 = __commonJS({
|
|
|
4164
4164
|
tag: "tag:yaml.org,2002:int",
|
|
4165
4165
|
format: "OCT",
|
|
4166
4166
|
test: /^[-+]?0[0-7_]+$/,
|
|
4167
|
-
resolve: (
|
|
4167
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 1, 8, opt),
|
|
4168
4168
|
stringify: (node3) => intStringify(node3, 8, "0")
|
|
4169
4169
|
};
|
|
4170
4170
|
var int2 = {
|
|
@@ -4172,7 +4172,7 @@ var require_int2 = __commonJS({
|
|
|
4172
4172
|
default: true,
|
|
4173
4173
|
tag: "tag:yaml.org,2002:int",
|
|
4174
4174
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
4175
|
-
resolve: (
|
|
4175
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
|
|
4176
4176
|
stringify: stringifyNumber.stringifyNumber
|
|
4177
4177
|
};
|
|
4178
4178
|
var intHex = {
|
|
@@ -4181,7 +4181,7 @@ var require_int2 = __commonJS({
|
|
|
4181
4181
|
tag: "tag:yaml.org,2002:int",
|
|
4182
4182
|
format: "HEX",
|
|
4183
4183
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
4184
|
-
resolve: (
|
|
4184
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
|
|
4185
4185
|
stringify: (node3) => intStringify(node3, 16, "0x")
|
|
4186
4186
|
};
|
|
4187
4187
|
exports.int = int2;
|
|
@@ -4285,26 +4285,26 @@ var require_timestamp = __commonJS({
|
|
|
4285
4285
|
"../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
4286
4286
|
"use strict";
|
|
4287
4287
|
var stringifyNumber = require_stringifyNumber();
|
|
4288
|
-
function parseSexagesimal(
|
|
4289
|
-
const sign =
|
|
4290
|
-
const parts = sign === "-" || sign === "+" ?
|
|
4291
|
-
const
|
|
4292
|
-
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 *
|
|
4293
|
-
return sign === "-" ?
|
|
4288
|
+
function parseSexagesimal(str2, asBigInt) {
|
|
4289
|
+
const sign = str2[0];
|
|
4290
|
+
const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
|
|
4291
|
+
const num2 = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
4292
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num2(60) + num2(p), num2(0));
|
|
4293
|
+
return sign === "-" ? num2(-1) * res : res;
|
|
4294
4294
|
}
|
|
4295
4295
|
function stringifySexagesimal(node3) {
|
|
4296
4296
|
let { value } = node3;
|
|
4297
|
-
let
|
|
4297
|
+
let num2 = (n) => n;
|
|
4298
4298
|
if (typeof value === "bigint")
|
|
4299
|
-
|
|
4299
|
+
num2 = (n) => BigInt(n);
|
|
4300
4300
|
else if (isNaN(value) || !isFinite(value))
|
|
4301
4301
|
return stringifyNumber.stringifyNumber(node3);
|
|
4302
4302
|
let sign = "";
|
|
4303
4303
|
if (value < 0) {
|
|
4304
4304
|
sign = "-";
|
|
4305
|
-
value *=
|
|
4305
|
+
value *= num2(-1);
|
|
4306
4306
|
}
|
|
4307
|
-
const _60 =
|
|
4307
|
+
const _60 = num2(60);
|
|
4308
4308
|
const parts = [value % _60];
|
|
4309
4309
|
if (value < 60) {
|
|
4310
4310
|
parts.unshift(0);
|
|
@@ -4324,7 +4324,7 @@ var require_timestamp = __commonJS({
|
|
|
4324
4324
|
tag: "tag:yaml.org,2002:int",
|
|
4325
4325
|
format: "TIME",
|
|
4326
4326
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
4327
|
-
resolve: (
|
|
4327
|
+
resolve: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt),
|
|
4328
4328
|
stringify: stringifySexagesimal
|
|
4329
4329
|
};
|
|
4330
4330
|
var floatTime = {
|
|
@@ -4333,7 +4333,7 @@ var require_timestamp = __commonJS({
|
|
|
4333
4333
|
tag: "tag:yaml.org,2002:float",
|
|
4334
4334
|
format: "TIME",
|
|
4335
4335
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
4336
|
-
resolve: (
|
|
4336
|
+
resolve: (str2) => parseSexagesimal(str2, false),
|
|
4337
4337
|
stringify: stringifySexagesimal
|
|
4338
4338
|
};
|
|
4339
4339
|
var timestamp = {
|
|
@@ -4344,8 +4344,8 @@ var require_timestamp = __commonJS({
|
|
|
4344
4344
|
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
4345
4345
|
// assumed to be 00:00:00Z (start of day, UTC).
|
|
4346
4346
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
4347
|
-
resolve(
|
|
4348
|
-
const match =
|
|
4347
|
+
resolve(str2) {
|
|
4348
|
+
const match = str2.match(timestamp.test);
|
|
4349
4349
|
if (!match)
|
|
4350
4350
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
4351
4351
|
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
@@ -4515,7 +4515,7 @@ var require_Schema = __commonJS({
|
|
|
4515
4515
|
var seq = require_seq();
|
|
4516
4516
|
var string4 = require_string();
|
|
4517
4517
|
var tags = require_tags();
|
|
4518
|
-
var sortMapEntriesByKey = (a,
|
|
4518
|
+
var sortMapEntriesByKey = (a, b3) => a.key < b3.key ? -1 : a.key > b3.key ? 1 : 0;
|
|
4519
4519
|
var Schema = class _Schema {
|
|
4520
4520
|
constructor({ compat, customTags, merge: merge4, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
4521
4521
|
this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
|
|
@@ -5195,7 +5195,7 @@ var require_util_map_includes = __commonJS({
|
|
|
5195
5195
|
const { uniqueKeys } = ctx.options;
|
|
5196
5196
|
if (uniqueKeys === false)
|
|
5197
5197
|
return false;
|
|
5198
|
-
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a,
|
|
5198
|
+
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b3) => a === b3 || identity.isScalar(a) && identity.isScalar(b3) && a.value === b3.value;
|
|
5199
5199
|
return items.some((pair) => isEqual(pair.key, search));
|
|
5200
5200
|
}
|
|
5201
5201
|
exports.mapIncludes = mapIncludes;
|
|
@@ -8672,9 +8672,9 @@ var require_main = __commonJS({
|
|
|
8672
8672
|
options.path = vaultPath;
|
|
8673
8673
|
const result = DotenvModule.configDotenv(options);
|
|
8674
8674
|
if (!result.parsed) {
|
|
8675
|
-
const
|
|
8676
|
-
|
|
8677
|
-
throw
|
|
8675
|
+
const err2 = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
8676
|
+
err2.code = "MISSING_DATA";
|
|
8677
|
+
throw err2;
|
|
8678
8678
|
}
|
|
8679
8679
|
const keys = _dotenvKey(options).split(",");
|
|
8680
8680
|
const length = keys.length;
|
|
@@ -8717,30 +8717,30 @@ var require_main = __commonJS({
|
|
|
8717
8717
|
uri = new URL(dotenvKey);
|
|
8718
8718
|
} catch (error62) {
|
|
8719
8719
|
if (error62.code === "ERR_INVALID_URL") {
|
|
8720
|
-
const
|
|
8721
|
-
|
|
8722
|
-
throw
|
|
8720
|
+
const err2 = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
8721
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
8722
|
+
throw err2;
|
|
8723
8723
|
}
|
|
8724
8724
|
throw error62;
|
|
8725
8725
|
}
|
|
8726
8726
|
const key = uri.password;
|
|
8727
8727
|
if (!key) {
|
|
8728
|
-
const
|
|
8729
|
-
|
|
8730
|
-
throw
|
|
8728
|
+
const err2 = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
8729
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
8730
|
+
throw err2;
|
|
8731
8731
|
}
|
|
8732
8732
|
const environment = uri.searchParams.get("environment");
|
|
8733
8733
|
if (!environment) {
|
|
8734
|
-
const
|
|
8735
|
-
|
|
8736
|
-
throw
|
|
8734
|
+
const err2 = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
8735
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
8736
|
+
throw err2;
|
|
8737
8737
|
}
|
|
8738
8738
|
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
8739
8739
|
const ciphertext = result.parsed[environmentKey];
|
|
8740
8740
|
if (!ciphertext) {
|
|
8741
|
-
const
|
|
8742
|
-
|
|
8743
|
-
throw
|
|
8741
|
+
const err2 = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
8742
|
+
err2.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
8743
|
+
throw err2;
|
|
8744
8744
|
}
|
|
8745
8745
|
return { ciphertext, key };
|
|
8746
8746
|
}
|
|
@@ -8870,13 +8870,13 @@ var require_main = __commonJS({
|
|
|
8870
8870
|
const invalidKeyLength = error62.message === "Invalid key length";
|
|
8871
8871
|
const decryptionFailed = error62.message === "Unsupported state or unable to authenticate data";
|
|
8872
8872
|
if (isRange || invalidKeyLength) {
|
|
8873
|
-
const
|
|
8874
|
-
|
|
8875
|
-
throw
|
|
8873
|
+
const err2 = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
8874
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
8875
|
+
throw err2;
|
|
8876
8876
|
} else if (decryptionFailed) {
|
|
8877
|
-
const
|
|
8878
|
-
|
|
8879
|
-
throw
|
|
8877
|
+
const err2 = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
8878
|
+
err2.code = "DECRYPTION_FAILED";
|
|
8879
|
+
throw err2;
|
|
8880
8880
|
} else {
|
|
8881
8881
|
throw error62;
|
|
8882
8882
|
}
|
|
@@ -8886,9 +8886,9 @@ var require_main = __commonJS({
|
|
|
8886
8886
|
const debug3 = Boolean(options && options.debug);
|
|
8887
8887
|
const override = Boolean(options && options.override);
|
|
8888
8888
|
if (typeof parsed !== "object") {
|
|
8889
|
-
const
|
|
8890
|
-
|
|
8891
|
-
throw
|
|
8889
|
+
const err2 = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
8890
|
+
err2.code = "OBJECT_REQUIRED";
|
|
8891
|
+
throw err2;
|
|
8892
8892
|
}
|
|
8893
8893
|
for (const key of Object.keys(parsed)) {
|
|
8894
8894
|
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
@@ -8930,7 +8930,7 @@ var require_main = __commonJS({
|
|
|
8930
8930
|
// ../core/package.json
|
|
8931
8931
|
var package_default = {
|
|
8932
8932
|
name: "@bugbug-io/core",
|
|
8933
|
-
version: "14.
|
|
8933
|
+
version: "14.21.0",
|
|
8934
8934
|
private: true,
|
|
8935
8935
|
type: "module",
|
|
8936
8936
|
main: "dist/index.js",
|
|
@@ -9448,7 +9448,7 @@ var UNKNOWN_FUNCTION = "?";
|
|
|
9448
9448
|
var WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
|
|
9449
9449
|
var STRIP_FRAME_REGEXP = /captureMessage|captureException/;
|
|
9450
9450
|
function createStackParser(...parsers) {
|
|
9451
|
-
const sortedParsers = parsers.sort((a,
|
|
9451
|
+
const sortedParsers = parsers.sort((a, b3) => a[0] - b3[0]).map((p) => p[1]);
|
|
9452
9452
|
return (stack, skipFirstLines = 0, framesToPop = 0) => {
|
|
9453
9453
|
const frames = [];
|
|
9454
9454
|
const lines = stack.split("\n");
|
|
@@ -9773,8 +9773,8 @@ var stringifier;
|
|
|
9773
9773
|
function normalize(input2, depth = 100, maxProperties = Infinity) {
|
|
9774
9774
|
try {
|
|
9775
9775
|
return visit("", input2, depth, maxProperties);
|
|
9776
|
-
} catch (
|
|
9777
|
-
return { ERROR: `**non-serializable** (${
|
|
9776
|
+
} catch (err2) {
|
|
9777
|
+
return { ERROR: `**non-serializable** (${err2})` };
|
|
9778
9778
|
}
|
|
9779
9779
|
}
|
|
9780
9780
|
function normalizeToSize(object2, depth = 3, maxSize = 100 * 1024) {
|
|
@@ -9856,8 +9856,8 @@ function stringifyValue(key, value) {
|
|
|
9856
9856
|
}
|
|
9857
9857
|
const objName = getConstructorName(value);
|
|
9858
9858
|
return `[object ${objName}]`;
|
|
9859
|
-
} catch (
|
|
9860
|
-
return `**non-serializable** (${
|
|
9859
|
+
} catch (err2) {
|
|
9860
|
+
return `**non-serializable** (${err2})`;
|
|
9861
9861
|
}
|
|
9862
9862
|
}
|
|
9863
9863
|
function getConstructorName(value) {
|
|
@@ -9896,11 +9896,11 @@ function stringify(value, fallback = "[unserializable]") {
|
|
|
9896
9896
|
return typeof fallback === "function" ? fallback(value) : fallback;
|
|
9897
9897
|
}
|
|
9898
9898
|
}
|
|
9899
|
-
function truncate(
|
|
9900
|
-
if (typeof
|
|
9901
|
-
return
|
|
9899
|
+
function truncate(str2, max2 = 0) {
|
|
9900
|
+
if (typeof str2 !== "string" || max2 === 0) {
|
|
9901
|
+
return str2;
|
|
9902
9902
|
}
|
|
9903
|
-
return
|
|
9903
|
+
return str2.length <= max2 ? str2 : `${str2.slice(0, max2)}...`;
|
|
9904
9904
|
}
|
|
9905
9905
|
function snipLine(line, colno) {
|
|
9906
9906
|
let newLine = line;
|
|
@@ -10808,9 +10808,9 @@ var chainAndCopyPromiseLike = (original, onSuccess, onError2) => {
|
|
|
10808
10808
|
onSuccess(value);
|
|
10809
10809
|
return value;
|
|
10810
10810
|
},
|
|
10811
|
-
(
|
|
10812
|
-
onError2(
|
|
10813
|
-
throw
|
|
10811
|
+
(err2) => {
|
|
10812
|
+
onError2(err2);
|
|
10813
|
+
throw err2;
|
|
10814
10814
|
}
|
|
10815
10815
|
);
|
|
10816
10816
|
return isActualPromise(chained) && isActualPromise(original) ? chained : copyProps(original, chained);
|
|
@@ -11358,11 +11358,11 @@ function dsnToString(dsn, withPassword = false) {
|
|
|
11358
11358
|
const { host, path: path3, pass, port, projectId, protocol, publicKey } = dsn;
|
|
11359
11359
|
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path3 ? `${path3}/` : path3}${projectId}`;
|
|
11360
11360
|
}
|
|
11361
|
-
function dsnFromString(
|
|
11362
|
-
const match = DSN_REGEX.exec(
|
|
11361
|
+
function dsnFromString(str2) {
|
|
11362
|
+
const match = DSN_REGEX.exec(str2);
|
|
11363
11363
|
if (!match) {
|
|
11364
11364
|
consoleSandbox(() => {
|
|
11365
|
-
console.error(`Invalid Sentry Dsn: ${
|
|
11365
|
+
console.error(`Invalid Sentry Dsn: ${str2}`);
|
|
11366
11366
|
});
|
|
11367
11367
|
return void 0;
|
|
11368
11368
|
}
|
|
@@ -12704,7 +12704,7 @@ var SentrySpan = class {
|
|
|
12704
12704
|
spans: (
|
|
12705
12705
|
// spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here
|
|
12706
12706
|
// we do not use spans anymore after this point
|
|
12707
|
-
spans.length > MAX_SPAN_COUNT ? spans.sort((a,
|
|
12707
|
+
spans.length > MAX_SPAN_COUNT ? spans.sort((a, b3) => a.start_timestamp - b3.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans
|
|
12708
12708
|
),
|
|
12709
12709
|
start_timestamp: this._startTime,
|
|
12710
12710
|
timestamp: this._endTime,
|
|
@@ -12779,8 +12779,8 @@ function maybeHandlePromiseRejection(value, onError2, onFinally, onSuccess) {
|
|
|
12779
12779
|
onFinally();
|
|
12780
12780
|
onSuccess(result);
|
|
12781
12781
|
},
|
|
12782
|
-
(
|
|
12783
|
-
onError2(
|
|
12782
|
+
(err2) => {
|
|
12783
|
+
onError2(err2);
|
|
12784
12784
|
onFinally();
|
|
12785
12785
|
}
|
|
12786
12786
|
);
|
|
@@ -14029,10 +14029,10 @@ function normalizeEvent(event, depth, maxBreadth) {
|
|
|
14029
14029
|
const normalized = {
|
|
14030
14030
|
...event,
|
|
14031
14031
|
...event.breadcrumbs && {
|
|
14032
|
-
breadcrumbs: event.breadcrumbs.map((
|
|
14033
|
-
...
|
|
14034
|
-
...
|
|
14035
|
-
data: normalize(
|
|
14032
|
+
breadcrumbs: event.breadcrumbs.map((b3) => ({
|
|
14033
|
+
...b3,
|
|
14034
|
+
...b3.data && {
|
|
14035
|
+
data: normalize(b3.data, depth, maxBreadth)
|
|
14036
14036
|
}
|
|
14037
14037
|
}))
|
|
14038
14038
|
},
|
|
@@ -14645,14 +14645,14 @@ function sanitizeLogAttributes(attributes) {
|
|
|
14645
14645
|
}
|
|
14646
14646
|
return sanitized;
|
|
14647
14647
|
}
|
|
14648
|
-
function _removeLoneSurrogates(
|
|
14649
|
-
const strObj = Object(
|
|
14648
|
+
function _removeLoneSurrogates(str2) {
|
|
14649
|
+
const strObj = Object(str2);
|
|
14650
14650
|
const isWellFormed = strObj["isWellFormed"];
|
|
14651
14651
|
const toWellFormed = strObj["toWellFormed"];
|
|
14652
14652
|
if (typeof isWellFormed === "function" && typeof toWellFormed === "function") {
|
|
14653
|
-
return isWellFormed.call(
|
|
14653
|
+
return isWellFormed.call(str2) ? str2 : toWellFormed.call(str2);
|
|
14654
14654
|
}
|
|
14655
|
-
return
|
|
14655
|
+
return str2;
|
|
14656
14656
|
}
|
|
14657
14657
|
|
|
14658
14658
|
// ../../node_modules/@sentry/core/build/esm/metrics/envelope.js
|
|
@@ -16095,24 +16095,24 @@ function filterKeyValueData(data, behavior, additionalDenyTerms) {
|
|
|
16095
16095
|
}
|
|
16096
16096
|
|
|
16097
16097
|
// ../../node_modules/@sentry/core/build/esm/utils/cookie.js
|
|
16098
|
-
function parseCookie(
|
|
16098
|
+
function parseCookie(str2) {
|
|
16099
16099
|
const obj = {};
|
|
16100
16100
|
let index = 0;
|
|
16101
|
-
while (index <
|
|
16102
|
-
const eqIdx =
|
|
16101
|
+
while (index < str2.length) {
|
|
16102
|
+
const eqIdx = str2.indexOf("=", index);
|
|
16103
16103
|
if (eqIdx === -1) {
|
|
16104
16104
|
break;
|
|
16105
16105
|
}
|
|
16106
|
-
let endIdx =
|
|
16106
|
+
let endIdx = str2.indexOf(";", index);
|
|
16107
16107
|
if (endIdx === -1) {
|
|
16108
|
-
endIdx =
|
|
16108
|
+
endIdx = str2.length;
|
|
16109
16109
|
} else if (endIdx < eqIdx) {
|
|
16110
|
-
index =
|
|
16110
|
+
index = str2.lastIndexOf(";", eqIdx - 1) + 1;
|
|
16111
16111
|
continue;
|
|
16112
16112
|
}
|
|
16113
|
-
const key =
|
|
16113
|
+
const key = str2.slice(index, eqIdx).trim();
|
|
16114
16114
|
if (void 0 === obj[key]) {
|
|
16115
|
-
let val =
|
|
16115
|
+
let val = str2.slice(eqIdx + 1, endIdx).trim();
|
|
16116
16116
|
if (val.charCodeAt(0) === 34) {
|
|
16117
16117
|
val = val.slice(1, -1);
|
|
16118
16118
|
}
|
|
@@ -17048,9 +17048,9 @@ function parseForwardedHeader(value) {
|
|
|
17048
17048
|
}
|
|
17049
17049
|
return null;
|
|
17050
17050
|
}
|
|
17051
|
-
function isIP(
|
|
17051
|
+
function isIP(str2) {
|
|
17052
17052
|
const regex = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;
|
|
17053
|
-
return regex.test(
|
|
17053
|
+
return regex.test(str2);
|
|
17054
17054
|
}
|
|
17055
17055
|
|
|
17056
17056
|
// ../../node_modules/@sentry/core/build/esm/integrations/requestdata.js
|
|
@@ -17820,16 +17820,16 @@ function instrumentAuthOperation(operation, isAdmin = false) {
|
|
|
17820
17820
|
}
|
|
17821
17821
|
span.end();
|
|
17822
17822
|
return res;
|
|
17823
|
-
}).catch((
|
|
17823
|
+
}).catch((err2) => {
|
|
17824
17824
|
span.setStatus({ code: SPAN_STATUS_ERROR });
|
|
17825
17825
|
span.end();
|
|
17826
|
-
captureException(
|
|
17826
|
+
captureException(err2, {
|
|
17827
17827
|
mechanism: {
|
|
17828
17828
|
handled: false,
|
|
17829
17829
|
type: "auto.db.supabase.auth"
|
|
17830
17830
|
}
|
|
17831
17831
|
});
|
|
17832
|
-
throw
|
|
17832
|
+
throw err2;
|
|
17833
17833
|
}).then(...argumentsList);
|
|
17834
17834
|
}
|
|
17835
17835
|
);
|
|
@@ -17945,12 +17945,12 @@ function instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder, _options) {
|
|
|
17945
17945
|
span.end();
|
|
17946
17946
|
}
|
|
17947
17947
|
if (res?.error) {
|
|
17948
|
-
const
|
|
17948
|
+
const err2 = new Error(res.error.message);
|
|
17949
17949
|
if (res.error.code) {
|
|
17950
|
-
|
|
17950
|
+
err2.code = res.error.code;
|
|
17951
17951
|
}
|
|
17952
17952
|
if (res.error.details) {
|
|
17953
|
-
|
|
17953
|
+
err2.details = res.error.details;
|
|
17954
17954
|
}
|
|
17955
17955
|
const supabaseContext = {};
|
|
17956
17956
|
if (queryItems.length && shouldSendData) {
|
|
@@ -17959,7 +17959,7 @@ function instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder, _options) {
|
|
|
17959
17959
|
if (bodyPayload !== void 0 && shouldSendData) {
|
|
17960
17960
|
supabaseContext.body = bodyPayload;
|
|
17961
17961
|
}
|
|
17962
|
-
captureException(
|
|
17962
|
+
captureException(err2, (scope) => {
|
|
17963
17963
|
scope.addEventProcessor((e) => {
|
|
17964
17964
|
addExceptionMechanism(e, {
|
|
17965
17965
|
handled: false,
|
|
@@ -17989,12 +17989,12 @@ function instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder, _options) {
|
|
|
17989
17989
|
addBreadcrumb(breadcrumb);
|
|
17990
17990
|
return res;
|
|
17991
17991
|
},
|
|
17992
|
-
(
|
|
17992
|
+
(err2) => {
|
|
17993
17993
|
if (span) {
|
|
17994
17994
|
setHttpStatus(span, 500);
|
|
17995
17995
|
span.end();
|
|
17996
17996
|
}
|
|
17997
|
-
throw
|
|
17997
|
+
throw err2;
|
|
17998
17998
|
}
|
|
17999
17999
|
).then(...argumentsList);
|
|
18000
18000
|
}
|
|
@@ -18414,8 +18414,8 @@ function safeJoinConsoleArgs(values, normalizeDepth, normalizeMaxBreadth) {
|
|
|
18414
18414
|
(value) => isPrimitive(value) ? String(value) : JSON.stringify(normalize(value, normalizeDepth, normalizeMaxBreadth))
|
|
18415
18415
|
).join(" ");
|
|
18416
18416
|
}
|
|
18417
|
-
function hasConsoleSubstitutions(
|
|
18418
|
-
return /%[sdifocO]/.test(
|
|
18417
|
+
function hasConsoleSubstitutions(str2) {
|
|
18418
|
+
return /%[sdifocO]/.test(str2);
|
|
18419
18419
|
}
|
|
18420
18420
|
function createConsoleTemplateAttributes(firstArg, followingArgs) {
|
|
18421
18421
|
const attributes = {};
|
|
@@ -23927,7 +23927,7 @@ function _reconstructQuery(strings) {
|
|
|
23927
23927
|
if (strings.length === 1) {
|
|
23928
23928
|
return strings[0] || void 0;
|
|
23929
23929
|
}
|
|
23930
|
-
return strings.reduce((acc,
|
|
23930
|
+
return strings.reduce((acc, str2, i) => i === 0 ? str2 : `${acc}$${i}${str2}`, "");
|
|
23931
23931
|
}
|
|
23932
23932
|
var integerLiteralRE;
|
|
23933
23933
|
function _sanitizeSqlQuery(sqlQuery) {
|
|
@@ -25588,8 +25588,8 @@ function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
|
|
|
25588
25588
|
if (typeof code === "number") {
|
|
25589
25589
|
return code === statusCode;
|
|
25590
25590
|
}
|
|
25591
|
-
const [min,
|
|
25592
|
-
return statusCode >= min && statusCode <=
|
|
25591
|
+
const [min, max2] = code;
|
|
25592
|
+
return statusCode >= min && statusCode <= max2;
|
|
25593
25593
|
});
|
|
25594
25594
|
}
|
|
25595
25595
|
|
|
@@ -25661,8 +25661,8 @@ var ProxyLogger = class {
|
|
|
25661
25661
|
// ../../node_modules/@opentelemetry/api-logs/build/esm/ProxyLoggerProvider.js
|
|
25662
25662
|
var ProxyLoggerProvider = class {
|
|
25663
25663
|
getLogger(name, version2, options) {
|
|
25664
|
-
var
|
|
25665
|
-
return (
|
|
25664
|
+
var _a4;
|
|
25665
|
+
return (_a4 = this._getDelegateLogger(name, version2, options)) !== null && _a4 !== void 0 ? _a4 : new ProxyLogger(this, name, version2, options);
|
|
25666
25666
|
}
|
|
25667
25667
|
/**
|
|
25668
25668
|
* Get the delegate logger provider.
|
|
@@ -25670,8 +25670,8 @@ var ProxyLoggerProvider = class {
|
|
|
25670
25670
|
* @internal
|
|
25671
25671
|
*/
|
|
25672
25672
|
_getDelegate() {
|
|
25673
|
-
var
|
|
25674
|
-
return (
|
|
25673
|
+
var _a4;
|
|
25674
|
+
return (_a4 = this._delegate) !== null && _a4 !== void 0 ? _a4 : NOOP_LOGGER_PROVIDER;
|
|
25675
25675
|
}
|
|
25676
25676
|
/**
|
|
25677
25677
|
* Set the delegate logger provider
|
|
@@ -25684,8 +25684,8 @@ var ProxyLoggerProvider = class {
|
|
|
25684
25684
|
* @internal
|
|
25685
25685
|
*/
|
|
25686
25686
|
_getDelegateLogger(name, version2, options) {
|
|
25687
|
-
var
|
|
25688
|
-
return (
|
|
25687
|
+
var _a4;
|
|
25688
|
+
return (_a4 = this._delegate) === null || _a4 === void 0 ? void 0 : _a4.getLogger(name, version2, options);
|
|
25689
25689
|
}
|
|
25690
25690
|
};
|
|
25691
25691
|
|
|
@@ -25714,8 +25714,8 @@ var LogsAPI = class _LogsAPI {
|
|
|
25714
25714
|
* @returns LoggerProvider
|
|
25715
25715
|
*/
|
|
25716
25716
|
getLoggerProvider() {
|
|
25717
|
-
var
|
|
25718
|
-
return (
|
|
25717
|
+
var _a4, _b2;
|
|
25718
|
+
return (_b2 = (_a4 = _global[GLOBAL_LOGS_API_KEY]) === null || _a4 === void 0 ? void 0 : _a4.call(_global, API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b2 !== void 0 ? _b2 : this._proxyLoggerProvider;
|
|
25719
25719
|
}
|
|
25720
25720
|
/**
|
|
25721
25721
|
* Returns a Logger, creating one if one with the given name, version,
|
|
@@ -25947,17 +25947,17 @@ function _parseVersionString(v) {
|
|
|
25947
25947
|
const n = parseInt(v, 10);
|
|
25948
25948
|
return isNaN(n) ? v : n;
|
|
25949
25949
|
}
|
|
25950
|
-
function _normalizeVersionType(a,
|
|
25951
|
-
if (typeof a === typeof
|
|
25950
|
+
function _normalizeVersionType(a, b3) {
|
|
25951
|
+
if (typeof a === typeof b3) {
|
|
25952
25952
|
if (typeof a === "number") {
|
|
25953
|
-
return [a,
|
|
25953
|
+
return [a, b3];
|
|
25954
25954
|
} else if (typeof a === "string") {
|
|
25955
|
-
return [a,
|
|
25955
|
+
return [a, b3];
|
|
25956
25956
|
} else {
|
|
25957
25957
|
throw new Error("Version segments can only be strings or numbers");
|
|
25958
25958
|
}
|
|
25959
25959
|
} else {
|
|
25960
|
-
return [String(a), String(
|
|
25960
|
+
return [String(a), String(b3)];
|
|
25961
25961
|
}
|
|
25962
25962
|
}
|
|
25963
25963
|
function _compareVersionStrings(v1, v2) {
|
|
@@ -26423,7 +26423,7 @@ var ModuleNameTrie = class {
|
|
|
26423
26423
|
return [results[0].hook];
|
|
26424
26424
|
}
|
|
26425
26425
|
if (maintainInsertionOrder) {
|
|
26426
|
-
results.sort((a,
|
|
26426
|
+
results.sort((a, b3) => a.insertedId - b3.insertedId);
|
|
26427
26427
|
}
|
|
26428
26428
|
return results.map(({ hook }) => hook);
|
|
26429
26429
|
}
|
|
@@ -27145,8 +27145,8 @@ function onRequestCreated(config2, { request: request2 }) {
|
|
|
27145
27145
|
let requestUrl;
|
|
27146
27146
|
try {
|
|
27147
27147
|
requestUrl = new URL2(request2.path, request2.origin);
|
|
27148
|
-
} catch (
|
|
27149
|
-
DEBUG_BUILD2 && debug.warn("could not determine url.full:",
|
|
27148
|
+
} catch (err2) {
|
|
27149
|
+
DEBUG_BUILD2 && debug.warn("could not determine url.full:", err2);
|
|
27150
27150
|
return;
|
|
27151
27151
|
}
|
|
27152
27152
|
const urlScheme = requestUrl.protocol.replace(":", "");
|
|
@@ -27425,8 +27425,8 @@ function guardedRawAttributes(attributes) {
|
|
|
27425
27425
|
if (isPromiseLike(v)) {
|
|
27426
27426
|
return [
|
|
27427
27427
|
k2,
|
|
27428
|
-
v.catch((
|
|
27429
|
-
diag.debug("promise rejection for resource attribute: %s - %s", k2,
|
|
27428
|
+
v.catch((err2) => {
|
|
27429
|
+
diag.debug("promise rejection for resource attribute: %s - %s", k2, err2);
|
|
27430
27430
|
return void 0;
|
|
27431
27431
|
})
|
|
27432
27432
|
];
|
|
@@ -28798,11 +28798,11 @@ var SentryPropagator = class extends W3CBaggagePropagator {
|
|
|
28798
28798
|
}
|
|
28799
28799
|
}
|
|
28800
28800
|
if (!existingSentryTraceHeader && dynamicSamplingContext) {
|
|
28801
|
-
baggage = Object.entries(dynamicSamplingContext).reduce((
|
|
28801
|
+
baggage = Object.entries(dynamicSamplingContext).reduce((b3, [dscKey, dscValue]) => {
|
|
28802
28802
|
if (dscValue) {
|
|
28803
|
-
return
|
|
28803
|
+
return b3.setEntry(`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`, { value: dscValue });
|
|
28804
28804
|
}
|
|
28805
|
-
return
|
|
28805
|
+
return b3;
|
|
28806
28806
|
}, baggage);
|
|
28807
28807
|
}
|
|
28808
28808
|
if (!existingSentryTraceHeader && traceId && traceId !== INVALID_TRACEID) {
|
|
@@ -29375,7 +29375,7 @@ var SentrySpanExporter = class {
|
|
|
29375
29375
|
hasGenAiSpans = true;
|
|
29376
29376
|
}
|
|
29377
29377
|
}
|
|
29378
|
-
transactionEvent.spans = spans2.length > MAX_SPAN_COUNT2 ? spans2.sort((a,
|
|
29378
|
+
transactionEvent.spans = spans2.length > MAX_SPAN_COUNT2 ? spans2.sort((a, b3) => a.start_timestamp - b3.start_timestamp).slice(0, MAX_SPAN_COUNT2) : spans2;
|
|
29379
29379
|
if (hasGenAiSpans) {
|
|
29380
29380
|
transactionEvent.sdkProcessingMetadata = {
|
|
29381
29381
|
...transactionEvent.sdkProcessingMetadata,
|
|
@@ -31013,7 +31013,7 @@ async function addSourceContext(event, contextLines) {
|
|
|
31013
31013
|
if (!filesToLineRanges) {
|
|
31014
31014
|
continue;
|
|
31015
31015
|
}
|
|
31016
|
-
filesToLineRanges.sort((a,
|
|
31016
|
+
filesToLineRanges.sort((a, b3) => a - b3);
|
|
31017
31017
|
const ranges = makeLineReaderRanges(filesToLineRanges, contextLines);
|
|
31018
31018
|
if (ranges.every((r) => rangeExistsInContentCache(file2, r))) {
|
|
31019
31019
|
continue;
|
|
@@ -31148,8 +31148,8 @@ function createRateLimiter(maxPerSecond, enable2, disable2) {
|
|
|
31148
31148
|
function isAnonymous(name) {
|
|
31149
31149
|
return name !== void 0 && (name.length === 0 || name === "?" || name === "<anonymous>");
|
|
31150
31150
|
}
|
|
31151
|
-
function functionNamesMatch(a,
|
|
31152
|
-
return a ===
|
|
31151
|
+
function functionNamesMatch(a, b3) {
|
|
31152
|
+
return a === b3 || `Object.${a}` === b3 || a === `Object.${b3}` || isAnonymous(a) && isAnonymous(b3);
|
|
31153
31153
|
}
|
|
31154
31154
|
|
|
31155
31155
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
|
|
@@ -31203,8 +31203,8 @@ var localVariablesAsyncIntegration = defineIntegration(((integrationOptions = {}
|
|
|
31203
31203
|
process.on("exit", () => {
|
|
31204
31204
|
worker.terminate();
|
|
31205
31205
|
});
|
|
31206
|
-
worker.once("error", (
|
|
31207
|
-
log2("Worker error",
|
|
31206
|
+
worker.once("error", (err2) => {
|
|
31207
|
+
log2("Worker error", err2);
|
|
31208
31208
|
});
|
|
31209
31209
|
worker.once("exit", (code) => {
|
|
31210
31210
|
log2("Worker exit", code);
|
|
@@ -31337,8 +31337,8 @@ var AsyncSession = class _AsyncSession {
|
|
|
31337
31337
|
objectId,
|
|
31338
31338
|
ownProperties: true
|
|
31339
31339
|
},
|
|
31340
|
-
(
|
|
31341
|
-
if (
|
|
31340
|
+
(err2, params) => {
|
|
31341
|
+
if (err2) {
|
|
31342
31342
|
next([]);
|
|
31343
31343
|
} else {
|
|
31344
31344
|
next(params.result);
|
|
@@ -31351,7 +31351,7 @@ var AsyncSession = class _AsyncSession {
|
|
|
31351
31351
|
*/
|
|
31352
31352
|
_unrollArray(objectId, name, vars, next) {
|
|
31353
31353
|
this._getProperties(objectId, (props) => {
|
|
31354
|
-
vars[name] = props.filter((v) => v.name !== "length" && !isNaN(parseInt(v.name, 10))).sort((a,
|
|
31354
|
+
vars[name] = props.filter((v) => v.name !== "length" && !isNaN(parseInt(v.name, 10))).sort((a, b3) => parseInt(a.name, 10) - parseInt(b3.name, 10)).map((v) => v.value?.value);
|
|
31355
31355
|
next(vars);
|
|
31356
31356
|
});
|
|
31357
31357
|
}
|
|
@@ -31486,9 +31486,9 @@ var _localVariablesSyncIntegration = ((options = {}, sessionOverride) => {
|
|
|
31486
31486
|
captureAll
|
|
31487
31487
|
);
|
|
31488
31488
|
if (captureAll) {
|
|
31489
|
-
const
|
|
31489
|
+
const max2 = options.maxExceptionsPerSecond || 50;
|
|
31490
31490
|
rateLimiter = createRateLimiter(
|
|
31491
|
-
|
|
31491
|
+
max2,
|
|
31492
31492
|
() => {
|
|
31493
31493
|
debug.log("Local variables rate-limit lifted.");
|
|
31494
31494
|
session.setPauseOnExceptions(true);
|
|
@@ -32099,8 +32099,8 @@ function parseProxyResponse(socket) {
|
|
|
32099
32099
|
let buffersLength = 0;
|
|
32100
32100
|
const buffers = [];
|
|
32101
32101
|
function read() {
|
|
32102
|
-
const
|
|
32103
|
-
if (
|
|
32102
|
+
const b3 = socket.read();
|
|
32103
|
+
if (b3) ondata(b3);
|
|
32104
32104
|
else socket.once("readable", read);
|
|
32105
32105
|
}
|
|
32106
32106
|
function cleanup() {
|
|
@@ -32113,14 +32113,14 @@ function parseProxyResponse(socket) {
|
|
|
32113
32113
|
debugLog("onend");
|
|
32114
32114
|
reject(new Error("Proxy connection ended before receiving CONNECT response"));
|
|
32115
32115
|
}
|
|
32116
|
-
function onerror(
|
|
32116
|
+
function onerror(err2) {
|
|
32117
32117
|
cleanup();
|
|
32118
|
-
debugLog("onerror %o",
|
|
32119
|
-
reject(
|
|
32118
|
+
debugLog("onerror %o", err2);
|
|
32119
|
+
reject(err2);
|
|
32120
32120
|
}
|
|
32121
|
-
function ondata(
|
|
32122
|
-
buffers.push(
|
|
32123
|
-
buffersLength +=
|
|
32121
|
+
function ondata(b3) {
|
|
32122
|
+
buffers.push(b3);
|
|
32123
|
+
buffersLength += b3.length;
|
|
32124
32124
|
const buffered = Buffer.concat(buffers, buffersLength);
|
|
32125
32125
|
const endOfHeaders = buffered.indexOf("\r\n\r\n");
|
|
32126
32126
|
if (endOfHeaders === -1) {
|
|
@@ -32925,9 +32925,9 @@ async function _startWorker(client, integrationOptions) {
|
|
|
32925
32925
|
getIsolationScope().setSession(void 0);
|
|
32926
32926
|
}
|
|
32927
32927
|
});
|
|
32928
|
-
worker.once("error", (
|
|
32928
|
+
worker.once("error", (err2) => {
|
|
32929
32929
|
clearInterval(timer);
|
|
32930
|
-
log3("ANR worker error",
|
|
32930
|
+
log3("ANR worker error", err2);
|
|
32931
32931
|
});
|
|
32932
32932
|
worker.once("exit", (code) => {
|
|
32933
32933
|
clearInterval(timer);
|
|
@@ -34171,18 +34171,18 @@ function startSpan3(reply, tracer, spanName, spanAttributes = {}) {
|
|
|
34171
34171
|
});
|
|
34172
34172
|
return span;
|
|
34173
34173
|
}
|
|
34174
|
-
function endSpan(reply,
|
|
34174
|
+
function endSpan(reply, err2) {
|
|
34175
34175
|
const spans = reply[spanRequestSymbol] || [];
|
|
34176
34176
|
if (!spans.length) {
|
|
34177
34177
|
return;
|
|
34178
34178
|
}
|
|
34179
34179
|
spans.forEach((span) => {
|
|
34180
|
-
if (
|
|
34180
|
+
if (err2) {
|
|
34181
34181
|
span.setStatus({
|
|
34182
34182
|
code: SpanStatusCode.ERROR,
|
|
34183
|
-
message:
|
|
34183
|
+
message: err2.message
|
|
34184
34184
|
});
|
|
34185
|
-
span.recordException(
|
|
34185
|
+
span.recordException(err2);
|
|
34186
34186
|
}
|
|
34187
34187
|
span.end();
|
|
34188
34188
|
});
|
|
@@ -34196,7 +34196,7 @@ function safeExecuteInTheMiddleMaybePromise(execute, onFinish, preventThrowingEr
|
|
|
34196
34196
|
if (isPromise2(result)) {
|
|
34197
34197
|
result.then(
|
|
34198
34198
|
(res) => onFinish(void 0, res),
|
|
34199
|
-
(
|
|
34199
|
+
(err2) => onFinish(err2)
|
|
34200
34200
|
);
|
|
34201
34201
|
}
|
|
34202
34202
|
} catch (e) {
|
|
@@ -34284,13 +34284,13 @@ var FastifyInstrumentationV3 = class extends InstrumentationBase {
|
|
|
34284
34284
|
() => {
|
|
34285
34285
|
return original.apply(this, args);
|
|
34286
34286
|
},
|
|
34287
|
-
(
|
|
34288
|
-
if (
|
|
34287
|
+
(err2) => {
|
|
34288
|
+
if (err2 instanceof Error) {
|
|
34289
34289
|
span.setStatus({
|
|
34290
34290
|
code: SpanStatusCode.ERROR,
|
|
34291
|
-
message:
|
|
34291
|
+
message: err2.message
|
|
34292
34292
|
});
|
|
34293
|
-
span.recordException(
|
|
34293
|
+
span.recordException(err2);
|
|
34294
34294
|
}
|
|
34295
34295
|
if (!syncFunctionWithDone) {
|
|
34296
34296
|
endSpan(reply);
|
|
@@ -34349,11 +34349,11 @@ var FastifyInstrumentationV3 = class extends InstrumentationBase {
|
|
|
34349
34349
|
() => {
|
|
34350
34350
|
return original.apply(this, args);
|
|
34351
34351
|
},
|
|
34352
|
-
(
|
|
34353
|
-
if (!
|
|
34354
|
-
|
|
34352
|
+
(err2) => {
|
|
34353
|
+
if (!err2 && maybeError instanceof Error) {
|
|
34354
|
+
err2 = maybeError;
|
|
34355
34355
|
}
|
|
34356
|
-
endSpan(this,
|
|
34356
|
+
endSpan(this, err2);
|
|
34357
34357
|
}
|
|
34358
34358
|
);
|
|
34359
34359
|
};
|
|
@@ -35339,8 +35339,8 @@ function asString(value) {
|
|
|
35339
35339
|
function asNumber(value) {
|
|
35340
35340
|
return typeof value === "number" && !isNaN(value) ? value : void 0;
|
|
35341
35341
|
}
|
|
35342
|
-
function sum(a,
|
|
35343
|
-
return a === void 0 &&
|
|
35342
|
+
function sum(a, b3) {
|
|
35343
|
+
return a === void 0 && b3 === void 0 ? void 0 : (a ?? 0) + (b3 ?? 0);
|
|
35344
35344
|
}
|
|
35345
35345
|
function isReadableStream(value) {
|
|
35346
35346
|
return isObjectLike(value) && typeof value.pipeThrough === "function" && typeof value.getReader === "function";
|
|
@@ -36130,9 +36130,9 @@ var instrumentFastify = Object.assign(
|
|
|
36130
36130
|
_isInstrumented = true;
|
|
36131
36131
|
diagnosticsChannel8.subscribe("fastify.initialization", (message) => {
|
|
36132
36132
|
const fastifyInstance = message.fastify;
|
|
36133
|
-
fastifyInstance?.register(fastifyOtelPlugin).after((
|
|
36134
|
-
if (
|
|
36135
|
-
DEBUG_BUILD5 && debug.error("Failed to setup Fastify instrumentation",
|
|
36133
|
+
fastifyInstance?.register(fastifyOtelPlugin).after((err2) => {
|
|
36134
|
+
if (err2) {
|
|
36135
|
+
DEBUG_BUILD5 && debug.error("Failed to setup Fastify instrumentation", err2);
|
|
36136
36136
|
} else if (fastifyInstance) {
|
|
36137
36137
|
instrumentOnRequest(fastifyInstance);
|
|
36138
36138
|
}
|
|
@@ -36507,13 +36507,13 @@ function isGraphQLUnionType(type) {
|
|
|
36507
36507
|
function isGraphQLObjectType(type) {
|
|
36508
36508
|
return "getFields" in type && typeof type.getFields === "function";
|
|
36509
36509
|
}
|
|
36510
|
-
var handleResolveSpanError = (resolveSpan,
|
|
36510
|
+
var handleResolveSpanError = (resolveSpan, err2, shouldEndSpan) => {
|
|
36511
36511
|
if (!shouldEndSpan) {
|
|
36512
36512
|
return;
|
|
36513
36513
|
}
|
|
36514
36514
|
resolveSpan.setStatus({
|
|
36515
36515
|
code: SPAN_STATUS_ERROR,
|
|
36516
|
-
message:
|
|
36516
|
+
message: err2.message
|
|
36517
36517
|
});
|
|
36518
36518
|
resolveSpan.end();
|
|
36519
36519
|
};
|
|
@@ -36554,18 +36554,18 @@ function wrapFieldResolver(getConfig3, fieldResolver, isDefaultResolver = false)
|
|
|
36554
36554
|
handleResolveSpanSuccess(span, shouldEndSpan);
|
|
36555
36555
|
return r;
|
|
36556
36556
|
},
|
|
36557
|
-
(
|
|
36558
|
-
handleResolveSpanError(span,
|
|
36559
|
-
throw
|
|
36557
|
+
(err2) => {
|
|
36558
|
+
handleResolveSpanError(span, err2, shouldEndSpan);
|
|
36559
|
+
throw err2;
|
|
36560
36560
|
}
|
|
36561
36561
|
);
|
|
36562
36562
|
} else {
|
|
36563
36563
|
handleResolveSpanSuccess(span, shouldEndSpan);
|
|
36564
36564
|
return res;
|
|
36565
36565
|
}
|
|
36566
|
-
} catch (
|
|
36567
|
-
handleResolveSpanError(span,
|
|
36568
|
-
throw
|
|
36566
|
+
} catch (err2) {
|
|
36567
|
+
handleResolveSpanError(span, err2, shouldEndSpan);
|
|
36568
|
+
throw err2;
|
|
36569
36569
|
}
|
|
36570
36570
|
});
|
|
36571
36571
|
}
|
|
@@ -36694,17 +36694,17 @@ var GraphQLInstrumentation = class extends InstrumentationBase {
|
|
|
36694
36694
|
() => {
|
|
36695
36695
|
return original.apply(this, [processedArgs]);
|
|
36696
36696
|
},
|
|
36697
|
-
(
|
|
36698
|
-
instrumentation._handleExecutionResult(span,
|
|
36697
|
+
(err2, result) => {
|
|
36698
|
+
instrumentation._handleExecutionResult(span, err2, result);
|
|
36699
36699
|
}
|
|
36700
36700
|
);
|
|
36701
36701
|
});
|
|
36702
36702
|
};
|
|
36703
36703
|
};
|
|
36704
36704
|
}
|
|
36705
|
-
_handleExecutionResult(span,
|
|
36706
|
-
if (result === void 0 ||
|
|
36707
|
-
endSpan3(span,
|
|
36705
|
+
_handleExecutionResult(span, err2, result) {
|
|
36706
|
+
if (result === void 0 || err2) {
|
|
36707
|
+
endSpan3(span, err2);
|
|
36708
36708
|
return;
|
|
36709
36709
|
}
|
|
36710
36710
|
if (isPromise3(result)) {
|
|
@@ -36784,7 +36784,7 @@ var GraphQLInstrumentation = class extends InstrumentationBase {
|
|
|
36784
36784
|
() => {
|
|
36785
36785
|
return original.call(obj, source, options);
|
|
36786
36786
|
},
|
|
36787
|
-
(
|
|
36787
|
+
(err2, result) => {
|
|
36788
36788
|
if (result) {
|
|
36789
36789
|
const operation = getOperation(result);
|
|
36790
36790
|
if (!operation) {
|
|
@@ -36793,7 +36793,7 @@ var GraphQLInstrumentation = class extends InstrumentationBase {
|
|
|
36793
36793
|
addSpanSource(span, result.loc);
|
|
36794
36794
|
}
|
|
36795
36795
|
}
|
|
36796
|
-
endSpan3(span,
|
|
36796
|
+
endSpan3(span, err2);
|
|
36797
36797
|
}
|
|
36798
36798
|
);
|
|
36799
36799
|
});
|
|
@@ -36805,11 +36805,11 @@ var GraphQLInstrumentation = class extends InstrumentationBase {
|
|
|
36805
36805
|
() => {
|
|
36806
36806
|
return original.call(obj, schema, documentAST, rules, options, typeInfo);
|
|
36807
36807
|
},
|
|
36808
|
-
(
|
|
36808
|
+
(err2, _errors) => {
|
|
36809
36809
|
if (!documentAST.loc) {
|
|
36810
36810
|
span.updateName(SpanNames.SCHEMA_VALIDATE);
|
|
36811
36811
|
}
|
|
36812
|
-
endSpan3(span,
|
|
36812
|
+
endSpan3(span, err2);
|
|
36813
36813
|
}
|
|
36814
36814
|
);
|
|
36815
36815
|
});
|
|
@@ -37180,12 +37180,12 @@ var KafkaJsInstrumentation = class extends InstrumentationBase {
|
|
|
37180
37180
|
transaction2.send = function send(...args2) {
|
|
37181
37181
|
return withActiveSpan(transactionSpan, () => {
|
|
37182
37182
|
const patched = instrumentation._getSendPatch()(originalSend);
|
|
37183
|
-
return patched.apply(this, args2).catch((
|
|
37183
|
+
return patched.apply(this, args2).catch((err2) => {
|
|
37184
37184
|
transactionSpan.setStatus({
|
|
37185
37185
|
code: SPAN_STATUS_ERROR,
|
|
37186
|
-
message:
|
|
37186
|
+
message: err2?.message
|
|
37187
37187
|
});
|
|
37188
|
-
throw
|
|
37188
|
+
throw err2;
|
|
37189
37189
|
});
|
|
37190
37190
|
});
|
|
37191
37191
|
};
|
|
@@ -37193,12 +37193,12 @@ var KafkaJsInstrumentation = class extends InstrumentationBase {
|
|
|
37193
37193
|
transaction2.sendBatch = function sendBatch(...args2) {
|
|
37194
37194
|
return withActiveSpan(transactionSpan, () => {
|
|
37195
37195
|
const patched = instrumentation._getSendBatchPatch()(originalSendBatch);
|
|
37196
|
-
return patched.apply(this, args2).catch((
|
|
37196
|
+
return patched.apply(this, args2).catch((err2) => {
|
|
37197
37197
|
transactionSpan.setStatus({
|
|
37198
37198
|
code: SPAN_STATUS_ERROR,
|
|
37199
|
-
message:
|
|
37199
|
+
message: err2?.message
|
|
37200
37200
|
});
|
|
37201
|
-
throw
|
|
37201
|
+
throw err2;
|
|
37202
37202
|
});
|
|
37203
37203
|
});
|
|
37204
37204
|
};
|
|
@@ -37214,10 +37214,10 @@ var KafkaJsInstrumentation = class extends InstrumentationBase {
|
|
|
37214
37214
|
const originAbortPromise = originalAbort.apply(this, args2);
|
|
37215
37215
|
return endSpansOnPromise([transactionSpan], originAbortPromise);
|
|
37216
37216
|
};
|
|
37217
|
-
}).catch((
|
|
37217
|
+
}).catch((err2) => {
|
|
37218
37218
|
transactionSpan.setStatus({
|
|
37219
37219
|
code: SPAN_STATUS_ERROR,
|
|
37220
|
-
message:
|
|
37220
|
+
message: err2?.message
|
|
37221
37221
|
});
|
|
37222
37222
|
transactionSpan.end();
|
|
37223
37223
|
});
|
|
@@ -37548,7 +37548,7 @@ function getV4PatchCommandPromise() {
|
|
|
37548
37548
|
const result = original.apply(this, args);
|
|
37549
37549
|
result.then(
|
|
37550
37550
|
(res) => patchedCallback(null, res),
|
|
37551
|
-
(
|
|
37551
|
+
(err2) => patchedCallback(err2)
|
|
37552
37552
|
);
|
|
37553
37553
|
return result;
|
|
37554
37554
|
};
|
|
@@ -37770,9 +37770,9 @@ function handlePromiseResponse(execResponse, span) {
|
|
|
37770
37770
|
span.end();
|
|
37771
37771
|
return execResponse;
|
|
37772
37772
|
}
|
|
37773
|
-
return execResponse.catch((
|
|
37774
|
-
setErrorStatus(span,
|
|
37775
|
-
throw
|
|
37773
|
+
return execResponse.catch((err2) => {
|
|
37774
|
+
setErrorStatus(span, err2);
|
|
37775
|
+
throw err2;
|
|
37776
37776
|
}).finally(() => span.end());
|
|
37777
37777
|
}
|
|
37778
37778
|
function handleCallbackResponse(callback, exec, originalThis, span, args) {
|
|
@@ -37782,12 +37782,12 @@ function handleCallbackResponse(callback, exec, originalThis, span, args) {
|
|
|
37782
37782
|
} else if (args.length === 3) {
|
|
37783
37783
|
callbackArgumentIndex = 2;
|
|
37784
37784
|
}
|
|
37785
|
-
args[callbackArgumentIndex] = (
|
|
37786
|
-
if (
|
|
37787
|
-
setErrorStatus(span,
|
|
37785
|
+
args[callbackArgumentIndex] = (err2, response) => {
|
|
37786
|
+
if (err2) {
|
|
37787
|
+
setErrorStatus(span, err2);
|
|
37788
37788
|
}
|
|
37789
37789
|
span.end();
|
|
37790
|
-
return callback(
|
|
37790
|
+
return callback(err2, response);
|
|
37791
37791
|
};
|
|
37792
37792
|
return exec.apply(originalThis, args);
|
|
37793
37793
|
}
|
|
@@ -38159,14 +38159,14 @@ var MySQLInstrumentation = class extends InstrumentationBase {
|
|
|
38159
38159
|
_getConnectionCallbackPatchFn(cb) {
|
|
38160
38160
|
const thisPlugin = this;
|
|
38161
38161
|
const scope = getCurrentScope();
|
|
38162
|
-
return function(
|
|
38162
|
+
return function(err2, connection) {
|
|
38163
38163
|
if (connection) {
|
|
38164
38164
|
if (!isWrapped(connection.query)) {
|
|
38165
38165
|
thisPlugin._wrap(connection, "query", thisPlugin._patchQuery(connection));
|
|
38166
38166
|
}
|
|
38167
38167
|
}
|
|
38168
38168
|
if (typeof cb === "function") {
|
|
38169
|
-
withScope2(scope, () => cb.call(this,
|
|
38169
|
+
withScope2(scope, () => cb.call(this, err2, connection));
|
|
38170
38170
|
}
|
|
38171
38171
|
};
|
|
38172
38172
|
}
|
|
@@ -38204,10 +38204,10 @@ var MySQLInstrumentation = class extends InstrumentationBase {
|
|
|
38204
38204
|
return originalQuery.apply(connection, arguments);
|
|
38205
38205
|
});
|
|
38206
38206
|
bindScopeToEmitter(streamableQuery, scope);
|
|
38207
|
-
return streamableQuery.on("error", (
|
|
38207
|
+
return streamableQuery.on("error", (err2) => {
|
|
38208
38208
|
span.setStatus({
|
|
38209
38209
|
code: SPAN_STATUS_ERROR,
|
|
38210
|
-
message:
|
|
38210
|
+
message: err2.message
|
|
38211
38211
|
});
|
|
38212
38212
|
}).on("end", () => {
|
|
38213
38213
|
span.end();
|
|
@@ -38223,11 +38223,11 @@ var MySQLInstrumentation = class extends InstrumentationBase {
|
|
|
38223
38223
|
}
|
|
38224
38224
|
_patchCallbackQuery(span, scope) {
|
|
38225
38225
|
return (originalCallback) => {
|
|
38226
|
-
return function(
|
|
38227
|
-
if (
|
|
38226
|
+
return function(err2, _results, _fields) {
|
|
38227
|
+
if (err2) {
|
|
38228
38228
|
span.setStatus({
|
|
38229
38229
|
code: SPAN_STATUS_ERROR,
|
|
38230
|
-
message:
|
|
38230
|
+
message: err2.message
|
|
38231
38231
|
});
|
|
38232
38232
|
}
|
|
38233
38233
|
span.end();
|
|
@@ -38416,9 +38416,9 @@ var MySQL2Instrumentation = class extends InstrumentationBase {
|
|
|
38416
38416
|
kind: SPAN_KIND.CLIENT,
|
|
38417
38417
|
attributes
|
|
38418
38418
|
});
|
|
38419
|
-
const endSpan7 = once((
|
|
38420
|
-
if (
|
|
38421
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
38419
|
+
const endSpan7 = once((err2) => {
|
|
38420
|
+
if (err2) {
|
|
38421
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2.message });
|
|
38422
38422
|
}
|
|
38423
38423
|
span.end();
|
|
38424
38424
|
});
|
|
@@ -38427,8 +38427,8 @@ var MySQL2Instrumentation = class extends InstrumentationBase {
|
|
|
38427
38427
|
thisPlugin._wrap(query, "onResult", thisPlugin._patchCallbackQuery(endSpan7));
|
|
38428
38428
|
}
|
|
38429
38429
|
const streamableQuery = originalQuery.apply(this, arguments);
|
|
38430
|
-
streamableQuery.once("error", (
|
|
38431
|
-
endSpan7(
|
|
38430
|
+
streamableQuery.once("error", (err2) => {
|
|
38431
|
+
endSpan7(err2);
|
|
38432
38432
|
}).once("result", () => {
|
|
38433
38433
|
endSpan7();
|
|
38434
38434
|
});
|
|
@@ -38612,9 +38612,9 @@ var DB_SYSTEM_VALUE_REDIS = "redis";
|
|
|
38612
38612
|
var PACKAGE_NAME10 = "@sentry/instrumentation-ioredis";
|
|
38613
38613
|
var ORIGIN12 = "auto.db.otel.redis";
|
|
38614
38614
|
var SUPPORTED_VERSIONS3 = [">=2.0.0 <5.11.0"];
|
|
38615
|
-
function endSpan4(span,
|
|
38616
|
-
if (
|
|
38617
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
38615
|
+
function endSpan4(span, err2) {
|
|
38616
|
+
if (err2) {
|
|
38617
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2.message });
|
|
38618
38618
|
}
|
|
38619
38619
|
span.end();
|
|
38620
38620
|
}
|
|
@@ -38679,9 +38679,9 @@ var IORedisInstrumentation = class extends InstrumentationBase {
|
|
|
38679
38679
|
origResolve(response);
|
|
38680
38680
|
};
|
|
38681
38681
|
const origReject = cmd.reject;
|
|
38682
|
-
cmd.reject = function(
|
|
38683
|
-
endSpan4(span,
|
|
38684
|
-
origReject(
|
|
38682
|
+
cmd.reject = function(err2) {
|
|
38683
|
+
endSpan4(span, err2);
|
|
38684
|
+
origReject(err2);
|
|
38685
38685
|
};
|
|
38686
38686
|
return result;
|
|
38687
38687
|
} catch (error62) {
|
|
@@ -38751,9 +38751,9 @@ var PACKAGE_NAME11 = "@sentry/instrumentation-redis";
|
|
|
38751
38751
|
var ORIGIN13 = "auto.db.otel.redis";
|
|
38752
38752
|
var OTEL_OPEN_SPANS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.open_spans");
|
|
38753
38753
|
var MULTI_COMMAND_OPTIONS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.multi_command_options");
|
|
38754
|
-
function endSpan5(span,
|
|
38755
|
-
if (
|
|
38756
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
38754
|
+
function endSpan5(span, err2) {
|
|
38755
|
+
if (err2) {
|
|
38756
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2.message });
|
|
38757
38757
|
}
|
|
38758
38758
|
span.end();
|
|
38759
38759
|
}
|
|
@@ -38776,8 +38776,8 @@ function removeCredentialsFromDBConnectionStringAttribute(url2) {
|
|
|
38776
38776
|
u.username = "";
|
|
38777
38777
|
u.password = "";
|
|
38778
38778
|
return u.href;
|
|
38779
|
-
} catch (
|
|
38780
|
-
DEBUG_BUILD4 && debug.error("failed to sanitize redis connection url",
|
|
38779
|
+
} catch (err2) {
|
|
38780
|
+
DEBUG_BUILD4 && debug.error("failed to sanitize redis connection url", err2);
|
|
38781
38781
|
}
|
|
38782
38782
|
return void 0;
|
|
38783
38783
|
}
|
|
@@ -38845,9 +38845,9 @@ var _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V32 extends Instr
|
|
|
38845
38845
|
const originalCallback = arguments[0].callback;
|
|
38846
38846
|
if (originalCallback) {
|
|
38847
38847
|
const parentSpan = getActiveSpan();
|
|
38848
|
-
arguments[0].callback = function callback(
|
|
38848
|
+
arguments[0].callback = function callback(err2, reply) {
|
|
38849
38849
|
runResponseHook2(instrumentation.getConfig().responseHook, span, cmd.command, cmd.args, reply);
|
|
38850
|
-
endSpan5(span,
|
|
38850
|
+
endSpan5(span, err2);
|
|
38851
38851
|
return withActiveSpan(parentSpan ?? null, () => originalCallback.apply(this, arguments));
|
|
38852
38852
|
};
|
|
38853
38853
|
}
|
|
@@ -39012,15 +39012,15 @@ var _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V52 extends Instr
|
|
|
39012
39012
|
const openSpans = this[OTEL_OPEN_SPANS];
|
|
39013
39013
|
plugin._endSpansWithRedisReplies(openSpans, redisRes);
|
|
39014
39014
|
return redisRes;
|
|
39015
|
-
}).catch((
|
|
39015
|
+
}).catch((err2) => {
|
|
39016
39016
|
const openSpans = this[OTEL_OPEN_SPANS];
|
|
39017
39017
|
if (!openSpans) {
|
|
39018
39018
|
DEBUG_BUILD4 && debug.error("cannot find open spans to end for multi/pipeline");
|
|
39019
39019
|
} else {
|
|
39020
|
-
const replies =
|
|
39020
|
+
const replies = err2.constructor.name === "MultiErrorReply" ? err2.replies : new Array(openSpans.length).fill(err2);
|
|
39021
39021
|
plugin._endSpansWithRedisReplies(openSpans, replies);
|
|
39022
39022
|
}
|
|
39023
|
-
return Promise.reject(
|
|
39023
|
+
return Promise.reject(err2);
|
|
39024
39024
|
});
|
|
39025
39025
|
};
|
|
39026
39026
|
};
|
|
@@ -39093,8 +39093,8 @@ var _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V52 extends Instr
|
|
|
39093
39093
|
(redisRes) => {
|
|
39094
39094
|
this._endSpanWithResponse(span, commandName, commandArgs, redisRes, void 0);
|
|
39095
39095
|
},
|
|
39096
|
-
(
|
|
39097
|
-
this._endSpanWithResponse(span, commandName, commandArgs, null,
|
|
39096
|
+
(err2) => {
|
|
39097
|
+
this._endSpanWithResponse(span, commandName, commandArgs, null, err2);
|
|
39098
39098
|
}
|
|
39099
39099
|
);
|
|
39100
39100
|
} else {
|
|
@@ -39120,8 +39120,8 @@ var _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V52 extends Instr
|
|
|
39120
39120
|
for (let i = 0; i < openSpans.length; i++) {
|
|
39121
39121
|
const { span, commandName, commandArgs } = openSpans[i];
|
|
39122
39122
|
const currCommandRes = replies[i];
|
|
39123
|
-
const [res,
|
|
39124
|
-
this._endSpanWithResponse(span, commandName, commandArgs, res,
|
|
39123
|
+
const [res, err2] = currCommandRes instanceof Error ? [null, currCommandRes] : [currCommandRes, void 0];
|
|
39124
|
+
this._endSpanWithResponse(span, commandName, commandArgs, res, err2);
|
|
39125
39125
|
}
|
|
39126
39126
|
}
|
|
39127
39127
|
_endSpanWithResponse(span, commandName, commandArgs, response, error62) {
|
|
@@ -39327,28 +39327,28 @@ function handleConfigQuery(queryConfig) {
|
|
|
39327
39327
|
return span;
|
|
39328
39328
|
}
|
|
39329
39329
|
function patchCallback(span, cb) {
|
|
39330
|
-
return function patchedCallback(
|
|
39331
|
-
if (
|
|
39332
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
39330
|
+
return function patchedCallback(err2, res) {
|
|
39331
|
+
if (err2) {
|
|
39332
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2.message });
|
|
39333
39333
|
}
|
|
39334
39334
|
span.end();
|
|
39335
|
-
cb.call(this,
|
|
39335
|
+
cb.call(this, err2, res);
|
|
39336
39336
|
};
|
|
39337
39337
|
}
|
|
39338
39338
|
function patchCallbackPGPool(span, cb) {
|
|
39339
|
-
return function patchedCallback(
|
|
39340
|
-
if (
|
|
39341
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
39339
|
+
return function patchedCallback(err2, res, done) {
|
|
39340
|
+
if (err2) {
|
|
39341
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2.message });
|
|
39342
39342
|
}
|
|
39343
39343
|
span.end();
|
|
39344
|
-
cb.call(this,
|
|
39344
|
+
cb.call(this, err2, res, done);
|
|
39345
39345
|
};
|
|
39346
39346
|
}
|
|
39347
39347
|
function patchClientConnectCallback(span, cb) {
|
|
39348
39348
|
return function patchedClientConnectCallback(...args) {
|
|
39349
|
-
const
|
|
39350
|
-
if (
|
|
39351
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
39349
|
+
const err2 = args[0];
|
|
39350
|
+
if (err2 instanceof Error) {
|
|
39351
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2.message });
|
|
39352
39352
|
}
|
|
39353
39353
|
span.end();
|
|
39354
39354
|
cb.apply(this, args);
|
|
@@ -39723,7 +39723,7 @@ var PostgresJsInstrumentation = class extends InstrumentationBase {
|
|
|
39723
39723
|
if (strings.length === 1) {
|
|
39724
39724
|
return strings[0] || void 0;
|
|
39725
39725
|
}
|
|
39726
|
-
return strings.reduce((acc,
|
|
39726
|
+
return strings.reduce((acc, str2, i) => i === 0 ? str2 : `${acc}$${i}${str2}`, "");
|
|
39727
39727
|
}
|
|
39728
39728
|
/**
|
|
39729
39729
|
* Sanitize SQL query as per the OTEL semantic conventions
|
|
@@ -40782,11 +40782,11 @@ var ConnectInstrumentation = class extends InstrumentationBase {
|
|
|
40782
40782
|
};
|
|
40783
40783
|
}
|
|
40784
40784
|
_patchNext(next, span, finishSpan) {
|
|
40785
|
-
return function nextFunction(
|
|
40786
|
-
if (isError(
|
|
40785
|
+
return function nextFunction(err2) {
|
|
40786
|
+
if (isError(err2)) {
|
|
40787
40787
|
span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
|
|
40788
40788
|
}
|
|
40789
|
-
const result = next.apply(this, [
|
|
40789
|
+
const result = next.apply(this, [err2]);
|
|
40790
40790
|
finishSpan();
|
|
40791
40791
|
return result;
|
|
40792
40792
|
};
|
|
@@ -40890,14 +40890,14 @@ var _connectIntegration = (() => {
|
|
|
40890
40890
|
};
|
|
40891
40891
|
});
|
|
40892
40892
|
var connectIntegration = defineIntegration(_connectIntegration);
|
|
40893
|
-
function connectErrorMiddleware(
|
|
40894
|
-
captureException(
|
|
40893
|
+
function connectErrorMiddleware(err2, req, res, next) {
|
|
40894
|
+
captureException(err2, {
|
|
40895
40895
|
mechanism: {
|
|
40896
40896
|
handled: false,
|
|
40897
40897
|
type: "auto.middleware.connect"
|
|
40898
40898
|
}
|
|
40899
40899
|
});
|
|
40900
|
-
next(
|
|
40900
|
+
next(err2);
|
|
40901
40901
|
}
|
|
40902
40902
|
var setupConnectErrorHandler = (app) => {
|
|
40903
40903
|
app.use(connectErrorMiddleware);
|
|
@@ -40941,11 +40941,11 @@ var getName = (db, operation, table) => {
|
|
|
40941
40941
|
}
|
|
40942
40942
|
return db;
|
|
40943
40943
|
};
|
|
40944
|
-
var limitLength = (
|
|
40945
|
-
if (typeof
|
|
40946
|
-
return `${
|
|
40944
|
+
var limitLength = (str2, maxLength) => {
|
|
40945
|
+
if (typeof str2 === "string" && typeof maxLength === "number" && 0 < maxLength && maxLength < str2.length) {
|
|
40946
|
+
return `${str2.substring(0, maxLength)}..`;
|
|
40947
40947
|
}
|
|
40948
|
-
return
|
|
40948
|
+
return str2;
|
|
40949
40949
|
};
|
|
40950
40950
|
var extractDatabaseFromConnectionString = (connectionString) => {
|
|
40951
40951
|
if (!connectionString) return void 0;
|
|
@@ -41077,12 +41077,12 @@ var KnexInstrumentation = class extends InstrumentationBase {
|
|
|
41077
41077
|
(span) => (
|
|
41078
41078
|
// `Runner.query` returns a real, already-executing Promise, so it is safe to let
|
|
41079
41079
|
// `startSpan` await it and auto-end the span.
|
|
41080
|
-
original.apply(this, args).catch((
|
|
41080
|
+
original.apply(this, args).catch((err2) => {
|
|
41081
41081
|
const formatter = getFormatter(this);
|
|
41082
41082
|
const fullQuery = formatter(query.sql, query.bindings || []);
|
|
41083
|
-
const message =
|
|
41083
|
+
const message = err2.message.replace(`${fullQuery} - `, "");
|
|
41084
41084
|
span.setStatus({ code: SPAN_STATUS_ERROR, message });
|
|
41085
|
-
throw
|
|
41085
|
+
throw err2;
|
|
41086
41086
|
})
|
|
41087
41087
|
)
|
|
41088
41088
|
);
|
|
@@ -42801,17 +42801,17 @@ function wrapFieldResolver2(getConfig3, fieldResolver, isDefaultResolver = false
|
|
|
42801
42801
|
endResolveSpan(span, spanAdded);
|
|
42802
42802
|
return r;
|
|
42803
42803
|
},
|
|
42804
|
-
(
|
|
42805
|
-
endResolveSpan(span, spanAdded,
|
|
42806
|
-
throw
|
|
42804
|
+
(err2) => {
|
|
42805
|
+
endResolveSpan(span, spanAdded, err2);
|
|
42806
|
+
throw err2;
|
|
42807
42807
|
}
|
|
42808
42808
|
);
|
|
42809
42809
|
}
|
|
42810
42810
|
endResolveSpan(span, spanAdded);
|
|
42811
42811
|
return res;
|
|
42812
|
-
} catch (
|
|
42813
|
-
endResolveSpan(span, spanAdded,
|
|
42814
|
-
throw
|
|
42812
|
+
} catch (err2) {
|
|
42813
|
+
endResolveSpan(span, spanAdded, err2);
|
|
42814
|
+
throw err2;
|
|
42815
42815
|
}
|
|
42816
42816
|
});
|
|
42817
42817
|
}
|
|
@@ -43891,7 +43891,7 @@ var _mysqlChannelIntegration = (() => {
|
|
|
43891
43891
|
if (callerScope) {
|
|
43892
43892
|
bindScopeToEmitter(result, callerScope);
|
|
43893
43893
|
}
|
|
43894
|
-
result.on("error", (
|
|
43894
|
+
result.on("error", (err2) => end(err2));
|
|
43895
43895
|
result.on("end", () => end());
|
|
43896
43896
|
return true;
|
|
43897
43897
|
}
|
|
@@ -44151,7 +44151,7 @@ function subscribeQueryLikeChannel(channelName, getSpanOptions2, { deferStreamed
|
|
|
44151
44151
|
if (callerScope) {
|
|
44152
44152
|
bindScopeToEmitter(result, callerScope);
|
|
44153
44153
|
}
|
|
44154
|
-
result.on("error", (
|
|
44154
|
+
result.on("error", (err2) => end(err2));
|
|
44155
44155
|
result.on("end", () => end());
|
|
44156
44156
|
return true;
|
|
44157
44157
|
}
|
|
@@ -44327,10 +44327,10 @@ function wrapQuerySettlement(data, span, sanitizedSqlQuery) {
|
|
|
44327
44327
|
query.reject = function(...rejectArgs) {
|
|
44328
44328
|
markEnded();
|
|
44329
44329
|
try {
|
|
44330
|
-
const
|
|
44331
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
44332
|
-
span.setAttribute(DB_RESPONSE_STATUS_CODE,
|
|
44333
|
-
span.setAttribute(Gn,
|
|
44330
|
+
const err2 = rejectArgs[0];
|
|
44331
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2?.message || "unknown_error" });
|
|
44332
|
+
span.setAttribute(DB_RESPONSE_STATUS_CODE, err2?.code || "unknown");
|
|
44333
|
+
span.setAttribute(Gn, err2?.name || "unknown");
|
|
44334
44334
|
_setOperationName(span, sanitizedSqlQuery);
|
|
44335
44335
|
span.end();
|
|
44336
44336
|
} catch (e) {
|
|
@@ -45100,9 +45100,9 @@ var INTEGRATION_NAME67 = "RedisChannel";
|
|
|
45100
45100
|
var ORIGIN27 = "auto.db.orchestrion.redis";
|
|
45101
45101
|
var ATTR_DB_CONNECTION_STRING9 = "db.connection_string";
|
|
45102
45102
|
var DB_SYSTEM_VALUE_REDIS2 = "redis";
|
|
45103
|
-
function endSpan6(span,
|
|
45104
|
-
if (
|
|
45105
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message:
|
|
45103
|
+
function endSpan6(span, err2) {
|
|
45104
|
+
if (err2) {
|
|
45105
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err2 instanceof Error ? err2.message : String(err2) });
|
|
45106
45106
|
}
|
|
45107
45107
|
span.end();
|
|
45108
45108
|
}
|
|
@@ -45186,11 +45186,11 @@ function subscribeLegacyRedisCommand(responseHook) {
|
|
|
45186
45186
|
const span = startCommandSpan(command.command, command.args ?? [], attributes);
|
|
45187
45187
|
data._sentrySpan = span;
|
|
45188
45188
|
const parentSpan = getActiveSpan();
|
|
45189
|
-
command.callback = function(
|
|
45190
|
-
if (!
|
|
45189
|
+
command.callback = function(err2, reply) {
|
|
45190
|
+
if (!err2) {
|
|
45191
45191
|
runResponseHook4(responseHook, span, command.command, command.args ?? [], reply);
|
|
45192
45192
|
}
|
|
45193
|
-
endSpan6(span,
|
|
45193
|
+
endSpan6(span, err2);
|
|
45194
45194
|
const args = arguments;
|
|
45195
45195
|
return withActiveSpan(parentSpan ?? null, () => originalCallback.apply(this, args));
|
|
45196
45196
|
};
|
|
@@ -45476,7 +45476,7 @@ var _TediousInstrumentation = class _TediousInstrumentation2 extends Instrumenta
|
|
|
45476
45476
|
kind: SPAN_KIND.CLIENT,
|
|
45477
45477
|
attributes
|
|
45478
45478
|
});
|
|
45479
|
-
const endSpan7 = once2((
|
|
45479
|
+
const endSpan7 = once2((err2) => {
|
|
45480
45480
|
request2.removeListener("done", incrementStatementCount);
|
|
45481
45481
|
request2.removeListener("doneInProc", incrementStatementCount);
|
|
45482
45482
|
request2.removeListener("doneProc", incrementProcCount);
|
|
@@ -45484,10 +45484,10 @@ var _TediousInstrumentation = class _TediousInstrumentation2 extends Instrumenta
|
|
|
45484
45484
|
this.removeListener("end", endSpan7);
|
|
45485
45485
|
span.setAttribute("tedious.procedure_count", procCount);
|
|
45486
45486
|
span.setAttribute("tedious.statement_count", statementCount);
|
|
45487
|
-
if (
|
|
45487
|
+
if (err2) {
|
|
45488
45488
|
span.setStatus({
|
|
45489
45489
|
code: SPAN_STATUS_ERROR,
|
|
45490
|
-
message:
|
|
45490
|
+
message: err2.message
|
|
45491
45491
|
});
|
|
45492
45492
|
}
|
|
45493
45493
|
span.end();
|
|
@@ -45513,8 +45513,8 @@ var _TediousInstrumentation = class _TediousInstrumentation2 extends Instrumenta
|
|
|
45513
45513
|
}
|
|
45514
45514
|
_patchCallbackQuery(endSpan7) {
|
|
45515
45515
|
return (originalCallback) => {
|
|
45516
|
-
return function(
|
|
45517
|
-
endSpan7(
|
|
45516
|
+
return function(err2, _rowCount, _rows) {
|
|
45517
|
+
endSpan7(err2);
|
|
45518
45518
|
return originalCallback.apply(this, arguments);
|
|
45519
45519
|
};
|
|
45520
45520
|
};
|
|
@@ -45634,13 +45634,13 @@ var GenericPoolInstrumentation = class extends InstrumentationBase {
|
|
|
45634
45634
|
(span) => {
|
|
45635
45635
|
original.call(
|
|
45636
45636
|
this,
|
|
45637
|
-
(
|
|
45638
|
-
if (
|
|
45637
|
+
(err2, client) => {
|
|
45638
|
+
if (err2) {
|
|
45639
45639
|
span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
|
|
45640
45640
|
}
|
|
45641
45641
|
span.end();
|
|
45642
45642
|
if (cb) {
|
|
45643
|
-
cb(
|
|
45643
|
+
cb(err2, client);
|
|
45644
45644
|
}
|
|
45645
45645
|
},
|
|
45646
45646
|
priority
|
|
@@ -46069,8 +46069,8 @@ function checkConsumeTimeoutOnChannel2(channel3) {
|
|
|
46069
46069
|
}
|
|
46070
46070
|
function getConnectPatch(original) {
|
|
46071
46071
|
return function patchedConnect(url2, socketOptions, openCallback) {
|
|
46072
|
-
return original.call(this, url2, socketOptions, function(
|
|
46073
|
-
if (
|
|
46072
|
+
return original.call(this, url2, socketOptions, function(err2, conn) {
|
|
46073
|
+
if (err2 == null) {
|
|
46074
46074
|
const urlAttributes = getConnectionAttributesFromUrl2(url2);
|
|
46075
46075
|
const serverAttributes = getConnectionAttributesFromServer2(conn);
|
|
46076
46076
|
conn[CONNECTION_ATTRIBUTES2] = {
|
|
@@ -46164,13 +46164,13 @@ function getConfirmedPublishPatch(original) {
|
|
|
46164
46164
|
return function confirmedPublish(exchange, routingKey, content, options, callback) {
|
|
46165
46165
|
const channel3 = this;
|
|
46166
46166
|
const { span, modifiedOptions } = startPublishSpan2(exchange, routingKey, channel3, options);
|
|
46167
|
-
const patchedOnConfirm = function(
|
|
46167
|
+
const patchedOnConfirm = function(err2, ok) {
|
|
46168
46168
|
try {
|
|
46169
46169
|
withActiveSpan(span, () => {
|
|
46170
|
-
callback?.call(this,
|
|
46170
|
+
callback?.call(this, err2, ok);
|
|
46171
46171
|
});
|
|
46172
46172
|
} finally {
|
|
46173
|
-
if (
|
|
46173
|
+
if (err2) {
|
|
46174
46174
|
span.setStatus({ code: SPAN_STATUS_ERROR, message: "message confirmation has been nack'ed" });
|
|
46175
46175
|
}
|
|
46176
46176
|
span.end();
|
|
@@ -48452,9 +48452,9 @@ var emitError = (mode, envelope) => {
|
|
|
48452
48452
|
var exitWith = (code) => {
|
|
48453
48453
|
try {
|
|
48454
48454
|
process.exit(code);
|
|
48455
|
-
} catch (
|
|
48455
|
+
} catch (err2) {
|
|
48456
48456
|
process.exitCode = code;
|
|
48457
|
-
throw
|
|
48457
|
+
throw err2;
|
|
48458
48458
|
}
|
|
48459
48459
|
return void 0;
|
|
48460
48460
|
};
|
|
@@ -48465,7 +48465,492 @@ var exitOnBrokenPipe = (error62) => {
|
|
|
48465
48465
|
};
|
|
48466
48466
|
|
|
48467
48467
|
// ../sdk/dist/index.js
|
|
48468
|
+
import { createRequire as createRequire3 } from "module";
|
|
48469
|
+
|
|
48470
|
+
// ../../node_modules/fflate/esm/index.mjs
|
|
48468
48471
|
import { createRequire as createRequire2 } from "module";
|
|
48472
|
+
var require2 = createRequire2("/");
|
|
48473
|
+
var _a2;
|
|
48474
|
+
var Worker3;
|
|
48475
|
+
var isMarkedAsUntransferable;
|
|
48476
|
+
try {
|
|
48477
|
+
_a2 = require2("worker_threads"), Worker3 = _a2.Worker, isMarkedAsUntransferable = _a2.isMarkedAsUntransferable;
|
|
48478
|
+
} catch (e) {
|
|
48479
|
+
}
|
|
48480
|
+
var u8 = Uint8Array;
|
|
48481
|
+
var u16 = Uint16Array;
|
|
48482
|
+
var i32 = Int32Array;
|
|
48483
|
+
var fleb = new u8([
|
|
48484
|
+
0,
|
|
48485
|
+
0,
|
|
48486
|
+
0,
|
|
48487
|
+
0,
|
|
48488
|
+
0,
|
|
48489
|
+
0,
|
|
48490
|
+
0,
|
|
48491
|
+
0,
|
|
48492
|
+
1,
|
|
48493
|
+
1,
|
|
48494
|
+
1,
|
|
48495
|
+
1,
|
|
48496
|
+
2,
|
|
48497
|
+
2,
|
|
48498
|
+
2,
|
|
48499
|
+
2,
|
|
48500
|
+
3,
|
|
48501
|
+
3,
|
|
48502
|
+
3,
|
|
48503
|
+
3,
|
|
48504
|
+
4,
|
|
48505
|
+
4,
|
|
48506
|
+
4,
|
|
48507
|
+
4,
|
|
48508
|
+
5,
|
|
48509
|
+
5,
|
|
48510
|
+
5,
|
|
48511
|
+
5,
|
|
48512
|
+
0,
|
|
48513
|
+
/* unused */
|
|
48514
|
+
0,
|
|
48515
|
+
0,
|
|
48516
|
+
/* impossible */
|
|
48517
|
+
0
|
|
48518
|
+
]);
|
|
48519
|
+
var fdeb = new u8([
|
|
48520
|
+
0,
|
|
48521
|
+
0,
|
|
48522
|
+
0,
|
|
48523
|
+
0,
|
|
48524
|
+
1,
|
|
48525
|
+
1,
|
|
48526
|
+
2,
|
|
48527
|
+
2,
|
|
48528
|
+
3,
|
|
48529
|
+
3,
|
|
48530
|
+
4,
|
|
48531
|
+
4,
|
|
48532
|
+
5,
|
|
48533
|
+
5,
|
|
48534
|
+
6,
|
|
48535
|
+
6,
|
|
48536
|
+
7,
|
|
48537
|
+
7,
|
|
48538
|
+
8,
|
|
48539
|
+
8,
|
|
48540
|
+
9,
|
|
48541
|
+
9,
|
|
48542
|
+
10,
|
|
48543
|
+
10,
|
|
48544
|
+
11,
|
|
48545
|
+
11,
|
|
48546
|
+
12,
|
|
48547
|
+
12,
|
|
48548
|
+
13,
|
|
48549
|
+
13,
|
|
48550
|
+
/* unused */
|
|
48551
|
+
0,
|
|
48552
|
+
0
|
|
48553
|
+
]);
|
|
48554
|
+
var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
|
48555
|
+
var freb = function(eb, start) {
|
|
48556
|
+
var b3 = new u16(31);
|
|
48557
|
+
for (var i = 0; i < 31; ++i) {
|
|
48558
|
+
b3[i] = start += 1 << eb[i - 1];
|
|
48559
|
+
}
|
|
48560
|
+
var r = new i32(b3[30]);
|
|
48561
|
+
for (var i = 1; i < 30; ++i) {
|
|
48562
|
+
for (var j = b3[i]; j < b3[i + 1]; ++j) {
|
|
48563
|
+
r[j] = j - b3[i] << 5 | i;
|
|
48564
|
+
}
|
|
48565
|
+
}
|
|
48566
|
+
return { b: b3, r };
|
|
48567
|
+
};
|
|
48568
|
+
var _a2 = freb(fleb, 2);
|
|
48569
|
+
var fl2 = _a2.b;
|
|
48570
|
+
var revfl = _a2.r;
|
|
48571
|
+
fl2[28] = 258, revfl[258] = 28;
|
|
48572
|
+
var _b = freb(fdeb, 0);
|
|
48573
|
+
var fd = _b.b;
|
|
48574
|
+
var revfd = _b.r;
|
|
48575
|
+
var rev = new u16(32768);
|
|
48576
|
+
for (i = 0; i < 32768; ++i) {
|
|
48577
|
+
x = (i & 43690) >> 1 | (i & 21845) << 1;
|
|
48578
|
+
x = (x & 52428) >> 2 | (x & 13107) << 2;
|
|
48579
|
+
x = (x & 61680) >> 4 | (x & 3855) << 4;
|
|
48580
|
+
rev[i] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1;
|
|
48581
|
+
}
|
|
48582
|
+
var x;
|
|
48583
|
+
var i;
|
|
48584
|
+
var hMap = (function(cd, mb, r) {
|
|
48585
|
+
var s = cd.length;
|
|
48586
|
+
var i = 0;
|
|
48587
|
+
var l = new u16(mb);
|
|
48588
|
+
for (; i < s; ++i) {
|
|
48589
|
+
if (cd[i])
|
|
48590
|
+
++l[cd[i] - 1];
|
|
48591
|
+
}
|
|
48592
|
+
var le = new u16(mb);
|
|
48593
|
+
for (i = 1; i < mb; ++i) {
|
|
48594
|
+
le[i] = le[i - 1] + l[i - 1] << 1;
|
|
48595
|
+
}
|
|
48596
|
+
var co;
|
|
48597
|
+
if (r) {
|
|
48598
|
+
co = new u16(1 << mb);
|
|
48599
|
+
var rvb = 15 - mb;
|
|
48600
|
+
for (i = 0; i < s; ++i) {
|
|
48601
|
+
if (cd[i]) {
|
|
48602
|
+
var sv = i << 4 | cd[i];
|
|
48603
|
+
var r_1 = mb - cd[i];
|
|
48604
|
+
var v = le[cd[i] - 1]++ << r_1;
|
|
48605
|
+
for (var m = v | (1 << r_1) - 1; v <= m; ++v) {
|
|
48606
|
+
co[rev[v] >> rvb] = sv;
|
|
48607
|
+
}
|
|
48608
|
+
}
|
|
48609
|
+
}
|
|
48610
|
+
} else {
|
|
48611
|
+
co = new u16(s);
|
|
48612
|
+
for (i = 0; i < s; ++i) {
|
|
48613
|
+
if (cd[i]) {
|
|
48614
|
+
co[i] = rev[le[cd[i] - 1]++] >> 15 - cd[i];
|
|
48615
|
+
}
|
|
48616
|
+
}
|
|
48617
|
+
}
|
|
48618
|
+
return co;
|
|
48619
|
+
});
|
|
48620
|
+
var flt = new u8(288);
|
|
48621
|
+
for (i = 0; i < 144; ++i)
|
|
48622
|
+
flt[i] = 8;
|
|
48623
|
+
var i;
|
|
48624
|
+
for (i = 144; i < 256; ++i)
|
|
48625
|
+
flt[i] = 9;
|
|
48626
|
+
var i;
|
|
48627
|
+
for (i = 256; i < 280; ++i)
|
|
48628
|
+
flt[i] = 7;
|
|
48629
|
+
var i;
|
|
48630
|
+
for (i = 280; i < 288; ++i)
|
|
48631
|
+
flt[i] = 8;
|
|
48632
|
+
var i;
|
|
48633
|
+
var fdt = new u8(32);
|
|
48634
|
+
for (i = 0; i < 32; ++i)
|
|
48635
|
+
fdt[i] = 5;
|
|
48636
|
+
var i;
|
|
48637
|
+
var flrm = /* @__PURE__ */ hMap(flt, 9, 1);
|
|
48638
|
+
var fdrm = /* @__PURE__ */ hMap(fdt, 5, 1);
|
|
48639
|
+
var max = function(a) {
|
|
48640
|
+
var m = a[0];
|
|
48641
|
+
for (var i = 1; i < a.length; ++i) {
|
|
48642
|
+
if (a[i] > m)
|
|
48643
|
+
m = a[i];
|
|
48644
|
+
}
|
|
48645
|
+
return m;
|
|
48646
|
+
};
|
|
48647
|
+
var bits = function(d, p, m) {
|
|
48648
|
+
var o = p / 8 | 0;
|
|
48649
|
+
return (d[o] | d[o + 1] << 8) >> (p & 7) & m;
|
|
48650
|
+
};
|
|
48651
|
+
var bits16 = function(d, p) {
|
|
48652
|
+
var o = p / 8 | 0;
|
|
48653
|
+
return (d[o] | d[o + 1] << 8 | d[o + 2] << 16) >> (p & 7);
|
|
48654
|
+
};
|
|
48655
|
+
var shft = function(p) {
|
|
48656
|
+
return (p + 7) / 8 | 0;
|
|
48657
|
+
};
|
|
48658
|
+
var slc = function(v, s, e) {
|
|
48659
|
+
if (s == null || s < 0)
|
|
48660
|
+
s = 0;
|
|
48661
|
+
if (e == null || e > v.length)
|
|
48662
|
+
e = v.length;
|
|
48663
|
+
return new u8(v.subarray(s, e));
|
|
48664
|
+
};
|
|
48665
|
+
var ec = [
|
|
48666
|
+
"unexpected EOF",
|
|
48667
|
+
"invalid block type",
|
|
48668
|
+
"invalid length/literal",
|
|
48669
|
+
"invalid distance",
|
|
48670
|
+
"stream finished",
|
|
48671
|
+
"no stream handler",
|
|
48672
|
+
,
|
|
48673
|
+
// determined by compression function
|
|
48674
|
+
"no callback",
|
|
48675
|
+
"invalid UTF-8 data",
|
|
48676
|
+
"extra field too long",
|
|
48677
|
+
"date not in range 1980-2099",
|
|
48678
|
+
"filename too long",
|
|
48679
|
+
"stream finishing",
|
|
48680
|
+
"invalid zip data"
|
|
48681
|
+
// determined by unknown compression method
|
|
48682
|
+
];
|
|
48683
|
+
var err = function(ind, msg, nt) {
|
|
48684
|
+
var e = new Error(msg || ec[ind]);
|
|
48685
|
+
e.code = ind;
|
|
48686
|
+
if (Error.captureStackTrace)
|
|
48687
|
+
Error.captureStackTrace(e, err);
|
|
48688
|
+
if (!nt)
|
|
48689
|
+
throw e;
|
|
48690
|
+
return e;
|
|
48691
|
+
};
|
|
48692
|
+
var inflt = function(dat, st, buf, dict) {
|
|
48693
|
+
var sl = dat.length, dl2 = dict ? dict.length : 0;
|
|
48694
|
+
if (!sl || st.f && !st.l)
|
|
48695
|
+
return buf || new u8(0);
|
|
48696
|
+
var noBuf = !buf;
|
|
48697
|
+
var resize = noBuf || st.i != 2;
|
|
48698
|
+
var noSt = st.i;
|
|
48699
|
+
if (noBuf)
|
|
48700
|
+
buf = new u8(sl * 3);
|
|
48701
|
+
var cbuf = function(l2) {
|
|
48702
|
+
var bl = buf.length;
|
|
48703
|
+
if (l2 > bl) {
|
|
48704
|
+
var nbuf = new u8(Math.max(bl * 2, l2));
|
|
48705
|
+
nbuf.set(buf);
|
|
48706
|
+
buf = nbuf;
|
|
48707
|
+
}
|
|
48708
|
+
};
|
|
48709
|
+
var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;
|
|
48710
|
+
var tbts = sl * 8;
|
|
48711
|
+
do {
|
|
48712
|
+
if (!lm) {
|
|
48713
|
+
final = bits(dat, pos, 1);
|
|
48714
|
+
var type = bits(dat, pos + 1, 3);
|
|
48715
|
+
pos += 3;
|
|
48716
|
+
if (!type) {
|
|
48717
|
+
var s = shft(pos) + 4, l = dat[s - 4] | dat[s - 3] << 8, t = s + l;
|
|
48718
|
+
if (t > sl) {
|
|
48719
|
+
if (noSt)
|
|
48720
|
+
err(0);
|
|
48721
|
+
break;
|
|
48722
|
+
}
|
|
48723
|
+
if (resize)
|
|
48724
|
+
cbuf(bt + l);
|
|
48725
|
+
buf.set(dat.subarray(s, t), bt);
|
|
48726
|
+
st.b = bt += l, st.p = pos = t * 8, st.f = final;
|
|
48727
|
+
continue;
|
|
48728
|
+
} else if (type == 1)
|
|
48729
|
+
lm = flrm, dm = fdrm, lbt = 9, dbt = 5;
|
|
48730
|
+
else if (type == 2) {
|
|
48731
|
+
var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;
|
|
48732
|
+
var tl = hLit + bits(dat, pos + 5, 31) + 1;
|
|
48733
|
+
pos += 14;
|
|
48734
|
+
var ldt = new u8(tl);
|
|
48735
|
+
var clt = new u8(19);
|
|
48736
|
+
for (var i = 0; i < hcLen; ++i) {
|
|
48737
|
+
clt[clim[i]] = bits(dat, pos + i * 3, 7);
|
|
48738
|
+
}
|
|
48739
|
+
pos += hcLen * 3;
|
|
48740
|
+
var clb = max(clt), clbmsk = (1 << clb) - 1;
|
|
48741
|
+
var clm = hMap(clt, clb, 1);
|
|
48742
|
+
for (var i = 0; i < tl; ) {
|
|
48743
|
+
var r = clm[bits(dat, pos, clbmsk)];
|
|
48744
|
+
pos += r & 15;
|
|
48745
|
+
var s = r >> 4;
|
|
48746
|
+
if (s < 16) {
|
|
48747
|
+
ldt[i++] = s;
|
|
48748
|
+
} else {
|
|
48749
|
+
var c = 0, n = 0;
|
|
48750
|
+
if (s == 16)
|
|
48751
|
+
n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];
|
|
48752
|
+
else if (s == 17)
|
|
48753
|
+
n = 3 + bits(dat, pos, 7), pos += 3;
|
|
48754
|
+
else if (s == 18)
|
|
48755
|
+
n = 11 + bits(dat, pos, 127), pos += 7;
|
|
48756
|
+
while (n--)
|
|
48757
|
+
ldt[i++] = c;
|
|
48758
|
+
}
|
|
48759
|
+
}
|
|
48760
|
+
var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);
|
|
48761
|
+
lbt = max(lt);
|
|
48762
|
+
dbt = max(dt);
|
|
48763
|
+
lm = hMap(lt, lbt, 1);
|
|
48764
|
+
dm = hMap(dt, dbt, 1);
|
|
48765
|
+
} else
|
|
48766
|
+
err(1);
|
|
48767
|
+
if (pos > tbts) {
|
|
48768
|
+
if (noSt)
|
|
48769
|
+
err(0);
|
|
48770
|
+
break;
|
|
48771
|
+
}
|
|
48772
|
+
}
|
|
48773
|
+
if (resize)
|
|
48774
|
+
cbuf(bt + 131072);
|
|
48775
|
+
var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;
|
|
48776
|
+
var lpos = pos;
|
|
48777
|
+
for (; ; lpos = pos) {
|
|
48778
|
+
var c = lm[bits16(dat, pos) & lms], sym = c >> 4;
|
|
48779
|
+
pos += c & 15;
|
|
48780
|
+
if (pos > tbts) {
|
|
48781
|
+
if (noSt)
|
|
48782
|
+
err(0);
|
|
48783
|
+
break;
|
|
48784
|
+
}
|
|
48785
|
+
if (!c)
|
|
48786
|
+
err(2);
|
|
48787
|
+
if (sym < 256)
|
|
48788
|
+
buf[bt++] = sym;
|
|
48789
|
+
else if (sym == 256) {
|
|
48790
|
+
lpos = pos, lm = null;
|
|
48791
|
+
break;
|
|
48792
|
+
} else {
|
|
48793
|
+
var add = sym - 254;
|
|
48794
|
+
if (sym > 264) {
|
|
48795
|
+
var i = sym - 257, b3 = fleb[i];
|
|
48796
|
+
add = bits(dat, pos, (1 << b3) - 1) + fl2[i];
|
|
48797
|
+
pos += b3;
|
|
48798
|
+
}
|
|
48799
|
+
var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;
|
|
48800
|
+
if (!d)
|
|
48801
|
+
err(3);
|
|
48802
|
+
pos += d & 15;
|
|
48803
|
+
var dt = fd[dsym];
|
|
48804
|
+
if (dsym > 3) {
|
|
48805
|
+
var b3 = fdeb[dsym];
|
|
48806
|
+
dt += bits16(dat, pos) & (1 << b3) - 1, pos += b3;
|
|
48807
|
+
}
|
|
48808
|
+
if (pos > tbts) {
|
|
48809
|
+
if (noSt)
|
|
48810
|
+
err(0);
|
|
48811
|
+
break;
|
|
48812
|
+
}
|
|
48813
|
+
if (resize)
|
|
48814
|
+
cbuf(bt + 131072);
|
|
48815
|
+
var end = bt + add;
|
|
48816
|
+
if (bt < dt) {
|
|
48817
|
+
var shift = dl2 - dt, dend = Math.min(dt, end);
|
|
48818
|
+
if (shift + bt < 0)
|
|
48819
|
+
err(3);
|
|
48820
|
+
for (; bt < dend; ++bt)
|
|
48821
|
+
buf[bt] = dict[shift + bt];
|
|
48822
|
+
}
|
|
48823
|
+
for (; bt < end; ++bt)
|
|
48824
|
+
buf[bt] = buf[bt - dt];
|
|
48825
|
+
}
|
|
48826
|
+
}
|
|
48827
|
+
st.l = lm, st.p = lpos, st.b = bt, st.f = final;
|
|
48828
|
+
if (lm)
|
|
48829
|
+
final = 1, st.m = lbt, st.d = dm, st.n = dbt;
|
|
48830
|
+
} while (!final);
|
|
48831
|
+
return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);
|
|
48832
|
+
};
|
|
48833
|
+
var et = /* @__PURE__ */ new u8(0);
|
|
48834
|
+
var b2 = function(d, b3) {
|
|
48835
|
+
return d[b3] | d[b3 + 1] << 8;
|
|
48836
|
+
};
|
|
48837
|
+
var b4 = function(d, b3) {
|
|
48838
|
+
return (d[b3] | d[b3 + 1] << 8 | d[b3 + 2] << 16 | d[b3 + 3] << 24) >>> 0;
|
|
48839
|
+
};
|
|
48840
|
+
var b8 = function(d, b3) {
|
|
48841
|
+
return b4(d, b3) + b4(d, b3 + 4) * 4294967296;
|
|
48842
|
+
};
|
|
48843
|
+
function inflateSync(data, opts) {
|
|
48844
|
+
return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);
|
|
48845
|
+
}
|
|
48846
|
+
var td = typeof TextDecoder != "undefined" && /* @__PURE__ */ new TextDecoder();
|
|
48847
|
+
var tds = 0;
|
|
48848
|
+
try {
|
|
48849
|
+
td.decode(et, { stream: true });
|
|
48850
|
+
tds = 1;
|
|
48851
|
+
} catch (e) {
|
|
48852
|
+
}
|
|
48853
|
+
var dutf8 = function(d) {
|
|
48854
|
+
for (var r = "", i = 0; ; ) {
|
|
48855
|
+
var c = d[i++];
|
|
48856
|
+
var eb = (c > 127) + (c > 223) + (c > 239);
|
|
48857
|
+
if (i + eb > d.length)
|
|
48858
|
+
return { s: r, r: slc(d, i - 1) };
|
|
48859
|
+
if (!eb)
|
|
48860
|
+
r += String.fromCharCode(c);
|
|
48861
|
+
else if (eb == 3) {
|
|
48862
|
+
c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | d[i++] & 63) - 65536, r += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023);
|
|
48863
|
+
} else if (eb & 1)
|
|
48864
|
+
r += String.fromCharCode((c & 31) << 6 | d[i++] & 63);
|
|
48865
|
+
else
|
|
48866
|
+
r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | d[i++] & 63);
|
|
48867
|
+
}
|
|
48868
|
+
};
|
|
48869
|
+
function strFromU8(dat, latin1) {
|
|
48870
|
+
if (latin1) {
|
|
48871
|
+
var r = "";
|
|
48872
|
+
for (var i = 0; i < dat.length; i += 16384)
|
|
48873
|
+
r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));
|
|
48874
|
+
return r;
|
|
48875
|
+
} else if (td) {
|
|
48876
|
+
return td.decode(dat);
|
|
48877
|
+
} else {
|
|
48878
|
+
var _a4 = dutf8(dat), s = _a4.s, r = _a4.r;
|
|
48879
|
+
if (r.length)
|
|
48880
|
+
err(8);
|
|
48881
|
+
return s;
|
|
48882
|
+
}
|
|
48883
|
+
}
|
|
48884
|
+
var slzh = function(d, b3) {
|
|
48885
|
+
return b3 + 30 + b2(d, b3 + 26) + b2(d, b3 + 28);
|
|
48886
|
+
};
|
|
48887
|
+
var zh = function(d, b3, z2) {
|
|
48888
|
+
var fnl = b2(d, b3 + 28), efl = b2(d, b3 + 30), fn = strFromU8(d.subarray(b3 + 46, b3 + 46 + fnl), !(b2(d, b3 + 8) & 2048)), es = b3 + 46 + fnl;
|
|
48889
|
+
var _a4 = z64hs(d, es, efl, z2, b4(d, b3 + 20), b4(d, b3 + 24), b4(d, b3 + 42)), sc = _a4[0], su = _a4[1], off = _a4[2];
|
|
48890
|
+
return [b2(d, b3 + 10), sc, su, fn, es + efl + b2(d, b3 + 32), off];
|
|
48891
|
+
};
|
|
48892
|
+
var z64hs = function(d, b3, l, z2, sc, su, off) {
|
|
48893
|
+
var nsc = sc == 4294967295, nsu = su == 4294967295, noff = off == 4294967295, e = b3 + l;
|
|
48894
|
+
var nf = nsc + nsu + noff;
|
|
48895
|
+
if (z2 && nf) {
|
|
48896
|
+
for (; b3 + 4 < e; b3 += 4 + b2(d, b3 + 2)) {
|
|
48897
|
+
if (b2(d, b3) == 1) {
|
|
48898
|
+
return [
|
|
48899
|
+
nsc ? b8(d, b3 + 4 + 8 * nsu) : sc,
|
|
48900
|
+
nsu ? b8(d, b3 + 4) : su,
|
|
48901
|
+
noff ? b8(d, b3 + 4 + 8 * (nsu + nsc)) : off,
|
|
48902
|
+
1
|
|
48903
|
+
];
|
|
48904
|
+
}
|
|
48905
|
+
}
|
|
48906
|
+
if (z2 < 2)
|
|
48907
|
+
err(13);
|
|
48908
|
+
}
|
|
48909
|
+
return [sc, su, off, 0];
|
|
48910
|
+
};
|
|
48911
|
+
function unzipSync(data, opts) {
|
|
48912
|
+
var files = {};
|
|
48913
|
+
var e = data.length - 22;
|
|
48914
|
+
for (; b4(data, e) != 101010256; --e) {
|
|
48915
|
+
if (!e || data.length - e > 65558)
|
|
48916
|
+
err(13);
|
|
48917
|
+
}
|
|
48918
|
+
;
|
|
48919
|
+
var c = b2(data, e + 8);
|
|
48920
|
+
if (!c)
|
|
48921
|
+
return {};
|
|
48922
|
+
var o = b4(data, e + 16);
|
|
48923
|
+
var z2 = b4(data, e - 20) == 117853008;
|
|
48924
|
+
if (z2) {
|
|
48925
|
+
var ze = b4(data, e - 12);
|
|
48926
|
+
z2 = b4(data, ze) == 101075792;
|
|
48927
|
+
if (z2) {
|
|
48928
|
+
c = b4(data, ze + 32);
|
|
48929
|
+
o = b4(data, ze + 48);
|
|
48930
|
+
}
|
|
48931
|
+
}
|
|
48932
|
+
var fltr = opts && opts.filter;
|
|
48933
|
+
for (var i = 0; i < c; ++i) {
|
|
48934
|
+
var _a4 = zh(data, o, z2), c_2 = _a4[0], sc = _a4[1], su = _a4[2], fn = _a4[3], no = _a4[4], off = _a4[5], b3 = slzh(data, off);
|
|
48935
|
+
o = no;
|
|
48936
|
+
if (!fltr || fltr({
|
|
48937
|
+
name: fn,
|
|
48938
|
+
size: sc,
|
|
48939
|
+
originalSize: su,
|
|
48940
|
+
compression: c_2
|
|
48941
|
+
})) {
|
|
48942
|
+
if (!c_2)
|
|
48943
|
+
files[fn] = slc(data, b3, b3 + sc);
|
|
48944
|
+
else if (c_2 == 8)
|
|
48945
|
+
files[fn] = inflateSync(data.subarray(b3, b3 + sc), { out: new u8(su) });
|
|
48946
|
+
else
|
|
48947
|
+
err(14, "unknown compression type " + c_2);
|
|
48948
|
+
}
|
|
48949
|
+
}
|
|
48950
|
+
return files;
|
|
48951
|
+
}
|
|
48952
|
+
|
|
48953
|
+
// ../sdk/dist/index.js
|
|
48469
48954
|
import { existsSync as existsSync32, readFileSync as readFileSync32 } from "fs";
|
|
48470
48955
|
import { dirname as dirname32, resolve as resolve32 } from "path";
|
|
48471
48956
|
import { chmodSync as chmodSync2, existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "fs";
|
|
@@ -48938,17 +49423,17 @@ function removeTrailingSlash(url2) {
|
|
|
48938
49423
|
|
|
48939
49424
|
// ../sdk/dist/index.js
|
|
48940
49425
|
import { randomBytes, randomUUID as randomUUID2, createHash } from "crypto";
|
|
48941
|
-
var
|
|
49426
|
+
var require3 = createRequire3(import.meta.url);
|
|
48942
49427
|
var __create = Object.create;
|
|
48943
49428
|
var __defProp = Object.defineProperty;
|
|
48944
49429
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
48945
49430
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
48946
49431
|
var __getProtoOf = Object.getPrototypeOf;
|
|
48947
49432
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
48948
|
-
var __require2 = /* @__PURE__ */ ((x) => typeof
|
|
48949
|
-
get: (a,
|
|
49433
|
+
var __require2 = /* @__PURE__ */ ((x) => typeof require3 !== "undefined" ? require3 : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
49434
|
+
get: (a, b3) => (typeof require3 !== "undefined" ? require3 : a)[b3]
|
|
48950
49435
|
}) : x)(function(x) {
|
|
48951
|
-
if (typeof
|
|
49436
|
+
if (typeof require3 !== "undefined") return require3.apply(this, arguments);
|
|
48952
49437
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
48953
49438
|
});
|
|
48954
49439
|
var __commonJS2 = (cb, mod) => function __require22() {
|
|
@@ -49075,9 +49560,9 @@ var require_main2 = __commonJS2({
|
|
|
49075
49560
|
options.path = vaultPath;
|
|
49076
49561
|
const result = DotenvModule.configDotenv(options);
|
|
49077
49562
|
if (!result.parsed) {
|
|
49078
|
-
const
|
|
49079
|
-
|
|
49080
|
-
throw
|
|
49563
|
+
const err2 = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
49564
|
+
err2.code = "MISSING_DATA";
|
|
49565
|
+
throw err2;
|
|
49081
49566
|
}
|
|
49082
49567
|
const keys = _dotenvKey(options).split(",");
|
|
49083
49568
|
const length = keys.length;
|
|
@@ -49120,30 +49605,30 @@ var require_main2 = __commonJS2({
|
|
|
49120
49605
|
uri = new URL(dotenvKey);
|
|
49121
49606
|
} catch (error62) {
|
|
49122
49607
|
if (error62.code === "ERR_INVALID_URL") {
|
|
49123
|
-
const
|
|
49124
|
-
|
|
49125
|
-
throw
|
|
49608
|
+
const err2 = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
49609
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
49610
|
+
throw err2;
|
|
49126
49611
|
}
|
|
49127
49612
|
throw error62;
|
|
49128
49613
|
}
|
|
49129
49614
|
const key = uri.password;
|
|
49130
49615
|
if (!key) {
|
|
49131
|
-
const
|
|
49132
|
-
|
|
49133
|
-
throw
|
|
49616
|
+
const err2 = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
49617
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
49618
|
+
throw err2;
|
|
49134
49619
|
}
|
|
49135
49620
|
const environment = uri.searchParams.get("environment");
|
|
49136
49621
|
if (!environment) {
|
|
49137
|
-
const
|
|
49138
|
-
|
|
49139
|
-
throw
|
|
49622
|
+
const err2 = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
49623
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
49624
|
+
throw err2;
|
|
49140
49625
|
}
|
|
49141
49626
|
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
49142
49627
|
const ciphertext = result.parsed[environmentKey];
|
|
49143
49628
|
if (!ciphertext) {
|
|
49144
|
-
const
|
|
49145
|
-
|
|
49146
|
-
throw
|
|
49629
|
+
const err2 = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
49630
|
+
err2.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
49631
|
+
throw err2;
|
|
49147
49632
|
}
|
|
49148
49633
|
return { ciphertext, key };
|
|
49149
49634
|
}
|
|
@@ -49273,13 +49758,13 @@ var require_main2 = __commonJS2({
|
|
|
49273
49758
|
const invalidKeyLength = error62.message === "Invalid key length";
|
|
49274
49759
|
const decryptionFailed = error62.message === "Unsupported state or unable to authenticate data";
|
|
49275
49760
|
if (isRange || invalidKeyLength) {
|
|
49276
|
-
const
|
|
49277
|
-
|
|
49278
|
-
throw
|
|
49761
|
+
const err2 = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
49762
|
+
err2.code = "INVALID_DOTENV_KEY";
|
|
49763
|
+
throw err2;
|
|
49279
49764
|
} else if (decryptionFailed) {
|
|
49280
|
-
const
|
|
49281
|
-
|
|
49282
|
-
throw
|
|
49765
|
+
const err2 = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
49766
|
+
err2.code = "DECRYPTION_FAILED";
|
|
49767
|
+
throw err2;
|
|
49283
49768
|
} else {
|
|
49284
49769
|
throw error62;
|
|
49285
49770
|
}
|
|
@@ -49289,9 +49774,9 @@ var require_main2 = __commonJS2({
|
|
|
49289
49774
|
const debug3 = Boolean(options && options.debug);
|
|
49290
49775
|
const override = Boolean(options && options.override);
|
|
49291
49776
|
if (typeof parsed !== "object") {
|
|
49292
|
-
const
|
|
49293
|
-
|
|
49294
|
-
throw
|
|
49777
|
+
const err2 = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
49778
|
+
err2.code = "OBJECT_REQUIRED";
|
|
49779
|
+
throw err2;
|
|
49295
49780
|
}
|
|
49296
49781
|
for (const key of Object.keys(parsed)) {
|
|
49297
49782
|
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
@@ -50251,13 +50736,13 @@ var require_Collection2 = __commonJS2({
|
|
|
50251
50736
|
var require_stringifyComment2 = __commonJS2({
|
|
50252
50737
|
"../../node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
50253
50738
|
"use strict";
|
|
50254
|
-
var stringifyComment = (
|
|
50739
|
+
var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
|
|
50255
50740
|
function indentComment(comment, indent) {
|
|
50256
50741
|
if (/^\n+$/.test(comment))
|
|
50257
50742
|
return comment.substring(1);
|
|
50258
50743
|
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
50259
50744
|
}
|
|
50260
|
-
var lineComment = (
|
|
50745
|
+
var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
|
|
50261
50746
|
exports.indentComment = indentComment;
|
|
50262
50747
|
exports.lineComment = lineComment;
|
|
50263
50748
|
exports.stringifyComment = stringifyComment;
|
|
@@ -50407,16 +50892,16 @@ var require_stringifyString2 = __commonJS2({
|
|
|
50407
50892
|
lineWidth: ctx.options.lineWidth,
|
|
50408
50893
|
minContentWidth: ctx.options.minContentWidth
|
|
50409
50894
|
});
|
|
50410
|
-
var containsDocumentMarker = (
|
|
50411
|
-
function lineLengthOverLimit(
|
|
50895
|
+
var containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2);
|
|
50896
|
+
function lineLengthOverLimit(str2, lineWidth, indentLength) {
|
|
50412
50897
|
if (!lineWidth || lineWidth < 0)
|
|
50413
50898
|
return false;
|
|
50414
50899
|
const limit = lineWidth - indentLength;
|
|
50415
|
-
const strLen =
|
|
50900
|
+
const strLen = str2.length;
|
|
50416
50901
|
if (strLen <= limit)
|
|
50417
50902
|
return false;
|
|
50418
50903
|
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
50419
|
-
if (
|
|
50904
|
+
if (str2[i] === "\n") {
|
|
50420
50905
|
if (i - start > limit)
|
|
50421
50906
|
return true;
|
|
50422
50907
|
start = i + 1;
|
|
@@ -50433,11 +50918,11 @@ var require_stringifyString2 = __commonJS2({
|
|
|
50433
50918
|
const { implicitKey } = ctx;
|
|
50434
50919
|
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
50435
50920
|
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
50436
|
-
let
|
|
50921
|
+
let str2 = "";
|
|
50437
50922
|
let start = 0;
|
|
50438
50923
|
for (let i = 0, ch = json2[i]; ch; ch = json2[++i]) {
|
|
50439
50924
|
if (ch === " " && json2[i + 1] === "\\" && json2[i + 2] === "n") {
|
|
50440
|
-
|
|
50925
|
+
str2 += json2.slice(start, i) + "\\ ";
|
|
50441
50926
|
i += 1;
|
|
50442
50927
|
start = i;
|
|
50443
50928
|
ch = "\\";
|
|
@@ -50446,38 +50931,38 @@ var require_stringifyString2 = __commonJS2({
|
|
|
50446
50931
|
switch (json2[i + 1]) {
|
|
50447
50932
|
case "u":
|
|
50448
50933
|
{
|
|
50449
|
-
|
|
50934
|
+
str2 += json2.slice(start, i);
|
|
50450
50935
|
const code = json2.substr(i + 2, 4);
|
|
50451
50936
|
switch (code) {
|
|
50452
50937
|
case "0000":
|
|
50453
|
-
|
|
50938
|
+
str2 += "\\0";
|
|
50454
50939
|
break;
|
|
50455
50940
|
case "0007":
|
|
50456
|
-
|
|
50941
|
+
str2 += "\\a";
|
|
50457
50942
|
break;
|
|
50458
50943
|
case "000b":
|
|
50459
|
-
|
|
50944
|
+
str2 += "\\v";
|
|
50460
50945
|
break;
|
|
50461
50946
|
case "001b":
|
|
50462
|
-
|
|
50947
|
+
str2 += "\\e";
|
|
50463
50948
|
break;
|
|
50464
50949
|
case "0085":
|
|
50465
|
-
|
|
50950
|
+
str2 += "\\N";
|
|
50466
50951
|
break;
|
|
50467
50952
|
case "00a0":
|
|
50468
|
-
|
|
50953
|
+
str2 += "\\_";
|
|
50469
50954
|
break;
|
|
50470
50955
|
case "2028":
|
|
50471
|
-
|
|
50956
|
+
str2 += "\\L";
|
|
50472
50957
|
break;
|
|
50473
50958
|
case "2029":
|
|
50474
|
-
|
|
50959
|
+
str2 += "\\P";
|
|
50475
50960
|
break;
|
|
50476
50961
|
default:
|
|
50477
50962
|
if (code.substr(0, 2) === "00")
|
|
50478
|
-
|
|
50963
|
+
str2 += "\\x" + code.substr(2);
|
|
50479
50964
|
else
|
|
50480
|
-
|
|
50965
|
+
str2 += json2.substr(i, 6);
|
|
50481
50966
|
}
|
|
50482
50967
|
i += 5;
|
|
50483
50968
|
start = i + 1;
|
|
@@ -50487,14 +50972,14 @@ var require_stringifyString2 = __commonJS2({
|
|
|
50487
50972
|
if (implicitKey || json2[i + 2] === '"' || json2.length < minMultiLineLength) {
|
|
50488
50973
|
i += 1;
|
|
50489
50974
|
} else {
|
|
50490
|
-
|
|
50975
|
+
str2 += json2.slice(start, i) + "\n\n";
|
|
50491
50976
|
while (json2[i + 2] === "\\" && json2[i + 3] === "n" && json2[i + 4] !== '"') {
|
|
50492
|
-
|
|
50977
|
+
str2 += "\n";
|
|
50493
50978
|
i += 2;
|
|
50494
50979
|
}
|
|
50495
|
-
|
|
50980
|
+
str2 += indent;
|
|
50496
50981
|
if (json2[i + 2] === " ")
|
|
50497
|
-
|
|
50982
|
+
str2 += "\\";
|
|
50498
50983
|
i += 1;
|
|
50499
50984
|
start = i + 1;
|
|
50500
50985
|
}
|
|
@@ -50503,8 +50988,8 @@ var require_stringifyString2 = __commonJS2({
|
|
|
50503
50988
|
i += 1;
|
|
50504
50989
|
}
|
|
50505
50990
|
}
|
|
50506
|
-
|
|
50507
|
-
return implicitKey ?
|
|
50991
|
+
str2 = start ? str2 + json2.slice(start) : json2;
|
|
50992
|
+
return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
50508
50993
|
}
|
|
50509
50994
|
function singleQuotedString(value, ctx) {
|
|
50510
50995
|
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
@@ -50632,15 +51117,15 @@ ${indent}${start}${value}${end}`;
|
|
|
50632
51117
|
return quotedString(value, ctx);
|
|
50633
51118
|
}
|
|
50634
51119
|
}
|
|
50635
|
-
const
|
|
51120
|
+
const str2 = value.replace(/\n+/g, `$&
|
|
50636
51121
|
${indent}`);
|
|
50637
51122
|
if (actualString) {
|
|
50638
|
-
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(
|
|
51123
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2);
|
|
50639
51124
|
const { compat, tags } = ctx.doc.schema;
|
|
50640
51125
|
if (tags.some(test) || compat?.some(test))
|
|
50641
51126
|
return quotedString(value, ctx);
|
|
50642
51127
|
}
|
|
50643
|
-
return implicitKey ?
|
|
51128
|
+
return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));
|
|
50644
51129
|
}
|
|
50645
51130
|
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
50646
51131
|
const { implicitKey, inFlow } = ctx;
|
|
@@ -50790,11 +51275,11 @@ var require_stringify2 = __commonJS2({
|
|
|
50790
51275
|
const props = stringifyProps(node22, tagObj, ctx);
|
|
50791
51276
|
if (props.length > 0)
|
|
50792
51277
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
50793
|
-
const
|
|
51278
|
+
const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node22, ctx, onComment, onChompKeep) : identity.isScalar(node22) ? stringifyString.stringifyString(node22, ctx, onComment, onChompKeep) : node22.toString(ctx, onComment, onChompKeep);
|
|
50794
51279
|
if (!props)
|
|
50795
|
-
return
|
|
50796
|
-
return identity.isScalar(node22) ||
|
|
50797
|
-
${ctx.indent}${
|
|
51280
|
+
return str2;
|
|
51281
|
+
return identity.isScalar(node22) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props}
|
|
51282
|
+
${ctx.indent}${str2}`;
|
|
50798
51283
|
}
|
|
50799
51284
|
exports.createStringifyContext = createStringifyContext;
|
|
50800
51285
|
exports.stringify = stringify22;
|
|
@@ -50827,8 +51312,8 @@ var require_stringifyPair2 = __commonJS2({
|
|
|
50827
51312
|
});
|
|
50828
51313
|
let keyCommentDone = false;
|
|
50829
51314
|
let chompKeep = false;
|
|
50830
|
-
let
|
|
50831
|
-
if (!explicitKey && !ctx.inFlow &&
|
|
51315
|
+
let str2 = stringify22.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
51316
|
+
if (!explicitKey && !ctx.inFlow && str2.length > 1024) {
|
|
50832
51317
|
if (simpleKeys)
|
|
50833
51318
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
50834
51319
|
explicitKey = true;
|
|
@@ -50837,27 +51322,27 @@ var require_stringifyPair2 = __commonJS2({
|
|
|
50837
51322
|
if (allNullValues || value == null) {
|
|
50838
51323
|
if (keyCommentDone && onComment)
|
|
50839
51324
|
onComment();
|
|
50840
|
-
return
|
|
51325
|
+
return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2;
|
|
50841
51326
|
}
|
|
50842
51327
|
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
50843
|
-
|
|
51328
|
+
str2 = `? ${str2}`;
|
|
50844
51329
|
if (keyComment && !keyCommentDone) {
|
|
50845
|
-
|
|
51330
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
50846
51331
|
} else if (chompKeep && onChompKeep)
|
|
50847
51332
|
onChompKeep();
|
|
50848
|
-
return
|
|
51333
|
+
return str2;
|
|
50849
51334
|
}
|
|
50850
51335
|
if (keyCommentDone)
|
|
50851
51336
|
keyComment = null;
|
|
50852
51337
|
if (explicitKey) {
|
|
50853
51338
|
if (keyComment)
|
|
50854
|
-
|
|
50855
|
-
|
|
51339
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
51340
|
+
str2 = `? ${str2}
|
|
50856
51341
|
${indent}:`;
|
|
50857
51342
|
} else {
|
|
50858
|
-
|
|
51343
|
+
str2 = `${str2}:`;
|
|
50859
51344
|
if (keyComment)
|
|
50860
|
-
|
|
51345
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
50861
51346
|
}
|
|
50862
51347
|
let vsb, vcb, valueComment;
|
|
50863
51348
|
if (identity.isNode(value)) {
|
|
@@ -50873,7 +51358,7 @@ ${indent}:`;
|
|
|
50873
51358
|
}
|
|
50874
51359
|
ctx.implicitKey = false;
|
|
50875
51360
|
if (!explicitKey && !keyComment && identity.isScalar(value))
|
|
50876
|
-
ctx.indentAtStart =
|
|
51361
|
+
ctx.indentAtStart = str2.length + 1;
|
|
50877
51362
|
chompKeep = false;
|
|
50878
51363
|
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
50879
51364
|
ctx.indent = ctx.indent.substring(2);
|
|
@@ -50917,16 +51402,16 @@ ${ctx.indent}`;
|
|
|
50917
51402
|
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
50918
51403
|
ws2 = "";
|
|
50919
51404
|
}
|
|
50920
|
-
|
|
51405
|
+
str2 += ws2 + valueStr;
|
|
50921
51406
|
if (ctx.inFlow) {
|
|
50922
51407
|
if (valueCommentDone && onComment)
|
|
50923
51408
|
onComment();
|
|
50924
51409
|
} else if (valueComment && !valueCommentDone) {
|
|
50925
|
-
|
|
51410
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment));
|
|
50926
51411
|
} else if (chompKeep && onChompKeep) {
|
|
50927
51412
|
onChompKeep();
|
|
50928
51413
|
}
|
|
50929
|
-
return
|
|
51414
|
+
return str2;
|
|
50930
51415
|
}
|
|
50931
51416
|
exports.stringifyPair = stringifyPair;
|
|
50932
51417
|
}
|
|
@@ -51143,31 +51628,31 @@ var require_stringifyCollection2 = __commonJS2({
|
|
|
51143
51628
|
}
|
|
51144
51629
|
}
|
|
51145
51630
|
chompKeep = false;
|
|
51146
|
-
let
|
|
51631
|
+
let str3 = stringify22.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
51147
51632
|
if (comment2)
|
|
51148
|
-
|
|
51633
|
+
str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2));
|
|
51149
51634
|
if (chompKeep && comment2)
|
|
51150
51635
|
chompKeep = false;
|
|
51151
|
-
lines.push(blockItemPrefix +
|
|
51636
|
+
lines.push(blockItemPrefix + str3);
|
|
51152
51637
|
}
|
|
51153
|
-
let
|
|
51638
|
+
let str2;
|
|
51154
51639
|
if (lines.length === 0) {
|
|
51155
|
-
|
|
51640
|
+
str2 = flowChars.start + flowChars.end;
|
|
51156
51641
|
} else {
|
|
51157
|
-
|
|
51642
|
+
str2 = lines[0];
|
|
51158
51643
|
for (let i = 1; i < lines.length; ++i) {
|
|
51159
51644
|
const line = lines[i];
|
|
51160
|
-
|
|
51645
|
+
str2 += line ? `
|
|
51161
51646
|
${indent}${line}` : "\n";
|
|
51162
51647
|
}
|
|
51163
51648
|
}
|
|
51164
51649
|
if (comment) {
|
|
51165
|
-
|
|
51650
|
+
str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent);
|
|
51166
51651
|
if (onComment)
|
|
51167
51652
|
onComment();
|
|
51168
51653
|
} else if (chompKeep && onChompKeep)
|
|
51169
51654
|
onChompKeep();
|
|
51170
|
-
return
|
|
51655
|
+
return str2;
|
|
51171
51656
|
}
|
|
51172
51657
|
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
51173
51658
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
@@ -51210,21 +51695,21 @@ ${indent}${line}` : "\n";
|
|
|
51210
51695
|
}
|
|
51211
51696
|
if (comment)
|
|
51212
51697
|
reqNewline = true;
|
|
51213
|
-
let
|
|
51214
|
-
reqNewline || (reqNewline = lines.length > linesAtValue ||
|
|
51698
|
+
let str2 = stringify22.stringify(item, itemCtx, () => comment = null);
|
|
51699
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n"));
|
|
51215
51700
|
if (i < items.length - 1) {
|
|
51216
|
-
|
|
51701
|
+
str2 += ",";
|
|
51217
51702
|
} else if (ctx.options.trailingComma) {
|
|
51218
51703
|
if (ctx.options.lineWidth > 0) {
|
|
51219
|
-
reqNewline || (reqNewline = lines.reduce((sum2, line) => sum2 + line.length + 2, 2) + (
|
|
51704
|
+
reqNewline || (reqNewline = lines.reduce((sum2, line) => sum2 + line.length + 2, 2) + (str2.length + 2) > ctx.options.lineWidth);
|
|
51220
51705
|
}
|
|
51221
51706
|
if (reqNewline) {
|
|
51222
|
-
|
|
51707
|
+
str2 += ",";
|
|
51223
51708
|
}
|
|
51224
51709
|
}
|
|
51225
51710
|
if (comment)
|
|
51226
|
-
|
|
51227
|
-
lines.push(
|
|
51711
|
+
str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment));
|
|
51712
|
+
lines.push(str2);
|
|
51228
51713
|
linesAtValue = lines.length;
|
|
51229
51714
|
}
|
|
51230
51715
|
const { start, end } = flowChars;
|
|
@@ -51236,11 +51721,11 @@ ${indent}${line}` : "\n";
|
|
|
51236
51721
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
51237
51722
|
}
|
|
51238
51723
|
if (reqNewline) {
|
|
51239
|
-
let
|
|
51724
|
+
let str2 = start;
|
|
51240
51725
|
for (const line of lines)
|
|
51241
|
-
|
|
51726
|
+
str2 += line ? `
|
|
51242
51727
|
${indentStep}${indent}${line}` : "\n";
|
|
51243
|
-
return `${
|
|
51728
|
+
return `${str2}
|
|
51244
51729
|
${indent}${end}`;
|
|
51245
51730
|
} else {
|
|
51246
51731
|
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
@@ -51562,7 +52047,7 @@ var require_string2 = __commonJS2({
|
|
|
51562
52047
|
identify: (value) => typeof value === "string",
|
|
51563
52048
|
default: true,
|
|
51564
52049
|
tag: "tag:yaml.org,2002:str",
|
|
51565
|
-
resolve: (
|
|
52050
|
+
resolve: (str2) => str2,
|
|
51566
52051
|
stringify(item, ctx, onComment, onChompKeep) {
|
|
51567
52052
|
ctx = Object.assign({ actualString: true }, ctx);
|
|
51568
52053
|
return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);
|
|
@@ -51596,7 +52081,7 @@ var require_bool3 = __commonJS2({
|
|
|
51596
52081
|
default: true,
|
|
51597
52082
|
tag: "tag:yaml.org,2002:bool",
|
|
51598
52083
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
51599
|
-
resolve: (
|
|
52084
|
+
resolve: (str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"),
|
|
51600
52085
|
stringify({ source, value }, ctx) {
|
|
51601
52086
|
if (source && boolTag.test.test(source)) {
|
|
51602
52087
|
const sv = source[0] === "t" || source[0] === "T";
|
|
@@ -51615,9 +52100,9 @@ var require_stringifyNumber2 = __commonJS2({
|
|
|
51615
52100
|
function stringifyNumber({ format: format2, minFractionDigits, tag, value }) {
|
|
51616
52101
|
if (typeof value === "bigint")
|
|
51617
52102
|
return String(value);
|
|
51618
|
-
const
|
|
51619
|
-
if (!isFinite(
|
|
51620
|
-
return isNaN(
|
|
52103
|
+
const num2 = typeof value === "number" ? value : Number(value);
|
|
52104
|
+
if (!isFinite(num2))
|
|
52105
|
+
return isNaN(num2) ? ".nan" : num2 < 0 ? "-.inf" : ".inf";
|
|
51621
52106
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
51622
52107
|
if (!format2 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
51623
52108
|
let i = n.indexOf(".");
|
|
@@ -51644,7 +52129,7 @@ var require_float3 = __commonJS2({
|
|
|
51644
52129
|
default: true,
|
|
51645
52130
|
tag: "tag:yaml.org,2002:float",
|
|
51646
52131
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
51647
|
-
resolve: (
|
|
52132
|
+
resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
51648
52133
|
stringify: stringifyNumber.stringifyNumber
|
|
51649
52134
|
};
|
|
51650
52135
|
var floatExp = {
|
|
@@ -51653,10 +52138,10 @@ var require_float3 = __commonJS2({
|
|
|
51653
52138
|
tag: "tag:yaml.org,2002:float",
|
|
51654
52139
|
format: "EXP",
|
|
51655
52140
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
51656
|
-
resolve: (
|
|
52141
|
+
resolve: (str2) => parseFloat(str2),
|
|
51657
52142
|
stringify(node22) {
|
|
51658
|
-
const
|
|
51659
|
-
return isFinite(
|
|
52143
|
+
const num2 = Number(node22.value);
|
|
52144
|
+
return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node22);
|
|
51660
52145
|
}
|
|
51661
52146
|
};
|
|
51662
52147
|
var float = {
|
|
@@ -51664,11 +52149,11 @@ var require_float3 = __commonJS2({
|
|
|
51664
52149
|
default: true,
|
|
51665
52150
|
tag: "tag:yaml.org,2002:float",
|
|
51666
52151
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
51667
|
-
resolve(
|
|
51668
|
-
const node22 = new Scalar.Scalar(parseFloat(
|
|
51669
|
-
const dot =
|
|
51670
|
-
if (dot !== -1 &&
|
|
51671
|
-
node22.minFractionDigits =
|
|
52152
|
+
resolve(str2) {
|
|
52153
|
+
const node22 = new Scalar.Scalar(parseFloat(str2));
|
|
52154
|
+
const dot = str2.indexOf(".");
|
|
52155
|
+
if (dot !== -1 && str2[str2.length - 1] === "0")
|
|
52156
|
+
node22.minFractionDigits = str2.length - dot - 1;
|
|
51672
52157
|
return node22;
|
|
51673
52158
|
},
|
|
51674
52159
|
stringify: stringifyNumber.stringifyNumber
|
|
@@ -51683,7 +52168,7 @@ var require_int3 = __commonJS2({
|
|
|
51683
52168
|
"use strict";
|
|
51684
52169
|
var stringifyNumber = require_stringifyNumber2();
|
|
51685
52170
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
51686
|
-
var intResolve = (
|
|
52171
|
+
var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
|
|
51687
52172
|
function intStringify(node22, radix, prefix) {
|
|
51688
52173
|
const { value } = node22;
|
|
51689
52174
|
if (intIdentify(value) && value >= 0)
|
|
@@ -51696,7 +52181,7 @@ var require_int3 = __commonJS2({
|
|
|
51696
52181
|
tag: "tag:yaml.org,2002:int",
|
|
51697
52182
|
format: "OCT",
|
|
51698
52183
|
test: /^0o[0-7]+$/,
|
|
51699
|
-
resolve: (
|
|
52184
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt),
|
|
51700
52185
|
stringify: (node22) => intStringify(node22, 8, "0o")
|
|
51701
52186
|
};
|
|
51702
52187
|
var int2 = {
|
|
@@ -51704,7 +52189,7 @@ var require_int3 = __commonJS2({
|
|
|
51704
52189
|
default: true,
|
|
51705
52190
|
tag: "tag:yaml.org,2002:int",
|
|
51706
52191
|
test: /^[-+]?[0-9]+$/,
|
|
51707
|
-
resolve: (
|
|
52192
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
|
|
51708
52193
|
stringify: stringifyNumber.stringifyNumber
|
|
51709
52194
|
};
|
|
51710
52195
|
var intHex = {
|
|
@@ -51713,7 +52198,7 @@ var require_int3 = __commonJS2({
|
|
|
51713
52198
|
tag: "tag:yaml.org,2002:int",
|
|
51714
52199
|
format: "HEX",
|
|
51715
52200
|
test: /^0x[0-9a-fA-F]+$/,
|
|
51716
|
-
resolve: (
|
|
52201
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
|
|
51717
52202
|
stringify: (node22) => intStringify(node22, 16, "0x")
|
|
51718
52203
|
};
|
|
51719
52204
|
exports.int = int2;
|
|
@@ -51762,7 +52247,7 @@ var require_schema22 = __commonJS2({
|
|
|
51762
52247
|
identify: (value) => typeof value === "string",
|
|
51763
52248
|
default: true,
|
|
51764
52249
|
tag: "tag:yaml.org,2002:str",
|
|
51765
|
-
resolve: (
|
|
52250
|
+
resolve: (str2) => str2,
|
|
51766
52251
|
stringify: stringifyJSON
|
|
51767
52252
|
},
|
|
51768
52253
|
{
|
|
@@ -51779,7 +52264,7 @@ var require_schema22 = __commonJS2({
|
|
|
51779
52264
|
default: true,
|
|
51780
52265
|
tag: "tag:yaml.org,2002:bool",
|
|
51781
52266
|
test: /^true$|^false$/,
|
|
51782
|
-
resolve: (
|
|
52267
|
+
resolve: (str2) => str2 === "true",
|
|
51783
52268
|
stringify: stringifyJSON
|
|
51784
52269
|
},
|
|
51785
52270
|
{
|
|
@@ -51787,7 +52272,7 @@ var require_schema22 = __commonJS2({
|
|
|
51787
52272
|
default: true,
|
|
51788
52273
|
tag: "tag:yaml.org,2002:int",
|
|
51789
52274
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
51790
|
-
resolve: (
|
|
52275
|
+
resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10),
|
|
51791
52276
|
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
51792
52277
|
},
|
|
51793
52278
|
{
|
|
@@ -51795,7 +52280,7 @@ var require_schema22 = __commonJS2({
|
|
|
51795
52280
|
default: true,
|
|
51796
52281
|
tag: "tag:yaml.org,2002:float",
|
|
51797
52282
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
51798
|
-
resolve: (
|
|
52283
|
+
resolve: (str2) => parseFloat(str2),
|
|
51799
52284
|
stringify: stringifyJSON
|
|
51800
52285
|
}
|
|
51801
52286
|
];
|
|
@@ -51803,9 +52288,9 @@ var require_schema22 = __commonJS2({
|
|
|
51803
52288
|
default: true,
|
|
51804
52289
|
tag: "",
|
|
51805
52290
|
test: /^/,
|
|
51806
|
-
resolve(
|
|
51807
|
-
onError2(`Unresolved plain scalar ${JSON.stringify(
|
|
51808
|
-
return
|
|
52291
|
+
resolve(str2, onError2) {
|
|
52292
|
+
onError2(`Unresolved plain scalar ${JSON.stringify(str2)}`);
|
|
52293
|
+
return str2;
|
|
51809
52294
|
}
|
|
51810
52295
|
};
|
|
51811
52296
|
var schema = [map2.map, seq.seq].concat(jsonScalars, jsonError);
|
|
@@ -51835,10 +52320,10 @@ var require_binary2 = __commonJS2({
|
|
|
51835
52320
|
if (typeof node_buffer.Buffer === "function") {
|
|
51836
52321
|
return node_buffer.Buffer.from(src, "base64");
|
|
51837
52322
|
} else if (typeof atob === "function") {
|
|
51838
|
-
const
|
|
51839
|
-
const buffer = new Uint8Array(
|
|
51840
|
-
for (let i = 0; i <
|
|
51841
|
-
buffer[i] =
|
|
52323
|
+
const str2 = atob(src.replace(/[\n\r]/g, ""));
|
|
52324
|
+
const buffer = new Uint8Array(str2.length);
|
|
52325
|
+
for (let i = 0; i < str2.length; ++i)
|
|
52326
|
+
buffer[i] = str2.charCodeAt(i);
|
|
51842
52327
|
return buffer;
|
|
51843
52328
|
} else {
|
|
51844
52329
|
onError2("This environment does not support reading binary tags; either Buffer or atob is required");
|
|
@@ -51849,28 +52334,28 @@ var require_binary2 = __commonJS2({
|
|
|
51849
52334
|
if (!value)
|
|
51850
52335
|
return "";
|
|
51851
52336
|
const buf = value;
|
|
51852
|
-
let
|
|
52337
|
+
let str2;
|
|
51853
52338
|
if (typeof node_buffer.Buffer === "function") {
|
|
51854
|
-
|
|
52339
|
+
str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
|
|
51855
52340
|
} else if (typeof btoa === "function") {
|
|
51856
52341
|
let s = "";
|
|
51857
52342
|
for (let i = 0; i < buf.length; ++i)
|
|
51858
52343
|
s += String.fromCharCode(buf[i]);
|
|
51859
|
-
|
|
52344
|
+
str2 = btoa(s);
|
|
51860
52345
|
} else {
|
|
51861
52346
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
51862
52347
|
}
|
|
51863
52348
|
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
|
51864
52349
|
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
51865
52350
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
51866
|
-
const n = Math.ceil(
|
|
52351
|
+
const n = Math.ceil(str2.length / lineWidth);
|
|
51867
52352
|
const lines = new Array(n);
|
|
51868
52353
|
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
|
|
51869
|
-
lines[i] =
|
|
52354
|
+
lines[i] = str2.substr(o, lineWidth);
|
|
51870
52355
|
}
|
|
51871
|
-
|
|
52356
|
+
str2 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
51872
52357
|
}
|
|
51873
|
-
return stringifyString.stringifyString({ comment, type, value:
|
|
52358
|
+
return stringifyString.stringifyString({ comment, type, value: str2 }, ctx, onComment, onChompKeep);
|
|
51874
52359
|
}
|
|
51875
52360
|
};
|
|
51876
52361
|
exports.binary = binary;
|
|
@@ -52068,7 +52553,7 @@ var require_float22 = __commonJS2({
|
|
|
52068
52553
|
default: true,
|
|
52069
52554
|
tag: "tag:yaml.org,2002:float",
|
|
52070
52555
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
52071
|
-
resolve: (
|
|
52556
|
+
resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
52072
52557
|
stringify: stringifyNumber.stringifyNumber
|
|
52073
52558
|
};
|
|
52074
52559
|
var floatExp = {
|
|
@@ -52077,10 +52562,10 @@ var require_float22 = __commonJS2({
|
|
|
52077
52562
|
tag: "tag:yaml.org,2002:float",
|
|
52078
52563
|
format: "EXP",
|
|
52079
52564
|
test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
52080
|
-
resolve: (
|
|
52565
|
+
resolve: (str2) => parseFloat(str2.replace(/_/g, "")),
|
|
52081
52566
|
stringify(node22) {
|
|
52082
|
-
const
|
|
52083
|
-
return isFinite(
|
|
52567
|
+
const num2 = Number(node22.value);
|
|
52568
|
+
return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node22);
|
|
52084
52569
|
}
|
|
52085
52570
|
};
|
|
52086
52571
|
var float = {
|
|
@@ -52088,11 +52573,11 @@ var require_float22 = __commonJS2({
|
|
|
52088
52573
|
default: true,
|
|
52089
52574
|
tag: "tag:yaml.org,2002:float",
|
|
52090
52575
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
52091
|
-
resolve(
|
|
52092
|
-
const node22 = new Scalar.Scalar(parseFloat(
|
|
52093
|
-
const dot =
|
|
52576
|
+
resolve(str2) {
|
|
52577
|
+
const node22 = new Scalar.Scalar(parseFloat(str2.replace(/_/g, "")));
|
|
52578
|
+
const dot = str2.indexOf(".");
|
|
52094
52579
|
if (dot !== -1) {
|
|
52095
|
-
const f =
|
|
52580
|
+
const f = str2.substring(dot + 1).replace(/_/g, "");
|
|
52096
52581
|
if (f[f.length - 1] === "0")
|
|
52097
52582
|
node22.minFractionDigits = f.length;
|
|
52098
52583
|
}
|
|
@@ -52110,34 +52595,34 @@ var require_int22 = __commonJS2({
|
|
|
52110
52595
|
"use strict";
|
|
52111
52596
|
var stringifyNumber = require_stringifyNumber2();
|
|
52112
52597
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
52113
|
-
function intResolve(
|
|
52114
|
-
const sign =
|
|
52598
|
+
function intResolve(str2, offset, radix, { intAsBigInt }) {
|
|
52599
|
+
const sign = str2[0];
|
|
52115
52600
|
if (sign === "-" || sign === "+")
|
|
52116
52601
|
offset += 1;
|
|
52117
|
-
|
|
52602
|
+
str2 = str2.substring(offset).replace(/_/g, "");
|
|
52118
52603
|
if (intAsBigInt) {
|
|
52119
52604
|
switch (radix) {
|
|
52120
52605
|
case 2:
|
|
52121
|
-
|
|
52606
|
+
str2 = `0b${str2}`;
|
|
52122
52607
|
break;
|
|
52123
52608
|
case 8:
|
|
52124
|
-
|
|
52609
|
+
str2 = `0o${str2}`;
|
|
52125
52610
|
break;
|
|
52126
52611
|
case 16:
|
|
52127
|
-
|
|
52612
|
+
str2 = `0x${str2}`;
|
|
52128
52613
|
break;
|
|
52129
52614
|
}
|
|
52130
|
-
const n2 = BigInt(
|
|
52615
|
+
const n2 = BigInt(str2);
|
|
52131
52616
|
return sign === "-" ? BigInt(-1) * n2 : n2;
|
|
52132
52617
|
}
|
|
52133
|
-
const n = parseInt(
|
|
52618
|
+
const n = parseInt(str2, radix);
|
|
52134
52619
|
return sign === "-" ? -1 * n : n;
|
|
52135
52620
|
}
|
|
52136
52621
|
function intStringify(node22, radix, prefix) {
|
|
52137
52622
|
const { value } = node22;
|
|
52138
52623
|
if (intIdentify(value)) {
|
|
52139
|
-
const
|
|
52140
|
-
return value < 0 ? "-" + prefix +
|
|
52624
|
+
const str2 = value.toString(radix);
|
|
52625
|
+
return value < 0 ? "-" + prefix + str2.substr(1) : prefix + str2;
|
|
52141
52626
|
}
|
|
52142
52627
|
return stringifyNumber.stringifyNumber(node22);
|
|
52143
52628
|
}
|
|
@@ -52147,7 +52632,7 @@ var require_int22 = __commonJS2({
|
|
|
52147
52632
|
tag: "tag:yaml.org,2002:int",
|
|
52148
52633
|
format: "BIN",
|
|
52149
52634
|
test: /^[-+]?0b[0-1_]+$/,
|
|
52150
|
-
resolve: (
|
|
52635
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 2, opt),
|
|
52151
52636
|
stringify: (node22) => intStringify(node22, 2, "0b")
|
|
52152
52637
|
};
|
|
52153
52638
|
var intOct = {
|
|
@@ -52156,7 +52641,7 @@ var require_int22 = __commonJS2({
|
|
|
52156
52641
|
tag: "tag:yaml.org,2002:int",
|
|
52157
52642
|
format: "OCT",
|
|
52158
52643
|
test: /^[-+]?0[0-7_]+$/,
|
|
52159
|
-
resolve: (
|
|
52644
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 1, 8, opt),
|
|
52160
52645
|
stringify: (node22) => intStringify(node22, 8, "0")
|
|
52161
52646
|
};
|
|
52162
52647
|
var int2 = {
|
|
@@ -52164,7 +52649,7 @@ var require_int22 = __commonJS2({
|
|
|
52164
52649
|
default: true,
|
|
52165
52650
|
tag: "tag:yaml.org,2002:int",
|
|
52166
52651
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
52167
|
-
resolve: (
|
|
52652
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
|
|
52168
52653
|
stringify: stringifyNumber.stringifyNumber
|
|
52169
52654
|
};
|
|
52170
52655
|
var intHex = {
|
|
@@ -52173,7 +52658,7 @@ var require_int22 = __commonJS2({
|
|
|
52173
52658
|
tag: "tag:yaml.org,2002:int",
|
|
52174
52659
|
format: "HEX",
|
|
52175
52660
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
52176
|
-
resolve: (
|
|
52661
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
|
|
52177
52662
|
stringify: (node22) => intStringify(node22, 16, "0x")
|
|
52178
52663
|
};
|
|
52179
52664
|
exports.int = int2;
|
|
@@ -52273,26 +52758,26 @@ var require_timestamp2 = __commonJS2({
|
|
|
52273
52758
|
"../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
52274
52759
|
"use strict";
|
|
52275
52760
|
var stringifyNumber = require_stringifyNumber2();
|
|
52276
|
-
function parseSexagesimal(
|
|
52277
|
-
const sign =
|
|
52278
|
-
const parts = sign === "-" || sign === "+" ?
|
|
52279
|
-
const
|
|
52280
|
-
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 *
|
|
52281
|
-
return sign === "-" ?
|
|
52761
|
+
function parseSexagesimal(str2, asBigInt) {
|
|
52762
|
+
const sign = str2[0];
|
|
52763
|
+
const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
|
|
52764
|
+
const num2 = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
52765
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num2(60) + num2(p), num2(0));
|
|
52766
|
+
return sign === "-" ? num2(-1) * res : res;
|
|
52282
52767
|
}
|
|
52283
52768
|
function stringifySexagesimal(node22) {
|
|
52284
52769
|
let { value } = node22;
|
|
52285
|
-
let
|
|
52770
|
+
let num2 = (n) => n;
|
|
52286
52771
|
if (typeof value === "bigint")
|
|
52287
|
-
|
|
52772
|
+
num2 = (n) => BigInt(n);
|
|
52288
52773
|
else if (isNaN(value) || !isFinite(value))
|
|
52289
52774
|
return stringifyNumber.stringifyNumber(node22);
|
|
52290
52775
|
let sign = "";
|
|
52291
52776
|
if (value < 0) {
|
|
52292
52777
|
sign = "-";
|
|
52293
|
-
value *=
|
|
52778
|
+
value *= num2(-1);
|
|
52294
52779
|
}
|
|
52295
|
-
const _60 =
|
|
52780
|
+
const _60 = num2(60);
|
|
52296
52781
|
const parts = [value % _60];
|
|
52297
52782
|
if (value < 60) {
|
|
52298
52783
|
parts.unshift(0);
|
|
@@ -52312,7 +52797,7 @@ var require_timestamp2 = __commonJS2({
|
|
|
52312
52797
|
tag: "tag:yaml.org,2002:int",
|
|
52313
52798
|
format: "TIME",
|
|
52314
52799
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
52315
|
-
resolve: (
|
|
52800
|
+
resolve: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt),
|
|
52316
52801
|
stringify: stringifySexagesimal
|
|
52317
52802
|
};
|
|
52318
52803
|
var floatTime = {
|
|
@@ -52321,7 +52806,7 @@ var require_timestamp2 = __commonJS2({
|
|
|
52321
52806
|
tag: "tag:yaml.org,2002:float",
|
|
52322
52807
|
format: "TIME",
|
|
52323
52808
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
52324
|
-
resolve: (
|
|
52809
|
+
resolve: (str2) => parseSexagesimal(str2, false),
|
|
52325
52810
|
stringify: stringifySexagesimal
|
|
52326
52811
|
};
|
|
52327
52812
|
var timestamp = {
|
|
@@ -52332,8 +52817,8 @@ var require_timestamp2 = __commonJS2({
|
|
|
52332
52817
|
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
52333
52818
|
// assumed to be 00:00:00Z (start of day, UTC).
|
|
52334
52819
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
52335
|
-
resolve(
|
|
52336
|
-
const match =
|
|
52820
|
+
resolve(str2) {
|
|
52821
|
+
const match = str2.match(timestamp.test);
|
|
52337
52822
|
if (!match)
|
|
52338
52823
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
52339
52824
|
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
@@ -52497,7 +52982,7 @@ var require_Schema2 = __commonJS2({
|
|
|
52497
52982
|
var seq = require_seq2();
|
|
52498
52983
|
var string4 = require_string2();
|
|
52499
52984
|
var tags = require_tags2();
|
|
52500
|
-
var sortMapEntriesByKey = (a,
|
|
52985
|
+
var sortMapEntriesByKey = (a, b3) => a.key < b3.key ? -1 : a.key > b3.key ? 1 : 0;
|
|
52501
52986
|
var Schema = class _Schema {
|
|
52502
52987
|
constructor({ compat, customTags, merge: merge22, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
52503
52988
|
this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
|
|
@@ -53163,7 +53648,7 @@ var require_util_map_includes2 = __commonJS2({
|
|
|
53163
53648
|
const { uniqueKeys } = ctx.options;
|
|
53164
53649
|
if (uniqueKeys === false)
|
|
53165
53650
|
return false;
|
|
53166
|
-
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a,
|
|
53651
|
+
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b3) => a === b3 || identity.isScalar(a) && identity.isScalar(b3) && a.value === b3.value;
|
|
53167
53652
|
return items.some((pair) => isEqual(pair.key, search));
|
|
53168
53653
|
}
|
|
53169
53654
|
exports.mapIncludes = mapIncludes;
|
|
@@ -56810,114 +57295,6 @@ var FoldersModule = class {
|
|
|
56810
57295
|
});
|
|
56811
57296
|
};
|
|
56812
57297
|
};
|
|
56813
|
-
var DEFAULT_PAGE_SIZE = 100;
|
|
56814
|
-
var getAllPages = async (listPage, options = {}) => {
|
|
56815
|
-
const items = [];
|
|
56816
|
-
const baseOptions = options;
|
|
56817
|
-
let { cursor } = baseOptions;
|
|
56818
|
-
do {
|
|
56819
|
-
const response = await listPage({
|
|
56820
|
-
...baseOptions,
|
|
56821
|
-
cursor,
|
|
56822
|
-
pageSize: baseOptions.pageSize ?? DEFAULT_PAGE_SIZE
|
|
56823
|
-
});
|
|
56824
|
-
items.push(...response.results ?? []);
|
|
56825
|
-
cursor = response.nextToken ?? void 0;
|
|
56826
|
-
} while (cursor);
|
|
56827
|
-
return items;
|
|
56828
|
-
};
|
|
56829
|
-
var GroupsModule = class {
|
|
56830
|
-
#client;
|
|
56831
|
-
constructor(client) {
|
|
56832
|
-
this.#client = client;
|
|
56833
|
-
}
|
|
56834
|
-
/**
|
|
56835
|
-
* List groups with pagination, search, and ordering.
|
|
56836
|
-
*
|
|
56837
|
-
* @param options.query - Search query matched against group name.
|
|
56838
|
-
* @param options.ordering - Sort key; prefix with `-` for descending.
|
|
56839
|
-
* @param options.folderId - Only components directly in this folder.
|
|
56840
|
-
* @param options.noFolder - Only components at the root (not in any folder).
|
|
56841
|
-
* @returns Paginated `GroupsListResponse`.
|
|
56842
|
-
*/
|
|
56843
|
-
list = async (options = {}) => {
|
|
56844
|
-
const {
|
|
56845
|
-
query: searchQuery,
|
|
56846
|
-
cursor,
|
|
56847
|
-
pageSize,
|
|
56848
|
-
ordering,
|
|
56849
|
-
folderId,
|
|
56850
|
-
noFolder,
|
|
56851
|
-
...requestOptions
|
|
56852
|
-
} = options;
|
|
56853
|
-
return this.#client.get("/groups/", {
|
|
56854
|
-
queryParams: {
|
|
56855
|
-
query: searchQuery,
|
|
56856
|
-
cursor,
|
|
56857
|
-
page_size: pageSize,
|
|
56858
|
-
ordering,
|
|
56859
|
-
folderId,
|
|
56860
|
-
noFolder
|
|
56861
|
-
},
|
|
56862
|
-
...requestOptions
|
|
56863
|
-
});
|
|
56864
|
-
};
|
|
56865
|
-
/**
|
|
56866
|
-
* Fetch every group across all pages.
|
|
56867
|
-
*/
|
|
56868
|
-
getAll = async (options = {}) => getAllPages((pageOptions) => this.list({ ...options, ...pageOptions }));
|
|
56869
|
-
/**
|
|
56870
|
-
* Fetch a single group by ID (with nested steps).
|
|
56871
|
-
*
|
|
56872
|
-
* @throws {NotFoundError} When no group matches `groupId`.
|
|
56873
|
-
*/
|
|
56874
|
-
get = async (groupId, options = {}) => this.#client.get("/groups/{id}/", {
|
|
56875
|
-
pathParams: { id: groupId },
|
|
56876
|
-
...options
|
|
56877
|
-
});
|
|
56878
|
-
/**
|
|
56879
|
-
* Create a new (empty) group.
|
|
56880
|
-
*
|
|
56881
|
-
* @throws {ValidationError} On invalid payload.
|
|
56882
|
-
*/
|
|
56883
|
-
create = async (data, options = {}) => this.#client.post("/groups/", {
|
|
56884
|
-
body: data,
|
|
56885
|
-
...options
|
|
56886
|
-
});
|
|
56887
|
-
/**
|
|
56888
|
-
* Fully replace a group via PUT. Use {@link partialUpdate} for PATCH semantics.
|
|
56889
|
-
*
|
|
56890
|
-
* @throws {NotFoundError} When the group does not exist.
|
|
56891
|
-
* @throws {ValidationError} On invalid payload.
|
|
56892
|
-
*/
|
|
56893
|
-
update = async (groupId, data, options = {}) => this.#client.put("/groups/{id}/", {
|
|
56894
|
-
pathParams: { id: groupId },
|
|
56895
|
-
body: data,
|
|
56896
|
-
...options
|
|
56897
|
-
});
|
|
56898
|
-
/**
|
|
56899
|
-
* Patch selected fields on a group (PATCH semantics).
|
|
56900
|
-
*
|
|
56901
|
-
* @throws {NotFoundError} When the group does not exist.
|
|
56902
|
-
* @throws {ValidationError} On invalid payload.
|
|
56903
|
-
*/
|
|
56904
|
-
partialUpdate = async (groupId, data, options = {}) => this.#client.patch("/groups/{id}/", {
|
|
56905
|
-
pathParams: { id: groupId },
|
|
56906
|
-
body: data,
|
|
56907
|
-
...options
|
|
56908
|
-
});
|
|
56909
|
-
/**
|
|
56910
|
-
* Delete a group by ID. Tests that reference this group will lose those steps.
|
|
56911
|
-
*
|
|
56912
|
-
* @throws {NotFoundError} When the group does not exist.
|
|
56913
|
-
*/
|
|
56914
|
-
delete = async (groupId, options = {}) => this.#client.delete("/groups/{id}/", {
|
|
56915
|
-
pathParams: { id: groupId },
|
|
56916
|
-
...options
|
|
56917
|
-
});
|
|
56918
|
-
};
|
|
56919
|
-
var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
56920
|
-
var isUuid = (value) => UUID_REGEX.test(value);
|
|
56921
57298
|
var SDK_ERROR_CODES = {
|
|
56922
57299
|
AUTHENTICATION_ERROR: "AUTHENTICATION_ERROR",
|
|
56923
57300
|
AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR",
|
|
@@ -57059,7 +57436,8 @@ var NotFoundError = class extends BugBugError {
|
|
|
57059
57436
|
};
|
|
57060
57437
|
var RateLimitError = class extends BugBugError {
|
|
57061
57438
|
retryAfter;
|
|
57062
|
-
|
|
57439
|
+
throttled;
|
|
57440
|
+
constructor(retryAfter, message = "Rate limit exceeded", response, request2, throttled = false) {
|
|
57063
57441
|
super(
|
|
57064
57442
|
SDK_ERROR_CODES.RATE_LIMIT_ERROR,
|
|
57065
57443
|
message,
|
|
@@ -57070,6 +57448,7 @@ var RateLimitError = class extends BugBugError {
|
|
|
57070
57448
|
);
|
|
57071
57449
|
this.name = "RateLimitError";
|
|
57072
57450
|
this.retryAfter = retryAfter;
|
|
57451
|
+
this.throttled = throttled;
|
|
57073
57452
|
}
|
|
57074
57453
|
};
|
|
57075
57454
|
var TimeoutError = class extends BugBugError {
|
|
@@ -57178,6 +57557,158 @@ function isRateLimitError(error62) {
|
|
|
57178
57557
|
function isNetworkError(error62) {
|
|
57179
57558
|
return error62 instanceof NetworkError;
|
|
57180
57559
|
}
|
|
57560
|
+
var DEFAULT_PAGE_SIZE = 100;
|
|
57561
|
+
var getAllPages = async (listPage, options = {}) => {
|
|
57562
|
+
const items = [];
|
|
57563
|
+
const baseOptions = options;
|
|
57564
|
+
let { cursor } = baseOptions;
|
|
57565
|
+
do {
|
|
57566
|
+
const response = await listPage({
|
|
57567
|
+
...baseOptions,
|
|
57568
|
+
cursor,
|
|
57569
|
+
pageSize: baseOptions.pageSize ?? DEFAULT_PAGE_SIZE
|
|
57570
|
+
});
|
|
57571
|
+
items.push(...response.results ?? []);
|
|
57572
|
+
cursor = response.nextToken ?? void 0;
|
|
57573
|
+
} while (cursor);
|
|
57574
|
+
return items;
|
|
57575
|
+
};
|
|
57576
|
+
var isPageNumberEnvelope = (value) => {
|
|
57577
|
+
if (!value || typeof value !== "object") {
|
|
57578
|
+
return false;
|
|
57579
|
+
}
|
|
57580
|
+
const { count: count2, page, results } = value;
|
|
57581
|
+
return typeof count2 === "number" && typeof page === "number" && Array.isArray(results);
|
|
57582
|
+
};
|
|
57583
|
+
var toPositiveInt = (value) => {
|
|
57584
|
+
const parsed = Number(value);
|
|
57585
|
+
return Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
57586
|
+
};
|
|
57587
|
+
var parseCursor = (cursor) => {
|
|
57588
|
+
if (typeof cursor !== "string" || cursor === "") {
|
|
57589
|
+
return void 0;
|
|
57590
|
+
}
|
|
57591
|
+
const [rawPage, rawPageSize] = cursor.split(":");
|
|
57592
|
+
const page = toPositiveInt(rawPage);
|
|
57593
|
+
if (page === void 0) {
|
|
57594
|
+
throw new ValidationError(
|
|
57595
|
+
`Invalid pagination cursor "${cursor}". Pass the nextToken from the previous page.`
|
|
57596
|
+
);
|
|
57597
|
+
}
|
|
57598
|
+
return { page, pageSize: toPositiveInt(rawPageSize) };
|
|
57599
|
+
};
|
|
57600
|
+
var SERVER_MAX_PAGE_SIZE = 100;
|
|
57601
|
+
var withNextToken = (response, requestedPageSize) => {
|
|
57602
|
+
if (!isPageNumberEnvelope(response)) {
|
|
57603
|
+
return response;
|
|
57604
|
+
}
|
|
57605
|
+
const { count: count2, page, results } = response;
|
|
57606
|
+
const pageSize = requestedPageSize === void 0 ? page === 1 ? results.length : void 0 : Math.min(requestedPageSize, SERVER_MAX_PAGE_SIZE);
|
|
57607
|
+
const hasMore = "next" in response ? Boolean(response.next) : pageSize !== void 0 && results.length > 0 && page * pageSize < count2;
|
|
57608
|
+
return {
|
|
57609
|
+
...response,
|
|
57610
|
+
nextToken: hasMore && pageSize !== void 0 ? `${page + 1}:${pageSize}` : null
|
|
57611
|
+
};
|
|
57612
|
+
};
|
|
57613
|
+
var requireKnownPageSize = (cursor, pageSize) => {
|
|
57614
|
+
if (cursor && cursor.page > 1 && pageSize === void 0) {
|
|
57615
|
+
throw new ValidationError(
|
|
57616
|
+
"Pagination cursor has no page size. Pass the full nextToken from the previous page or set pageSize."
|
|
57617
|
+
);
|
|
57618
|
+
}
|
|
57619
|
+
};
|
|
57620
|
+
var GroupsModule = class {
|
|
57621
|
+
#client;
|
|
57622
|
+
constructor(client) {
|
|
57623
|
+
this.#client = client;
|
|
57624
|
+
}
|
|
57625
|
+
/**
|
|
57626
|
+
* List groups with pagination, search, and ordering.
|
|
57627
|
+
*
|
|
57628
|
+
* @param options.query - Search query matched against group name.
|
|
57629
|
+
* @param options.ordering - Sort key; prefix with `-` for descending.
|
|
57630
|
+
* @param options.folderId - Only components directly in this folder.
|
|
57631
|
+
* @param options.noFolder - Only components at the root (not in any folder).
|
|
57632
|
+
* @returns Paginated `GroupsListResponse`.
|
|
57633
|
+
*/
|
|
57634
|
+
list = async (options = {}) => {
|
|
57635
|
+
const {
|
|
57636
|
+
query: searchQuery,
|
|
57637
|
+
cursor,
|
|
57638
|
+
pageSize,
|
|
57639
|
+
ordering,
|
|
57640
|
+
folderId,
|
|
57641
|
+
noFolder,
|
|
57642
|
+
...requestOptions
|
|
57643
|
+
} = options;
|
|
57644
|
+
return this.#client.get("/groups/", {
|
|
57645
|
+
queryParams: {
|
|
57646
|
+
query: searchQuery,
|
|
57647
|
+
cursor,
|
|
57648
|
+
page_size: pageSize,
|
|
57649
|
+
ordering,
|
|
57650
|
+
folderId,
|
|
57651
|
+
noFolder
|
|
57652
|
+
},
|
|
57653
|
+
...requestOptions
|
|
57654
|
+
});
|
|
57655
|
+
};
|
|
57656
|
+
/**
|
|
57657
|
+
* Fetch every group across all pages.
|
|
57658
|
+
*/
|
|
57659
|
+
getAll = async (options = {}) => getAllPages((pageOptions) => this.list({ ...options, ...pageOptions }));
|
|
57660
|
+
/**
|
|
57661
|
+
* Fetch a single group by ID (with nested steps).
|
|
57662
|
+
*
|
|
57663
|
+
* @throws {NotFoundError} When no group matches `groupId`.
|
|
57664
|
+
*/
|
|
57665
|
+
get = async (groupId, options = {}) => this.#client.get("/groups/{id}/", {
|
|
57666
|
+
pathParams: { id: groupId },
|
|
57667
|
+
...options
|
|
57668
|
+
});
|
|
57669
|
+
/**
|
|
57670
|
+
* Create a new (empty) group.
|
|
57671
|
+
*
|
|
57672
|
+
* @throws {ValidationError} On invalid payload.
|
|
57673
|
+
*/
|
|
57674
|
+
create = async (data, options = {}) => this.#client.post("/groups/", {
|
|
57675
|
+
body: data,
|
|
57676
|
+
...options
|
|
57677
|
+
});
|
|
57678
|
+
/**
|
|
57679
|
+
* Fully replace a group via PUT. Use {@link partialUpdate} for PATCH semantics.
|
|
57680
|
+
*
|
|
57681
|
+
* @throws {NotFoundError} When the group does not exist.
|
|
57682
|
+
* @throws {ValidationError} On invalid payload.
|
|
57683
|
+
*/
|
|
57684
|
+
update = async (groupId, data, options = {}) => this.#client.put("/groups/{id}/", {
|
|
57685
|
+
pathParams: { id: groupId },
|
|
57686
|
+
body: data,
|
|
57687
|
+
...options
|
|
57688
|
+
});
|
|
57689
|
+
/**
|
|
57690
|
+
* Patch selected fields on a group (PATCH semantics).
|
|
57691
|
+
*
|
|
57692
|
+
* @throws {NotFoundError} When the group does not exist.
|
|
57693
|
+
* @throws {ValidationError} On invalid payload.
|
|
57694
|
+
*/
|
|
57695
|
+
partialUpdate = async (groupId, data, options = {}) => this.#client.patch("/groups/{id}/", {
|
|
57696
|
+
pathParams: { id: groupId },
|
|
57697
|
+
body: data,
|
|
57698
|
+
...options
|
|
57699
|
+
});
|
|
57700
|
+
/**
|
|
57701
|
+
* Delete a group by ID. Tests that reference this group will lose those steps.
|
|
57702
|
+
*
|
|
57703
|
+
* @throws {NotFoundError} When the group does not exist.
|
|
57704
|
+
*/
|
|
57705
|
+
delete = async (groupId, options = {}) => this.#client.delete("/groups/{id}/", {
|
|
57706
|
+
pathParams: { id: groupId },
|
|
57707
|
+
...options
|
|
57708
|
+
});
|
|
57709
|
+
};
|
|
57710
|
+
var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
57711
|
+
var isUuid = (value) => UUID_REGEX.test(value);
|
|
57181
57712
|
var ProfilesModule = class {
|
|
57182
57713
|
#client;
|
|
57183
57714
|
constructor(client) {
|
|
@@ -57257,11 +57788,20 @@ var ProfilesModule = class {
|
|
|
57257
57788
|
if (isUuid(profileNameOrId)) {
|
|
57258
57789
|
return profileNameOrId;
|
|
57259
57790
|
}
|
|
57260
|
-
const
|
|
57261
|
-
|
|
57262
|
-
|
|
57791
|
+
const profiles = await this.getAll(options);
|
|
57792
|
+
const matches = profiles.filter((profile) => profile.name === profileNameOrId);
|
|
57793
|
+
if (matches.length > 1) {
|
|
57794
|
+
throw new ValidationError(
|
|
57795
|
+
`Profile name '${profileNameOrId}' is ambiguous (${matches.length} profiles share it). Pass the profile UUID or select a project. Matching IDs: ${matches.map((profile) => profile.id).join(", ")}`
|
|
57796
|
+
);
|
|
57797
|
+
}
|
|
57798
|
+
if (matches.length === 0) {
|
|
57799
|
+
const available = profiles.map((profile) => profile.name).join(", ") || "none";
|
|
57800
|
+
throw new NotFoundError(
|
|
57801
|
+
`Profile '${profileNameOrId}' not found. Available profiles: ${available}`
|
|
57802
|
+
);
|
|
57263
57803
|
}
|
|
57264
|
-
return
|
|
57804
|
+
return matches[0].id;
|
|
57265
57805
|
};
|
|
57266
57806
|
};
|
|
57267
57807
|
var ProjectModule = class {
|
|
@@ -57508,6 +58048,70 @@ var pollRunUntilComplete = async (getRun, isComplete, options) => {
|
|
|
57508
58048
|
}
|
|
57509
58049
|
throw new TimeoutError(timeout, options.timeoutMessage(timeout));
|
|
57510
58050
|
};
|
|
58051
|
+
var FAILED_STATUSES = /* @__PURE__ */ new Set(["failed", "error"]);
|
|
58052
|
+
var asString2 = (value) => typeof value === "string" && value !== "" ? value : null;
|
|
58053
|
+
var parseStepRuns = (stepsRuns) => {
|
|
58054
|
+
if (Array.isArray(stepsRuns)) {
|
|
58055
|
+
return stepsRuns;
|
|
58056
|
+
}
|
|
58057
|
+
if (typeof stepsRuns === "string" && stepsRuns.trim().startsWith("[")) {
|
|
58058
|
+
try {
|
|
58059
|
+
const parsed = JSON.parse(stepsRuns);
|
|
58060
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
58061
|
+
} catch {
|
|
58062
|
+
return [];
|
|
58063
|
+
}
|
|
58064
|
+
}
|
|
58065
|
+
return [];
|
|
58066
|
+
};
|
|
58067
|
+
var findFailingStep = (testRun) => {
|
|
58068
|
+
const failing = parseStepRuns(testRun.stepsRuns).findLast(
|
|
58069
|
+
(stepRun) => FAILED_STATUSES.has(String(stepRun.status)) && !stepRun.ignoredFailed
|
|
58070
|
+
);
|
|
58071
|
+
if (!failing) {
|
|
58072
|
+
return null;
|
|
58073
|
+
}
|
|
58074
|
+
return {
|
|
58075
|
+
stepRunId: asString2(failing.id) ?? "",
|
|
58076
|
+
stepId: asString2(failing.stepId),
|
|
58077
|
+
stepType: asString2(failing.stepType),
|
|
58078
|
+
status: asString2(failing.status),
|
|
58079
|
+
errorCode: asString2(failing.errorCode),
|
|
58080
|
+
error: asString2(failing.error)
|
|
58081
|
+
};
|
|
58082
|
+
};
|
|
58083
|
+
var summarizeFailedTest = (testRun) => ({
|
|
58084
|
+
testRunId: testRun.id,
|
|
58085
|
+
testId: testRun.testId ?? null,
|
|
58086
|
+
name: testRun.name,
|
|
58087
|
+
status: testRun.status,
|
|
58088
|
+
errorCode: testRun.errorCode ?? null,
|
|
58089
|
+
isAutoRetried: testRun.isAutoRetried,
|
|
58090
|
+
...testRun.webappUrl ? { webappUrl: testRun.webappUrl } : {},
|
|
58091
|
+
failingStep: findFailingStep(testRun)
|
|
58092
|
+
});
|
|
58093
|
+
var summarizeSuiteRun = (run) => {
|
|
58094
|
+
const testRuns = run.testRuns ?? [];
|
|
58095
|
+
const byStatus = {};
|
|
58096
|
+
for (const testRun of testRuns) {
|
|
58097
|
+
byStatus[testRun.status] = (byStatus[testRun.status] ?? 0) + 1;
|
|
58098
|
+
}
|
|
58099
|
+
const failedTestRuns = testRuns.filter((testRun) => FAILED_STATUSES.has(testRun.status));
|
|
58100
|
+
return {
|
|
58101
|
+
id: run.id,
|
|
58102
|
+
name: run.name,
|
|
58103
|
+
status: run.status,
|
|
58104
|
+
suiteId: run.suiteId ?? null,
|
|
58105
|
+
errorCode: run.errorCode ?? null,
|
|
58106
|
+
started: run.started ?? null,
|
|
58107
|
+
ended: run.ended ?? null,
|
|
58108
|
+
duration: run.duration ?? null,
|
|
58109
|
+
webappUrl: run.webappUrl,
|
|
58110
|
+
totals: { total: testRuns.length, byStatus },
|
|
58111
|
+
failedTestsCount: failedTestRuns.length,
|
|
58112
|
+
failedTests: failedTestRuns.map(summarizeFailedTest)
|
|
58113
|
+
};
|
|
58114
|
+
};
|
|
57511
58115
|
var SuitesModule = class {
|
|
57512
58116
|
#client;
|
|
57513
58117
|
#profiles;
|
|
@@ -57640,6 +58244,14 @@ var SuitesModule = class {
|
|
|
57640
58244
|
pathParams: { id: runId },
|
|
57641
58245
|
...options
|
|
57642
58246
|
});
|
|
58247
|
+
/**
|
|
58248
|
+
* Fetch a compact suite-run view: status, totals per status and only the failed tests with
|
|
58249
|
+
* their failing step. Use it instead of {@link getRun} for large suites; the full payload of
|
|
58250
|
+
* a 300-test run is several MB.
|
|
58251
|
+
*
|
|
58252
|
+
* @throws {NotFoundError} When the run does not exist.
|
|
58253
|
+
*/
|
|
58254
|
+
getRunSummary = async (runId, options = {}) => summarizeSuiteRun(await this.getRun(runId, options));
|
|
57643
58255
|
/**
|
|
57644
58256
|
* Replace tags assigned directly to a suite by tag name.
|
|
57645
58257
|
*/
|
|
@@ -58626,14 +59238,14 @@ function promiseAllObject(promisesObj) {
|
|
|
58626
59238
|
}
|
|
58627
59239
|
function randomString(length = 10) {
|
|
58628
59240
|
const chars = "abcdefghijklmnopqrstuvwxyz";
|
|
58629
|
-
let
|
|
59241
|
+
let str2 = "";
|
|
58630
59242
|
for (let i = 0; i < length; i++) {
|
|
58631
|
-
|
|
59243
|
+
str2 += chars[Math.floor(Math.random() * chars.length)];
|
|
58632
59244
|
}
|
|
58633
|
-
return
|
|
59245
|
+
return str2;
|
|
58634
59246
|
}
|
|
58635
|
-
function esc(
|
|
58636
|
-
return JSON.stringify(
|
|
59247
|
+
function esc(str2) {
|
|
59248
|
+
return JSON.stringify(str2);
|
|
58637
59249
|
}
|
|
58638
59250
|
function slugify(input2) {
|
|
58639
59251
|
return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
@@ -58747,8 +59359,8 @@ var primitiveTypes = /* @__PURE__ */ new Set([
|
|
|
58747
59359
|
"symbol",
|
|
58748
59360
|
"undefined"
|
|
58749
59361
|
]);
|
|
58750
|
-
function escapeRegex(
|
|
58751
|
-
return
|
|
59362
|
+
function escapeRegex(str2) {
|
|
59363
|
+
return str2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
58752
59364
|
}
|
|
58753
59365
|
function clone(inst, def, params) {
|
|
58754
59366
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
@@ -58891,8 +59503,8 @@ function safeExtend(schema, shape) {
|
|
|
58891
59503
|
}
|
|
58892
59504
|
return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
|
|
58893
59505
|
}
|
|
58894
|
-
function merge3(a,
|
|
58895
|
-
if (!
|
|
59506
|
+
function merge3(a, b3) {
|
|
59507
|
+
if (!b3?._zod?.def) {
|
|
58896
59508
|
throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
|
|
58897
59509
|
}
|
|
58898
59510
|
if (a._zod.def.checks?.length) {
|
|
@@ -58900,13 +59512,13 @@ function merge3(a, b2) {
|
|
|
58900
59512
|
}
|
|
58901
59513
|
const newShape = {};
|
|
58902
59514
|
mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
|
|
58903
|
-
mirrorShape(newShape,
|
|
59515
|
+
mirrorShape(newShape, b3, Reflect.ownKeys(sourceShape(b3)));
|
|
58904
59516
|
const def = mergeDefs(a._zod.def, {
|
|
58905
59517
|
shape: newShape,
|
|
58906
59518
|
get catchall() {
|
|
58907
|
-
return
|
|
59519
|
+
return b3._zod.def.catchall;
|
|
58908
59520
|
},
|
|
58909
|
-
checks:
|
|
59521
|
+
checks: b3._zod.def.checks ?? []
|
|
58910
59522
|
});
|
|
58911
59523
|
return clone(a, def);
|
|
58912
59524
|
}
|
|
@@ -58953,8 +59565,8 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
58953
59565
|
}
|
|
58954
59566
|
function prefixIssues(path3, issues) {
|
|
58955
59567
|
return issues.map((iss) => {
|
|
58956
|
-
var
|
|
58957
|
-
(
|
|
59568
|
+
var _a32;
|
|
59569
|
+
(_a32 = iss).path ?? (_a32.path = []);
|
|
58958
59570
|
iss.path.unshift(path3);
|
|
58959
59571
|
return iss;
|
|
58960
59572
|
});
|
|
@@ -58968,24 +59580,24 @@ function sizeCaps(defChecks) {
|
|
|
58968
59580
|
const d = ch._zod.def;
|
|
58969
59581
|
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
58970
59582
|
break;
|
|
58971
|
-
const
|
|
58972
|
-
if (
|
|
58973
|
-
caps.push([
|
|
59583
|
+
const max2 = d.maximum ?? d.length ?? d.size;
|
|
59584
|
+
if (max2 >= 0)
|
|
59585
|
+
caps.push([max2, ch]);
|
|
58974
59586
|
}
|
|
58975
59587
|
return caps;
|
|
58976
59588
|
}
|
|
58977
59589
|
function attachSchema(issues, start, inst) {
|
|
58978
|
-
var
|
|
59590
|
+
var _a32;
|
|
58979
59591
|
for (let i = start; i < issues.length; i++) {
|
|
58980
|
-
(
|
|
59592
|
+
(_a32 = issues[i]).schema ?? (_a32.schema = inst);
|
|
58981
59593
|
}
|
|
58982
59594
|
}
|
|
58983
59595
|
function finalizeIssue(iss, ctx, config2) {
|
|
58984
|
-
var
|
|
59596
|
+
var _a32;
|
|
58985
59597
|
const traits = iss.inst?._zod?.traits;
|
|
58986
59598
|
if (traits?.has("$ZodType")) {
|
|
58987
59599
|
if (traits.has("$ZodCheck"))
|
|
58988
|
-
(
|
|
59600
|
+
(_a32 = iss).schema ?? (_a32.schema = iss.inst);
|
|
58989
59601
|
else
|
|
58990
59602
|
iss.schema = iss.inst;
|
|
58991
59603
|
}
|
|
@@ -59014,13 +59626,13 @@ function getSizableOrigin(input2) {
|
|
|
59014
59626
|
return "unknown";
|
|
59015
59627
|
}
|
|
59016
59628
|
var highSurrogate = /[\uD800-\uDBFF]/;
|
|
59017
|
-
function codePointLength(
|
|
59018
|
-
const units =
|
|
59019
|
-
if (!highSurrogate.test(
|
|
59629
|
+
function codePointLength(str2) {
|
|
59630
|
+
const units = str2.length;
|
|
59631
|
+
if (!highSurrogate.test(str2))
|
|
59020
59632
|
return units;
|
|
59021
59633
|
let count2 = units;
|
|
59022
59634
|
for (let i = 0; i < units - 1; i++) {
|
|
59023
|
-
if ((
|
|
59635
|
+
if ((str2.charCodeAt(i) & 64512) === 55296 && (str2.charCodeAt(i + 1) & 64512) === 56320) {
|
|
59024
59636
|
count2--;
|
|
59025
59637
|
i++;
|
|
59026
59638
|
}
|
|
@@ -59107,7 +59719,7 @@ function hexToUint8Array(hex3) {
|
|
|
59107
59719
|
return bytes;
|
|
59108
59720
|
}
|
|
59109
59721
|
function uint8ArrayToHex(bytes) {
|
|
59110
|
-
return Array.from(bytes).map((
|
|
59722
|
+
return Array.from(bytes).map((b3) => b3.toString(16).padStart(2, "0")).join("");
|
|
59111
59723
|
}
|
|
59112
59724
|
var Class = class {
|
|
59113
59725
|
constructor(..._args) {
|
|
@@ -59191,10 +59803,10 @@ function defineLazyInternal(inst, key, compute) {
|
|
|
59191
59803
|
Object.defineProperty(this, key, { configurable: true, writable: true, value });
|
|
59192
59804
|
broke = broke || outer;
|
|
59193
59805
|
return value;
|
|
59194
|
-
} catch (
|
|
59806
|
+
} catch (err2) {
|
|
59195
59807
|
delete this[key];
|
|
59196
59808
|
broke = broke || outer;
|
|
59197
|
-
throw
|
|
59809
|
+
throw err2;
|
|
59198
59810
|
}
|
|
59199
59811
|
},
|
|
59200
59812
|
set(value) {
|
|
@@ -59226,7 +59838,7 @@ function constantCatch(value) {
|
|
|
59226
59838
|
fn[CONSTANT_CATCH] = true;
|
|
59227
59839
|
return fn;
|
|
59228
59840
|
}
|
|
59229
|
-
var
|
|
59841
|
+
var _a3;
|
|
59230
59842
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
59231
59843
|
status: "aborted"
|
|
59232
59844
|
});
|
|
@@ -59339,7 +59951,7 @@ var $ZodEncodeError = class extends Error {
|
|
|
59339
59951
|
this.name = "ZodEncodeError";
|
|
59340
59952
|
}
|
|
59341
59953
|
};
|
|
59342
|
-
(
|
|
59954
|
+
(_a3 = globalThis).__zod_globalConfig ?? (_a3.__zod_globalConfig = {});
|
|
59343
59955
|
var globalConfig = globalThis.__zod_globalConfig;
|
|
59344
59956
|
function config(newConfig) {
|
|
59345
59957
|
if (newConfig)
|
|
@@ -59462,7 +60074,7 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
|
|
|
59462
60074
|
function treeifyError(error62, mapper = (issue2) => issue2.message) {
|
|
59463
60075
|
const result = { errors: [] };
|
|
59464
60076
|
const processError = (error63, path3 = []) => {
|
|
59465
|
-
var
|
|
60077
|
+
var _a32;
|
|
59466
60078
|
for (const issue2 of error63.issues) {
|
|
59467
60079
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
59468
60080
|
issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
|
|
@@ -59494,7 +60106,7 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
|
|
|
59494
60106
|
curr = curr.properties[el];
|
|
59495
60107
|
} else {
|
|
59496
60108
|
curr.items ?? (curr.items = []);
|
|
59497
|
-
(
|
|
60109
|
+
(_a32 = curr.items)[el] ?? (_a32[el] = { errors: [] });
|
|
59498
60110
|
curr = curr.items[el];
|
|
59499
60111
|
}
|
|
59500
60112
|
if (terminal) {
|
|
@@ -59528,7 +60140,7 @@ function toDotPath(_path) {
|
|
|
59528
60140
|
}
|
|
59529
60141
|
function prettifyError(error62) {
|
|
59530
60142
|
const lines = [];
|
|
59531
|
-
const issues = [...error62.issues].sort((a,
|
|
60143
|
+
const issues = [...error62.issues].sort((a, b3) => (a.path ?? []).length - (b3.path ?? []).length);
|
|
59532
60144
|
for (const issue2 of issues) {
|
|
59533
60145
|
lines.push(`\u2716 ${issue2.message}`);
|
|
59534
60146
|
if (issue2.path?.length)
|
|
@@ -59865,10 +60477,10 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
59865
60477
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
59866
60478
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
59867
60479
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
59868
|
-
var
|
|
60480
|
+
var _a32;
|
|
59869
60481
|
inst._zod ?? (inst._zod = {});
|
|
59870
60482
|
inst._zod.def = def;
|
|
59871
|
-
(
|
|
60483
|
+
(_a32 = inst._zod).onattach ?? (_a32.onattach = []);
|
|
59872
60484
|
});
|
|
59873
60485
|
var _whenHasSize = (payload) => {
|
|
59874
60486
|
const val = payload.value;
|
|
@@ -60041,9 +60653,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
60041
60653
|
};
|
|
60042
60654
|
});
|
|
60043
60655
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
60044
|
-
var
|
|
60656
|
+
var _a32;
|
|
60045
60657
|
$ZodCheck.init(inst, def);
|
|
60046
|
-
(
|
|
60658
|
+
(_a32 = inst._zod.def).when ?? (_a32.when = _whenHasSize);
|
|
60047
60659
|
inst._zod.check = (payload) => {
|
|
60048
60660
|
const input2 = payload.value;
|
|
60049
60661
|
const size = input2.size;
|
|
@@ -60061,9 +60673,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
60061
60673
|
};
|
|
60062
60674
|
});
|
|
60063
60675
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
60064
|
-
var
|
|
60676
|
+
var _a32;
|
|
60065
60677
|
$ZodCheck.init(inst, def);
|
|
60066
|
-
(
|
|
60678
|
+
(_a32 = inst._zod.def).when ?? (_a32.when = _whenHasSize);
|
|
60067
60679
|
inst._zod.check = (payload) => {
|
|
60068
60680
|
const input2 = payload.value;
|
|
60069
60681
|
const size = input2.size;
|
|
@@ -60081,9 +60693,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
60081
60693
|
};
|
|
60082
60694
|
});
|
|
60083
60695
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
60084
|
-
var
|
|
60696
|
+
var _a32;
|
|
60085
60697
|
$ZodCheck.init(inst, def);
|
|
60086
|
-
(
|
|
60698
|
+
(_a32 = inst._zod.def).when ?? (_a32.when = _whenHasSize);
|
|
60087
60699
|
inst._zod.check = (payload) => {
|
|
60088
60700
|
const input2 = payload.value;
|
|
60089
60701
|
const size = input2.size;
|
|
@@ -60102,9 +60714,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
60102
60714
|
};
|
|
60103
60715
|
});
|
|
60104
60716
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
60105
|
-
var
|
|
60717
|
+
var _a32;
|
|
60106
60718
|
$ZodCheck.init(inst, def);
|
|
60107
|
-
(
|
|
60719
|
+
(_a32 = inst._zod.def).when ?? (_a32.when = _whenHasLength);
|
|
60108
60720
|
inst._zod.check = (payload) => {
|
|
60109
60721
|
const input2 = payload.value;
|
|
60110
60722
|
const units = input2.length;
|
|
@@ -60124,9 +60736,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
60124
60736
|
};
|
|
60125
60737
|
});
|
|
60126
60738
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
60127
|
-
var
|
|
60739
|
+
var _a32;
|
|
60128
60740
|
$ZodCheck.init(inst, def);
|
|
60129
|
-
(
|
|
60741
|
+
(_a32 = inst._zod.def).when ?? (_a32.when = _whenHasLength);
|
|
60130
60742
|
inst._zod.check = (payload) => {
|
|
60131
60743
|
const input2 = payload.value;
|
|
60132
60744
|
const units = input2.length;
|
|
@@ -60146,9 +60758,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
60146
60758
|
};
|
|
60147
60759
|
});
|
|
60148
60760
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
60149
|
-
var
|
|
60761
|
+
var _a32;
|
|
60150
60762
|
$ZodCheck.init(inst, def);
|
|
60151
|
-
(
|
|
60763
|
+
(_a32 = inst._zod.def).when ?? (_a32.when = _whenHasLength);
|
|
60152
60764
|
inst._zod.check = (payload) => {
|
|
60153
60765
|
const input2 = payload.value;
|
|
60154
60766
|
const units = input2.length;
|
|
@@ -60169,10 +60781,10 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
60169
60781
|
};
|
|
60170
60782
|
});
|
|
60171
60783
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
60172
|
-
var
|
|
60784
|
+
var _a32, _b2;
|
|
60173
60785
|
$ZodCheck.init(inst, def);
|
|
60174
60786
|
if (def.pattern)
|
|
60175
|
-
(
|
|
60787
|
+
(_a32 = inst._zod).check ?? (_a32.check = (payload) => {
|
|
60176
60788
|
def.pattern.lastIndex = 0;
|
|
60177
60789
|
if (def.pattern.test(payload.value))
|
|
60178
60790
|
return;
|
|
@@ -60187,7 +60799,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
60187
60799
|
});
|
|
60188
60800
|
});
|
|
60189
60801
|
else
|
|
60190
|
-
(
|
|
60802
|
+
(_b2 = inst._zod).check ?? (_b2.check = () => {
|
|
60191
60803
|
});
|
|
60192
60804
|
});
|
|
60193
60805
|
var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
@@ -60383,7 +60995,7 @@ var version = {
|
|
|
60383
60995
|
patch: 7
|
|
60384
60996
|
};
|
|
60385
60997
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
60386
|
-
var
|
|
60998
|
+
var _a32;
|
|
60387
60999
|
inst ?? (inst = {});
|
|
60388
61000
|
inst._zod.def = def;
|
|
60389
61001
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -60396,7 +61008,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
60396
61008
|
}
|
|
60397
61009
|
}
|
|
60398
61010
|
if (checks.length === 0) {
|
|
60399
|
-
(
|
|
61011
|
+
(_a32 = inst._zod).deferred ?? (_a32.deferred = []);
|
|
60400
61012
|
inst._zod.deferred?.push(() => {
|
|
60401
61013
|
inst._zod.run = inst._zod.parse;
|
|
60402
61014
|
});
|
|
@@ -61143,8 +61755,8 @@ function capSize(inst, size) {
|
|
|
61143
61755
|
inst._zod.parse = (payload, ctx) => {
|
|
61144
61756
|
const n = size(payload.value);
|
|
61145
61757
|
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
61146
|
-
for (const [
|
|
61147
|
-
if (n >
|
|
61758
|
+
for (const [max2, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
61759
|
+
if (n > max2 && ch._zod.def.when(payload)) {
|
|
61148
61760
|
const start = payload.issues.length;
|
|
61149
61761
|
ch._zod.check(payload);
|
|
61150
61762
|
payload.issues[start].continue = false;
|
|
@@ -61743,23 +62355,23 @@ var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, d
|
|
|
61743
62355
|
return handleIntersectionResults(payload, left, right);
|
|
61744
62356
|
};
|
|
61745
62357
|
});
|
|
61746
|
-
function mergeValues(a,
|
|
61747
|
-
if (a ===
|
|
62358
|
+
function mergeValues(a, b3) {
|
|
62359
|
+
if (a === b3) {
|
|
61748
62360
|
return { valid: true, data: a };
|
|
61749
62361
|
}
|
|
61750
|
-
if (a instanceof Date &&
|
|
62362
|
+
if (a instanceof Date && b3 instanceof Date && +a === +b3) {
|
|
61751
62363
|
return { valid: true, data: a };
|
|
61752
62364
|
}
|
|
61753
|
-
if (isPlainObject3(a) && isPlainObject3(
|
|
61754
|
-
const bKeys = Object.keys(
|
|
62365
|
+
if (isPlainObject3(a) && isPlainObject3(b3)) {
|
|
62366
|
+
const bKeys = Object.keys(b3);
|
|
61755
62367
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
61756
|
-
const newObj = { ...a, ...
|
|
62368
|
+
const newObj = { ...a, ...b3 };
|
|
61757
62369
|
if (Object.prototype.hasOwnProperty.call(newObj, "__proto__"))
|
|
61758
62370
|
delete newObj.__proto__;
|
|
61759
62371
|
for (const key of sharedKeys) {
|
|
61760
62372
|
if (key === "__proto__")
|
|
61761
62373
|
continue;
|
|
61762
|
-
const sharedValue = mergeValues(a[key],
|
|
62374
|
+
const sharedValue = mergeValues(a[key], b3[key]);
|
|
61763
62375
|
if (!sharedValue.valid) {
|
|
61764
62376
|
return {
|
|
61765
62377
|
valid: false,
|
|
@@ -61770,14 +62382,14 @@ function mergeValues(a, b2) {
|
|
|
61770
62382
|
}
|
|
61771
62383
|
return { valid: true, data: newObj };
|
|
61772
62384
|
}
|
|
61773
|
-
if (Array.isArray(a) && Array.isArray(
|
|
61774
|
-
if (a.length !==
|
|
62385
|
+
if (Array.isArray(a) && Array.isArray(b3)) {
|
|
62386
|
+
if (a.length !== b3.length) {
|
|
61775
62387
|
return { valid: false, mergeErrorPath: [] };
|
|
61776
62388
|
}
|
|
61777
62389
|
const newArray = [];
|
|
61778
62390
|
for (let index = 0; index < a.length; index++) {
|
|
61779
62391
|
const itemA = a[index];
|
|
61780
|
-
const itemB =
|
|
62392
|
+
const itemB = b3[index];
|
|
61781
62393
|
const sharedValue = mergeValues(itemA, itemB);
|
|
61782
62394
|
if (!sharedValue.valid) {
|
|
61783
62395
|
return {
|
|
@@ -63002,8 +63614,8 @@ var memo = {
|
|
|
63002
63614
|
return empty;
|
|
63003
63615
|
},
|
|
63004
63616
|
guard(inst) {
|
|
63005
|
-
var
|
|
63006
|
-
(
|
|
63617
|
+
var _a32;
|
|
63618
|
+
(_a32 = inst._zod).deferred ?? (_a32.deferred = []);
|
|
63007
63619
|
inst._zod.deferred.push(() => {
|
|
63008
63620
|
const base = inst._zod.parse;
|
|
63009
63621
|
const wrapped = (payload, ctx) => {
|
|
@@ -63017,12 +63629,12 @@ var memo = {
|
|
|
63017
63629
|
});
|
|
63018
63630
|
},
|
|
63019
63631
|
attach(inst) {
|
|
63020
|
-
var
|
|
63632
|
+
var _a32;
|
|
63021
63633
|
let isRecursiveInst;
|
|
63022
63634
|
let rechecked = false;
|
|
63023
63635
|
let lastCtx;
|
|
63024
63636
|
let lastBucket;
|
|
63025
|
-
(
|
|
63637
|
+
(_a32 = inst._zod).deferred ?? (_a32.deferred = []);
|
|
63026
63638
|
inst._zod.deferred.push(() => {
|
|
63027
63639
|
const base = inst._zod.parse;
|
|
63028
63640
|
const wrapped = (payload, ctx) => {
|
|
@@ -70612,9 +71224,9 @@ function compile(schema, options) {
|
|
|
70612
71224
|
const clone2 = withParser(schema, parser);
|
|
70613
71225
|
clone2._zod.bag.validator = compileValidator(schema, parser);
|
|
70614
71226
|
return clone2;
|
|
70615
|
-
} catch (
|
|
71227
|
+
} catch (err2) {
|
|
70616
71228
|
if (options?.strict)
|
|
70617
|
-
throw
|
|
71229
|
+
throw err2;
|
|
70618
71230
|
return schema;
|
|
70619
71231
|
}
|
|
70620
71232
|
}
|
|
@@ -70704,8 +71316,8 @@ ${code}
|
|
|
70704
71316
|
try {
|
|
70705
71317
|
const factory = new F(...constantNames, factoryCode);
|
|
70706
71318
|
fn = factory(...constantValues);
|
|
70707
|
-
} catch (
|
|
70708
|
-
throw new ZodCompileUnsupportedError(`this schema (generated code failed to evaluate: ${
|
|
71319
|
+
} catch (err2) {
|
|
71320
|
+
throw new ZodCompileUnsupportedError(`this schema (generated code failed to evaluate: ${err2.message})`);
|
|
70709
71321
|
}
|
|
70710
71322
|
if (options?.debug) {
|
|
70711
71323
|
fn.code = fullCode;
|
|
@@ -70743,9 +71355,9 @@ function compileChild(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
70743
71355
|
const varCounter = ctx.varCounter;
|
|
70744
71356
|
try {
|
|
70745
71357
|
return generateCheck(doc, ctx, schema, accessor, needsValue);
|
|
70746
|
-
} catch (
|
|
70747
|
-
if (!(
|
|
70748
|
-
throw
|
|
71358
|
+
} catch (err2) {
|
|
71359
|
+
if (!(err2 instanceof ZodCompileUnsupportedError) || !err2.islandable)
|
|
71360
|
+
throw err2;
|
|
70749
71361
|
doc.content.length = contentLen;
|
|
70750
71362
|
if (ctx.constants.size > constantCount) {
|
|
70751
71363
|
const trailing = Array.from(ctx.constants.keys()).slice(constantCount);
|
|
@@ -70804,9 +71416,9 @@ function generateChecks(doc, ctx, schema, accessor) {
|
|
|
70804
71416
|
break;
|
|
70805
71417
|
}
|
|
70806
71418
|
case "max_length": {
|
|
70807
|
-
const
|
|
70808
|
-
const len = codePointLengthVar(doc, ctx, currentAccessor, `${currentAccessor}.length > ${
|
|
70809
|
-
doc.write(`if (${len} > ${
|
|
71419
|
+
const max2 = numericOperand(def.maximum, "max_length");
|
|
71420
|
+
const len = codePointLengthVar(doc, ctx, currentAccessor, `${currentAccessor}.length > ${max2}`);
|
|
71421
|
+
doc.write(`if (${len} > ${max2}) return INVALID;`);
|
|
70810
71422
|
break;
|
|
70811
71423
|
}
|
|
70812
71424
|
case "length_equals": {
|
|
@@ -71624,8 +72236,8 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
71624
72236
|
return outputVar;
|
|
71625
72237
|
}
|
|
71626
72238
|
function generateSizeGate(doc, schema, size) {
|
|
71627
|
-
for (const [
|
|
71628
|
-
doc.write(`if (${size} > ${numericOperand(
|
|
72239
|
+
for (const [max2, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
72240
|
+
doc.write(`if (${size} > ${numericOperand(max2, check2._zod.def.check)}) return INVALID;`);
|
|
71629
72241
|
}
|
|
71630
72242
|
}
|
|
71631
72243
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
@@ -73294,7 +73906,7 @@ function handleUnrepresentable(schema, ctx, json2, params, message) {
|
|
|
73294
73906
|
return true;
|
|
73295
73907
|
}
|
|
73296
73908
|
function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
73297
|
-
var
|
|
73909
|
+
var _a32;
|
|
73298
73910
|
const def = schema._zod.def;
|
|
73299
73911
|
const seen = ctx.seen.get(schema);
|
|
73300
73912
|
if (seen) {
|
|
@@ -73344,7 +73956,7 @@ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
73344
73956
|
delete result.schema.default;
|
|
73345
73957
|
}
|
|
73346
73958
|
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
73347
|
-
(
|
|
73959
|
+
(_a32 = result.schema).default ?? (_a32.default = result.schema._prefault);
|
|
73348
73960
|
delete result.schema._prefault;
|
|
73349
73961
|
const _result = ctx.seen.get(schema);
|
|
73350
73962
|
return _result.schema;
|
|
@@ -73544,7 +74156,7 @@ function foldIntersection(json2) {
|
|
|
73544
74156
|
return;
|
|
73545
74157
|
const rest = allOf.filter((m) => m !== union2);
|
|
73546
74158
|
const branches = union2[keyword].map((branch) => foldObjects([...rest, branch]));
|
|
73547
|
-
if (branches.some((
|
|
74159
|
+
if (branches.some((b3) => !b3))
|
|
73548
74160
|
return;
|
|
73549
74161
|
folded = { [keyword]: branches };
|
|
73550
74162
|
}
|
|
@@ -74168,14 +74780,14 @@ var intersectionProcessor = (schema, ctx, json2, params) => {
|
|
|
74168
74780
|
...params,
|
|
74169
74781
|
path: [...params.path, "allOf", 0]
|
|
74170
74782
|
});
|
|
74171
|
-
const
|
|
74783
|
+
const b3 = processSchema(def.right, ctx, {
|
|
74172
74784
|
...params,
|
|
74173
74785
|
path: [...params.path, "allOf", 1]
|
|
74174
74786
|
});
|
|
74175
74787
|
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
74176
74788
|
const allOf = [
|
|
74177
74789
|
...isSimpleIntersection(a) ? a.allOf : [a],
|
|
74178
|
-
...isSimpleIntersection(
|
|
74790
|
+
...isSimpleIntersection(b3) ? b3.allOf : [b3]
|
|
74179
74791
|
];
|
|
74180
74792
|
json2.allOf = allOf;
|
|
74181
74793
|
ctx.intersections.push(allOf);
|
|
@@ -77325,7 +77937,7 @@ function date4(params) {
|
|
|
77325
77937
|
}
|
|
77326
77938
|
var UuidSchema = external_exports.string().min(1).describe("UUID");
|
|
77327
77939
|
var DateTimeSchema = external_exports.string().describe("ISO 8601 date-time string");
|
|
77328
|
-
var CursorSchema = external_exports.string().describe("Opaque cursor for the next page: pass the `
|
|
77940
|
+
var CursorSchema = external_exports.string().describe("Opaque cursor for the next page: pass the `nextToken` value from the previous response. It is `null` on the last page.");
|
|
77329
77941
|
var PageSizeSchema = external_exports.number().int().min(1).max(100).describe("Number of results per page.");
|
|
77330
77942
|
var StepTimingSecondsSchema = external_exports.number().min(0).max(300).nullable().optional();
|
|
77331
77943
|
var DEBUG_ARTIFACT_TYPES = [
|
|
@@ -77989,6 +78601,194 @@ function buildTestImportFormData(payload, fmt2) {
|
|
|
77989
78601
|
form.append("file", blob, filename);
|
|
77990
78602
|
return form;
|
|
77991
78603
|
}
|
|
78604
|
+
var CONSOLE_MESSAGE_MAX_CHARS = 2e3;
|
|
78605
|
+
var NETWORK_BODY_MAX_CHARS = 4e3;
|
|
78606
|
+
var DEFAULT_QUERY_LIMIT = 50;
|
|
78607
|
+
var MAX_QUERY_LIMIT = 200;
|
|
78608
|
+
var REDACTED = "[REDACTED]";
|
|
78609
|
+
var SENSITIVE_NAME = /authorization|cookie|token|secret|password|api[-_]?key|session|credential/i;
|
|
78610
|
+
var LOG_LINE = /^(\d{4}-\d{2}-\d{2}T[\d:.]+) \[tab: ([^\]]+)\]: \[(BUGBUG:BACKGROUND|BUGBUG:CONTENT|WEBSITE)(?::([A-Z]+))?\] ?(.*)$/;
|
|
78611
|
+
var SOURCE_BY_TAG = {
|
|
78612
|
+
"BUGBUG:BACKGROUND": "bugbug-background",
|
|
78613
|
+
"BUGBUG:CONTENT": "bugbug-content",
|
|
78614
|
+
WEBSITE: "website"
|
|
78615
|
+
};
|
|
78616
|
+
var parseConsoleLogs = (text) => {
|
|
78617
|
+
const entries = [];
|
|
78618
|
+
for (const line of text.split("\n")) {
|
|
78619
|
+
const match = LOG_LINE.exec(line);
|
|
78620
|
+
if (match) {
|
|
78621
|
+
const [, timestamp, tab, tag, level, message] = match;
|
|
78622
|
+
entries.push({
|
|
78623
|
+
timestamp,
|
|
78624
|
+
tab,
|
|
78625
|
+
source: SOURCE_BY_TAG[tag],
|
|
78626
|
+
level: level ? level.toLowerCase() : null,
|
|
78627
|
+
message
|
|
78628
|
+
});
|
|
78629
|
+
} else if (entries.length > 0) {
|
|
78630
|
+
entries[entries.length - 1].message += `
|
|
78631
|
+
${line}`;
|
|
78632
|
+
}
|
|
78633
|
+
}
|
|
78634
|
+
return entries;
|
|
78635
|
+
};
|
|
78636
|
+
var parseConsoleLogsPartial = (text) => {
|
|
78637
|
+
const raw = JSON.parse(text);
|
|
78638
|
+
if (!Array.isArray(raw)) {
|
|
78639
|
+
return [];
|
|
78640
|
+
}
|
|
78641
|
+
return raw.flatMap((item) => {
|
|
78642
|
+
const { type, timestamp, message, tab_id: tabId } = item;
|
|
78643
|
+
if (typeof type !== "string" || typeof message !== "string" || typeof timestamp !== "number") {
|
|
78644
|
+
return [];
|
|
78645
|
+
}
|
|
78646
|
+
const [kind, level] = type.split(":");
|
|
78647
|
+
const source = kind === "website" ? "website" : type === "BugBug:Content" ? "bugbug-content" : "bugbug-background";
|
|
78648
|
+
return [
|
|
78649
|
+
{
|
|
78650
|
+
timestamp: new Date(timestamp).toISOString().replace("Z", ""),
|
|
78651
|
+
tab: tabId === null || tabId === void 0 ? "background" : String(tabId),
|
|
78652
|
+
source,
|
|
78653
|
+
level: kind === "website" ? level ?? null : null,
|
|
78654
|
+
message: message.replace(/^\[[A-Z:]+\] ?/, "")
|
|
78655
|
+
}
|
|
78656
|
+
];
|
|
78657
|
+
});
|
|
78658
|
+
};
|
|
78659
|
+
var clampLimit = (limit) => Math.min(toPositiveInt(limit) ?? DEFAULT_QUERY_LIMIT, MAX_QUERY_LIMIT);
|
|
78660
|
+
var pageOf = (items, options) => {
|
|
78661
|
+
const offset = options.cursor === void 0 ? 0 : Number(options.cursor);
|
|
78662
|
+
if (!Number.isInteger(offset) || offset < 0) {
|
|
78663
|
+
throw new ValidationError(
|
|
78664
|
+
`Invalid cursor "${options.cursor}". Pass the nextToken from the previous response.`
|
|
78665
|
+
);
|
|
78666
|
+
}
|
|
78667
|
+
const page = items.slice(offset, offset + clampLimit(options.limit));
|
|
78668
|
+
const next = offset + page.length;
|
|
78669
|
+
return { page, total: items.length, nextToken: next < items.length ? String(next) : null };
|
|
78670
|
+
};
|
|
78671
|
+
var queryConsoleLogEntries = (entries, options = {}) => {
|
|
78672
|
+
const { source = "website", levels, text, tabId, after, before } = options;
|
|
78673
|
+
const wantedLevels = levels?.map((level) => level.toLowerCase());
|
|
78674
|
+
const needle = text?.toLowerCase();
|
|
78675
|
+
const matching = entries.filter((entry) => {
|
|
78676
|
+
if (source === "website" && entry.source !== "website") return false;
|
|
78677
|
+
if (source === "bugbug" && entry.source === "website") return false;
|
|
78678
|
+
if (wantedLevels && !(entry.level && wantedLevels.includes(entry.level))) return false;
|
|
78679
|
+
if (needle && !entry.message.toLowerCase().includes(needle)) return false;
|
|
78680
|
+
if (tabId && entry.tab !== tabId) return false;
|
|
78681
|
+
if (after && entry.timestamp < after.replace("Z", "")) return false;
|
|
78682
|
+
if (before && entry.timestamp >= before.replace("Z", "")) return false;
|
|
78683
|
+
return true;
|
|
78684
|
+
});
|
|
78685
|
+
const { page, total, nextToken } = pageOf(matching, options);
|
|
78686
|
+
return {
|
|
78687
|
+
entries: page.map(
|
|
78688
|
+
(entry) => entry.message.length > CONSOLE_MESSAGE_MAX_CHARS ? { ...entry, message: entry.message.slice(0, CONSOLE_MESSAGE_MAX_CHARS), truncated: true } : entry
|
|
78689
|
+
),
|
|
78690
|
+
total,
|
|
78691
|
+
nextToken
|
|
78692
|
+
};
|
|
78693
|
+
};
|
|
78694
|
+
var parseHarEntries = (text) => {
|
|
78695
|
+
const har = JSON.parse(text);
|
|
78696
|
+
const entries = har?.log?.entries;
|
|
78697
|
+
return Array.isArray(entries) ? entries : [];
|
|
78698
|
+
};
|
|
78699
|
+
var str = (value) => typeof value === "string" ? value : "";
|
|
78700
|
+
var num = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
78701
|
+
var redactUrl = (rawUrl) => {
|
|
78702
|
+
try {
|
|
78703
|
+
const url2 = new URL(rawUrl);
|
|
78704
|
+
for (const key of [...url2.searchParams.keys()]) {
|
|
78705
|
+
if (SENSITIVE_NAME.test(key)) url2.searchParams.set(key, REDACTED);
|
|
78706
|
+
}
|
|
78707
|
+
return url2.toString();
|
|
78708
|
+
} catch {
|
|
78709
|
+
return rawUrl;
|
|
78710
|
+
}
|
|
78711
|
+
};
|
|
78712
|
+
var redactHeaders = (headers) => (headers ?? []).map((header) => {
|
|
78713
|
+
const name = str(header.name);
|
|
78714
|
+
return { name, value: SENSITIVE_NAME.test(name) ? REDACTED : str(header.value) };
|
|
78715
|
+
});
|
|
78716
|
+
var cut = (value) => value.length > NETWORK_BODY_MAX_CHARS ? { text: value.slice(0, NETWORK_BODY_MAX_CHARS), truncated: true } : { text: value, truncated: false };
|
|
78717
|
+
var toNetworkEntry = (entry, includeDetails) => {
|
|
78718
|
+
const status = num(entry.response?.status) ?? 0;
|
|
78719
|
+
const result = {
|
|
78720
|
+
startedDateTime: str(entry.startedDateTime),
|
|
78721
|
+
method: str(entry.request?.method).toUpperCase(),
|
|
78722
|
+
url: redactUrl(str(entry.request?.url)),
|
|
78723
|
+
status,
|
|
78724
|
+
statusText: str(entry.response?.statusText),
|
|
78725
|
+
mimeType: str(entry.response?.content?.mimeType) || null,
|
|
78726
|
+
durationMs: num(entry.time) === null ? null : Math.round(entry.time),
|
|
78727
|
+
responseSizeBytes: num(entry.response?.content?.size) ?? num(entry.response?.bodySize),
|
|
78728
|
+
tabId: entry._tabId === void 0 ? null : String(entry._tabId),
|
|
78729
|
+
tabUrl: str(entry._tabUrl) || null
|
|
78730
|
+
};
|
|
78731
|
+
if (!includeDetails) {
|
|
78732
|
+
return result;
|
|
78733
|
+
}
|
|
78734
|
+
result.requestHeaders = redactHeaders(entry.request?.headers);
|
|
78735
|
+
result.responseHeaders = redactHeaders(entry.response?.headers);
|
|
78736
|
+
const requestBody = cut(str(entry.request?.postData?.text));
|
|
78737
|
+
const responseBody = cut(str(entry.response?.content?.text));
|
|
78738
|
+
if (requestBody.text) result.requestBody = requestBody.text;
|
|
78739
|
+
if (responseBody.text) result.responseBody = responseBody.text;
|
|
78740
|
+
if (requestBody.truncated || responseBody.truncated) result.truncated = true;
|
|
78741
|
+
return result;
|
|
78742
|
+
};
|
|
78743
|
+
var queryNetworkEntries = (entries, options = {}) => {
|
|
78744
|
+
const { urlContains, method, status, failedOnly, mimeType, tabId, includeDetails } = options;
|
|
78745
|
+
const matching = entries.filter((entry) => {
|
|
78746
|
+
const entryStatus = num(entry.response?.status) ?? 0;
|
|
78747
|
+
if (urlContains && !str(entry.request?.url).toLowerCase().includes(urlContains.toLowerCase()))
|
|
78748
|
+
return false;
|
|
78749
|
+
if (method && str(entry.request?.method).toUpperCase() !== method.toUpperCase()) return false;
|
|
78750
|
+
if (status !== void 0 && entryStatus !== status) return false;
|
|
78751
|
+
if (failedOnly && entryStatus !== 0 && entryStatus < 400) return false;
|
|
78752
|
+
if (mimeType && !str(entry.response?.content?.mimeType).toLowerCase().includes(mimeType.toLowerCase()))
|
|
78753
|
+
return false;
|
|
78754
|
+
if (tabId && String(entry._tabId) !== tabId) return false;
|
|
78755
|
+
return true;
|
|
78756
|
+
});
|
|
78757
|
+
const { page, total, nextToken } = pageOf(matching, options);
|
|
78758
|
+
return {
|
|
78759
|
+
entries: page.map((entry) => toNetworkEntry(entry, Boolean(includeDetails))),
|
|
78760
|
+
total,
|
|
78761
|
+
nextToken
|
|
78762
|
+
};
|
|
78763
|
+
};
|
|
78764
|
+
var downloadArtifact = async (artifact, signal) => {
|
|
78765
|
+
const fileUrl = artifact.file;
|
|
78766
|
+
if (typeof fileUrl !== "string" || fileUrl === "") {
|
|
78767
|
+
throw new UnexpectedResponseError(`Debug artifact ${artifact.kind} has no file URL`);
|
|
78768
|
+
}
|
|
78769
|
+
const response = await fetch(fileUrl, { signal });
|
|
78770
|
+
if (!response.ok) {
|
|
78771
|
+
throw new UnexpectedResponseError(
|
|
78772
|
+
`Failed to download ${artifact.kind} artifact: ${response.status} ${response.statusText}`
|
|
78773
|
+
);
|
|
78774
|
+
}
|
|
78775
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
78776
|
+
};
|
|
78777
|
+
var unzipHar = (bytes) => {
|
|
78778
|
+
try {
|
|
78779
|
+
const files = unzipSync(bytes);
|
|
78780
|
+
const name = Object.keys(files).find((file2) => file2.endsWith(".har"));
|
|
78781
|
+
if (!name) {
|
|
78782
|
+
throw new Error("the archive contains no .har file");
|
|
78783
|
+
}
|
|
78784
|
+
return new TextDecoder().decode(files[name]);
|
|
78785
|
+
} catch (error62) {
|
|
78786
|
+
throw new UnexpectedResponseError(
|
|
78787
|
+
`The network_logs artifact could not be unpacked (${error62 instanceof Error ? error62.message : String(error62)}). Retry later; it may still be uploading.`,
|
|
78788
|
+
error62 instanceof Error ? error62 : void 0
|
|
78789
|
+
);
|
|
78790
|
+
}
|
|
78791
|
+
};
|
|
77992
78792
|
var TestsModule = class {
|
|
77993
78793
|
#client;
|
|
77994
78794
|
#profiles;
|
|
@@ -78380,6 +79180,49 @@ var TestsModule = class {
|
|
|
78380
79180
|
pathParams: { id: runId, artifact_type: artifactType },
|
|
78381
79181
|
...options
|
|
78382
79182
|
});
|
|
79183
|
+
/**
|
|
79184
|
+
* Query the console output of a test run. By default only the tested page's own console
|
|
79185
|
+
* (`source: 'website'`) is returned; the runner's internal entries are hidden.
|
|
79186
|
+
*
|
|
79187
|
+
* Reads the `logs` artifact, or the in-progress `logs_partial` one while the final upload is
|
|
79188
|
+
* pending (`partial: true`). Needs run logs enabled in the project settings.
|
|
79189
|
+
*
|
|
79190
|
+
* @throws {NotFoundError} When the run has no logs artifact.
|
|
79191
|
+
*/
|
|
79192
|
+
queryConsoleLogs = async (runId, options = {}) => {
|
|
79193
|
+
const { signal, timeout, headers, ...query } = options;
|
|
79194
|
+
const artifacts = await this.listRunDebugArtifacts(runId, { signal, timeout, headers });
|
|
79195
|
+
const logs2 = artifacts.find((artifact2) => artifact2.kind === "logs");
|
|
79196
|
+
const artifact = logs2 ?? artifacts.find((a) => a.kind === "logs_partial");
|
|
79197
|
+
if (!artifact) {
|
|
79198
|
+
throw new NotFoundError(
|
|
79199
|
+
`Test run ${runId} has no logs artifact. Enable run logs in the project settings, or retry shortly: it may still be uploading.`
|
|
79200
|
+
);
|
|
79201
|
+
}
|
|
79202
|
+
const text = new TextDecoder().decode(await downloadArtifact(artifact, signal));
|
|
79203
|
+
const entries = logs2 ? parseConsoleLogs(text) : parseConsoleLogsPartial(text);
|
|
79204
|
+
return { ...queryConsoleLogEntries(entries, query), partial: !logs2 };
|
|
79205
|
+
};
|
|
79206
|
+
/**
|
|
79207
|
+
* Query the network requests of a test run from its `network_logs` (HAR) artifact. Credential
|
|
79208
|
+
* headers and query parameters are redacted; bodies are only returned with `includeDetails`
|
|
79209
|
+
* and are truncated.
|
|
79210
|
+
*
|
|
79211
|
+
* @throws {NotFoundError} When the run has no network logs artifact.
|
|
79212
|
+
*/
|
|
79213
|
+
queryNetworkRequests = async (runId, options = {}) => {
|
|
79214
|
+
const { signal, timeout, headers, ...query } = options;
|
|
79215
|
+
const artifacts = await this.listRunDebugArtifacts(runId, { signal, timeout, headers });
|
|
79216
|
+
const artifact = artifacts.find((a) => a.kind === "network_logs");
|
|
79217
|
+
if (!artifact) {
|
|
79218
|
+
throw new NotFoundError(
|
|
79219
|
+
`Test run ${runId} has no network logs artifact. Enable run logs in the project settings, or retry shortly: it may still be uploading.`
|
|
79220
|
+
);
|
|
79221
|
+
}
|
|
79222
|
+
const bytes = await downloadArtifact(artifact, signal);
|
|
79223
|
+
const har = unzipHar(bytes);
|
|
79224
|
+
return queryNetworkEntries(parseHarEntries(har), query);
|
|
79225
|
+
};
|
|
78383
79226
|
/**
|
|
78384
79227
|
* Get the email inbox of a test run with its (optionally filtered) messages.
|
|
78385
79228
|
*
|
|
@@ -78445,6 +79288,9 @@ var TestsModule = class {
|
|
|
78445
79288
|
* @param fmt - Format matching `payload` (`'yaml'` or `'zip'`).
|
|
78446
79289
|
* @param options.conflictMode - How to resolve naming collisions on the server
|
|
78447
79290
|
* (e.g. `'rename'`). Forwarded as a query string parameter.
|
|
79291
|
+
* @param options.folderId - Test folder to import into. Wins over a folder path inside a ZIP;
|
|
79292
|
+
* omit to import to the project root. An unknown folder, a folder of another project or a
|
|
79293
|
+
* component folder is rejected with a {@link ValidationError}.
|
|
78448
79294
|
* @throws {ValidationError} When the server rejects the payload.
|
|
78449
79295
|
*
|
|
78450
79296
|
* @example
|
|
@@ -78454,12 +79300,13 @@ var TestsModule = class {
|
|
|
78454
79300
|
* ```
|
|
78455
79301
|
*/
|
|
78456
79302
|
import = async (payload, fmt2, options = {}) => {
|
|
78457
|
-
const { conflictMode, ...requestOptions } = options;
|
|
79303
|
+
const { conflictMode, folderId, ...requestOptions } = options;
|
|
78458
79304
|
const form = buildTestImportFormData(payload, fmt2);
|
|
78459
79305
|
return this.#client.postForm("/tests/import/", form, {
|
|
78460
79306
|
...requestOptions,
|
|
78461
79307
|
queryParams: {
|
|
78462
|
-
conflictMode
|
|
79308
|
+
conflictMode,
|
|
79309
|
+
folderId
|
|
78463
79310
|
}
|
|
78464
79311
|
});
|
|
78465
79312
|
};
|
|
@@ -78728,7 +79575,7 @@ var readEnvFiles2 = (cwd) => {
|
|
|
78728
79575
|
var buildUserAgent2 = (clientType, version2) => `BugBug ${clientType.toUpperCase()} ${version2}`;
|
|
78729
79576
|
var package_default2 = {
|
|
78730
79577
|
name: "@bugbug-io/core",
|
|
78731
|
-
version: "14.
|
|
79578
|
+
version: "14.21.0",
|
|
78732
79579
|
private: true,
|
|
78733
79580
|
type: "module",
|
|
78734
79581
|
main: "dist/index.js",
|
|
@@ -78963,6 +79810,7 @@ var RateLimiter = class {
|
|
|
78963
79810
|
maxRequests: config2.maxRequests,
|
|
78964
79811
|
windowMs: config2.windowMs,
|
|
78965
79812
|
maxConcurrentRequests: config2.maxConcurrentRequests ?? Number.POSITIVE_INFINITY,
|
|
79813
|
+
maxQueueWaitMs: config2.maxQueueWaitMs ?? 0,
|
|
78966
79814
|
retryAfter: config2.retryAfter || 1e3,
|
|
78967
79815
|
retryServer429: config2.retryServer429 ?? true,
|
|
78968
79816
|
exponentialBackoff: {
|
|
@@ -79002,12 +79850,22 @@ var RateLimiter = class {
|
|
|
79002
79850
|
*/
|
|
79003
79851
|
async execute(fn, options = {}) {
|
|
79004
79852
|
const retryServer429 = options.retryServer429 ?? this.#config.retryServer429;
|
|
79853
|
+
const retryThrottled = options.retryThrottled ?? false;
|
|
79854
|
+
const retryNetworkErrors = options.retryNetworkErrors ?? false;
|
|
79005
79855
|
let lastError = null;
|
|
79856
|
+
let queuedMs = 0;
|
|
79006
79857
|
await this.#acquireSlot();
|
|
79007
79858
|
try {
|
|
79008
79859
|
for (let attempt = 0; attempt <= this.#config.exponentialBackoff.maxRetries; attempt++) {
|
|
79009
79860
|
if (!this.#canMakeRequest()) {
|
|
79010
79861
|
const waitTime = this.#getWaitTime();
|
|
79862
|
+
if (queuedMs + waitTime <= this.#config.maxQueueWaitMs) {
|
|
79863
|
+
const sleepMs = Math.max(waitTime, 1);
|
|
79864
|
+
queuedMs += sleepMs;
|
|
79865
|
+
await this.#sleep(sleepMs + 1);
|
|
79866
|
+
attempt -= 1;
|
|
79867
|
+
continue;
|
|
79868
|
+
}
|
|
79011
79869
|
const gateError = new RateLimitError(
|
|
79012
79870
|
waitTime,
|
|
79013
79871
|
`Rate limit exceeded. Wait ${waitTime}ms before retrying.`
|
|
@@ -79024,11 +79882,19 @@ var RateLimiter = class {
|
|
|
79024
79882
|
return await fn();
|
|
79025
79883
|
} catch (fnError) {
|
|
79026
79884
|
this.#releaseRequest(stamp);
|
|
79885
|
+
if (fnError instanceof NetworkError) {
|
|
79886
|
+
if (!retryNetworkErrors || attempt === this.#config.exponentialBackoff.maxRetries) {
|
|
79887
|
+
throw fnError;
|
|
79888
|
+
}
|
|
79889
|
+
lastError = fnError;
|
|
79890
|
+
await this.#sleep(this.#computeBackoff(attempt));
|
|
79891
|
+
continue;
|
|
79892
|
+
}
|
|
79027
79893
|
if (!(fnError instanceof RateLimitError)) {
|
|
79028
79894
|
throw fnError;
|
|
79029
79895
|
}
|
|
79030
79896
|
lastError = fnError;
|
|
79031
|
-
if (!retryServer429) {
|
|
79897
|
+
if (!retryServer429 && !(retryThrottled && fnError.throttled)) {
|
|
79032
79898
|
throw fnError;
|
|
79033
79899
|
}
|
|
79034
79900
|
if (attempt === this.#config.exponentialBackoff.maxRetries) {
|
|
@@ -79228,6 +80094,12 @@ function extractSubscriptionUpgradeUrl(body) {
|
|
|
79228
80094
|
}
|
|
79229
80095
|
return void 0;
|
|
79230
80096
|
}
|
|
80097
|
+
function isThrottledErrorBody(body) {
|
|
80098
|
+
const errorDetails = Array.isArray(body) ? body : [body];
|
|
80099
|
+
return errorDetails.some(
|
|
80100
|
+
(errorDetail) => Boolean(errorDetail) && typeof errorDetail === "object" && errorDetail.code === "throttled"
|
|
80101
|
+
);
|
|
80102
|
+
}
|
|
79231
80103
|
function formatApiErrorValue(value, path3 = "") {
|
|
79232
80104
|
if (typeof value === "string") return value;
|
|
79233
80105
|
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
@@ -79453,7 +80325,11 @@ var BugBugApiClient = class {
|
|
|
79453
80325
|
throw this.#toTransportError(error62, requestOrigin, abortContext);
|
|
79454
80326
|
}
|
|
79455
80327
|
},
|
|
79456
|
-
{
|
|
80328
|
+
{
|
|
80329
|
+
retryServer429: this.#canRetryServer429(method),
|
|
80330
|
+
retryThrottled: this.#config.rateLimit.retryServer429 !== false,
|
|
80331
|
+
retryNetworkErrors: method === "GET"
|
|
80332
|
+
}
|
|
79457
80333
|
);
|
|
79458
80334
|
};
|
|
79459
80335
|
/**
|
|
@@ -79510,7 +80386,8 @@ var BugBugApiClient = class {
|
|
|
79510
80386
|
parseRetryAfterMs(response?.headers.get("Retry-After")),
|
|
79511
80387
|
errorMessage || "Rate limit exceeded",
|
|
79512
80388
|
response,
|
|
79513
|
-
requestWithResponseContext
|
|
80389
|
+
requestWithResponseContext,
|
|
80390
|
+
isThrottledErrorBody(errorBody)
|
|
79514
80391
|
);
|
|
79515
80392
|
}
|
|
79516
80393
|
case 500:
|
|
@@ -79554,13 +80431,28 @@ var BugBugApiClient = class {
|
|
|
79554
80431
|
*/
|
|
79555
80432
|
get = async (path3, options = {}) => {
|
|
79556
80433
|
const { queryParams, pathParams, ...requestOptions } = options;
|
|
79557
|
-
|
|
80434
|
+
if (queryParams === void 0 || !("cursor" in queryParams)) {
|
|
80435
|
+
return this.#makeRequest("GET", path3, {
|
|
80436
|
+
params: { query: queryParams, path: pathParams },
|
|
80437
|
+
...requestOptions
|
|
80438
|
+
});
|
|
80439
|
+
}
|
|
80440
|
+
const { cursor, ...otherParams } = queryParams;
|
|
80441
|
+
const parsedCursor = parseCursor(cursor);
|
|
80442
|
+
const pageSize = toPositiveInt(otherParams.page_size) ?? parsedCursor?.pageSize;
|
|
80443
|
+
requireKnownPageSize(parsedCursor, pageSize);
|
|
80444
|
+
const response = await this.#makeRequest("GET", path3, {
|
|
79558
80445
|
params: {
|
|
79559
|
-
query:
|
|
80446
|
+
query: {
|
|
80447
|
+
...otherParams,
|
|
80448
|
+
...pageSize === void 0 ? {} : { page_size: pageSize },
|
|
80449
|
+
...parsedCursor ? { page: parsedCursor.page } : {}
|
|
80450
|
+
},
|
|
79560
80451
|
path: pathParams
|
|
79561
80452
|
},
|
|
79562
80453
|
...requestOptions
|
|
79563
80454
|
});
|
|
80455
|
+
return withNextToken(response, pageSize);
|
|
79564
80456
|
};
|
|
79565
80457
|
/**
|
|
79566
80458
|
* Issue a POST request. The body is JSON-serialized by openapi-fetch.
|
|
@@ -79803,7 +80695,11 @@ var BugBugApiClient = class {
|
|
|
79803
80695
|
throw this.#toTransportError(error62, requestOrigin, abortContext);
|
|
79804
80696
|
}
|
|
79805
80697
|
},
|
|
79806
|
-
{
|
|
80698
|
+
{
|
|
80699
|
+
retryServer429: this.#canRetryServer429(method),
|
|
80700
|
+
retryThrottled: this.#config.rateLimit.retryServer429 !== false,
|
|
80701
|
+
retryNetworkErrors: method === "GET"
|
|
80702
|
+
}
|
|
79807
80703
|
);
|
|
79808
80704
|
};
|
|
79809
80705
|
#canRetryServer429 = (method) => method === "GET" && this.#config.rateLimit.retryServer429 !== false;
|
|
@@ -80472,6 +81368,7 @@ var getSuiteRun = async (runId) => {
|
|
|
80472
81368
|
const run = await getSdk().suites.getRun(runId);
|
|
80473
81369
|
return toRunState(run);
|
|
80474
81370
|
};
|
|
81371
|
+
var getSuiteRunSummary = async (runId) => getSdk().suites.getRunSummary(runId);
|
|
80475
81372
|
var stopSuiteRun = async (runId) => {
|
|
80476
81373
|
const run = await getSdk().suites.stopRun(runId);
|
|
80477
81374
|
return toRunState(run);
|
|
@@ -80484,6 +81381,26 @@ var setSuiteRunNotes = async (runId, notes) => {
|
|
|
80484
81381
|
};
|
|
80485
81382
|
var getSuiteRunJunitReport = async (runId) => getSdk().suites.downloadRunJunitReport(runId, { timeout: 6e5 });
|
|
80486
81383
|
|
|
81384
|
+
// src/features/suiteRuns/suiteRuns.utils.ts
|
|
81385
|
+
var getSuiteRunName = (run) => run.name || run.id;
|
|
81386
|
+
var formatSuiteRunSummary = (summary) => {
|
|
81387
|
+
const statuses = Object.entries(summary.totals.byStatus).map(([status, count2]) => `${count2} ${status}`).join(", ");
|
|
81388
|
+
const lines = [
|
|
81389
|
+
`Suite run ${summary.id}: ${summary.status}`,
|
|
81390
|
+
`Tests: ${summary.totals.total} (${statuses || "none"})`
|
|
81391
|
+
];
|
|
81392
|
+
if (summary.webappUrl) lines.push(`URL: ${summary.webappUrl}`);
|
|
81393
|
+
if (summary.failedTests.length > 0) {
|
|
81394
|
+
lines.push(`Failed tests (${summary.failedTestsCount}):`);
|
|
81395
|
+
for (const { name, testRunId, errorCode, failingStep } of summary.failedTests) {
|
|
81396
|
+
const step = failingStep ? ` - step ${failingStep.stepType ?? "unknown"} (${failingStep.stepRunId})${failingStep.error ? `: ${failingStep.error}` : ""}` : "";
|
|
81397
|
+
lines.push(` ${name} (${testRunId})${errorCode ? ` [${errorCode}]` : ""}${step}`);
|
|
81398
|
+
}
|
|
81399
|
+
}
|
|
81400
|
+
return `${lines.join("\n")}
|
|
81401
|
+
`;
|
|
81402
|
+
};
|
|
81403
|
+
|
|
80487
81404
|
// ../core/dist/utils/variables.js
|
|
80488
81405
|
var parseVariables = (entries) => entries.map((entry) => {
|
|
80489
81406
|
const idx = entry.indexOf("=");
|
|
@@ -80524,7 +81441,7 @@ var loadSuiteTableResources = async (query) => {
|
|
|
80524
81441
|
})
|
|
80525
81442
|
);
|
|
80526
81443
|
return resources.toSorted(
|
|
80527
|
-
(a,
|
|
81444
|
+
(a, b3) => (a.name ?? a.id).localeCompare(b3.name ?? b3.id, void 0, { sensitivity: "base" })
|
|
80528
81445
|
);
|
|
80529
81446
|
};
|
|
80530
81447
|
var getSuiteDetails = async (suiteId) => {
|
|
@@ -80626,7 +81543,7 @@ var loadTestTableResources = async (query) => {
|
|
|
80626
81543
|
const tests = await listTests({ query: query || void 0, latestRun: true });
|
|
80627
81544
|
const resources = tests.map(toTestTableResource);
|
|
80628
81545
|
return resources.toSorted(
|
|
80629
|
-
(a,
|
|
81546
|
+
(a, b3) => (a.name ?? a.id).localeCompare(b3.name ?? b3.id, void 0, { sensitivity: "base" })
|
|
80630
81547
|
);
|
|
80631
81548
|
};
|
|
80632
81549
|
var getTestDetails = async (testId) => {
|
|
@@ -80699,7 +81616,8 @@ var importTest = async (file2, options = {}) => {
|
|
|
80699
81616
|
const fmt2 = detectFormat(path3);
|
|
80700
81617
|
const payload = fmt2 === "yaml" ? readFileSync8(path3, "utf8") : new Uint8Array(readFileSync8(path3));
|
|
80701
81618
|
return getSdk().tests.import(payload, fmt2, {
|
|
80702
|
-
conflictMode: options.conflictMode
|
|
81619
|
+
conflictMode: options.conflictMode,
|
|
81620
|
+
folderId: options.folderId
|
|
80703
81621
|
});
|
|
80704
81622
|
};
|
|
80705
81623
|
|
|
@@ -80828,10 +81746,13 @@ export {
|
|
|
80828
81746
|
getSuiteRunDetails,
|
|
80829
81747
|
getSuiteRunTestRuns,
|
|
80830
81748
|
getSuiteRun,
|
|
81749
|
+
getSuiteRunSummary,
|
|
80831
81750
|
stopSuiteRun,
|
|
80832
81751
|
setSuiteRunTags,
|
|
80833
81752
|
setSuiteRunNotes,
|
|
80834
81753
|
getSuiteRunJunitReport,
|
|
81754
|
+
getSuiteRunName,
|
|
81755
|
+
formatSuiteRunSummary,
|
|
80835
81756
|
listSuites,
|
|
80836
81757
|
getSuite,
|
|
80837
81758
|
loadSuiteTableResources,
|
|
@@ -80861,5 +81782,5 @@ export {
|
|
|
80861
81782
|
formatErrorMessage,
|
|
80862
81783
|
showError
|
|
80863
81784
|
};
|
|
80864
|
-
//# sourceMappingURL=chunk-
|
|
80865
|
-
//# debugId=
|
|
81785
|
+
//# sourceMappingURL=chunk-FRVHF76K.js.map
|
|
81786
|
+
//# debugId=6e4c7cfe-bf6b-52a3-91ab-a0fc48aa74b7
|