create-cloudflare 2.72.9 → 2.72.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1781 -952
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -35472,7 +35472,7 @@ var require_index_688c5d50 = __commonJS({
|
|
|
35472
35472
|
var TEMPLATE_REGEX2 = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
35473
35473
|
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
35474
35474
|
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
35475
|
-
var
|
|
35475
|
+
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
35476
35476
|
var ESCAPES4 = /* @__PURE__ */ new Map([
|
|
35477
35477
|
["n", "\n"],
|
|
35478
35478
|
["r", "\r"],
|
|
@@ -35505,7 +35505,7 @@ var require_index_688c5d50 = __commonJS({
|
|
|
35505
35505
|
if (!Number.isNaN(number4)) {
|
|
35506
35506
|
results.push(number4);
|
|
35507
35507
|
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
35508
|
-
results.push(matches[2].replace(
|
|
35508
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m2, escape, character) => escape ? unescape(escape) : character));
|
|
35509
35509
|
} else {
|
|
35510
35510
|
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name3}')`);
|
|
35511
35511
|
}
|
|
@@ -50263,7 +50263,7 @@ var require_types = __commonJS({
|
|
|
50263
50263
|
});
|
|
50264
50264
|
|
|
50265
50265
|
// ../../node_modules/.pnpm/ast-types@0.16.1/node_modules/ast-types/lib/path.js
|
|
50266
|
-
var
|
|
50266
|
+
var require_path2 = __commonJS({
|
|
50267
50267
|
"../../node_modules/.pnpm/ast-types@0.16.1/node_modules/ast-types/lib/path.js"(exports2, module2) {
|
|
50268
50268
|
"use strict";
|
|
50269
50269
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -50865,7 +50865,7 @@ var require_node_path = __commonJS({
|
|
|
50865
50865
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
50866
50866
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
50867
50867
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
50868
|
-
var path_1 = tslib_1.__importDefault(
|
|
50868
|
+
var path_1 = tslib_1.__importDefault(require_path2());
|
|
50869
50869
|
var scope_1 = tslib_1.__importDefault(require_scope());
|
|
50870
50870
|
var shared_1 = require_shared();
|
|
50871
50871
|
function nodePathPlugin(fork) {
|
|
@@ -51676,7 +51676,7 @@ var require_fork = __commonJS({
|
|
|
51676
51676
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
51677
51677
|
var path_visitor_1 = tslib_1.__importDefault(require_path_visitor());
|
|
51678
51678
|
var equiv_1 = tslib_1.__importDefault(require_equiv());
|
|
51679
|
-
var path_1 = tslib_1.__importDefault(
|
|
51679
|
+
var path_1 = tslib_1.__importDefault(require_path2());
|
|
51680
51680
|
var node_path_1 = tslib_1.__importDefault(require_node_path());
|
|
51681
51681
|
var shared_1 = require_shared();
|
|
51682
51682
|
function default_1(plugins) {
|
|
@@ -77461,7 +77461,7 @@ function dedent(templ) {
|
|
|
77461
77461
|
__name(dedent, "dedent");
|
|
77462
77462
|
var esm_default = dedent;
|
|
77463
77463
|
|
|
77464
|
-
// ../workers-utils/dist/chunk-
|
|
77464
|
+
// ../workers-utils/dist/chunk-IKXB77SR.mjs
|
|
77465
77465
|
init_chunk_Q72B4Q5Z();
|
|
77466
77466
|
var import_node_fs = require("node:fs");
|
|
77467
77467
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
@@ -77495,7 +77495,6 @@ function hasDurableObjectExports(exports$1) {
|
|
|
77495
77495
|
return Object.keys(getDurableObjectExports(exports$1)).length > 0;
|
|
77496
77496
|
}
|
|
77497
77497
|
__name(hasDurableObjectExports, "hasDurableObjectExports");
|
|
77498
|
-
var CONTAINER_IMAGES_BINDING = "EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES";
|
|
77499
77498
|
function isDurableObjectContainerApp(container) {
|
|
77500
77499
|
return container.scheduling_policy === "durable_object";
|
|
77501
77500
|
}
|
|
@@ -79044,128 +79043,7 @@ function applyEdits(text, edits) {
|
|
|
79044
79043
|
return text;
|
|
79045
79044
|
}
|
|
79046
79045
|
__name(applyEdits, "applyEdits");
|
|
79047
|
-
|
|
79048
|
-
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
79049
|
-
return [lines.length, lines.pop().length + 1];
|
|
79050
|
-
}
|
|
79051
|
-
__name(getLineColFromPtr, "getLineColFromPtr");
|
|
79052
|
-
function makeCodeBlock(string4, line, column) {
|
|
79053
|
-
let lines = string4.split(/\r\n|\n|\r/g);
|
|
79054
|
-
let codeblock = "";
|
|
79055
|
-
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
79056
|
-
for (let i = line - 1; i <= line + 1; i++) {
|
|
79057
|
-
let l = lines[i - 1];
|
|
79058
|
-
if (!l)
|
|
79059
|
-
continue;
|
|
79060
|
-
codeblock += i.toString().padEnd(numberLen, " ");
|
|
79061
|
-
codeblock += ": ";
|
|
79062
|
-
codeblock += l;
|
|
79063
|
-
codeblock += "\n";
|
|
79064
|
-
if (i === line) {
|
|
79065
|
-
codeblock += " ".repeat(numberLen + column + 2);
|
|
79066
|
-
codeblock += "^\n";
|
|
79067
|
-
}
|
|
79068
|
-
}
|
|
79069
|
-
return codeblock;
|
|
79070
|
-
}
|
|
79071
|
-
__name(makeCodeBlock, "makeCodeBlock");
|
|
79072
|
-
var TomlError = class extends Error {
|
|
79073
|
-
static {
|
|
79074
|
-
__name(this, "TomlError");
|
|
79075
|
-
}
|
|
79076
|
-
line;
|
|
79077
|
-
column;
|
|
79078
|
-
codeblock;
|
|
79079
|
-
constructor(message, options) {
|
|
79080
|
-
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
79081
|
-
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
79082
|
-
super(`Invalid TOML document: ${message}
|
|
79083
|
-
|
|
79084
|
-
${codeblock}`, options);
|
|
79085
|
-
this.line = line;
|
|
79086
|
-
this.column = column;
|
|
79087
|
-
this.codeblock = codeblock;
|
|
79088
|
-
}
|
|
79089
|
-
};
|
|
79090
|
-
function isEscaped(str, ptr) {
|
|
79091
|
-
let i = 0;
|
|
79092
|
-
while (str[ptr - ++i] === "\\")
|
|
79093
|
-
;
|
|
79094
|
-
return --i && i % 2;
|
|
79095
|
-
}
|
|
79096
|
-
__name(isEscaped, "isEscaped");
|
|
79097
|
-
function indexOfNewline(str, start = 0, end = str.length) {
|
|
79098
|
-
let idx = str.indexOf("\n", start);
|
|
79099
|
-
if (str[idx - 1] === "\r")
|
|
79100
|
-
idx--;
|
|
79101
|
-
return idx <= end ? idx : -1;
|
|
79102
|
-
}
|
|
79103
|
-
__name(indexOfNewline, "indexOfNewline");
|
|
79104
|
-
function skipComment(str, ptr) {
|
|
79105
|
-
for (let i = ptr; i < str.length; i++) {
|
|
79106
|
-
let c2 = str[i];
|
|
79107
|
-
if (c2 === "\n")
|
|
79108
|
-
return i;
|
|
79109
|
-
if (c2 === "\r" && str[i + 1] === "\n")
|
|
79110
|
-
return i + 1;
|
|
79111
|
-
if (c2 < " " && c2 !== " " || c2 === "\x7F") {
|
|
79112
|
-
throw new TomlError("control characters are not allowed in comments", {
|
|
79113
|
-
toml: str,
|
|
79114
|
-
ptr
|
|
79115
|
-
});
|
|
79116
|
-
}
|
|
79117
|
-
}
|
|
79118
|
-
return str.length;
|
|
79119
|
-
}
|
|
79120
|
-
__name(skipComment, "skipComment");
|
|
79121
|
-
function skipVoid(str, ptr, banNewLines, banComments) {
|
|
79122
|
-
let c2;
|
|
79123
|
-
while ((c2 = str[ptr]) === " " || c2 === " " || !banNewLines && (c2 === "\n" || c2 === "\r" && str[ptr + 1] === "\n"))
|
|
79124
|
-
ptr++;
|
|
79125
|
-
return banComments || c2 !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
|
|
79126
|
-
}
|
|
79127
|
-
__name(skipVoid, "skipVoid");
|
|
79128
|
-
function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
|
79129
|
-
if (!end) {
|
|
79130
|
-
ptr = indexOfNewline(str, ptr);
|
|
79131
|
-
return ptr < 0 ? str.length : ptr;
|
|
79132
|
-
}
|
|
79133
|
-
for (let i = ptr; i < str.length; i++) {
|
|
79134
|
-
let c2 = str[i];
|
|
79135
|
-
if (c2 === "#") {
|
|
79136
|
-
i = indexOfNewline(str, i);
|
|
79137
|
-
} else if (c2 === sep) {
|
|
79138
|
-
return i + 1;
|
|
79139
|
-
} else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i + 1] === "\n")) {
|
|
79140
|
-
return i;
|
|
79141
|
-
}
|
|
79142
|
-
}
|
|
79143
|
-
throw new TomlError("cannot find end of structure", {
|
|
79144
|
-
toml: str,
|
|
79145
|
-
ptr
|
|
79146
|
-
});
|
|
79147
|
-
}
|
|
79148
|
-
__name(skipUntil, "skipUntil");
|
|
79149
|
-
function getStringEnd(str, seek) {
|
|
79150
|
-
let first = str[seek];
|
|
79151
|
-
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
79152
|
-
seek += target.length - 1;
|
|
79153
|
-
do
|
|
79154
|
-
seek = str.indexOf(target, ++seek);
|
|
79155
|
-
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
|
79156
|
-
if (seek > -1) {
|
|
79157
|
-
seek += target.length;
|
|
79158
|
-
if (target.length > 1) {
|
|
79159
|
-
if (str[seek] === first)
|
|
79160
|
-
seek++;
|
|
79161
|
-
if (str[seek] === first)
|
|
79162
|
-
seek++;
|
|
79163
|
-
}
|
|
79164
|
-
}
|
|
79165
|
-
return seek;
|
|
79166
|
-
}
|
|
79167
|
-
__name(getStringEnd, "getStringEnd");
|
|
79168
|
-
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
79046
|
+
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
79169
79047
|
var TomlDate = class _TomlDate extends Date {
|
|
79170
79048
|
static {
|
|
79171
79049
|
__name(this, "TomlDate");
|
|
@@ -79258,98 +79136,230 @@ var TomlDate = class _TomlDate extends Date {
|
|
|
79258
79136
|
return date5;
|
|
79259
79137
|
}
|
|
79260
79138
|
};
|
|
79139
|
+
function getLineColFromPtr(string4, ptr) {
|
|
79140
|
+
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
79141
|
+
return [lines.length, lines.pop().length + 1];
|
|
79142
|
+
}
|
|
79143
|
+
__name(getLineColFromPtr, "getLineColFromPtr");
|
|
79144
|
+
function makeCodeBlock(string4, line, column) {
|
|
79145
|
+
let lines = string4.split(/\r\n|\n|\r/g);
|
|
79146
|
+
let codeblock = "";
|
|
79147
|
+
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
79148
|
+
for (let i = line - 1; i <= line + 1; i++) {
|
|
79149
|
+
let l = lines[i - 1];
|
|
79150
|
+
if (!l)
|
|
79151
|
+
continue;
|
|
79152
|
+
codeblock += i.toString().padEnd(numberLen, " ");
|
|
79153
|
+
codeblock += ": ";
|
|
79154
|
+
codeblock += l;
|
|
79155
|
+
codeblock += "\n";
|
|
79156
|
+
if (i === line) {
|
|
79157
|
+
codeblock += " ".repeat(numberLen + column + 2);
|
|
79158
|
+
codeblock += "^\n";
|
|
79159
|
+
}
|
|
79160
|
+
}
|
|
79161
|
+
return codeblock;
|
|
79162
|
+
}
|
|
79163
|
+
__name(makeCodeBlock, "makeCodeBlock");
|
|
79164
|
+
var TomlError = class extends Error {
|
|
79165
|
+
static {
|
|
79166
|
+
__name(this, "TomlError");
|
|
79167
|
+
}
|
|
79168
|
+
line;
|
|
79169
|
+
column;
|
|
79170
|
+
codeblock;
|
|
79171
|
+
constructor(message, options) {
|
|
79172
|
+
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
79173
|
+
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
79174
|
+
super(`Invalid TOML document: ${message}
|
|
79175
|
+
|
|
79176
|
+
${codeblock}`, options);
|
|
79177
|
+
this.line = line;
|
|
79178
|
+
this.column = column;
|
|
79179
|
+
this.codeblock = codeblock;
|
|
79180
|
+
}
|
|
79181
|
+
};
|
|
79182
|
+
function indexOfNewline(str, start = 0) {
|
|
79183
|
+
let idx = str.indexOf("\n", start);
|
|
79184
|
+
if (str.charCodeAt(idx - 1) === 13)
|
|
79185
|
+
idx--;
|
|
79186
|
+
return idx;
|
|
79187
|
+
}
|
|
79188
|
+
__name(indexOfNewline, "indexOfNewline");
|
|
79189
|
+
function skipComment(ctx) {
|
|
79190
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
79191
|
+
let c2 = ctx.s.charCodeAt(ctx.p);
|
|
79192
|
+
if (c2 === 10)
|
|
79193
|
+
break;
|
|
79194
|
+
if (c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
|
|
79195
|
+
ctx.p++;
|
|
79196
|
+
break;
|
|
79197
|
+
}
|
|
79198
|
+
if (c2 < 32 && c2 !== 9 || c2 === 127) {
|
|
79199
|
+
throw new TomlError("control characters are not allowed in comments", {
|
|
79200
|
+
toml: ctx.s,
|
|
79201
|
+
ptr: ctx.p
|
|
79202
|
+
});
|
|
79203
|
+
}
|
|
79204
|
+
}
|
|
79205
|
+
}
|
|
79206
|
+
__name(skipComment, "skipComment");
|
|
79207
|
+
function skipVoid(ctx, banNewLines, banComments) {
|
|
79208
|
+
let c2;
|
|
79209
|
+
while (1) {
|
|
79210
|
+
while ((c2 = ctx.s.charCodeAt(ctx.p)) === 32 || c2 === 9 || !banNewLines && (c2 === 10 || c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
|
|
79211
|
+
ctx.p++;
|
|
79212
|
+
if (banComments || c2 !== 35)
|
|
79213
|
+
break;
|
|
79214
|
+
skipComment(ctx);
|
|
79215
|
+
}
|
|
79216
|
+
}
|
|
79217
|
+
__name(skipVoid, "skipVoid");
|
|
79218
|
+
function skipUntil(ctx, sep, end) {
|
|
79219
|
+
let ptr = ctx.p;
|
|
79220
|
+
if (!end) {
|
|
79221
|
+
ptr = indexOfNewline(ctx.s, ptr);
|
|
79222
|
+
ctx.p = ptr < 0 ? ctx.s.length : ptr;
|
|
79223
|
+
return;
|
|
79224
|
+
}
|
|
79225
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
79226
|
+
let c2 = ctx.s.charCodeAt(ctx.p);
|
|
79227
|
+
if (c2 === 35) {
|
|
79228
|
+
skipComment(ctx);
|
|
79229
|
+
} else if (c2 === end || c2 === sep) {
|
|
79230
|
+
return;
|
|
79231
|
+
}
|
|
79232
|
+
}
|
|
79233
|
+
throw new TomlError("cannot find end of structure", {
|
|
79234
|
+
toml: ctx.s,
|
|
79235
|
+
ptr
|
|
79236
|
+
});
|
|
79237
|
+
}
|
|
79238
|
+
__name(skipUntil, "skipUntil");
|
|
79261
79239
|
var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
79262
79240
|
var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
79263
79241
|
var LEADING_ZERO = /^[+-]?0[0-9_]/;
|
|
79264
|
-
|
|
79265
|
-
|
|
79266
|
-
|
|
79267
|
-
|
|
79268
|
-
|
|
79269
|
-
|
|
79270
|
-
r: "\r",
|
|
79271
|
-
'"': '"',
|
|
79272
|
-
"\\": "\\"
|
|
79273
|
-
};
|
|
79274
|
-
function parseString(str, ptr = 0, endPtr = str.length) {
|
|
79275
|
-
let isLiteral = str[ptr] === "'";
|
|
79276
|
-
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
|
79242
|
+
function parseString(ctx) {
|
|
79243
|
+
let start = ctx.p;
|
|
79244
|
+
let c2 = ctx.s.charCodeAt(ctx.p++);
|
|
79245
|
+
let first = c2;
|
|
79246
|
+
let isLiteral = c2 === 39;
|
|
79247
|
+
let isMultiline = c2 === ctx.s.charCodeAt(ctx.p) && c2 === ctx.s.charCodeAt(ctx.p + 1);
|
|
79277
79248
|
if (isMultiline) {
|
|
79278
|
-
|
|
79279
|
-
|
|
79280
|
-
|
|
79281
|
-
|
|
79282
|
-
|
|
79283
|
-
}
|
|
79284
|
-
let tmp = 0;
|
|
79285
|
-
let isEscape;
|
|
79249
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p += 2)) === 10)
|
|
79250
|
+
ctx.p++;
|
|
79251
|
+
else if (c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
|
|
79252
|
+
ctx.p += 2;
|
|
79253
|
+
}
|
|
79286
79254
|
let parsed = "";
|
|
79287
|
-
let sliceStart =
|
|
79288
|
-
|
|
79289
|
-
|
|
79290
|
-
|
|
79291
|
-
|
|
79292
|
-
|
|
79293
|
-
|
|
79294
|
-
ptr: ptr - 1
|
|
79295
|
-
});
|
|
79296
|
-
}
|
|
79297
|
-
} else if (c2 < " " && c2 !== " " || c2 === "\x7F") {
|
|
79255
|
+
let sliceStart = ctx.p;
|
|
79256
|
+
let state = 0;
|
|
79257
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
79258
|
+
c2 = ctx.s.charCodeAt(ctx.p);
|
|
79259
|
+
if (isMultiline && (c2 === 10 || c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
|
|
79260
|
+
state = state && 3;
|
|
79261
|
+
} else if (c2 < 32 && c2 !== 9 || c2 === 127) {
|
|
79298
79262
|
throw new TomlError("control characters are not allowed in strings", {
|
|
79299
|
-
toml:
|
|
79300
|
-
ptr:
|
|
79263
|
+
toml: ctx.s,
|
|
79264
|
+
ptr: ctx.p
|
|
79301
79265
|
});
|
|
79302
|
-
}
|
|
79303
|
-
|
|
79304
|
-
|
|
79305
|
-
|
|
79306
|
-
|
|
79307
|
-
|
|
79308
|
-
|
|
79309
|
-
|
|
79310
|
-
|
|
79311
|
-
|
|
79312
|
-
|
|
79313
|
-
|
|
79314
|
-
|
|
79315
|
-
|
|
79316
|
-
|
|
79317
|
-
|
|
79318
|
-
|
|
79319
|
-
|
|
79320
|
-
|
|
79321
|
-
|
|
79322
|
-
|
|
79323
|
-
|
|
79324
|
-
|
|
79325
|
-
|
|
79326
|
-
|
|
79327
|
-
|
|
79328
|
-
|
|
79329
|
-
|
|
79330
|
-
|
|
79331
|
-
|
|
79266
|
+
} else if ((!state || state === 3) && c2 === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
|
|
79267
|
+
if (isMultiline) {
|
|
79268
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
79269
|
+
ctx.p++;
|
|
79270
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
79271
|
+
ctx.p++;
|
|
79272
|
+
}
|
|
79273
|
+
if (!state)
|
|
79274
|
+
parsed += ctx.s.slice(sliceStart, ctx.p);
|
|
79275
|
+
ctx.p += isMultiline ? 3 : 1;
|
|
79276
|
+
return parsed;
|
|
79277
|
+
} else if (!state) {
|
|
79278
|
+
if (!isLiteral && c2 === 92) {
|
|
79279
|
+
parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
|
|
79280
|
+
state = 1;
|
|
79281
|
+
}
|
|
79282
|
+
} else if (state === 1) {
|
|
79283
|
+
if (c2 === 120 || c2 === 117 || c2 === 85) {
|
|
79284
|
+
let value = 0;
|
|
79285
|
+
let len = c2 === 120 ? 2 : c2 === 117 ? 4 : 8;
|
|
79286
|
+
for (let j2 = 0; j2 < len; j2++, ctx.p++) {
|
|
79287
|
+
let hex3 = ctx.s.charCodeAt(ctx.p + 1);
|
|
79288
|
+
let digit = (
|
|
79289
|
+
/* 0-9 */
|
|
79290
|
+
hex3 >= 48 && hex3 <= 57 ? hex3 - 48 : (
|
|
79291
|
+
/* A-F */
|
|
79292
|
+
hex3 >= 65 && hex3 <= 70 ? hex3 - 65 + 10 : (
|
|
79293
|
+
/* a-f */
|
|
79294
|
+
hex3 >= 97 && hex3 <= 102 ? hex3 - 97 + 10 : -1
|
|
79295
|
+
)
|
|
79296
|
+
)
|
|
79297
|
+
);
|
|
79298
|
+
if (digit < 0)
|
|
79299
|
+
throw new TomlError("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
|
|
79300
|
+
value = value << 4 | digit;
|
|
79301
|
+
}
|
|
79302
|
+
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
|
79303
|
+
throw new TomlError("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
|
|
79304
|
+
}
|
|
79305
|
+
parsed += String.fromCodePoint(value);
|
|
79306
|
+
sliceStart = ctx.p + 1;
|
|
79307
|
+
state = 0;
|
|
79308
|
+
} else if (c2 === 32 || c2 === 9) {
|
|
79309
|
+
state = 2;
|
|
79332
79310
|
} else {
|
|
79333
|
-
|
|
79334
|
-
|
|
79335
|
-
|
|
79311
|
+
if (c2 === 98)
|
|
79312
|
+
parsed += "\b";
|
|
79313
|
+
else if (c2 === 116)
|
|
79314
|
+
parsed += " ";
|
|
79315
|
+
else if (c2 === 110)
|
|
79316
|
+
parsed += "\n";
|
|
79317
|
+
else if (c2 === 102)
|
|
79318
|
+
parsed += "\f";
|
|
79319
|
+
else if (c2 === 114)
|
|
79320
|
+
parsed += "\r";
|
|
79321
|
+
else if (c2 === 101)
|
|
79322
|
+
parsed += "\x1B";
|
|
79323
|
+
else if (c2 === 34)
|
|
79324
|
+
parsed += '"';
|
|
79325
|
+
else if (c2 === 92)
|
|
79326
|
+
parsed += "\\";
|
|
79327
|
+
else
|
|
79328
|
+
throw new TomlError("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
|
|
79329
|
+
sliceStart = ctx.p + 1;
|
|
79330
|
+
state = 0;
|
|
79331
|
+
}
|
|
79332
|
+
} else if (c2 !== 32 && c2 !== 9) {
|
|
79333
|
+
if (state === 2) {
|
|
79334
|
+
throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
|
|
79335
|
+
toml: ctx.s,
|
|
79336
|
+
ptr: sliceStart
|
|
79336
79337
|
});
|
|
79337
79338
|
}
|
|
79338
|
-
|
|
79339
|
-
|
|
79340
|
-
tmp = ptr - 1;
|
|
79341
|
-
isEscape = true;
|
|
79342
|
-
parsed += str.slice(sliceStart, tmp);
|
|
79339
|
+
state = !isLiteral && c2 === 92 ? 1 : 0;
|
|
79340
|
+
sliceStart = ctx.p;
|
|
79343
79341
|
}
|
|
79344
79342
|
}
|
|
79345
|
-
|
|
79343
|
+
throw new TomlError("unfinished string", { toml: ctx.s, ptr: start });
|
|
79346
79344
|
}
|
|
79347
79345
|
__name(parseString, "parseString");
|
|
79348
|
-
function
|
|
79349
|
-
|
|
79350
|
-
|
|
79351
|
-
if (
|
|
79352
|
-
|
|
79346
|
+
function sliceAndTrimEndOf(ctx, start, end) {
|
|
79347
|
+
let value = ctx.s.slice(start, end);
|
|
79348
|
+
let commentIdx = value.indexOf("#");
|
|
79349
|
+
if (commentIdx > 0) {
|
|
79350
|
+
skipComment({ s: value, p: commentIdx });
|
|
79351
|
+
value = value.slice(0, commentIdx);
|
|
79352
|
+
}
|
|
79353
|
+
return value.trimEnd();
|
|
79354
|
+
}
|
|
79355
|
+
__name(sliceAndTrimEndOf, "sliceAndTrimEndOf");
|
|
79356
|
+
function parseValue(ctx, integersAsBigInt, end) {
|
|
79357
|
+
let ptr = ctx.p;
|
|
79358
|
+
let err = { toml: ctx.s, ptr };
|
|
79359
|
+
skipUntil(ctx, 44, end);
|
|
79360
|
+
let value = sliceAndTrimEndOf(ctx, ptr, ctx.p);
|
|
79361
|
+
if (!value)
|
|
79362
|
+
throw new TomlError("incomplete declaration: value expected", err);
|
|
79353
79363
|
if (value === "-inf")
|
|
79354
79364
|
return -Infinity;
|
|
79355
79365
|
if (value === "inf" || value === "+inf")
|
|
@@ -79361,25 +79371,16 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
79361
79371
|
let isInt = INT_REGEX.test(value);
|
|
79362
79372
|
if (isInt || FLOAT_REGEX.test(value)) {
|
|
79363
79373
|
if (LEADING_ZERO.test(value)) {
|
|
79364
|
-
throw new TomlError("leading zeroes are not allowed",
|
|
79365
|
-
toml,
|
|
79366
|
-
ptr
|
|
79367
|
-
});
|
|
79374
|
+
throw new TomlError("leading zeroes are not allowed", err);
|
|
79368
79375
|
}
|
|
79369
79376
|
value = value.replace(/_/g, "");
|
|
79370
79377
|
let numeric = +value;
|
|
79371
79378
|
if (isNaN(numeric)) {
|
|
79372
|
-
throw new TomlError("invalid number",
|
|
79373
|
-
toml,
|
|
79374
|
-
ptr
|
|
79375
|
-
});
|
|
79379
|
+
throw new TomlError("invalid number", err);
|
|
79376
79380
|
}
|
|
79377
79381
|
if (isInt) {
|
|
79378
79382
|
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
79379
|
-
throw new TomlError("integer value cannot be represented losslessly",
|
|
79380
|
-
toml,
|
|
79381
|
-
ptr
|
|
79382
|
-
});
|
|
79383
|
+
throw new TomlError("integer value cannot be represented losslessly", err);
|
|
79383
79384
|
}
|
|
79384
79385
|
if (isInt || integersAsBigInt === true)
|
|
79385
79386
|
numeric = BigInt(value);
|
|
@@ -79387,246 +79388,184 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
79387
79388
|
return numeric;
|
|
79388
79389
|
}
|
|
79389
79390
|
const date5 = new TomlDate(value);
|
|
79390
|
-
if (!date5.isValid())
|
|
79391
|
-
throw new TomlError("invalid value",
|
|
79392
|
-
toml,
|
|
79393
|
-
ptr
|
|
79394
|
-
});
|
|
79395
|
-
}
|
|
79391
|
+
if (!date5.isValid())
|
|
79392
|
+
throw new TomlError("invalid value", err);
|
|
79396
79393
|
return date5;
|
|
79397
79394
|
}
|
|
79398
79395
|
__name(parseValue, "parseValue");
|
|
79399
|
-
function
|
|
79400
|
-
let
|
|
79401
|
-
let
|
|
79402
|
-
if (
|
|
79403
|
-
|
|
79404
|
-
|
|
79405
|
-
|
|
79406
|
-
|
|
79407
|
-
if (!allowNewLines) {
|
|
79408
|
-
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
79409
|
-
if (newlineIdx > -1) {
|
|
79410
|
-
throw new TomlError("newlines are not allowed in inline tables", {
|
|
79411
|
-
toml: str,
|
|
79412
|
-
ptr: startPtr + newlineIdx
|
|
79396
|
+
function extractValue(ctx, end, integersAsBigInt) {
|
|
79397
|
+
let ptr = ctx.p;
|
|
79398
|
+
let c2 = ctx.s.charCodeAt(ptr);
|
|
79399
|
+
if (c2 === 91 || c2 === 123) {
|
|
79400
|
+
if (!ctx.d--) {
|
|
79401
|
+
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
79402
|
+
toml: ctx.s,
|
|
79403
|
+
ptr
|
|
79413
79404
|
});
|
|
79414
79405
|
}
|
|
79406
|
+
let value = c2 === 91 ? parseArray(ctx, integersAsBigInt) : parseInlineTable(ctx, integersAsBigInt);
|
|
79407
|
+
ctx.d++;
|
|
79408
|
+
return value;
|
|
79415
79409
|
}
|
|
79416
|
-
|
|
79417
|
-
|
|
79418
|
-
__name(sliceAndTrimEndOf, "sliceAndTrimEndOf");
|
|
79419
|
-
function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
79420
|
-
if (depth === 0) {
|
|
79421
|
-
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
79422
|
-
toml: str,
|
|
79423
|
-
ptr
|
|
79424
|
-
});
|
|
79425
|
-
}
|
|
79426
|
-
let c2 = str[ptr];
|
|
79427
|
-
if (c2 === "[" || c2 === "{") {
|
|
79428
|
-
let [value, endPtr2] = c2 === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
|
|
79429
|
-
let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2;
|
|
79430
|
-
if (endPtr2 - newPtr && end === "}") {
|
|
79431
|
-
let nextNewLine = indexOfNewline(str, endPtr2, newPtr);
|
|
79432
|
-
if (nextNewLine > -1) {
|
|
79433
|
-
throw new TomlError("newlines are not allowed in inline tables", {
|
|
79434
|
-
toml: str,
|
|
79435
|
-
ptr: nextNewLine
|
|
79436
|
-
});
|
|
79437
|
-
}
|
|
79438
|
-
}
|
|
79439
|
-
return [value, newPtr];
|
|
79440
|
-
}
|
|
79441
|
-
let endPtr;
|
|
79442
|
-
if (c2 === '"' || c2 === "'") {
|
|
79443
|
-
endPtr = getStringEnd(str, ptr);
|
|
79444
|
-
let parsed = parseString(str, ptr, endPtr);
|
|
79445
|
-
if (end) {
|
|
79446
|
-
endPtr = skipVoid(str, endPtr, end !== "]");
|
|
79447
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
79448
|
-
throw new TomlError("unexpected character encountered", {
|
|
79449
|
-
toml: str,
|
|
79450
|
-
ptr: endPtr
|
|
79451
|
-
});
|
|
79452
|
-
}
|
|
79453
|
-
endPtr += +(str[endPtr] === ",");
|
|
79454
|
-
}
|
|
79455
|
-
return [parsed, endPtr];
|
|
79410
|
+
if (c2 === 34 || c2 === 39) {
|
|
79411
|
+
return parseString(ctx);
|
|
79456
79412
|
}
|
|
79457
|
-
|
|
79458
|
-
|
|
79459
|
-
|
|
79460
|
-
|
|
79461
|
-
|
|
79462
|
-
ptr
|
|
79463
|
-
});
|
|
79413
|
+
if (c2 === 116) {
|
|
79414
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
79415
|
+
throw new TomlError("invalid value", { toml: ctx.s, ptr });
|
|
79416
|
+
ctx.p++;
|
|
79417
|
+
return true;
|
|
79464
79418
|
}
|
|
79465
|
-
if (
|
|
79466
|
-
|
|
79467
|
-
|
|
79419
|
+
if (c2 === 102) {
|
|
79420
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
79421
|
+
throw new TomlError("invalid value", { toml: ctx.s, ptr });
|
|
79422
|
+
ctx.p++;
|
|
79423
|
+
return false;
|
|
79468
79424
|
}
|
|
79469
|
-
return
|
|
79470
|
-
parseValue(slice[0], str, ptr, integersAsBigInt),
|
|
79471
|
-
endPtr
|
|
79472
|
-
];
|
|
79425
|
+
return parseValue(ctx, integersAsBigInt, end);
|
|
79473
79426
|
}
|
|
79474
79427
|
__name(extractValue, "extractValue");
|
|
79475
79428
|
var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
79476
|
-
function parseKey(
|
|
79477
|
-
let
|
|
79429
|
+
function parseKey(ctx, end = "=") {
|
|
79430
|
+
let start = ctx.p;
|
|
79431
|
+
let dot = start - 1;
|
|
79478
79432
|
let parsed = [];
|
|
79479
|
-
let endPtr =
|
|
79433
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
79480
79434
|
if (endPtr < 0) {
|
|
79481
79435
|
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
79482
|
-
toml:
|
|
79483
|
-
ptr
|
|
79436
|
+
toml: ctx.s,
|
|
79437
|
+
ptr: start
|
|
79484
79438
|
});
|
|
79485
79439
|
}
|
|
79486
79440
|
do {
|
|
79487
|
-
let c2 =
|
|
79488
|
-
if (c2 !==
|
|
79489
|
-
if (c2 ===
|
|
79490
|
-
if (c2 ===
|
|
79441
|
+
let c2 = ctx.s.charCodeAt(ctx.p = ++dot);
|
|
79442
|
+
if (c2 !== 32 && c2 !== 9) {
|
|
79443
|
+
if (c2 === 34 || c2 === 39) {
|
|
79444
|
+
if (c2 === ctx.s.charCodeAt(ctx.p + 1) && c2 === ctx.s.charCodeAt(ctx.p + 2)) {
|
|
79491
79445
|
throw new TomlError("multiline strings are not allowed in keys", {
|
|
79492
|
-
toml:
|
|
79493
|
-
ptr
|
|
79446
|
+
toml: ctx.s,
|
|
79447
|
+
ptr: ctx.p
|
|
79494
79448
|
});
|
|
79495
79449
|
}
|
|
79496
|
-
let
|
|
79497
|
-
|
|
79498
|
-
|
|
79499
|
-
toml: str,
|
|
79500
|
-
ptr
|
|
79501
|
-
});
|
|
79502
|
-
}
|
|
79503
|
-
dot = str.indexOf(".", eos);
|
|
79504
|
-
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
79450
|
+
let part = parseString(ctx);
|
|
79451
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
79452
|
+
let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
79505
79453
|
let newLine = indexOfNewline(strEnd);
|
|
79506
79454
|
if (newLine > -1) {
|
|
79507
79455
|
throw new TomlError("newlines are not allowed in keys", {
|
|
79508
|
-
toml:
|
|
79509
|
-
ptr:
|
|
79456
|
+
toml: ctx.s,
|
|
79457
|
+
ptr: newLine
|
|
79510
79458
|
});
|
|
79511
79459
|
}
|
|
79512
79460
|
if (strEnd.trimStart()) {
|
|
79513
79461
|
throw new TomlError("found extra tokens after the string part", {
|
|
79514
|
-
toml:
|
|
79515
|
-
ptr:
|
|
79462
|
+
toml: ctx.s,
|
|
79463
|
+
ptr: ctx.p
|
|
79516
79464
|
});
|
|
79517
79465
|
}
|
|
79518
|
-
if (endPtr <
|
|
79519
|
-
endPtr =
|
|
79466
|
+
if (endPtr < ctx.p) {
|
|
79467
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
79520
79468
|
if (endPtr < 0) {
|
|
79521
79469
|
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
79522
|
-
toml:
|
|
79523
|
-
ptr
|
|
79470
|
+
toml: ctx.s,
|
|
79471
|
+
ptr: start
|
|
79524
79472
|
});
|
|
79525
79473
|
}
|
|
79526
79474
|
}
|
|
79527
|
-
parsed.push(
|
|
79475
|
+
parsed.push(part);
|
|
79528
79476
|
} else {
|
|
79529
|
-
dot =
|
|
79530
|
-
let part =
|
|
79477
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
79478
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
79531
79479
|
if (!KEY_PART_RE.test(part)) {
|
|
79532
79480
|
throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
79533
|
-
toml:
|
|
79534
|
-
ptr
|
|
79481
|
+
toml: ctx.s,
|
|
79482
|
+
ptr: ctx.p
|
|
79535
79483
|
});
|
|
79536
79484
|
}
|
|
79537
79485
|
parsed.push(part.trimEnd());
|
|
79538
79486
|
}
|
|
79539
79487
|
}
|
|
79540
79488
|
} while (dot + 1 && dot < endPtr);
|
|
79541
|
-
|
|
79489
|
+
ctx.p = endPtr + 1;
|
|
79490
|
+
skipVoid(ctx, true, true);
|
|
79491
|
+
return parsed;
|
|
79542
79492
|
}
|
|
79543
79493
|
__name(parseKey, "parseKey");
|
|
79544
|
-
function parseInlineTable(
|
|
79494
|
+
function parseInlineTable(ctx, integersAsBigInt) {
|
|
79545
79495
|
let res = {};
|
|
79546
79496
|
let seen = /* @__PURE__ */ new Set();
|
|
79547
79497
|
let c2;
|
|
79548
|
-
|
|
79549
|
-
|
|
79550
|
-
|
|
79551
|
-
|
|
79552
|
-
|
|
79553
|
-
|
|
79554
|
-
}
|
|
79555
|
-
|
|
79556
|
-
|
|
79557
|
-
|
|
79558
|
-
|
|
79559
|
-
|
|
79560
|
-
|
|
79561
|
-
|
|
79562
|
-
|
|
79563
|
-
|
|
79564
|
-
|
|
79565
|
-
t2 = hasOwn ? t2[k] : t2[k] = {};
|
|
79566
|
-
k = key[i];
|
|
79567
|
-
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
79568
|
-
throw new TomlError("trying to redefine an already defined value", {
|
|
79569
|
-
toml: str,
|
|
79570
|
-
ptr
|
|
79571
|
-
});
|
|
79572
|
-
}
|
|
79573
|
-
if (!hasOwn && k === "__proto__") {
|
|
79574
|
-
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
79575
|
-
}
|
|
79576
|
-
}
|
|
79577
|
-
if (hasOwn) {
|
|
79498
|
+
ctx.p++;
|
|
79499
|
+
while (ctx.p < ctx.s.length) {
|
|
79500
|
+
skipVoid(ctx);
|
|
79501
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p)) === 125) {
|
|
79502
|
+
ctx.p++;
|
|
79503
|
+
return res;
|
|
79504
|
+
}
|
|
79505
|
+
let k;
|
|
79506
|
+
let t2 = res;
|
|
79507
|
+
let hasOwn = false;
|
|
79508
|
+
let p2 = ctx.p;
|
|
79509
|
+
let key = parseKey(ctx);
|
|
79510
|
+
for (let i = 0; i < key.length; i++) {
|
|
79511
|
+
if (i)
|
|
79512
|
+
t2 = hasOwn ? t2[k] : t2[k] = {};
|
|
79513
|
+
k = key[i];
|
|
79514
|
+
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
79578
79515
|
throw new TomlError("trying to redefine an already defined value", {
|
|
79579
|
-
toml:
|
|
79580
|
-
ptr
|
|
79516
|
+
toml: ctx.s,
|
|
79517
|
+
ptr: p2
|
|
79581
79518
|
});
|
|
79582
79519
|
}
|
|
79583
|
-
|
|
79584
|
-
|
|
79585
|
-
|
|
79586
|
-
|
|
79587
|
-
|
|
79520
|
+
if (!hasOwn && k === "__proto__") {
|
|
79521
|
+
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
79522
|
+
}
|
|
79523
|
+
}
|
|
79524
|
+
if (hasOwn) {
|
|
79525
|
+
throw new TomlError("trying to redefine an already defined value", {
|
|
79526
|
+
toml: ctx.s,
|
|
79527
|
+
ptr: ctx.p
|
|
79528
|
+
});
|
|
79529
|
+
}
|
|
79530
|
+
let value = extractValue(ctx, 125, integersAsBigInt);
|
|
79531
|
+
seen.add(t2[k] = value);
|
|
79532
|
+
skipVoid(ctx);
|
|
79533
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p++)) === 125) {
|
|
79534
|
+
return res;
|
|
79535
|
+
}
|
|
79536
|
+
if (c2 !== 44) {
|
|
79537
|
+
throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
79588
79538
|
}
|
|
79589
79539
|
}
|
|
79590
|
-
|
|
79591
|
-
|
|
79592
|
-
|
|
79593
|
-
|
|
79594
|
-
});
|
|
79595
|
-
}
|
|
79596
|
-
if (!c2) {
|
|
79597
|
-
throw new TomlError("unfinished table encountered", {
|
|
79598
|
-
toml: str,
|
|
79599
|
-
ptr
|
|
79600
|
-
});
|
|
79601
|
-
}
|
|
79602
|
-
return [res, ptr];
|
|
79540
|
+
throw new TomlError("unfinished table encountered", {
|
|
79541
|
+
toml: ctx.s,
|
|
79542
|
+
ptr: ctx.p
|
|
79543
|
+
});
|
|
79603
79544
|
}
|
|
79604
79545
|
__name(parseInlineTable, "parseInlineTable");
|
|
79605
|
-
function parseArray(
|
|
79546
|
+
function parseArray(ctx, integersAsBigInt) {
|
|
79606
79547
|
let res = [];
|
|
79607
79548
|
let c2;
|
|
79608
|
-
|
|
79609
|
-
while (
|
|
79610
|
-
|
|
79611
|
-
|
|
79612
|
-
|
|
79613
|
-
|
|
79614
|
-
|
|
79615
|
-
|
|
79616
|
-
|
|
79617
|
-
|
|
79618
|
-
|
|
79619
|
-
|
|
79620
|
-
|
|
79621
|
-
|
|
79622
|
-
|
|
79623
|
-
if (!c2) {
|
|
79624
|
-
throw new TomlError("unfinished array encountered", {
|
|
79625
|
-
toml: str,
|
|
79626
|
-
ptr
|
|
79627
|
-
});
|
|
79549
|
+
ctx.p++;
|
|
79550
|
+
while (ctx.p < ctx.s.length) {
|
|
79551
|
+
skipVoid(ctx);
|
|
79552
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p)) === 93) {
|
|
79553
|
+
ctx.p++;
|
|
79554
|
+
return res;
|
|
79555
|
+
}
|
|
79556
|
+
res.push(extractValue(ctx, 93, integersAsBigInt));
|
|
79557
|
+
skipVoid(ctx);
|
|
79558
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p++)) === 93) {
|
|
79559
|
+
return res;
|
|
79560
|
+
}
|
|
79561
|
+
if (c2 !== 44) {
|
|
79562
|
+
throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
79563
|
+
}
|
|
79628
79564
|
}
|
|
79629
|
-
|
|
79565
|
+
throw new TomlError("unfinished array encountered", {
|
|
79566
|
+
toml: ctx.s,
|
|
79567
|
+
ptr: ctx.p
|
|
79568
|
+
});
|
|
79630
79569
|
}
|
|
79631
79570
|
__name(parseArray, "parseArray");
|
|
79632
79571
|
function peekTable(key, table, meta3, type) {
|
|
@@ -79690,25 +79629,29 @@ function peekTable(key, table, meta3, type) {
|
|
|
79690
79629
|
}
|
|
79691
79630
|
__name(peekTable, "peekTable");
|
|
79692
79631
|
function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
79632
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
79693
79633
|
let res = {};
|
|
79694
79634
|
let meta3 = {};
|
|
79635
|
+
let tmp;
|
|
79695
79636
|
let tbl = res;
|
|
79696
79637
|
let m = meta3;
|
|
79697
|
-
|
|
79698
|
-
|
|
79699
|
-
|
|
79700
|
-
let
|
|
79638
|
+
skipVoid(ctx);
|
|
79639
|
+
while (ctx.p < toml.length) {
|
|
79640
|
+
if (toml.charCodeAt(ctx.p) === 91) {
|
|
79641
|
+
let isTableArray = toml.charCodeAt(++ctx.p) === 91;
|
|
79642
|
+
tmp = ctx.p += +isTableArray;
|
|
79643
|
+
let k = parseKey(ctx, "]");
|
|
79701
79644
|
if (isTableArray) {
|
|
79702
|
-
if (toml
|
|
79645
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
79703
79646
|
throw new TomlError("expected end of table declaration", {
|
|
79704
79647
|
toml,
|
|
79705
|
-
ptr:
|
|
79648
|
+
ptr: ctx.p - 1
|
|
79706
79649
|
});
|
|
79707
79650
|
}
|
|
79708
|
-
|
|
79651
|
+
ctx.p++;
|
|
79709
79652
|
}
|
|
79710
79653
|
let p2 = peekTable(
|
|
79711
|
-
k
|
|
79654
|
+
k,
|
|
79712
79655
|
res,
|
|
79713
79656
|
meta3,
|
|
79714
79657
|
isTableArray ? 2 : 1
|
|
@@ -79717,16 +79660,16 @@ function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
79717
79660
|
if (!p2) {
|
|
79718
79661
|
throw new TomlError("trying to redefine an already defined table or value", {
|
|
79719
79662
|
toml,
|
|
79720
|
-
ptr
|
|
79663
|
+
ptr: tmp
|
|
79721
79664
|
});
|
|
79722
79665
|
}
|
|
79723
79666
|
m = p2[2];
|
|
79724
79667
|
tbl = p2[1];
|
|
79725
|
-
ptr = k[1];
|
|
79726
79668
|
} else {
|
|
79727
|
-
|
|
79669
|
+
tmp = ctx.p;
|
|
79670
|
+
let k = parseKey(ctx);
|
|
79728
79671
|
let p2 = peekTable(
|
|
79729
|
-
k
|
|
79672
|
+
k,
|
|
79730
79673
|
tbl,
|
|
79731
79674
|
m,
|
|
79732
79675
|
0
|
|
@@ -79735,21 +79678,19 @@ function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
79735
79678
|
if (!p2) {
|
|
79736
79679
|
throw new TomlError("trying to redefine an already defined table or value", {
|
|
79737
79680
|
toml,
|
|
79738
|
-
ptr
|
|
79681
|
+
ptr: tmp
|
|
79739
79682
|
});
|
|
79740
79683
|
}
|
|
79741
|
-
|
|
79742
|
-
p2[1][p2[0]] = v[0];
|
|
79743
|
-
ptr = v[1];
|
|
79684
|
+
p2[1][p2[0]] = extractValue(ctx, void 0, integersAsBigInt);
|
|
79744
79685
|
}
|
|
79745
|
-
|
|
79746
|
-
if (toml
|
|
79686
|
+
skipVoid(ctx, true);
|
|
79687
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
79747
79688
|
throw new TomlError("each key-value declaration must be followed by an end-of-line", {
|
|
79748
79689
|
toml,
|
|
79749
|
-
ptr
|
|
79690
|
+
ptr: ctx.p
|
|
79750
79691
|
});
|
|
79751
79692
|
}
|
|
79752
|
-
|
|
79693
|
+
skipVoid(ctx);
|
|
79753
79694
|
}
|
|
79754
79695
|
return res;
|
|
79755
79696
|
}
|
|
@@ -79760,8 +79701,12 @@ function extendedTypeOf(obj) {
|
|
|
79760
79701
|
if (type === "object") {
|
|
79761
79702
|
if (Array.isArray(obj))
|
|
79762
79703
|
return "array";
|
|
79763
|
-
if (obj instanceof Date)
|
|
79704
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
79764
79705
|
return "date";
|
|
79706
|
+
if (globalThis.Temporal && // check for the 'since' property as an early bailout that avoids running all 5 instanceof checks
|
|
79707
|
+
typeof obj?.since === "function" && (obj instanceof Temporal.Instant || obj instanceof Temporal.PlainDate || obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainTime || obj instanceof Temporal.ZonedDateTime)) {
|
|
79708
|
+
return "temporal";
|
|
79709
|
+
}
|
|
79765
79710
|
}
|
|
79766
79711
|
return type;
|
|
79767
79712
|
}
|
|
@@ -79778,38 +79723,43 @@ function formatString(s) {
|
|
|
79778
79723
|
return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
|
|
79779
79724
|
}
|
|
79780
79725
|
__name(formatString, "formatString");
|
|
79726
|
+
function stringifyTemporal(temporal) {
|
|
79727
|
+
return temporal.toString({
|
|
79728
|
+
calendarName: "never",
|
|
79729
|
+
timeZoneName: "never"
|
|
79730
|
+
});
|
|
79731
|
+
}
|
|
79732
|
+
__name(stringifyTemporal, "stringifyTemporal");
|
|
79781
79733
|
function stringifyValue(val, type, depth, numberAsFloat) {
|
|
79782
79734
|
if (depth === 0) {
|
|
79783
79735
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
79784
79736
|
}
|
|
79785
|
-
|
|
79786
|
-
|
|
79787
|
-
|
|
79788
|
-
|
|
79789
|
-
|
|
79790
|
-
|
|
79791
|
-
|
|
79792
|
-
|
|
79793
|
-
|
|
79794
|
-
|
|
79795
|
-
|
|
79796
|
-
|
|
79797
|
-
|
|
79798
|
-
|
|
79799
|
-
|
|
79800
|
-
|
|
79801
|
-
|
|
79802
|
-
|
|
79803
|
-
|
|
79804
|
-
|
|
79805
|
-
|
|
79806
|
-
|
|
79807
|
-
|
|
79808
|
-
|
|
79809
|
-
|
|
79810
|
-
|
|
79811
|
-
if (type === "array") {
|
|
79812
|
-
return stringifyArray(val, depth, numberAsFloat);
|
|
79737
|
+
switch (type) {
|
|
79738
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
79739
|
+
case "number":
|
|
79740
|
+
if (isNaN(val))
|
|
79741
|
+
return "nan";
|
|
79742
|
+
if (val === Infinity)
|
|
79743
|
+
return "inf";
|
|
79744
|
+
if (val === -Infinity)
|
|
79745
|
+
return "-inf";
|
|
79746
|
+
if (Number.isInteger(val) && (numberAsFloat || !Number.isSafeInteger(val)))
|
|
79747
|
+
return val.toFixed(1);
|
|
79748
|
+
case "bigint":
|
|
79749
|
+
case "boolean":
|
|
79750
|
+
return val.toString();
|
|
79751
|
+
case "string":
|
|
79752
|
+
return formatString(val);
|
|
79753
|
+
case "date":
|
|
79754
|
+
if (isNaN(val.getTime()))
|
|
79755
|
+
throw new TypeError("cannot serialize invalid date");
|
|
79756
|
+
return val.toISOString();
|
|
79757
|
+
case "object":
|
|
79758
|
+
return stringifyInlineTable(val, depth, numberAsFloat);
|
|
79759
|
+
case "array":
|
|
79760
|
+
return stringifyArray(val, depth, numberAsFloat);
|
|
79761
|
+
case "temporal":
|
|
79762
|
+
return stringifyTemporal(val);
|
|
79813
79763
|
}
|
|
79814
79764
|
}
|
|
79815
79765
|
__name(stringifyValue, "stringifyValue");
|
|
@@ -80413,9 +80363,9 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
|
|
|
80413
80363
|
}
|
|
80414
80364
|
__name(formatConfigSnippet, "formatConfigSnippet");
|
|
80415
80365
|
|
|
80416
|
-
// ../workers-utils/dist/chunk-
|
|
80366
|
+
// ../workers-utils/dist/chunk-4PNP2TCS.mjs
|
|
80417
80367
|
init_chunk_Q72B4Q5Z();
|
|
80418
|
-
var DEFAULT_COMPAT_DATE = "2026-09-
|
|
80368
|
+
var DEFAULT_COMPAT_DATE = "2026-09-21";
|
|
80419
80369
|
function assertNever(_value) {
|
|
80420
80370
|
}
|
|
80421
80371
|
__name(assertNever, "assertNever");
|
|
@@ -81809,11 +81759,11 @@ var require_command_exists = __commonJS2({
|
|
|
81809
81759
|
"../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports$1, module2) {
|
|
81810
81760
|
var exec4 = __require("child_process").exec;
|
|
81811
81761
|
var execSync = __require("child_process").execSync;
|
|
81812
|
-
var
|
|
81813
|
-
var
|
|
81814
|
-
var access =
|
|
81815
|
-
var accessSync2 =
|
|
81816
|
-
var constants22 =
|
|
81762
|
+
var fs42 = __require("fs");
|
|
81763
|
+
var path62 = __require("path");
|
|
81764
|
+
var access = fs42.access;
|
|
81765
|
+
var accessSync2 = fs42.accessSync;
|
|
81766
|
+
var constants22 = fs42.constants || fs42;
|
|
81817
81767
|
var isUsingWindows = process.platform == "win32";
|
|
81818
81768
|
var fileNotExists = /* @__PURE__ */ __name(function(commandName, callback) {
|
|
81819
81769
|
access(
|
|
@@ -81914,8 +81864,8 @@ var require_command_exists = __commonJS2({
|
|
|
81914
81864
|
cleanInput = /* @__PURE__ */ __name(function(s) {
|
|
81915
81865
|
var isPathName = /[\\]/.test(s);
|
|
81916
81866
|
if (isPathName) {
|
|
81917
|
-
var dirname42 = '"' +
|
|
81918
|
-
var basename22 = '"' +
|
|
81867
|
+
var dirname42 = '"' + path62.dirname(s) + '"';
|
|
81868
|
+
var basename22 = '"' + path62.basename(s) + '"';
|
|
81919
81869
|
return dirname42 + ":" + basename22;
|
|
81920
81870
|
}
|
|
81921
81871
|
return '"' + s + '"';
|
|
@@ -82189,9 +82139,9 @@ var require_strip_json_comments = __commonJS2({
|
|
|
82189
82139
|
});
|
|
82190
82140
|
var require_utils2 = __commonJS2({
|
|
82191
82141
|
"../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports$1) {
|
|
82192
|
-
var
|
|
82142
|
+
var fs42 = __require("fs");
|
|
82193
82143
|
var ini = require_ini();
|
|
82194
|
-
var
|
|
82144
|
+
var path62 = __require("path");
|
|
82195
82145
|
var stripJsonComments = require_strip_json_comments();
|
|
82196
82146
|
var parse32 = exports$1.parse = function(content) {
|
|
82197
82147
|
if (/^\s*{/.test(content))
|
|
@@ -82205,9 +82155,9 @@ var require_utils2 = __commonJS2({
|
|
|
82205
82155
|
for (var i in args)
|
|
82206
82156
|
if ("string" !== typeof args[i])
|
|
82207
82157
|
return;
|
|
82208
|
-
var file3 =
|
|
82158
|
+
var file3 = path62.join.apply(null, args);
|
|
82209
82159
|
try {
|
|
82210
|
-
return
|
|
82160
|
+
return fs42.readFileSync(file3, "utf-8");
|
|
82211
82161
|
} catch (err) {
|
|
82212
82162
|
return;
|
|
82213
82163
|
}
|
|
@@ -82242,15 +82192,15 @@ var require_utils2 = __commonJS2({
|
|
|
82242
82192
|
return obj;
|
|
82243
82193
|
};
|
|
82244
82194
|
exports$1.find = function() {
|
|
82245
|
-
var rel =
|
|
82195
|
+
var rel = path62.join.apply(null, [].slice.call(arguments));
|
|
82246
82196
|
function find2(start, rel2) {
|
|
82247
|
-
var file3 =
|
|
82197
|
+
var file3 = path62.join(start, rel2);
|
|
82248
82198
|
try {
|
|
82249
|
-
|
|
82199
|
+
fs42.statSync(file3);
|
|
82250
82200
|
return file3;
|
|
82251
82201
|
} catch (err) {
|
|
82252
|
-
if (
|
|
82253
|
-
return find2(
|
|
82202
|
+
if (path62.dirname(start) !== start)
|
|
82203
|
+
return find2(path62.dirname(start), rel2);
|
|
82254
82204
|
}
|
|
82255
82205
|
}
|
|
82256
82206
|
__name(find2, "find");
|
|
@@ -82726,8 +82676,8 @@ var require_registry_auth_token = __commonJS2({
|
|
|
82726
82676
|
return void 0;
|
|
82727
82677
|
}
|
|
82728
82678
|
__name(getLegacyAuthInfo, "getLegacyAuthInfo");
|
|
82729
|
-
function normalizePath2(
|
|
82730
|
-
return
|
|
82679
|
+
function normalizePath2(path62) {
|
|
82680
|
+
return path62[path62.length - 1] === "/" ? path62 : path62 + "/";
|
|
82731
82681
|
}
|
|
82732
82682
|
__name(normalizePath2, "normalizePath");
|
|
82733
82683
|
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
@@ -82776,19 +82726,19 @@ var require_update_check = __commonJS2({
|
|
|
82776
82726
|
"../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports$1, module2) {
|
|
82777
82727
|
var { URL: URL2 } = __require("url");
|
|
82778
82728
|
var { join: join32 } = __require("path");
|
|
82779
|
-
var
|
|
82729
|
+
var fs42 = __require("fs");
|
|
82780
82730
|
var { promisify: promisify8 } = __require("util");
|
|
82781
82731
|
var { tmpdir: tmpdir4 } = __require("os");
|
|
82782
82732
|
var registryUrl = require_registry_url();
|
|
82783
|
-
var writeFile4 = promisify8(
|
|
82784
|
-
var mkdir = promisify8(
|
|
82785
|
-
var readFile2 = promisify8(
|
|
82733
|
+
var writeFile4 = promisify8(fs42.writeFile);
|
|
82734
|
+
var mkdir = promisify8(fs42.mkdir);
|
|
82735
|
+
var readFile2 = promisify8(fs42.readFile);
|
|
82786
82736
|
var compareVersions = /* @__PURE__ */ __name((a, b2) => a.localeCompare(b2, "en-US", { numeric: true }), "compareVersions");
|
|
82787
82737
|
var encode3 = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
|
|
82788
82738
|
var getFile = /* @__PURE__ */ __name(async (details, distTag) => {
|
|
82789
82739
|
const rootDir = tmpdir4();
|
|
82790
82740
|
const subDir = join32(rootDir, "update-check");
|
|
82791
|
-
if (!
|
|
82741
|
+
if (!fs42.existsSync(subDir)) {
|
|
82792
82742
|
await mkdir(subDir);
|
|
82793
82743
|
}
|
|
82794
82744
|
let name3 = `${details.name}-${distTag}.json`;
|
|
@@ -82798,7 +82748,7 @@ var require_update_check = __commonJS2({
|
|
|
82798
82748
|
return join32(subDir, name3);
|
|
82799
82749
|
}, "getFile");
|
|
82800
82750
|
var evaluateCache = /* @__PURE__ */ __name(async (file22, time3, interval) => {
|
|
82801
|
-
if (
|
|
82751
|
+
if (fs42.existsSync(file22)) {
|
|
82802
82752
|
const content = await readFile2(file22, "utf8");
|
|
82803
82753
|
const { lastUpdate, latest } = JSON.parse(content);
|
|
82804
82754
|
const nextCheck = lastUpdate + interval;
|
|
@@ -82924,6 +82874,788 @@ var require_update_check = __commonJS2({
|
|
|
82924
82874
|
};
|
|
82925
82875
|
}
|
|
82926
82876
|
});
|
|
82877
|
+
var require_path = __commonJS2({
|
|
82878
|
+
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports$1, module2) {
|
|
82879
|
+
var isWindows3 = typeof process === "object" && process && process.platform === "win32";
|
|
82880
|
+
module2.exports = isWindows3 ? { sep: "\\" } : { sep: "/" };
|
|
82881
|
+
}
|
|
82882
|
+
});
|
|
82883
|
+
var require_balanced_match = __commonJS2({
|
|
82884
|
+
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports$1, module2) {
|
|
82885
|
+
module2.exports = balanced;
|
|
82886
|
+
function balanced(a, b2, str) {
|
|
82887
|
+
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
82888
|
+
if (b2 instanceof RegExp) b2 = maybeMatch(b2, str);
|
|
82889
|
+
var r2 = range(a, b2, str);
|
|
82890
|
+
return r2 && {
|
|
82891
|
+
start: r2[0],
|
|
82892
|
+
end: r2[1],
|
|
82893
|
+
pre: str.slice(0, r2[0]),
|
|
82894
|
+
body: str.slice(r2[0] + a.length, r2[1]),
|
|
82895
|
+
post: str.slice(r2[1] + b2.length)
|
|
82896
|
+
};
|
|
82897
|
+
}
|
|
82898
|
+
__name(balanced, "balanced");
|
|
82899
|
+
function maybeMatch(reg, str) {
|
|
82900
|
+
var m = str.match(reg);
|
|
82901
|
+
return m ? m[0] : null;
|
|
82902
|
+
}
|
|
82903
|
+
__name(maybeMatch, "maybeMatch");
|
|
82904
|
+
balanced.range = range;
|
|
82905
|
+
function range(a, b2, str) {
|
|
82906
|
+
var begs, beg, left2, right2, result;
|
|
82907
|
+
var ai = str.indexOf(a);
|
|
82908
|
+
var bi = str.indexOf(b2, ai + 1);
|
|
82909
|
+
var i = ai;
|
|
82910
|
+
if (ai >= 0 && bi > 0) {
|
|
82911
|
+
if (a === b2) {
|
|
82912
|
+
return [ai, bi];
|
|
82913
|
+
}
|
|
82914
|
+
begs = [];
|
|
82915
|
+
left2 = str.length;
|
|
82916
|
+
while (i >= 0 && !result) {
|
|
82917
|
+
if (i == ai) {
|
|
82918
|
+
begs.push(i);
|
|
82919
|
+
ai = str.indexOf(a, i + 1);
|
|
82920
|
+
} else if (begs.length == 1) {
|
|
82921
|
+
result = [begs.pop(), bi];
|
|
82922
|
+
} else {
|
|
82923
|
+
beg = begs.pop();
|
|
82924
|
+
if (beg < left2) {
|
|
82925
|
+
left2 = beg;
|
|
82926
|
+
right2 = bi;
|
|
82927
|
+
}
|
|
82928
|
+
bi = str.indexOf(b2, i + 1);
|
|
82929
|
+
}
|
|
82930
|
+
i = ai < bi && ai >= 0 ? ai : bi;
|
|
82931
|
+
}
|
|
82932
|
+
if (begs.length) {
|
|
82933
|
+
result = [left2, right2];
|
|
82934
|
+
}
|
|
82935
|
+
}
|
|
82936
|
+
return result;
|
|
82937
|
+
}
|
|
82938
|
+
__name(range, "range");
|
|
82939
|
+
}
|
|
82940
|
+
});
|
|
82941
|
+
var require_brace_expansion = __commonJS2({
|
|
82942
|
+
"../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports$1, module2) {
|
|
82943
|
+
var balanced = require_balanced_match();
|
|
82944
|
+
module2.exports = expandTop;
|
|
82945
|
+
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
82946
|
+
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
82947
|
+
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
82948
|
+
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
82949
|
+
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
82950
|
+
function numeric(str) {
|
|
82951
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
82952
|
+
}
|
|
82953
|
+
__name(numeric, "numeric");
|
|
82954
|
+
function escapeBraces(str) {
|
|
82955
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
82956
|
+
}
|
|
82957
|
+
__name(escapeBraces, "escapeBraces");
|
|
82958
|
+
function unescapeBraces(str) {
|
|
82959
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
82960
|
+
}
|
|
82961
|
+
__name(unescapeBraces, "unescapeBraces");
|
|
82962
|
+
function parseCommaParts(str) {
|
|
82963
|
+
if (!str)
|
|
82964
|
+
return [""];
|
|
82965
|
+
var parts = [];
|
|
82966
|
+
var m = balanced("{", "}", str);
|
|
82967
|
+
if (!m)
|
|
82968
|
+
return str.split(",");
|
|
82969
|
+
var pre = m.pre;
|
|
82970
|
+
var body = m.body;
|
|
82971
|
+
var post = m.post;
|
|
82972
|
+
var p2 = pre.split(",");
|
|
82973
|
+
p2[p2.length - 1] += "{" + body + "}";
|
|
82974
|
+
var postParts = parseCommaParts(post);
|
|
82975
|
+
if (post.length) {
|
|
82976
|
+
p2[p2.length - 1] += postParts.shift();
|
|
82977
|
+
p2.push.apply(p2, postParts);
|
|
82978
|
+
}
|
|
82979
|
+
parts.push.apply(parts, p2);
|
|
82980
|
+
return parts;
|
|
82981
|
+
}
|
|
82982
|
+
__name(parseCommaParts, "parseCommaParts");
|
|
82983
|
+
function expandTop(str) {
|
|
82984
|
+
if (!str)
|
|
82985
|
+
return [];
|
|
82986
|
+
if (str.substr(0, 2) === "{}") {
|
|
82987
|
+
str = "\\{\\}" + str.substr(2);
|
|
82988
|
+
}
|
|
82989
|
+
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
82990
|
+
}
|
|
82991
|
+
__name(expandTop, "expandTop");
|
|
82992
|
+
function embrace(str) {
|
|
82993
|
+
return "{" + str + "}";
|
|
82994
|
+
}
|
|
82995
|
+
__name(embrace, "embrace");
|
|
82996
|
+
function isPadded(el) {
|
|
82997
|
+
return /^-?0\d/.test(el);
|
|
82998
|
+
}
|
|
82999
|
+
__name(isPadded, "isPadded");
|
|
83000
|
+
function lte(i, y2) {
|
|
83001
|
+
return i <= y2;
|
|
83002
|
+
}
|
|
83003
|
+
__name(lte, "lte");
|
|
83004
|
+
function gte(i, y2) {
|
|
83005
|
+
return i >= y2;
|
|
83006
|
+
}
|
|
83007
|
+
__name(gte, "gte");
|
|
83008
|
+
function expand(str, isTop) {
|
|
83009
|
+
var expansions = [];
|
|
83010
|
+
var m = balanced("{", "}", str);
|
|
83011
|
+
if (!m) return [str];
|
|
83012
|
+
var pre = m.pre;
|
|
83013
|
+
var post = m.post.length ? expand(m.post, false) : [""];
|
|
83014
|
+
if (/\$$/.test(m.pre)) {
|
|
83015
|
+
for (var k = 0; k < post.length; k++) {
|
|
83016
|
+
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
83017
|
+
expansions.push(expansion);
|
|
83018
|
+
}
|
|
83019
|
+
} else {
|
|
83020
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
83021
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
83022
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
83023
|
+
var isOptions = m.body.indexOf(",") >= 0;
|
|
83024
|
+
if (!isSequence && !isOptions) {
|
|
83025
|
+
if (m.post.match(/,.*\}/)) {
|
|
83026
|
+
str = m.pre + "{" + m.body + escClose + m.post;
|
|
83027
|
+
return expand(str);
|
|
83028
|
+
}
|
|
83029
|
+
return [str];
|
|
83030
|
+
}
|
|
83031
|
+
var n2;
|
|
83032
|
+
if (isSequence) {
|
|
83033
|
+
n2 = m.body.split(/\.\./);
|
|
83034
|
+
} else {
|
|
83035
|
+
n2 = parseCommaParts(m.body);
|
|
83036
|
+
if (n2.length === 1) {
|
|
83037
|
+
n2 = expand(n2[0], false).map(embrace);
|
|
83038
|
+
if (n2.length === 1) {
|
|
83039
|
+
return post.map(function(p2) {
|
|
83040
|
+
return m.pre + n2[0] + p2;
|
|
83041
|
+
});
|
|
83042
|
+
}
|
|
83043
|
+
}
|
|
83044
|
+
}
|
|
83045
|
+
var N;
|
|
83046
|
+
if (isSequence) {
|
|
83047
|
+
var x = numeric(n2[0]);
|
|
83048
|
+
var y2 = numeric(n2[1]);
|
|
83049
|
+
var width = Math.max(n2[0].length, n2[1].length);
|
|
83050
|
+
var incr = n2.length == 3 ? Math.abs(numeric(n2[2])) : 1;
|
|
83051
|
+
var test = lte;
|
|
83052
|
+
var reverse = y2 < x;
|
|
83053
|
+
if (reverse) {
|
|
83054
|
+
incr *= -1;
|
|
83055
|
+
test = gte;
|
|
83056
|
+
}
|
|
83057
|
+
var pad = n2.some(isPadded);
|
|
83058
|
+
N = [];
|
|
83059
|
+
for (var i = x; test(i, y2); i += incr) {
|
|
83060
|
+
var c2;
|
|
83061
|
+
if (isAlphaSequence) {
|
|
83062
|
+
c2 = String.fromCharCode(i);
|
|
83063
|
+
if (c2 === "\\")
|
|
83064
|
+
c2 = "";
|
|
83065
|
+
} else {
|
|
83066
|
+
c2 = String(i);
|
|
83067
|
+
if (pad) {
|
|
83068
|
+
var need = width - c2.length;
|
|
83069
|
+
if (need > 0) {
|
|
83070
|
+
var z2 = new Array(need + 1).join("0");
|
|
83071
|
+
if (i < 0)
|
|
83072
|
+
c2 = "-" + z2 + c2.slice(1);
|
|
83073
|
+
else
|
|
83074
|
+
c2 = z2 + c2;
|
|
83075
|
+
}
|
|
83076
|
+
}
|
|
83077
|
+
}
|
|
83078
|
+
N.push(c2);
|
|
83079
|
+
}
|
|
83080
|
+
} else {
|
|
83081
|
+
N = [];
|
|
83082
|
+
for (var j2 = 0; j2 < n2.length; j2++) {
|
|
83083
|
+
N.push.apply(N, expand(n2[j2], false));
|
|
83084
|
+
}
|
|
83085
|
+
}
|
|
83086
|
+
for (var j2 = 0; j2 < N.length; j2++) {
|
|
83087
|
+
for (var k = 0; k < post.length; k++) {
|
|
83088
|
+
var expansion = pre + N[j2] + post[k];
|
|
83089
|
+
if (!isTop || isSequence || expansion)
|
|
83090
|
+
expansions.push(expansion);
|
|
83091
|
+
}
|
|
83092
|
+
}
|
|
83093
|
+
}
|
|
83094
|
+
return expansions;
|
|
83095
|
+
}
|
|
83096
|
+
__name(expand, "expand");
|
|
83097
|
+
}
|
|
83098
|
+
});
|
|
83099
|
+
var require_minimatch = __commonJS2({
|
|
83100
|
+
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports$1, module2) {
|
|
83101
|
+
var minimatch = module2.exports = (p2, pattern, options = {}) => {
|
|
83102
|
+
assertValidPattern(pattern);
|
|
83103
|
+
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
83104
|
+
return false;
|
|
83105
|
+
}
|
|
83106
|
+
return new Minimatch2(pattern, options).match(p2);
|
|
83107
|
+
};
|
|
83108
|
+
module2.exports = minimatch;
|
|
83109
|
+
var path62 = require_path();
|
|
83110
|
+
minimatch.sep = path62.sep;
|
|
83111
|
+
var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
|
|
83112
|
+
minimatch.GLOBSTAR = GLOBSTAR;
|
|
83113
|
+
var expand = require_brace_expansion();
|
|
83114
|
+
var plTypes = {
|
|
83115
|
+
"!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
|
|
83116
|
+
"?": { open: "(?:", close: ")?" },
|
|
83117
|
+
"+": { open: "(?:", close: ")+" },
|
|
83118
|
+
"*": { open: "(?:", close: ")*" },
|
|
83119
|
+
"@": { open: "(?:", close: ")" }
|
|
83120
|
+
};
|
|
83121
|
+
var qmark = "[^/]";
|
|
83122
|
+
var star = qmark + "*?";
|
|
83123
|
+
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
83124
|
+
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
83125
|
+
var charSet = /* @__PURE__ */ __name((s) => s.split("").reduce((set2, c2) => {
|
|
83126
|
+
set2[c2] = true;
|
|
83127
|
+
return set2;
|
|
83128
|
+
}, {}), "charSet");
|
|
83129
|
+
var reSpecials = charSet("().*{}+?[]^$\\!");
|
|
83130
|
+
var addPatternStartSet = charSet("[.(");
|
|
83131
|
+
var slashSplit = /\/+/;
|
|
83132
|
+
minimatch.filter = (pattern, options = {}) => (p2, i, list) => minimatch(p2, pattern, options);
|
|
83133
|
+
var ext = /* @__PURE__ */ __name((a, b2 = {}) => {
|
|
83134
|
+
const t2 = {};
|
|
83135
|
+
Object.keys(a).forEach((k) => t2[k] = a[k]);
|
|
83136
|
+
Object.keys(b2).forEach((k) => t2[k] = b2[k]);
|
|
83137
|
+
return t2;
|
|
83138
|
+
}, "ext");
|
|
83139
|
+
minimatch.defaults = (def) => {
|
|
83140
|
+
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
83141
|
+
return minimatch;
|
|
83142
|
+
}
|
|
83143
|
+
const orig = minimatch;
|
|
83144
|
+
const m = /* @__PURE__ */ __name((p2, pattern, options) => orig(p2, pattern, ext(def, options)), "m");
|
|
83145
|
+
m.Minimatch = class Minimatch extends orig.Minimatch {
|
|
83146
|
+
static {
|
|
83147
|
+
__name(this, "Minimatch");
|
|
83148
|
+
}
|
|
83149
|
+
constructor(pattern, options) {
|
|
83150
|
+
super(pattern, ext(def, options));
|
|
83151
|
+
}
|
|
83152
|
+
};
|
|
83153
|
+
m.Minimatch.defaults = (options) => orig.defaults(ext(def, options)).Minimatch;
|
|
83154
|
+
m.filter = (pattern, options) => orig.filter(pattern, ext(def, options));
|
|
83155
|
+
m.defaults = (options) => orig.defaults(ext(def, options));
|
|
83156
|
+
m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options));
|
|
83157
|
+
m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options));
|
|
83158
|
+
m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options));
|
|
83159
|
+
return m;
|
|
83160
|
+
};
|
|
83161
|
+
minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options);
|
|
83162
|
+
var braceExpand = /* @__PURE__ */ __name((pattern, options = {}) => {
|
|
83163
|
+
assertValidPattern(pattern);
|
|
83164
|
+
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
83165
|
+
return [pattern];
|
|
83166
|
+
}
|
|
83167
|
+
return expand(pattern);
|
|
83168
|
+
}, "braceExpand");
|
|
83169
|
+
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
83170
|
+
var assertValidPattern = /* @__PURE__ */ __name((pattern) => {
|
|
83171
|
+
if (typeof pattern !== "string") {
|
|
83172
|
+
throw new TypeError("invalid pattern");
|
|
83173
|
+
}
|
|
83174
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
83175
|
+
throw new TypeError("pattern is too long");
|
|
83176
|
+
}
|
|
83177
|
+
}, "assertValidPattern");
|
|
83178
|
+
var SUBPARSE = /* @__PURE__ */ Symbol("subparse");
|
|
83179
|
+
minimatch.makeRe = (pattern, options) => new Minimatch2(pattern, options || {}).makeRe();
|
|
83180
|
+
minimatch.match = (list, pattern, options = {}) => {
|
|
83181
|
+
const mm = new Minimatch2(pattern, options);
|
|
83182
|
+
list = list.filter((f) => mm.match(f));
|
|
83183
|
+
if (mm.options.nonull && !list.length) {
|
|
83184
|
+
list.push(pattern);
|
|
83185
|
+
}
|
|
83186
|
+
return list;
|
|
83187
|
+
};
|
|
83188
|
+
var globUnescape = /* @__PURE__ */ __name((s) => s.replace(/\\(.)/g, "$1"), "globUnescape");
|
|
83189
|
+
var charUnescape = /* @__PURE__ */ __name((s) => s.replace(/\\([^-\]])/g, "$1"), "charUnescape");
|
|
83190
|
+
var regExpEscape = /* @__PURE__ */ __name((s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "regExpEscape");
|
|
83191
|
+
var braExpEscape = /* @__PURE__ */ __name((s) => s.replace(/[[\]\\]/g, "\\$&"), "braExpEscape");
|
|
83192
|
+
var Minimatch2 = class {
|
|
83193
|
+
static {
|
|
83194
|
+
__name(this, "Minimatch");
|
|
83195
|
+
}
|
|
83196
|
+
constructor(pattern, options) {
|
|
83197
|
+
assertValidPattern(pattern);
|
|
83198
|
+
if (!options) options = {};
|
|
83199
|
+
this.options = options;
|
|
83200
|
+
this.set = [];
|
|
83201
|
+
this.pattern = pattern;
|
|
83202
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
83203
|
+
if (this.windowsPathsNoEscape) {
|
|
83204
|
+
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
83205
|
+
}
|
|
83206
|
+
this.regexp = null;
|
|
83207
|
+
this.negate = false;
|
|
83208
|
+
this.comment = false;
|
|
83209
|
+
this.empty = false;
|
|
83210
|
+
this.partial = !!options.partial;
|
|
83211
|
+
this.make();
|
|
83212
|
+
}
|
|
83213
|
+
debug() {
|
|
83214
|
+
}
|
|
83215
|
+
make() {
|
|
83216
|
+
const pattern = this.pattern;
|
|
83217
|
+
const options = this.options;
|
|
83218
|
+
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
83219
|
+
this.comment = true;
|
|
83220
|
+
return;
|
|
83221
|
+
}
|
|
83222
|
+
if (!pattern) {
|
|
83223
|
+
this.empty = true;
|
|
83224
|
+
return;
|
|
83225
|
+
}
|
|
83226
|
+
this.parseNegate();
|
|
83227
|
+
let set2 = this.globSet = this.braceExpand();
|
|
83228
|
+
if (options.debug) this.debug = (...args) => console.error(...args);
|
|
83229
|
+
this.debug(this.pattern, set2);
|
|
83230
|
+
set2 = this.globParts = set2.map((s) => s.split(slashSplit));
|
|
83231
|
+
this.debug(this.pattern, set2);
|
|
83232
|
+
set2 = set2.map((s, si, set3) => s.map(this.parse, this));
|
|
83233
|
+
this.debug(this.pattern, set2);
|
|
83234
|
+
set2 = set2.filter((s) => s.indexOf(false) === -1);
|
|
83235
|
+
this.debug(this.pattern, set2);
|
|
83236
|
+
this.set = set2;
|
|
83237
|
+
}
|
|
83238
|
+
parseNegate() {
|
|
83239
|
+
if (this.options.nonegate) return;
|
|
83240
|
+
const pattern = this.pattern;
|
|
83241
|
+
let negate = false;
|
|
83242
|
+
let negateOffset = 0;
|
|
83243
|
+
for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
|
|
83244
|
+
negate = !negate;
|
|
83245
|
+
negateOffset++;
|
|
83246
|
+
}
|
|
83247
|
+
if (negateOffset) this.pattern = pattern.slice(negateOffset);
|
|
83248
|
+
this.negate = negate;
|
|
83249
|
+
}
|
|
83250
|
+
// set partial to true to test if, for example,
|
|
83251
|
+
// "/a/b" matches the start of "/*/b/*/d"
|
|
83252
|
+
// Partial means, if you run out of file before you run
|
|
83253
|
+
// out of pattern, then that's fine, as long as all
|
|
83254
|
+
// the parts match.
|
|
83255
|
+
matchOne(file22, pattern, partial2) {
|
|
83256
|
+
var options = this.options;
|
|
83257
|
+
this.debug(
|
|
83258
|
+
"matchOne",
|
|
83259
|
+
{ "this": this, file: file22, pattern }
|
|
83260
|
+
);
|
|
83261
|
+
this.debug("matchOne", file22.length, pattern.length);
|
|
83262
|
+
for (var fi = 0, pi = 0, fl = file22.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
83263
|
+
this.debug("matchOne loop");
|
|
83264
|
+
var p2 = pattern[pi];
|
|
83265
|
+
var f = file22[fi];
|
|
83266
|
+
this.debug(pattern, p2, f);
|
|
83267
|
+
if (p2 === false) return false;
|
|
83268
|
+
if (p2 === GLOBSTAR) {
|
|
83269
|
+
this.debug("GLOBSTAR", [pattern, p2, f]);
|
|
83270
|
+
var fr = fi;
|
|
83271
|
+
var pr = pi + 1;
|
|
83272
|
+
if (pr === pl) {
|
|
83273
|
+
this.debug("** at the end");
|
|
83274
|
+
for (; fi < fl; fi++) {
|
|
83275
|
+
if (file22[fi] === "." || file22[fi] === ".." || !options.dot && file22[fi].charAt(0) === ".") return false;
|
|
83276
|
+
}
|
|
83277
|
+
return true;
|
|
83278
|
+
}
|
|
83279
|
+
while (fr < fl) {
|
|
83280
|
+
var swallowee = file22[fr];
|
|
83281
|
+
this.debug("\nglobstar while", file22, fr, pattern, pr, swallowee);
|
|
83282
|
+
if (this.matchOne(file22.slice(fr), pattern.slice(pr), partial2)) {
|
|
83283
|
+
this.debug("globstar found match!", fr, fl, swallowee);
|
|
83284
|
+
return true;
|
|
83285
|
+
} else {
|
|
83286
|
+
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
83287
|
+
this.debug("dot detected!", file22, fr, pattern, pr);
|
|
83288
|
+
break;
|
|
83289
|
+
}
|
|
83290
|
+
this.debug("globstar swallow a segment, and continue");
|
|
83291
|
+
fr++;
|
|
83292
|
+
}
|
|
83293
|
+
}
|
|
83294
|
+
if (partial2) {
|
|
83295
|
+
this.debug("\n>>> no match, partial?", file22, fr, pattern, pr);
|
|
83296
|
+
if (fr === fl) return true;
|
|
83297
|
+
}
|
|
83298
|
+
return false;
|
|
83299
|
+
}
|
|
83300
|
+
var hit;
|
|
83301
|
+
if (typeof p2 === "string") {
|
|
83302
|
+
hit = f === p2;
|
|
83303
|
+
this.debug("string match", p2, f, hit);
|
|
83304
|
+
} else {
|
|
83305
|
+
hit = f.match(p2);
|
|
83306
|
+
this.debug("pattern match", p2, f, hit);
|
|
83307
|
+
}
|
|
83308
|
+
if (!hit) return false;
|
|
83309
|
+
}
|
|
83310
|
+
if (fi === fl && pi === pl) {
|
|
83311
|
+
return true;
|
|
83312
|
+
} else if (fi === fl) {
|
|
83313
|
+
return partial2;
|
|
83314
|
+
} else if (pi === pl) {
|
|
83315
|
+
return fi === fl - 1 && file22[fi] === "";
|
|
83316
|
+
}
|
|
83317
|
+
throw new Error("wtf?");
|
|
83318
|
+
}
|
|
83319
|
+
braceExpand() {
|
|
83320
|
+
return braceExpand(this.pattern, this.options);
|
|
83321
|
+
}
|
|
83322
|
+
parse(pattern, isSub) {
|
|
83323
|
+
assertValidPattern(pattern);
|
|
83324
|
+
const options = this.options;
|
|
83325
|
+
if (pattern === "**") {
|
|
83326
|
+
if (!options.noglobstar)
|
|
83327
|
+
return GLOBSTAR;
|
|
83328
|
+
else
|
|
83329
|
+
pattern = "*";
|
|
83330
|
+
}
|
|
83331
|
+
if (pattern === "") return "";
|
|
83332
|
+
let re = "";
|
|
83333
|
+
let hasMagic = false;
|
|
83334
|
+
let escaping = false;
|
|
83335
|
+
const patternListStack = [];
|
|
83336
|
+
const negativeLists = [];
|
|
83337
|
+
let stateChar;
|
|
83338
|
+
let inClass = false;
|
|
83339
|
+
let reClassStart = -1;
|
|
83340
|
+
let classStart = -1;
|
|
83341
|
+
let cs;
|
|
83342
|
+
let pl;
|
|
83343
|
+
let sp;
|
|
83344
|
+
let dotTravAllowed = pattern.charAt(0) === ".";
|
|
83345
|
+
let dotFileAllowed = options.dot || dotTravAllowed;
|
|
83346
|
+
const patternStart = /* @__PURE__ */ __name(() => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)", "patternStart");
|
|
83347
|
+
const subPatternStart = /* @__PURE__ */ __name((p2) => p2.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)", "subPatternStart");
|
|
83348
|
+
const clearStateChar = /* @__PURE__ */ __name(() => {
|
|
83349
|
+
if (stateChar) {
|
|
83350
|
+
switch (stateChar) {
|
|
83351
|
+
case "*":
|
|
83352
|
+
re += star;
|
|
83353
|
+
hasMagic = true;
|
|
83354
|
+
break;
|
|
83355
|
+
case "?":
|
|
83356
|
+
re += qmark;
|
|
83357
|
+
hasMagic = true;
|
|
83358
|
+
break;
|
|
83359
|
+
default:
|
|
83360
|
+
re += "\\" + stateChar;
|
|
83361
|
+
break;
|
|
83362
|
+
}
|
|
83363
|
+
this.debug("clearStateChar %j %j", stateChar, re);
|
|
83364
|
+
stateChar = false;
|
|
83365
|
+
}
|
|
83366
|
+
}, "clearStateChar");
|
|
83367
|
+
for (let i = 0, c2; i < pattern.length && (c2 = pattern.charAt(i)); i++) {
|
|
83368
|
+
this.debug("%s %s %s %j", pattern, i, re, c2);
|
|
83369
|
+
if (escaping) {
|
|
83370
|
+
if (c2 === "/") {
|
|
83371
|
+
return false;
|
|
83372
|
+
}
|
|
83373
|
+
if (reSpecials[c2]) {
|
|
83374
|
+
re += "\\";
|
|
83375
|
+
}
|
|
83376
|
+
re += c2;
|
|
83377
|
+
escaping = false;
|
|
83378
|
+
continue;
|
|
83379
|
+
}
|
|
83380
|
+
switch (c2) {
|
|
83381
|
+
/* istanbul ignore next */
|
|
83382
|
+
case "/": {
|
|
83383
|
+
return false;
|
|
83384
|
+
}
|
|
83385
|
+
case "\\":
|
|
83386
|
+
if (inClass && pattern.charAt(i + 1) === "-") {
|
|
83387
|
+
re += c2;
|
|
83388
|
+
continue;
|
|
83389
|
+
}
|
|
83390
|
+
clearStateChar();
|
|
83391
|
+
escaping = true;
|
|
83392
|
+
continue;
|
|
83393
|
+
// the various stateChar values
|
|
83394
|
+
// for the "extglob" stuff.
|
|
83395
|
+
case "?":
|
|
83396
|
+
case "*":
|
|
83397
|
+
case "+":
|
|
83398
|
+
case "@":
|
|
83399
|
+
case "!":
|
|
83400
|
+
this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c2);
|
|
83401
|
+
if (inClass) {
|
|
83402
|
+
this.debug(" in class");
|
|
83403
|
+
if (c2 === "!" && i === classStart + 1) c2 = "^";
|
|
83404
|
+
re += c2;
|
|
83405
|
+
continue;
|
|
83406
|
+
}
|
|
83407
|
+
this.debug("call clearStateChar %j", stateChar);
|
|
83408
|
+
clearStateChar();
|
|
83409
|
+
stateChar = c2;
|
|
83410
|
+
if (options.noext) clearStateChar();
|
|
83411
|
+
continue;
|
|
83412
|
+
case "(": {
|
|
83413
|
+
if (inClass) {
|
|
83414
|
+
re += "(";
|
|
83415
|
+
continue;
|
|
83416
|
+
}
|
|
83417
|
+
if (!stateChar) {
|
|
83418
|
+
re += "\\(";
|
|
83419
|
+
continue;
|
|
83420
|
+
}
|
|
83421
|
+
const plEntry = {
|
|
83422
|
+
type: stateChar,
|
|
83423
|
+
start: i - 1,
|
|
83424
|
+
reStart: re.length,
|
|
83425
|
+
open: plTypes[stateChar].open,
|
|
83426
|
+
close: plTypes[stateChar].close
|
|
83427
|
+
};
|
|
83428
|
+
this.debug(this.pattern, " ", plEntry);
|
|
83429
|
+
patternListStack.push(plEntry);
|
|
83430
|
+
re += plEntry.open;
|
|
83431
|
+
if (plEntry.start === 0 && plEntry.type !== "!") {
|
|
83432
|
+
dotTravAllowed = true;
|
|
83433
|
+
re += subPatternStart(pattern.slice(i + 1));
|
|
83434
|
+
}
|
|
83435
|
+
this.debug("plType %j %j", stateChar, re);
|
|
83436
|
+
stateChar = false;
|
|
83437
|
+
continue;
|
|
83438
|
+
}
|
|
83439
|
+
case ")": {
|
|
83440
|
+
const plEntry = patternListStack[patternListStack.length - 1];
|
|
83441
|
+
if (inClass || !plEntry) {
|
|
83442
|
+
re += "\\)";
|
|
83443
|
+
continue;
|
|
83444
|
+
}
|
|
83445
|
+
patternListStack.pop();
|
|
83446
|
+
clearStateChar();
|
|
83447
|
+
hasMagic = true;
|
|
83448
|
+
pl = plEntry;
|
|
83449
|
+
re += pl.close;
|
|
83450
|
+
if (pl.type === "!") {
|
|
83451
|
+
negativeLists.push(Object.assign(pl, { reEnd: re.length }));
|
|
83452
|
+
}
|
|
83453
|
+
continue;
|
|
83454
|
+
}
|
|
83455
|
+
case "|": {
|
|
83456
|
+
const plEntry = patternListStack[patternListStack.length - 1];
|
|
83457
|
+
if (inClass || !plEntry) {
|
|
83458
|
+
re += "\\|";
|
|
83459
|
+
continue;
|
|
83460
|
+
}
|
|
83461
|
+
clearStateChar();
|
|
83462
|
+
re += "|";
|
|
83463
|
+
if (plEntry.start === 0 && plEntry.type !== "!") {
|
|
83464
|
+
dotTravAllowed = true;
|
|
83465
|
+
re += subPatternStart(pattern.slice(i + 1));
|
|
83466
|
+
}
|
|
83467
|
+
continue;
|
|
83468
|
+
}
|
|
83469
|
+
// these are mostly the same in regexp and glob
|
|
83470
|
+
case "[":
|
|
83471
|
+
clearStateChar();
|
|
83472
|
+
if (inClass) {
|
|
83473
|
+
re += "\\" + c2;
|
|
83474
|
+
continue;
|
|
83475
|
+
}
|
|
83476
|
+
inClass = true;
|
|
83477
|
+
classStart = i;
|
|
83478
|
+
reClassStart = re.length;
|
|
83479
|
+
re += c2;
|
|
83480
|
+
continue;
|
|
83481
|
+
case "]":
|
|
83482
|
+
if (i === classStart + 1 || !inClass) {
|
|
83483
|
+
re += "\\" + c2;
|
|
83484
|
+
continue;
|
|
83485
|
+
}
|
|
83486
|
+
cs = pattern.substring(classStart + 1, i);
|
|
83487
|
+
try {
|
|
83488
|
+
RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
|
|
83489
|
+
re += c2;
|
|
83490
|
+
} catch (er) {
|
|
83491
|
+
re = re.substring(0, reClassStart) + "(?:$.)";
|
|
83492
|
+
}
|
|
83493
|
+
hasMagic = true;
|
|
83494
|
+
inClass = false;
|
|
83495
|
+
continue;
|
|
83496
|
+
default:
|
|
83497
|
+
clearStateChar();
|
|
83498
|
+
if (reSpecials[c2] && !(c2 === "^" && inClass)) {
|
|
83499
|
+
re += "\\";
|
|
83500
|
+
}
|
|
83501
|
+
re += c2;
|
|
83502
|
+
break;
|
|
83503
|
+
}
|
|
83504
|
+
}
|
|
83505
|
+
if (inClass) {
|
|
83506
|
+
cs = pattern.slice(classStart + 1);
|
|
83507
|
+
sp = this.parse(cs, SUBPARSE);
|
|
83508
|
+
re = re.substring(0, reClassStart) + "\\[" + sp[0];
|
|
83509
|
+
hasMagic = hasMagic || sp[1];
|
|
83510
|
+
}
|
|
83511
|
+
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
|
83512
|
+
let tail;
|
|
83513
|
+
tail = re.slice(pl.reStart + pl.open.length);
|
|
83514
|
+
this.debug("setting tail", re, pl);
|
|
83515
|
+
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => {
|
|
83516
|
+
if (!$2) {
|
|
83517
|
+
$2 = "\\";
|
|
83518
|
+
}
|
|
83519
|
+
return $1 + $1 + $2 + "|";
|
|
83520
|
+
});
|
|
83521
|
+
this.debug("tail=%j\n %s", tail, tail, pl, re);
|
|
83522
|
+
const t2 = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
|
|
83523
|
+
hasMagic = true;
|
|
83524
|
+
re = re.slice(0, pl.reStart) + t2 + "\\(" + tail;
|
|
83525
|
+
}
|
|
83526
|
+
clearStateChar();
|
|
83527
|
+
if (escaping) {
|
|
83528
|
+
re += "\\\\";
|
|
83529
|
+
}
|
|
83530
|
+
const addPatternStart = addPatternStartSet[re.charAt(0)];
|
|
83531
|
+
for (let n2 = negativeLists.length - 1; n2 > -1; n2--) {
|
|
83532
|
+
const nl = negativeLists[n2];
|
|
83533
|
+
const nlBefore = re.slice(0, nl.reStart);
|
|
83534
|
+
const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
|
|
83535
|
+
let nlAfter = re.slice(nl.reEnd);
|
|
83536
|
+
const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
|
|
83537
|
+
const closeParensBefore = nlBefore.split(")").length;
|
|
83538
|
+
const openParensBefore = nlBefore.split("(").length - closeParensBefore;
|
|
83539
|
+
let cleanAfter = nlAfter;
|
|
83540
|
+
for (let i = 0; i < openParensBefore; i++) {
|
|
83541
|
+
cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
|
|
83542
|
+
}
|
|
83543
|
+
nlAfter = cleanAfter;
|
|
83544
|
+
const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : "";
|
|
83545
|
+
re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
|
|
83546
|
+
}
|
|
83547
|
+
if (re !== "" && hasMagic) {
|
|
83548
|
+
re = "(?=.)" + re;
|
|
83549
|
+
}
|
|
83550
|
+
if (addPatternStart) {
|
|
83551
|
+
re = patternStart() + re;
|
|
83552
|
+
}
|
|
83553
|
+
if (isSub === SUBPARSE) {
|
|
83554
|
+
return [re, hasMagic];
|
|
83555
|
+
}
|
|
83556
|
+
if (options.nocase && !hasMagic) {
|
|
83557
|
+
hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
|
|
83558
|
+
}
|
|
83559
|
+
if (!hasMagic) {
|
|
83560
|
+
return globUnescape(pattern);
|
|
83561
|
+
}
|
|
83562
|
+
const flags = options.nocase ? "i" : "";
|
|
83563
|
+
try {
|
|
83564
|
+
return Object.assign(new RegExp("^" + re + "$", flags), {
|
|
83565
|
+
_glob: pattern,
|
|
83566
|
+
_src: re
|
|
83567
|
+
});
|
|
83568
|
+
} catch (er) {
|
|
83569
|
+
return new RegExp("$.");
|
|
83570
|
+
}
|
|
83571
|
+
}
|
|
83572
|
+
makeRe() {
|
|
83573
|
+
if (this.regexp || this.regexp === false) return this.regexp;
|
|
83574
|
+
const set2 = this.set;
|
|
83575
|
+
if (!set2.length) {
|
|
83576
|
+
this.regexp = false;
|
|
83577
|
+
return this.regexp;
|
|
83578
|
+
}
|
|
83579
|
+
const options = this.options;
|
|
83580
|
+
const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
|
|
83581
|
+
const flags = options.nocase ? "i" : "";
|
|
83582
|
+
let re = set2.map((pattern) => {
|
|
83583
|
+
pattern = pattern.map(
|
|
83584
|
+
(p2) => typeof p2 === "string" ? regExpEscape(p2) : p2 === GLOBSTAR ? GLOBSTAR : p2._src
|
|
83585
|
+
).reduce((set3, p2) => {
|
|
83586
|
+
if (!(set3[set3.length - 1] === GLOBSTAR && p2 === GLOBSTAR)) {
|
|
83587
|
+
set3.push(p2);
|
|
83588
|
+
}
|
|
83589
|
+
return set3;
|
|
83590
|
+
}, []);
|
|
83591
|
+
pattern.forEach((p2, i) => {
|
|
83592
|
+
if (p2 !== GLOBSTAR || pattern[i - 1] === GLOBSTAR) {
|
|
83593
|
+
return;
|
|
83594
|
+
}
|
|
83595
|
+
if (i === 0) {
|
|
83596
|
+
if (pattern.length > 1) {
|
|
83597
|
+
pattern[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + pattern[i + 1];
|
|
83598
|
+
} else {
|
|
83599
|
+
pattern[i] = twoStar;
|
|
83600
|
+
}
|
|
83601
|
+
} else if (i === pattern.length - 1) {
|
|
83602
|
+
pattern[i - 1] += "(?:\\/|" + twoStar + ")?";
|
|
83603
|
+
} else {
|
|
83604
|
+
pattern[i - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i + 1];
|
|
83605
|
+
pattern[i + 1] = GLOBSTAR;
|
|
83606
|
+
}
|
|
83607
|
+
});
|
|
83608
|
+
return pattern.filter((p2) => p2 !== GLOBSTAR).join("/");
|
|
83609
|
+
}).join("|");
|
|
83610
|
+
re = "^(?:" + re + ")$";
|
|
83611
|
+
if (this.negate) re = "^(?!" + re + ").*$";
|
|
83612
|
+
try {
|
|
83613
|
+
this.regexp = new RegExp(re, flags);
|
|
83614
|
+
} catch (ex) {
|
|
83615
|
+
this.regexp = false;
|
|
83616
|
+
}
|
|
83617
|
+
return this.regexp;
|
|
83618
|
+
}
|
|
83619
|
+
match(f, partial2 = this.partial) {
|
|
83620
|
+
this.debug("match", f, this.pattern);
|
|
83621
|
+
if (this.comment) return false;
|
|
83622
|
+
if (this.empty) return f === "";
|
|
83623
|
+
if (f === "/" && partial2) return true;
|
|
83624
|
+
const options = this.options;
|
|
83625
|
+
if (path62.sep !== "/") {
|
|
83626
|
+
f = f.split(path62.sep).join("/");
|
|
83627
|
+
}
|
|
83628
|
+
f = f.split(slashSplit);
|
|
83629
|
+
this.debug(this.pattern, "split", f);
|
|
83630
|
+
const set2 = this.set;
|
|
83631
|
+
this.debug(this.pattern, "set", set2);
|
|
83632
|
+
let filename;
|
|
83633
|
+
for (let i = f.length - 1; i >= 0; i--) {
|
|
83634
|
+
filename = f[i];
|
|
83635
|
+
if (filename) break;
|
|
83636
|
+
}
|
|
83637
|
+
for (let i = 0; i < set2.length; i++) {
|
|
83638
|
+
const pattern = set2[i];
|
|
83639
|
+
let file22 = f;
|
|
83640
|
+
if (options.matchBase && pattern.length === 1) {
|
|
83641
|
+
file22 = [filename];
|
|
83642
|
+
}
|
|
83643
|
+
const hit = this.matchOne(file22, pattern, partial2);
|
|
83644
|
+
if (hit) {
|
|
83645
|
+
if (options.flipNegate) return true;
|
|
83646
|
+
return !this.negate;
|
|
83647
|
+
}
|
|
83648
|
+
}
|
|
83649
|
+
if (options.flipNegate) return false;
|
|
83650
|
+
return this.negate;
|
|
83651
|
+
}
|
|
83652
|
+
static defaults(def) {
|
|
83653
|
+
return minimatch.defaults(def).Minimatch;
|
|
83654
|
+
}
|
|
83655
|
+
};
|
|
83656
|
+
minimatch.Minimatch = Minimatch2;
|
|
83657
|
+
}
|
|
83658
|
+
});
|
|
82927
83659
|
var ARTIFACTS_EVENT_TYPES = [
|
|
82928
83660
|
"cf.artifacts.repo.created",
|
|
82929
83661
|
"cf.artifacts.repo.deleted",
|
|
@@ -83855,10 +84587,10 @@ function cloneDef(schema) {
|
|
|
83855
84587
|
return mergeDefs(schema._zod.def);
|
|
83856
84588
|
}
|
|
83857
84589
|
__name(cloneDef, "cloneDef");
|
|
83858
|
-
function getElementAtPath(obj,
|
|
83859
|
-
if (!
|
|
84590
|
+
function getElementAtPath(obj, path62) {
|
|
84591
|
+
if (!path62)
|
|
83860
84592
|
return obj;
|
|
83861
|
-
return
|
|
84593
|
+
return path62.reduce((acc, key) => acc?.[key], obj);
|
|
83862
84594
|
}
|
|
83863
84595
|
__name(getElementAtPath, "getElementAtPath");
|
|
83864
84596
|
function promiseAllObject(promisesObj) {
|
|
@@ -84291,11 +85023,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
84291
85023
|
return false;
|
|
84292
85024
|
}
|
|
84293
85025
|
__name(explicitlyAborted, "explicitlyAborted");
|
|
84294
|
-
function prefixIssues(
|
|
85026
|
+
function prefixIssues(path62, issues) {
|
|
84295
85027
|
return issues.map((iss) => {
|
|
84296
85028
|
var _a32;
|
|
84297
85029
|
(_a32 = iss).path ?? (_a32.path = []);
|
|
84298
|
-
iss.path.unshift(
|
|
85030
|
+
iss.path.unshift(path62);
|
|
84299
85031
|
return iss;
|
|
84300
85032
|
});
|
|
84301
85033
|
}
|
|
@@ -84458,16 +85190,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
84458
85190
|
__name(flattenError, "flattenError");
|
|
84459
85191
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
84460
85192
|
const fieldErrors = { _errors: [] };
|
|
84461
|
-
const processError = /* @__PURE__ */ __name((error52,
|
|
85193
|
+
const processError = /* @__PURE__ */ __name((error52, path62 = []) => {
|
|
84462
85194
|
for (const issue2 of error52.issues) {
|
|
84463
85195
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
84464
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
85196
|
+
issue2.errors.map((issues) => processError({ issues }, [...path62, ...issue2.path]));
|
|
84465
85197
|
} else if (issue2.code === "invalid_key") {
|
|
84466
|
-
processError({ issues: issue2.issues }, [...
|
|
85198
|
+
processError({ issues: issue2.issues }, [...path62, ...issue2.path]);
|
|
84467
85199
|
} else if (issue2.code === "invalid_element") {
|
|
84468
|
-
processError({ issues: issue2.issues }, [...
|
|
85200
|
+
processError({ issues: issue2.issues }, [...path62, ...issue2.path]);
|
|
84469
85201
|
} else {
|
|
84470
|
-
const fullpath = [...
|
|
85202
|
+
const fullpath = [...path62, ...issue2.path];
|
|
84471
85203
|
if (fullpath.length === 0) {
|
|
84472
85204
|
fieldErrors._errors.push(mapper(issue2));
|
|
84473
85205
|
} else {
|
|
@@ -84495,17 +85227,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
84495
85227
|
__name(formatError, "formatError");
|
|
84496
85228
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
84497
85229
|
const result = { errors: [] };
|
|
84498
|
-
const processError = /* @__PURE__ */ __name((error52,
|
|
85230
|
+
const processError = /* @__PURE__ */ __name((error52, path62 = []) => {
|
|
84499
85231
|
var _a32, _b2;
|
|
84500
85232
|
for (const issue2 of error52.issues) {
|
|
84501
85233
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
84502
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
85234
|
+
issue2.errors.map((issues) => processError({ issues }, [...path62, ...issue2.path]));
|
|
84503
85235
|
} else if (issue2.code === "invalid_key") {
|
|
84504
|
-
processError({ issues: issue2.issues }, [...
|
|
85236
|
+
processError({ issues: issue2.issues }, [...path62, ...issue2.path]);
|
|
84505
85237
|
} else if (issue2.code === "invalid_element") {
|
|
84506
|
-
processError({ issues: issue2.issues }, [...
|
|
85238
|
+
processError({ issues: issue2.issues }, [...path62, ...issue2.path]);
|
|
84507
85239
|
} else {
|
|
84508
|
-
const fullpath = [...
|
|
85240
|
+
const fullpath = [...path62, ...issue2.path];
|
|
84509
85241
|
if (fullpath.length === 0) {
|
|
84510
85242
|
result.errors.push(mapper(issue2));
|
|
84511
85243
|
continue;
|
|
@@ -84538,8 +85270,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
84538
85270
|
__name(treeifyError, "treeifyError");
|
|
84539
85271
|
function toDotPath(_path) {
|
|
84540
85272
|
const segs = [];
|
|
84541
|
-
const
|
|
84542
|
-
for (const seg of
|
|
85273
|
+
const path62 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
85274
|
+
for (const seg of path62) {
|
|
84543
85275
|
if (typeof seg === "number")
|
|
84544
85276
|
segs.push(`[${seg}]`);
|
|
84545
85277
|
else if (typeof seg === "symbol")
|
|
@@ -97452,13 +98184,13 @@ function resolveRef(ref, ctx) {
|
|
|
97452
98184
|
if (!ref.startsWith("#")) {
|
|
97453
98185
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
97454
98186
|
}
|
|
97455
|
-
const
|
|
97456
|
-
if (
|
|
98187
|
+
const path62 = ref.slice(1).split("/").filter(Boolean);
|
|
98188
|
+
if (path62.length === 0) {
|
|
97457
98189
|
return ctx.rootSchema;
|
|
97458
98190
|
}
|
|
97459
98191
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
97460
|
-
if (
|
|
97461
|
-
const key =
|
|
98192
|
+
if (path62[0] === defsKey) {
|
|
98193
|
+
const key = path62[1];
|
|
97462
98194
|
if (!key || !ctx.defs[key]) {
|
|
97463
98195
|
throw new Error(`Reference not found: ${ref}`);
|
|
97464
98196
|
}
|
|
@@ -98020,9 +98752,9 @@ Please add "${field}" to "env.${envName}".`
|
|
|
98020
98752
|
return rawEnv[field] ?? defaultValue;
|
|
98021
98753
|
}
|
|
98022
98754
|
__name(notInheritable, "notInheritable");
|
|
98023
|
-
function unwindPropertyPath(root,
|
|
98755
|
+
function unwindPropertyPath(root, path62) {
|
|
98024
98756
|
let container = root;
|
|
98025
|
-
const parts =
|
|
98757
|
+
const parts = path62.split(".");
|
|
98026
98758
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
98027
98759
|
if (!hasProperty(container, parts[i])) {
|
|
98028
98760
|
return;
|
|
@@ -102243,7 +102975,6 @@ var validateBindingsHaveUniqueNames = /* @__PURE__ */ __name((diagnostics, confi
|
|
|
102243
102975
|
])
|
|
102244
102976
|
);
|
|
102245
102977
|
bindingsGroupedByType["Secret"] = config210.secrets?.required ?? [];
|
|
102246
|
-
bindingsGroupedByType["Container images"] = [CONTAINER_IMAGES_BINDING];
|
|
102247
102978
|
const bindingsGroupedByName = {};
|
|
102248
102979
|
for (const bindingType in bindingsGroupedByType) {
|
|
102249
102980
|
const bindingNames = bindingsGroupedByType[bindingType];
|
|
@@ -103835,6 +104566,11 @@ var validateObservability = /* @__PURE__ */ __name((diagnostics, field, value) =
|
|
|
103835
104566
|
key: "traces.enabled",
|
|
103836
104567
|
value: val.traces?.enabled,
|
|
103837
104568
|
type: "boolean"
|
|
104569
|
+
},
|
|
104570
|
+
{
|
|
104571
|
+
key: "issues.enabled",
|
|
104572
|
+
value: val.issues?.enabled,
|
|
104573
|
+
type: "boolean"
|
|
103838
104574
|
}
|
|
103839
104575
|
]) && isValid;
|
|
103840
104576
|
isValid = validateOptionalProperty(
|
|
@@ -103851,6 +104587,13 @@ var validateObservability = /* @__PURE__ */ __name((diagnostics, field, value) =
|
|
|
103851
104587
|
val.redact_query_string,
|
|
103852
104588
|
"boolean"
|
|
103853
104589
|
) && isValid;
|
|
104590
|
+
const issuesIsObject = val.issues === void 0 || val.issues !== null && typeof val.issues === "object" && !Array.isArray(val.issues);
|
|
104591
|
+
if (!issuesIsObject) {
|
|
104592
|
+
diagnostics.errors.push(
|
|
104593
|
+
`"${field}.issues" should be an object but got ${JSON.stringify(val.issues)}.`
|
|
104594
|
+
);
|
|
104595
|
+
isValid = false;
|
|
104596
|
+
}
|
|
103854
104597
|
isValid = validateOptionalProperty(diagnostics, field, "logs", val.logs, "object") && isValid;
|
|
103855
104598
|
isValid = validateOptionalProperty(
|
|
103856
104599
|
diagnostics,
|
|
@@ -103863,9 +104606,25 @@ var validateObservability = /* @__PURE__ */ __name((diagnostics, field, value) =
|
|
|
103863
104606
|
"enabled",
|
|
103864
104607
|
"head_sampling_rate",
|
|
103865
104608
|
"redact_query_string",
|
|
104609
|
+
"issues",
|
|
103866
104610
|
"logs",
|
|
103867
104611
|
"traces"
|
|
103868
104612
|
]) && isValid;
|
|
104613
|
+
if (val.issues !== void 0 && issuesIsObject) {
|
|
104614
|
+
isValid = validateOptionalProperty(
|
|
104615
|
+
diagnostics,
|
|
104616
|
+
`${field}.issues`,
|
|
104617
|
+
"enabled",
|
|
104618
|
+
val.issues.enabled,
|
|
104619
|
+
"boolean"
|
|
104620
|
+
) && isValid;
|
|
104621
|
+
isValid = validateAdditionalProperties(
|
|
104622
|
+
diagnostics,
|
|
104623
|
+
`${field}.issues`,
|
|
104624
|
+
Object.keys(val.issues),
|
|
104625
|
+
["enabled"]
|
|
104626
|
+
) && isValid;
|
|
104627
|
+
}
|
|
103869
104628
|
if (typeof val.logs === "object") {
|
|
103870
104629
|
isValid = validateOptionalProperty(
|
|
103871
104630
|
diagnostics,
|
|
@@ -104316,6 +105075,7 @@ var BINDING_LOCAL_SUPPORT = {
|
|
|
104316
105075
|
service: "local-and-remote",
|
|
104317
105076
|
// TODO: Miniflare currently ignores `remote: true` on queues, tracked in #13727.
|
|
104318
105077
|
queue: "local-and-remote",
|
|
105078
|
+
flagship: "local-and-remote",
|
|
104319
105079
|
vectorize: "remote",
|
|
104320
105080
|
mtls_certificate: "remote",
|
|
104321
105081
|
dispatch_namespace: "remote",
|
|
@@ -104325,7 +105085,6 @@ var BINDING_LOCAL_SUPPORT = {
|
|
|
104325
105085
|
ai_search_namespace: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
104326
105086
|
media: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
104327
105087
|
artifacts: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
104328
|
-
flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
104329
105088
|
vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
104330
105089
|
vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
104331
105090
|
agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
|
|
@@ -105325,13 +106084,13 @@ function printBindings(bindings, options) {
|
|
|
105325
106084
|
}
|
|
105326
106085
|
if (flagship.length > 0) {
|
|
105327
106086
|
output.push(
|
|
105328
|
-
...flagship.map(({ binding, app_id }) => {
|
|
106087
|
+
...flagship.map(({ binding, app_id, remote }) => {
|
|
105329
106088
|
return {
|
|
105330
106089
|
name: binding,
|
|
105331
106090
|
type: getBindingTypeFriendlyName("flagship"),
|
|
105332
106091
|
value: app_id,
|
|
105333
106092
|
mode: getMode({
|
|
105334
|
-
isSimulatedLocally:
|
|
106093
|
+
isSimulatedLocally: context.remoteBindingsDisabled || !remote
|
|
105335
106094
|
})
|
|
105336
106095
|
};
|
|
105337
106096
|
})
|
|
@@ -107702,6 +108461,124 @@ function toUrlPath(filePath) {
|
|
|
107702
108461
|
return filePath.replace(/\\/g, "/");
|
|
107703
108462
|
}
|
|
107704
108463
|
__name(toUrlPath, "toUrlPath");
|
|
108464
|
+
var import_minimatch = __toESM2(require_minimatch());
|
|
108465
|
+
var DEFAULT_MIGRATIONS_DIR = "./migrations";
|
|
108466
|
+
function getD1MigrationFiles(options) {
|
|
108467
|
+
const migrationsDir = normalizeRelativePath(
|
|
108468
|
+
options.migrationsDir ?? DEFAULT_MIGRATIONS_DIR
|
|
108469
|
+
);
|
|
108470
|
+
const migrationsPattern = normalizeRelativePath(
|
|
108471
|
+
options.migrationsPattern ?? `${migrationsDir}/*.sql`
|
|
108472
|
+
);
|
|
108473
|
+
const dirRelativePattern = stripDirPrefix(migrationsPattern, migrationsDir);
|
|
108474
|
+
const walkRoot = import_node_path5.default.resolve(options.projectPath, migrationsDir);
|
|
108475
|
+
const names = listFilesRelative(
|
|
108476
|
+
walkRoot,
|
|
108477
|
+
new import_minimatch.Minimatch(dirRelativePattern, { dot: false })
|
|
108478
|
+
);
|
|
108479
|
+
return names.map((name3) => ({
|
|
108480
|
+
name: name3,
|
|
108481
|
+
filePath: import_node_path5.default.join(walkRoot, ...name3.split("/"))
|
|
108482
|
+
}));
|
|
108483
|
+
}
|
|
108484
|
+
__name(getD1MigrationFiles, "getD1MigrationFiles");
|
|
108485
|
+
function normalizeRelativePath(p2) {
|
|
108486
|
+
const forwardSlashed = p2.replace(/\\/g, "/");
|
|
108487
|
+
const normalized = import_node_path5.default.posix.normalize(forwardSlashed);
|
|
108488
|
+
if (normalized.endsWith("/")) {
|
|
108489
|
+
return normalized.slice(0, -1);
|
|
108490
|
+
}
|
|
108491
|
+
return normalized;
|
|
108492
|
+
}
|
|
108493
|
+
__name(normalizeRelativePath, "normalizeRelativePath");
|
|
108494
|
+
function stripDirPrefix(pattern, dir2) {
|
|
108495
|
+
if (dir2 === ".") {
|
|
108496
|
+
return pattern;
|
|
108497
|
+
}
|
|
108498
|
+
const prefix = `${dir2}/`;
|
|
108499
|
+
if (!pattern.startsWith(prefix)) {
|
|
108500
|
+
throw new Error(
|
|
108501
|
+
`Expected migrations pattern ${JSON.stringify(pattern)} to start with ${JSON.stringify(prefix)}`
|
|
108502
|
+
);
|
|
108503
|
+
}
|
|
108504
|
+
return pattern.slice(prefix.length);
|
|
108505
|
+
}
|
|
108506
|
+
__name(stripDirPrefix, "stripDirPrefix");
|
|
108507
|
+
function listFilesRelative(dir2, matcher) {
|
|
108508
|
+
const out = [];
|
|
108509
|
+
const stack = [{ abs: dir2, rel: "" }];
|
|
108510
|
+
while (stack.length > 0) {
|
|
108511
|
+
const { abs, rel } = stack.pop();
|
|
108512
|
+
let entries;
|
|
108513
|
+
try {
|
|
108514
|
+
entries = import_node_fs4.default.readdirSync(abs, { withFileTypes: true });
|
|
108515
|
+
} catch {
|
|
108516
|
+
continue;
|
|
108517
|
+
}
|
|
108518
|
+
for (const entry of entries) {
|
|
108519
|
+
const childRel = rel === "" ? entry.name : `${rel}/${entry.name}`;
|
|
108520
|
+
if (entry.isDirectory()) {
|
|
108521
|
+
if (matcher.match(
|
|
108522
|
+
childRel,
|
|
108523
|
+
true
|
|
108524
|
+
/* partial */
|
|
108525
|
+
)) {
|
|
108526
|
+
stack.push({ abs: import_node_path5.default.join(abs, entry.name), rel: childRel });
|
|
108527
|
+
}
|
|
108528
|
+
} else if (entry.isFile() && matcher.match(childRel)) {
|
|
108529
|
+
out.push(childRel);
|
|
108530
|
+
}
|
|
108531
|
+
}
|
|
108532
|
+
}
|
|
108533
|
+
return out.sort(compareMigrationPaths);
|
|
108534
|
+
}
|
|
108535
|
+
__name(listFilesRelative, "listFilesRelative");
|
|
108536
|
+
function compareMigrationPaths(a, b2) {
|
|
108537
|
+
const aSegments = a.split("/");
|
|
108538
|
+
const bSegments = b2.split("/");
|
|
108539
|
+
const shared = Math.min(aSegments.length, bSegments.length);
|
|
108540
|
+
for (let i = 0; i < shared; i++) {
|
|
108541
|
+
const aSegment = aSegments[i];
|
|
108542
|
+
const bSegment = bSegments[i];
|
|
108543
|
+
if (aSegment === void 0 || bSegment === void 0) {
|
|
108544
|
+
break;
|
|
108545
|
+
}
|
|
108546
|
+
const cmp = compareSegments(aSegment, bSegment);
|
|
108547
|
+
if (cmp !== 0) {
|
|
108548
|
+
return cmp;
|
|
108549
|
+
}
|
|
108550
|
+
}
|
|
108551
|
+
return aSegments.length - bSegments.length;
|
|
108552
|
+
}
|
|
108553
|
+
__name(compareMigrationPaths, "compareMigrationPaths");
|
|
108554
|
+
function compareSegments(a, b2) {
|
|
108555
|
+
const aNum = leadingMigrationNumber(a);
|
|
108556
|
+
const bNum = leadingMigrationNumber(b2);
|
|
108557
|
+
if (aNum !== bNum) {
|
|
108558
|
+
if (Number.isFinite(aNum) && Number.isFinite(bNum)) {
|
|
108559
|
+
return aNum - bNum;
|
|
108560
|
+
}
|
|
108561
|
+
if (Number.isFinite(aNum)) {
|
|
108562
|
+
return -1;
|
|
108563
|
+
}
|
|
108564
|
+
if (Number.isFinite(bNum)) {
|
|
108565
|
+
return 1;
|
|
108566
|
+
}
|
|
108567
|
+
}
|
|
108568
|
+
if (a < b2) {
|
|
108569
|
+
return -1;
|
|
108570
|
+
}
|
|
108571
|
+
if (a > b2) {
|
|
108572
|
+
return 1;
|
|
108573
|
+
}
|
|
108574
|
+
return 0;
|
|
108575
|
+
}
|
|
108576
|
+
__name(compareSegments, "compareSegments");
|
|
108577
|
+
function leadingMigrationNumber(relativePath) {
|
|
108578
|
+
const firstSegment = relativePath.split("/")[0];
|
|
108579
|
+
return parseInt(firstSegment.split("_")[0], 10);
|
|
108580
|
+
}
|
|
108581
|
+
__name(leadingMigrationNumber, "leadingMigrationNumber");
|
|
107705
108582
|
|
|
107706
108583
|
// ../cli/dist/gitignore.mjs
|
|
107707
108584
|
function maybeAppendWranglerToGitIgnoreLikeFile(filePath) {
|
|
@@ -112593,7 +113470,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
112593
113470
|
var yargs_default = Yargs;
|
|
112594
113471
|
|
|
112595
113472
|
// package.json
|
|
112596
|
-
var version2 = "2.72.
|
|
113473
|
+
var version2 = "2.72.11";
|
|
112597
113474
|
|
|
112598
113475
|
// src/metrics.ts
|
|
112599
113476
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -113255,122 +114132,8 @@ var import_node_fs9 = __toESM(require("node:fs"));
|
|
|
113255
114132
|
var import_node_path10 = require("node:path");
|
|
113256
114133
|
var import_comment_json = __toESM(require_src3());
|
|
113257
114134
|
|
|
113258
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
113259
|
-
|
|
113260
|
-
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
113261
|
-
return [lines.length, lines.pop().length + 1];
|
|
113262
|
-
}
|
|
113263
|
-
function makeCodeBlock2(string4, line, column) {
|
|
113264
|
-
let lines = string4.split(/\r\n|\n|\r/g);
|
|
113265
|
-
let codeblock = "";
|
|
113266
|
-
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
113267
|
-
for (let i = line - 1; i <= line + 1; i++) {
|
|
113268
|
-
let l = lines[i - 1];
|
|
113269
|
-
if (!l)
|
|
113270
|
-
continue;
|
|
113271
|
-
codeblock += i.toString().padEnd(numberLen, " ");
|
|
113272
|
-
codeblock += ": ";
|
|
113273
|
-
codeblock += l;
|
|
113274
|
-
codeblock += "\n";
|
|
113275
|
-
if (i === line) {
|
|
113276
|
-
codeblock += " ".repeat(numberLen + column + 2);
|
|
113277
|
-
codeblock += "^\n";
|
|
113278
|
-
}
|
|
113279
|
-
}
|
|
113280
|
-
return codeblock;
|
|
113281
|
-
}
|
|
113282
|
-
var TomlError2 = class extends Error {
|
|
113283
|
-
line;
|
|
113284
|
-
column;
|
|
113285
|
-
codeblock;
|
|
113286
|
-
constructor(message, options) {
|
|
113287
|
-
const [line, column] = getLineColFromPtr2(options.toml, options.ptr);
|
|
113288
|
-
const codeblock = makeCodeBlock2(options.toml, line, column);
|
|
113289
|
-
super(`Invalid TOML document: ${message}
|
|
113290
|
-
|
|
113291
|
-
${codeblock}`, options);
|
|
113292
|
-
this.line = line;
|
|
113293
|
-
this.column = column;
|
|
113294
|
-
this.codeblock = codeblock;
|
|
113295
|
-
}
|
|
113296
|
-
};
|
|
113297
|
-
|
|
113298
|
-
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/util.js
|
|
113299
|
-
function isEscaped2(str, ptr) {
|
|
113300
|
-
let i = 0;
|
|
113301
|
-
while (str[ptr - ++i] === "\\")
|
|
113302
|
-
;
|
|
113303
|
-
return --i && i % 2;
|
|
113304
|
-
}
|
|
113305
|
-
function indexOfNewline2(str, start = 0, end = str.length) {
|
|
113306
|
-
let idx = str.indexOf("\n", start);
|
|
113307
|
-
if (str[idx - 1] === "\r")
|
|
113308
|
-
idx--;
|
|
113309
|
-
return idx <= end ? idx : -1;
|
|
113310
|
-
}
|
|
113311
|
-
function skipComment2(str, ptr) {
|
|
113312
|
-
for (let i = ptr; i < str.length; i++) {
|
|
113313
|
-
let c2 = str[i];
|
|
113314
|
-
if (c2 === "\n")
|
|
113315
|
-
return i;
|
|
113316
|
-
if (c2 === "\r" && str[i + 1] === "\n")
|
|
113317
|
-
return i + 1;
|
|
113318
|
-
if (c2 < " " && c2 !== " " || c2 === "\x7F") {
|
|
113319
|
-
throw new TomlError2("control characters are not allowed in comments", {
|
|
113320
|
-
toml: str,
|
|
113321
|
-
ptr
|
|
113322
|
-
});
|
|
113323
|
-
}
|
|
113324
|
-
}
|
|
113325
|
-
return str.length;
|
|
113326
|
-
}
|
|
113327
|
-
function skipVoid2(str, ptr, banNewLines, banComments) {
|
|
113328
|
-
let c2;
|
|
113329
|
-
while ((c2 = str[ptr]) === " " || c2 === " " || !banNewLines && (c2 === "\n" || c2 === "\r" && str[ptr + 1] === "\n"))
|
|
113330
|
-
ptr++;
|
|
113331
|
-
return banComments || c2 !== "#" ? ptr : skipVoid2(str, skipComment2(str, ptr), banNewLines);
|
|
113332
|
-
}
|
|
113333
|
-
function skipUntil2(str, ptr, sep, end, banNewLines = false) {
|
|
113334
|
-
if (!end) {
|
|
113335
|
-
ptr = indexOfNewline2(str, ptr);
|
|
113336
|
-
return ptr < 0 ? str.length : ptr;
|
|
113337
|
-
}
|
|
113338
|
-
for (let i = ptr; i < str.length; i++) {
|
|
113339
|
-
let c2 = str[i];
|
|
113340
|
-
if (c2 === "#") {
|
|
113341
|
-
i = indexOfNewline2(str, i);
|
|
113342
|
-
} else if (c2 === sep) {
|
|
113343
|
-
return i + 1;
|
|
113344
|
-
} else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i + 1] === "\n")) {
|
|
113345
|
-
return i;
|
|
113346
|
-
}
|
|
113347
|
-
}
|
|
113348
|
-
throw new TomlError2("cannot find end of structure", {
|
|
113349
|
-
toml: str,
|
|
113350
|
-
ptr
|
|
113351
|
-
});
|
|
113352
|
-
}
|
|
113353
|
-
function getStringEnd2(str, seek) {
|
|
113354
|
-
let first = str[seek];
|
|
113355
|
-
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
113356
|
-
seek += target.length - 1;
|
|
113357
|
-
do
|
|
113358
|
-
seek = str.indexOf(target, ++seek);
|
|
113359
|
-
while (seek > -1 && first !== "'" && isEscaped2(str, seek));
|
|
113360
|
-
if (seek > -1) {
|
|
113361
|
-
seek += target.length;
|
|
113362
|
-
if (target.length > 1) {
|
|
113363
|
-
if (str[seek] === first)
|
|
113364
|
-
seek++;
|
|
113365
|
-
if (str[seek] === first)
|
|
113366
|
-
seek++;
|
|
113367
|
-
}
|
|
113368
|
-
}
|
|
113369
|
-
return seek;
|
|
113370
|
-
}
|
|
113371
|
-
|
|
113372
|
-
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/date.js
|
|
113373
|
-
var DATE_TIME_RE2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
114135
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/date.js
|
|
114136
|
+
var DATE_TIME_RE2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
113374
114137
|
var TomlDate2 = class _TomlDate2 extends Date {
|
|
113375
114138
|
#hasDate = false;
|
|
113376
114139
|
#hasTime = false;
|
|
@@ -113461,98 +114224,224 @@ var TomlDate2 = class _TomlDate2 extends Date {
|
|
|
113461
114224
|
}
|
|
113462
114225
|
};
|
|
113463
114226
|
|
|
113464
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114227
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/error.js
|
|
114228
|
+
function getLineColFromPtr2(string4, ptr) {
|
|
114229
|
+
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
114230
|
+
return [lines.length, lines.pop().length + 1];
|
|
114231
|
+
}
|
|
114232
|
+
function makeCodeBlock2(string4, line, column) {
|
|
114233
|
+
let lines = string4.split(/\r\n|\n|\r/g);
|
|
114234
|
+
let codeblock = "";
|
|
114235
|
+
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
114236
|
+
for (let i = line - 1; i <= line + 1; i++) {
|
|
114237
|
+
let l = lines[i - 1];
|
|
114238
|
+
if (!l)
|
|
114239
|
+
continue;
|
|
114240
|
+
codeblock += i.toString().padEnd(numberLen, " ");
|
|
114241
|
+
codeblock += ": ";
|
|
114242
|
+
codeblock += l;
|
|
114243
|
+
codeblock += "\n";
|
|
114244
|
+
if (i === line) {
|
|
114245
|
+
codeblock += " ".repeat(numberLen + column + 2);
|
|
114246
|
+
codeblock += "^\n";
|
|
114247
|
+
}
|
|
114248
|
+
}
|
|
114249
|
+
return codeblock;
|
|
114250
|
+
}
|
|
114251
|
+
var TomlError2 = class extends Error {
|
|
114252
|
+
line;
|
|
114253
|
+
column;
|
|
114254
|
+
codeblock;
|
|
114255
|
+
constructor(message, options) {
|
|
114256
|
+
const [line, column] = getLineColFromPtr2(options.toml, options.ptr);
|
|
114257
|
+
const codeblock = makeCodeBlock2(options.toml, line, column);
|
|
114258
|
+
super(`Invalid TOML document: ${message}
|
|
114259
|
+
|
|
114260
|
+
${codeblock}`, options);
|
|
114261
|
+
this.line = line;
|
|
114262
|
+
this.column = column;
|
|
114263
|
+
this.codeblock = codeblock;
|
|
114264
|
+
}
|
|
114265
|
+
};
|
|
114266
|
+
|
|
114267
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/util.js
|
|
114268
|
+
function indexOfNewline2(str, start = 0) {
|
|
114269
|
+
let idx = str.indexOf("\n", start);
|
|
114270
|
+
if (str.charCodeAt(idx - 1) === 13)
|
|
114271
|
+
idx--;
|
|
114272
|
+
return idx;
|
|
114273
|
+
}
|
|
114274
|
+
function skipComment2(ctx) {
|
|
114275
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
114276
|
+
let c2 = ctx.s.charCodeAt(ctx.p);
|
|
114277
|
+
if (c2 === 10)
|
|
114278
|
+
break;
|
|
114279
|
+
if (c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
|
|
114280
|
+
ctx.p++;
|
|
114281
|
+
break;
|
|
114282
|
+
}
|
|
114283
|
+
if (c2 < 32 && c2 !== 9 || c2 === 127) {
|
|
114284
|
+
throw new TomlError2("control characters are not allowed in comments", {
|
|
114285
|
+
toml: ctx.s,
|
|
114286
|
+
ptr: ctx.p
|
|
114287
|
+
});
|
|
114288
|
+
}
|
|
114289
|
+
}
|
|
114290
|
+
}
|
|
114291
|
+
function skipVoid2(ctx, banNewLines, banComments) {
|
|
114292
|
+
let c2;
|
|
114293
|
+
while (1) {
|
|
114294
|
+
while ((c2 = ctx.s.charCodeAt(ctx.p)) === 32 || c2 === 9 || !banNewLines && (c2 === 10 || c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
|
|
114295
|
+
ctx.p++;
|
|
114296
|
+
if (banComments || c2 !== 35)
|
|
114297
|
+
break;
|
|
114298
|
+
skipComment2(ctx);
|
|
114299
|
+
}
|
|
114300
|
+
}
|
|
114301
|
+
function skipUntil2(ctx, sep, end) {
|
|
114302
|
+
let ptr = ctx.p;
|
|
114303
|
+
if (!end) {
|
|
114304
|
+
ptr = indexOfNewline2(ctx.s, ptr);
|
|
114305
|
+
ctx.p = ptr < 0 ? ctx.s.length : ptr;
|
|
114306
|
+
return;
|
|
114307
|
+
}
|
|
114308
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
114309
|
+
let c2 = ctx.s.charCodeAt(ctx.p);
|
|
114310
|
+
if (c2 === 35) {
|
|
114311
|
+
skipComment2(ctx);
|
|
114312
|
+
} else if (c2 === end || c2 === sep) {
|
|
114313
|
+
return;
|
|
114314
|
+
}
|
|
114315
|
+
}
|
|
114316
|
+
throw new TomlError2("cannot find end of structure", {
|
|
114317
|
+
toml: ctx.s,
|
|
114318
|
+
ptr
|
|
114319
|
+
});
|
|
114320
|
+
}
|
|
114321
|
+
|
|
114322
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/primitive.js
|
|
113465
114323
|
var INT_REGEX2 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
113466
114324
|
var FLOAT_REGEX2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
113467
114325
|
var LEADING_ZERO2 = /^[+-]?0[0-9_]/;
|
|
113468
|
-
|
|
113469
|
-
|
|
113470
|
-
|
|
113471
|
-
|
|
113472
|
-
|
|
113473
|
-
|
|
113474
|
-
r: "\r",
|
|
113475
|
-
'"': '"',
|
|
113476
|
-
"\\": "\\"
|
|
113477
|
-
};
|
|
113478
|
-
function parseString2(str, ptr = 0, endPtr = str.length) {
|
|
113479
|
-
let isLiteral = str[ptr] === "'";
|
|
113480
|
-
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
|
114326
|
+
function parseString2(ctx) {
|
|
114327
|
+
let start = ctx.p;
|
|
114328
|
+
let c2 = ctx.s.charCodeAt(ctx.p++);
|
|
114329
|
+
let first = c2;
|
|
114330
|
+
let isLiteral = c2 === 39;
|
|
114331
|
+
let isMultiline = c2 === ctx.s.charCodeAt(ctx.p) && c2 === ctx.s.charCodeAt(ctx.p + 1);
|
|
113481
114332
|
if (isMultiline) {
|
|
113482
|
-
|
|
113483
|
-
|
|
113484
|
-
|
|
113485
|
-
|
|
113486
|
-
|
|
113487
|
-
}
|
|
113488
|
-
let tmp = 0;
|
|
113489
|
-
let isEscape;
|
|
114333
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p += 2)) === 10)
|
|
114334
|
+
ctx.p++;
|
|
114335
|
+
else if (c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
|
|
114336
|
+
ctx.p += 2;
|
|
114337
|
+
}
|
|
113490
114338
|
let parsed = "";
|
|
113491
|
-
let sliceStart =
|
|
113492
|
-
|
|
113493
|
-
|
|
113494
|
-
|
|
113495
|
-
|
|
113496
|
-
|
|
113497
|
-
|
|
113498
|
-
ptr: ptr - 1
|
|
113499
|
-
});
|
|
113500
|
-
}
|
|
113501
|
-
} else if (c2 < " " && c2 !== " " || c2 === "\x7F") {
|
|
114339
|
+
let sliceStart = ctx.p;
|
|
114340
|
+
let state = 0;
|
|
114341
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
114342
|
+
c2 = ctx.s.charCodeAt(ctx.p);
|
|
114343
|
+
if (isMultiline && (c2 === 10 || c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
|
|
114344
|
+
state = state && 3;
|
|
114345
|
+
} else if (c2 < 32 && c2 !== 9 || c2 === 127) {
|
|
113502
114346
|
throw new TomlError2("control characters are not allowed in strings", {
|
|
113503
|
-
toml:
|
|
113504
|
-
ptr:
|
|
114347
|
+
toml: ctx.s,
|
|
114348
|
+
ptr: ctx.p
|
|
113505
114349
|
});
|
|
113506
|
-
}
|
|
113507
|
-
|
|
113508
|
-
|
|
113509
|
-
|
|
113510
|
-
|
|
113511
|
-
|
|
113512
|
-
|
|
113513
|
-
|
|
113514
|
-
|
|
113515
|
-
|
|
113516
|
-
|
|
113517
|
-
|
|
113518
|
-
|
|
113519
|
-
|
|
113520
|
-
|
|
113521
|
-
|
|
113522
|
-
|
|
113523
|
-
|
|
113524
|
-
|
|
113525
|
-
|
|
113526
|
-
|
|
113527
|
-
|
|
113528
|
-
|
|
113529
|
-
|
|
113530
|
-
|
|
113531
|
-
|
|
113532
|
-
|
|
113533
|
-
|
|
113534
|
-
|
|
113535
|
-
|
|
114350
|
+
} else if ((!state || state === 3) && c2 === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
|
|
114351
|
+
if (isMultiline) {
|
|
114352
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
114353
|
+
ctx.p++;
|
|
114354
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
114355
|
+
ctx.p++;
|
|
114356
|
+
}
|
|
114357
|
+
if (!state)
|
|
114358
|
+
parsed += ctx.s.slice(sliceStart, ctx.p);
|
|
114359
|
+
ctx.p += isMultiline ? 3 : 1;
|
|
114360
|
+
return parsed;
|
|
114361
|
+
} else if (!state) {
|
|
114362
|
+
if (!isLiteral && c2 === 92) {
|
|
114363
|
+
parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
|
|
114364
|
+
state = 1;
|
|
114365
|
+
}
|
|
114366
|
+
} else if (state === 1) {
|
|
114367
|
+
if (c2 === 120 || c2 === 117 || c2 === 85) {
|
|
114368
|
+
let value = 0;
|
|
114369
|
+
let len = c2 === 120 ? 2 : c2 === 117 ? 4 : 8;
|
|
114370
|
+
for (let j2 = 0; j2 < len; j2++, ctx.p++) {
|
|
114371
|
+
let hex3 = ctx.s.charCodeAt(ctx.p + 1);
|
|
114372
|
+
let digit = (
|
|
114373
|
+
/* 0-9 */
|
|
114374
|
+
hex3 >= 48 && hex3 <= 57 ? hex3 - 48 : (
|
|
114375
|
+
/* A-F */
|
|
114376
|
+
hex3 >= 65 && hex3 <= 70 ? hex3 - 65 + 10 : (
|
|
114377
|
+
/* a-f */
|
|
114378
|
+
hex3 >= 97 && hex3 <= 102 ? hex3 - 97 + 10 : -1
|
|
114379
|
+
)
|
|
114380
|
+
)
|
|
114381
|
+
);
|
|
114382
|
+
if (digit < 0)
|
|
114383
|
+
throw new TomlError2("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
|
|
114384
|
+
value = value << 4 | digit;
|
|
114385
|
+
}
|
|
114386
|
+
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
|
114387
|
+
throw new TomlError2("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
|
|
114388
|
+
}
|
|
114389
|
+
parsed += String.fromCodePoint(value);
|
|
114390
|
+
sliceStart = ctx.p + 1;
|
|
114391
|
+
state = 0;
|
|
114392
|
+
} else if (c2 === 32 || c2 === 9) {
|
|
114393
|
+
state = 2;
|
|
113536
114394
|
} else {
|
|
113537
|
-
|
|
113538
|
-
|
|
113539
|
-
|
|
114395
|
+
if (c2 === 98)
|
|
114396
|
+
parsed += "\b";
|
|
114397
|
+
else if (c2 === 116)
|
|
114398
|
+
parsed += " ";
|
|
114399
|
+
else if (c2 === 110)
|
|
114400
|
+
parsed += "\n";
|
|
114401
|
+
else if (c2 === 102)
|
|
114402
|
+
parsed += "\f";
|
|
114403
|
+
else if (c2 === 114)
|
|
114404
|
+
parsed += "\r";
|
|
114405
|
+
else if (c2 === 101)
|
|
114406
|
+
parsed += "\x1B";
|
|
114407
|
+
else if (c2 === 34)
|
|
114408
|
+
parsed += '"';
|
|
114409
|
+
else if (c2 === 92)
|
|
114410
|
+
parsed += "\\";
|
|
114411
|
+
else
|
|
114412
|
+
throw new TomlError2("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
|
|
114413
|
+
sliceStart = ctx.p + 1;
|
|
114414
|
+
state = 0;
|
|
114415
|
+
}
|
|
114416
|
+
} else if (c2 !== 32 && c2 !== 9) {
|
|
114417
|
+
if (state === 2) {
|
|
114418
|
+
throw new TomlError2("invalid escape: only line-ending whitespace may be escaped", {
|
|
114419
|
+
toml: ctx.s,
|
|
114420
|
+
ptr: sliceStart
|
|
113540
114421
|
});
|
|
113541
114422
|
}
|
|
113542
|
-
|
|
113543
|
-
|
|
113544
|
-
tmp = ptr - 1;
|
|
113545
|
-
isEscape = true;
|
|
113546
|
-
parsed += str.slice(sliceStart, tmp);
|
|
114423
|
+
state = !isLiteral && c2 === 92 ? 1 : 0;
|
|
114424
|
+
sliceStart = ctx.p;
|
|
113547
114425
|
}
|
|
113548
114426
|
}
|
|
113549
|
-
|
|
114427
|
+
throw new TomlError2("unfinished string", { toml: ctx.s, ptr: start });
|
|
113550
114428
|
}
|
|
113551
|
-
function
|
|
113552
|
-
|
|
113553
|
-
|
|
113554
|
-
if (
|
|
113555
|
-
|
|
114429
|
+
function sliceAndTrimEndOf2(ctx, start, end) {
|
|
114430
|
+
let value = ctx.s.slice(start, end);
|
|
114431
|
+
let commentIdx = value.indexOf("#");
|
|
114432
|
+
if (commentIdx > 0) {
|
|
114433
|
+
skipComment2({ s: value, p: commentIdx, d: 0 });
|
|
114434
|
+
value = value.slice(0, commentIdx);
|
|
114435
|
+
}
|
|
114436
|
+
return value.trimEnd();
|
|
114437
|
+
}
|
|
114438
|
+
function parseValue2(ctx, integersAsBigInt, end) {
|
|
114439
|
+
let ptr = ctx.p;
|
|
114440
|
+
let err = { toml: ctx.s, ptr };
|
|
114441
|
+
skipUntil2(ctx, 44, end);
|
|
114442
|
+
let value = sliceAndTrimEndOf2(ctx, ptr, ctx.p);
|
|
114443
|
+
if (!value)
|
|
114444
|
+
throw new TomlError2("incomplete declaration: value expected", err);
|
|
113556
114445
|
if (value === "-inf")
|
|
113557
114446
|
return -Infinity;
|
|
113558
114447
|
if (value === "inf" || value === "+inf")
|
|
@@ -113564,25 +114453,16 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
113564
114453
|
let isInt = INT_REGEX2.test(value);
|
|
113565
114454
|
if (isInt || FLOAT_REGEX2.test(value)) {
|
|
113566
114455
|
if (LEADING_ZERO2.test(value)) {
|
|
113567
|
-
throw new TomlError2("leading zeroes are not allowed",
|
|
113568
|
-
toml,
|
|
113569
|
-
ptr
|
|
113570
|
-
});
|
|
114456
|
+
throw new TomlError2("leading zeroes are not allowed", err);
|
|
113571
114457
|
}
|
|
113572
114458
|
value = value.replace(/_/g, "");
|
|
113573
114459
|
let numeric = +value;
|
|
113574
114460
|
if (isNaN(numeric)) {
|
|
113575
|
-
throw new TomlError2("invalid number",
|
|
113576
|
-
toml,
|
|
113577
|
-
ptr
|
|
113578
|
-
});
|
|
114461
|
+
throw new TomlError2("invalid number", err);
|
|
113579
114462
|
}
|
|
113580
114463
|
if (isInt) {
|
|
113581
114464
|
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
113582
|
-
throw new TomlError2("integer value cannot be represented losslessly",
|
|
113583
|
-
toml,
|
|
113584
|
-
ptr
|
|
113585
|
-
});
|
|
114465
|
+
throw new TomlError2("integer value cannot be represented losslessly", err);
|
|
113586
114466
|
}
|
|
113587
114467
|
if (isInt || integersAsBigInt === true)
|
|
113588
114468
|
numeric = BigInt(value);
|
|
@@ -113590,248 +114470,187 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
113590
114470
|
return numeric;
|
|
113591
114471
|
}
|
|
113592
114472
|
const date5 = new TomlDate2(value);
|
|
113593
|
-
if (!date5.isValid())
|
|
113594
|
-
throw new TomlError2("invalid value",
|
|
113595
|
-
toml,
|
|
113596
|
-
ptr
|
|
113597
|
-
});
|
|
113598
|
-
}
|
|
114473
|
+
if (!date5.isValid())
|
|
114474
|
+
throw new TomlError2("invalid value", err);
|
|
113599
114475
|
return date5;
|
|
113600
114476
|
}
|
|
113601
114477
|
|
|
113602
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
113603
|
-
function
|
|
113604
|
-
let
|
|
113605
|
-
let
|
|
113606
|
-
if (
|
|
113607
|
-
|
|
113608
|
-
|
|
113609
|
-
|
|
113610
|
-
|
|
113611
|
-
if (!allowNewLines) {
|
|
113612
|
-
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
113613
|
-
if (newlineIdx > -1) {
|
|
113614
|
-
throw new TomlError2("newlines are not allowed in inline tables", {
|
|
113615
|
-
toml: str,
|
|
113616
|
-
ptr: startPtr + newlineIdx
|
|
114478
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/extract.js
|
|
114479
|
+
function extractValue2(ctx, end, integersAsBigInt) {
|
|
114480
|
+
let ptr = ctx.p;
|
|
114481
|
+
let c2 = ctx.s.charCodeAt(ptr);
|
|
114482
|
+
if (c2 === 91 || c2 === 123) {
|
|
114483
|
+
if (!ctx.d--) {
|
|
114484
|
+
throw new TomlError2("document contains excessively nested structures. aborting.", {
|
|
114485
|
+
toml: ctx.s,
|
|
114486
|
+
ptr
|
|
113617
114487
|
});
|
|
113618
114488
|
}
|
|
114489
|
+
let value = c2 === 91 ? parseArray2(ctx, integersAsBigInt) : parseInlineTable2(ctx, integersAsBigInt);
|
|
114490
|
+
ctx.d++;
|
|
114491
|
+
return value;
|
|
113619
114492
|
}
|
|
113620
|
-
|
|
113621
|
-
|
|
113622
|
-
function extractValue2(str, ptr, end, depth, integersAsBigInt) {
|
|
113623
|
-
if (depth === 0) {
|
|
113624
|
-
throw new TomlError2("document contains excessively nested structures. aborting.", {
|
|
113625
|
-
toml: str,
|
|
113626
|
-
ptr
|
|
113627
|
-
});
|
|
113628
|
-
}
|
|
113629
|
-
let c2 = str[ptr];
|
|
113630
|
-
if (c2 === "[" || c2 === "{") {
|
|
113631
|
-
let [value, endPtr2] = c2 === "[" ? parseArray2(str, ptr, depth, integersAsBigInt) : parseInlineTable2(str, ptr, depth, integersAsBigInt);
|
|
113632
|
-
let newPtr = end ? skipUntil2(str, endPtr2, ",", end) : endPtr2;
|
|
113633
|
-
if (endPtr2 - newPtr && end === "}") {
|
|
113634
|
-
let nextNewLine = indexOfNewline2(str, endPtr2, newPtr);
|
|
113635
|
-
if (nextNewLine > -1) {
|
|
113636
|
-
throw new TomlError2("newlines are not allowed in inline tables", {
|
|
113637
|
-
toml: str,
|
|
113638
|
-
ptr: nextNewLine
|
|
113639
|
-
});
|
|
113640
|
-
}
|
|
113641
|
-
}
|
|
113642
|
-
return [value, newPtr];
|
|
113643
|
-
}
|
|
113644
|
-
let endPtr;
|
|
113645
|
-
if (c2 === '"' || c2 === "'") {
|
|
113646
|
-
endPtr = getStringEnd2(str, ptr);
|
|
113647
|
-
let parsed = parseString2(str, ptr, endPtr);
|
|
113648
|
-
if (end) {
|
|
113649
|
-
endPtr = skipVoid2(str, endPtr, end !== "]");
|
|
113650
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
113651
|
-
throw new TomlError2("unexpected character encountered", {
|
|
113652
|
-
toml: str,
|
|
113653
|
-
ptr: endPtr
|
|
113654
|
-
});
|
|
113655
|
-
}
|
|
113656
|
-
endPtr += +(str[endPtr] === ",");
|
|
113657
|
-
}
|
|
113658
|
-
return [parsed, endPtr];
|
|
114493
|
+
if (c2 === 34 || c2 === 39) {
|
|
114494
|
+
return parseString2(ctx);
|
|
113659
114495
|
}
|
|
113660
|
-
|
|
113661
|
-
|
|
113662
|
-
|
|
113663
|
-
|
|
113664
|
-
|
|
113665
|
-
ptr
|
|
113666
|
-
});
|
|
114496
|
+
if (c2 === 116) {
|
|
114497
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
114498
|
+
throw new TomlError2("invalid value", { toml: ctx.s, ptr });
|
|
114499
|
+
ctx.p++;
|
|
114500
|
+
return true;
|
|
113667
114501
|
}
|
|
113668
|
-
if (
|
|
113669
|
-
|
|
113670
|
-
|
|
114502
|
+
if (c2 === 102) {
|
|
114503
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
114504
|
+
throw new TomlError2("invalid value", { toml: ctx.s, ptr });
|
|
114505
|
+
ctx.p++;
|
|
114506
|
+
return false;
|
|
113671
114507
|
}
|
|
113672
|
-
return
|
|
113673
|
-
parseValue2(slice[0], str, ptr, integersAsBigInt),
|
|
113674
|
-
endPtr
|
|
113675
|
-
];
|
|
114508
|
+
return parseValue2(ctx, integersAsBigInt, end);
|
|
113676
114509
|
}
|
|
113677
114510
|
|
|
113678
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114511
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/struct.js
|
|
113679
114512
|
var KEY_PART_RE2 = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
113680
|
-
function parseKey2(
|
|
113681
|
-
let
|
|
114513
|
+
function parseKey2(ctx, end = "=") {
|
|
114514
|
+
let start = ctx.p;
|
|
114515
|
+
let dot = start - 1;
|
|
113682
114516
|
let parsed = [];
|
|
113683
|
-
let endPtr =
|
|
114517
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
113684
114518
|
if (endPtr < 0) {
|
|
113685
114519
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
113686
|
-
toml:
|
|
113687
|
-
ptr
|
|
114520
|
+
toml: ctx.s,
|
|
114521
|
+
ptr: start
|
|
113688
114522
|
});
|
|
113689
114523
|
}
|
|
113690
114524
|
do {
|
|
113691
|
-
let c2 =
|
|
113692
|
-
if (c2 !==
|
|
113693
|
-
if (c2 ===
|
|
113694
|
-
if (c2 ===
|
|
114525
|
+
let c2 = ctx.s.charCodeAt(ctx.p = ++dot);
|
|
114526
|
+
if (c2 !== 32 && c2 !== 9) {
|
|
114527
|
+
if (c2 === 34 || c2 === 39) {
|
|
114528
|
+
if (c2 === ctx.s.charCodeAt(ctx.p + 1) && c2 === ctx.s.charCodeAt(ctx.p + 2)) {
|
|
113695
114529
|
throw new TomlError2("multiline strings are not allowed in keys", {
|
|
113696
|
-
toml:
|
|
113697
|
-
ptr
|
|
114530
|
+
toml: ctx.s,
|
|
114531
|
+
ptr: ctx.p
|
|
113698
114532
|
});
|
|
113699
114533
|
}
|
|
113700
|
-
let
|
|
113701
|
-
|
|
113702
|
-
|
|
113703
|
-
toml: str,
|
|
113704
|
-
ptr
|
|
113705
|
-
});
|
|
113706
|
-
}
|
|
113707
|
-
dot = str.indexOf(".", eos);
|
|
113708
|
-
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
114534
|
+
let part = parseString2(ctx);
|
|
114535
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
114536
|
+
let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
113709
114537
|
let newLine = indexOfNewline2(strEnd);
|
|
113710
114538
|
if (newLine > -1) {
|
|
113711
114539
|
throw new TomlError2("newlines are not allowed in keys", {
|
|
113712
|
-
toml:
|
|
113713
|
-
ptr:
|
|
114540
|
+
toml: ctx.s,
|
|
114541
|
+
ptr: newLine
|
|
113714
114542
|
});
|
|
113715
114543
|
}
|
|
113716
114544
|
if (strEnd.trimStart()) {
|
|
113717
114545
|
throw new TomlError2("found extra tokens after the string part", {
|
|
113718
|
-
toml:
|
|
113719
|
-
ptr:
|
|
114546
|
+
toml: ctx.s,
|
|
114547
|
+
ptr: ctx.p
|
|
113720
114548
|
});
|
|
113721
114549
|
}
|
|
113722
|
-
if (endPtr <
|
|
113723
|
-
endPtr =
|
|
114550
|
+
if (endPtr < ctx.p) {
|
|
114551
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
113724
114552
|
if (endPtr < 0) {
|
|
113725
114553
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
113726
|
-
toml:
|
|
113727
|
-
ptr
|
|
114554
|
+
toml: ctx.s,
|
|
114555
|
+
ptr: start
|
|
113728
114556
|
});
|
|
113729
114557
|
}
|
|
113730
114558
|
}
|
|
113731
|
-
parsed.push(
|
|
114559
|
+
parsed.push(part);
|
|
113732
114560
|
} else {
|
|
113733
|
-
dot =
|
|
113734
|
-
let part =
|
|
114561
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
114562
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
113735
114563
|
if (!KEY_PART_RE2.test(part)) {
|
|
113736
114564
|
throw new TomlError2("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
113737
|
-
toml:
|
|
113738
|
-
ptr
|
|
114565
|
+
toml: ctx.s,
|
|
114566
|
+
ptr: ctx.p
|
|
113739
114567
|
});
|
|
113740
114568
|
}
|
|
113741
114569
|
parsed.push(part.trimEnd());
|
|
113742
114570
|
}
|
|
113743
114571
|
}
|
|
113744
114572
|
} while (dot + 1 && dot < endPtr);
|
|
113745
|
-
|
|
114573
|
+
ctx.p = endPtr + 1;
|
|
114574
|
+
skipVoid2(ctx, true, true);
|
|
114575
|
+
return parsed;
|
|
113746
114576
|
}
|
|
113747
|
-
function parseInlineTable2(
|
|
114577
|
+
function parseInlineTable2(ctx, integersAsBigInt) {
|
|
113748
114578
|
let res = {};
|
|
113749
114579
|
let seen = /* @__PURE__ */ new Set();
|
|
113750
114580
|
let c2;
|
|
113751
|
-
|
|
113752
|
-
|
|
113753
|
-
|
|
113754
|
-
|
|
113755
|
-
|
|
113756
|
-
|
|
113757
|
-
}
|
|
113758
|
-
|
|
113759
|
-
|
|
113760
|
-
|
|
113761
|
-
|
|
113762
|
-
|
|
113763
|
-
|
|
113764
|
-
|
|
113765
|
-
|
|
113766
|
-
|
|
113767
|
-
|
|
113768
|
-
t2 = hasOwn ? t2[k] : t2[k] = {};
|
|
113769
|
-
k = key[i];
|
|
113770
|
-
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
113771
|
-
throw new TomlError2("trying to redefine an already defined value", {
|
|
113772
|
-
toml: str,
|
|
113773
|
-
ptr
|
|
113774
|
-
});
|
|
113775
|
-
}
|
|
113776
|
-
if (!hasOwn && k === "__proto__") {
|
|
113777
|
-
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
113778
|
-
}
|
|
113779
|
-
}
|
|
113780
|
-
if (hasOwn) {
|
|
114581
|
+
ctx.p++;
|
|
114582
|
+
while (ctx.p < ctx.s.length) {
|
|
114583
|
+
skipVoid2(ctx);
|
|
114584
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p)) === 125) {
|
|
114585
|
+
ctx.p++;
|
|
114586
|
+
return res;
|
|
114587
|
+
}
|
|
114588
|
+
let k;
|
|
114589
|
+
let t2 = res;
|
|
114590
|
+
let hasOwn = false;
|
|
114591
|
+
let p2 = ctx.p;
|
|
114592
|
+
let key = parseKey2(ctx);
|
|
114593
|
+
for (let i = 0; i < key.length; i++) {
|
|
114594
|
+
if (i)
|
|
114595
|
+
t2 = hasOwn ? t2[k] : t2[k] = {};
|
|
114596
|
+
k = key[i];
|
|
114597
|
+
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
113781
114598
|
throw new TomlError2("trying to redefine an already defined value", {
|
|
113782
|
-
toml:
|
|
113783
|
-
ptr
|
|
114599
|
+
toml: ctx.s,
|
|
114600
|
+
ptr: p2
|
|
113784
114601
|
});
|
|
113785
114602
|
}
|
|
113786
|
-
|
|
113787
|
-
|
|
113788
|
-
|
|
113789
|
-
|
|
113790
|
-
|
|
114603
|
+
if (!hasOwn && k === "__proto__") {
|
|
114604
|
+
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
114605
|
+
}
|
|
114606
|
+
}
|
|
114607
|
+
if (hasOwn) {
|
|
114608
|
+
throw new TomlError2("trying to redefine an already defined value", {
|
|
114609
|
+
toml: ctx.s,
|
|
114610
|
+
ptr: ctx.p
|
|
114611
|
+
});
|
|
114612
|
+
}
|
|
114613
|
+
let value = extractValue2(ctx, 125, integersAsBigInt);
|
|
114614
|
+
seen.add(t2[k] = value);
|
|
114615
|
+
skipVoid2(ctx);
|
|
114616
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p++)) === 125) {
|
|
114617
|
+
return res;
|
|
114618
|
+
}
|
|
114619
|
+
if (c2 !== 44) {
|
|
114620
|
+
throw new TomlError2("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
113791
114621
|
}
|
|
113792
114622
|
}
|
|
113793
|
-
|
|
113794
|
-
|
|
113795
|
-
|
|
113796
|
-
|
|
113797
|
-
});
|
|
113798
|
-
}
|
|
113799
|
-
if (!c2) {
|
|
113800
|
-
throw new TomlError2("unfinished table encountered", {
|
|
113801
|
-
toml: str,
|
|
113802
|
-
ptr
|
|
113803
|
-
});
|
|
113804
|
-
}
|
|
113805
|
-
return [res, ptr];
|
|
114623
|
+
throw new TomlError2("unfinished table encountered", {
|
|
114624
|
+
toml: ctx.s,
|
|
114625
|
+
ptr: ctx.p
|
|
114626
|
+
});
|
|
113806
114627
|
}
|
|
113807
|
-
function parseArray2(
|
|
114628
|
+
function parseArray2(ctx, integersAsBigInt) {
|
|
113808
114629
|
let res = [];
|
|
113809
114630
|
let c2;
|
|
113810
|
-
|
|
113811
|
-
while (
|
|
113812
|
-
|
|
113813
|
-
|
|
113814
|
-
|
|
113815
|
-
|
|
113816
|
-
|
|
113817
|
-
|
|
113818
|
-
|
|
113819
|
-
|
|
113820
|
-
|
|
113821
|
-
|
|
113822
|
-
|
|
113823
|
-
|
|
113824
|
-
|
|
113825
|
-
if (!c2) {
|
|
113826
|
-
throw new TomlError2("unfinished array encountered", {
|
|
113827
|
-
toml: str,
|
|
113828
|
-
ptr
|
|
113829
|
-
});
|
|
114631
|
+
ctx.p++;
|
|
114632
|
+
while (ctx.p < ctx.s.length) {
|
|
114633
|
+
skipVoid2(ctx);
|
|
114634
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p)) === 93) {
|
|
114635
|
+
ctx.p++;
|
|
114636
|
+
return res;
|
|
114637
|
+
}
|
|
114638
|
+
res.push(extractValue2(ctx, 93, integersAsBigInt));
|
|
114639
|
+
skipVoid2(ctx);
|
|
114640
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p++)) === 93) {
|
|
114641
|
+
return res;
|
|
114642
|
+
}
|
|
114643
|
+
if (c2 !== 44) {
|
|
114644
|
+
throw new TomlError2("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
114645
|
+
}
|
|
113830
114646
|
}
|
|
113831
|
-
|
|
114647
|
+
throw new TomlError2("unfinished array encountered", {
|
|
114648
|
+
toml: ctx.s,
|
|
114649
|
+
ptr: ctx.p
|
|
114650
|
+
});
|
|
113832
114651
|
}
|
|
113833
114652
|
|
|
113834
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114653
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/parse.js
|
|
113835
114654
|
function peekTable2(key, table, meta3, type) {
|
|
113836
114655
|
let t2 = table;
|
|
113837
114656
|
let m = meta3;
|
|
@@ -113892,25 +114711,29 @@ function peekTable2(key, table, meta3, type) {
|
|
|
113892
114711
|
return [k, t2, state.c];
|
|
113893
114712
|
}
|
|
113894
114713
|
function parse5(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
114714
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
113895
114715
|
let res = {};
|
|
113896
114716
|
let meta3 = {};
|
|
114717
|
+
let tmp;
|
|
113897
114718
|
let tbl = res;
|
|
113898
114719
|
let m = meta3;
|
|
113899
|
-
|
|
113900
|
-
|
|
113901
|
-
|
|
113902
|
-
let
|
|
114720
|
+
skipVoid2(ctx);
|
|
114721
|
+
while (ctx.p < toml.length) {
|
|
114722
|
+
if (toml.charCodeAt(ctx.p) === 91) {
|
|
114723
|
+
let isTableArray = toml.charCodeAt(++ctx.p) === 91;
|
|
114724
|
+
tmp = ctx.p += +isTableArray;
|
|
114725
|
+
let k = parseKey2(ctx, "]");
|
|
113903
114726
|
if (isTableArray) {
|
|
113904
|
-
if (toml
|
|
114727
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
113905
114728
|
throw new TomlError2("expected end of table declaration", {
|
|
113906
114729
|
toml,
|
|
113907
|
-
ptr:
|
|
114730
|
+
ptr: ctx.p - 1
|
|
113908
114731
|
});
|
|
113909
114732
|
}
|
|
113910
|
-
|
|
114733
|
+
ctx.p++;
|
|
113911
114734
|
}
|
|
113912
114735
|
let p2 = peekTable2(
|
|
113913
|
-
k
|
|
114736
|
+
k,
|
|
113914
114737
|
res,
|
|
113915
114738
|
meta3,
|
|
113916
114739
|
isTableArray ? 2 : 1
|
|
@@ -113919,16 +114742,16 @@ function parse5(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
113919
114742
|
if (!p2) {
|
|
113920
114743
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
113921
114744
|
toml,
|
|
113922
|
-
ptr
|
|
114745
|
+
ptr: tmp
|
|
113923
114746
|
});
|
|
113924
114747
|
}
|
|
113925
114748
|
m = p2[2];
|
|
113926
114749
|
tbl = p2[1];
|
|
113927
|
-
ptr = k[1];
|
|
113928
114750
|
} else {
|
|
113929
|
-
|
|
114751
|
+
tmp = ctx.p;
|
|
114752
|
+
let k = parseKey2(ctx);
|
|
113930
114753
|
let p2 = peekTable2(
|
|
113931
|
-
k
|
|
114754
|
+
k,
|
|
113932
114755
|
tbl,
|
|
113933
114756
|
m,
|
|
113934
114757
|
0
|
|
@@ -113937,34 +114760,36 @@ function parse5(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
113937
114760
|
if (!p2) {
|
|
113938
114761
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
113939
114762
|
toml,
|
|
113940
|
-
ptr
|
|
114763
|
+
ptr: tmp
|
|
113941
114764
|
});
|
|
113942
114765
|
}
|
|
113943
|
-
|
|
113944
|
-
p2[1][p2[0]] = v[0];
|
|
113945
|
-
ptr = v[1];
|
|
114766
|
+
p2[1][p2[0]] = extractValue2(ctx, void 0, integersAsBigInt);
|
|
113946
114767
|
}
|
|
113947
|
-
|
|
113948
|
-
if (toml
|
|
114768
|
+
skipVoid2(ctx, true);
|
|
114769
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
113949
114770
|
throw new TomlError2("each key-value declaration must be followed by an end-of-line", {
|
|
113950
114771
|
toml,
|
|
113951
|
-
ptr
|
|
114772
|
+
ptr: ctx.p
|
|
113952
114773
|
});
|
|
113953
114774
|
}
|
|
113954
|
-
|
|
114775
|
+
skipVoid2(ctx);
|
|
113955
114776
|
}
|
|
113956
114777
|
return res;
|
|
113957
114778
|
}
|
|
113958
114779
|
|
|
113959
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114780
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/stringify.js
|
|
113960
114781
|
var BARE_KEY2 = /^[a-z0-9-_]+$/i;
|
|
113961
114782
|
function extendedTypeOf2(obj) {
|
|
113962
114783
|
let type = typeof obj;
|
|
113963
114784
|
if (type === "object") {
|
|
113964
114785
|
if (Array.isArray(obj))
|
|
113965
114786
|
return "array";
|
|
113966
|
-
if (obj instanceof Date)
|
|
114787
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
113967
114788
|
return "date";
|
|
114789
|
+
if (globalThis.Temporal && // check for the 'since' property as an early bailout that avoids running all 5 instanceof checks
|
|
114790
|
+
typeof obj?.since === "function" && (obj instanceof Temporal.Instant || obj instanceof Temporal.PlainDate || obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainTime || obj instanceof Temporal.ZonedDateTime)) {
|
|
114791
|
+
return "temporal";
|
|
114792
|
+
}
|
|
113968
114793
|
}
|
|
113969
114794
|
return type;
|
|
113970
114795
|
}
|
|
@@ -113978,38 +114803,42 @@ function isArrayOfTables2(obj) {
|
|
|
113978
114803
|
function formatString2(s) {
|
|
113979
114804
|
return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
|
|
113980
114805
|
}
|
|
114806
|
+
function stringifyTemporal2(temporal) {
|
|
114807
|
+
return temporal.toString({
|
|
114808
|
+
calendarName: "never",
|
|
114809
|
+
timeZoneName: "never"
|
|
114810
|
+
});
|
|
114811
|
+
}
|
|
113981
114812
|
function stringifyValue2(val, type, depth, numberAsFloat) {
|
|
113982
114813
|
if (depth === 0) {
|
|
113983
114814
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
113984
114815
|
}
|
|
113985
|
-
|
|
113986
|
-
|
|
113987
|
-
|
|
113988
|
-
|
|
113989
|
-
|
|
113990
|
-
|
|
113991
|
-
|
|
113992
|
-
|
|
113993
|
-
|
|
113994
|
-
|
|
113995
|
-
|
|
113996
|
-
|
|
113997
|
-
|
|
113998
|
-
|
|
113999
|
-
|
|
114000
|
-
|
|
114001
|
-
|
|
114002
|
-
|
|
114003
|
-
|
|
114004
|
-
|
|
114005
|
-
|
|
114006
|
-
|
|
114007
|
-
|
|
114008
|
-
|
|
114009
|
-
|
|
114010
|
-
|
|
114011
|
-
if (type === "array") {
|
|
114012
|
-
return stringifyArray2(val, depth, numberAsFloat);
|
|
114816
|
+
switch (type) {
|
|
114817
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
114818
|
+
case "number":
|
|
114819
|
+
if (isNaN(val))
|
|
114820
|
+
return "nan";
|
|
114821
|
+
if (val === Infinity)
|
|
114822
|
+
return "inf";
|
|
114823
|
+
if (val === -Infinity)
|
|
114824
|
+
return "-inf";
|
|
114825
|
+
if (Number.isInteger(val) && (numberAsFloat || !Number.isSafeInteger(val)))
|
|
114826
|
+
return val.toFixed(1);
|
|
114827
|
+
case "bigint":
|
|
114828
|
+
case "boolean":
|
|
114829
|
+
return val.toString();
|
|
114830
|
+
case "string":
|
|
114831
|
+
return formatString2(val);
|
|
114832
|
+
case "date":
|
|
114833
|
+
if (isNaN(val.getTime()))
|
|
114834
|
+
throw new TypeError("cannot serialize invalid date");
|
|
114835
|
+
return val.toISOString();
|
|
114836
|
+
case "object":
|
|
114837
|
+
return stringifyInlineTable2(val, depth, numberAsFloat);
|
|
114838
|
+
case "array":
|
|
114839
|
+
return stringifyArray2(val, depth, numberAsFloat);
|
|
114840
|
+
case "temporal":
|
|
114841
|
+
return stringifyTemporal2(val);
|
|
114013
114842
|
}
|
|
114014
114843
|
}
|
|
114015
114844
|
function stringifyInlineTable2(obj, depth, numberAsFloat) {
|
|
@@ -114097,7 +114926,7 @@ function stringify2(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
|
|
|
114097
114926
|
return str;
|
|
114098
114927
|
}
|
|
114099
114928
|
|
|
114100
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114929
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/index.js
|
|
114101
114930
|
var dist_default4 = { parse: parse5, stringify: stringify2, TomlDate: TomlDate2, TomlError: TomlError2 };
|
|
114102
114931
|
|
|
114103
114932
|
// src/helpers/files.ts
|
|
@@ -115188,13 +116017,13 @@ var package_default = {
|
|
|
115188
116017
|
"create-hono": "0.19.5",
|
|
115189
116018
|
"create-next-app": "16.3.5",
|
|
115190
116019
|
"create-qwik": "1.20.0",
|
|
115191
|
-
"create-react-router": "8.
|
|
116020
|
+
"create-react-router": "8.4.0",
|
|
115192
116021
|
"create-rwsdk": "3.1.3",
|
|
115193
116022
|
"create-solid": "0.12.0",
|
|
115194
116023
|
"create-vike": "0.0.681",
|
|
115195
|
-
"create-vinext-app": "1.0.0-beta.
|
|
116024
|
+
"create-vinext-app": "1.0.0-beta.3",
|
|
115196
116025
|
"create-vite": "9.2.1",
|
|
115197
|
-
"create-vue": "3.
|
|
116026
|
+
"create-vue": "3.24.0",
|
|
115198
116027
|
"create-waku": "0.12.5-1.0.0-alpha.10-0",
|
|
115199
116028
|
gatsby: "5.16.1",
|
|
115200
116029
|
nuxi: "3.37.0",
|
|
@@ -117806,7 +118635,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
117806
118635
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
117807
118636
|
|
|
117808
118637
|
// ../wrangler/package.json
|
|
117809
|
-
var version3 = "4.
|
|
118638
|
+
var version3 = "4.136.3";
|
|
117810
118639
|
|
|
117811
118640
|
// src/git.ts
|
|
117812
118641
|
var offerGit = async (ctx) => {
|
|
@@ -121701,7 +122530,7 @@ ${getPnpmIgnoredBuildsGuidance(e.packages)}`);
|
|
|
121701
122530
|
});
|
|
121702
122531
|
/*! Bundled license information:
|
|
121703
122532
|
|
|
121704
|
-
smol-toml/dist/
|
|
122533
|
+
smol-toml/dist/date.js:
|
|
121705
122534
|
(*!
|
|
121706
122535
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
121707
122536
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -121730,7 +122559,7 @@ smol-toml/dist/error.js:
|
|
|
121730
122559
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
121731
122560
|
*)
|
|
121732
122561
|
|
|
121733
|
-
smol-toml/dist/
|
|
122562
|
+
smol-toml/dist/error.js:
|
|
121734
122563
|
(*!
|
|
121735
122564
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
121736
122565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -121759,7 +122588,7 @@ smol-toml/dist/util.js:
|
|
|
121759
122588
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
121760
122589
|
*)
|
|
121761
122590
|
|
|
121762
|
-
smol-toml/dist/
|
|
122591
|
+
smol-toml/dist/util.js:
|
|
121763
122592
|
(*!
|
|
121764
122593
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
121765
122594
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -122023,9 +122852,9 @@ yargs-parser/build/lib/index.js:
|
|
|
122023
122852
|
* SPDX-License-Identifier: ISC
|
|
122024
122853
|
*)
|
|
122025
122854
|
|
|
122855
|
+
smol-toml/dist/date.js:
|
|
122026
122856
|
smol-toml/dist/error.js:
|
|
122027
122857
|
smol-toml/dist/util.js:
|
|
122028
|
-
smol-toml/dist/date.js:
|
|
122029
122858
|
smol-toml/dist/primitive.js:
|
|
122030
122859
|
smol-toml/dist/extract.js:
|
|
122031
122860
|
smol-toml/dist/struct.js:
|