create-cloudflare 2.72.10 → 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 +795 -892
- package/package.json +6 -6
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
|
}
|
|
@@ -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);
|
|
@@ -79043,128 +79043,7 @@ function applyEdits(text, edits) {
|
|
|
79043
79043
|
return text;
|
|
79044
79044
|
}
|
|
79045
79045
|
__name(applyEdits, "applyEdits");
|
|
79046
|
-
|
|
79047
|
-
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
79048
|
-
return [lines.length, lines.pop().length + 1];
|
|
79049
|
-
}
|
|
79050
|
-
__name(getLineColFromPtr, "getLineColFromPtr");
|
|
79051
|
-
function makeCodeBlock(string4, line, column) {
|
|
79052
|
-
let lines = string4.split(/\r\n|\n|\r/g);
|
|
79053
|
-
let codeblock = "";
|
|
79054
|
-
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
79055
|
-
for (let i = line - 1; i <= line + 1; i++) {
|
|
79056
|
-
let l = lines[i - 1];
|
|
79057
|
-
if (!l)
|
|
79058
|
-
continue;
|
|
79059
|
-
codeblock += i.toString().padEnd(numberLen, " ");
|
|
79060
|
-
codeblock += ": ";
|
|
79061
|
-
codeblock += l;
|
|
79062
|
-
codeblock += "\n";
|
|
79063
|
-
if (i === line) {
|
|
79064
|
-
codeblock += " ".repeat(numberLen + column + 2);
|
|
79065
|
-
codeblock += "^\n";
|
|
79066
|
-
}
|
|
79067
|
-
}
|
|
79068
|
-
return codeblock;
|
|
79069
|
-
}
|
|
79070
|
-
__name(makeCodeBlock, "makeCodeBlock");
|
|
79071
|
-
var TomlError = class extends Error {
|
|
79072
|
-
static {
|
|
79073
|
-
__name(this, "TomlError");
|
|
79074
|
-
}
|
|
79075
|
-
line;
|
|
79076
|
-
column;
|
|
79077
|
-
codeblock;
|
|
79078
|
-
constructor(message, options) {
|
|
79079
|
-
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
79080
|
-
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
79081
|
-
super(`Invalid TOML document: ${message}
|
|
79082
|
-
|
|
79083
|
-
${codeblock}`, options);
|
|
79084
|
-
this.line = line;
|
|
79085
|
-
this.column = column;
|
|
79086
|
-
this.codeblock = codeblock;
|
|
79087
|
-
}
|
|
79088
|
-
};
|
|
79089
|
-
function isEscaped(str, ptr) {
|
|
79090
|
-
let i = 0;
|
|
79091
|
-
while (str[ptr - ++i] === "\\")
|
|
79092
|
-
;
|
|
79093
|
-
return --i && i % 2;
|
|
79094
|
-
}
|
|
79095
|
-
__name(isEscaped, "isEscaped");
|
|
79096
|
-
function indexOfNewline(str, start = 0, end = str.length) {
|
|
79097
|
-
let idx = str.indexOf("\n", start);
|
|
79098
|
-
if (str[idx - 1] === "\r")
|
|
79099
|
-
idx--;
|
|
79100
|
-
return idx <= end ? idx : -1;
|
|
79101
|
-
}
|
|
79102
|
-
__name(indexOfNewline, "indexOfNewline");
|
|
79103
|
-
function skipComment(str, ptr) {
|
|
79104
|
-
for (let i = ptr; i < str.length; i++) {
|
|
79105
|
-
let c2 = str[i];
|
|
79106
|
-
if (c2 === "\n")
|
|
79107
|
-
return i;
|
|
79108
|
-
if (c2 === "\r" && str[i + 1] === "\n")
|
|
79109
|
-
return i + 1;
|
|
79110
|
-
if (c2 < " " && c2 !== " " || c2 === "\x7F") {
|
|
79111
|
-
throw new TomlError("control characters are not allowed in comments", {
|
|
79112
|
-
toml: str,
|
|
79113
|
-
ptr
|
|
79114
|
-
});
|
|
79115
|
-
}
|
|
79116
|
-
}
|
|
79117
|
-
return str.length;
|
|
79118
|
-
}
|
|
79119
|
-
__name(skipComment, "skipComment");
|
|
79120
|
-
function skipVoid(str, ptr, banNewLines, banComments) {
|
|
79121
|
-
let c2;
|
|
79122
|
-
while ((c2 = str[ptr]) === " " || c2 === " " || !banNewLines && (c2 === "\n" || c2 === "\r" && str[ptr + 1] === "\n"))
|
|
79123
|
-
ptr++;
|
|
79124
|
-
return banComments || c2 !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
|
|
79125
|
-
}
|
|
79126
|
-
__name(skipVoid, "skipVoid");
|
|
79127
|
-
function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
|
79128
|
-
if (!end) {
|
|
79129
|
-
ptr = indexOfNewline(str, ptr);
|
|
79130
|
-
return ptr < 0 ? str.length : ptr;
|
|
79131
|
-
}
|
|
79132
|
-
for (let i = ptr; i < str.length; i++) {
|
|
79133
|
-
let c2 = str[i];
|
|
79134
|
-
if (c2 === "#") {
|
|
79135
|
-
i = indexOfNewline(str, i);
|
|
79136
|
-
} else if (c2 === sep) {
|
|
79137
|
-
return i + 1;
|
|
79138
|
-
} else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i + 1] === "\n")) {
|
|
79139
|
-
return i;
|
|
79140
|
-
}
|
|
79141
|
-
}
|
|
79142
|
-
throw new TomlError("cannot find end of structure", {
|
|
79143
|
-
toml: str,
|
|
79144
|
-
ptr
|
|
79145
|
-
});
|
|
79146
|
-
}
|
|
79147
|
-
__name(skipUntil, "skipUntil");
|
|
79148
|
-
function getStringEnd(str, seek) {
|
|
79149
|
-
let first = str[seek];
|
|
79150
|
-
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
79151
|
-
seek += target.length - 1;
|
|
79152
|
-
do
|
|
79153
|
-
seek = str.indexOf(target, ++seek);
|
|
79154
|
-
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
|
79155
|
-
if (seek > -1) {
|
|
79156
|
-
seek += target.length;
|
|
79157
|
-
if (target.length > 1) {
|
|
79158
|
-
if (str[seek] === first)
|
|
79159
|
-
seek++;
|
|
79160
|
-
if (str[seek] === first)
|
|
79161
|
-
seek++;
|
|
79162
|
-
}
|
|
79163
|
-
}
|
|
79164
|
-
return seek;
|
|
79165
|
-
}
|
|
79166
|
-
__name(getStringEnd, "getStringEnd");
|
|
79167
|
-
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;
|
|
79168
79047
|
var TomlDate = class _TomlDate extends Date {
|
|
79169
79048
|
static {
|
|
79170
79049
|
__name(this, "TomlDate");
|
|
@@ -79257,98 +79136,230 @@ var TomlDate = class _TomlDate extends Date {
|
|
|
79257
79136
|
return date5;
|
|
79258
79137
|
}
|
|
79259
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");
|
|
79260
79239
|
var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
79261
79240
|
var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
79262
79241
|
var LEADING_ZERO = /^[+-]?0[0-9_]/;
|
|
79263
|
-
|
|
79264
|
-
|
|
79265
|
-
|
|
79266
|
-
|
|
79267
|
-
|
|
79268
|
-
|
|
79269
|
-
r: "\r",
|
|
79270
|
-
'"': '"',
|
|
79271
|
-
"\\": "\\"
|
|
79272
|
-
};
|
|
79273
|
-
function parseString(str, ptr = 0, endPtr = str.length) {
|
|
79274
|
-
let isLiteral = str[ptr] === "'";
|
|
79275
|
-
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);
|
|
79276
79248
|
if (isMultiline) {
|
|
79277
|
-
|
|
79278
|
-
|
|
79279
|
-
|
|
79280
|
-
|
|
79281
|
-
|
|
79282
|
-
}
|
|
79283
|
-
let tmp = 0;
|
|
79284
|
-
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
|
+
}
|
|
79285
79254
|
let parsed = "";
|
|
79286
|
-
let sliceStart =
|
|
79287
|
-
|
|
79288
|
-
|
|
79289
|
-
|
|
79290
|
-
|
|
79291
|
-
|
|
79292
|
-
|
|
79293
|
-
ptr: ptr - 1
|
|
79294
|
-
});
|
|
79295
|
-
}
|
|
79296
|
-
} 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) {
|
|
79297
79262
|
throw new TomlError("control characters are not allowed in strings", {
|
|
79298
|
-
toml:
|
|
79299
|
-
ptr:
|
|
79263
|
+
toml: ctx.s,
|
|
79264
|
+
ptr: ctx.p
|
|
79300
79265
|
});
|
|
79301
|
-
}
|
|
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
|
-
|
|
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;
|
|
79331
79310
|
} else {
|
|
79332
|
-
|
|
79333
|
-
|
|
79334
|
-
|
|
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
|
|
79335
79337
|
});
|
|
79336
79338
|
}
|
|
79337
|
-
|
|
79338
|
-
|
|
79339
|
-
tmp = ptr - 1;
|
|
79340
|
-
isEscape = true;
|
|
79341
|
-
parsed += str.slice(sliceStart, tmp);
|
|
79339
|
+
state = !isLiteral && c2 === 92 ? 1 : 0;
|
|
79340
|
+
sliceStart = ctx.p;
|
|
79342
79341
|
}
|
|
79343
79342
|
}
|
|
79344
|
-
|
|
79343
|
+
throw new TomlError("unfinished string", { toml: ctx.s, ptr: start });
|
|
79345
79344
|
}
|
|
79346
79345
|
__name(parseString, "parseString");
|
|
79347
|
-
function
|
|
79348
|
-
|
|
79349
|
-
|
|
79350
|
-
if (
|
|
79351
|
-
|
|
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);
|
|
79352
79363
|
if (value === "-inf")
|
|
79353
79364
|
return -Infinity;
|
|
79354
79365
|
if (value === "inf" || value === "+inf")
|
|
@@ -79360,25 +79371,16 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
79360
79371
|
let isInt = INT_REGEX.test(value);
|
|
79361
79372
|
if (isInt || FLOAT_REGEX.test(value)) {
|
|
79362
79373
|
if (LEADING_ZERO.test(value)) {
|
|
79363
|
-
throw new TomlError("leading zeroes are not allowed",
|
|
79364
|
-
toml,
|
|
79365
|
-
ptr
|
|
79366
|
-
});
|
|
79374
|
+
throw new TomlError("leading zeroes are not allowed", err);
|
|
79367
79375
|
}
|
|
79368
79376
|
value = value.replace(/_/g, "");
|
|
79369
79377
|
let numeric = +value;
|
|
79370
79378
|
if (isNaN(numeric)) {
|
|
79371
|
-
throw new TomlError("invalid number",
|
|
79372
|
-
toml,
|
|
79373
|
-
ptr
|
|
79374
|
-
});
|
|
79379
|
+
throw new TomlError("invalid number", err);
|
|
79375
79380
|
}
|
|
79376
79381
|
if (isInt) {
|
|
79377
79382
|
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
79378
|
-
throw new TomlError("integer value cannot be represented losslessly",
|
|
79379
|
-
toml,
|
|
79380
|
-
ptr
|
|
79381
|
-
});
|
|
79383
|
+
throw new TomlError("integer value cannot be represented losslessly", err);
|
|
79382
79384
|
}
|
|
79383
79385
|
if (isInt || integersAsBigInt === true)
|
|
79384
79386
|
numeric = BigInt(value);
|
|
@@ -79386,246 +79388,184 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
79386
79388
|
return numeric;
|
|
79387
79389
|
}
|
|
79388
79390
|
const date5 = new TomlDate(value);
|
|
79389
|
-
if (!date5.isValid())
|
|
79390
|
-
throw new TomlError("invalid value",
|
|
79391
|
-
toml,
|
|
79392
|
-
ptr
|
|
79393
|
-
});
|
|
79394
|
-
}
|
|
79391
|
+
if (!date5.isValid())
|
|
79392
|
+
throw new TomlError("invalid value", err);
|
|
79395
79393
|
return date5;
|
|
79396
79394
|
}
|
|
79397
79395
|
__name(parseValue, "parseValue");
|
|
79398
|
-
function
|
|
79399
|
-
let
|
|
79400
|
-
let
|
|
79401
|
-
if (
|
|
79402
|
-
|
|
79403
|
-
|
|
79404
|
-
|
|
79405
|
-
|
|
79406
|
-
if (!allowNewLines) {
|
|
79407
|
-
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
79408
|
-
if (newlineIdx > -1) {
|
|
79409
|
-
throw new TomlError("newlines are not allowed in inline tables", {
|
|
79410
|
-
toml: str,
|
|
79411
|
-
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
|
|
79412
79404
|
});
|
|
79413
79405
|
}
|
|
79406
|
+
let value = c2 === 91 ? parseArray(ctx, integersAsBigInt) : parseInlineTable(ctx, integersAsBigInt);
|
|
79407
|
+
ctx.d++;
|
|
79408
|
+
return value;
|
|
79414
79409
|
}
|
|
79415
|
-
|
|
79416
|
-
|
|
79417
|
-
__name(sliceAndTrimEndOf, "sliceAndTrimEndOf");
|
|
79418
|
-
function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
79419
|
-
if (depth === 0) {
|
|
79420
|
-
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
79421
|
-
toml: str,
|
|
79422
|
-
ptr
|
|
79423
|
-
});
|
|
79424
|
-
}
|
|
79425
|
-
let c2 = str[ptr];
|
|
79426
|
-
if (c2 === "[" || c2 === "{") {
|
|
79427
|
-
let [value, endPtr2] = c2 === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
|
|
79428
|
-
let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2;
|
|
79429
|
-
if (endPtr2 - newPtr && end === "}") {
|
|
79430
|
-
let nextNewLine = indexOfNewline(str, endPtr2, newPtr);
|
|
79431
|
-
if (nextNewLine > -1) {
|
|
79432
|
-
throw new TomlError("newlines are not allowed in inline tables", {
|
|
79433
|
-
toml: str,
|
|
79434
|
-
ptr: nextNewLine
|
|
79435
|
-
});
|
|
79436
|
-
}
|
|
79437
|
-
}
|
|
79438
|
-
return [value, newPtr];
|
|
79439
|
-
}
|
|
79440
|
-
let endPtr;
|
|
79441
|
-
if (c2 === '"' || c2 === "'") {
|
|
79442
|
-
endPtr = getStringEnd(str, ptr);
|
|
79443
|
-
let parsed = parseString(str, ptr, endPtr);
|
|
79444
|
-
if (end) {
|
|
79445
|
-
endPtr = skipVoid(str, endPtr, end !== "]");
|
|
79446
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
79447
|
-
throw new TomlError("unexpected character encountered", {
|
|
79448
|
-
toml: str,
|
|
79449
|
-
ptr: endPtr
|
|
79450
|
-
});
|
|
79451
|
-
}
|
|
79452
|
-
endPtr += +(str[endPtr] === ",");
|
|
79453
|
-
}
|
|
79454
|
-
return [parsed, endPtr];
|
|
79410
|
+
if (c2 === 34 || c2 === 39) {
|
|
79411
|
+
return parseString(ctx);
|
|
79455
79412
|
}
|
|
79456
|
-
|
|
79457
|
-
|
|
79458
|
-
|
|
79459
|
-
|
|
79460
|
-
|
|
79461
|
-
ptr
|
|
79462
|
-
});
|
|
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;
|
|
79463
79418
|
}
|
|
79464
|
-
if (
|
|
79465
|
-
|
|
79466
|
-
|
|
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;
|
|
79467
79424
|
}
|
|
79468
|
-
return
|
|
79469
|
-
parseValue(slice[0], str, ptr, integersAsBigInt),
|
|
79470
|
-
endPtr
|
|
79471
|
-
];
|
|
79425
|
+
return parseValue(ctx, integersAsBigInt, end);
|
|
79472
79426
|
}
|
|
79473
79427
|
__name(extractValue, "extractValue");
|
|
79474
79428
|
var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
79475
|
-
function parseKey(
|
|
79476
|
-
let
|
|
79429
|
+
function parseKey(ctx, end = "=") {
|
|
79430
|
+
let start = ctx.p;
|
|
79431
|
+
let dot = start - 1;
|
|
79477
79432
|
let parsed = [];
|
|
79478
|
-
let endPtr =
|
|
79433
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
79479
79434
|
if (endPtr < 0) {
|
|
79480
79435
|
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
79481
|
-
toml:
|
|
79482
|
-
ptr
|
|
79436
|
+
toml: ctx.s,
|
|
79437
|
+
ptr: start
|
|
79483
79438
|
});
|
|
79484
79439
|
}
|
|
79485
79440
|
do {
|
|
79486
|
-
let c2 =
|
|
79487
|
-
if (c2 !==
|
|
79488
|
-
if (c2 ===
|
|
79489
|
-
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)) {
|
|
79490
79445
|
throw new TomlError("multiline strings are not allowed in keys", {
|
|
79491
|
-
toml:
|
|
79492
|
-
ptr
|
|
79446
|
+
toml: ctx.s,
|
|
79447
|
+
ptr: ctx.p
|
|
79493
79448
|
});
|
|
79494
79449
|
}
|
|
79495
|
-
let
|
|
79496
|
-
|
|
79497
|
-
|
|
79498
|
-
toml: str,
|
|
79499
|
-
ptr
|
|
79500
|
-
});
|
|
79501
|
-
}
|
|
79502
|
-
dot = str.indexOf(".", eos);
|
|
79503
|
-
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);
|
|
79504
79453
|
let newLine = indexOfNewline(strEnd);
|
|
79505
79454
|
if (newLine > -1) {
|
|
79506
79455
|
throw new TomlError("newlines are not allowed in keys", {
|
|
79507
|
-
toml:
|
|
79508
|
-
ptr:
|
|
79456
|
+
toml: ctx.s,
|
|
79457
|
+
ptr: newLine
|
|
79509
79458
|
});
|
|
79510
79459
|
}
|
|
79511
79460
|
if (strEnd.trimStart()) {
|
|
79512
79461
|
throw new TomlError("found extra tokens after the string part", {
|
|
79513
|
-
toml:
|
|
79514
|
-
ptr:
|
|
79462
|
+
toml: ctx.s,
|
|
79463
|
+
ptr: ctx.p
|
|
79515
79464
|
});
|
|
79516
79465
|
}
|
|
79517
|
-
if (endPtr <
|
|
79518
|
-
endPtr =
|
|
79466
|
+
if (endPtr < ctx.p) {
|
|
79467
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
79519
79468
|
if (endPtr < 0) {
|
|
79520
79469
|
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
79521
|
-
toml:
|
|
79522
|
-
ptr
|
|
79470
|
+
toml: ctx.s,
|
|
79471
|
+
ptr: start
|
|
79523
79472
|
});
|
|
79524
79473
|
}
|
|
79525
79474
|
}
|
|
79526
|
-
parsed.push(
|
|
79475
|
+
parsed.push(part);
|
|
79527
79476
|
} else {
|
|
79528
|
-
dot =
|
|
79529
|
-
let part =
|
|
79477
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
79478
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
79530
79479
|
if (!KEY_PART_RE.test(part)) {
|
|
79531
79480
|
throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
79532
|
-
toml:
|
|
79533
|
-
ptr
|
|
79481
|
+
toml: ctx.s,
|
|
79482
|
+
ptr: ctx.p
|
|
79534
79483
|
});
|
|
79535
79484
|
}
|
|
79536
79485
|
parsed.push(part.trimEnd());
|
|
79537
79486
|
}
|
|
79538
79487
|
}
|
|
79539
79488
|
} while (dot + 1 && dot < endPtr);
|
|
79540
|
-
|
|
79489
|
+
ctx.p = endPtr + 1;
|
|
79490
|
+
skipVoid(ctx, true, true);
|
|
79491
|
+
return parsed;
|
|
79541
79492
|
}
|
|
79542
79493
|
__name(parseKey, "parseKey");
|
|
79543
|
-
function parseInlineTable(
|
|
79494
|
+
function parseInlineTable(ctx, integersAsBigInt) {
|
|
79544
79495
|
let res = {};
|
|
79545
79496
|
let seen = /* @__PURE__ */ new Set();
|
|
79546
79497
|
let c2;
|
|
79547
|
-
|
|
79548
|
-
|
|
79549
|
-
|
|
79550
|
-
|
|
79551
|
-
|
|
79552
|
-
|
|
79553
|
-
}
|
|
79554
|
-
|
|
79555
|
-
|
|
79556
|
-
|
|
79557
|
-
|
|
79558
|
-
|
|
79559
|
-
|
|
79560
|
-
|
|
79561
|
-
|
|
79562
|
-
|
|
79563
|
-
|
|
79564
|
-
t2 = hasOwn ? t2[k] : t2[k] = {};
|
|
79565
|
-
k = key[i];
|
|
79566
|
-
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
79567
|
-
throw new TomlError("trying to redefine an already defined value", {
|
|
79568
|
-
toml: str,
|
|
79569
|
-
ptr
|
|
79570
|
-
});
|
|
79571
|
-
}
|
|
79572
|
-
if (!hasOwn && k === "__proto__") {
|
|
79573
|
-
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
79574
|
-
}
|
|
79575
|
-
}
|
|
79576
|
-
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]))) {
|
|
79577
79515
|
throw new TomlError("trying to redefine an already defined value", {
|
|
79578
|
-
toml:
|
|
79579
|
-
ptr
|
|
79516
|
+
toml: ctx.s,
|
|
79517
|
+
ptr: p2
|
|
79580
79518
|
});
|
|
79581
79519
|
}
|
|
79582
|
-
|
|
79583
|
-
|
|
79584
|
-
|
|
79585
|
-
|
|
79586
|
-
|
|
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 });
|
|
79587
79538
|
}
|
|
79588
79539
|
}
|
|
79589
|
-
|
|
79590
|
-
|
|
79591
|
-
|
|
79592
|
-
|
|
79593
|
-
});
|
|
79594
|
-
}
|
|
79595
|
-
if (!c2) {
|
|
79596
|
-
throw new TomlError("unfinished table encountered", {
|
|
79597
|
-
toml: str,
|
|
79598
|
-
ptr
|
|
79599
|
-
});
|
|
79600
|
-
}
|
|
79601
|
-
return [res, ptr];
|
|
79540
|
+
throw new TomlError("unfinished table encountered", {
|
|
79541
|
+
toml: ctx.s,
|
|
79542
|
+
ptr: ctx.p
|
|
79543
|
+
});
|
|
79602
79544
|
}
|
|
79603
79545
|
__name(parseInlineTable, "parseInlineTable");
|
|
79604
|
-
function parseArray(
|
|
79546
|
+
function parseArray(ctx, integersAsBigInt) {
|
|
79605
79547
|
let res = [];
|
|
79606
79548
|
let c2;
|
|
79607
|
-
|
|
79608
|
-
while (
|
|
79609
|
-
|
|
79610
|
-
|
|
79611
|
-
|
|
79612
|
-
|
|
79613
|
-
|
|
79614
|
-
|
|
79615
|
-
|
|
79616
|
-
|
|
79617
|
-
|
|
79618
|
-
|
|
79619
|
-
|
|
79620
|
-
|
|
79621
|
-
|
|
79622
|
-
if (!c2) {
|
|
79623
|
-
throw new TomlError("unfinished array encountered", {
|
|
79624
|
-
toml: str,
|
|
79625
|
-
ptr
|
|
79626
|
-
});
|
|
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
|
+
}
|
|
79627
79564
|
}
|
|
79628
|
-
|
|
79565
|
+
throw new TomlError("unfinished array encountered", {
|
|
79566
|
+
toml: ctx.s,
|
|
79567
|
+
ptr: ctx.p
|
|
79568
|
+
});
|
|
79629
79569
|
}
|
|
79630
79570
|
__name(parseArray, "parseArray");
|
|
79631
79571
|
function peekTable(key, table, meta3, type) {
|
|
@@ -79689,25 +79629,29 @@ function peekTable(key, table, meta3, type) {
|
|
|
79689
79629
|
}
|
|
79690
79630
|
__name(peekTable, "peekTable");
|
|
79691
79631
|
function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
79632
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
79692
79633
|
let res = {};
|
|
79693
79634
|
let meta3 = {};
|
|
79635
|
+
let tmp;
|
|
79694
79636
|
let tbl = res;
|
|
79695
79637
|
let m = meta3;
|
|
79696
|
-
|
|
79697
|
-
|
|
79698
|
-
|
|
79699
|
-
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, "]");
|
|
79700
79644
|
if (isTableArray) {
|
|
79701
|
-
if (toml
|
|
79645
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
79702
79646
|
throw new TomlError("expected end of table declaration", {
|
|
79703
79647
|
toml,
|
|
79704
|
-
ptr:
|
|
79648
|
+
ptr: ctx.p - 1
|
|
79705
79649
|
});
|
|
79706
79650
|
}
|
|
79707
|
-
|
|
79651
|
+
ctx.p++;
|
|
79708
79652
|
}
|
|
79709
79653
|
let p2 = peekTable(
|
|
79710
|
-
k
|
|
79654
|
+
k,
|
|
79711
79655
|
res,
|
|
79712
79656
|
meta3,
|
|
79713
79657
|
isTableArray ? 2 : 1
|
|
@@ -79716,16 +79660,16 @@ function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
79716
79660
|
if (!p2) {
|
|
79717
79661
|
throw new TomlError("trying to redefine an already defined table or value", {
|
|
79718
79662
|
toml,
|
|
79719
|
-
ptr
|
|
79663
|
+
ptr: tmp
|
|
79720
79664
|
});
|
|
79721
79665
|
}
|
|
79722
79666
|
m = p2[2];
|
|
79723
79667
|
tbl = p2[1];
|
|
79724
|
-
ptr = k[1];
|
|
79725
79668
|
} else {
|
|
79726
|
-
|
|
79669
|
+
tmp = ctx.p;
|
|
79670
|
+
let k = parseKey(ctx);
|
|
79727
79671
|
let p2 = peekTable(
|
|
79728
|
-
k
|
|
79672
|
+
k,
|
|
79729
79673
|
tbl,
|
|
79730
79674
|
m,
|
|
79731
79675
|
0
|
|
@@ -79734,21 +79678,19 @@ function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
79734
79678
|
if (!p2) {
|
|
79735
79679
|
throw new TomlError("trying to redefine an already defined table or value", {
|
|
79736
79680
|
toml,
|
|
79737
|
-
ptr
|
|
79681
|
+
ptr: tmp
|
|
79738
79682
|
});
|
|
79739
79683
|
}
|
|
79740
|
-
|
|
79741
|
-
p2[1][p2[0]] = v[0];
|
|
79742
|
-
ptr = v[1];
|
|
79684
|
+
p2[1][p2[0]] = extractValue(ctx, void 0, integersAsBigInt);
|
|
79743
79685
|
}
|
|
79744
|
-
|
|
79745
|
-
if (toml
|
|
79686
|
+
skipVoid(ctx, true);
|
|
79687
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
79746
79688
|
throw new TomlError("each key-value declaration must be followed by an end-of-line", {
|
|
79747
79689
|
toml,
|
|
79748
|
-
ptr
|
|
79690
|
+
ptr: ctx.p
|
|
79749
79691
|
});
|
|
79750
79692
|
}
|
|
79751
|
-
|
|
79693
|
+
skipVoid(ctx);
|
|
79752
79694
|
}
|
|
79753
79695
|
return res;
|
|
79754
79696
|
}
|
|
@@ -79759,8 +79701,12 @@ function extendedTypeOf(obj) {
|
|
|
79759
79701
|
if (type === "object") {
|
|
79760
79702
|
if (Array.isArray(obj))
|
|
79761
79703
|
return "array";
|
|
79762
|
-
if (obj instanceof Date)
|
|
79704
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
79763
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
|
+
}
|
|
79764
79710
|
}
|
|
79765
79711
|
return type;
|
|
79766
79712
|
}
|
|
@@ -79777,38 +79723,43 @@ function formatString(s) {
|
|
|
79777
79723
|
return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
|
|
79778
79724
|
}
|
|
79779
79725
|
__name(formatString, "formatString");
|
|
79726
|
+
function stringifyTemporal(temporal) {
|
|
79727
|
+
return temporal.toString({
|
|
79728
|
+
calendarName: "never",
|
|
79729
|
+
timeZoneName: "never"
|
|
79730
|
+
});
|
|
79731
|
+
}
|
|
79732
|
+
__name(stringifyTemporal, "stringifyTemporal");
|
|
79780
79733
|
function stringifyValue(val, type, depth, numberAsFloat) {
|
|
79781
79734
|
if (depth === 0) {
|
|
79782
79735
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
79783
79736
|
}
|
|
79784
|
-
|
|
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
|
-
if (type === "array") {
|
|
79811
|
-
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);
|
|
79812
79763
|
}
|
|
79813
79764
|
}
|
|
79814
79765
|
__name(stringifyValue, "stringifyValue");
|
|
@@ -113519,7 +113470,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
113519
113470
|
var yargs_default = Yargs;
|
|
113520
113471
|
|
|
113521
113472
|
// package.json
|
|
113522
|
-
var version2 = "2.72.
|
|
113473
|
+
var version2 = "2.72.11";
|
|
113523
113474
|
|
|
113524
113475
|
// src/metrics.ts
|
|
113525
113476
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -114181,122 +114132,8 @@ var import_node_fs9 = __toESM(require("node:fs"));
|
|
|
114181
114132
|
var import_node_path10 = require("node:path");
|
|
114182
114133
|
var import_comment_json = __toESM(require_src3());
|
|
114183
114134
|
|
|
114184
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114185
|
-
|
|
114186
|
-
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
114187
|
-
return [lines.length, lines.pop().length + 1];
|
|
114188
|
-
}
|
|
114189
|
-
function makeCodeBlock2(string4, line, column) {
|
|
114190
|
-
let lines = string4.split(/\r\n|\n|\r/g);
|
|
114191
|
-
let codeblock = "";
|
|
114192
|
-
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
114193
|
-
for (let i = line - 1; i <= line + 1; i++) {
|
|
114194
|
-
let l = lines[i - 1];
|
|
114195
|
-
if (!l)
|
|
114196
|
-
continue;
|
|
114197
|
-
codeblock += i.toString().padEnd(numberLen, " ");
|
|
114198
|
-
codeblock += ": ";
|
|
114199
|
-
codeblock += l;
|
|
114200
|
-
codeblock += "\n";
|
|
114201
|
-
if (i === line) {
|
|
114202
|
-
codeblock += " ".repeat(numberLen + column + 2);
|
|
114203
|
-
codeblock += "^\n";
|
|
114204
|
-
}
|
|
114205
|
-
}
|
|
114206
|
-
return codeblock;
|
|
114207
|
-
}
|
|
114208
|
-
var TomlError2 = class extends Error {
|
|
114209
|
-
line;
|
|
114210
|
-
column;
|
|
114211
|
-
codeblock;
|
|
114212
|
-
constructor(message, options) {
|
|
114213
|
-
const [line, column] = getLineColFromPtr2(options.toml, options.ptr);
|
|
114214
|
-
const codeblock = makeCodeBlock2(options.toml, line, column);
|
|
114215
|
-
super(`Invalid TOML document: ${message}
|
|
114216
|
-
|
|
114217
|
-
${codeblock}`, options);
|
|
114218
|
-
this.line = line;
|
|
114219
|
-
this.column = column;
|
|
114220
|
-
this.codeblock = codeblock;
|
|
114221
|
-
}
|
|
114222
|
-
};
|
|
114223
|
-
|
|
114224
|
-
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/util.js
|
|
114225
|
-
function isEscaped2(str, ptr) {
|
|
114226
|
-
let i = 0;
|
|
114227
|
-
while (str[ptr - ++i] === "\\")
|
|
114228
|
-
;
|
|
114229
|
-
return --i && i % 2;
|
|
114230
|
-
}
|
|
114231
|
-
function indexOfNewline2(str, start = 0, end = str.length) {
|
|
114232
|
-
let idx = str.indexOf("\n", start);
|
|
114233
|
-
if (str[idx - 1] === "\r")
|
|
114234
|
-
idx--;
|
|
114235
|
-
return idx <= end ? idx : -1;
|
|
114236
|
-
}
|
|
114237
|
-
function skipComment2(str, ptr) {
|
|
114238
|
-
for (let i = ptr; i < str.length; i++) {
|
|
114239
|
-
let c2 = str[i];
|
|
114240
|
-
if (c2 === "\n")
|
|
114241
|
-
return i;
|
|
114242
|
-
if (c2 === "\r" && str[i + 1] === "\n")
|
|
114243
|
-
return i + 1;
|
|
114244
|
-
if (c2 < " " && c2 !== " " || c2 === "\x7F") {
|
|
114245
|
-
throw new TomlError2("control characters are not allowed in comments", {
|
|
114246
|
-
toml: str,
|
|
114247
|
-
ptr
|
|
114248
|
-
});
|
|
114249
|
-
}
|
|
114250
|
-
}
|
|
114251
|
-
return str.length;
|
|
114252
|
-
}
|
|
114253
|
-
function skipVoid2(str, ptr, banNewLines, banComments) {
|
|
114254
|
-
let c2;
|
|
114255
|
-
while ((c2 = str[ptr]) === " " || c2 === " " || !banNewLines && (c2 === "\n" || c2 === "\r" && str[ptr + 1] === "\n"))
|
|
114256
|
-
ptr++;
|
|
114257
|
-
return banComments || c2 !== "#" ? ptr : skipVoid2(str, skipComment2(str, ptr), banNewLines);
|
|
114258
|
-
}
|
|
114259
|
-
function skipUntil2(str, ptr, sep, end, banNewLines = false) {
|
|
114260
|
-
if (!end) {
|
|
114261
|
-
ptr = indexOfNewline2(str, ptr);
|
|
114262
|
-
return ptr < 0 ? str.length : ptr;
|
|
114263
|
-
}
|
|
114264
|
-
for (let i = ptr; i < str.length; i++) {
|
|
114265
|
-
let c2 = str[i];
|
|
114266
|
-
if (c2 === "#") {
|
|
114267
|
-
i = indexOfNewline2(str, i);
|
|
114268
|
-
} else if (c2 === sep) {
|
|
114269
|
-
return i + 1;
|
|
114270
|
-
} else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i + 1] === "\n")) {
|
|
114271
|
-
return i;
|
|
114272
|
-
}
|
|
114273
|
-
}
|
|
114274
|
-
throw new TomlError2("cannot find end of structure", {
|
|
114275
|
-
toml: str,
|
|
114276
|
-
ptr
|
|
114277
|
-
});
|
|
114278
|
-
}
|
|
114279
|
-
function getStringEnd2(str, seek) {
|
|
114280
|
-
let first = str[seek];
|
|
114281
|
-
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
114282
|
-
seek += target.length - 1;
|
|
114283
|
-
do
|
|
114284
|
-
seek = str.indexOf(target, ++seek);
|
|
114285
|
-
while (seek > -1 && first !== "'" && isEscaped2(str, seek));
|
|
114286
|
-
if (seek > -1) {
|
|
114287
|
-
seek += target.length;
|
|
114288
|
-
if (target.length > 1) {
|
|
114289
|
-
if (str[seek] === first)
|
|
114290
|
-
seek++;
|
|
114291
|
-
if (str[seek] === first)
|
|
114292
|
-
seek++;
|
|
114293
|
-
}
|
|
114294
|
-
}
|
|
114295
|
-
return seek;
|
|
114296
|
-
}
|
|
114297
|
-
|
|
114298
|
-
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/date.js
|
|
114299
|
-
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;
|
|
114300
114137
|
var TomlDate2 = class _TomlDate2 extends Date {
|
|
114301
114138
|
#hasDate = false;
|
|
114302
114139
|
#hasTime = false;
|
|
@@ -114387,98 +114224,224 @@ var TomlDate2 = class _TomlDate2 extends Date {
|
|
|
114387
114224
|
}
|
|
114388
114225
|
};
|
|
114389
114226
|
|
|
114390
|
-
// ../../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
|
|
114391
114323
|
var INT_REGEX2 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
114392
114324
|
var FLOAT_REGEX2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
114393
114325
|
var LEADING_ZERO2 = /^[+-]?0[0-9_]/;
|
|
114394
|
-
|
|
114395
|
-
|
|
114396
|
-
|
|
114397
|
-
|
|
114398
|
-
|
|
114399
|
-
|
|
114400
|
-
r: "\r",
|
|
114401
|
-
'"': '"',
|
|
114402
|
-
"\\": "\\"
|
|
114403
|
-
};
|
|
114404
|
-
function parseString2(str, ptr = 0, endPtr = str.length) {
|
|
114405
|
-
let isLiteral = str[ptr] === "'";
|
|
114406
|
-
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);
|
|
114407
114332
|
if (isMultiline) {
|
|
114408
|
-
|
|
114409
|
-
|
|
114410
|
-
|
|
114411
|
-
|
|
114412
|
-
|
|
114413
|
-
}
|
|
114414
|
-
let tmp = 0;
|
|
114415
|
-
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
|
+
}
|
|
114416
114338
|
let parsed = "";
|
|
114417
|
-
let sliceStart =
|
|
114418
|
-
|
|
114419
|
-
|
|
114420
|
-
|
|
114421
|
-
|
|
114422
|
-
|
|
114423
|
-
|
|
114424
|
-
ptr: ptr - 1
|
|
114425
|
-
});
|
|
114426
|
-
}
|
|
114427
|
-
} 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) {
|
|
114428
114346
|
throw new TomlError2("control characters are not allowed in strings", {
|
|
114429
|
-
toml:
|
|
114430
|
-
ptr:
|
|
114347
|
+
toml: ctx.s,
|
|
114348
|
+
ptr: ctx.p
|
|
114431
114349
|
});
|
|
114432
|
-
}
|
|
114433
|
-
|
|
114434
|
-
|
|
114435
|
-
|
|
114436
|
-
|
|
114437
|
-
|
|
114438
|
-
|
|
114439
|
-
|
|
114440
|
-
|
|
114441
|
-
|
|
114442
|
-
|
|
114443
|
-
|
|
114444
|
-
|
|
114445
|
-
|
|
114446
|
-
|
|
114447
|
-
|
|
114448
|
-
|
|
114449
|
-
|
|
114450
|
-
|
|
114451
|
-
|
|
114452
|
-
|
|
114453
|
-
|
|
114454
|
-
|
|
114455
|
-
|
|
114456
|
-
|
|
114457
|
-
|
|
114458
|
-
|
|
114459
|
-
|
|
114460
|
-
|
|
114461
|
-
|
|
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;
|
|
114462
114394
|
} else {
|
|
114463
|
-
|
|
114464
|
-
|
|
114465
|
-
|
|
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
|
|
114466
114421
|
});
|
|
114467
114422
|
}
|
|
114468
|
-
|
|
114469
|
-
|
|
114470
|
-
tmp = ptr - 1;
|
|
114471
|
-
isEscape = true;
|
|
114472
|
-
parsed += str.slice(sliceStart, tmp);
|
|
114423
|
+
state = !isLiteral && c2 === 92 ? 1 : 0;
|
|
114424
|
+
sliceStart = ctx.p;
|
|
114473
114425
|
}
|
|
114474
114426
|
}
|
|
114475
|
-
|
|
114427
|
+
throw new TomlError2("unfinished string", { toml: ctx.s, ptr: start });
|
|
114476
114428
|
}
|
|
114477
|
-
function
|
|
114478
|
-
|
|
114479
|
-
|
|
114480
|
-
if (
|
|
114481
|
-
|
|
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);
|
|
114482
114445
|
if (value === "-inf")
|
|
114483
114446
|
return -Infinity;
|
|
114484
114447
|
if (value === "inf" || value === "+inf")
|
|
@@ -114490,25 +114453,16 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
114490
114453
|
let isInt = INT_REGEX2.test(value);
|
|
114491
114454
|
if (isInt || FLOAT_REGEX2.test(value)) {
|
|
114492
114455
|
if (LEADING_ZERO2.test(value)) {
|
|
114493
|
-
throw new TomlError2("leading zeroes are not allowed",
|
|
114494
|
-
toml,
|
|
114495
|
-
ptr
|
|
114496
|
-
});
|
|
114456
|
+
throw new TomlError2("leading zeroes are not allowed", err);
|
|
114497
114457
|
}
|
|
114498
114458
|
value = value.replace(/_/g, "");
|
|
114499
114459
|
let numeric = +value;
|
|
114500
114460
|
if (isNaN(numeric)) {
|
|
114501
|
-
throw new TomlError2("invalid number",
|
|
114502
|
-
toml,
|
|
114503
|
-
ptr
|
|
114504
|
-
});
|
|
114461
|
+
throw new TomlError2("invalid number", err);
|
|
114505
114462
|
}
|
|
114506
114463
|
if (isInt) {
|
|
114507
114464
|
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
114508
|
-
throw new TomlError2("integer value cannot be represented losslessly",
|
|
114509
|
-
toml,
|
|
114510
|
-
ptr
|
|
114511
|
-
});
|
|
114465
|
+
throw new TomlError2("integer value cannot be represented losslessly", err);
|
|
114512
114466
|
}
|
|
114513
114467
|
if (isInt || integersAsBigInt === true)
|
|
114514
114468
|
numeric = BigInt(value);
|
|
@@ -114516,248 +114470,187 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
114516
114470
|
return numeric;
|
|
114517
114471
|
}
|
|
114518
114472
|
const date5 = new TomlDate2(value);
|
|
114519
|
-
if (!date5.isValid())
|
|
114520
|
-
throw new TomlError2("invalid value",
|
|
114521
|
-
toml,
|
|
114522
|
-
ptr
|
|
114523
|
-
});
|
|
114524
|
-
}
|
|
114473
|
+
if (!date5.isValid())
|
|
114474
|
+
throw new TomlError2("invalid value", err);
|
|
114525
114475
|
return date5;
|
|
114526
114476
|
}
|
|
114527
114477
|
|
|
114528
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114529
|
-
function
|
|
114530
|
-
let
|
|
114531
|
-
let
|
|
114532
|
-
if (
|
|
114533
|
-
|
|
114534
|
-
|
|
114535
|
-
|
|
114536
|
-
|
|
114537
|
-
if (!allowNewLines) {
|
|
114538
|
-
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
114539
|
-
if (newlineIdx > -1) {
|
|
114540
|
-
throw new TomlError2("newlines are not allowed in inline tables", {
|
|
114541
|
-
toml: str,
|
|
114542
|
-
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
|
|
114543
114487
|
});
|
|
114544
114488
|
}
|
|
114489
|
+
let value = c2 === 91 ? parseArray2(ctx, integersAsBigInt) : parseInlineTable2(ctx, integersAsBigInt);
|
|
114490
|
+
ctx.d++;
|
|
114491
|
+
return value;
|
|
114545
114492
|
}
|
|
114546
|
-
|
|
114547
|
-
|
|
114548
|
-
function extractValue2(str, ptr, end, depth, integersAsBigInt) {
|
|
114549
|
-
if (depth === 0) {
|
|
114550
|
-
throw new TomlError2("document contains excessively nested structures. aborting.", {
|
|
114551
|
-
toml: str,
|
|
114552
|
-
ptr
|
|
114553
|
-
});
|
|
114554
|
-
}
|
|
114555
|
-
let c2 = str[ptr];
|
|
114556
|
-
if (c2 === "[" || c2 === "{") {
|
|
114557
|
-
let [value, endPtr2] = c2 === "[" ? parseArray2(str, ptr, depth, integersAsBigInt) : parseInlineTable2(str, ptr, depth, integersAsBigInt);
|
|
114558
|
-
let newPtr = end ? skipUntil2(str, endPtr2, ",", end) : endPtr2;
|
|
114559
|
-
if (endPtr2 - newPtr && end === "}") {
|
|
114560
|
-
let nextNewLine = indexOfNewline2(str, endPtr2, newPtr);
|
|
114561
|
-
if (nextNewLine > -1) {
|
|
114562
|
-
throw new TomlError2("newlines are not allowed in inline tables", {
|
|
114563
|
-
toml: str,
|
|
114564
|
-
ptr: nextNewLine
|
|
114565
|
-
});
|
|
114566
|
-
}
|
|
114567
|
-
}
|
|
114568
|
-
return [value, newPtr];
|
|
114569
|
-
}
|
|
114570
|
-
let endPtr;
|
|
114571
|
-
if (c2 === '"' || c2 === "'") {
|
|
114572
|
-
endPtr = getStringEnd2(str, ptr);
|
|
114573
|
-
let parsed = parseString2(str, ptr, endPtr);
|
|
114574
|
-
if (end) {
|
|
114575
|
-
endPtr = skipVoid2(str, endPtr, end !== "]");
|
|
114576
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
114577
|
-
throw new TomlError2("unexpected character encountered", {
|
|
114578
|
-
toml: str,
|
|
114579
|
-
ptr: endPtr
|
|
114580
|
-
});
|
|
114581
|
-
}
|
|
114582
|
-
endPtr += +(str[endPtr] === ",");
|
|
114583
|
-
}
|
|
114584
|
-
return [parsed, endPtr];
|
|
114493
|
+
if (c2 === 34 || c2 === 39) {
|
|
114494
|
+
return parseString2(ctx);
|
|
114585
114495
|
}
|
|
114586
|
-
|
|
114587
|
-
|
|
114588
|
-
|
|
114589
|
-
|
|
114590
|
-
|
|
114591
|
-
ptr
|
|
114592
|
-
});
|
|
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;
|
|
114593
114501
|
}
|
|
114594
|
-
if (
|
|
114595
|
-
|
|
114596
|
-
|
|
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;
|
|
114597
114507
|
}
|
|
114598
|
-
return
|
|
114599
|
-
parseValue2(slice[0], str, ptr, integersAsBigInt),
|
|
114600
|
-
endPtr
|
|
114601
|
-
];
|
|
114508
|
+
return parseValue2(ctx, integersAsBigInt, end);
|
|
114602
114509
|
}
|
|
114603
114510
|
|
|
114604
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114511
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/struct.js
|
|
114605
114512
|
var KEY_PART_RE2 = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
114606
|
-
function parseKey2(
|
|
114607
|
-
let
|
|
114513
|
+
function parseKey2(ctx, end = "=") {
|
|
114514
|
+
let start = ctx.p;
|
|
114515
|
+
let dot = start - 1;
|
|
114608
114516
|
let parsed = [];
|
|
114609
|
-
let endPtr =
|
|
114517
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
114610
114518
|
if (endPtr < 0) {
|
|
114611
114519
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
114612
|
-
toml:
|
|
114613
|
-
ptr
|
|
114520
|
+
toml: ctx.s,
|
|
114521
|
+
ptr: start
|
|
114614
114522
|
});
|
|
114615
114523
|
}
|
|
114616
114524
|
do {
|
|
114617
|
-
let c2 =
|
|
114618
|
-
if (c2 !==
|
|
114619
|
-
if (c2 ===
|
|
114620
|
-
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)) {
|
|
114621
114529
|
throw new TomlError2("multiline strings are not allowed in keys", {
|
|
114622
|
-
toml:
|
|
114623
|
-
ptr
|
|
114624
|
-
});
|
|
114625
|
-
}
|
|
114626
|
-
let eos = getStringEnd2(str, ptr);
|
|
114627
|
-
if (eos < 0) {
|
|
114628
|
-
throw new TomlError2("unfinished string encountered", {
|
|
114629
|
-
toml: str,
|
|
114630
|
-
ptr
|
|
114530
|
+
toml: ctx.s,
|
|
114531
|
+
ptr: ctx.p
|
|
114631
114532
|
});
|
|
114632
114533
|
}
|
|
114633
|
-
|
|
114634
|
-
|
|
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);
|
|
114635
114537
|
let newLine = indexOfNewline2(strEnd);
|
|
114636
114538
|
if (newLine > -1) {
|
|
114637
114539
|
throw new TomlError2("newlines are not allowed in keys", {
|
|
114638
|
-
toml:
|
|
114639
|
-
ptr:
|
|
114540
|
+
toml: ctx.s,
|
|
114541
|
+
ptr: newLine
|
|
114640
114542
|
});
|
|
114641
114543
|
}
|
|
114642
114544
|
if (strEnd.trimStart()) {
|
|
114643
114545
|
throw new TomlError2("found extra tokens after the string part", {
|
|
114644
|
-
toml:
|
|
114645
|
-
ptr:
|
|
114546
|
+
toml: ctx.s,
|
|
114547
|
+
ptr: ctx.p
|
|
114646
114548
|
});
|
|
114647
114549
|
}
|
|
114648
|
-
if (endPtr <
|
|
114649
|
-
endPtr =
|
|
114550
|
+
if (endPtr < ctx.p) {
|
|
114551
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
114650
114552
|
if (endPtr < 0) {
|
|
114651
114553
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
114652
|
-
toml:
|
|
114653
|
-
ptr
|
|
114554
|
+
toml: ctx.s,
|
|
114555
|
+
ptr: start
|
|
114654
114556
|
});
|
|
114655
114557
|
}
|
|
114656
114558
|
}
|
|
114657
|
-
parsed.push(
|
|
114559
|
+
parsed.push(part);
|
|
114658
114560
|
} else {
|
|
114659
|
-
dot =
|
|
114660
|
-
let part =
|
|
114561
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
114562
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
114661
114563
|
if (!KEY_PART_RE2.test(part)) {
|
|
114662
114564
|
throw new TomlError2("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
114663
|
-
toml:
|
|
114664
|
-
ptr
|
|
114565
|
+
toml: ctx.s,
|
|
114566
|
+
ptr: ctx.p
|
|
114665
114567
|
});
|
|
114666
114568
|
}
|
|
114667
114569
|
parsed.push(part.trimEnd());
|
|
114668
114570
|
}
|
|
114669
114571
|
}
|
|
114670
114572
|
} while (dot + 1 && dot < endPtr);
|
|
114671
|
-
|
|
114573
|
+
ctx.p = endPtr + 1;
|
|
114574
|
+
skipVoid2(ctx, true, true);
|
|
114575
|
+
return parsed;
|
|
114672
114576
|
}
|
|
114673
|
-
function parseInlineTable2(
|
|
114577
|
+
function parseInlineTable2(ctx, integersAsBigInt) {
|
|
114674
114578
|
let res = {};
|
|
114675
114579
|
let seen = /* @__PURE__ */ new Set();
|
|
114676
114580
|
let c2;
|
|
114677
|
-
|
|
114678
|
-
|
|
114679
|
-
|
|
114680
|
-
|
|
114681
|
-
|
|
114682
|
-
|
|
114683
|
-
}
|
|
114684
|
-
|
|
114685
|
-
|
|
114686
|
-
|
|
114687
|
-
|
|
114688
|
-
|
|
114689
|
-
|
|
114690
|
-
|
|
114691
|
-
|
|
114692
|
-
|
|
114693
|
-
|
|
114694
|
-
t2 = hasOwn ? t2[k] : t2[k] = {};
|
|
114695
|
-
k = key[i];
|
|
114696
|
-
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
114697
|
-
throw new TomlError2("trying to redefine an already defined value", {
|
|
114698
|
-
toml: str,
|
|
114699
|
-
ptr
|
|
114700
|
-
});
|
|
114701
|
-
}
|
|
114702
|
-
if (!hasOwn && k === "__proto__") {
|
|
114703
|
-
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
114704
|
-
}
|
|
114705
|
-
}
|
|
114706
|
-
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]))) {
|
|
114707
114598
|
throw new TomlError2("trying to redefine an already defined value", {
|
|
114708
|
-
toml:
|
|
114709
|
-
ptr
|
|
114599
|
+
toml: ctx.s,
|
|
114600
|
+
ptr: p2
|
|
114710
114601
|
});
|
|
114711
114602
|
}
|
|
114712
|
-
|
|
114713
|
-
|
|
114714
|
-
|
|
114715
|
-
|
|
114716
|
-
|
|
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 });
|
|
114717
114621
|
}
|
|
114718
114622
|
}
|
|
114719
|
-
|
|
114720
|
-
|
|
114721
|
-
|
|
114722
|
-
|
|
114723
|
-
});
|
|
114724
|
-
}
|
|
114725
|
-
if (!c2) {
|
|
114726
|
-
throw new TomlError2("unfinished table encountered", {
|
|
114727
|
-
toml: str,
|
|
114728
|
-
ptr
|
|
114729
|
-
});
|
|
114730
|
-
}
|
|
114731
|
-
return [res, ptr];
|
|
114623
|
+
throw new TomlError2("unfinished table encountered", {
|
|
114624
|
+
toml: ctx.s,
|
|
114625
|
+
ptr: ctx.p
|
|
114626
|
+
});
|
|
114732
114627
|
}
|
|
114733
|
-
function parseArray2(
|
|
114628
|
+
function parseArray2(ctx, integersAsBigInt) {
|
|
114734
114629
|
let res = [];
|
|
114735
114630
|
let c2;
|
|
114736
|
-
|
|
114737
|
-
while (
|
|
114738
|
-
|
|
114739
|
-
|
|
114740
|
-
|
|
114741
|
-
|
|
114742
|
-
|
|
114743
|
-
|
|
114744
|
-
|
|
114745
|
-
|
|
114746
|
-
|
|
114747
|
-
|
|
114748
|
-
|
|
114749
|
-
|
|
114750
|
-
|
|
114751
|
-
if (!c2) {
|
|
114752
|
-
throw new TomlError2("unfinished array encountered", {
|
|
114753
|
-
toml: str,
|
|
114754
|
-
ptr
|
|
114755
|
-
});
|
|
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
|
+
}
|
|
114756
114646
|
}
|
|
114757
|
-
|
|
114647
|
+
throw new TomlError2("unfinished array encountered", {
|
|
114648
|
+
toml: ctx.s,
|
|
114649
|
+
ptr: ctx.p
|
|
114650
|
+
});
|
|
114758
114651
|
}
|
|
114759
114652
|
|
|
114760
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114653
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/parse.js
|
|
114761
114654
|
function peekTable2(key, table, meta3, type) {
|
|
114762
114655
|
let t2 = table;
|
|
114763
114656
|
let m = meta3;
|
|
@@ -114818,25 +114711,29 @@ function peekTable2(key, table, meta3, type) {
|
|
|
114818
114711
|
return [k, t2, state.c];
|
|
114819
114712
|
}
|
|
114820
114713
|
function parse5(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
114714
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
114821
114715
|
let res = {};
|
|
114822
114716
|
let meta3 = {};
|
|
114717
|
+
let tmp;
|
|
114823
114718
|
let tbl = res;
|
|
114824
114719
|
let m = meta3;
|
|
114825
|
-
|
|
114826
|
-
|
|
114827
|
-
|
|
114828
|
-
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, "]");
|
|
114829
114726
|
if (isTableArray) {
|
|
114830
|
-
if (toml
|
|
114727
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
114831
114728
|
throw new TomlError2("expected end of table declaration", {
|
|
114832
114729
|
toml,
|
|
114833
|
-
ptr:
|
|
114730
|
+
ptr: ctx.p - 1
|
|
114834
114731
|
});
|
|
114835
114732
|
}
|
|
114836
|
-
|
|
114733
|
+
ctx.p++;
|
|
114837
114734
|
}
|
|
114838
114735
|
let p2 = peekTable2(
|
|
114839
|
-
k
|
|
114736
|
+
k,
|
|
114840
114737
|
res,
|
|
114841
114738
|
meta3,
|
|
114842
114739
|
isTableArray ? 2 : 1
|
|
@@ -114845,16 +114742,16 @@ function parse5(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
114845
114742
|
if (!p2) {
|
|
114846
114743
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
114847
114744
|
toml,
|
|
114848
|
-
ptr
|
|
114745
|
+
ptr: tmp
|
|
114849
114746
|
});
|
|
114850
114747
|
}
|
|
114851
114748
|
m = p2[2];
|
|
114852
114749
|
tbl = p2[1];
|
|
114853
|
-
ptr = k[1];
|
|
114854
114750
|
} else {
|
|
114855
|
-
|
|
114751
|
+
tmp = ctx.p;
|
|
114752
|
+
let k = parseKey2(ctx);
|
|
114856
114753
|
let p2 = peekTable2(
|
|
114857
|
-
k
|
|
114754
|
+
k,
|
|
114858
114755
|
tbl,
|
|
114859
114756
|
m,
|
|
114860
114757
|
0
|
|
@@ -114863,34 +114760,36 @@ function parse5(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
114863
114760
|
if (!p2) {
|
|
114864
114761
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
114865
114762
|
toml,
|
|
114866
|
-
ptr
|
|
114763
|
+
ptr: tmp
|
|
114867
114764
|
});
|
|
114868
114765
|
}
|
|
114869
|
-
|
|
114870
|
-
p2[1][p2[0]] = v[0];
|
|
114871
|
-
ptr = v[1];
|
|
114766
|
+
p2[1][p2[0]] = extractValue2(ctx, void 0, integersAsBigInt);
|
|
114872
114767
|
}
|
|
114873
|
-
|
|
114874
|
-
if (toml
|
|
114768
|
+
skipVoid2(ctx, true);
|
|
114769
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
114875
114770
|
throw new TomlError2("each key-value declaration must be followed by an end-of-line", {
|
|
114876
114771
|
toml,
|
|
114877
|
-
ptr
|
|
114772
|
+
ptr: ctx.p
|
|
114878
114773
|
});
|
|
114879
114774
|
}
|
|
114880
|
-
|
|
114775
|
+
skipVoid2(ctx);
|
|
114881
114776
|
}
|
|
114882
114777
|
return res;
|
|
114883
114778
|
}
|
|
114884
114779
|
|
|
114885
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114780
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/stringify.js
|
|
114886
114781
|
var BARE_KEY2 = /^[a-z0-9-_]+$/i;
|
|
114887
114782
|
function extendedTypeOf2(obj) {
|
|
114888
114783
|
let type = typeof obj;
|
|
114889
114784
|
if (type === "object") {
|
|
114890
114785
|
if (Array.isArray(obj))
|
|
114891
114786
|
return "array";
|
|
114892
|
-
if (obj instanceof Date)
|
|
114787
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
114893
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
|
+
}
|
|
114894
114793
|
}
|
|
114895
114794
|
return type;
|
|
114896
114795
|
}
|
|
@@ -114904,38 +114803,42 @@ function isArrayOfTables2(obj) {
|
|
|
114904
114803
|
function formatString2(s) {
|
|
114905
114804
|
return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
|
|
114906
114805
|
}
|
|
114806
|
+
function stringifyTemporal2(temporal) {
|
|
114807
|
+
return temporal.toString({
|
|
114808
|
+
calendarName: "never",
|
|
114809
|
+
timeZoneName: "never"
|
|
114810
|
+
});
|
|
114811
|
+
}
|
|
114907
114812
|
function stringifyValue2(val, type, depth, numberAsFloat) {
|
|
114908
114813
|
if (depth === 0) {
|
|
114909
114814
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
114910
114815
|
}
|
|
114911
|
-
|
|
114912
|
-
|
|
114913
|
-
|
|
114914
|
-
|
|
114915
|
-
|
|
114916
|
-
|
|
114917
|
-
|
|
114918
|
-
|
|
114919
|
-
|
|
114920
|
-
|
|
114921
|
-
|
|
114922
|
-
|
|
114923
|
-
|
|
114924
|
-
|
|
114925
|
-
|
|
114926
|
-
|
|
114927
|
-
|
|
114928
|
-
|
|
114929
|
-
|
|
114930
|
-
|
|
114931
|
-
|
|
114932
|
-
|
|
114933
|
-
|
|
114934
|
-
|
|
114935
|
-
|
|
114936
|
-
|
|
114937
|
-
if (type === "array") {
|
|
114938
|
-
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);
|
|
114939
114842
|
}
|
|
114940
114843
|
}
|
|
114941
114844
|
function stringifyInlineTable2(obj, depth, numberAsFloat) {
|
|
@@ -115023,7 +114926,7 @@ function stringify2(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
|
|
|
115023
114926
|
return str;
|
|
115024
114927
|
}
|
|
115025
114928
|
|
|
115026
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
114929
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/index.js
|
|
115027
114930
|
var dist_default4 = { parse: parse5, stringify: stringify2, TomlDate: TomlDate2, TomlError: TomlError2 };
|
|
115028
114931
|
|
|
115029
114932
|
// src/helpers/files.ts
|
|
@@ -118732,7 +118635,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
118732
118635
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
118733
118636
|
|
|
118734
118637
|
// ../wrangler/package.json
|
|
118735
|
-
var version3 = "4.136.
|
|
118638
|
+
var version3 = "4.136.3";
|
|
118736
118639
|
|
|
118737
118640
|
// src/git.ts
|
|
118738
118641
|
var offerGit = async (ctx) => {
|
|
@@ -122627,7 +122530,7 @@ ${getPnpmIgnoredBuildsGuidance(e.packages)}`);
|
|
|
122627
122530
|
});
|
|
122628
122531
|
/*! Bundled license information:
|
|
122629
122532
|
|
|
122630
|
-
smol-toml/dist/
|
|
122533
|
+
smol-toml/dist/date.js:
|
|
122631
122534
|
(*!
|
|
122632
122535
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
122633
122536
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -122656,7 +122559,7 @@ smol-toml/dist/error.js:
|
|
|
122656
122559
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
122657
122560
|
*)
|
|
122658
122561
|
|
|
122659
|
-
smol-toml/dist/
|
|
122562
|
+
smol-toml/dist/error.js:
|
|
122660
122563
|
(*!
|
|
122661
122564
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
122662
122565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -122685,7 +122588,7 @@ smol-toml/dist/util.js:
|
|
|
122685
122588
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
122686
122589
|
*)
|
|
122687
122590
|
|
|
122688
|
-
smol-toml/dist/
|
|
122591
|
+
smol-toml/dist/util.js:
|
|
122689
122592
|
(*!
|
|
122690
122593
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
122691
122594
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -122949,9 +122852,9 @@ yargs-parser/build/lib/index.js:
|
|
|
122949
122852
|
* SPDX-License-Identifier: ISC
|
|
122950
122853
|
*)
|
|
122951
122854
|
|
|
122855
|
+
smol-toml/dist/date.js:
|
|
122952
122856
|
smol-toml/dist/error.js:
|
|
122953
122857
|
smol-toml/dist/util.js:
|
|
122954
|
-
smol-toml/dist/date.js:
|
|
122955
122858
|
smol-toml/dist/primitive.js:
|
|
122956
122859
|
smol-toml/dist/extract.js:
|
|
122957
122860
|
smol-toml/dist/struct.js:
|