wrangler 4.136.2 → 4.136.3
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/package.json +11 -11
- package/wrangler-dist/cli.js +872 -1001
package/wrangler-dist/cli.js
CHANGED
|
@@ -600,149 +600,12 @@ var init_config = __esm({
|
|
|
600
600
|
}
|
|
601
601
|
});
|
|
602
602
|
|
|
603
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
604
|
-
function getLineColFromPtr(string4, ptr) {
|
|
605
|
-
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
606
|
-
return [lines.length, lines.pop().length + 1];
|
|
607
|
-
}
|
|
608
|
-
function makeCodeBlock(string4, line, column) {
|
|
609
|
-
let lines = string4.split(/\r\n|\n|\r/g);
|
|
610
|
-
let codeblock = "";
|
|
611
|
-
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
612
|
-
for (let i8 = line - 1; i8 <= line + 1; i8++) {
|
|
613
|
-
let l8 = lines[i8 - 1];
|
|
614
|
-
if (!l8)
|
|
615
|
-
continue;
|
|
616
|
-
codeblock += i8.toString().padEnd(numberLen, " ");
|
|
617
|
-
codeblock += ": ";
|
|
618
|
-
codeblock += l8;
|
|
619
|
-
codeblock += "\n";
|
|
620
|
-
if (i8 === line) {
|
|
621
|
-
codeblock += " ".repeat(numberLen + column + 2);
|
|
622
|
-
codeblock += "^\n";
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
return codeblock;
|
|
626
|
-
}
|
|
627
|
-
var TomlError;
|
|
628
|
-
var init_error = __esm({
|
|
629
|
-
"../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/error.js"() {
|
|
630
|
-
init_import_meta_url();
|
|
631
|
-
__name(getLineColFromPtr, "getLineColFromPtr");
|
|
632
|
-
__name(makeCodeBlock, "makeCodeBlock");
|
|
633
|
-
TomlError = class extends Error {
|
|
634
|
-
static {
|
|
635
|
-
__name(this, "TomlError");
|
|
636
|
-
}
|
|
637
|
-
line;
|
|
638
|
-
column;
|
|
639
|
-
codeblock;
|
|
640
|
-
constructor(message, options) {
|
|
641
|
-
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
642
|
-
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
643
|
-
super(`Invalid TOML document: ${message}
|
|
644
|
-
|
|
645
|
-
${codeblock}`, options);
|
|
646
|
-
this.line = line;
|
|
647
|
-
this.column = column;
|
|
648
|
-
this.codeblock = codeblock;
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
|
|
654
|
-
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/util.js
|
|
655
|
-
function isEscaped(str, ptr) {
|
|
656
|
-
let i8 = 0;
|
|
657
|
-
while (str[ptr - ++i8] === "\\")
|
|
658
|
-
;
|
|
659
|
-
return --i8 && i8 % 2;
|
|
660
|
-
}
|
|
661
|
-
function indexOfNewline(str, start = 0, end = str.length) {
|
|
662
|
-
let idx = str.indexOf("\n", start);
|
|
663
|
-
if (str[idx - 1] === "\r")
|
|
664
|
-
idx--;
|
|
665
|
-
return idx <= end ? idx : -1;
|
|
666
|
-
}
|
|
667
|
-
function skipComment(str, ptr) {
|
|
668
|
-
for (let i8 = ptr; i8 < str.length; i8++) {
|
|
669
|
-
let c9 = str[i8];
|
|
670
|
-
if (c9 === "\n")
|
|
671
|
-
return i8;
|
|
672
|
-
if (c9 === "\r" && str[i8 + 1] === "\n")
|
|
673
|
-
return i8 + 1;
|
|
674
|
-
if (c9 < " " && c9 !== " " || c9 === "\x7F") {
|
|
675
|
-
throw new TomlError("control characters are not allowed in comments", {
|
|
676
|
-
toml: str,
|
|
677
|
-
ptr
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return str.length;
|
|
682
|
-
}
|
|
683
|
-
function skipVoid(str, ptr, banNewLines, banComments) {
|
|
684
|
-
let c9;
|
|
685
|
-
while ((c9 = str[ptr]) === " " || c9 === " " || !banNewLines && (c9 === "\n" || c9 === "\r" && str[ptr + 1] === "\n"))
|
|
686
|
-
ptr++;
|
|
687
|
-
return banComments || c9 !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
|
|
688
|
-
}
|
|
689
|
-
function skipUntil(str, ptr, sep8, end, banNewLines = false) {
|
|
690
|
-
if (!end) {
|
|
691
|
-
ptr = indexOfNewline(str, ptr);
|
|
692
|
-
return ptr < 0 ? str.length : ptr;
|
|
693
|
-
}
|
|
694
|
-
for (let i8 = ptr; i8 < str.length; i8++) {
|
|
695
|
-
let c9 = str[i8];
|
|
696
|
-
if (c9 === "#") {
|
|
697
|
-
i8 = indexOfNewline(str, i8);
|
|
698
|
-
} else if (c9 === sep8) {
|
|
699
|
-
return i8 + 1;
|
|
700
|
-
} else if (c9 === end || banNewLines && (c9 === "\n" || c9 === "\r" && str[i8 + 1] === "\n")) {
|
|
701
|
-
return i8;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
throw new TomlError("cannot find end of structure", {
|
|
705
|
-
toml: str,
|
|
706
|
-
ptr
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
function getStringEnd(str, seek) {
|
|
710
|
-
let first = str[seek];
|
|
711
|
-
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
712
|
-
seek += target.length - 1;
|
|
713
|
-
do
|
|
714
|
-
seek = str.indexOf(target, ++seek);
|
|
715
|
-
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
|
716
|
-
if (seek > -1) {
|
|
717
|
-
seek += target.length;
|
|
718
|
-
if (target.length > 1) {
|
|
719
|
-
if (str[seek] === first)
|
|
720
|
-
seek++;
|
|
721
|
-
if (str[seek] === first)
|
|
722
|
-
seek++;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
return seek;
|
|
726
|
-
}
|
|
727
|
-
var init_util = __esm({
|
|
728
|
-
"../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/util.js"() {
|
|
729
|
-
init_import_meta_url();
|
|
730
|
-
init_error();
|
|
731
|
-
__name(isEscaped, "isEscaped");
|
|
732
|
-
__name(indexOfNewline, "indexOfNewline");
|
|
733
|
-
__name(skipComment, "skipComment");
|
|
734
|
-
__name(skipVoid, "skipVoid");
|
|
735
|
-
__name(skipUntil, "skipUntil");
|
|
736
|
-
__name(getStringEnd, "getStringEnd");
|
|
737
|
-
}
|
|
738
|
-
});
|
|
739
|
-
|
|
740
|
-
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/date.js
|
|
603
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/date.js
|
|
741
604
|
var DATE_TIME_RE, TomlDate;
|
|
742
605
|
var init_date = __esm({
|
|
743
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
606
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/date.js"() {
|
|
744
607
|
init_import_meta_url();
|
|
745
|
-
DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}
|
|
608
|
+
DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
746
609
|
TomlDate = class _TomlDate2 extends Date {
|
|
747
610
|
static {
|
|
748
611
|
__name(this, "TomlDate");
|
|
@@ -838,85 +701,242 @@ var init_date = __esm({
|
|
|
838
701
|
}
|
|
839
702
|
});
|
|
840
703
|
|
|
841
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
842
|
-
function
|
|
843
|
-
let
|
|
844
|
-
|
|
704
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/error.js
|
|
705
|
+
function getLineColFromPtr(string4, ptr) {
|
|
706
|
+
let lines = string4.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
707
|
+
return [lines.length, lines.pop().length + 1];
|
|
708
|
+
}
|
|
709
|
+
function makeCodeBlock(string4, line, column) {
|
|
710
|
+
let lines = string4.split(/\r\n|\n|\r/g);
|
|
711
|
+
let codeblock = "";
|
|
712
|
+
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
713
|
+
for (let i8 = line - 1; i8 <= line + 1; i8++) {
|
|
714
|
+
let l8 = lines[i8 - 1];
|
|
715
|
+
if (!l8)
|
|
716
|
+
continue;
|
|
717
|
+
codeblock += i8.toString().padEnd(numberLen, " ");
|
|
718
|
+
codeblock += ": ";
|
|
719
|
+
codeblock += l8;
|
|
720
|
+
codeblock += "\n";
|
|
721
|
+
if (i8 === line) {
|
|
722
|
+
codeblock += " ".repeat(numberLen + column + 2);
|
|
723
|
+
codeblock += "^\n";
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
return codeblock;
|
|
727
|
+
}
|
|
728
|
+
var TomlError;
|
|
729
|
+
var init_error = __esm({
|
|
730
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/error.js"() {
|
|
731
|
+
init_import_meta_url();
|
|
732
|
+
__name(getLineColFromPtr, "getLineColFromPtr");
|
|
733
|
+
__name(makeCodeBlock, "makeCodeBlock");
|
|
734
|
+
TomlError = class extends Error {
|
|
735
|
+
static {
|
|
736
|
+
__name(this, "TomlError");
|
|
737
|
+
}
|
|
738
|
+
line;
|
|
739
|
+
column;
|
|
740
|
+
codeblock;
|
|
741
|
+
constructor(message, options) {
|
|
742
|
+
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
743
|
+
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
744
|
+
super(`Invalid TOML document: ${message}
|
|
745
|
+
|
|
746
|
+
${codeblock}`, options);
|
|
747
|
+
this.line = line;
|
|
748
|
+
this.column = column;
|
|
749
|
+
this.codeblock = codeblock;
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/util.js
|
|
756
|
+
function indexOfNewline(str, start = 0) {
|
|
757
|
+
let idx = str.indexOf("\n", start);
|
|
758
|
+
if (str.charCodeAt(idx - 1) === 13)
|
|
759
|
+
idx--;
|
|
760
|
+
return idx;
|
|
761
|
+
}
|
|
762
|
+
function skipComment(ctx) {
|
|
763
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
764
|
+
let c9 = ctx.s.charCodeAt(ctx.p);
|
|
765
|
+
if (c9 === 10)
|
|
766
|
+
break;
|
|
767
|
+
if (c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
|
|
768
|
+
ctx.p++;
|
|
769
|
+
break;
|
|
770
|
+
}
|
|
771
|
+
if (c9 < 32 && c9 !== 9 || c9 === 127) {
|
|
772
|
+
throw new TomlError("control characters are not allowed in comments", {
|
|
773
|
+
toml: ctx.s,
|
|
774
|
+
ptr: ctx.p
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
function skipVoid(ctx, banNewLines, banComments) {
|
|
780
|
+
let c9;
|
|
781
|
+
while (1) {
|
|
782
|
+
while ((c9 = ctx.s.charCodeAt(ctx.p)) === 32 || c9 === 9 || !banNewLines && (c9 === 10 || c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
|
|
783
|
+
ctx.p++;
|
|
784
|
+
if (banComments || c9 !== 35)
|
|
785
|
+
break;
|
|
786
|
+
skipComment(ctx);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
function skipUntil(ctx, sep8, end) {
|
|
790
|
+
let ptr = ctx.p;
|
|
791
|
+
if (!end) {
|
|
792
|
+
ptr = indexOfNewline(ctx.s, ptr);
|
|
793
|
+
ctx.p = ptr < 0 ? ctx.s.length : ptr;
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
797
|
+
let c9 = ctx.s.charCodeAt(ctx.p);
|
|
798
|
+
if (c9 === 35) {
|
|
799
|
+
skipComment(ctx);
|
|
800
|
+
} else if (c9 === end || c9 === sep8) {
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
throw new TomlError("cannot find end of structure", {
|
|
805
|
+
toml: ctx.s,
|
|
806
|
+
ptr
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
var init_util = __esm({
|
|
810
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/util.js"() {
|
|
811
|
+
init_import_meta_url();
|
|
812
|
+
init_error();
|
|
813
|
+
__name(indexOfNewline, "indexOfNewline");
|
|
814
|
+
__name(skipComment, "skipComment");
|
|
815
|
+
__name(skipVoid, "skipVoid");
|
|
816
|
+
__name(skipUntil, "skipUntil");
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/primitive.js
|
|
821
|
+
function parseString(ctx) {
|
|
822
|
+
let start = ctx.p;
|
|
823
|
+
let c9 = ctx.s.charCodeAt(ctx.p++);
|
|
824
|
+
let first = c9;
|
|
825
|
+
let isLiteral = c9 === 39;
|
|
826
|
+
let isMultiline = c9 === ctx.s.charCodeAt(ctx.p) && c9 === ctx.s.charCodeAt(ctx.p + 1);
|
|
845
827
|
if (isMultiline) {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
let tmp = 0;
|
|
853
|
-
let isEscape;
|
|
828
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p += 2)) === 10)
|
|
829
|
+
ctx.p++;
|
|
830
|
+
else if (c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
|
|
831
|
+
ctx.p += 2;
|
|
832
|
+
}
|
|
854
833
|
let parsed = "";
|
|
855
|
-
let sliceStart =
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
ptr: ptr - 1
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
} else if (c9 < " " && c9 !== " " || c9 === "\x7F") {
|
|
834
|
+
let sliceStart = ctx.p;
|
|
835
|
+
let state3 = 0;
|
|
836
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
837
|
+
c9 = ctx.s.charCodeAt(ctx.p);
|
|
838
|
+
if (isMultiline && (c9 === 10 || c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
|
|
839
|
+
state3 = state3 && 3;
|
|
840
|
+
} else if (c9 < 32 && c9 !== 9 || c9 === 127) {
|
|
866
841
|
throw new TomlError("control characters are not allowed in strings", {
|
|
867
|
-
toml:
|
|
868
|
-
ptr:
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
842
|
+
toml: ctx.s,
|
|
843
|
+
ptr: ctx.p
|
|
844
|
+
});
|
|
845
|
+
} else if ((!state3 || state3 === 3) && c9 === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
|
|
846
|
+
if (isMultiline) {
|
|
847
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
848
|
+
ctx.p++;
|
|
849
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
850
|
+
ctx.p++;
|
|
851
|
+
}
|
|
852
|
+
if (!state3)
|
|
853
|
+
parsed += ctx.s.slice(sliceStart, ctx.p);
|
|
854
|
+
ctx.p += isMultiline ? 3 : 1;
|
|
855
|
+
return parsed;
|
|
856
|
+
} else if (!state3) {
|
|
857
|
+
if (!isLiteral && c9 === 92) {
|
|
858
|
+
parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
|
|
859
|
+
state3 = 1;
|
|
860
|
+
}
|
|
861
|
+
} else if (state3 === 1) {
|
|
862
|
+
if (c9 === 120 || c9 === 117 || c9 === 85) {
|
|
863
|
+
let value = 0;
|
|
864
|
+
let len = c9 === 120 ? 2 : c9 === 117 ? 4 : 8;
|
|
865
|
+
for (let j8 = 0; j8 < len; j8++, ctx.p++) {
|
|
866
|
+
let hex3 = ctx.s.charCodeAt(ctx.p + 1);
|
|
867
|
+
let digit = (
|
|
868
|
+
/* 0-9 */
|
|
869
|
+
hex3 >= 48 && hex3 <= 57 ? hex3 - 48 : (
|
|
870
|
+
/* A-F */
|
|
871
|
+
hex3 >= 65 && hex3 <= 70 ? hex3 - 65 + 10 : (
|
|
872
|
+
/* a-f */
|
|
873
|
+
hex3 >= 97 && hex3 <= 102 ? hex3 - 97 + 10 : -1
|
|
874
|
+
)
|
|
875
|
+
)
|
|
876
|
+
);
|
|
877
|
+
if (digit < 0)
|
|
878
|
+
throw new TomlError("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
|
|
879
|
+
value = value << 4 | digit;
|
|
880
|
+
}
|
|
881
|
+
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
|
882
|
+
throw new TomlError("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
|
|
883
|
+
}
|
|
884
|
+
parsed += String.fromCodePoint(value);
|
|
885
|
+
sliceStart = ctx.p + 1;
|
|
886
|
+
state3 = 0;
|
|
887
|
+
} else if (c9 === 32 || c9 === 9) {
|
|
888
|
+
state3 = 2;
|
|
900
889
|
} else {
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
890
|
+
if (c9 === 98)
|
|
891
|
+
parsed += "\b";
|
|
892
|
+
else if (c9 === 116)
|
|
893
|
+
parsed += " ";
|
|
894
|
+
else if (c9 === 110)
|
|
895
|
+
parsed += "\n";
|
|
896
|
+
else if (c9 === 102)
|
|
897
|
+
parsed += "\f";
|
|
898
|
+
else if (c9 === 114)
|
|
899
|
+
parsed += "\r";
|
|
900
|
+
else if (c9 === 101)
|
|
901
|
+
parsed += "\x1B";
|
|
902
|
+
else if (c9 === 34)
|
|
903
|
+
parsed += '"';
|
|
904
|
+
else if (c9 === 92)
|
|
905
|
+
parsed += "\\";
|
|
906
|
+
else
|
|
907
|
+
throw new TomlError("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
|
|
908
|
+
sliceStart = ctx.p + 1;
|
|
909
|
+
state3 = 0;
|
|
910
|
+
}
|
|
911
|
+
} else if (c9 !== 32 && c9 !== 9) {
|
|
912
|
+
if (state3 === 2) {
|
|
913
|
+
throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
|
|
914
|
+
toml: ctx.s,
|
|
915
|
+
ptr: sliceStart
|
|
904
916
|
});
|
|
905
917
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
tmp = ptr - 1;
|
|
909
|
-
isEscape = true;
|
|
910
|
-
parsed += str.slice(sliceStart, tmp);
|
|
918
|
+
state3 = !isLiteral && c9 === 92 ? 1 : 0;
|
|
919
|
+
sliceStart = ctx.p;
|
|
911
920
|
}
|
|
912
921
|
}
|
|
913
|
-
|
|
922
|
+
throw new TomlError("unfinished string", { toml: ctx.s, ptr: start });
|
|
914
923
|
}
|
|
915
|
-
function
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
if (
|
|
919
|
-
|
|
924
|
+
function sliceAndTrimEndOf(ctx, start, end) {
|
|
925
|
+
let value = ctx.s.slice(start, end);
|
|
926
|
+
let commentIdx = value.indexOf("#");
|
|
927
|
+
if (commentIdx > 0) {
|
|
928
|
+
skipComment({ s: value, p: commentIdx});
|
|
929
|
+
value = value.slice(0, commentIdx);
|
|
930
|
+
}
|
|
931
|
+
return value.trimEnd();
|
|
932
|
+
}
|
|
933
|
+
function parseValue(ctx, integersAsBigInt, end) {
|
|
934
|
+
let ptr = ctx.p;
|
|
935
|
+
let err = { toml: ctx.s, ptr };
|
|
936
|
+
skipUntil(ctx, 44, end);
|
|
937
|
+
let value = sliceAndTrimEndOf(ctx, ptr, ctx.p);
|
|
938
|
+
if (!value)
|
|
939
|
+
throw new TomlError("incomplete declaration: value expected", err);
|
|
920
940
|
if (value === "-inf")
|
|
921
941
|
return -Infinity;
|
|
922
942
|
if (value === "inf" || value === "+inf")
|
|
@@ -928,25 +948,16 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
928
948
|
let isInt = INT_REGEX.test(value);
|
|
929
949
|
if (isInt || FLOAT_REGEX.test(value)) {
|
|
930
950
|
if (LEADING_ZERO.test(value)) {
|
|
931
|
-
throw new TomlError("leading zeroes are not allowed",
|
|
932
|
-
toml,
|
|
933
|
-
ptr
|
|
934
|
-
});
|
|
951
|
+
throw new TomlError("leading zeroes are not allowed", err);
|
|
935
952
|
}
|
|
936
953
|
value = value.replace(/_/g, "");
|
|
937
954
|
let numeric2 = +value;
|
|
938
955
|
if (isNaN(numeric2)) {
|
|
939
|
-
throw new TomlError("invalid number",
|
|
940
|
-
toml,
|
|
941
|
-
ptr
|
|
942
|
-
});
|
|
956
|
+
throw new TomlError("invalid number", err);
|
|
943
957
|
}
|
|
944
958
|
if (isInt) {
|
|
945
959
|
if ((isInt = !Number.isSafeInteger(numeric2)) && !integersAsBigInt) {
|
|
946
|
-
throw new TomlError("integer value cannot be represented losslessly",
|
|
947
|
-
toml,
|
|
948
|
-
ptr
|
|
949
|
-
});
|
|
960
|
+
throw new TomlError("integer value cannot be represented losslessly", err);
|
|
950
961
|
}
|
|
951
962
|
if (isInt || integersAsBigInt === true)
|
|
952
963
|
numeric2 = BigInt(value);
|
|
@@ -954,283 +965,211 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
954
965
|
return numeric2;
|
|
955
966
|
}
|
|
956
967
|
const date5 = new TomlDate(value);
|
|
957
|
-
if (!date5.isValid())
|
|
958
|
-
throw new TomlError("invalid value",
|
|
959
|
-
toml,
|
|
960
|
-
ptr
|
|
961
|
-
});
|
|
962
|
-
}
|
|
968
|
+
if (!date5.isValid())
|
|
969
|
+
throw new TomlError("invalid value", err);
|
|
963
970
|
return date5;
|
|
964
971
|
}
|
|
965
|
-
var INT_REGEX, FLOAT_REGEX, LEADING_ZERO
|
|
972
|
+
var INT_REGEX, FLOAT_REGEX, LEADING_ZERO;
|
|
966
973
|
var init_primitive = __esm({
|
|
967
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
974
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/primitive.js"() {
|
|
968
975
|
init_import_meta_url();
|
|
969
|
-
init_util();
|
|
970
976
|
init_date();
|
|
971
977
|
init_error();
|
|
978
|
+
init_util();
|
|
972
979
|
INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
973
980
|
FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
974
981
|
LEADING_ZERO = /^[+-]?0[0-9_]/;
|
|
975
|
-
ESCAPE_REGEX = /^[0-9a-f]{4,8}$/i;
|
|
976
|
-
ESC_MAP = {
|
|
977
|
-
b: "\b",
|
|
978
|
-
t: " ",
|
|
979
|
-
n: "\n",
|
|
980
|
-
f: "\f",
|
|
981
|
-
r: "\r",
|
|
982
|
-
'"': '"',
|
|
983
|
-
"\\": "\\"
|
|
984
|
-
};
|
|
985
982
|
__name(parseString, "parseString");
|
|
983
|
+
__name(sliceAndTrimEndOf, "sliceAndTrimEndOf");
|
|
986
984
|
__name(parseValue, "parseValue");
|
|
987
985
|
}
|
|
988
986
|
});
|
|
989
987
|
|
|
990
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
991
|
-
function
|
|
992
|
-
let
|
|
993
|
-
let
|
|
994
|
-
if (
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
if (!allowNewLines) {
|
|
1000
|
-
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
1001
|
-
if (newlineIdx > -1) {
|
|
1002
|
-
throw new TomlError("newlines are not allowed in inline tables", {
|
|
1003
|
-
toml: str,
|
|
1004
|
-
ptr: startPtr + newlineIdx
|
|
988
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/extract.js
|
|
989
|
+
function extractValue(ctx, end, integersAsBigInt) {
|
|
990
|
+
let ptr = ctx.p;
|
|
991
|
+
let c9 = ctx.s.charCodeAt(ptr);
|
|
992
|
+
if (c9 === 91 || c9 === 123) {
|
|
993
|
+
if (!ctx.d--) {
|
|
994
|
+
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
995
|
+
toml: ctx.s,
|
|
996
|
+
ptr
|
|
1005
997
|
});
|
|
1006
998
|
}
|
|
999
|
+
let value = c9 === 91 ? parseArray(ctx, integersAsBigInt) : parseInlineTable(ctx, integersAsBigInt);
|
|
1000
|
+
ctx.d++;
|
|
1001
|
+
return value;
|
|
1007
1002
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
1011
|
-
if (depth === 0) {
|
|
1012
|
-
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
1013
|
-
toml: str,
|
|
1014
|
-
ptr
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
let c9 = str[ptr];
|
|
1018
|
-
if (c9 === "[" || c9 === "{") {
|
|
1019
|
-
let [value, endPtr2] = c9 === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
|
|
1020
|
-
let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2;
|
|
1021
|
-
if (endPtr2 - newPtr && end === "}") {
|
|
1022
|
-
let nextNewLine = indexOfNewline(str, endPtr2, newPtr);
|
|
1023
|
-
if (nextNewLine > -1) {
|
|
1024
|
-
throw new TomlError("newlines are not allowed in inline tables", {
|
|
1025
|
-
toml: str,
|
|
1026
|
-
ptr: nextNewLine
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
return [value, newPtr];
|
|
1031
|
-
}
|
|
1032
|
-
let endPtr;
|
|
1033
|
-
if (c9 === '"' || c9 === "'") {
|
|
1034
|
-
endPtr = getStringEnd(str, ptr);
|
|
1035
|
-
let parsed = parseString(str, ptr, endPtr);
|
|
1036
|
-
if (end) {
|
|
1037
|
-
endPtr = skipVoid(str, endPtr, end !== "]");
|
|
1038
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
1039
|
-
throw new TomlError("unexpected character encountered", {
|
|
1040
|
-
toml: str,
|
|
1041
|
-
ptr: endPtr
|
|
1042
|
-
});
|
|
1043
|
-
}
|
|
1044
|
-
endPtr += +(str[endPtr] === ",");
|
|
1045
|
-
}
|
|
1046
|
-
return [parsed, endPtr];
|
|
1003
|
+
if (c9 === 34 || c9 === 39) {
|
|
1004
|
+
return parseString(ctx);
|
|
1047
1005
|
}
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
ptr
|
|
1054
|
-
});
|
|
1006
|
+
if (c9 === 116) {
|
|
1007
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
1008
|
+
throw new TomlError("invalid value", { toml: ctx.s, ptr });
|
|
1009
|
+
ctx.p++;
|
|
1010
|
+
return true;
|
|
1055
1011
|
}
|
|
1056
|
-
if (
|
|
1057
|
-
|
|
1058
|
-
|
|
1012
|
+
if (c9 === 102) {
|
|
1013
|
+
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)
|
|
1014
|
+
throw new TomlError("invalid value", { toml: ctx.s, ptr });
|
|
1015
|
+
ctx.p++;
|
|
1016
|
+
return false;
|
|
1059
1017
|
}
|
|
1060
|
-
return
|
|
1061
|
-
parseValue(slice[0], str, ptr, integersAsBigInt),
|
|
1062
|
-
endPtr
|
|
1063
|
-
];
|
|
1018
|
+
return parseValue(ctx, integersAsBigInt, end);
|
|
1064
1019
|
}
|
|
1065
1020
|
var init_extract = __esm({
|
|
1066
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
1021
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/extract.js"() {
|
|
1067
1022
|
init_import_meta_url();
|
|
1068
1023
|
init_primitive();
|
|
1069
1024
|
init_struct();
|
|
1070
|
-
init_util();
|
|
1071
1025
|
init_error();
|
|
1072
|
-
__name(sliceAndTrimEndOf, "sliceAndTrimEndOf");
|
|
1073
1026
|
__name(extractValue, "extractValue");
|
|
1074
1027
|
}
|
|
1075
1028
|
});
|
|
1076
1029
|
|
|
1077
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
1078
|
-
function parseKey(
|
|
1079
|
-
let
|
|
1030
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/struct.js
|
|
1031
|
+
function parseKey(ctx, end = "=") {
|
|
1032
|
+
let start = ctx.p;
|
|
1033
|
+
let dot = start - 1;
|
|
1080
1034
|
let parsed = [];
|
|
1081
|
-
let endPtr =
|
|
1035
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
1082
1036
|
if (endPtr < 0) {
|
|
1083
1037
|
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
1084
|
-
toml:
|
|
1085
|
-
ptr
|
|
1038
|
+
toml: ctx.s,
|
|
1039
|
+
ptr: start
|
|
1086
1040
|
});
|
|
1087
1041
|
}
|
|
1088
1042
|
do {
|
|
1089
|
-
let c9 =
|
|
1090
|
-
if (c9 !==
|
|
1091
|
-
if (c9 ===
|
|
1092
|
-
if (c9 ===
|
|
1043
|
+
let c9 = ctx.s.charCodeAt(ctx.p = ++dot);
|
|
1044
|
+
if (c9 !== 32 && c9 !== 9) {
|
|
1045
|
+
if (c9 === 34 || c9 === 39) {
|
|
1046
|
+
if (c9 === ctx.s.charCodeAt(ctx.p + 1) && c9 === ctx.s.charCodeAt(ctx.p + 2)) {
|
|
1093
1047
|
throw new TomlError("multiline strings are not allowed in keys", {
|
|
1094
|
-
toml:
|
|
1095
|
-
ptr
|
|
1048
|
+
toml: ctx.s,
|
|
1049
|
+
ptr: ctx.p
|
|
1096
1050
|
});
|
|
1097
1051
|
}
|
|
1098
|
-
let
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
toml: str,
|
|
1102
|
-
ptr
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
dot = str.indexOf(".", eos);
|
|
1106
|
-
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
1052
|
+
let part = parseString(ctx);
|
|
1053
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
1054
|
+
let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
1107
1055
|
let newLine = indexOfNewline(strEnd);
|
|
1108
1056
|
if (newLine > -1) {
|
|
1109
1057
|
throw new TomlError("newlines are not allowed in keys", {
|
|
1110
|
-
toml:
|
|
1111
|
-
ptr:
|
|
1058
|
+
toml: ctx.s,
|
|
1059
|
+
ptr: newLine
|
|
1112
1060
|
});
|
|
1113
1061
|
}
|
|
1114
1062
|
if (strEnd.trimStart()) {
|
|
1115
1063
|
throw new TomlError("found extra tokens after the string part", {
|
|
1116
|
-
toml:
|
|
1117
|
-
ptr:
|
|
1064
|
+
toml: ctx.s,
|
|
1065
|
+
ptr: ctx.p
|
|
1118
1066
|
});
|
|
1119
1067
|
}
|
|
1120
|
-
if (endPtr <
|
|
1121
|
-
endPtr =
|
|
1068
|
+
if (endPtr < ctx.p) {
|
|
1069
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
1122
1070
|
if (endPtr < 0) {
|
|
1123
1071
|
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
1124
|
-
toml:
|
|
1125
|
-
ptr
|
|
1072
|
+
toml: ctx.s,
|
|
1073
|
+
ptr: start
|
|
1126
1074
|
});
|
|
1127
1075
|
}
|
|
1128
1076
|
}
|
|
1129
|
-
parsed.push(
|
|
1077
|
+
parsed.push(part);
|
|
1130
1078
|
} else {
|
|
1131
|
-
dot =
|
|
1132
|
-
let part =
|
|
1079
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
1080
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
1133
1081
|
if (!KEY_PART_RE.test(part)) {
|
|
1134
1082
|
throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
1135
|
-
toml:
|
|
1136
|
-
ptr
|
|
1083
|
+
toml: ctx.s,
|
|
1084
|
+
ptr: ctx.p
|
|
1137
1085
|
});
|
|
1138
1086
|
}
|
|
1139
1087
|
parsed.push(part.trimEnd());
|
|
1140
1088
|
}
|
|
1141
1089
|
}
|
|
1142
1090
|
} while (dot + 1 && dot < endPtr);
|
|
1143
|
-
|
|
1091
|
+
ctx.p = endPtr + 1;
|
|
1092
|
+
skipVoid(ctx, true, true);
|
|
1093
|
+
return parsed;
|
|
1144
1094
|
}
|
|
1145
|
-
function parseInlineTable(
|
|
1095
|
+
function parseInlineTable(ctx, integersAsBigInt) {
|
|
1146
1096
|
let res = {};
|
|
1147
1097
|
let seen = /* @__PURE__ */ new Set();
|
|
1148
1098
|
let c9;
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
t14 = hasOwn2 ? t14[k7] : t14[k7] = {};
|
|
1167
|
-
k7 = key[i8];
|
|
1168
|
-
if ((hasOwn2 = Object.hasOwn(t14, k7)) && (typeof t14[k7] !== "object" || seen.has(t14[k7]))) {
|
|
1169
|
-
throw new TomlError("trying to redefine an already defined value", {
|
|
1170
|
-
toml: str,
|
|
1171
|
-
ptr
|
|
1172
|
-
});
|
|
1173
|
-
}
|
|
1174
|
-
if (!hasOwn2 && k7 === "__proto__") {
|
|
1175
|
-
Object.defineProperty(t14, k7, { enumerable: true, configurable: true, writable: true });
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
if (hasOwn2) {
|
|
1099
|
+
ctx.p++;
|
|
1100
|
+
while (ctx.p < ctx.s.length) {
|
|
1101
|
+
skipVoid(ctx);
|
|
1102
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p)) === 125) {
|
|
1103
|
+
ctx.p++;
|
|
1104
|
+
return res;
|
|
1105
|
+
}
|
|
1106
|
+
let k7;
|
|
1107
|
+
let t14 = res;
|
|
1108
|
+
let hasOwn2 = false;
|
|
1109
|
+
let p8 = ctx.p;
|
|
1110
|
+
let key = parseKey(ctx);
|
|
1111
|
+
for (let i8 = 0; i8 < key.length; i8++) {
|
|
1112
|
+
if (i8)
|
|
1113
|
+
t14 = hasOwn2 ? t14[k7] : t14[k7] = {};
|
|
1114
|
+
k7 = key[i8];
|
|
1115
|
+
if ((hasOwn2 = Object.hasOwn(t14, k7)) && (typeof t14[k7] !== "object" || seen.has(t14[k7]))) {
|
|
1179
1116
|
throw new TomlError("trying to redefine an already defined value", {
|
|
1180
|
-
toml:
|
|
1181
|
-
ptr
|
|
1117
|
+
toml: ctx.s,
|
|
1118
|
+
ptr: p8
|
|
1182
1119
|
});
|
|
1183
1120
|
}
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1121
|
+
if (!hasOwn2 && k7 === "__proto__") {
|
|
1122
|
+
Object.defineProperty(t14, k7, { enumerable: true, configurable: true, writable: true });
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
if (hasOwn2) {
|
|
1126
|
+
throw new TomlError("trying to redefine an already defined value", {
|
|
1127
|
+
toml: ctx.s,
|
|
1128
|
+
ptr: ctx.p
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
let value = extractValue(ctx, 125, integersAsBigInt);
|
|
1132
|
+
seen.add(t14[k7] = value);
|
|
1133
|
+
skipVoid(ctx);
|
|
1134
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p++)) === 125) {
|
|
1135
|
+
return res;
|
|
1136
|
+
}
|
|
1137
|
+
if (c9 !== 44) {
|
|
1138
|
+
throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
1189
1139
|
}
|
|
1190
1140
|
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
});
|
|
1196
|
-
}
|
|
1197
|
-
if (!c9) {
|
|
1198
|
-
throw new TomlError("unfinished table encountered", {
|
|
1199
|
-
toml: str,
|
|
1200
|
-
ptr
|
|
1201
|
-
});
|
|
1202
|
-
}
|
|
1203
|
-
return [res, ptr];
|
|
1141
|
+
throw new TomlError("unfinished table encountered", {
|
|
1142
|
+
toml: ctx.s,
|
|
1143
|
+
ptr: ctx.p
|
|
1144
|
+
});
|
|
1204
1145
|
}
|
|
1205
|
-
function parseArray(
|
|
1146
|
+
function parseArray(ctx, integersAsBigInt) {
|
|
1206
1147
|
let res = [];
|
|
1207
1148
|
let c9;
|
|
1208
|
-
|
|
1209
|
-
while (
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1149
|
+
ctx.p++;
|
|
1150
|
+
while (ctx.p < ctx.s.length) {
|
|
1151
|
+
skipVoid(ctx);
|
|
1152
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p)) === 93) {
|
|
1153
|
+
ctx.p++;
|
|
1154
|
+
return res;
|
|
1155
|
+
}
|
|
1156
|
+
res.push(extractValue(ctx, 93, integersAsBigInt));
|
|
1157
|
+
skipVoid(ctx);
|
|
1158
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p++)) === 93) {
|
|
1159
|
+
return res;
|
|
1160
|
+
}
|
|
1161
|
+
if (c9 !== 44) {
|
|
1162
|
+
throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
1221
1163
|
}
|
|
1222
1164
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
});
|
|
1228
|
-
}
|
|
1229
|
-
return [res, ptr];
|
|
1165
|
+
throw new TomlError("unfinished array encountered", {
|
|
1166
|
+
toml: ctx.s,
|
|
1167
|
+
ptr: ctx.p
|
|
1168
|
+
});
|
|
1230
1169
|
}
|
|
1231
1170
|
var KEY_PART_RE;
|
|
1232
1171
|
var init_struct = __esm({
|
|
1233
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
1172
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/struct.js"() {
|
|
1234
1173
|
init_import_meta_url();
|
|
1235
1174
|
init_primitive();
|
|
1236
1175
|
init_extract();
|
|
@@ -1243,7 +1182,7 @@ var init_struct = __esm({
|
|
|
1243
1182
|
}
|
|
1244
1183
|
});
|
|
1245
1184
|
|
|
1246
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
1185
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/parse.js
|
|
1247
1186
|
function peekTable(key, table, meta3, type) {
|
|
1248
1187
|
let t14 = table;
|
|
1249
1188
|
let m7 = meta3;
|
|
@@ -1304,25 +1243,29 @@ function peekTable(key, table, meta3, type) {
|
|
|
1304
1243
|
return [k7, t14, state3.c];
|
|
1305
1244
|
}
|
|
1306
1245
|
function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
1246
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
1307
1247
|
let res = {};
|
|
1308
1248
|
let meta3 = {};
|
|
1249
|
+
let tmp;
|
|
1309
1250
|
let tbl = res;
|
|
1310
1251
|
let m7 = meta3;
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
let
|
|
1252
|
+
skipVoid(ctx);
|
|
1253
|
+
while (ctx.p < toml.length) {
|
|
1254
|
+
if (toml.charCodeAt(ctx.p) === 91) {
|
|
1255
|
+
let isTableArray = toml.charCodeAt(++ctx.p) === 91;
|
|
1256
|
+
tmp = ctx.p += +isTableArray;
|
|
1257
|
+
let k7 = parseKey(ctx, "]");
|
|
1315
1258
|
if (isTableArray) {
|
|
1316
|
-
if (toml
|
|
1259
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
1317
1260
|
throw new TomlError("expected end of table declaration", {
|
|
1318
1261
|
toml,
|
|
1319
|
-
ptr:
|
|
1262
|
+
ptr: ctx.p - 1
|
|
1320
1263
|
});
|
|
1321
1264
|
}
|
|
1322
|
-
|
|
1265
|
+
ctx.p++;
|
|
1323
1266
|
}
|
|
1324
1267
|
let p8 = peekTable(
|
|
1325
|
-
k7
|
|
1268
|
+
k7,
|
|
1326
1269
|
res,
|
|
1327
1270
|
meta3,
|
|
1328
1271
|
isTableArray ? 2 : 1
|
|
@@ -1331,16 +1274,16 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
1331
1274
|
if (!p8) {
|
|
1332
1275
|
throw new TomlError("trying to redefine an already defined table or value", {
|
|
1333
1276
|
toml,
|
|
1334
|
-
ptr
|
|
1277
|
+
ptr: tmp
|
|
1335
1278
|
});
|
|
1336
1279
|
}
|
|
1337
1280
|
m7 = p8[2];
|
|
1338
1281
|
tbl = p8[1];
|
|
1339
|
-
ptr = k7[1];
|
|
1340
1282
|
} else {
|
|
1341
|
-
|
|
1283
|
+
tmp = ctx.p;
|
|
1284
|
+
let k7 = parseKey(ctx);
|
|
1342
1285
|
let p8 = peekTable(
|
|
1343
|
-
k7
|
|
1286
|
+
k7,
|
|
1344
1287
|
tbl,
|
|
1345
1288
|
m7,
|
|
1346
1289
|
0
|
|
@@ -1349,26 +1292,24 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
1349
1292
|
if (!p8) {
|
|
1350
1293
|
throw new TomlError("trying to redefine an already defined table or value", {
|
|
1351
1294
|
toml,
|
|
1352
|
-
ptr
|
|
1295
|
+
ptr: tmp
|
|
1353
1296
|
});
|
|
1354
1297
|
}
|
|
1355
|
-
|
|
1356
|
-
p8[1][p8[0]] = v8[0];
|
|
1357
|
-
ptr = v8[1];
|
|
1298
|
+
p8[1][p8[0]] = extractValue(ctx, void 0, integersAsBigInt);
|
|
1358
1299
|
}
|
|
1359
|
-
|
|
1360
|
-
if (toml
|
|
1300
|
+
skipVoid(ctx, true);
|
|
1301
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
1361
1302
|
throw new TomlError("each key-value declaration must be followed by an end-of-line", {
|
|
1362
1303
|
toml,
|
|
1363
|
-
ptr
|
|
1304
|
+
ptr: ctx.p
|
|
1364
1305
|
});
|
|
1365
1306
|
}
|
|
1366
|
-
|
|
1307
|
+
skipVoid(ctx);
|
|
1367
1308
|
}
|
|
1368
1309
|
return res;
|
|
1369
1310
|
}
|
|
1370
1311
|
var init_parse = __esm({
|
|
1371
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
1312
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/parse.js"() {
|
|
1372
1313
|
init_import_meta_url();
|
|
1373
1314
|
init_struct();
|
|
1374
1315
|
init_extract();
|
|
@@ -1379,14 +1320,18 @@ var init_parse = __esm({
|
|
|
1379
1320
|
}
|
|
1380
1321
|
});
|
|
1381
1322
|
|
|
1382
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
1323
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/stringify.js
|
|
1383
1324
|
function extendedTypeOf(obj) {
|
|
1384
1325
|
let type = typeof obj;
|
|
1385
1326
|
if (type === "object") {
|
|
1386
1327
|
if (Array.isArray(obj))
|
|
1387
1328
|
return "array";
|
|
1388
|
-
if (obj instanceof Date)
|
|
1329
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
1389
1330
|
return "date";
|
|
1331
|
+
if (globalThis.Temporal && // check for the 'since' property as an early bailout that avoids running all 5 instanceof checks
|
|
1332
|
+
typeof obj?.since === "function" && (obj instanceof Temporal.Instant || obj instanceof Temporal.PlainDate || obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainTime || obj instanceof Temporal.ZonedDateTime)) {
|
|
1333
|
+
return "temporal";
|
|
1334
|
+
}
|
|
1390
1335
|
}
|
|
1391
1336
|
return type;
|
|
1392
1337
|
}
|
|
@@ -1400,38 +1345,42 @@ function isArrayOfTables(obj) {
|
|
|
1400
1345
|
function formatString(s8) {
|
|
1401
1346
|
return JSON.stringify(s8).replace(/\x7f/g, "\\u007f");
|
|
1402
1347
|
}
|
|
1348
|
+
function stringifyTemporal(temporal) {
|
|
1349
|
+
return temporal.toString({
|
|
1350
|
+
calendarName: "never",
|
|
1351
|
+
timeZoneName: "never"
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1403
1354
|
function stringifyValue(val2, type, depth, numberAsFloat) {
|
|
1404
1355
|
if (depth === 0) {
|
|
1405
1356
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
1406
1357
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
if (type === "array") {
|
|
1434
|
-
return stringifyArray(val2, depth, numberAsFloat);
|
|
1358
|
+
switch (type) {
|
|
1359
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
1360
|
+
case "number":
|
|
1361
|
+
if (isNaN(val2))
|
|
1362
|
+
return "nan";
|
|
1363
|
+
if (val2 === Infinity)
|
|
1364
|
+
return "inf";
|
|
1365
|
+
if (val2 === -Infinity)
|
|
1366
|
+
return "-inf";
|
|
1367
|
+
if (Number.isInteger(val2) && (numberAsFloat || !Number.isSafeInteger(val2)))
|
|
1368
|
+
return val2.toFixed(1);
|
|
1369
|
+
case "bigint":
|
|
1370
|
+
case "boolean":
|
|
1371
|
+
return val2.toString();
|
|
1372
|
+
case "string":
|
|
1373
|
+
return formatString(val2);
|
|
1374
|
+
case "date":
|
|
1375
|
+
if (isNaN(val2.getTime()))
|
|
1376
|
+
throw new TypeError("cannot serialize invalid date");
|
|
1377
|
+
return val2.toISOString();
|
|
1378
|
+
case "object":
|
|
1379
|
+
return stringifyInlineTable(val2, depth, numberAsFloat);
|
|
1380
|
+
case "array":
|
|
1381
|
+
return stringifyArray(val2, depth, numberAsFloat);
|
|
1382
|
+
case "temporal":
|
|
1383
|
+
return stringifyTemporal(val2);
|
|
1435
1384
|
}
|
|
1436
1385
|
}
|
|
1437
1386
|
function stringifyInlineTable(obj, depth, numberAsFloat) {
|
|
@@ -1520,12 +1469,13 @@ function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
|
|
|
1520
1469
|
}
|
|
1521
1470
|
var BARE_KEY;
|
|
1522
1471
|
var init_stringify = __esm({
|
|
1523
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
1472
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/stringify.js"() {
|
|
1524
1473
|
init_import_meta_url();
|
|
1525
1474
|
BARE_KEY = /^[a-z0-9-_]+$/i;
|
|
1526
1475
|
__name(extendedTypeOf, "extendedTypeOf");
|
|
1527
1476
|
__name(isArrayOfTables, "isArrayOfTables");
|
|
1528
1477
|
__name(formatString, "formatString");
|
|
1478
|
+
__name(stringifyTemporal, "stringifyTemporal");
|
|
1529
1479
|
__name(stringifyValue, "stringifyValue");
|
|
1530
1480
|
__name(stringifyInlineTable, "stringifyInlineTable");
|
|
1531
1481
|
__name(stringifyArray, "stringifyArray");
|
|
@@ -1535,10 +1485,10 @@ var init_stringify = __esm({
|
|
|
1535
1485
|
}
|
|
1536
1486
|
});
|
|
1537
1487
|
|
|
1538
|
-
// ../../node_modules/.pnpm/smol-toml@1.
|
|
1488
|
+
// ../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/index.js
|
|
1539
1489
|
var dist_default;
|
|
1540
1490
|
var init_dist = __esm({
|
|
1541
|
-
"../../node_modules/.pnpm/smol-toml@1.
|
|
1491
|
+
"../../node_modules/.pnpm/smol-toml@1.8.0/node_modules/smol-toml/dist/index.js"() {
|
|
1542
1492
|
init_import_meta_url();
|
|
1543
1493
|
init_parse();
|
|
1544
1494
|
init_stringify();
|
|
@@ -62229,7 +62179,7 @@ var name, version2;
|
|
|
62229
62179
|
var init_package = __esm({
|
|
62230
62180
|
"package.json"() {
|
|
62231
62181
|
name = "wrangler";
|
|
62232
|
-
version2 = "4.136.
|
|
62182
|
+
version2 = "4.136.3";
|
|
62233
62183
|
}
|
|
62234
62184
|
});
|
|
62235
62185
|
|
|
@@ -125790,156 +125740,178 @@ function makeCodeBlock2(string4, line, column) {
|
|
|
125790
125740
|
}
|
|
125791
125741
|
return codeblock;
|
|
125792
125742
|
}
|
|
125793
|
-
function
|
|
125794
|
-
let i8 = 0;
|
|
125795
|
-
while (str[ptr - ++i8] === "\\")
|
|
125796
|
-
;
|
|
125797
|
-
return --i8 && i8 % 2;
|
|
125798
|
-
}
|
|
125799
|
-
function indexOfNewline2(str, start = 0, end = str.length) {
|
|
125743
|
+
function indexOfNewline2(str, start = 0) {
|
|
125800
125744
|
let idx = str.indexOf("\n", start);
|
|
125801
|
-
if (str
|
|
125745
|
+
if (str.charCodeAt(idx - 1) === 13)
|
|
125802
125746
|
idx--;
|
|
125803
|
-
return idx
|
|
125747
|
+
return idx;
|
|
125804
125748
|
}
|
|
125805
|
-
function skipComment2(
|
|
125806
|
-
for (
|
|
125807
|
-
let c9 =
|
|
125808
|
-
if (c9 ===
|
|
125809
|
-
|
|
125810
|
-
if (c9 ===
|
|
125811
|
-
|
|
125812
|
-
|
|
125749
|
+
function skipComment2(ctx) {
|
|
125750
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
125751
|
+
let c9 = ctx.s.charCodeAt(ctx.p);
|
|
125752
|
+
if (c9 === 10)
|
|
125753
|
+
break;
|
|
125754
|
+
if (c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
|
|
125755
|
+
ctx.p++;
|
|
125756
|
+
break;
|
|
125757
|
+
}
|
|
125758
|
+
if (c9 < 32 && c9 !== 9 || c9 === 127) {
|
|
125813
125759
|
throw new TomlError2("control characters are not allowed in comments", {
|
|
125814
|
-
toml:
|
|
125815
|
-
ptr
|
|
125760
|
+
toml: ctx.s,
|
|
125761
|
+
ptr: ctx.p
|
|
125816
125762
|
});
|
|
125817
125763
|
}
|
|
125818
125764
|
}
|
|
125819
|
-
return str.length;
|
|
125820
125765
|
}
|
|
125821
|
-
function skipVoid2(
|
|
125766
|
+
function skipVoid2(ctx, banNewLines, banComments) {
|
|
125822
125767
|
let c9;
|
|
125823
|
-
while (
|
|
125824
|
-
|
|
125825
|
-
|
|
125768
|
+
while (1) {
|
|
125769
|
+
while ((c9 = ctx.s.charCodeAt(ctx.p)) === 32 || c9 === 9 || !banNewLines && (c9 === 10 || c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
|
|
125770
|
+
ctx.p++;
|
|
125771
|
+
if (banComments || c9 !== 35)
|
|
125772
|
+
break;
|
|
125773
|
+
skipComment2(ctx);
|
|
125774
|
+
}
|
|
125826
125775
|
}
|
|
125827
|
-
function skipUntil2(
|
|
125776
|
+
function skipUntil2(ctx, sep8, end) {
|
|
125777
|
+
let ptr = ctx.p;
|
|
125828
125778
|
if (!end) {
|
|
125829
|
-
ptr = indexOfNewline2(
|
|
125830
|
-
|
|
125831
|
-
|
|
125832
|
-
|
|
125833
|
-
|
|
125834
|
-
|
|
125835
|
-
|
|
125836
|
-
|
|
125837
|
-
|
|
125838
|
-
|
|
125839
|
-
return i8;
|
|
125779
|
+
ptr = indexOfNewline2(ctx.s, ptr);
|
|
125780
|
+
ctx.p = ptr < 0 ? ctx.s.length : ptr;
|
|
125781
|
+
return;
|
|
125782
|
+
}
|
|
125783
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
125784
|
+
let c9 = ctx.s.charCodeAt(ctx.p);
|
|
125785
|
+
if (c9 === 35) {
|
|
125786
|
+
skipComment2(ctx);
|
|
125787
|
+
} else if (c9 === end || c9 === sep8) {
|
|
125788
|
+
return;
|
|
125840
125789
|
}
|
|
125841
125790
|
}
|
|
125842
125791
|
throw new TomlError2("cannot find end of structure", {
|
|
125843
|
-
toml:
|
|
125792
|
+
toml: ctx.s,
|
|
125844
125793
|
ptr
|
|
125845
125794
|
});
|
|
125846
125795
|
}
|
|
125847
|
-
function
|
|
125848
|
-
let
|
|
125849
|
-
let
|
|
125850
|
-
|
|
125851
|
-
|
|
125852
|
-
|
|
125853
|
-
while (seek > -1 && first !== "'" && isEscaped2(str, seek));
|
|
125854
|
-
if (seek > -1) {
|
|
125855
|
-
seek += target.length;
|
|
125856
|
-
if (target.length > 1) {
|
|
125857
|
-
if (str[seek] === first)
|
|
125858
|
-
seek++;
|
|
125859
|
-
if (str[seek] === first)
|
|
125860
|
-
seek++;
|
|
125861
|
-
}
|
|
125862
|
-
}
|
|
125863
|
-
return seek;
|
|
125864
|
-
}
|
|
125865
|
-
function parseString2(str, ptr = 0, endPtr = str.length) {
|
|
125866
|
-
let isLiteral = str[ptr] === "'";
|
|
125867
|
-
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
|
125796
|
+
function parseString2(ctx) {
|
|
125797
|
+
let start = ctx.p;
|
|
125798
|
+
let c9 = ctx.s.charCodeAt(ctx.p++);
|
|
125799
|
+
let first = c9;
|
|
125800
|
+
let isLiteral = c9 === 39;
|
|
125801
|
+
let isMultiline = c9 === ctx.s.charCodeAt(ctx.p) && c9 === ctx.s.charCodeAt(ctx.p + 1);
|
|
125868
125802
|
if (isMultiline) {
|
|
125869
|
-
|
|
125870
|
-
|
|
125871
|
-
|
|
125872
|
-
|
|
125873
|
-
|
|
125874
|
-
}
|
|
125875
|
-
let tmp = 0;
|
|
125876
|
-
let isEscape;
|
|
125803
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p += 2)) === 10)
|
|
125804
|
+
ctx.p++;
|
|
125805
|
+
else if (c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
|
|
125806
|
+
ctx.p += 2;
|
|
125807
|
+
}
|
|
125877
125808
|
let parsed = "";
|
|
125878
|
-
let sliceStart =
|
|
125879
|
-
|
|
125880
|
-
|
|
125881
|
-
|
|
125882
|
-
|
|
125883
|
-
|
|
125884
|
-
|
|
125885
|
-
ptr: ptr - 1
|
|
125886
|
-
});
|
|
125887
|
-
}
|
|
125888
|
-
} else if (c9 < " " && c9 !== " " || c9 === "\x7F") {
|
|
125809
|
+
let sliceStart = ctx.p;
|
|
125810
|
+
let state3 = 0;
|
|
125811
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
125812
|
+
c9 = ctx.s.charCodeAt(ctx.p);
|
|
125813
|
+
if (isMultiline && (c9 === 10 || c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
|
|
125814
|
+
state3 = state3 && 3;
|
|
125815
|
+
} else if (c9 < 32 && c9 !== 9 || c9 === 127) {
|
|
125889
125816
|
throw new TomlError2("control characters are not allowed in strings", {
|
|
125890
|
-
toml:
|
|
125891
|
-
ptr:
|
|
125892
|
-
});
|
|
125893
|
-
}
|
|
125894
|
-
|
|
125895
|
-
|
|
125896
|
-
|
|
125897
|
-
|
|
125898
|
-
|
|
125899
|
-
|
|
125900
|
-
|
|
125901
|
-
|
|
125902
|
-
|
|
125903
|
-
|
|
125904
|
-
|
|
125905
|
-
|
|
125906
|
-
|
|
125907
|
-
|
|
125908
|
-
|
|
125909
|
-
|
|
125910
|
-
|
|
125911
|
-
|
|
125912
|
-
|
|
125913
|
-
|
|
125914
|
-
|
|
125915
|
-
|
|
125916
|
-
|
|
125917
|
-
|
|
125918
|
-
|
|
125919
|
-
|
|
125920
|
-
|
|
125921
|
-
|
|
125922
|
-
|
|
125817
|
+
toml: ctx.s,
|
|
125818
|
+
ptr: ctx.p
|
|
125819
|
+
});
|
|
125820
|
+
} else if ((!state3 || state3 === 3) && c9 === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
|
|
125821
|
+
if (isMultiline) {
|
|
125822
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
125823
|
+
ctx.p++;
|
|
125824
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
125825
|
+
ctx.p++;
|
|
125826
|
+
}
|
|
125827
|
+
if (!state3)
|
|
125828
|
+
parsed += ctx.s.slice(sliceStart, ctx.p);
|
|
125829
|
+
ctx.p += isMultiline ? 3 : 1;
|
|
125830
|
+
return parsed;
|
|
125831
|
+
} else if (!state3) {
|
|
125832
|
+
if (!isLiteral && c9 === 92) {
|
|
125833
|
+
parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
|
|
125834
|
+
state3 = 1;
|
|
125835
|
+
}
|
|
125836
|
+
} else if (state3 === 1) {
|
|
125837
|
+
if (c9 === 120 || c9 === 117 || c9 === 85) {
|
|
125838
|
+
let value = 0;
|
|
125839
|
+
let len = c9 === 120 ? 2 : c9 === 117 ? 4 : 8;
|
|
125840
|
+
for (let j8 = 0; j8 < len; j8++, ctx.p++) {
|
|
125841
|
+
let hex3 = ctx.s.charCodeAt(ctx.p + 1);
|
|
125842
|
+
let digit = (
|
|
125843
|
+
/* 0-9 */
|
|
125844
|
+
hex3 >= 48 && hex3 <= 57 ? hex3 - 48 : (
|
|
125845
|
+
/* A-F */
|
|
125846
|
+
hex3 >= 65 && hex3 <= 70 ? hex3 - 65 + 10 : (
|
|
125847
|
+
/* a-f */
|
|
125848
|
+
hex3 >= 97 && hex3 <= 102 ? hex3 - 97 + 10 : -1
|
|
125849
|
+
)
|
|
125850
|
+
)
|
|
125851
|
+
);
|
|
125852
|
+
if (digit < 0)
|
|
125853
|
+
throw new TomlError2("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
|
|
125854
|
+
value = value << 4 | digit;
|
|
125855
|
+
}
|
|
125856
|
+
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
|
125857
|
+
throw new TomlError2("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
|
|
125858
|
+
}
|
|
125859
|
+
parsed += String.fromCodePoint(value);
|
|
125860
|
+
sliceStart = ctx.p + 1;
|
|
125861
|
+
state3 = 0;
|
|
125862
|
+
} else if (c9 === 32 || c9 === 9) {
|
|
125863
|
+
state3 = 2;
|
|
125923
125864
|
} else {
|
|
125924
|
-
|
|
125925
|
-
|
|
125926
|
-
|
|
125865
|
+
if (c9 === 98)
|
|
125866
|
+
parsed += "\b";
|
|
125867
|
+
else if (c9 === 116)
|
|
125868
|
+
parsed += " ";
|
|
125869
|
+
else if (c9 === 110)
|
|
125870
|
+
parsed += "\n";
|
|
125871
|
+
else if (c9 === 102)
|
|
125872
|
+
parsed += "\f";
|
|
125873
|
+
else if (c9 === 114)
|
|
125874
|
+
parsed += "\r";
|
|
125875
|
+
else if (c9 === 101)
|
|
125876
|
+
parsed += "\x1B";
|
|
125877
|
+
else if (c9 === 34)
|
|
125878
|
+
parsed += '"';
|
|
125879
|
+
else if (c9 === 92)
|
|
125880
|
+
parsed += "\\";
|
|
125881
|
+
else
|
|
125882
|
+
throw new TomlError2("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
|
|
125883
|
+
sliceStart = ctx.p + 1;
|
|
125884
|
+
state3 = 0;
|
|
125885
|
+
}
|
|
125886
|
+
} else if (c9 !== 32 && c9 !== 9) {
|
|
125887
|
+
if (state3 === 2) {
|
|
125888
|
+
throw new TomlError2("invalid escape: only line-ending whitespace may be escaped", {
|
|
125889
|
+
toml: ctx.s,
|
|
125890
|
+
ptr: sliceStart
|
|
125927
125891
|
});
|
|
125928
125892
|
}
|
|
125929
|
-
|
|
125930
|
-
|
|
125931
|
-
tmp = ptr - 1;
|
|
125932
|
-
isEscape = true;
|
|
125933
|
-
parsed += str.slice(sliceStart, tmp);
|
|
125893
|
+
state3 = !isLiteral && c9 === 92 ? 1 : 0;
|
|
125894
|
+
sliceStart = ctx.p;
|
|
125934
125895
|
}
|
|
125935
125896
|
}
|
|
125936
|
-
|
|
125897
|
+
throw new TomlError2("unfinished string", { toml: ctx.s, ptr: start });
|
|
125937
125898
|
}
|
|
125938
|
-
function
|
|
125939
|
-
|
|
125940
|
-
|
|
125941
|
-
if (
|
|
125942
|
-
|
|
125899
|
+
function sliceAndTrimEndOf2(ctx, start, end) {
|
|
125900
|
+
let value = ctx.s.slice(start, end);
|
|
125901
|
+
let commentIdx = value.indexOf("#");
|
|
125902
|
+
if (commentIdx > 0) {
|
|
125903
|
+
skipComment2({ s: value, p: commentIdx });
|
|
125904
|
+
value = value.slice(0, commentIdx);
|
|
125905
|
+
}
|
|
125906
|
+
return value.trimEnd();
|
|
125907
|
+
}
|
|
125908
|
+
function parseValue2(ctx, integersAsBigInt, end) {
|
|
125909
|
+
let ptr = ctx.p;
|
|
125910
|
+
let err = { toml: ctx.s, ptr };
|
|
125911
|
+
skipUntil2(ctx, 44, end);
|
|
125912
|
+
let value = sliceAndTrimEndOf2(ctx, ptr, ctx.p);
|
|
125913
|
+
if (!value)
|
|
125914
|
+
throw new TomlError2("incomplete declaration: value expected", err);
|
|
125943
125915
|
if (value === "-inf")
|
|
125944
125916
|
return -Infinity;
|
|
125945
125917
|
if (value === "inf" || value === "+inf")
|
|
@@ -125951,25 +125923,16 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
125951
125923
|
let isInt = INT_REGEX2.test(value);
|
|
125952
125924
|
if (isInt || FLOAT_REGEX2.test(value)) {
|
|
125953
125925
|
if (LEADING_ZERO2.test(value)) {
|
|
125954
|
-
throw new TomlError2("leading zeroes are not allowed",
|
|
125955
|
-
toml,
|
|
125956
|
-
ptr
|
|
125957
|
-
});
|
|
125926
|
+
throw new TomlError2("leading zeroes are not allowed", err);
|
|
125958
125927
|
}
|
|
125959
125928
|
value = value.replace(/_/g, "");
|
|
125960
125929
|
let numeric2 = +value;
|
|
125961
125930
|
if (isNaN(numeric2)) {
|
|
125962
|
-
throw new TomlError2("invalid number",
|
|
125963
|
-
toml,
|
|
125964
|
-
ptr
|
|
125965
|
-
});
|
|
125931
|
+
throw new TomlError2("invalid number", err);
|
|
125966
125932
|
}
|
|
125967
125933
|
if (isInt) {
|
|
125968
125934
|
if ((isInt = !Number.isSafeInteger(numeric2)) && !integersAsBigInt) {
|
|
125969
|
-
throw new TomlError2("integer value cannot be represented losslessly",
|
|
125970
|
-
toml,
|
|
125971
|
-
ptr
|
|
125972
|
-
});
|
|
125935
|
+
throw new TomlError2("integer value cannot be represented losslessly", err);
|
|
125973
125936
|
}
|
|
125974
125937
|
if (isInt || integersAsBigInt === true)
|
|
125975
125938
|
numeric2 = BigInt(value);
|
|
@@ -125977,240 +125940,179 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
125977
125940
|
return numeric2;
|
|
125978
125941
|
}
|
|
125979
125942
|
const date5 = new TomlDate2(value);
|
|
125980
|
-
if (!date5.isValid())
|
|
125981
|
-
throw new TomlError2("invalid value",
|
|
125982
|
-
toml,
|
|
125983
|
-
ptr
|
|
125984
|
-
});
|
|
125985
|
-
}
|
|
125943
|
+
if (!date5.isValid())
|
|
125944
|
+
throw new TomlError2("invalid value", err);
|
|
125986
125945
|
return date5;
|
|
125987
125946
|
}
|
|
125988
|
-
function
|
|
125989
|
-
let
|
|
125990
|
-
let
|
|
125991
|
-
if (
|
|
125992
|
-
|
|
125993
|
-
|
|
125994
|
-
|
|
125995
|
-
|
|
125996
|
-
if (!allowNewLines) {
|
|
125997
|
-
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
125998
|
-
if (newlineIdx > -1) {
|
|
125999
|
-
throw new TomlError2("newlines are not allowed in inline tables", {
|
|
126000
|
-
toml: str,
|
|
126001
|
-
ptr: startPtr + newlineIdx
|
|
125947
|
+
function extractValue2(ctx, end, integersAsBigInt) {
|
|
125948
|
+
let ptr = ctx.p;
|
|
125949
|
+
let c9 = ctx.s.charCodeAt(ptr);
|
|
125950
|
+
if (c9 === 91 || c9 === 123) {
|
|
125951
|
+
if (!ctx.d--) {
|
|
125952
|
+
throw new TomlError2("document contains excessively nested structures. aborting.", {
|
|
125953
|
+
toml: ctx.s,
|
|
125954
|
+
ptr
|
|
126002
125955
|
});
|
|
126003
125956
|
}
|
|
125957
|
+
let value = c9 === 91 ? parseArray2(ctx, integersAsBigInt) : parseInlineTable2(ctx, integersAsBigInt);
|
|
125958
|
+
ctx.d++;
|
|
125959
|
+
return value;
|
|
126004
125960
|
}
|
|
126005
|
-
|
|
126006
|
-
|
|
126007
|
-
function extractValue2(str, ptr, end, depth, integersAsBigInt) {
|
|
126008
|
-
if (depth === 0) {
|
|
126009
|
-
throw new TomlError2("document contains excessively nested structures. aborting.", {
|
|
126010
|
-
toml: str,
|
|
126011
|
-
ptr
|
|
126012
|
-
});
|
|
126013
|
-
}
|
|
126014
|
-
let c9 = str[ptr];
|
|
126015
|
-
if (c9 === "[" || c9 === "{") {
|
|
126016
|
-
let [value, endPtr2] = c9 === "[" ? parseArray2(str, ptr, depth, integersAsBigInt) : parseInlineTable2(str, ptr, depth, integersAsBigInt);
|
|
126017
|
-
let newPtr = end ? skipUntil2(str, endPtr2, ",", end) : endPtr2;
|
|
126018
|
-
if (endPtr2 - newPtr && end === "}") {
|
|
126019
|
-
let nextNewLine = indexOfNewline2(str, endPtr2, newPtr);
|
|
126020
|
-
if (nextNewLine > -1) {
|
|
126021
|
-
throw new TomlError2("newlines are not allowed in inline tables", {
|
|
126022
|
-
toml: str,
|
|
126023
|
-
ptr: nextNewLine
|
|
126024
|
-
});
|
|
126025
|
-
}
|
|
126026
|
-
}
|
|
126027
|
-
return [value, newPtr];
|
|
126028
|
-
}
|
|
126029
|
-
let endPtr;
|
|
126030
|
-
if (c9 === '"' || c9 === "'") {
|
|
126031
|
-
endPtr = getStringEnd2(str, ptr);
|
|
126032
|
-
let parsed = parseString2(str, ptr, endPtr);
|
|
126033
|
-
if (end) {
|
|
126034
|
-
endPtr = skipVoid2(str, endPtr, end !== "]");
|
|
126035
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
126036
|
-
throw new TomlError2("unexpected character encountered", {
|
|
126037
|
-
toml: str,
|
|
126038
|
-
ptr: endPtr
|
|
126039
|
-
});
|
|
126040
|
-
}
|
|
126041
|
-
endPtr += +(str[endPtr] === ",");
|
|
126042
|
-
}
|
|
126043
|
-
return [parsed, endPtr];
|
|
125961
|
+
if (c9 === 34 || c9 === 39) {
|
|
125962
|
+
return parseString2(ctx);
|
|
126044
125963
|
}
|
|
126045
|
-
|
|
126046
|
-
|
|
126047
|
-
|
|
126048
|
-
|
|
126049
|
-
|
|
126050
|
-
ptr
|
|
126051
|
-
});
|
|
125964
|
+
if (c9 === 116) {
|
|
125965
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
125966
|
+
throw new TomlError2("invalid value", { toml: ctx.s, ptr });
|
|
125967
|
+
ctx.p++;
|
|
125968
|
+
return true;
|
|
126052
125969
|
}
|
|
126053
|
-
if (
|
|
126054
|
-
|
|
126055
|
-
|
|
125970
|
+
if (c9 === 102) {
|
|
125971
|
+
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)
|
|
125972
|
+
throw new TomlError2("invalid value", { toml: ctx.s, ptr });
|
|
125973
|
+
ctx.p++;
|
|
125974
|
+
return false;
|
|
126056
125975
|
}
|
|
126057
|
-
return
|
|
126058
|
-
parseValue2(slice[0], str, ptr, integersAsBigInt),
|
|
126059
|
-
endPtr
|
|
126060
|
-
];
|
|
125976
|
+
return parseValue2(ctx, integersAsBigInt, end);
|
|
126061
125977
|
}
|
|
126062
|
-
function parseKey2(
|
|
126063
|
-
let
|
|
125978
|
+
function parseKey2(ctx, end = "=") {
|
|
125979
|
+
let start = ctx.p;
|
|
125980
|
+
let dot = start - 1;
|
|
126064
125981
|
let parsed = [];
|
|
126065
|
-
let endPtr =
|
|
125982
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
126066
125983
|
if (endPtr < 0) {
|
|
126067
125984
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
126068
|
-
toml:
|
|
126069
|
-
ptr
|
|
125985
|
+
toml: ctx.s,
|
|
125986
|
+
ptr: start
|
|
126070
125987
|
});
|
|
126071
125988
|
}
|
|
126072
125989
|
do {
|
|
126073
|
-
let c9 =
|
|
126074
|
-
if (c9 !==
|
|
126075
|
-
if (c9 ===
|
|
126076
|
-
if (c9 ===
|
|
125990
|
+
let c9 = ctx.s.charCodeAt(ctx.p = ++dot);
|
|
125991
|
+
if (c9 !== 32 && c9 !== 9) {
|
|
125992
|
+
if (c9 === 34 || c9 === 39) {
|
|
125993
|
+
if (c9 === ctx.s.charCodeAt(ctx.p + 1) && c9 === ctx.s.charCodeAt(ctx.p + 2)) {
|
|
126077
125994
|
throw new TomlError2("multiline strings are not allowed in keys", {
|
|
126078
|
-
toml:
|
|
126079
|
-
ptr
|
|
125995
|
+
toml: ctx.s,
|
|
125996
|
+
ptr: ctx.p
|
|
126080
125997
|
});
|
|
126081
125998
|
}
|
|
126082
|
-
let
|
|
126083
|
-
|
|
126084
|
-
|
|
126085
|
-
toml: str,
|
|
126086
|
-
ptr
|
|
126087
|
-
});
|
|
126088
|
-
}
|
|
126089
|
-
dot = str.indexOf(".", eos);
|
|
126090
|
-
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
125999
|
+
let part = parseString2(ctx);
|
|
126000
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
126001
|
+
let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
126091
126002
|
let newLine = indexOfNewline2(strEnd);
|
|
126092
126003
|
if (newLine > -1) {
|
|
126093
126004
|
throw new TomlError2("newlines are not allowed in keys", {
|
|
126094
|
-
toml:
|
|
126095
|
-
ptr:
|
|
126005
|
+
toml: ctx.s,
|
|
126006
|
+
ptr: newLine
|
|
126096
126007
|
});
|
|
126097
126008
|
}
|
|
126098
126009
|
if (strEnd.trimStart()) {
|
|
126099
126010
|
throw new TomlError2("found extra tokens after the string part", {
|
|
126100
|
-
toml:
|
|
126101
|
-
ptr:
|
|
126011
|
+
toml: ctx.s,
|
|
126012
|
+
ptr: ctx.p
|
|
126102
126013
|
});
|
|
126103
126014
|
}
|
|
126104
|
-
if (endPtr <
|
|
126105
|
-
endPtr =
|
|
126015
|
+
if (endPtr < ctx.p) {
|
|
126016
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
126106
126017
|
if (endPtr < 0) {
|
|
126107
126018
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
126108
|
-
toml:
|
|
126109
|
-
ptr
|
|
126019
|
+
toml: ctx.s,
|
|
126020
|
+
ptr: start
|
|
126110
126021
|
});
|
|
126111
126022
|
}
|
|
126112
126023
|
}
|
|
126113
|
-
parsed.push(
|
|
126024
|
+
parsed.push(part);
|
|
126114
126025
|
} else {
|
|
126115
|
-
dot =
|
|
126116
|
-
let part =
|
|
126026
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
126027
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
126117
126028
|
if (!KEY_PART_RE2.test(part)) {
|
|
126118
126029
|
throw new TomlError2("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
126119
|
-
toml:
|
|
126120
|
-
ptr
|
|
126030
|
+
toml: ctx.s,
|
|
126031
|
+
ptr: ctx.p
|
|
126121
126032
|
});
|
|
126122
126033
|
}
|
|
126123
126034
|
parsed.push(part.trimEnd());
|
|
126124
126035
|
}
|
|
126125
126036
|
}
|
|
126126
126037
|
} while (dot + 1 && dot < endPtr);
|
|
126127
|
-
|
|
126038
|
+
ctx.p = endPtr + 1;
|
|
126039
|
+
skipVoid2(ctx, true, true);
|
|
126040
|
+
return parsed;
|
|
126128
126041
|
}
|
|
126129
|
-
function parseInlineTable2(
|
|
126042
|
+
function parseInlineTable2(ctx, integersAsBigInt) {
|
|
126130
126043
|
let res = {};
|
|
126131
126044
|
let seen = /* @__PURE__ */ new Set();
|
|
126132
126045
|
let c9;
|
|
126133
|
-
|
|
126134
|
-
|
|
126135
|
-
|
|
126136
|
-
|
|
126137
|
-
|
|
126138
|
-
|
|
126139
|
-
}
|
|
126140
|
-
|
|
126141
|
-
|
|
126142
|
-
|
|
126143
|
-
|
|
126144
|
-
|
|
126145
|
-
|
|
126146
|
-
|
|
126147
|
-
|
|
126148
|
-
|
|
126149
|
-
|
|
126150
|
-
t14 = hasOwn2 ? t14[k7] : t14[k7] = {};
|
|
126151
|
-
k7 = key[i8];
|
|
126152
|
-
if ((hasOwn2 = Object.hasOwn(t14, k7)) && (typeof t14[k7] !== "object" || seen.has(t14[k7]))) {
|
|
126153
|
-
throw new TomlError2("trying to redefine an already defined value", {
|
|
126154
|
-
toml: str,
|
|
126155
|
-
ptr
|
|
126156
|
-
});
|
|
126157
|
-
}
|
|
126158
|
-
if (!hasOwn2 && k7 === "__proto__") {
|
|
126159
|
-
Object.defineProperty(t14, k7, { enumerable: true, configurable: true, writable: true });
|
|
126160
|
-
}
|
|
126161
|
-
}
|
|
126162
|
-
if (hasOwn2) {
|
|
126046
|
+
ctx.p++;
|
|
126047
|
+
while (ctx.p < ctx.s.length) {
|
|
126048
|
+
skipVoid2(ctx);
|
|
126049
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p)) === 125) {
|
|
126050
|
+
ctx.p++;
|
|
126051
|
+
return res;
|
|
126052
|
+
}
|
|
126053
|
+
let k7;
|
|
126054
|
+
let t14 = res;
|
|
126055
|
+
let hasOwn2 = false;
|
|
126056
|
+
let p8 = ctx.p;
|
|
126057
|
+
let key = parseKey2(ctx);
|
|
126058
|
+
for (let i8 = 0; i8 < key.length; i8++) {
|
|
126059
|
+
if (i8)
|
|
126060
|
+
t14 = hasOwn2 ? t14[k7] : t14[k7] = {};
|
|
126061
|
+
k7 = key[i8];
|
|
126062
|
+
if ((hasOwn2 = Object.hasOwn(t14, k7)) && (typeof t14[k7] !== "object" || seen.has(t14[k7]))) {
|
|
126163
126063
|
throw new TomlError2("trying to redefine an already defined value", {
|
|
126164
|
-
toml:
|
|
126165
|
-
ptr
|
|
126064
|
+
toml: ctx.s,
|
|
126065
|
+
ptr: p8
|
|
126166
126066
|
});
|
|
126167
126067
|
}
|
|
126168
|
-
|
|
126169
|
-
|
|
126170
|
-
|
|
126171
|
-
|
|
126172
|
-
|
|
126068
|
+
if (!hasOwn2 && k7 === "__proto__") {
|
|
126069
|
+
Object.defineProperty(t14, k7, { enumerable: true, configurable: true, writable: true });
|
|
126070
|
+
}
|
|
126071
|
+
}
|
|
126072
|
+
if (hasOwn2) {
|
|
126073
|
+
throw new TomlError2("trying to redefine an already defined value", {
|
|
126074
|
+
toml: ctx.s,
|
|
126075
|
+
ptr: ctx.p
|
|
126076
|
+
});
|
|
126077
|
+
}
|
|
126078
|
+
let value = extractValue2(ctx, 125, integersAsBigInt);
|
|
126079
|
+
seen.add(t14[k7] = value);
|
|
126080
|
+
skipVoid2(ctx);
|
|
126081
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p++)) === 125) {
|
|
126082
|
+
return res;
|
|
126083
|
+
}
|
|
126084
|
+
if (c9 !== 44) {
|
|
126085
|
+
throw new TomlError2("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
126173
126086
|
}
|
|
126174
126087
|
}
|
|
126175
|
-
|
|
126176
|
-
|
|
126177
|
-
|
|
126178
|
-
|
|
126179
|
-
});
|
|
126180
|
-
}
|
|
126181
|
-
if (!c9) {
|
|
126182
|
-
throw new TomlError2("unfinished table encountered", {
|
|
126183
|
-
toml: str,
|
|
126184
|
-
ptr
|
|
126185
|
-
});
|
|
126186
|
-
}
|
|
126187
|
-
return [res, ptr];
|
|
126088
|
+
throw new TomlError2("unfinished table encountered", {
|
|
126089
|
+
toml: ctx.s,
|
|
126090
|
+
ptr: ctx.p
|
|
126091
|
+
});
|
|
126188
126092
|
}
|
|
126189
|
-
function parseArray2(
|
|
126093
|
+
function parseArray2(ctx, integersAsBigInt) {
|
|
126190
126094
|
let res = [];
|
|
126191
126095
|
let c9;
|
|
126192
|
-
|
|
126193
|
-
while (
|
|
126194
|
-
|
|
126195
|
-
|
|
126196
|
-
|
|
126197
|
-
|
|
126198
|
-
|
|
126199
|
-
|
|
126200
|
-
|
|
126201
|
-
|
|
126202
|
-
|
|
126203
|
-
|
|
126204
|
-
|
|
126096
|
+
ctx.p++;
|
|
126097
|
+
while (ctx.p < ctx.s.length) {
|
|
126098
|
+
skipVoid2(ctx);
|
|
126099
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p)) === 93) {
|
|
126100
|
+
ctx.p++;
|
|
126101
|
+
return res;
|
|
126102
|
+
}
|
|
126103
|
+
res.push(extractValue2(ctx, 93, integersAsBigInt));
|
|
126104
|
+
skipVoid2(ctx);
|
|
126105
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p++)) === 93) {
|
|
126106
|
+
return res;
|
|
126107
|
+
}
|
|
126108
|
+
if (c9 !== 44) {
|
|
126109
|
+
throw new TomlError2("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
126205
126110
|
}
|
|
126206
126111
|
}
|
|
126207
|
-
|
|
126208
|
-
|
|
126209
|
-
|
|
126210
|
-
|
|
126211
|
-
});
|
|
126212
|
-
}
|
|
126213
|
-
return [res, ptr];
|
|
126112
|
+
throw new TomlError2("unfinished array encountered", {
|
|
126113
|
+
toml: ctx.s,
|
|
126114
|
+
ptr: ctx.p
|
|
126115
|
+
});
|
|
126214
126116
|
}
|
|
126215
126117
|
function peekTable2(key, table, meta3, type) {
|
|
126216
126118
|
let t14 = table;
|
|
@@ -126272,25 +126174,29 @@ function peekTable2(key, table, meta3, type) {
|
|
|
126272
126174
|
return [k7, t14, state3.c];
|
|
126273
126175
|
}
|
|
126274
126176
|
function parse6(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
126177
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
126275
126178
|
let res = {};
|
|
126276
126179
|
let meta3 = {};
|
|
126180
|
+
let tmp;
|
|
126277
126181
|
let tbl = res;
|
|
126278
126182
|
let m7 = meta3;
|
|
126279
|
-
|
|
126280
|
-
|
|
126281
|
-
|
|
126282
|
-
let
|
|
126183
|
+
skipVoid2(ctx);
|
|
126184
|
+
while (ctx.p < toml.length) {
|
|
126185
|
+
if (toml.charCodeAt(ctx.p) === 91) {
|
|
126186
|
+
let isTableArray = toml.charCodeAt(++ctx.p) === 91;
|
|
126187
|
+
tmp = ctx.p += +isTableArray;
|
|
126188
|
+
let k7 = parseKey2(ctx, "]");
|
|
126283
126189
|
if (isTableArray) {
|
|
126284
|
-
if (toml
|
|
126190
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
126285
126191
|
throw new TomlError2("expected end of table declaration", {
|
|
126286
126192
|
toml,
|
|
126287
|
-
ptr:
|
|
126193
|
+
ptr: ctx.p - 1
|
|
126288
126194
|
});
|
|
126289
126195
|
}
|
|
126290
|
-
|
|
126196
|
+
ctx.p++;
|
|
126291
126197
|
}
|
|
126292
126198
|
let p8 = peekTable2(
|
|
126293
|
-
k7
|
|
126199
|
+
k7,
|
|
126294
126200
|
res,
|
|
126295
126201
|
meta3,
|
|
126296
126202
|
isTableArray ? 2 : 1
|
|
@@ -126299,16 +126205,16 @@ function parse6(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
126299
126205
|
if (!p8) {
|
|
126300
126206
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
126301
126207
|
toml,
|
|
126302
|
-
ptr
|
|
126208
|
+
ptr: tmp
|
|
126303
126209
|
});
|
|
126304
126210
|
}
|
|
126305
126211
|
m7 = p8[2];
|
|
126306
126212
|
tbl = p8[1];
|
|
126307
|
-
ptr = k7[1];
|
|
126308
126213
|
} else {
|
|
126309
|
-
|
|
126214
|
+
tmp = ctx.p;
|
|
126215
|
+
let k7 = parseKey2(ctx);
|
|
126310
126216
|
let p8 = peekTable2(
|
|
126311
|
-
k7
|
|
126217
|
+
k7,
|
|
126312
126218
|
tbl,
|
|
126313
126219
|
m7,
|
|
126314
126220
|
0
|
|
@@ -126317,21 +126223,19 @@ function parse6(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
126317
126223
|
if (!p8) {
|
|
126318
126224
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
126319
126225
|
toml,
|
|
126320
|
-
ptr
|
|
126226
|
+
ptr: tmp
|
|
126321
126227
|
});
|
|
126322
126228
|
}
|
|
126323
|
-
|
|
126324
|
-
p8[1][p8[0]] = v8[0];
|
|
126325
|
-
ptr = v8[1];
|
|
126229
|
+
p8[1][p8[0]] = extractValue2(ctx, void 0, integersAsBigInt);
|
|
126326
126230
|
}
|
|
126327
|
-
|
|
126328
|
-
if (toml
|
|
126231
|
+
skipVoid2(ctx, true);
|
|
126232
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
126329
126233
|
throw new TomlError2("each key-value declaration must be followed by an end-of-line", {
|
|
126330
126234
|
toml,
|
|
126331
|
-
ptr
|
|
126235
|
+
ptr: ctx.p
|
|
126332
126236
|
});
|
|
126333
126237
|
}
|
|
126334
|
-
|
|
126238
|
+
skipVoid2(ctx);
|
|
126335
126239
|
}
|
|
126336
126240
|
return res;
|
|
126337
126241
|
}
|
|
@@ -126340,8 +126244,12 @@ function extendedTypeOf2(obj) {
|
|
|
126340
126244
|
if (type === "object") {
|
|
126341
126245
|
if (Array.isArray(obj))
|
|
126342
126246
|
return "array";
|
|
126343
|
-
if (obj instanceof Date)
|
|
126247
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
126344
126248
|
return "date";
|
|
126249
|
+
if (globalThis.Temporal && // check for the 'since' property as an early bailout that avoids running all 5 instanceof checks
|
|
126250
|
+
typeof obj?.since === "function" && (obj instanceof Temporal.Instant || obj instanceof Temporal.PlainDate || obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainTime || obj instanceof Temporal.ZonedDateTime)) {
|
|
126251
|
+
return "temporal";
|
|
126252
|
+
}
|
|
126345
126253
|
}
|
|
126346
126254
|
return type;
|
|
126347
126255
|
}
|
|
@@ -126355,38 +126263,42 @@ function isArrayOfTables2(obj) {
|
|
|
126355
126263
|
function formatString2(s8) {
|
|
126356
126264
|
return JSON.stringify(s8).replace(/\x7f/g, "\\u007f");
|
|
126357
126265
|
}
|
|
126266
|
+
function stringifyTemporal2(temporal) {
|
|
126267
|
+
return temporal.toString({
|
|
126268
|
+
calendarName: "never",
|
|
126269
|
+
timeZoneName: "never"
|
|
126270
|
+
});
|
|
126271
|
+
}
|
|
126358
126272
|
function stringifyValue2(val2, type, depth, numberAsFloat) {
|
|
126359
126273
|
if (depth === 0) {
|
|
126360
126274
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
126361
126275
|
}
|
|
126362
|
-
|
|
126363
|
-
|
|
126364
|
-
|
|
126365
|
-
|
|
126366
|
-
|
|
126367
|
-
|
|
126368
|
-
|
|
126369
|
-
|
|
126370
|
-
|
|
126371
|
-
|
|
126372
|
-
|
|
126373
|
-
|
|
126374
|
-
|
|
126375
|
-
|
|
126376
|
-
|
|
126377
|
-
|
|
126378
|
-
|
|
126379
|
-
|
|
126380
|
-
|
|
126381
|
-
|
|
126382
|
-
|
|
126383
|
-
|
|
126384
|
-
|
|
126385
|
-
|
|
126386
|
-
|
|
126387
|
-
|
|
126388
|
-
if (type === "array") {
|
|
126389
|
-
return stringifyArray2(val2, depth, numberAsFloat);
|
|
126276
|
+
switch (type) {
|
|
126277
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
126278
|
+
case "number":
|
|
126279
|
+
if (isNaN(val2))
|
|
126280
|
+
return "nan";
|
|
126281
|
+
if (val2 === Infinity)
|
|
126282
|
+
return "inf";
|
|
126283
|
+
if (val2 === -Infinity)
|
|
126284
|
+
return "-inf";
|
|
126285
|
+
if (Number.isInteger(val2) && (numberAsFloat || !Number.isSafeInteger(val2)))
|
|
126286
|
+
return val2.toFixed(1);
|
|
126287
|
+
case "bigint":
|
|
126288
|
+
case "boolean":
|
|
126289
|
+
return val2.toString();
|
|
126290
|
+
case "string":
|
|
126291
|
+
return formatString2(val2);
|
|
126292
|
+
case "date":
|
|
126293
|
+
if (isNaN(val2.getTime()))
|
|
126294
|
+
throw new TypeError("cannot serialize invalid date");
|
|
126295
|
+
return val2.toISOString();
|
|
126296
|
+
case "object":
|
|
126297
|
+
return stringifyInlineTable2(val2, depth, numberAsFloat);
|
|
126298
|
+
case "array":
|
|
126299
|
+
return stringifyArray2(val2, depth, numberAsFloat);
|
|
126300
|
+
case "temporal":
|
|
126301
|
+
return stringifyTemporal2(val2);
|
|
126390
126302
|
}
|
|
126391
126303
|
}
|
|
126392
126304
|
function stringifyInlineTable2(obj, depth, numberAsFloat) {
|
|
@@ -127019,9 +126931,9 @@ function scrubEncryptedCredentials(options) {
|
|
|
127019
126931
|
}
|
|
127020
126932
|
return { backendAvailable: false, encryptedFileExisted };
|
|
127021
126933
|
}
|
|
127022
|
-
var import_undici3, hasWarnedAboutDeprecatedV1ApiToken, getCloudflareAPITokenFromEnv, getCloudflareGlobalAuthKeyFromEnv, getCloudflareGlobalAuthEmailFromEnv, ACCOUNT_ID_PATTERN, getAuthDomainFromEnv, getAuthUrlFromEnv, getTokenUrlFromEnv, getRevokeUrlFromEnv, readCloudflareAccountIdFromEnv, DEVICE_AUTH_PATH, getAccessClientIdFromEnv, getAccessClientSecretFromEnv, getCfAuthorizationTokenFromEnv, getCloudflareAuthUseKeyringFromEnv, headersCache, usesAccessCache, RECOMMENDED_CODE_VERIFIER_LENGTH, RECOMMENDED_STATE_LENGTH, PKCE_CHARSET, generateVerificationUrl, generateAuthUrl, POW_MAX_ITERATIONS, TEMPORARY_TERMS_URLS, TEMPORARY_TERMS_PROMPT, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_ERROR, esm_default3, ErrorOAuth2, ErrorUnknown, ErrorNoAuthCode, ErrorInvalidReturnedStateParam, ErrorInvalidJson, ErrorInvalidScope, ErrorInvalidRequest, ErrorInvalidToken, ErrorAuthenticationGrant, ErrorUnauthorizedClient, ErrorAccessDenied, ErrorUnsupportedResponseType, ErrorServerError, ErrorTemporarilyUnavailable, ErrorAccessTokenResponse, ErrorInvalidClient, ErrorInvalidGrant, ErrorUnsupportedGrantType, DEVICE_FLOW_MAX_DURATION_SECONDS, DEVICE_FLOW_MIN_POLL_INTERVAL_SECONDS, RESERVED_PROFILE_NAMES,
|
|
127023
|
-
var
|
|
127024
|
-
"../workers-auth/dist/chunk-
|
|
126934
|
+
var import_undici3, hasWarnedAboutDeprecatedV1ApiToken, getCloudflareAPITokenFromEnv, getCloudflareGlobalAuthKeyFromEnv, getCloudflareGlobalAuthEmailFromEnv, ACCOUNT_ID_PATTERN, getAuthDomainFromEnv, getAuthUrlFromEnv, getTokenUrlFromEnv, getRevokeUrlFromEnv, readCloudflareAccountIdFromEnv, DEVICE_AUTH_PATH, getAccessClientIdFromEnv, getAccessClientSecretFromEnv, getCfAuthorizationTokenFromEnv, getCloudflareAuthUseKeyringFromEnv, headersCache, usesAccessCache, RECOMMENDED_CODE_VERIFIER_LENGTH, RECOMMENDED_STATE_LENGTH, PKCE_CHARSET, generateVerificationUrl, generateAuthUrl, POW_MAX_ITERATIONS, TEMPORARY_TERMS_URLS, TEMPORARY_TERMS_PROMPT, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_ERROR, esm_default3, ErrorOAuth2, ErrorUnknown, ErrorNoAuthCode, ErrorInvalidReturnedStateParam, ErrorInvalidJson, ErrorInvalidScope, ErrorInvalidRequest, ErrorInvalidToken, ErrorAuthenticationGrant, ErrorUnauthorizedClient, ErrorAccessDenied, ErrorUnsupportedResponseType, ErrorServerError, ErrorTemporarilyUnavailable, ErrorAccessTokenResponse, ErrorInvalidClient, ErrorInvalidGrant, ErrorUnsupportedGrantType, DEVICE_FLOW_MAX_DURATION_SECONDS, DEVICE_FLOW_MIN_POLL_INTERVAL_SECONDS, RESERVED_PROFILE_NAMES, DATE_TIME_RE2, TomlDate2, TomlError2, INT_REGEX2, FLOAT_REGEX2, LEADING_ZERO2, KEY_PART_RE2, BARE_KEY2, dist_default2, FILE_FORMATS, USER_AUTH_CONFIG_PATH, FileCredentialStore, KEY_LENGTH_BYTES, IV_LENGTH_BYTES, TAG_LENGTH_BYTES, ALGORITHM_LABEL, CIPHER_NAME, EncryptedFileCredentialStore, PINNED_KEYRING_VERSION, npmRunner, cachedBindingPathByDir, entryFactoryOverride, runner, cachedProbeResult, LinuxSecretToolKeyProvider, SECURITY_EXIT_ITEM_NOT_FOUND, runner2, MacSecurityKeyProvider, NapiKeyringKeyProvider, testProviderFactory, sessionFlags;
|
|
126935
|
+
var init_chunk_4CJO23DA = __esm({
|
|
126936
|
+
"../workers-auth/dist/chunk-4CJO23DA.mjs"() {
|
|
127025
126937
|
init_import_meta_url();
|
|
127026
126938
|
init_chunk_O6YSETKJ();
|
|
127027
126939
|
init_src();
|
|
@@ -127420,44 +127332,7 @@ var init_chunk_LQW53VED = __esm({
|
|
|
127420
127332
|
__name2(formatDirectoryForUserError, "formatDirectoryForUserError");
|
|
127421
127333
|
__name(getProfileForDirectoryFromBindings, "getProfileForDirectoryFromBindings");
|
|
127422
127334
|
__name2(getProfileForDirectoryFromBindings, "getProfileForDirectoryFromBindings");
|
|
127423
|
-
|
|
127424
|
-
__name2(getLineColFromPtr2, "getLineColFromPtr");
|
|
127425
|
-
__name(makeCodeBlock2, "makeCodeBlock");
|
|
127426
|
-
__name2(makeCodeBlock2, "makeCodeBlock");
|
|
127427
|
-
TomlError2 = class extends Error {
|
|
127428
|
-
static {
|
|
127429
|
-
__name(this, "TomlError");
|
|
127430
|
-
}
|
|
127431
|
-
static {
|
|
127432
|
-
__name2(this, "TomlError");
|
|
127433
|
-
}
|
|
127434
|
-
line;
|
|
127435
|
-
column;
|
|
127436
|
-
codeblock;
|
|
127437
|
-
constructor(message, options) {
|
|
127438
|
-
const [line, column] = getLineColFromPtr2(options.toml, options.ptr);
|
|
127439
|
-
const codeblock = makeCodeBlock2(options.toml, line, column);
|
|
127440
|
-
super(`Invalid TOML document: ${message}
|
|
127441
|
-
|
|
127442
|
-
${codeblock}`, options);
|
|
127443
|
-
this.line = line;
|
|
127444
|
-
this.column = column;
|
|
127445
|
-
this.codeblock = codeblock;
|
|
127446
|
-
}
|
|
127447
|
-
};
|
|
127448
|
-
__name(isEscaped2, "isEscaped");
|
|
127449
|
-
__name2(isEscaped2, "isEscaped");
|
|
127450
|
-
__name(indexOfNewline2, "indexOfNewline");
|
|
127451
|
-
__name2(indexOfNewline2, "indexOfNewline");
|
|
127452
|
-
__name(skipComment2, "skipComment");
|
|
127453
|
-
__name2(skipComment2, "skipComment");
|
|
127454
|
-
__name(skipVoid2, "skipVoid");
|
|
127455
|
-
__name2(skipVoid2, "skipVoid");
|
|
127456
|
-
__name(skipUntil2, "skipUntil");
|
|
127457
|
-
__name2(skipUntil2, "skipUntil");
|
|
127458
|
-
__name(getStringEnd2, "getStringEnd");
|
|
127459
|
-
__name2(getStringEnd2, "getStringEnd");
|
|
127460
|
-
DATE_TIME_RE2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
127335
|
+
DATE_TIME_RE2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
127461
127336
|
TomlDate2 = class _TomlDate extends Date {
|
|
127462
127337
|
static {
|
|
127463
127338
|
__name(this, "_TomlDate");
|
|
@@ -127553,25 +127428,48 @@ ${codeblock}`, options);
|
|
|
127553
127428
|
return date5;
|
|
127554
127429
|
}
|
|
127555
127430
|
};
|
|
127431
|
+
__name(getLineColFromPtr2, "getLineColFromPtr");
|
|
127432
|
+
__name2(getLineColFromPtr2, "getLineColFromPtr");
|
|
127433
|
+
__name(makeCodeBlock2, "makeCodeBlock");
|
|
127434
|
+
__name2(makeCodeBlock2, "makeCodeBlock");
|
|
127435
|
+
TomlError2 = class extends Error {
|
|
127436
|
+
static {
|
|
127437
|
+
__name(this, "TomlError");
|
|
127438
|
+
}
|
|
127439
|
+
static {
|
|
127440
|
+
__name2(this, "TomlError");
|
|
127441
|
+
}
|
|
127442
|
+
line;
|
|
127443
|
+
column;
|
|
127444
|
+
codeblock;
|
|
127445
|
+
constructor(message, options) {
|
|
127446
|
+
const [line, column] = getLineColFromPtr2(options.toml, options.ptr);
|
|
127447
|
+
const codeblock = makeCodeBlock2(options.toml, line, column);
|
|
127448
|
+
super(`Invalid TOML document: ${message}
|
|
127449
|
+
|
|
127450
|
+
${codeblock}`, options);
|
|
127451
|
+
this.line = line;
|
|
127452
|
+
this.column = column;
|
|
127453
|
+
this.codeblock = codeblock;
|
|
127454
|
+
}
|
|
127455
|
+
};
|
|
127456
|
+
__name(indexOfNewline2, "indexOfNewline");
|
|
127457
|
+
__name2(indexOfNewline2, "indexOfNewline");
|
|
127458
|
+
__name(skipComment2, "skipComment");
|
|
127459
|
+
__name2(skipComment2, "skipComment");
|
|
127460
|
+
__name(skipVoid2, "skipVoid");
|
|
127461
|
+
__name2(skipVoid2, "skipVoid");
|
|
127462
|
+
__name(skipUntil2, "skipUntil");
|
|
127463
|
+
__name2(skipUntil2, "skipUntil");
|
|
127556
127464
|
INT_REGEX2 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
127557
127465
|
FLOAT_REGEX2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
127558
127466
|
LEADING_ZERO2 = /^[+-]?0[0-9_]/;
|
|
127559
|
-
ESCAPE_REGEX2 = /^[0-9a-f]{4,8}$/i;
|
|
127560
|
-
ESC_MAP2 = {
|
|
127561
|
-
b: "\b",
|
|
127562
|
-
t: " ",
|
|
127563
|
-
n: "\n",
|
|
127564
|
-
f: "\f",
|
|
127565
|
-
r: "\r",
|
|
127566
|
-
'"': '"',
|
|
127567
|
-
"\\": "\\"
|
|
127568
|
-
};
|
|
127569
127467
|
__name(parseString2, "parseString");
|
|
127570
127468
|
__name2(parseString2, "parseString");
|
|
127571
|
-
__name(parseValue2, "parseValue");
|
|
127572
|
-
__name2(parseValue2, "parseValue");
|
|
127573
127469
|
__name(sliceAndTrimEndOf2, "sliceAndTrimEndOf");
|
|
127574
127470
|
__name2(sliceAndTrimEndOf2, "sliceAndTrimEndOf");
|
|
127471
|
+
__name(parseValue2, "parseValue");
|
|
127472
|
+
__name2(parseValue2, "parseValue");
|
|
127575
127473
|
__name(extractValue2, "extractValue");
|
|
127576
127474
|
__name2(extractValue2, "extractValue");
|
|
127577
127475
|
KEY_PART_RE2 = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
@@ -127592,6 +127490,8 @@ ${codeblock}`, options);
|
|
|
127592
127490
|
__name2(isArrayOfTables2, "isArrayOfTables");
|
|
127593
127491
|
__name(formatString2, "formatString");
|
|
127594
127492
|
__name2(formatString2, "formatString");
|
|
127493
|
+
__name(stringifyTemporal2, "stringifyTemporal");
|
|
127494
|
+
__name2(stringifyTemporal2, "stringifyTemporal");
|
|
127595
127495
|
__name(stringifyValue2, "stringifyValue");
|
|
127596
127496
|
__name2(stringifyValue2, "stringifyValue");
|
|
127597
127497
|
__name(stringifyInlineTable2, "stringifyInlineTable");
|
|
@@ -128106,7 +128006,7 @@ ${codeblock}`, options);
|
|
|
128106
128006
|
var init_dist2 = __esm({
|
|
128107
128007
|
"../workers-auth/dist/index.mjs"() {
|
|
128108
128008
|
init_import_meta_url();
|
|
128109
|
-
|
|
128009
|
+
init_chunk_4CJO23DA();
|
|
128110
128010
|
}
|
|
128111
128011
|
});
|
|
128112
128012
|
function createPreferences(getConfigPath2) {
|
|
@@ -129014,10 +128914,10 @@ function createAuthConfigFileHelpers(deps) {
|
|
|
129014
128914
|
};
|
|
129015
128915
|
}
|
|
129016
128916
|
var millisecondsInMinute, minutesInYear, minutesInMonth, minutesInDay, constructFromSymbol, defaultOptions2, formatDistanceLocale, formatDistance, dateFormats, timeFormats, dateTimeFormats, formatLong, formatRelativeLocale, formatRelative, eraValues, quarterValues, monthValues, dayValues, dayPeriodValues, formattingDayPeriodValues, ordinalNumber, localize, matchOrdinalNumberPattern, parseOrdinalNumberPattern, matchEraPatterns, parseEraPatterns, matchQuarterPatterns, parseQuarterPatterns, matchMonthPatterns, parseMonthPatterns, matchDayPatterns, parseDayPatterns, matchDayPeriodPatterns, parseDayPeriodPatterns, match, enUS, MEMBERSHIPS_INACCESSIBLE_CODES, DIRECTORY_BINDINGS_FILE, ENCRYPTED_PROFILE_CONFIG_EXTENSION;
|
|
129017
|
-
var
|
|
129018
|
-
"../workers-auth/dist/chunk-
|
|
128917
|
+
var init_chunk_A6F4WXCF = __esm({
|
|
128918
|
+
"../workers-auth/dist/chunk-A6F4WXCF.mjs"() {
|
|
129019
128919
|
init_import_meta_url();
|
|
129020
|
-
|
|
128920
|
+
init_chunk_4CJO23DA();
|
|
129021
128921
|
init_chunk_O6YSETKJ();
|
|
129022
128922
|
init_src();
|
|
129023
128923
|
__name(createPreferences, "createPreferences");
|
|
@@ -129531,7 +129431,7 @@ var DefaultScopes, DefaultScopeKeys, WRANGLER_KEYRING_SERVICE_NAME, WRANGLER_CLI
|
|
|
129531
129431
|
var init_wrangler = __esm({
|
|
129532
129432
|
"../workers-auth/dist/wrangler/index.mjs"() {
|
|
129533
129433
|
init_import_meta_url();
|
|
129534
|
-
|
|
129434
|
+
init_chunk_A6F4WXCF();
|
|
129535
129435
|
init_chunk_O6YSETKJ();
|
|
129536
129436
|
init_src();
|
|
129537
129437
|
DefaultScopes = {
|
|
@@ -177311,6 +177211,44 @@ function formatPreviewDeploymentSummary(config2, previewResource, deployment, is
|
|
|
177311
177211
|
...hasActiveUrls ? [] : [formatNoActivePreviewUrlsMessage(config2)]
|
|
177312
177212
|
].join("\n");
|
|
177313
177213
|
}
|
|
177214
|
+
function getPreviewCustomDomainHostnames(config2) {
|
|
177215
|
+
const routes = config2.routes ?? (config2.route ? [config2.route] : []);
|
|
177216
|
+
return routes.filter(
|
|
177217
|
+
(route) => isCustomDomainRoute(route) && route.previews_enabled === true
|
|
177218
|
+
).map((route) => normalizeHostname(route.pattern));
|
|
177219
|
+
}
|
|
177220
|
+
function normalizeHostname(hostname4) {
|
|
177221
|
+
try {
|
|
177222
|
+
return new URL(`https://${hostname4}`).hostname.replace(/\.$/, "");
|
|
177223
|
+
} catch {
|
|
177224
|
+
return hostname4.toLowerCase().replace(/\.$/, "");
|
|
177225
|
+
}
|
|
177226
|
+
}
|
|
177227
|
+
function hostnameMatchesCustomDomain(hostname4, customDomain) {
|
|
177228
|
+
const normalizedHostname = normalizeHostname(hostname4);
|
|
177229
|
+
return normalizedHostname === customDomain || normalizedHostname.endsWith(`.${customDomain}`);
|
|
177230
|
+
}
|
|
177231
|
+
function previewUrlMatchesCustomDomain(url4, customDomains) {
|
|
177232
|
+
try {
|
|
177233
|
+
const { hostname: hostname4 } = new URL(url4);
|
|
177234
|
+
return customDomains.some(
|
|
177235
|
+
(domain3) => hostnameMatchesCustomDomain(hostname4, domain3)
|
|
177236
|
+
);
|
|
177237
|
+
} catch {
|
|
177238
|
+
return false;
|
|
177239
|
+
}
|
|
177240
|
+
}
|
|
177241
|
+
function logMissingCustomDomainPreviewUrlsWarning(config2, previewResource, deployment) {
|
|
177242
|
+
const customDomains = getPreviewCustomDomainHostnames(config2);
|
|
177243
|
+
const urls = [...previewResource.urls ?? [], ...deployment.urls ?? []];
|
|
177244
|
+
if (customDomains.length === 0 || urls.length === 0 || urls.some((url4) => previewUrlMatchesCustomDomain(url4, customDomains))) {
|
|
177245
|
+
return;
|
|
177246
|
+
}
|
|
177247
|
+
logger.log("");
|
|
177248
|
+
logger.warn(
|
|
177249
|
+
"Custom domain Preview URLs are configured, but none are active for this Preview. If you added `previews_enabled = true` after your last deployment, run `wrangler deploy` once to publish the custom domain Preview route, then run `wrangler preview` again. If you already deployed with that setting, the custom domain may still be provisioning."
|
|
177250
|
+
);
|
|
177251
|
+
}
|
|
177314
177252
|
function logMissingPreviewsBindingsWarning(productionBindingsExpectedInPreview, remotePreviewDefaultBindings, localPreviewBindings) {
|
|
177315
177253
|
const availableBindingNames = /* @__PURE__ */ new Set([
|
|
177316
177254
|
...Object.keys(remotePreviewDefaultBindings ?? {}),
|
|
@@ -177517,6 +177455,11 @@ async function runPreview(accountId, args, config2, buildResult, assetsOptions,
|
|
|
177517
177455
|
pullRequest
|
|
177518
177456
|
)
|
|
177519
177457
|
);
|
|
177458
|
+
logMissingCustomDomainPreviewUrlsWarning(
|
|
177459
|
+
config2,
|
|
177460
|
+
previewResource,
|
|
177461
|
+
deployment
|
|
177462
|
+
);
|
|
177520
177463
|
}
|
|
177521
177464
|
return { preview: previewResource, deployment, isNewPreview };
|
|
177522
177465
|
}
|
|
@@ -177587,6 +177530,11 @@ var init_preview2 = __esm({
|
|
|
177587
177530
|
__name(assemblePreviewDeploymentSettings, "assemblePreviewDeploymentSettings");
|
|
177588
177531
|
__name(formatUrlLines, "formatUrlLines");
|
|
177589
177532
|
__name(formatPreviewDeploymentSummary, "formatPreviewDeploymentSummary");
|
|
177533
|
+
__name(getPreviewCustomDomainHostnames, "getPreviewCustomDomainHostnames");
|
|
177534
|
+
__name(normalizeHostname, "normalizeHostname");
|
|
177535
|
+
__name(hostnameMatchesCustomDomain, "hostnameMatchesCustomDomain");
|
|
177536
|
+
__name(previewUrlMatchesCustomDomain, "previewUrlMatchesCustomDomain");
|
|
177537
|
+
__name(logMissingCustomDomainPreviewUrlsWarning, "logMissingCustomDomainPreviewUrlsWarning");
|
|
177590
177538
|
__name(logMissingPreviewsBindingsWarning, "logMissingPreviewsBindingsWarning");
|
|
177591
177539
|
__name(provisionParentWorker, "provisionParentWorker");
|
|
177592
177540
|
__name(runPreview, "runPreview");
|
|
@@ -178935,11 +178883,11 @@ function createCfProfileStore(ctx) {
|
|
|
178935
178883
|
function setKeyringPreference2(enabled, ctx) {
|
|
178936
178884
|
return cfKeyringPreference.setKeyringPreference(enabled, ctx);
|
|
178937
178885
|
}
|
|
178938
|
-
var CF_KEYRING_SERVICE_NAME, CF_CLI_NAME, CF_DISPLAY_NAME, CF_OAUTH_CALLBACK_URL, CF_CONSENT_PAGES, getClientIdFromEnv2,
|
|
178886
|
+
var CF_KEYRING_SERVICE_NAME, CF_CLI_NAME, CF_DISPLAY_NAME, CF_OAUTH_CALLBACK_URL, CF_CONSENT_PAGES, getClientIdFromEnv2, CF_CLIENT_REGISTERED_SCOPES, CF_REGISTERED_BUT_UNGRANTABLE_SCOPES, CF_UNGRANTABLE_SCOPE_SET, CF_REQUESTABLE_SCOPES, DefaultScopeKeys2, CF_SCOPE_SET, getAuthConfigFilePath3, getEncryptedAuthConfigFilePath3, defaultAuthConfigStorage2, readAuthConfigFile2, writeAuthConfigFile2, CF_CLI, cfPreferences, readUserPreferences2, updateUserPreferences2, cfKeyringPreference;
|
|
178939
178887
|
var init_cf = __esm({
|
|
178940
178888
|
"../workers-auth/dist/cf/index.mjs"() {
|
|
178941
178889
|
init_import_meta_url();
|
|
178942
|
-
|
|
178890
|
+
init_chunk_A6F4WXCF();
|
|
178943
178891
|
init_chunk_O6YSETKJ();
|
|
178944
178892
|
init_src();
|
|
178945
178893
|
CF_KEYRING_SERVICE_NAME = "cloudflare";
|
|
@@ -178961,7 +178909,7 @@ var init_cf = __esm({
|
|
|
178961
178909
|
});
|
|
178962
178910
|
__name(getCfConfigPath, "getCfConfigPath");
|
|
178963
178911
|
__name2(getCfConfigPath, "getCfConfigPath");
|
|
178964
|
-
|
|
178912
|
+
CF_CLIENT_REGISTERED_SCOPES = [
|
|
178965
178913
|
"access:read",
|
|
178966
178914
|
"access:write",
|
|
178967
178915
|
"account:read",
|
|
@@ -179437,101 +179385,24 @@ var init_cf = __esm({
|
|
|
179437
179385
|
"zone.read",
|
|
179438
179386
|
"zone.write"
|
|
179439
179387
|
];
|
|
179440
|
-
|
|
179441
|
-
"
|
|
179442
|
-
"
|
|
179443
|
-
"
|
|
179444
|
-
"
|
|
179445
|
-
"
|
|
179446
|
-
"
|
|
179447
|
-
"agw:read",
|
|
179448
|
-
"agw:run",
|
|
179449
|
-
"agw:write",
|
|
179450
|
-
"ai:read",
|
|
179451
|
-
"ai:write",
|
|
179452
|
-
"ai-search:read",
|
|
179453
|
-
"ai-search:run",
|
|
179454
|
-
"ai-search:write",
|
|
179455
|
-
"aiaudit:read",
|
|
179456
|
-
"aiaudit:write",
|
|
179457
|
-
"aig:read",
|
|
179458
|
-
"aig:write",
|
|
179459
|
-
"auditlogs:read",
|
|
179460
|
-
"browser:read",
|
|
179461
|
-
"browser:write",
|
|
179462
|
-
"cfone:read",
|
|
179463
|
-
"cfone:write",
|
|
179464
|
-
"cloudchamber:write",
|
|
179465
|
-
"connectivity:admin",
|
|
179466
|
-
"connectivity:bind",
|
|
179467
|
-
"connectivity:read",
|
|
179468
|
-
"constellation:write",
|
|
179469
|
-
"containers:write",
|
|
179470
|
-
"d1:write",
|
|
179471
|
-
"dex:read",
|
|
179472
|
-
"dex:write",
|
|
179473
|
-
"dns_analytics:read",
|
|
179474
|
-
"dns_records:edit",
|
|
179475
|
-
"dns_records:read",
|
|
179476
|
-
"dns_settings:read",
|
|
179477
|
-
"email_routing:write",
|
|
179478
|
-
"email_sending:write",
|
|
179479
|
-
"firstpartytags:write",
|
|
179480
|
-
"images:read",
|
|
179481
|
-
"images:write",
|
|
179482
|
-
"lb:edit",
|
|
179483
|
-
"lb:read",
|
|
179484
|
-
"logpush:read",
|
|
179485
|
-
"logpush:write",
|
|
179486
|
-
"mcp_portals:read",
|
|
179487
|
-
"mcp_portals:write",
|
|
179488
|
-
"notebook-examples:read",
|
|
179489
|
-
"notification:read",
|
|
179490
|
-
"notification:write",
|
|
179491
|
-
"pages:read",
|
|
179492
|
-
"pages:write",
|
|
179493
|
-
"pipelines:read",
|
|
179494
|
-
"pipelines:setup",
|
|
179495
|
-
"pipelines:write",
|
|
179496
|
-
"query_cache:write",
|
|
179497
|
-
"queues:write",
|
|
179498
|
-
"r2_catalog:write",
|
|
179499
|
-
"radar:read",
|
|
179500
|
-
"rag:read",
|
|
179501
|
-
"rag:write",
|
|
179502
|
-
"registrar:read",
|
|
179503
|
-
"registrar:write",
|
|
179504
|
-
"secrets_store:read",
|
|
179505
|
-
"secrets_store:write",
|
|
179506
|
-
"sso-connector:read",
|
|
179507
|
-
"sso-connector:write",
|
|
179508
|
-
"ssl_certs:write",
|
|
179509
|
-
"tag.write",
|
|
179510
|
-
"teams:pii",
|
|
179511
|
-
"teams:read",
|
|
179512
|
-
"teams:secure_location",
|
|
179513
|
-
"teams:write",
|
|
179514
|
-
"url_scanner:read",
|
|
179515
|
-
"url_scanner:write",
|
|
179516
|
-
"vectorize:write",
|
|
179517
|
-
"workers:read",
|
|
179518
|
-
"workers:write",
|
|
179519
|
-
"workers_builds:read",
|
|
179520
|
-
"workers_builds:write",
|
|
179521
|
-
"workers_deployments:read",
|
|
179522
|
-
"workers_kv:write",
|
|
179523
|
-
"workers_observability:read",
|
|
179524
|
-
"workers_observability:write",
|
|
179525
|
-
"workers_observability_telemetry:write",
|
|
179526
|
-
"workers_routes:write",
|
|
179527
|
-
"workers_scripts:write",
|
|
179528
|
-
"workers_tail:read",
|
|
179529
|
-
"zone:read"
|
|
179388
|
+
CF_REGISTERED_BUT_UNGRANTABLE_SCOPES = [
|
|
179389
|
+
"billing:read",
|
|
179390
|
+
"billing:write",
|
|
179391
|
+
"email_routing:read",
|
|
179392
|
+
"email_sending:read",
|
|
179393
|
+
"notebook-managed:read",
|
|
179394
|
+
"oauth_account_ssl_and_certificates_write"
|
|
179530
179395
|
];
|
|
179531
|
-
|
|
179396
|
+
CF_UNGRANTABLE_SCOPE_SET = new Set(
|
|
179397
|
+
CF_REGISTERED_BUT_UNGRANTABLE_SCOPES
|
|
179398
|
+
);
|
|
179399
|
+
CF_REQUESTABLE_SCOPES = CF_CLIENT_REGISTERED_SCOPES.filter(
|
|
179400
|
+
(scope) => !CF_UNGRANTABLE_SCOPE_SET.has(scope)
|
|
179401
|
+
);
|
|
179402
|
+
DefaultScopeKeys2 = [...CF_REQUESTABLE_SCOPES];
|
|
179532
179403
|
__name(setLoginScopeKeys2, "setLoginScopeKeys");
|
|
179533
179404
|
__name2(setLoginScopeKeys2, "setLoginScopeKeys");
|
|
179534
|
-
CF_SCOPE_SET = new Set(
|
|
179405
|
+
CF_SCOPE_SET = new Set(CF_REQUESTABLE_SCOPES);
|
|
179535
179406
|
__name(validateScopeKeys2, "validateScopeKeys");
|
|
179536
179407
|
__name2(validateScopeKeys2, "validateScopeKeys");
|
|
179537
179408
|
__name(getTemporaryAccountConfigFile2, "getTemporaryAccountConfigFile");
|
|
@@ -180021,7 +179892,7 @@ var init_dist14 = __esm({
|
|
|
180021
179892
|
init_wrapper();
|
|
180022
179893
|
init_create_worker_upload_form();
|
|
180023
179894
|
import_undici13 = __toESM(require_undici(), 1);
|
|
180024
|
-
version3 = "0.0.
|
|
179895
|
+
version3 = "0.0.31";
|
|
180025
179896
|
NoDefaultValueProvided2 = class extends UserError {
|
|
180026
179897
|
static {
|
|
180027
179898
|
__name(this, "NoDefaultValueProvided");
|
|
@@ -341395,7 +341266,7 @@ var init_preview3 = __esm({
|
|
|
341395
341266
|
writeOutput({
|
|
341396
341267
|
type: "preview",
|
|
341397
341268
|
version: 1,
|
|
341398
|
-
worker_name:
|
|
341269
|
+
worker_name: resolveWorkerName(args, previewConfig),
|
|
341399
341270
|
preview_id: previewResource.id,
|
|
341400
341271
|
preview_name: previewResource.name,
|
|
341401
341272
|
preview_slug: previewResource.slug,
|
|
@@ -369983,7 +369854,7 @@ var unstable_generateASSETSBinding = (
|
|
|
369983
369854
|
);
|
|
369984
369855
|
/*! Bundled license information:
|
|
369985
369856
|
|
|
369986
|
-
smol-toml/dist/
|
|
369857
|
+
smol-toml/dist/date.js:
|
|
369987
369858
|
(*!
|
|
369988
369859
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
369989
369860
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370012,7 +369883,7 @@ smol-toml/dist/error.js:
|
|
|
370012
369883
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370013
369884
|
*)
|
|
370014
369885
|
|
|
370015
|
-
smol-toml/dist/
|
|
369886
|
+
smol-toml/dist/error.js:
|
|
370016
369887
|
(*!
|
|
370017
369888
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370018
369889
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370041,7 +369912,7 @@ smol-toml/dist/util.js:
|
|
|
370041
369912
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370042
369913
|
*)
|
|
370043
369914
|
|
|
370044
|
-
smol-toml/dist/
|
|
369915
|
+
smol-toml/dist/util.js:
|
|
370045
369916
|
(*!
|
|
370046
369917
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370047
369918
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370267,7 +370138,7 @@ smol-toml/dist/index.js:
|
|
|
370267
370138
|
*/
|
|
370268
370139
|
/*! Bundled license information:
|
|
370269
370140
|
|
|
370270
|
-
smol-toml/dist/
|
|
370141
|
+
smol-toml/dist/date.js:
|
|
370271
370142
|
(*!
|
|
370272
370143
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370273
370144
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370296,7 +370167,7 @@ smol-toml/dist/error.js:
|
|
|
370296
370167
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370297
370168
|
*)
|
|
370298
370169
|
|
|
370299
|
-
smol-toml/dist/
|
|
370170
|
+
smol-toml/dist/error.js:
|
|
370300
370171
|
(*!
|
|
370301
370172
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370302
370173
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370325,7 +370196,7 @@ smol-toml/dist/util.js:
|
|
|
370325
370196
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370326
370197
|
*)
|
|
370327
370198
|
|
|
370328
|
-
smol-toml/dist/
|
|
370199
|
+
smol-toml/dist/util.js:
|
|
370329
370200
|
(*!
|
|
370330
370201
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370331
370202
|
* SPDX-License-Identifier: BSD-3-Clause
|