wrangler 4.136.2 → 4.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/wrangler-dist/cli.js +1105 -1154
- package/wrangler-dist/experimental-config.d.mts +12 -14
- package/wrangler-dist/experimental-config.d.mts.map +1 -1
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];
|
|
1003
|
+
if (c9 === 34 || c9 === 39) {
|
|
1004
|
+
return parseString(ctx);
|
|
1031
1005
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
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];
|
|
1047
|
-
}
|
|
1048
|
-
endPtr = skipUntil(str, ptr, ",", end);
|
|
1049
|
-
let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","), end === "]");
|
|
1050
|
-
if (!slice[0]) {
|
|
1051
|
-
throw new TomlError("incomplete key-value declaration: no value specified", {
|
|
1052
|
-
toml: str,
|
|
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
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
let eos = getStringEnd(str, ptr);
|
|
1099
|
-
if (eos < 0) {
|
|
1100
|
-
throw new TomlError("unfinished string encountered", {
|
|
1101
|
-
toml: str,
|
|
1102
|
-
ptr
|
|
1048
|
+
toml: ctx.s,
|
|
1049
|
+
ptr: ctx.p
|
|
1103
1050
|
});
|
|
1104
1051
|
}
|
|
1105
|
-
|
|
1106
|
-
|
|
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();
|
|
@@ -43834,7 +43784,7 @@ var require_snapshot_utils = __commonJS({
|
|
|
43834
43784
|
var require_snapshot_recorder = __commonJS({
|
|
43835
43785
|
"../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports$1, module2) {
|
|
43836
43786
|
init_import_meta_url();
|
|
43837
|
-
var { writeFile: writeFile18, readFile: readFile24, mkdir:
|
|
43787
|
+
var { writeFile: writeFile18, readFile: readFile24, mkdir: mkdir10 } = __require("fs/promises");
|
|
43838
43788
|
var { dirname: dirname28, resolve: resolve35 } = __require("path");
|
|
43839
43789
|
var { setTimeout: setTimeout9, clearTimeout: clearTimeout2 } = __require("timers");
|
|
43840
43790
|
var { InvalidArgumentError, UndiciError } = require_errors();
|
|
@@ -44073,7 +44023,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
44073
44023
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
44074
44024
|
}
|
|
44075
44025
|
const resolvedPath2 = resolve35(path107);
|
|
44076
|
-
await
|
|
44026
|
+
await mkdir10(dirname28(resolvedPath2), { recursive: true });
|
|
44077
44027
|
const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot]) => ({
|
|
44078
44028
|
hash: hash2,
|
|
44079
44029
|
snapshot
|
|
@@ -58285,7 +58235,7 @@ var require_update_check = __commonJS({
|
|
|
58285
58235
|
var { tmpdir: tmpdir2 } = __require("os");
|
|
58286
58236
|
var registryUrl = require_registry_url();
|
|
58287
58237
|
var writeFile18 = promisify9(fs38.writeFile);
|
|
58288
|
-
var
|
|
58238
|
+
var mkdir10 = promisify9(fs38.mkdir);
|
|
58289
58239
|
var readFile24 = promisify9(fs38.readFile);
|
|
58290
58240
|
var compareVersions = /* @__PURE__ */ __name((a8, b11) => a8.localeCompare(b11, "en-US", { numeric: true }), "compareVersions");
|
|
58291
58241
|
var encode5 = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
|
|
@@ -58293,7 +58243,7 @@ var require_update_check = __commonJS({
|
|
|
58293
58243
|
const rootDir2 = tmpdir2();
|
|
58294
58244
|
const subDir = join48(rootDir2, "update-check");
|
|
58295
58245
|
if (!fs38.existsSync(subDir)) {
|
|
58296
|
-
await
|
|
58246
|
+
await mkdir10(subDir);
|
|
58297
58247
|
}
|
|
58298
58248
|
let name2 = `${details.name}-${distTag}.json`;
|
|
58299
58249
|
if (details.scope) {
|
|
@@ -62207,7 +62157,6 @@ var init_esm2 = __esm({
|
|
|
62207
62157
|
// ../deploy-helpers/src/shared/context.ts
|
|
62208
62158
|
function initDeployHelpersContext(ctx) {
|
|
62209
62159
|
logger = ctx.logger;
|
|
62210
|
-
createCloudflareClient = ctx.createCloudflareClient;
|
|
62211
62160
|
fetchResult = ctx.fetchResult;
|
|
62212
62161
|
fetchListResult = ctx.fetchListResult;
|
|
62213
62162
|
fetchPagedListResult = ctx.fetchPagedListResult;
|
|
@@ -62216,7 +62165,7 @@ function initDeployHelpersContext(ctx) {
|
|
|
62216
62165
|
prompt = ctx.prompt;
|
|
62217
62166
|
select = ctx.select;
|
|
62218
62167
|
}
|
|
62219
|
-
var logger,
|
|
62168
|
+
var logger, fetchResult, fetchListResult, fetchPagedListResult, confirm, prompt, select;
|
|
62220
62169
|
var init_context = __esm({
|
|
62221
62170
|
"../deploy-helpers/src/shared/context.ts"() {
|
|
62222
62171
|
init_import_meta_url();
|
|
@@ -62229,7 +62178,7 @@ var name, version2;
|
|
|
62229
62178
|
var init_package = __esm({
|
|
62230
62179
|
"package.json"() {
|
|
62231
62180
|
name = "wrangler";
|
|
62232
|
-
version2 = "4.
|
|
62181
|
+
version2 = "4.137.0";
|
|
62233
62182
|
}
|
|
62234
62183
|
});
|
|
62235
62184
|
|
|
@@ -125790,156 +125739,178 @@ function makeCodeBlock2(string4, line, column) {
|
|
|
125790
125739
|
}
|
|
125791
125740
|
return codeblock;
|
|
125792
125741
|
}
|
|
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) {
|
|
125742
|
+
function indexOfNewline2(str, start = 0) {
|
|
125800
125743
|
let idx = str.indexOf("\n", start);
|
|
125801
|
-
if (str
|
|
125744
|
+
if (str.charCodeAt(idx - 1) === 13)
|
|
125802
125745
|
idx--;
|
|
125803
|
-
return idx
|
|
125746
|
+
return idx;
|
|
125804
125747
|
}
|
|
125805
|
-
function skipComment2(
|
|
125806
|
-
for (
|
|
125807
|
-
let c9 =
|
|
125808
|
-
if (c9 ===
|
|
125809
|
-
|
|
125810
|
-
if (c9 ===
|
|
125811
|
-
|
|
125812
|
-
|
|
125748
|
+
function skipComment2(ctx) {
|
|
125749
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
125750
|
+
let c9 = ctx.s.charCodeAt(ctx.p);
|
|
125751
|
+
if (c9 === 10)
|
|
125752
|
+
break;
|
|
125753
|
+
if (c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
|
|
125754
|
+
ctx.p++;
|
|
125755
|
+
break;
|
|
125756
|
+
}
|
|
125757
|
+
if (c9 < 32 && c9 !== 9 || c9 === 127) {
|
|
125813
125758
|
throw new TomlError2("control characters are not allowed in comments", {
|
|
125814
|
-
toml:
|
|
125815
|
-
ptr
|
|
125759
|
+
toml: ctx.s,
|
|
125760
|
+
ptr: ctx.p
|
|
125816
125761
|
});
|
|
125817
125762
|
}
|
|
125818
125763
|
}
|
|
125819
|
-
return str.length;
|
|
125820
125764
|
}
|
|
125821
|
-
function skipVoid2(
|
|
125765
|
+
function skipVoid2(ctx, banNewLines, banComments) {
|
|
125822
125766
|
let c9;
|
|
125823
|
-
while (
|
|
125824
|
-
|
|
125825
|
-
|
|
125767
|
+
while (1) {
|
|
125768
|
+
while ((c9 = ctx.s.charCodeAt(ctx.p)) === 32 || c9 === 9 || !banNewLines && (c9 === 10 || c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
|
|
125769
|
+
ctx.p++;
|
|
125770
|
+
if (banComments || c9 !== 35)
|
|
125771
|
+
break;
|
|
125772
|
+
skipComment2(ctx);
|
|
125773
|
+
}
|
|
125826
125774
|
}
|
|
125827
|
-
function skipUntil2(
|
|
125775
|
+
function skipUntil2(ctx, sep8, end) {
|
|
125776
|
+
let ptr = ctx.p;
|
|
125828
125777
|
if (!end) {
|
|
125829
|
-
ptr = indexOfNewline2(
|
|
125830
|
-
|
|
125831
|
-
|
|
125832
|
-
|
|
125833
|
-
|
|
125834
|
-
|
|
125835
|
-
|
|
125836
|
-
|
|
125837
|
-
|
|
125838
|
-
|
|
125839
|
-
return i8;
|
|
125778
|
+
ptr = indexOfNewline2(ctx.s, ptr);
|
|
125779
|
+
ctx.p = ptr < 0 ? ctx.s.length : ptr;
|
|
125780
|
+
return;
|
|
125781
|
+
}
|
|
125782
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
125783
|
+
let c9 = ctx.s.charCodeAt(ctx.p);
|
|
125784
|
+
if (c9 === 35) {
|
|
125785
|
+
skipComment2(ctx);
|
|
125786
|
+
} else if (c9 === end || c9 === sep8) {
|
|
125787
|
+
return;
|
|
125840
125788
|
}
|
|
125841
125789
|
}
|
|
125842
125790
|
throw new TomlError2("cannot find end of structure", {
|
|
125843
|
-
toml:
|
|
125791
|
+
toml: ctx.s,
|
|
125844
125792
|
ptr
|
|
125845
125793
|
});
|
|
125846
125794
|
}
|
|
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];
|
|
125795
|
+
function parseString2(ctx) {
|
|
125796
|
+
let start = ctx.p;
|
|
125797
|
+
let c9 = ctx.s.charCodeAt(ctx.p++);
|
|
125798
|
+
let first = c9;
|
|
125799
|
+
let isLiteral = c9 === 39;
|
|
125800
|
+
let isMultiline = c9 === ctx.s.charCodeAt(ctx.p) && c9 === ctx.s.charCodeAt(ctx.p + 1);
|
|
125868
125801
|
if (isMultiline) {
|
|
125869
|
-
|
|
125870
|
-
|
|
125871
|
-
|
|
125872
|
-
|
|
125873
|
-
|
|
125874
|
-
}
|
|
125875
|
-
let tmp = 0;
|
|
125876
|
-
let isEscape;
|
|
125802
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p += 2)) === 10)
|
|
125803
|
+
ctx.p++;
|
|
125804
|
+
else if (c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
|
|
125805
|
+
ctx.p += 2;
|
|
125806
|
+
}
|
|
125877
125807
|
let parsed = "";
|
|
125878
|
-
let sliceStart =
|
|
125879
|
-
|
|
125880
|
-
|
|
125881
|
-
|
|
125882
|
-
|
|
125883
|
-
|
|
125884
|
-
|
|
125885
|
-
ptr: ptr - 1
|
|
125886
|
-
});
|
|
125887
|
-
}
|
|
125888
|
-
} else if (c9 < " " && c9 !== " " || c9 === "\x7F") {
|
|
125808
|
+
let sliceStart = ctx.p;
|
|
125809
|
+
let state3 = 0;
|
|
125810
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
125811
|
+
c9 = ctx.s.charCodeAt(ctx.p);
|
|
125812
|
+
if (isMultiline && (c9 === 10 || c9 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
|
|
125813
|
+
state3 = state3 && 3;
|
|
125814
|
+
} else if (c9 < 32 && c9 !== 9 || c9 === 127) {
|
|
125889
125815
|
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
|
-
|
|
125816
|
+
toml: ctx.s,
|
|
125817
|
+
ptr: ctx.p
|
|
125818
|
+
});
|
|
125819
|
+
} else if ((!state3 || state3 === 3) && c9 === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
|
|
125820
|
+
if (isMultiline) {
|
|
125821
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
125822
|
+
ctx.p++;
|
|
125823
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
125824
|
+
ctx.p++;
|
|
125825
|
+
}
|
|
125826
|
+
if (!state3)
|
|
125827
|
+
parsed += ctx.s.slice(sliceStart, ctx.p);
|
|
125828
|
+
ctx.p += isMultiline ? 3 : 1;
|
|
125829
|
+
return parsed;
|
|
125830
|
+
} else if (!state3) {
|
|
125831
|
+
if (!isLiteral && c9 === 92) {
|
|
125832
|
+
parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
|
|
125833
|
+
state3 = 1;
|
|
125834
|
+
}
|
|
125835
|
+
} else if (state3 === 1) {
|
|
125836
|
+
if (c9 === 120 || c9 === 117 || c9 === 85) {
|
|
125837
|
+
let value = 0;
|
|
125838
|
+
let len = c9 === 120 ? 2 : c9 === 117 ? 4 : 8;
|
|
125839
|
+
for (let j8 = 0; j8 < len; j8++, ctx.p++) {
|
|
125840
|
+
let hex3 = ctx.s.charCodeAt(ctx.p + 1);
|
|
125841
|
+
let digit = (
|
|
125842
|
+
/* 0-9 */
|
|
125843
|
+
hex3 >= 48 && hex3 <= 57 ? hex3 - 48 : (
|
|
125844
|
+
/* A-F */
|
|
125845
|
+
hex3 >= 65 && hex3 <= 70 ? hex3 - 65 + 10 : (
|
|
125846
|
+
/* a-f */
|
|
125847
|
+
hex3 >= 97 && hex3 <= 102 ? hex3 - 97 + 10 : -1
|
|
125848
|
+
)
|
|
125849
|
+
)
|
|
125850
|
+
);
|
|
125851
|
+
if (digit < 0)
|
|
125852
|
+
throw new TomlError2("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
|
|
125853
|
+
value = value << 4 | digit;
|
|
125854
|
+
}
|
|
125855
|
+
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
|
125856
|
+
throw new TomlError2("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
|
|
125857
|
+
}
|
|
125858
|
+
parsed += String.fromCodePoint(value);
|
|
125859
|
+
sliceStart = ctx.p + 1;
|
|
125860
|
+
state3 = 0;
|
|
125861
|
+
} else if (c9 === 32 || c9 === 9) {
|
|
125862
|
+
state3 = 2;
|
|
125923
125863
|
} else {
|
|
125924
|
-
|
|
125925
|
-
|
|
125926
|
-
|
|
125864
|
+
if (c9 === 98)
|
|
125865
|
+
parsed += "\b";
|
|
125866
|
+
else if (c9 === 116)
|
|
125867
|
+
parsed += " ";
|
|
125868
|
+
else if (c9 === 110)
|
|
125869
|
+
parsed += "\n";
|
|
125870
|
+
else if (c9 === 102)
|
|
125871
|
+
parsed += "\f";
|
|
125872
|
+
else if (c9 === 114)
|
|
125873
|
+
parsed += "\r";
|
|
125874
|
+
else if (c9 === 101)
|
|
125875
|
+
parsed += "\x1B";
|
|
125876
|
+
else if (c9 === 34)
|
|
125877
|
+
parsed += '"';
|
|
125878
|
+
else if (c9 === 92)
|
|
125879
|
+
parsed += "\\";
|
|
125880
|
+
else
|
|
125881
|
+
throw new TomlError2("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
|
|
125882
|
+
sliceStart = ctx.p + 1;
|
|
125883
|
+
state3 = 0;
|
|
125884
|
+
}
|
|
125885
|
+
} else if (c9 !== 32 && c9 !== 9) {
|
|
125886
|
+
if (state3 === 2) {
|
|
125887
|
+
throw new TomlError2("invalid escape: only line-ending whitespace may be escaped", {
|
|
125888
|
+
toml: ctx.s,
|
|
125889
|
+
ptr: sliceStart
|
|
125927
125890
|
});
|
|
125928
125891
|
}
|
|
125929
|
-
|
|
125930
|
-
|
|
125931
|
-
tmp = ptr - 1;
|
|
125932
|
-
isEscape = true;
|
|
125933
|
-
parsed += str.slice(sliceStart, tmp);
|
|
125892
|
+
state3 = !isLiteral && c9 === 92 ? 1 : 0;
|
|
125893
|
+
sliceStart = ctx.p;
|
|
125934
125894
|
}
|
|
125935
125895
|
}
|
|
125936
|
-
|
|
125896
|
+
throw new TomlError2("unfinished string", { toml: ctx.s, ptr: start });
|
|
125937
125897
|
}
|
|
125938
|
-
function
|
|
125939
|
-
|
|
125940
|
-
|
|
125941
|
-
if (
|
|
125942
|
-
|
|
125898
|
+
function sliceAndTrimEndOf2(ctx, start, end) {
|
|
125899
|
+
let value = ctx.s.slice(start, end);
|
|
125900
|
+
let commentIdx = value.indexOf("#");
|
|
125901
|
+
if (commentIdx > 0) {
|
|
125902
|
+
skipComment2({ s: value, p: commentIdx });
|
|
125903
|
+
value = value.slice(0, commentIdx);
|
|
125904
|
+
}
|
|
125905
|
+
return value.trimEnd();
|
|
125906
|
+
}
|
|
125907
|
+
function parseValue2(ctx, integersAsBigInt, end) {
|
|
125908
|
+
let ptr = ctx.p;
|
|
125909
|
+
let err = { toml: ctx.s, ptr };
|
|
125910
|
+
skipUntil2(ctx, 44, end);
|
|
125911
|
+
let value = sliceAndTrimEndOf2(ctx, ptr, ctx.p);
|
|
125912
|
+
if (!value)
|
|
125913
|
+
throw new TomlError2("incomplete declaration: value expected", err);
|
|
125943
125914
|
if (value === "-inf")
|
|
125944
125915
|
return -Infinity;
|
|
125945
125916
|
if (value === "inf" || value === "+inf")
|
|
@@ -125951,25 +125922,16 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
125951
125922
|
let isInt = INT_REGEX2.test(value);
|
|
125952
125923
|
if (isInt || FLOAT_REGEX2.test(value)) {
|
|
125953
125924
|
if (LEADING_ZERO2.test(value)) {
|
|
125954
|
-
throw new TomlError2("leading zeroes are not allowed",
|
|
125955
|
-
toml,
|
|
125956
|
-
ptr
|
|
125957
|
-
});
|
|
125925
|
+
throw new TomlError2("leading zeroes are not allowed", err);
|
|
125958
125926
|
}
|
|
125959
125927
|
value = value.replace(/_/g, "");
|
|
125960
125928
|
let numeric2 = +value;
|
|
125961
125929
|
if (isNaN(numeric2)) {
|
|
125962
|
-
throw new TomlError2("invalid number",
|
|
125963
|
-
toml,
|
|
125964
|
-
ptr
|
|
125965
|
-
});
|
|
125930
|
+
throw new TomlError2("invalid number", err);
|
|
125966
125931
|
}
|
|
125967
125932
|
if (isInt) {
|
|
125968
125933
|
if ((isInt = !Number.isSafeInteger(numeric2)) && !integersAsBigInt) {
|
|
125969
|
-
throw new TomlError2("integer value cannot be represented losslessly",
|
|
125970
|
-
toml,
|
|
125971
|
-
ptr
|
|
125972
|
-
});
|
|
125934
|
+
throw new TomlError2("integer value cannot be represented losslessly", err);
|
|
125973
125935
|
}
|
|
125974
125936
|
if (isInt || integersAsBigInt === true)
|
|
125975
125937
|
numeric2 = BigInt(value);
|
|
@@ -125977,240 +125939,179 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
|
|
125977
125939
|
return numeric2;
|
|
125978
125940
|
}
|
|
125979
125941
|
const date5 = new TomlDate2(value);
|
|
125980
|
-
if (!date5.isValid())
|
|
125981
|
-
throw new TomlError2("invalid value",
|
|
125982
|
-
toml,
|
|
125983
|
-
ptr
|
|
125984
|
-
});
|
|
125985
|
-
}
|
|
125942
|
+
if (!date5.isValid())
|
|
125943
|
+
throw new TomlError2("invalid value", err);
|
|
125986
125944
|
return date5;
|
|
125987
125945
|
}
|
|
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
|
|
125946
|
+
function extractValue2(ctx, end, integersAsBigInt) {
|
|
125947
|
+
let ptr = ctx.p;
|
|
125948
|
+
let c9 = ctx.s.charCodeAt(ptr);
|
|
125949
|
+
if (c9 === 91 || c9 === 123) {
|
|
125950
|
+
if (!ctx.d--) {
|
|
125951
|
+
throw new TomlError2("document contains excessively nested structures. aborting.", {
|
|
125952
|
+
toml: ctx.s,
|
|
125953
|
+
ptr
|
|
126002
125954
|
});
|
|
126003
125955
|
}
|
|
125956
|
+
let value = c9 === 91 ? parseArray2(ctx, integersAsBigInt) : parseInlineTable2(ctx, integersAsBigInt);
|
|
125957
|
+
ctx.d++;
|
|
125958
|
+
return value;
|
|
126004
125959
|
}
|
|
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];
|
|
125960
|
+
if (c9 === 34 || c9 === 39) {
|
|
125961
|
+
return parseString2(ctx);
|
|
126044
125962
|
}
|
|
126045
|
-
|
|
126046
|
-
|
|
126047
|
-
|
|
126048
|
-
|
|
126049
|
-
|
|
126050
|
-
ptr
|
|
126051
|
-
});
|
|
125963
|
+
if (c9 === 116) {
|
|
125964
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
125965
|
+
throw new TomlError2("invalid value", { toml: ctx.s, ptr });
|
|
125966
|
+
ctx.p++;
|
|
125967
|
+
return true;
|
|
126052
125968
|
}
|
|
126053
|
-
if (
|
|
126054
|
-
|
|
126055
|
-
|
|
125969
|
+
if (c9 === 102) {
|
|
125970
|
+
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)
|
|
125971
|
+
throw new TomlError2("invalid value", { toml: ctx.s, ptr });
|
|
125972
|
+
ctx.p++;
|
|
125973
|
+
return false;
|
|
126056
125974
|
}
|
|
126057
|
-
return
|
|
126058
|
-
parseValue2(slice[0], str, ptr, integersAsBigInt),
|
|
126059
|
-
endPtr
|
|
126060
|
-
];
|
|
125975
|
+
return parseValue2(ctx, integersAsBigInt, end);
|
|
126061
125976
|
}
|
|
126062
|
-
function parseKey2(
|
|
126063
|
-
let
|
|
125977
|
+
function parseKey2(ctx, end = "=") {
|
|
125978
|
+
let start = ctx.p;
|
|
125979
|
+
let dot = start - 1;
|
|
126064
125980
|
let parsed = [];
|
|
126065
|
-
let endPtr =
|
|
125981
|
+
let endPtr = ctx.s.indexOf(end, start);
|
|
126066
125982
|
if (endPtr < 0) {
|
|
126067
125983
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
126068
|
-
toml:
|
|
126069
|
-
ptr
|
|
125984
|
+
toml: ctx.s,
|
|
125985
|
+
ptr: start
|
|
126070
125986
|
});
|
|
126071
125987
|
}
|
|
126072
125988
|
do {
|
|
126073
|
-
let c9 =
|
|
126074
|
-
if (c9 !==
|
|
126075
|
-
if (c9 ===
|
|
126076
|
-
if (c9 ===
|
|
125989
|
+
let c9 = ctx.s.charCodeAt(ctx.p = ++dot);
|
|
125990
|
+
if (c9 !== 32 && c9 !== 9) {
|
|
125991
|
+
if (c9 === 34 || c9 === 39) {
|
|
125992
|
+
if (c9 === ctx.s.charCodeAt(ctx.p + 1) && c9 === ctx.s.charCodeAt(ctx.p + 2)) {
|
|
126077
125993
|
throw new TomlError2("multiline strings are not allowed in keys", {
|
|
126078
|
-
toml:
|
|
126079
|
-
ptr
|
|
126080
|
-
});
|
|
126081
|
-
}
|
|
126082
|
-
let eos = getStringEnd2(str, ptr);
|
|
126083
|
-
if (eos < 0) {
|
|
126084
|
-
throw new TomlError2("unfinished string encountered", {
|
|
126085
|
-
toml: str,
|
|
126086
|
-
ptr
|
|
125994
|
+
toml: ctx.s,
|
|
125995
|
+
ptr: ctx.p
|
|
126087
125996
|
});
|
|
126088
125997
|
}
|
|
126089
|
-
|
|
126090
|
-
|
|
125998
|
+
let part = parseString2(ctx);
|
|
125999
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
126000
|
+
let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
126091
126001
|
let newLine = indexOfNewline2(strEnd);
|
|
126092
126002
|
if (newLine > -1) {
|
|
126093
126003
|
throw new TomlError2("newlines are not allowed in keys", {
|
|
126094
|
-
toml:
|
|
126095
|
-
ptr:
|
|
126004
|
+
toml: ctx.s,
|
|
126005
|
+
ptr: newLine
|
|
126096
126006
|
});
|
|
126097
126007
|
}
|
|
126098
126008
|
if (strEnd.trimStart()) {
|
|
126099
126009
|
throw new TomlError2("found extra tokens after the string part", {
|
|
126100
|
-
toml:
|
|
126101
|
-
ptr:
|
|
126010
|
+
toml: ctx.s,
|
|
126011
|
+
ptr: ctx.p
|
|
126102
126012
|
});
|
|
126103
126013
|
}
|
|
126104
|
-
if (endPtr <
|
|
126105
|
-
endPtr =
|
|
126014
|
+
if (endPtr < ctx.p) {
|
|
126015
|
+
endPtr = ctx.s.indexOf(end, ctx.p);
|
|
126106
126016
|
if (endPtr < 0) {
|
|
126107
126017
|
throw new TomlError2("incomplete key-value: cannot find end of key", {
|
|
126108
|
-
toml:
|
|
126109
|
-
ptr
|
|
126018
|
+
toml: ctx.s,
|
|
126019
|
+
ptr: start
|
|
126110
126020
|
});
|
|
126111
126021
|
}
|
|
126112
126022
|
}
|
|
126113
|
-
parsed.push(
|
|
126023
|
+
parsed.push(part);
|
|
126114
126024
|
} else {
|
|
126115
|
-
dot =
|
|
126116
|
-
let part =
|
|
126025
|
+
dot = ctx.s.indexOf(".", ctx.p);
|
|
126026
|
+
let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
126117
126027
|
if (!KEY_PART_RE2.test(part)) {
|
|
126118
126028
|
throw new TomlError2("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
126119
|
-
toml:
|
|
126120
|
-
ptr
|
|
126029
|
+
toml: ctx.s,
|
|
126030
|
+
ptr: ctx.p
|
|
126121
126031
|
});
|
|
126122
126032
|
}
|
|
126123
126033
|
parsed.push(part.trimEnd());
|
|
126124
126034
|
}
|
|
126125
126035
|
}
|
|
126126
126036
|
} while (dot + 1 && dot < endPtr);
|
|
126127
|
-
|
|
126037
|
+
ctx.p = endPtr + 1;
|
|
126038
|
+
skipVoid2(ctx, true, true);
|
|
126039
|
+
return parsed;
|
|
126128
126040
|
}
|
|
126129
|
-
function parseInlineTable2(
|
|
126041
|
+
function parseInlineTable2(ctx, integersAsBigInt) {
|
|
126130
126042
|
let res = {};
|
|
126131
126043
|
let seen = /* @__PURE__ */ new Set();
|
|
126132
126044
|
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) {
|
|
126045
|
+
ctx.p++;
|
|
126046
|
+
while (ctx.p < ctx.s.length) {
|
|
126047
|
+
skipVoid2(ctx);
|
|
126048
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p)) === 125) {
|
|
126049
|
+
ctx.p++;
|
|
126050
|
+
return res;
|
|
126051
|
+
}
|
|
126052
|
+
let k7;
|
|
126053
|
+
let t14 = res;
|
|
126054
|
+
let hasOwn2 = false;
|
|
126055
|
+
let p8 = ctx.p;
|
|
126056
|
+
let key = parseKey2(ctx);
|
|
126057
|
+
for (let i8 = 0; i8 < key.length; i8++) {
|
|
126058
|
+
if (i8)
|
|
126059
|
+
t14 = hasOwn2 ? t14[k7] : t14[k7] = {};
|
|
126060
|
+
k7 = key[i8];
|
|
126061
|
+
if ((hasOwn2 = Object.hasOwn(t14, k7)) && (typeof t14[k7] !== "object" || seen.has(t14[k7]))) {
|
|
126163
126062
|
throw new TomlError2("trying to redefine an already defined value", {
|
|
126164
|
-
toml:
|
|
126165
|
-
ptr
|
|
126063
|
+
toml: ctx.s,
|
|
126064
|
+
ptr: p8
|
|
126166
126065
|
});
|
|
126167
126066
|
}
|
|
126168
|
-
|
|
126169
|
-
|
|
126170
|
-
|
|
126171
|
-
|
|
126172
|
-
|
|
126067
|
+
if (!hasOwn2 && k7 === "__proto__") {
|
|
126068
|
+
Object.defineProperty(t14, k7, { enumerable: true, configurable: true, writable: true });
|
|
126069
|
+
}
|
|
126070
|
+
}
|
|
126071
|
+
if (hasOwn2) {
|
|
126072
|
+
throw new TomlError2("trying to redefine an already defined value", {
|
|
126073
|
+
toml: ctx.s,
|
|
126074
|
+
ptr: ctx.p
|
|
126075
|
+
});
|
|
126076
|
+
}
|
|
126077
|
+
let value = extractValue2(ctx, 125, integersAsBigInt);
|
|
126078
|
+
seen.add(t14[k7] = value);
|
|
126079
|
+
skipVoid2(ctx);
|
|
126080
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p++)) === 125) {
|
|
126081
|
+
return res;
|
|
126082
|
+
}
|
|
126083
|
+
if (c9 !== 44) {
|
|
126084
|
+
throw new TomlError2("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
126173
126085
|
}
|
|
126174
126086
|
}
|
|
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];
|
|
126087
|
+
throw new TomlError2("unfinished table encountered", {
|
|
126088
|
+
toml: ctx.s,
|
|
126089
|
+
ptr: ctx.p
|
|
126090
|
+
});
|
|
126188
126091
|
}
|
|
126189
|
-
function parseArray2(
|
|
126092
|
+
function parseArray2(ctx, integersAsBigInt) {
|
|
126190
126093
|
let res = [];
|
|
126191
126094
|
let c9;
|
|
126192
|
-
|
|
126193
|
-
while (
|
|
126194
|
-
|
|
126195
|
-
|
|
126196
|
-
|
|
126197
|
-
|
|
126198
|
-
|
|
126199
|
-
|
|
126200
|
-
|
|
126201
|
-
|
|
126202
|
-
|
|
126203
|
-
|
|
126204
|
-
|
|
126095
|
+
ctx.p++;
|
|
126096
|
+
while (ctx.p < ctx.s.length) {
|
|
126097
|
+
skipVoid2(ctx);
|
|
126098
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p)) === 93) {
|
|
126099
|
+
ctx.p++;
|
|
126100
|
+
return res;
|
|
126101
|
+
}
|
|
126102
|
+
res.push(extractValue2(ctx, 93, integersAsBigInt));
|
|
126103
|
+
skipVoid2(ctx);
|
|
126104
|
+
if ((c9 = ctx.s.charCodeAt(ctx.p++)) === 93) {
|
|
126105
|
+
return res;
|
|
126106
|
+
}
|
|
126107
|
+
if (c9 !== 44) {
|
|
126108
|
+
throw new TomlError2("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
|
|
126205
126109
|
}
|
|
126206
126110
|
}
|
|
126207
|
-
|
|
126208
|
-
|
|
126209
|
-
|
|
126210
|
-
|
|
126211
|
-
});
|
|
126212
|
-
}
|
|
126213
|
-
return [res, ptr];
|
|
126111
|
+
throw new TomlError2("unfinished array encountered", {
|
|
126112
|
+
toml: ctx.s,
|
|
126113
|
+
ptr: ctx.p
|
|
126114
|
+
});
|
|
126214
126115
|
}
|
|
126215
126116
|
function peekTable2(key, table, meta3, type) {
|
|
126216
126117
|
let t14 = table;
|
|
@@ -126272,25 +126173,29 @@ function peekTable2(key, table, meta3, type) {
|
|
|
126272
126173
|
return [k7, t14, state3.c];
|
|
126273
126174
|
}
|
|
126274
126175
|
function parse6(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
126176
|
+
let ctx = { s: toml, p: 0, d: maxDepth };
|
|
126275
126177
|
let res = {};
|
|
126276
126178
|
let meta3 = {};
|
|
126179
|
+
let tmp;
|
|
126277
126180
|
let tbl = res;
|
|
126278
126181
|
let m7 = meta3;
|
|
126279
|
-
|
|
126280
|
-
|
|
126281
|
-
|
|
126282
|
-
let
|
|
126182
|
+
skipVoid2(ctx);
|
|
126183
|
+
while (ctx.p < toml.length) {
|
|
126184
|
+
if (toml.charCodeAt(ctx.p) === 91) {
|
|
126185
|
+
let isTableArray = toml.charCodeAt(++ctx.p) === 91;
|
|
126186
|
+
tmp = ctx.p += +isTableArray;
|
|
126187
|
+
let k7 = parseKey2(ctx, "]");
|
|
126283
126188
|
if (isTableArray) {
|
|
126284
|
-
if (toml
|
|
126189
|
+
if (toml.charCodeAt(ctx.p - 1) !== 93) {
|
|
126285
126190
|
throw new TomlError2("expected end of table declaration", {
|
|
126286
126191
|
toml,
|
|
126287
|
-
ptr:
|
|
126192
|
+
ptr: ctx.p - 1
|
|
126288
126193
|
});
|
|
126289
126194
|
}
|
|
126290
|
-
|
|
126195
|
+
ctx.p++;
|
|
126291
126196
|
}
|
|
126292
126197
|
let p8 = peekTable2(
|
|
126293
|
-
k7
|
|
126198
|
+
k7,
|
|
126294
126199
|
res,
|
|
126295
126200
|
meta3,
|
|
126296
126201
|
isTableArray ? 2 : 1
|
|
@@ -126299,16 +126204,16 @@ function parse6(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
126299
126204
|
if (!p8) {
|
|
126300
126205
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
126301
126206
|
toml,
|
|
126302
|
-
ptr
|
|
126207
|
+
ptr: tmp
|
|
126303
126208
|
});
|
|
126304
126209
|
}
|
|
126305
126210
|
m7 = p8[2];
|
|
126306
126211
|
tbl = p8[1];
|
|
126307
|
-
ptr = k7[1];
|
|
126308
126212
|
} else {
|
|
126309
|
-
|
|
126213
|
+
tmp = ctx.p;
|
|
126214
|
+
let k7 = parseKey2(ctx);
|
|
126310
126215
|
let p8 = peekTable2(
|
|
126311
|
-
k7
|
|
126216
|
+
k7,
|
|
126312
126217
|
tbl,
|
|
126313
126218
|
m7,
|
|
126314
126219
|
0
|
|
@@ -126317,21 +126222,19 @@ function parse6(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
126317
126222
|
if (!p8) {
|
|
126318
126223
|
throw new TomlError2("trying to redefine an already defined table or value", {
|
|
126319
126224
|
toml,
|
|
126320
|
-
ptr
|
|
126225
|
+
ptr: tmp
|
|
126321
126226
|
});
|
|
126322
126227
|
}
|
|
126323
|
-
|
|
126324
|
-
p8[1][p8[0]] = v8[0];
|
|
126325
|
-
ptr = v8[1];
|
|
126228
|
+
p8[1][p8[0]] = extractValue2(ctx, void 0, integersAsBigInt);
|
|
126326
126229
|
}
|
|
126327
|
-
|
|
126328
|
-
if (toml
|
|
126230
|
+
skipVoid2(ctx, true);
|
|
126231
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
|
|
126329
126232
|
throw new TomlError2("each key-value declaration must be followed by an end-of-line", {
|
|
126330
126233
|
toml,
|
|
126331
|
-
ptr
|
|
126234
|
+
ptr: ctx.p
|
|
126332
126235
|
});
|
|
126333
126236
|
}
|
|
126334
|
-
|
|
126237
|
+
skipVoid2(ctx);
|
|
126335
126238
|
}
|
|
126336
126239
|
return res;
|
|
126337
126240
|
}
|
|
@@ -126340,8 +126243,12 @@ function extendedTypeOf2(obj) {
|
|
|
126340
126243
|
if (type === "object") {
|
|
126341
126244
|
if (Array.isArray(obj))
|
|
126342
126245
|
return "array";
|
|
126343
|
-
if (obj instanceof Date)
|
|
126246
|
+
if (typeof obj?.getUTCDate === "function" && obj instanceof Date)
|
|
126344
126247
|
return "date";
|
|
126248
|
+
if (globalThis.Temporal && // check for the 'since' property as an early bailout that avoids running all 5 instanceof checks
|
|
126249
|
+
typeof obj?.since === "function" && (obj instanceof Temporal.Instant || obj instanceof Temporal.PlainDate || obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainTime || obj instanceof Temporal.ZonedDateTime)) {
|
|
126250
|
+
return "temporal";
|
|
126251
|
+
}
|
|
126345
126252
|
}
|
|
126346
126253
|
return type;
|
|
126347
126254
|
}
|
|
@@ -126355,38 +126262,42 @@ function isArrayOfTables2(obj) {
|
|
|
126355
126262
|
function formatString2(s8) {
|
|
126356
126263
|
return JSON.stringify(s8).replace(/\x7f/g, "\\u007f");
|
|
126357
126264
|
}
|
|
126265
|
+
function stringifyTemporal2(temporal) {
|
|
126266
|
+
return temporal.toString({
|
|
126267
|
+
calendarName: "never",
|
|
126268
|
+
timeZoneName: "never"
|
|
126269
|
+
});
|
|
126270
|
+
}
|
|
126358
126271
|
function stringifyValue2(val2, type, depth, numberAsFloat) {
|
|
126359
126272
|
if (depth === 0) {
|
|
126360
126273
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
126361
126274
|
}
|
|
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);
|
|
126275
|
+
switch (type) {
|
|
126276
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
126277
|
+
case "number":
|
|
126278
|
+
if (isNaN(val2))
|
|
126279
|
+
return "nan";
|
|
126280
|
+
if (val2 === Infinity)
|
|
126281
|
+
return "inf";
|
|
126282
|
+
if (val2 === -Infinity)
|
|
126283
|
+
return "-inf";
|
|
126284
|
+
if (Number.isInteger(val2) && (numberAsFloat || !Number.isSafeInteger(val2)))
|
|
126285
|
+
return val2.toFixed(1);
|
|
126286
|
+
case "bigint":
|
|
126287
|
+
case "boolean":
|
|
126288
|
+
return val2.toString();
|
|
126289
|
+
case "string":
|
|
126290
|
+
return formatString2(val2);
|
|
126291
|
+
case "date":
|
|
126292
|
+
if (isNaN(val2.getTime()))
|
|
126293
|
+
throw new TypeError("cannot serialize invalid date");
|
|
126294
|
+
return val2.toISOString();
|
|
126295
|
+
case "object":
|
|
126296
|
+
return stringifyInlineTable2(val2, depth, numberAsFloat);
|
|
126297
|
+
case "array":
|
|
126298
|
+
return stringifyArray2(val2, depth, numberAsFloat);
|
|
126299
|
+
case "temporal":
|
|
126300
|
+
return stringifyTemporal2(val2);
|
|
126390
126301
|
}
|
|
126391
126302
|
}
|
|
126392
126303
|
function stringifyInlineTable2(obj, depth, numberAsFloat) {
|
|
@@ -127019,9 +126930,9 @@ function scrubEncryptedCredentials(options) {
|
|
|
127019
126930
|
}
|
|
127020
126931
|
return { backendAvailable: false, encryptedFileExisted };
|
|
127021
126932
|
}
|
|
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-
|
|
126933
|
+
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;
|
|
126934
|
+
var init_chunk_4CJO23DA = __esm({
|
|
126935
|
+
"../workers-auth/dist/chunk-4CJO23DA.mjs"() {
|
|
127025
126936
|
init_import_meta_url();
|
|
127026
126937
|
init_chunk_O6YSETKJ();
|
|
127027
126938
|
init_src();
|
|
@@ -127420,44 +127331,7 @@ var init_chunk_LQW53VED = __esm({
|
|
|
127420
127331
|
__name2(formatDirectoryForUserError, "formatDirectoryForUserError");
|
|
127421
127332
|
__name(getProfileForDirectoryFromBindings, "getProfileForDirectoryFromBindings");
|
|
127422
127333
|
__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;
|
|
127334
|
+
DATE_TIME_RE2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
127461
127335
|
TomlDate2 = class _TomlDate extends Date {
|
|
127462
127336
|
static {
|
|
127463
127337
|
__name(this, "_TomlDate");
|
|
@@ -127553,25 +127427,48 @@ ${codeblock}`, options);
|
|
|
127553
127427
|
return date5;
|
|
127554
127428
|
}
|
|
127555
127429
|
};
|
|
127430
|
+
__name(getLineColFromPtr2, "getLineColFromPtr");
|
|
127431
|
+
__name2(getLineColFromPtr2, "getLineColFromPtr");
|
|
127432
|
+
__name(makeCodeBlock2, "makeCodeBlock");
|
|
127433
|
+
__name2(makeCodeBlock2, "makeCodeBlock");
|
|
127434
|
+
TomlError2 = class extends Error {
|
|
127435
|
+
static {
|
|
127436
|
+
__name(this, "TomlError");
|
|
127437
|
+
}
|
|
127438
|
+
static {
|
|
127439
|
+
__name2(this, "TomlError");
|
|
127440
|
+
}
|
|
127441
|
+
line;
|
|
127442
|
+
column;
|
|
127443
|
+
codeblock;
|
|
127444
|
+
constructor(message, options) {
|
|
127445
|
+
const [line, column] = getLineColFromPtr2(options.toml, options.ptr);
|
|
127446
|
+
const codeblock = makeCodeBlock2(options.toml, line, column);
|
|
127447
|
+
super(`Invalid TOML document: ${message}
|
|
127448
|
+
|
|
127449
|
+
${codeblock}`, options);
|
|
127450
|
+
this.line = line;
|
|
127451
|
+
this.column = column;
|
|
127452
|
+
this.codeblock = codeblock;
|
|
127453
|
+
}
|
|
127454
|
+
};
|
|
127455
|
+
__name(indexOfNewline2, "indexOfNewline");
|
|
127456
|
+
__name2(indexOfNewline2, "indexOfNewline");
|
|
127457
|
+
__name(skipComment2, "skipComment");
|
|
127458
|
+
__name2(skipComment2, "skipComment");
|
|
127459
|
+
__name(skipVoid2, "skipVoid");
|
|
127460
|
+
__name2(skipVoid2, "skipVoid");
|
|
127461
|
+
__name(skipUntil2, "skipUntil");
|
|
127462
|
+
__name2(skipUntil2, "skipUntil");
|
|
127556
127463
|
INT_REGEX2 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
127557
127464
|
FLOAT_REGEX2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
127558
127465
|
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
127466
|
__name(parseString2, "parseString");
|
|
127570
127467
|
__name2(parseString2, "parseString");
|
|
127571
|
-
__name(parseValue2, "parseValue");
|
|
127572
|
-
__name2(parseValue2, "parseValue");
|
|
127573
127468
|
__name(sliceAndTrimEndOf2, "sliceAndTrimEndOf");
|
|
127574
127469
|
__name2(sliceAndTrimEndOf2, "sliceAndTrimEndOf");
|
|
127470
|
+
__name(parseValue2, "parseValue");
|
|
127471
|
+
__name2(parseValue2, "parseValue");
|
|
127575
127472
|
__name(extractValue2, "extractValue");
|
|
127576
127473
|
__name2(extractValue2, "extractValue");
|
|
127577
127474
|
KEY_PART_RE2 = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
@@ -127592,6 +127489,8 @@ ${codeblock}`, options);
|
|
|
127592
127489
|
__name2(isArrayOfTables2, "isArrayOfTables");
|
|
127593
127490
|
__name(formatString2, "formatString");
|
|
127594
127491
|
__name2(formatString2, "formatString");
|
|
127492
|
+
__name(stringifyTemporal2, "stringifyTemporal");
|
|
127493
|
+
__name2(stringifyTemporal2, "stringifyTemporal");
|
|
127595
127494
|
__name(stringifyValue2, "stringifyValue");
|
|
127596
127495
|
__name2(stringifyValue2, "stringifyValue");
|
|
127597
127496
|
__name(stringifyInlineTable2, "stringifyInlineTable");
|
|
@@ -128106,7 +128005,7 @@ ${codeblock}`, options);
|
|
|
128106
128005
|
var init_dist2 = __esm({
|
|
128107
128006
|
"../workers-auth/dist/index.mjs"() {
|
|
128108
128007
|
init_import_meta_url();
|
|
128109
|
-
|
|
128008
|
+
init_chunk_4CJO23DA();
|
|
128110
128009
|
}
|
|
128111
128010
|
});
|
|
128112
128011
|
function createPreferences(getConfigPath2) {
|
|
@@ -129014,10 +128913,10 @@ function createAuthConfigFileHelpers(deps) {
|
|
|
129014
128913
|
};
|
|
129015
128914
|
}
|
|
129016
128915
|
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-
|
|
128916
|
+
var init_chunk_A6F4WXCF = __esm({
|
|
128917
|
+
"../workers-auth/dist/chunk-A6F4WXCF.mjs"() {
|
|
129019
128918
|
init_import_meta_url();
|
|
129020
|
-
|
|
128919
|
+
init_chunk_4CJO23DA();
|
|
129021
128920
|
init_chunk_O6YSETKJ();
|
|
129022
128921
|
init_src();
|
|
129023
128922
|
__name(createPreferences, "createPreferences");
|
|
@@ -129531,7 +129430,7 @@ var DefaultScopes, DefaultScopeKeys, WRANGLER_KEYRING_SERVICE_NAME, WRANGLER_CLI
|
|
|
129531
129430
|
var init_wrangler = __esm({
|
|
129532
129431
|
"../workers-auth/dist/wrangler/index.mjs"() {
|
|
129533
129432
|
init_import_meta_url();
|
|
129534
|
-
|
|
129433
|
+
init_chunk_A6F4WXCF();
|
|
129535
129434
|
init_chunk_O6YSETKJ();
|
|
129536
129435
|
init_src();
|
|
129537
129436
|
DefaultScopes = {
|
|
@@ -134948,7 +134847,7 @@ async function logResponse(response) {
|
|
|
134948
134847
|
logger2.debugWithSanitization("RESPONSE:", jsonText);
|
|
134949
134848
|
logger2.debug("-- END CF API RESPONSE");
|
|
134950
134849
|
}
|
|
134951
|
-
function
|
|
134850
|
+
function createCloudflareClient(complianceConfig) {
|
|
134952
134851
|
return new cloudflare_default({
|
|
134953
134852
|
fetch: /* @__PURE__ */ __name(async (url4, init4) => {
|
|
134954
134853
|
const request4 = new import_undici4.Request(url4, { ...init4, duplex: "half" });
|
|
@@ -135123,7 +135022,7 @@ var init_internal = __esm({
|
|
|
135123
135022
|
init_user3();
|
|
135124
135023
|
__name(logRequest, "logRequest");
|
|
135125
135024
|
__name(logResponse, "logResponse");
|
|
135126
|
-
__name(
|
|
135025
|
+
__name(createCloudflareClient, "createCloudflareClient");
|
|
135127
135026
|
__name(performApiFetch, "performApiFetch");
|
|
135128
135027
|
__name(fetchInternal, "fetchInternal");
|
|
135129
135028
|
__name(cloneHeaders2, "cloneHeaders");
|
|
@@ -135270,7 +135169,6 @@ var init_cfetch2 = __esm({
|
|
|
135270
135169
|
function initApiDeployHelpersContext() {
|
|
135271
135170
|
initDeployHelpersContext({
|
|
135272
135171
|
logger: logger2,
|
|
135273
|
-
createCloudflareClient: createCloudflareClient2,
|
|
135274
135172
|
fetchResult: fetchResult2,
|
|
135275
135173
|
fetchListResult: fetchListResult2,
|
|
135276
135174
|
fetchPagedListResult: fetchPagedListResult2,
|
|
@@ -135285,7 +135183,6 @@ var init_deploy_helpers_context = __esm({
|
|
|
135285
135183
|
init_import_meta_url();
|
|
135286
135184
|
init_context();
|
|
135287
135185
|
init_cfetch2();
|
|
135288
|
-
init_internal();
|
|
135289
135186
|
init_dialogs();
|
|
135290
135187
|
init_logger2();
|
|
135291
135188
|
__name(initApiDeployHelpersContext, "initApiDeployHelpersContext");
|
|
@@ -159512,9 +159409,13 @@ async function getWorkersDevSubdomainIfAccessible(complianceConfig, accountId, o
|
|
|
159512
159409
|
return "unauthorizedError" in result ? void 0 : result.subdomain;
|
|
159513
159410
|
}
|
|
159514
159411
|
async function getWorkerSubdomain(complianceConfig, accountId, workerName) {
|
|
159515
|
-
const worker = await
|
|
159516
|
-
|
|
159517
|
-
|
|
159412
|
+
const worker = await retryOnAPIFailure(
|
|
159413
|
+
() => fetchResult(
|
|
159414
|
+
complianceConfig,
|
|
159415
|
+
`/accounts/${accountId}/workers/workers/${workerName}`
|
|
159416
|
+
),
|
|
159417
|
+
logger
|
|
159418
|
+
);
|
|
159518
159419
|
return {
|
|
159519
159420
|
...worker.subdomain,
|
|
159520
159421
|
enabled: worker.subdomain.enabled ?? false,
|
|
@@ -177311,6 +177212,44 @@ function formatPreviewDeploymentSummary(config2, previewResource, deployment, is
|
|
|
177311
177212
|
...hasActiveUrls ? [] : [formatNoActivePreviewUrlsMessage(config2)]
|
|
177312
177213
|
].join("\n");
|
|
177313
177214
|
}
|
|
177215
|
+
function getPreviewCustomDomainHostnames(config2) {
|
|
177216
|
+
const routes = config2.routes ?? (config2.route ? [config2.route] : []);
|
|
177217
|
+
return routes.filter(
|
|
177218
|
+
(route) => isCustomDomainRoute(route) && route.previews_enabled === true
|
|
177219
|
+
).map((route) => normalizeHostname(route.pattern));
|
|
177220
|
+
}
|
|
177221
|
+
function normalizeHostname(hostname4) {
|
|
177222
|
+
try {
|
|
177223
|
+
return new URL(`https://${hostname4}`).hostname.replace(/\.$/, "");
|
|
177224
|
+
} catch {
|
|
177225
|
+
return hostname4.toLowerCase().replace(/\.$/, "");
|
|
177226
|
+
}
|
|
177227
|
+
}
|
|
177228
|
+
function hostnameMatchesCustomDomain(hostname4, customDomain) {
|
|
177229
|
+
const normalizedHostname = normalizeHostname(hostname4);
|
|
177230
|
+
return normalizedHostname === customDomain || normalizedHostname.endsWith(`.${customDomain}`);
|
|
177231
|
+
}
|
|
177232
|
+
function previewUrlMatchesCustomDomain(url4, customDomains) {
|
|
177233
|
+
try {
|
|
177234
|
+
const { hostname: hostname4 } = new URL(url4);
|
|
177235
|
+
return customDomains.some(
|
|
177236
|
+
(domain3) => hostnameMatchesCustomDomain(hostname4, domain3)
|
|
177237
|
+
);
|
|
177238
|
+
} catch {
|
|
177239
|
+
return false;
|
|
177240
|
+
}
|
|
177241
|
+
}
|
|
177242
|
+
function logMissingCustomDomainPreviewUrlsWarning(config2, previewResource, deployment) {
|
|
177243
|
+
const customDomains = getPreviewCustomDomainHostnames(config2);
|
|
177244
|
+
const urls = [...previewResource.urls ?? [], ...deployment.urls ?? []];
|
|
177245
|
+
if (customDomains.length === 0 || urls.length === 0 || urls.some((url4) => previewUrlMatchesCustomDomain(url4, customDomains))) {
|
|
177246
|
+
return;
|
|
177247
|
+
}
|
|
177248
|
+
logger.log("");
|
|
177249
|
+
logger.warn(
|
|
177250
|
+
"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."
|
|
177251
|
+
);
|
|
177252
|
+
}
|
|
177314
177253
|
function logMissingPreviewsBindingsWarning(productionBindingsExpectedInPreview, remotePreviewDefaultBindings, localPreviewBindings) {
|
|
177315
177254
|
const availableBindingNames = /* @__PURE__ */ new Set([
|
|
177316
177255
|
...Object.keys(remotePreviewDefaultBindings ?? {}),
|
|
@@ -177517,6 +177456,11 @@ async function runPreview(accountId, args, config2, buildResult, assetsOptions,
|
|
|
177517
177456
|
pullRequest
|
|
177518
177457
|
)
|
|
177519
177458
|
);
|
|
177459
|
+
logMissingCustomDomainPreviewUrlsWarning(
|
|
177460
|
+
config2,
|
|
177461
|
+
previewResource,
|
|
177462
|
+
deployment
|
|
177463
|
+
);
|
|
177520
177464
|
}
|
|
177521
177465
|
return { preview: previewResource, deployment, isNewPreview };
|
|
177522
177466
|
}
|
|
@@ -177587,6 +177531,11 @@ var init_preview2 = __esm({
|
|
|
177587
177531
|
__name(assemblePreviewDeploymentSettings, "assemblePreviewDeploymentSettings");
|
|
177588
177532
|
__name(formatUrlLines, "formatUrlLines");
|
|
177589
177533
|
__name(formatPreviewDeploymentSummary, "formatPreviewDeploymentSummary");
|
|
177534
|
+
__name(getPreviewCustomDomainHostnames, "getPreviewCustomDomainHostnames");
|
|
177535
|
+
__name(normalizeHostname, "normalizeHostname");
|
|
177536
|
+
__name(hostnameMatchesCustomDomain, "hostnameMatchesCustomDomain");
|
|
177537
|
+
__name(previewUrlMatchesCustomDomain, "previewUrlMatchesCustomDomain");
|
|
177538
|
+
__name(logMissingCustomDomainPreviewUrlsWarning, "logMissingCustomDomainPreviewUrlsWarning");
|
|
177590
177539
|
__name(logMissingPreviewsBindingsWarning, "logMissingPreviewsBindingsWarning");
|
|
177591
177540
|
__name(provisionParentWorker, "provisionParentWorker");
|
|
177592
177541
|
__name(runPreview, "runPreview");
|
|
@@ -178935,11 +178884,11 @@ function createCfProfileStore(ctx) {
|
|
|
178935
178884
|
function setKeyringPreference2(enabled, ctx) {
|
|
178936
178885
|
return cfKeyringPreference.setKeyringPreference(enabled, ctx);
|
|
178937
178886
|
}
|
|
178938
|
-
var CF_KEYRING_SERVICE_NAME, CF_CLI_NAME, CF_DISPLAY_NAME, CF_OAUTH_CALLBACK_URL, CF_CONSENT_PAGES, getClientIdFromEnv2,
|
|
178887
|
+
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
178888
|
var init_cf = __esm({
|
|
178940
178889
|
"../workers-auth/dist/cf/index.mjs"() {
|
|
178941
178890
|
init_import_meta_url();
|
|
178942
|
-
|
|
178891
|
+
init_chunk_A6F4WXCF();
|
|
178943
178892
|
init_chunk_O6YSETKJ();
|
|
178944
178893
|
init_src();
|
|
178945
178894
|
CF_KEYRING_SERVICE_NAME = "cloudflare";
|
|
@@ -178961,7 +178910,7 @@ var init_cf = __esm({
|
|
|
178961
178910
|
});
|
|
178962
178911
|
__name(getCfConfigPath, "getCfConfigPath");
|
|
178963
178912
|
__name2(getCfConfigPath, "getCfConfigPath");
|
|
178964
|
-
|
|
178913
|
+
CF_CLIENT_REGISTERED_SCOPES = [
|
|
178965
178914
|
"access:read",
|
|
178966
178915
|
"access:write",
|
|
178967
178916
|
"account:read",
|
|
@@ -179437,101 +179386,24 @@ var init_cf = __esm({
|
|
|
179437
179386
|
"zone.read",
|
|
179438
179387
|
"zone.write"
|
|
179439
179388
|
];
|
|
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"
|
|
179389
|
+
CF_REGISTERED_BUT_UNGRANTABLE_SCOPES = [
|
|
179390
|
+
"billing:read",
|
|
179391
|
+
"billing:write",
|
|
179392
|
+
"email_routing:read",
|
|
179393
|
+
"email_sending:read",
|
|
179394
|
+
"notebook-managed:read",
|
|
179395
|
+
"oauth_account_ssl_and_certificates_write"
|
|
179530
179396
|
];
|
|
179531
|
-
|
|
179397
|
+
CF_UNGRANTABLE_SCOPE_SET = new Set(
|
|
179398
|
+
CF_REGISTERED_BUT_UNGRANTABLE_SCOPES
|
|
179399
|
+
);
|
|
179400
|
+
CF_REQUESTABLE_SCOPES = CF_CLIENT_REGISTERED_SCOPES.filter(
|
|
179401
|
+
(scope) => !CF_UNGRANTABLE_SCOPE_SET.has(scope)
|
|
179402
|
+
);
|
|
179403
|
+
DefaultScopeKeys2 = [...CF_REQUESTABLE_SCOPES];
|
|
179532
179404
|
__name(setLoginScopeKeys2, "setLoginScopeKeys");
|
|
179533
179405
|
__name2(setLoginScopeKeys2, "setLoginScopeKeys");
|
|
179534
|
-
CF_SCOPE_SET = new Set(
|
|
179406
|
+
CF_SCOPE_SET = new Set(CF_REQUESTABLE_SCOPES);
|
|
179535
179407
|
__name(validateScopeKeys2, "validateScopeKeys");
|
|
179536
179408
|
__name2(validateScopeKeys2, "validateScopeKeys");
|
|
179537
179409
|
__name(getTemporaryAccountConfigFile2, "getTemporaryAccountConfigFile");
|
|
@@ -180021,7 +179893,7 @@ var init_dist14 = __esm({
|
|
|
180021
179893
|
init_wrapper();
|
|
180022
179894
|
init_create_worker_upload_form();
|
|
180023
179895
|
import_undici13 = __toESM(require_undici(), 1);
|
|
180024
|
-
version3 = "0.0.
|
|
179896
|
+
version3 = "0.0.32";
|
|
180025
179897
|
NoDefaultValueProvided2 = class extends UserError {
|
|
180026
179898
|
static {
|
|
180027
179899
|
__name(this, "NoDefaultValueProvided");
|
|
@@ -180586,10 +180458,6 @@ function convertToolingConfig(parsed) {
|
|
|
180586
180458
|
local_protocol: parsed.dev.localProtocol,
|
|
180587
180459
|
upstream_protocol: parsed.dev.upstreamProtocol,
|
|
180588
180460
|
host: parsed.dev.host,
|
|
180589
|
-
// `dev.types` is intentionally NOT mapped — it is consumed
|
|
180590
|
-
// separately via the `types` field on `LoadNewConfigResult`, not
|
|
180591
|
-
// threaded through `RawConfig`. The legacy `config.dev.generate_types`
|
|
180592
|
-
// gate is not used when `--experimental-new-config` is on.
|
|
180593
180461
|
enable_containers: parsed.dev.enableContainers,
|
|
180594
180462
|
container_engine: parsed.dev.containerEngine
|
|
180595
180463
|
};
|
|
@@ -180610,7 +180478,7 @@ var init_convert = __esm({
|
|
|
180610
180478
|
});
|
|
180611
180479
|
|
|
180612
180480
|
// src/experimental-config/schema.ts
|
|
180613
|
-
var RuleSchema, BuildSchema, PythonModulesSchema, DevSchema, WranglerConfigSchema, WRANGLER_CONFIG_SUPPORTED_KEYS, WORKER_CONFIG_FIELD_HINTS;
|
|
180481
|
+
var RuleSchema, BuildSchema, PythonModulesSchema, TypesSchema, DevSchema, WranglerConfigSchema, WRANGLER_CONFIG_SUPPORTED_KEYS, WORKER_CONFIG_FIELD_HINTS;
|
|
180614
180482
|
var init_schema2 = __esm({
|
|
180615
180483
|
"src/experimental-config/schema.ts"() {
|
|
180616
180484
|
init_import_meta_url();
|
|
@@ -180636,6 +180504,10 @@ var init_schema2 = __esm({
|
|
|
180636
180504
|
PythonModulesSchema = strictObject({
|
|
180637
180505
|
exclude: array(string2()).optional()
|
|
180638
180506
|
});
|
|
180507
|
+
TypesSchema = strictObject({
|
|
180508
|
+
generate: boolean2().optional(),
|
|
180509
|
+
includeRuntime: boolean2().optional()
|
|
180510
|
+
});
|
|
180639
180511
|
DevSchema = strictObject({
|
|
180640
180512
|
ip: string2().optional(),
|
|
180641
180513
|
port: number2().optional(),
|
|
@@ -180644,10 +180516,6 @@ var init_schema2 = __esm({
|
|
|
180644
180516
|
localProtocol: _enum2(["http", "https"]).optional(),
|
|
180645
180517
|
upstreamProtocol: _enum2(["http", "https"]).optional(),
|
|
180646
180518
|
host: string2().optional(),
|
|
180647
|
-
types: strictObject({
|
|
180648
|
-
generate: boolean2().optional(),
|
|
180649
|
-
includeRuntime: boolean2().optional()
|
|
180650
|
-
}).optional(),
|
|
180651
180519
|
enableContainers: boolean2().optional(),
|
|
180652
180520
|
containerEngine: string2().optional()
|
|
180653
180521
|
});
|
|
@@ -180671,6 +180539,7 @@ var init_schema2 = __esm({
|
|
|
180671
180539
|
uploadSourceMaps: boolean2().optional(),
|
|
180672
180540
|
build: BuildSchema.optional(),
|
|
180673
180541
|
assetsDirectory: string2().optional(),
|
|
180542
|
+
types: TypesSchema.optional(),
|
|
180674
180543
|
dev: DevSchema.optional(),
|
|
180675
180544
|
sendMetrics: boolean2().optional()
|
|
180676
180545
|
});
|
|
@@ -180777,8 +180646,8 @@ ${formatWranglerConfigZodError(parsed.error)}`,
|
|
|
180777
180646
|
);
|
|
180778
180647
|
const rawConfig = mergeRawConfigs(rawWorkerConfig, rawWranglerConfig);
|
|
180779
180648
|
const types14 = {
|
|
180780
|
-
generate: parsedWranglerConfig?.data.
|
|
180781
|
-
includeRuntime: parsedWranglerConfig?.data.
|
|
180649
|
+
generate: parsedWranglerConfig?.data.types?.generate ?? true,
|
|
180650
|
+
includeRuntime: parsedWranglerConfig?.data.types?.includeRuntime ?? true
|
|
180782
180651
|
};
|
|
180783
180652
|
const dependencies = new Set(configResult.dependencies);
|
|
180784
180653
|
if (wranglerConfigResult) {
|
|
@@ -181715,6 +181584,7 @@ async function readNewConfig(args, options = {}) {
|
|
|
181715
181584
|
return {
|
|
181716
181585
|
config: config2,
|
|
181717
181586
|
parsedConfig: loaded.parsedConfig,
|
|
181587
|
+
cloudflareConfigPath: loaded.cloudflareConfigPath,
|
|
181718
181588
|
mode: loaded.mode,
|
|
181719
181589
|
dependencies: loaded.dependencies,
|
|
181720
181590
|
types: loaded.types
|
|
@@ -205701,17 +205571,16 @@ async function regenerateNewConfigTypes(options) {
|
|
|
205701
205571
|
}
|
|
205702
205572
|
let existing;
|
|
205703
205573
|
try {
|
|
205704
|
-
existing = await fs$1.readFile(
|
|
205574
|
+
existing = await fs$1.readFile(NEW_CONFIG_TYPES_OUTPUT_PATH, "utf-8");
|
|
205705
205575
|
} catch {
|
|
205706
205576
|
}
|
|
205707
205577
|
let content;
|
|
205708
205578
|
try {
|
|
205709
|
-
const outputDir = path28__namespace.default.dirname(
|
|
205710
|
-
|
|
205711
|
-
)
|
|
205712
|
-
const relativeConfigPath = "./" + path28__namespace.default.relative(outputDir, options.cloudflareConfigPath);
|
|
205579
|
+
const outputDir = path28__namespace.default.dirname(path28__namespace.default.resolve(NEW_CONFIG_TYPES_OUTPUT_PATH));
|
|
205580
|
+
const relativeConfigPath = path28__namespace.default.relative(outputDir, options.cloudflareConfigPath).replaceAll("\\", "/");
|
|
205581
|
+
const configImportPath = relativeConfigPath.startsWith(".") ? relativeConfigPath : `./${relativeConfigPath}`;
|
|
205713
205582
|
content = generateTypes({
|
|
205714
|
-
configPath:
|
|
205583
|
+
configPath: configImportPath,
|
|
205715
205584
|
packageName: "wrangler/experimental-config"
|
|
205716
205585
|
});
|
|
205717
205586
|
if (options.types.includeRuntime) {
|
|
@@ -205735,22 +205604,26 @@ ${runtimeTypes}`;
|
|
|
205735
205604
|
return;
|
|
205736
205605
|
}
|
|
205737
205606
|
try {
|
|
205738
|
-
await fs$1.
|
|
205607
|
+
await fs$1.mkdir(path28__namespace.default.dirname(NEW_CONFIG_TYPES_OUTPUT_PATH), {
|
|
205608
|
+
recursive: true
|
|
205609
|
+
});
|
|
205610
|
+
await fs$1.writeFile(NEW_CONFIG_TYPES_OUTPUT_PATH, content);
|
|
205739
205611
|
logger2.log(
|
|
205740
|
-
`\u{1F4DD} Regenerated ${
|
|
205612
|
+
`\u{1F4DD} Regenerated ${NEW_CONFIG_TYPES_OUTPUT_PATH} from ${path28__namespace.default.relative(process.cwd(), options.cloudflareConfigPath)}.`
|
|
205741
205613
|
);
|
|
205742
205614
|
} catch (e11) {
|
|
205743
205615
|
logger2.error(e11);
|
|
205744
205616
|
}
|
|
205745
205617
|
}
|
|
205618
|
+
var NEW_CONFIG_TYPES_OUTPUT_PATH;
|
|
205746
205619
|
var init_new_config = __esm({
|
|
205747
205620
|
"src/type-generation/new-config.ts"() {
|
|
205748
205621
|
init_import_meta_url();
|
|
205749
205622
|
init_dist3();
|
|
205750
205623
|
init_src5();
|
|
205751
205624
|
init_logger2();
|
|
205752
|
-
init_helpers4();
|
|
205753
205625
|
init_runtime2();
|
|
205626
|
+
NEW_CONFIG_TYPES_OUTPUT_PATH = ".cloudflare/types/index.d.ts";
|
|
205754
205627
|
__name(regenerateNewConfigTypes, "regenerateNewConfigTypes");
|
|
205755
205628
|
}
|
|
205756
205629
|
});
|
|
@@ -206617,9 +206490,9 @@ var init_ConfigController = __esm({
|
|
|
206617
206490
|
await this.#configWatcher?.close();
|
|
206618
206491
|
this.#configWatcher = void 0;
|
|
206619
206492
|
}
|
|
206620
|
-
if (newConfig
|
|
206493
|
+
if (newConfig) {
|
|
206621
206494
|
await regenerateNewConfigTypes({
|
|
206622
|
-
cloudflareConfigPath:
|
|
206495
|
+
cloudflareConfigPath: newConfig.cloudflareConfigPath,
|
|
206623
206496
|
workerConfig: newConfig.parsedConfig.worker,
|
|
206624
206497
|
types: newConfig.types
|
|
206625
206498
|
});
|
|
@@ -213191,10 +213064,13 @@ async function writeBuildOutput({
|
|
|
213191
213064
|
env: env6,
|
|
213192
213065
|
isPreview: isPreview2 = false
|
|
213193
213066
|
}) {
|
|
213194
|
-
const {
|
|
213195
|
-
|
|
213196
|
-
|
|
213197
|
-
|
|
213067
|
+
const newConfig = await readNewConfig({ env: env6 }, { isPreview: isPreview2 });
|
|
213068
|
+
await regenerateNewConfigTypes({
|
|
213069
|
+
cloudflareConfigPath: newConfig.cloudflareConfigPath,
|
|
213070
|
+
workerConfig: newConfig.parsedConfig.worker,
|
|
213071
|
+
types: newConfig.types
|
|
213072
|
+
});
|
|
213073
|
+
const { config: config2, parsedConfig, mode } = newConfig;
|
|
213198
213074
|
const { buildProps, assetsOptions } = await mergeBuildOutputProps(config2);
|
|
213199
213075
|
const root = process.cwd();
|
|
213200
213076
|
let buildResult;
|
|
@@ -213242,6 +213118,7 @@ var init_write_build_output = __esm({
|
|
|
213242
213118
|
init_maybe_build_worker();
|
|
213243
213119
|
init_merge_config_args();
|
|
213244
213120
|
init_logger2();
|
|
213121
|
+
init_new_config();
|
|
213245
213122
|
__name(writeBuildOutput, "writeBuildOutput");
|
|
213246
213123
|
}
|
|
213247
213124
|
});
|
|
@@ -229437,7 +229314,6 @@ function createHandler2(def, argv) {
|
|
|
229437
229314
|
try {
|
|
229438
229315
|
initDeployHelpersContext({
|
|
229439
229316
|
logger: logger2,
|
|
229440
|
-
createCloudflareClient: createCloudflareClient2,
|
|
229441
229317
|
fetchResult: fetchResult2,
|
|
229442
229318
|
fetchListResult: fetchListResult2,
|
|
229443
229319
|
fetchPagedListResult: fetchPagedListResult2,
|
|
@@ -229447,7 +229323,7 @@ function createHandler2(def, argv) {
|
|
|
229447
229323
|
select: select2
|
|
229448
229324
|
});
|
|
229449
229325
|
const result = await def.handler(args, {
|
|
229450
|
-
sdk:
|
|
229326
|
+
sdk: createCloudflareClient(config2),
|
|
229451
229327
|
config: config2,
|
|
229452
229328
|
errors: { UserError, FatalError },
|
|
229453
229329
|
logger: logger2,
|
|
@@ -230223,103 +230099,102 @@ function normalizeSqlLineEndings(sql) {
|
|
|
230223
230099
|
}
|
|
230224
230100
|
function splitSqlIntoStatements(sql) {
|
|
230225
230101
|
const statements = [];
|
|
230226
|
-
let
|
|
230227
|
-
|
|
230228
|
-
|
|
230229
|
-
|
|
230230
|
-
|
|
230231
|
-
|
|
230232
|
-
if (compoundStatementStack[0]?.(str + char)) {
|
|
230233
|
-
compoundStatementStack.shift();
|
|
230234
|
-
}
|
|
230235
|
-
switch (char) {
|
|
230236
|
-
case `'`:
|
|
230237
|
-
case `"`:
|
|
230238
|
-
case "`":
|
|
230239
|
-
str += char + consumeUntilMarker(iterator, char);
|
|
230240
|
-
break;
|
|
230241
|
-
case `$`: {
|
|
230242
|
-
const dollarQuote = "$" + consumeWhile(iterator, isDollarQuoteIdentifier);
|
|
230243
|
-
str += dollarQuote;
|
|
230244
|
-
if (dollarQuote.endsWith("$")) {
|
|
230245
|
-
str += consumeUntilMarker(iterator, dollarQuote);
|
|
230246
|
-
}
|
|
230247
|
-
break;
|
|
230102
|
+
let start = 0;
|
|
230103
|
+
while (start < sql.length) {
|
|
230104
|
+
const { end, hasUsefulToken } = findCompleteStatementEnd(sql, start);
|
|
230105
|
+
if (end === void 0) {
|
|
230106
|
+
if (hasUsefulToken) {
|
|
230107
|
+
statements.push(sql.slice(start).trim());
|
|
230248
230108
|
}
|
|
230249
|
-
|
|
230250
|
-
next = iterator.next();
|
|
230251
|
-
if (!next.done && next.value === "-") {
|
|
230252
|
-
consumeUntilMarker(iterator, "\n");
|
|
230253
|
-
str += "\n";
|
|
230254
|
-
break;
|
|
230255
|
-
} else {
|
|
230256
|
-
str += char;
|
|
230257
|
-
continue;
|
|
230258
|
-
}
|
|
230259
|
-
case `/`:
|
|
230260
|
-
next = iterator.next();
|
|
230261
|
-
if (!next.done && next.value === "*") {
|
|
230262
|
-
consumeUntilMarker(iterator, "*/");
|
|
230263
|
-
break;
|
|
230264
|
-
} else {
|
|
230265
|
-
str += char;
|
|
230266
|
-
continue;
|
|
230267
|
-
}
|
|
230268
|
-
case `;`:
|
|
230269
|
-
if (compoundStatementStack.length === 0) {
|
|
230270
|
-
statements.push(str);
|
|
230271
|
-
str = "";
|
|
230272
|
-
} else {
|
|
230273
|
-
str += char;
|
|
230274
|
-
}
|
|
230275
|
-
break;
|
|
230276
|
-
default:
|
|
230277
|
-
str += char;
|
|
230278
|
-
break;
|
|
230109
|
+
break;
|
|
230279
230110
|
}
|
|
230280
|
-
|
|
230281
|
-
|
|
230111
|
+
const statement = sql.slice(start, end - 1).trim();
|
|
230112
|
+
if (hasUsefulToken && statement.length > 0) {
|
|
230113
|
+
statements.push(statement);
|
|
230282
230114
|
}
|
|
230283
|
-
|
|
230115
|
+
start = end;
|
|
230284
230116
|
}
|
|
230285
|
-
statements
|
|
230286
|
-
return statements.map((statement) => statement.trim()).filter((statement) => statement.length > 0);
|
|
230117
|
+
return statements;
|
|
230287
230118
|
}
|
|
230288
|
-
function
|
|
230289
|
-
let
|
|
230290
|
-
let
|
|
230291
|
-
let
|
|
230292
|
-
|
|
230293
|
-
|
|
230294
|
-
|
|
230295
|
-
|
|
230296
|
-
|
|
230297
|
-
|
|
230298
|
-
|
|
230119
|
+
function findCompleteStatementEnd(sql, start) {
|
|
230120
|
+
let state3 = "INVALID";
|
|
230121
|
+
let hasUsefulToken = false;
|
|
230122
|
+
for (let index = start; index < sql.length; index++) {
|
|
230123
|
+
const char = sql[index];
|
|
230124
|
+
let token;
|
|
230125
|
+
if (char === ";") {
|
|
230126
|
+
token = "tkSEMI";
|
|
230127
|
+
} else if (char === " " || char === "\r" || char === " " || char === "\n" || char === "\f") {
|
|
230128
|
+
token = "tkWS";
|
|
230129
|
+
} else if (char === "/" && sql[index + 1] === "*") {
|
|
230130
|
+
const end = sql.indexOf("*/", index + 2);
|
|
230131
|
+
if (end === -1) {
|
|
230132
|
+
return { end: void 0, hasUsefulToken };
|
|
230133
|
+
}
|
|
230134
|
+
index = end + 1;
|
|
230135
|
+
token = "tkWS";
|
|
230136
|
+
} else if (char === "-" && sql[index + 1] === "-") {
|
|
230137
|
+
const end = sql.indexOf("\n", index + 2);
|
|
230138
|
+
if (end === -1) {
|
|
230139
|
+
return { end: void 0, hasUsefulToken };
|
|
230140
|
+
}
|
|
230141
|
+
index = end;
|
|
230142
|
+
token = "tkWS";
|
|
230143
|
+
} else if (char === "[") {
|
|
230144
|
+
const end = sql.indexOf("]", index + 1);
|
|
230145
|
+
if (end === -1) {
|
|
230146
|
+
return { end: void 0, hasUsefulToken: true };
|
|
230147
|
+
}
|
|
230148
|
+
index = end;
|
|
230149
|
+
token = "tkOTHER";
|
|
230150
|
+
} else if (char === "'" || char === '"' || char === "`") {
|
|
230151
|
+
const end = sql.indexOf(char, index + 1);
|
|
230152
|
+
if (end === -1) {
|
|
230153
|
+
return { end: void 0, hasUsefulToken: true };
|
|
230154
|
+
}
|
|
230155
|
+
index = end;
|
|
230156
|
+
token = "tkOTHER";
|
|
230157
|
+
} else if (isIdentifierChar(char)) {
|
|
230158
|
+
const identifierStart = index;
|
|
230159
|
+
while (index + 1 < sql.length && isIdentifierChar(sql[index + 1])) {
|
|
230160
|
+
index++;
|
|
230161
|
+
}
|
|
230162
|
+
token = classifyIdentifier(sql.slice(identifierStart, index + 1));
|
|
230163
|
+
} else {
|
|
230164
|
+
token = "tkOTHER";
|
|
230165
|
+
}
|
|
230166
|
+
hasUsefulToken ||= token !== "tkSEMI" && token !== "tkWS";
|
|
230167
|
+
state3 = getNextState(state3, token);
|
|
230168
|
+
if (state3 === "START") {
|
|
230169
|
+
return { end: index + 1, hasUsefulToken };
|
|
230170
|
+
}
|
|
230171
|
+
}
|
|
230172
|
+
return { end: void 0, hasUsefulToken };
|
|
230173
|
+
}
|
|
230174
|
+
function getNextState(state3, token) {
|
|
230175
|
+
return transitions[state3][token];
|
|
230176
|
+
}
|
|
230177
|
+
function isIdentifierChar(char) {
|
|
230178
|
+
return /[A-Za-z0-9_$\u0080-\uffff]/.test(char);
|
|
230179
|
+
}
|
|
230180
|
+
function classifyIdentifier(identifier) {
|
|
230181
|
+
switch (identifier.toLowerCase()) {
|
|
230182
|
+
case "explain":
|
|
230183
|
+
return "tkEXPLAIN";
|
|
230184
|
+
case "create":
|
|
230185
|
+
return "tkCREATE";
|
|
230186
|
+
case "temp":
|
|
230187
|
+
case "temporary":
|
|
230188
|
+
return "tkTEMP";
|
|
230189
|
+
case "trigger":
|
|
230190
|
+
return "tkTRIGGER";
|
|
230191
|
+
case "end":
|
|
230192
|
+
return "tkEND";
|
|
230193
|
+
default:
|
|
230194
|
+
return "tkOTHER";
|
|
230299
230195
|
}
|
|
230300
|
-
return str;
|
|
230301
|
-
}
|
|
230302
|
-
function consumeUntilMarker(iterator, endMarker) {
|
|
230303
|
-
return consumeWhile(
|
|
230304
|
-
iterator,
|
|
230305
|
-
(str) => !str.endsWith(endMarker),
|
|
230306
|
-
endMarker.length
|
|
230307
|
-
);
|
|
230308
|
-
}
|
|
230309
|
-
function isDollarQuoteIdentifier(str) {
|
|
230310
|
-
const lastChar = str.slice(-1);
|
|
230311
|
-
return (
|
|
230312
|
-
// The $ marks the end of the identifier
|
|
230313
|
-
lastChar !== "$" && // we allow numbers, underscore and letters with diacritical marks
|
|
230314
|
-
(/[0-9_]/i.test(lastChar) || lastChar.toLowerCase() !== lastChar.toUpperCase())
|
|
230315
|
-
);
|
|
230316
|
-
}
|
|
230317
|
-
function isCompoundStatementStart(str) {
|
|
230318
|
-
return /\s(BEGIN|CASE)\s$/i.test(str);
|
|
230319
|
-
}
|
|
230320
|
-
function isCompoundStatementEnd(str) {
|
|
230321
|
-
return /\sEND[;\s]$/i.test(str);
|
|
230322
230196
|
}
|
|
230197
|
+
var transitions;
|
|
230323
230198
|
var init_splitter = __esm({
|
|
230324
230199
|
"src/d1/splitter.ts"() {
|
|
230325
230200
|
init_import_meta_url();
|
|
@@ -230328,11 +230203,92 @@ var init_splitter = __esm({
|
|
|
230328
230203
|
__name(splitSqlQuery, "splitSqlQuery");
|
|
230329
230204
|
__name(normalizeSqlLineEndings, "normalizeSqlLineEndings");
|
|
230330
230205
|
__name(splitSqlIntoStatements, "splitSqlIntoStatements");
|
|
230331
|
-
|
|
230332
|
-
|
|
230333
|
-
|
|
230334
|
-
|
|
230335
|
-
|
|
230206
|
+
transitions = {
|
|
230207
|
+
INVALID: {
|
|
230208
|
+
tkSEMI: "START",
|
|
230209
|
+
tkWS: "INVALID",
|
|
230210
|
+
tkOTHER: "NORMAL",
|
|
230211
|
+
tkEXPLAIN: "EXPLAIN",
|
|
230212
|
+
tkCREATE: "CREATE",
|
|
230213
|
+
tkTEMP: "NORMAL",
|
|
230214
|
+
tkTRIGGER: "NORMAL",
|
|
230215
|
+
tkEND: "NORMAL"
|
|
230216
|
+
},
|
|
230217
|
+
START: {
|
|
230218
|
+
tkSEMI: "START",
|
|
230219
|
+
tkWS: "START",
|
|
230220
|
+
tkOTHER: "NORMAL",
|
|
230221
|
+
tkEXPLAIN: "EXPLAIN",
|
|
230222
|
+
tkCREATE: "CREATE",
|
|
230223
|
+
tkTEMP: "NORMAL",
|
|
230224
|
+
tkTRIGGER: "NORMAL",
|
|
230225
|
+
tkEND: "NORMAL"
|
|
230226
|
+
},
|
|
230227
|
+
NORMAL: {
|
|
230228
|
+
tkSEMI: "START",
|
|
230229
|
+
tkWS: "NORMAL",
|
|
230230
|
+
tkOTHER: "NORMAL",
|
|
230231
|
+
tkEXPLAIN: "NORMAL",
|
|
230232
|
+
tkCREATE: "NORMAL",
|
|
230233
|
+
tkTEMP: "NORMAL",
|
|
230234
|
+
tkTRIGGER: "NORMAL",
|
|
230235
|
+
tkEND: "NORMAL"
|
|
230236
|
+
},
|
|
230237
|
+
EXPLAIN: {
|
|
230238
|
+
tkSEMI: "START",
|
|
230239
|
+
tkWS: "EXPLAIN",
|
|
230240
|
+
tkOTHER: "EXPLAIN",
|
|
230241
|
+
tkEXPLAIN: "NORMAL",
|
|
230242
|
+
tkCREATE: "CREATE",
|
|
230243
|
+
tkTEMP: "NORMAL",
|
|
230244
|
+
tkTRIGGER: "NORMAL",
|
|
230245
|
+
tkEND: "NORMAL"
|
|
230246
|
+
},
|
|
230247
|
+
CREATE: {
|
|
230248
|
+
tkSEMI: "START",
|
|
230249
|
+
tkWS: "CREATE",
|
|
230250
|
+
tkOTHER: "NORMAL",
|
|
230251
|
+
tkEXPLAIN: "NORMAL",
|
|
230252
|
+
tkCREATE: "NORMAL",
|
|
230253
|
+
tkTEMP: "CREATE",
|
|
230254
|
+
tkTRIGGER: "TRIGGER",
|
|
230255
|
+
tkEND: "NORMAL"
|
|
230256
|
+
},
|
|
230257
|
+
TRIGGER: {
|
|
230258
|
+
tkSEMI: "SEMI",
|
|
230259
|
+
tkWS: "TRIGGER",
|
|
230260
|
+
tkOTHER: "TRIGGER",
|
|
230261
|
+
tkEXPLAIN: "TRIGGER",
|
|
230262
|
+
tkCREATE: "TRIGGER",
|
|
230263
|
+
tkTEMP: "TRIGGER",
|
|
230264
|
+
tkTRIGGER: "TRIGGER",
|
|
230265
|
+
tkEND: "TRIGGER"
|
|
230266
|
+
},
|
|
230267
|
+
SEMI: {
|
|
230268
|
+
tkSEMI: "SEMI",
|
|
230269
|
+
tkWS: "SEMI",
|
|
230270
|
+
tkOTHER: "TRIGGER",
|
|
230271
|
+
tkEXPLAIN: "TRIGGER",
|
|
230272
|
+
tkCREATE: "TRIGGER",
|
|
230273
|
+
tkTEMP: "TRIGGER",
|
|
230274
|
+
tkTRIGGER: "TRIGGER",
|
|
230275
|
+
tkEND: "END"
|
|
230276
|
+
},
|
|
230277
|
+
END: {
|
|
230278
|
+
tkSEMI: "START",
|
|
230279
|
+
tkWS: "END",
|
|
230280
|
+
tkOTHER: "TRIGGER",
|
|
230281
|
+
tkEXPLAIN: "TRIGGER",
|
|
230282
|
+
tkCREATE: "TRIGGER",
|
|
230283
|
+
tkTEMP: "TRIGGER",
|
|
230284
|
+
tkTRIGGER: "TRIGGER",
|
|
230285
|
+
tkEND: "TRIGGER"
|
|
230286
|
+
}
|
|
230287
|
+
};
|
|
230288
|
+
__name(findCompleteStatementEnd, "findCompleteStatementEnd");
|
|
230289
|
+
__name(getNextState, "getNextState");
|
|
230290
|
+
__name(isIdentifierChar, "isIdentifierChar");
|
|
230291
|
+
__name(classifyIdentifier, "classifyIdentifier");
|
|
230336
230292
|
}
|
|
230337
230293
|
});
|
|
230338
230294
|
async function executeSql({
|
|
@@ -251652,7 +251608,7 @@ var require_lib5 = __commonJS({
|
|
|
251652
251608
|
return isInAstralSet(code2, astralIdentifierStartCodes);
|
|
251653
251609
|
}
|
|
251654
251610
|
__name(isIdentifierStart, "isIdentifierStart");
|
|
251655
|
-
function
|
|
251611
|
+
function isIdentifierChar2(code2) {
|
|
251656
251612
|
if (code2 < 48) return code2 === 36;
|
|
251657
251613
|
if (code2 < 58) return true;
|
|
251658
251614
|
if (code2 < 65) return false;
|
|
@@ -251664,7 +251620,7 @@ var require_lib5 = __commonJS({
|
|
|
251664
251620
|
}
|
|
251665
251621
|
return isInAstralSet(code2, astralIdentifierStartCodes) || isInAstralSet(code2, astralIdentifierCodes);
|
|
251666
251622
|
}
|
|
251667
|
-
__name(
|
|
251623
|
+
__name(isIdentifierChar2, "isIdentifierChar");
|
|
251668
251624
|
var reservedWords = {
|
|
251669
251625
|
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
|
251670
251626
|
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
|
@@ -253383,7 +253339,7 @@ var require_lib5 = __commonJS({
|
|
|
253383
253339
|
if (mods.includes(char)) {
|
|
253384
253340
|
this.raise(Errors.DuplicateRegExpFlags, nextPos());
|
|
253385
253341
|
}
|
|
253386
|
-
} else if (
|
|
253342
|
+
} else if (isIdentifierChar2(cp5) || cp5 === 92) {
|
|
253387
253343
|
this.raise(Errors.MalformedRegExpFlags, nextPos());
|
|
253388
253344
|
} else {
|
|
253389
253345
|
break;
|
|
@@ -253571,13 +253527,13 @@ var require_lib5 = __commonJS({
|
|
|
253571
253527
|
}
|
|
253572
253528
|
while (this.state.pos < this.length) {
|
|
253573
253529
|
const ch2 = this.codePointAtPos(this.state.pos);
|
|
253574
|
-
if (
|
|
253530
|
+
if (isIdentifierChar2(ch2)) {
|
|
253575
253531
|
this.state.pos += ch2 <= 65535 ? 1 : 2;
|
|
253576
253532
|
} else if (ch2 === 92) {
|
|
253577
253533
|
this.state.containsEsc = true;
|
|
253578
253534
|
word += this.input.slice(chunkStart, this.state.pos);
|
|
253579
253535
|
const escStart = this.state.curPosition();
|
|
253580
|
-
const identifierCheck = this.state.pos === start ? isIdentifierStart :
|
|
253536
|
+
const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar2;
|
|
253581
253537
|
if (this.input.charCodeAt(++this.state.pos) !== 117) {
|
|
253582
253538
|
this.raise(Errors.MissingUnicodeEscape, this.state.curPosition());
|
|
253583
253539
|
chunkStart = this.state.pos - 1;
|
|
@@ -253935,7 +253891,7 @@ var require_lib5 = __commonJS({
|
|
|
253935
253891
|
const nameEnd = nameStart + name2.length;
|
|
253936
253892
|
if (this.input.slice(nameStart, nameEnd) === name2) {
|
|
253937
253893
|
const nextCh = this.input.charCodeAt(nameEnd);
|
|
253938
|
-
return !(
|
|
253894
|
+
return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
|
|
253939
253895
|
}
|
|
253940
253896
|
return false;
|
|
253941
253897
|
}
|
|
@@ -257006,7 +256962,7 @@ var require_lib5 = __commonJS({
|
|
|
257006
256962
|
const start = this.state.pos;
|
|
257007
256963
|
do {
|
|
257008
256964
|
ch2 = this.input.charCodeAt(++this.state.pos);
|
|
257009
|
-
} while (
|
|
256965
|
+
} while (isIdentifierChar2(ch2) || ch2 === 45);
|
|
257010
256966
|
this.finishToken(141, this.input.slice(start, this.state.pos));
|
|
257011
256967
|
}
|
|
257012
256968
|
jsxParseIdentifier() {
|
|
@@ -262598,7 +262554,7 @@ var require_lib5 = __commonJS({
|
|
|
262598
262554
|
keywordRelationalOperator.lastIndex = pos;
|
|
262599
262555
|
if (keywordRelationalOperator.test(this.input)) {
|
|
262600
262556
|
const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex);
|
|
262601
|
-
if (!
|
|
262557
|
+
if (!isIdentifierChar2(endCh) && endCh !== 92) {
|
|
262602
262558
|
return false;
|
|
262603
262559
|
}
|
|
262604
262560
|
}
|
|
@@ -299455,7 +299411,6 @@ async function runPagesToWorkersDeploy(delegation) {
|
|
|
299455
299411
|
await run(experimentalFlags, async () => {
|
|
299456
299412
|
initDeployHelpersContext({
|
|
299457
299413
|
logger: logger2,
|
|
299458
|
-
createCloudflareClient: createCloudflareClient2,
|
|
299459
299414
|
fetchResult: fetchResult2,
|
|
299460
299415
|
fetchListResult: fetchListResult2,
|
|
299461
299416
|
fetchPagedListResult: fetchPagedListResult2,
|
|
@@ -299489,7 +299444,6 @@ var init_run_workers_deploy = __esm({
|
|
|
299489
299444
|
init_import_meta_url();
|
|
299490
299445
|
init_context();
|
|
299491
299446
|
init_cfetch2();
|
|
299492
|
-
init_internal();
|
|
299493
299447
|
init_config6();
|
|
299494
299448
|
init_deploy3();
|
|
299495
299449
|
init_dialogs();
|
|
@@ -341395,7 +341349,7 @@ var init_preview3 = __esm({
|
|
|
341395
341349
|
writeOutput({
|
|
341396
341350
|
type: "preview",
|
|
341397
341351
|
version: 1,
|
|
341398
|
-
worker_name:
|
|
341352
|
+
worker_name: resolveWorkerName(args, previewConfig),
|
|
341399
341353
|
preview_id: previewResource.id,
|
|
341400
341354
|
preview_name: previewResource.name,
|
|
341401
341355
|
preview_slug: previewResource.slug,
|
|
@@ -362743,7 +362697,6 @@ var init_DevEnv = __esm({
|
|
|
362743
362697
|
init_context();
|
|
362744
362698
|
init_src();
|
|
362745
362699
|
init_cfetch2();
|
|
362746
|
-
init_internal();
|
|
362747
362700
|
init_build_failures();
|
|
362748
362701
|
init_dialogs();
|
|
362749
362702
|
init_logger2();
|
|
@@ -362763,7 +362716,6 @@ var init_DevEnv = __esm({
|
|
|
362763
362716
|
async startWorker(options) {
|
|
362764
362717
|
initDeployHelpersContext({
|
|
362765
362718
|
logger: logger2,
|
|
362766
|
-
createCloudflareClient: createCloudflareClient2,
|
|
362767
362719
|
fetchResult: fetchResult2,
|
|
362768
362720
|
fetchListResult: fetchListResult2,
|
|
362769
362721
|
fetchPagedListResult: fetchPagedListResult2,
|
|
@@ -363223,15 +363175,14 @@ var init_LocalRuntimeController = __esm({
|
|
|
363223
363175
|
const nextState = {
|
|
363224
363176
|
dockerPath: data.config.dev.dockerPath ?? getDockerPath(),
|
|
363225
363177
|
complianceRegion: data.config.complianceRegion,
|
|
363178
|
+
hasContainers: Boolean(
|
|
363179
|
+
data.config.dev.enableContainers && data.config.containerDevPlan !== void 0
|
|
363180
|
+
),
|
|
363226
363181
|
containerOptions: data.config.dev.enableContainers ? data.config.containerDevPlan?.containerOptions ?? [] : []
|
|
363227
363182
|
};
|
|
363228
|
-
if (util.isDeepStrictEqual(previousState, nextState) || nextState.
|
|
363183
|
+
if (util.isDeepStrictEqual(previousState, nextState) || !nextState.hasContainers) {
|
|
363229
363184
|
return nextState;
|
|
363230
363185
|
}
|
|
363231
|
-
assert38__default.default(
|
|
363232
|
-
data.config.dev.containerBuildId,
|
|
363233
|
-
"Build ID should be set when Container images require preparation"
|
|
363234
|
-
);
|
|
363235
363186
|
this.dockerPath = nextState.dockerPath;
|
|
363236
363187
|
for (const { image_tag } of nextState.containerOptions) {
|
|
363237
363188
|
this.containerImageTagsSeen.add(image_tag);
|
|
@@ -369983,7 +369934,7 @@ var unstable_generateASSETSBinding = (
|
|
|
369983
369934
|
);
|
|
369984
369935
|
/*! Bundled license information:
|
|
369985
369936
|
|
|
369986
|
-
smol-toml/dist/
|
|
369937
|
+
smol-toml/dist/date.js:
|
|
369987
369938
|
(*!
|
|
369988
369939
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
369989
369940
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370012,7 +369963,7 @@ smol-toml/dist/error.js:
|
|
|
370012
369963
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370013
369964
|
*)
|
|
370014
369965
|
|
|
370015
|
-
smol-toml/dist/
|
|
369966
|
+
smol-toml/dist/error.js:
|
|
370016
369967
|
(*!
|
|
370017
369968
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370018
369969
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370041,7 +369992,7 @@ smol-toml/dist/util.js:
|
|
|
370041
369992
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370042
369993
|
*)
|
|
370043
369994
|
|
|
370044
|
-
smol-toml/dist/
|
|
369995
|
+
smol-toml/dist/util.js:
|
|
370045
369996
|
(*!
|
|
370046
369997
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370047
369998
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370267,7 +370218,7 @@ smol-toml/dist/index.js:
|
|
|
370267
370218
|
*/
|
|
370268
370219
|
/*! Bundled license information:
|
|
370269
370220
|
|
|
370270
|
-
smol-toml/dist/
|
|
370221
|
+
smol-toml/dist/date.js:
|
|
370271
370222
|
(*!
|
|
370272
370223
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370273
370224
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370296,7 +370247,7 @@ smol-toml/dist/error.js:
|
|
|
370296
370247
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370297
370248
|
*)
|
|
370298
370249
|
|
|
370299
|
-
smol-toml/dist/
|
|
370250
|
+
smol-toml/dist/error.js:
|
|
370300
370251
|
(*!
|
|
370301
370252
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370302
370253
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -370325,7 +370276,7 @@ smol-toml/dist/util.js:
|
|
|
370325
370276
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
370326
370277
|
*)
|
|
370327
370278
|
|
|
370328
|
-
smol-toml/dist/
|
|
370279
|
+
smol-toml/dist/util.js:
|
|
370329
370280
|
(*!
|
|
370330
370281
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
370331
370282
|
* SPDX-License-Identifier: BSD-3-Clause
|