@ctlflow/fleet 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/bin/fleet.mjs +477 -365
  2. package/package.json +3 -3
@@ -4767,105 +4767,13 @@ import { existsSync as existsSync5, realpathSync as realpathSync4, lstatSync as
4767
4767
  import { createHash } from "node:crypto";
4768
4768
  import { setTimeout as delay5 } from "node:timers/promises";
4769
4769
 
4770
- // ../../node_modules/smol-toml/dist/date.js
4771
- var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
4772
- var TomlDate = class _TomlDate extends Date {
4773
- #hasDate = false;
4774
- #hasTime = false;
4775
- #offset = null;
4776
- constructor(date) {
4777
- let hasDate = true;
4778
- let hasTime = true;
4779
- let offset = "Z";
4780
- if (typeof date === "string") {
4781
- let match = date.match(DATE_TIME_RE);
4782
- if (match) {
4783
- if (!match[1]) {
4784
- hasDate = false;
4785
- date = `0000-01-01T${date}`;
4786
- }
4787
- hasTime = !!match[2];
4788
- hasTime && date[10] === " " && (date = date.replace(" ", "T"));
4789
- if (match[2] && +match[2] > 23) {
4790
- date = "";
4791
- } else {
4792
- offset = match[3] || null;
4793
- date = date.toUpperCase();
4794
- if (!offset && hasTime)
4795
- date += "Z";
4796
- }
4797
- } else {
4798
- date = "";
4799
- }
4800
- }
4801
- super(date);
4802
- if (!isNaN(this.getTime())) {
4803
- this.#hasDate = hasDate;
4804
- this.#hasTime = hasTime;
4805
- this.#offset = offset;
4806
- }
4807
- }
4808
- isDateTime() {
4809
- return this.#hasDate && this.#hasTime;
4810
- }
4811
- isLocal() {
4812
- return !this.#hasDate || !this.#hasTime || !this.#offset;
4813
- }
4814
- isDate() {
4815
- return this.#hasDate && !this.#hasTime;
4816
- }
4817
- isTime() {
4818
- return this.#hasTime && !this.#hasDate;
4819
- }
4820
- isValid() {
4821
- return this.#hasDate || this.#hasTime;
4822
- }
4823
- toISOString() {
4824
- let iso = super.toISOString();
4825
- if (this.isDate())
4826
- return iso.slice(0, 10);
4827
- if (this.isTime())
4828
- return iso.slice(11, 23);
4829
- if (this.#offset === null)
4830
- return iso.slice(0, -1);
4831
- if (this.#offset === "Z")
4832
- return iso;
4833
- let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
4834
- offset = this.#offset[0] === "-" ? offset : -offset;
4835
- let offsetDate = new Date(this.getTime() - offset * 6e4);
4836
- return offsetDate.toISOString().slice(0, -1) + this.#offset;
4837
- }
4838
- static wrapAsOffsetDateTime(jsDate, offset = "Z") {
4839
- let date = new _TomlDate(jsDate);
4840
- date.#offset = offset;
4841
- return date;
4842
- }
4843
- static wrapAsLocalDateTime(jsDate) {
4844
- let date = new _TomlDate(jsDate);
4845
- date.#offset = null;
4846
- return date;
4847
- }
4848
- static wrapAsLocalDate(jsDate) {
4849
- let date = new _TomlDate(jsDate);
4850
- date.#hasTime = false;
4851
- date.#offset = null;
4852
- return date;
4853
- }
4854
- static wrapAsLocalTime(jsDate) {
4855
- let date = new _TomlDate(jsDate);
4856
- date.#hasDate = false;
4857
- date.#offset = null;
4858
- return date;
4859
- }
4860
- };
4861
-
4862
4770
  // ../../node_modules/smol-toml/dist/error.js
4863
4771
  function getLineColFromPtr(string, ptr) {
4864
- let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
4772
+ let lines = string.slice(0, ptr).split(/\r?\n/);
4865
4773
  return [lines.length, lines.pop().length + 1];
4866
4774
  }
4867
4775
  function makeCodeBlock(string, line, column) {
4868
- let lines = string.split(/\r\n|\n|\r/g);
4776
+ let lines = string.split(/\r?\n/);
4869
4777
  let codeblock = "";
4870
4778
  let numberLen = (Math.log10(line + 1) | 0) + 1;
4871
4779
  for (let i = line - 1; i <= line + 1; i++) {
@@ -4883,7 +4791,7 @@ function makeCodeBlock(string, line, column) {
4883
4791
  }
4884
4792
  return codeblock;
4885
4793
  }
4886
- var TomlError = class extends Error {
4794
+ var TomlError = class _TomlError extends Error {
4887
4795
  line;
4888
4796
  column;
4889
4797
  codeblock;
@@ -4897,69 +4805,15 @@ ${codeblock}`, options);
4897
4805
  this.column = column;
4898
4806
  this.codeblock = codeblock;
4899
4807
  }
4900
- };
4901
-
4902
- // ../../node_modules/smol-toml/dist/util.js
4903
- function indexOfNewline(str, start = 0) {
4904
- let idx = str.indexOf("\n", start);
4905
- if (str.charCodeAt(idx - 1) === 13)
4906
- idx--;
4907
- return idx;
4908
- }
4909
- function skipComment(ctx) {
4910
- for (; ctx.p < ctx.s.length; ctx.p++) {
4911
- let c = ctx.s.charCodeAt(ctx.p);
4912
- if (c === 10)
4913
- break;
4914
- if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
4915
- ctx.p++;
4916
- break;
4917
- }
4918
- if (c < 32 && c !== 9 || c === 127) {
4919
- throw new TomlError("control characters are not allowed in comments", {
4920
- toml: ctx.s,
4921
- ptr: ctx.p
4922
- });
4923
- }
4924
- }
4925
- }
4926
- function skipVoid(ctx, banNewLines, banComments) {
4927
- let c;
4928
- while (1) {
4929
- while ((c = ctx.s.charCodeAt(ctx.p)) === 32 || c === 9 || !banNewLines && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
4930
- ctx.p++;
4931
- if (banComments || c !== 35)
4932
- break;
4933
- skipComment(ctx);
4934
- }
4935
- }
4936
- function skipUntil(ctx, sep, end) {
4937
- let ptr = ctx.p;
4938
- if (!end) {
4939
- ptr = indexOfNewline(ctx.s, ptr);
4940
- ctx.p = ptr < 0 ? ctx.s.length : ptr;
4941
- return;
4808
+ /** @internal */
4809
+ static x(message, ctx, ptr) {
4810
+ throw new _TomlError(message, { toml: ctx.s, ptr: ptr ?? ctx.p });
4942
4811
  }
4943
- for (; ctx.p < ctx.s.length; ctx.p++) {
4944
- let c = ctx.s.charCodeAt(ctx.p);
4945
- if (c === 35) {
4946
- skipComment(ctx);
4947
- } else if (c === end || c === sep) {
4948
- return;
4949
- }
4950
- }
4951
- throw new TomlError("cannot find end of structure", {
4952
- toml: ctx.s,
4953
- ptr
4954
- });
4955
- }
4812
+ };
4956
4813
 
4957
4814
  // ../../node_modules/smol-toml/dist/primitive.js
4958
- var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
4959
- var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
4960
- var LEADING_ZERO = /^[+-]?0[0-9_]/;
4961
4815
  function parseString(ctx) {
4962
- let start = ctx.p;
4816
+ let startPtr = ctx.p;
4963
4817
  let c = ctx.s.charCodeAt(ctx.p++);
4964
4818
  let first = c;
4965
4819
  let isLiteral = c === 39;
@@ -4978,10 +4832,7 @@ function parseString(ctx) {
4978
4832
  if (isMultiline && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
4979
4833
  state = state && 3;
4980
4834
  } else if (c < 32 && c !== 9 || c === 127) {
4981
- throw new TomlError("control characters are not allowed in strings", {
4982
- toml: ctx.s,
4983
- ptr: ctx.p
4984
- });
4835
+ TomlError.x("control characters are not allowed in strings", ctx);
4985
4836
  } else if ((!state || state === 3) && c === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
4986
4837
  if (isMultiline) {
4987
4838
  if (ctx.s.charCodeAt(ctx.p + 3) === first)
@@ -4989,8 +4840,10 @@ function parseString(ctx) {
4989
4840
  if (ctx.s.charCodeAt(ctx.p + 3) === first)
4990
4841
  ctx.p++;
4991
4842
  }
4992
- if (!state)
4993
- parsed += ctx.s.slice(sliceStart, ctx.p);
4843
+ if (!state) {
4844
+ let s = ctx.s.slice(sliceStart, ctx.p);
4845
+ parsed = parsed ? parsed + s : s;
4846
+ }
4994
4847
  ctx.p += isMultiline ? 3 : 1;
4995
4848
  return parsed;
4996
4849
  } else if (!state) {
@@ -5000,10 +4853,11 @@ function parseString(ctx) {
5000
4853
  }
5001
4854
  } else if (state === 1) {
5002
4855
  if (c === 120 || c === 117 || c === 85) {
4856
+ let errPtr = ctx.p++ - 1;
5003
4857
  let value3 = 0;
5004
4858
  let len = c === 120 ? 2 : c === 117 ? 4 : 8;
5005
4859
  for (let j = 0; j < len; j++, ctx.p++) {
5006
- let hex = ctx.s.charCodeAt(ctx.p + 1);
4860
+ let hex = ctx.s.charCodeAt(ctx.p);
5007
4861
  let digit = (
5008
4862
  /* 0-9 */
5009
4863
  hex >= 48 && hex <= 57 ? hex - 48 : (
@@ -5015,16 +4869,16 @@ function parseString(ctx) {
5015
4869
  )
5016
4870
  );
5017
4871
  if (digit < 0)
5018
- throw new TomlError("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
4872
+ TomlError.x("invalid non-hex character in unicode escape", ctx);
5019
4873
  value3 = value3 << 4 | digit;
5020
4874
  }
5021
4875
  if (value3 < 0 || value3 > 1114111 || value3 >= 55296 && value3 <= 57343) {
5022
- throw new TomlError("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
4876
+ TomlError.x("invalid unicode escape", ctx, errPtr);
5023
4877
  }
5024
4878
  parsed += String.fromCodePoint(value3);
5025
- sliceStart = ctx.p + 1;
4879
+ sliceStart = ctx.p--;
5026
4880
  state = 0;
5027
- } else if (c === 32 || c === 9) {
4881
+ } else if (isMultiline && (c === 32 || c === 9)) {
5028
4882
  state = 2;
5029
4883
  } else {
5030
4884
  if (c === 98)
@@ -5044,84 +4898,150 @@ function parseString(ctx) {
5044
4898
  else if (c === 92)
5045
4899
  parsed += "\\";
5046
4900
  else
5047
- throw new TomlError("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
4901
+ TomlError.x("unrecognised escape sequence", ctx);
5048
4902
  sliceStart = ctx.p + 1;
5049
4903
  state = 0;
5050
4904
  }
5051
4905
  } else if (c !== 32 && c !== 9) {
5052
- if (state === 2) {
5053
- throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
5054
- toml: ctx.s,
5055
- ptr: sliceStart
5056
- });
5057
- }
4906
+ if (state === 2)
4907
+ TomlError.x("invalid escape: only line-ending whitespace may be escaped", ctx, sliceStart);
5058
4908
  state = !isLiteral && c === 92 ? 1 : 0;
5059
4909
  sliceStart = ctx.p;
5060
4910
  }
5061
4911
  }
5062
- throw new TomlError("unfinished string", { toml: ctx.s, ptr: start });
5063
- }
5064
- function sliceAndTrimEndOf(ctx, start, end) {
5065
- let value3 = ctx.s.slice(start, end);
5066
- let commentIdx = value3.indexOf("#");
5067
- if (commentIdx > 0) {
5068
- skipComment({ s: value3, p: commentIdx, d: 0 });
5069
- value3 = value3.slice(0, commentIdx);
5070
- }
5071
- return value3.trimEnd();
4912
+ TomlError.x("unfinished string", ctx, startPtr);
5072
4913
  }
5073
- function parseValue(ctx, integersAsBigInt, end) {
5074
- let ptr = ctx.p;
5075
- let err = { toml: ctx.s, ptr };
5076
- skipUntil(ctx, 44, end);
5077
- let value3 = sliceAndTrimEndOf(ctx, ptr, ctx.p);
5078
- if (!value3)
5079
- throw new TomlError("incomplete declaration: value expected", err);
5080
- if (value3 === "-inf")
5081
- return -Infinity;
5082
- if (value3 === "inf" || value3 === "+inf")
5083
- return Infinity;
5084
- if (value3 === "nan" || value3 === "+nan" || value3 === "-nan")
5085
- return NaN;
5086
- if (value3 === "-0")
5087
- return integersAsBigInt ? 0n : 0;
5088
- let isInt = INT_REGEX.test(value3);
5089
- if (isInt || FLOAT_REGEX.test(value3)) {
5090
- if (LEADING_ZERO.test(value3)) {
5091
- throw new TomlError("leading zeroes are not allowed", err);
5092
- }
5093
- value3 = value3.replace(/_/g, "");
5094
- let numeric = +value3;
5095
- if (isNaN(numeric)) {
5096
- throw new TomlError("invalid number", err);
5097
- }
5098
- if (isInt) {
5099
- if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
5100
- throw new TomlError("integer value cannot be represented losslessly", err);
4914
+
4915
+ // ../../node_modules/smol-toml/dist/date.js
4916
+ var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;
4917
+ var TomlDate = class _TomlDate extends Date {
4918
+ #hasDate = false;
4919
+ #hasTime = false;
4920
+ #offset = null;
4921
+ constructor(date, fasttype, unsafeDelim) {
4922
+ let hasDate = true;
4923
+ let hasTime = true;
4924
+ let offset = "Z";
4925
+ let c;
4926
+ if (typeof date === "string") {
4927
+ if (fasttype)
4928
+ prep: {
4929
+ if (fasttype < 3) {
4930
+ if (+date.slice(11, 13) > 23) {
4931
+ date = "";
4932
+ break prep;
4933
+ }
4934
+ if (fasttype === 2) {
4935
+ offset = null;
4936
+ date += "Z";
4937
+ } else if ((c = date.charCodeAt(date.length - 1)) !== 90 && c !== 122) {
4938
+ offset = date.slice(date.length - 6);
4939
+ }
4940
+ if (unsafeDelim)
4941
+ date = date.slice(0, 10) + "T" + date.slice(11);
4942
+ } else if (fasttype === 4) {
4943
+ date = +date.slice(0, 2) > 23 ? "" : `0000-01-01T${date}Z`;
4944
+ }
4945
+ hasDate = fasttype !== 4;
4946
+ hasTime = fasttype !== 3;
4947
+ }
4948
+ else {
4949
+ let match = date.match(DATE_TIME_RE);
4950
+ if (match) {
4951
+ if (!match[1]) {
4952
+ hasDate = false;
4953
+ date = `0000-01-01T${date}`;
4954
+ }
4955
+ hasTime = !!match[2];
4956
+ hasTime && date[10] === " " && (date = date.replace(" ", "T"));
4957
+ if (match[2] && +match[2] > 23) {
4958
+ date = "";
4959
+ } else {
4960
+ offset = match[3] || null;
4961
+ if (!offset && hasTime)
4962
+ date += "Z";
4963
+ }
4964
+ } else {
4965
+ date = "";
4966
+ }
5101
4967
  }
5102
- if (isInt || integersAsBigInt === true)
5103
- numeric = BigInt(value3);
5104
4968
  }
5105
- return numeric;
4969
+ super(date);
4970
+ if (!isNaN(this.getTime())) {
4971
+ this.#hasDate = hasDate;
4972
+ this.#hasTime = hasTime;
4973
+ this.#offset = offset;
4974
+ }
5106
4975
  }
5107
- const date = new TomlDate(value3);
5108
- if (!date.isValid())
5109
- throw new TomlError("invalid value", err);
5110
- return date;
5111
- }
4976
+ isDateTime() {
4977
+ return this.#hasDate && this.#hasTime;
4978
+ }
4979
+ isLocal() {
4980
+ return !this.#hasDate || !this.#hasTime || !this.#offset;
4981
+ }
4982
+ isDate() {
4983
+ return this.#hasDate && !this.#hasTime;
4984
+ }
4985
+ isTime() {
4986
+ return this.#hasTime && !this.#hasDate;
4987
+ }
4988
+ isValid() {
4989
+ return this.#hasDate || this.#hasTime;
4990
+ }
4991
+ toISOString() {
4992
+ let iso = super.toISOString();
4993
+ if (this.isDate())
4994
+ return iso.slice(0, 10);
4995
+ if (this.isTime())
4996
+ return iso.slice(11, 23);
4997
+ if (this.#offset === null)
4998
+ return iso.slice(0, -1);
4999
+ if (this.#offset === "Z" || this.#offset === "z")
5000
+ return iso;
5001
+ let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
5002
+ offset = this.#offset[0] === "-" ? offset : -offset;
5003
+ let offsetDate = new Date(this.getTime() - offset * 6e4);
5004
+ return offsetDate.toISOString().slice(0, -1) + this.#offset;
5005
+ }
5006
+ static wrapAsOffsetDateTime(jsDate, offset = "Z") {
5007
+ let date = new _TomlDate(jsDate);
5008
+ date.#offset = offset;
5009
+ return date;
5010
+ }
5011
+ static wrapAsLocalDateTime(jsDate) {
5012
+ let date = new _TomlDate(jsDate);
5013
+ date.#offset = null;
5014
+ return date;
5015
+ }
5016
+ static wrapAsLocalDate(jsDate) {
5017
+ let date = new _TomlDate(jsDate);
5018
+ date.#hasTime = false;
5019
+ date.#offset = null;
5020
+ return date;
5021
+ }
5022
+ static wrapAsLocalTime(jsDate) {
5023
+ let date = new _TomlDate(jsDate);
5024
+ date.#hasDate = false;
5025
+ date.#offset = null;
5026
+ return date;
5027
+ }
5028
+ };
5112
5029
 
5113
5030
  // ../../node_modules/smol-toml/dist/extract.js
5114
- function extractValue(ctx, end, integersAsBigInt) {
5115
- let ptr = ctx.p;
5116
- let c = ctx.s.charCodeAt(ptr);
5031
+ function isDigit(char, base = 10) {
5032
+ return base === 16 ? char > 47 && char < 58 || char > 64 && char < 71 || char > 96 && char < 103 : char > 47 && char < 48 + base;
5033
+ }
5034
+ function isEndOfValue(char, delim) {
5035
+ return char === 32 || char === 9 || char === 10 || char === 13 || // Structure end or next value delimiter
5036
+ delim && (char === delim || char === 44) || // Comment
5037
+ char === 35;
5038
+ }
5039
+ function extractValue(ctx, end) {
5040
+ let errPtr = ctx.p;
5041
+ let c = ctx.s.charCodeAt(ctx.p);
5117
5042
  if (c === 91 || c === 123) {
5118
- if (!ctx.d--) {
5119
- throw new TomlError("document contains excessively nested structures. aborting.", {
5120
- toml: ctx.s,
5121
- ptr
5122
- });
5123
- }
5124
- let value3 = c === 91 ? parseArray(ctx, integersAsBigInt) : parseInlineTable(ctx, integersAsBigInt);
5043
+ ctx.d-- || TomlError.x("document contains excessively nested structures. aborting.", ctx);
5044
+ let value3 = c === 91 ? parseArray(ctx) : parseInlineTable(ctx);
5125
5045
  ctx.d++;
5126
5046
  return value3;
5127
5047
  }
@@ -5130,90 +5050,262 @@ function extractValue(ctx, end, integersAsBigInt) {
5130
5050
  }
5131
5051
  if (c === 116) {
5132
5052
  if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
5133
- throw new TomlError("invalid value", { toml: ctx.s, ptr });
5134
- ctx.p++;
5135
- return true;
5053
+ TomlError.x("invalid value", ctx, errPtr);
5054
+ return ctx.p++, true;
5136
5055
  }
5137
5056
  if (c === 102) {
5138
5057
  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)
5139
- throw new TomlError("invalid value", { toml: ctx.s, ptr });
5140
- ctx.p++;
5141
- return false;
5058
+ TomlError.x("invalid value", ctx, errPtr);
5059
+ return ctx.p++, false;
5060
+ }
5061
+ if (c === 43 || c === 45) {
5062
+ return parseNumber(ctx, ctx.p, ctx.s.charCodeAt(++ctx.p), 44 - c, end);
5063
+ }
5064
+ if (ctx.s.charCodeAt(ctx.p + 4) === 45 && ctx.s.charCodeAt(ctx.p + 7) === 45) {
5065
+ return parseDate(ctx, c, end);
5066
+ }
5067
+ if (ctx.s.charCodeAt(ctx.p + 2) === 58) {
5068
+ return parseTime(ctx, c, end);
5069
+ }
5070
+ return parseNumber(ctx, ctx.p, c, 0, end);
5071
+ }
5072
+ function parseNumber(ctx, startPtr, startChr, sign, endChr) {
5073
+ let c = startChr;
5074
+ let state = 0;
5075
+ let hasUnderscores = false;
5076
+ if (c === 105) {
5077
+ if (ctx.s.charCodeAt(++ctx.p) !== 110 || ctx.s.charCodeAt(++ctx.p) !== 102)
5078
+ TomlError.x("invalid value", ctx, startPtr);
5079
+ return ctx.p++, (sign || 1) / 0;
5080
+ }
5081
+ if (c === 110) {
5082
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 110)
5083
+ TomlError.x("invalid value", ctx, startPtr);
5084
+ return ctx.p++, NaN;
5085
+ }
5086
+ if (c === 48) {
5087
+ if (++ctx.p >= ctx.s.length || isEndOfValue(c = ctx.s.charCodeAt(ctx.p), endChr))
5088
+ return ctx.bi === true ? 0n : 0;
5089
+ if (!sign) {
5090
+ if (c === 120)
5091
+ return parseIntegerBaseN(ctx, startPtr, 16, endChr);
5092
+ else if (c === 98)
5093
+ return parseIntegerBaseN(ctx, startPtr, 2, endChr);
5094
+ else if (c === 111)
5095
+ return parseIntegerBaseN(ctx, startPtr, 8, endChr);
5096
+ }
5097
+ if (c === 46)
5098
+ state = 2;
5099
+ else if (c === 101 || c === 69)
5100
+ state = 4;
5101
+ else
5102
+ TomlError.x("illegal leading zero", ctx, startPtr);
5103
+ } else if (!isDigit(c))
5104
+ TomlError.x("invalid value", ctx, startPtr);
5105
+ while (++ctx.p < ctx.s.length && (c = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c, endChr))) {
5106
+ if (!state)
5107
+ state = 1;
5108
+ if (c === 95) {
5109
+ if (!(state & 1))
5110
+ TomlError.x("illegal underscore", ctx);
5111
+ state += 11;
5112
+ hasUnderscores = true;
5113
+ } else if (state === 1 && c === 46)
5114
+ state = 2;
5115
+ else if ((state === 1 || state === 3) && (c === 101 || c === 69))
5116
+ state = 4;
5117
+ else if (state === 4 && (c === 43 || c === 45)) {
5118
+ } else if (!isDigit(c))
5119
+ TomlError.x(`illegal character in numeric literal`, ctx);
5120
+ else if (state > 9)
5121
+ state -= 11;
5122
+ else if (!(state & 1))
5123
+ state++;
5124
+ }
5125
+ if (!state) {
5126
+ let val = (startChr - 48) * (sign || 1);
5127
+ return ctx.bi === true ? BigInt(val) : val;
5128
+ }
5129
+ if (!(state & 1))
5130
+ TomlError.x("unfinished numeric value", ctx, startPtr);
5131
+ let str = ctx.s.slice(startPtr, ctx.p);
5132
+ if (hasUnderscores)
5133
+ str = str.replaceAll("_", "");
5134
+ return state > 1 ? parseFloat(str) : parseInteger(ctx, str, 10, startPtr);
5135
+ }
5136
+ function parseIntegerBaseN(ctx, startPtr, base, endChr) {
5137
+ let c, underscore = 1;
5138
+ while (++ctx.p < ctx.s.length && (c = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c, endChr))) {
5139
+ if (c === 95) {
5140
+ if (underscore & 1)
5141
+ TomlError.x("illegal underscore", ctx);
5142
+ underscore = 3;
5143
+ } else if (!isDigit(c, base))
5144
+ TomlError.x(`illegal character in numeric literal`, ctx);
5145
+ else if (underscore & 1)
5146
+ underscore--;
5147
+ }
5148
+ if (underscore & 1)
5149
+ TomlError.x("unfinished numeric value", ctx);
5150
+ let str = ctx.s.slice(startPtr + 2, ctx.p);
5151
+ if (underscore)
5152
+ str = str.replaceAll("_", "");
5153
+ return parseInteger(ctx, str, base, startPtr);
5154
+ }
5155
+ function parseInteger(ctx, str, base, startPtr) {
5156
+ if (ctx.bi !== true)
5157
+ int: {
5158
+ let val = parseInt(str, base);
5159
+ if (!Number.isSafeInteger(val)) {
5160
+ if (ctx.bi)
5161
+ break int;
5162
+ TomlError.x("integer value cannot be represented losslessly", ctx, startPtr);
5163
+ }
5164
+ return val;
5165
+ }
5166
+ return base === 10 ? BigInt(str) : BigInt((base === 2 ? "0b" : base === 8 ? "0o" : "0x") + str);
5167
+ }
5168
+ function parseDate(ctx, c, endChr) {
5169
+ let startPtr = ctx.p++, unsafeSeparator;
5170
+ if (!isDigit(c) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++))) {
5171
+ return parseNumber(ctx, ctx.p = startPtr, c, 0, endChr);
5172
+ }
5173
+ ctx.p += 5;
5174
+ if (!isDigit(ctx.s.charCodeAt(ctx.p++)))
5175
+ TomlError.x("invalid date-time: date part is malformed", ctx, startPtr);
5176
+ if (ctx.p >= ctx.s.length || ((c = ctx.s.charCodeAt(ctx.p)) !== 32 || (unsafeSeparator = true, !isDigit(ctx.s.charCodeAt(ctx.p + 1)))) && c !== 84 && c !== 116) {
5177
+ let t2 = ctx.s.slice(startPtr, ctx.p);
5178
+ return readDate(ctx, t2, 3, false, startPtr);
5179
+ }
5180
+ if (ctx.s.charCodeAt(ctx.p += 3) !== 58)
5181
+ TomlError.x("invalid date-time: time part is malformed", ctx, startPtr);
5182
+ if (ctx.s.charCodeAt(ctx.p += 3) === 58)
5183
+ ctx.p += 3;
5184
+ if (ctx.s.charCodeAt(ctx.p) === 46)
5185
+ while (isDigit(ctx.s.charCodeAt(++ctx.p)))
5186
+ ;
5187
+ if (c = ctx.s.charCodeAt(ctx.p)) {
5188
+ if (c === 90 || c === 122) {
5189
+ let t2 = ctx.s.slice(startPtr, ++ctx.p);
5190
+ return readDate(ctx, t2, 1, unsafeSeparator, startPtr, "[+00:00]");
5191
+ }
5192
+ if (c === 43 || c === 45) {
5193
+ let t2 = ctx.s.slice(startPtr, ctx.p += 6);
5194
+ return readDate(ctx, t2, 1, unsafeSeparator, startPtr, !ctx.ld && "[" + ctx.s.slice(ctx.p - 6, ctx.p) + "]");
5195
+ }
5196
+ }
5197
+ let t = ctx.s.slice(startPtr, ctx.p);
5198
+ return readDate(ctx, t, 2, unsafeSeparator, startPtr);
5199
+ }
5200
+ function parseTime(ctx, c, endChr) {
5201
+ let start = ctx.p;
5202
+ if (!isDigit(c) || !isDigit(ctx.s.charCodeAt(++ctx.p))) {
5203
+ return parseNumber(ctx, --ctx.p, c, 0, endChr);
5204
+ }
5205
+ if (ctx.s.charCodeAt(ctx.p += 4) === 58)
5206
+ ctx.p += 3;
5207
+ if (ctx.s.charCodeAt(ctx.p) === 46)
5208
+ while (isDigit(ctx.s.charCodeAt(++ctx.p)))
5209
+ ;
5210
+ let t = ctx.s.slice(start, ctx.p);
5211
+ return readDate(ctx, t, 4, false, start);
5212
+ }
5213
+ function readDate(ctx, str, type, unsafeDelim, errPtr, temporalSuffix) {
5214
+ if (ctx.ld) {
5215
+ let date = new TomlDate(str, type, unsafeDelim);
5216
+ if (!date.isValid())
5217
+ TomlError.x("invalid date", ctx, errPtr);
5218
+ return date;
5219
+ }
5220
+ try {
5221
+ if (temporalSuffix)
5222
+ str += temporalSuffix;
5223
+ switch (type) {
5224
+ case 1:
5225
+ return Temporal.ZonedDateTime.from(str);
5226
+ case 2:
5227
+ return Temporal.PlainDateTime.from(str);
5228
+ case 3:
5229
+ return Temporal.PlainDate.from(str);
5230
+ case 4:
5231
+ return Temporal.PlainTime.from(str);
5232
+ }
5233
+ } catch (e) {
5234
+ TomlError.x(e instanceof Error ? e.message : "" + e, ctx, errPtr);
5235
+ }
5236
+ }
5237
+
5238
+ // ../../node_modules/smol-toml/dist/util.js
5239
+ function skipComment(ctx) {
5240
+ for (; ctx.p < ctx.s.length; ctx.p++) {
5241
+ let c = ctx.s.charCodeAt(ctx.p);
5242
+ if (c === 10)
5243
+ break;
5244
+ if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
5245
+ ctx.p++;
5246
+ break;
5247
+ }
5248
+ if (c < 32 && c !== 9 || c === 127) {
5249
+ TomlError.x("control characters are not allowed in comments", ctx);
5250
+ }
5251
+ }
5252
+ }
5253
+ function skipVoid(ctx, banNewLines, banComments) {
5254
+ let c;
5255
+ while (ctx.p < ctx.s.length) {
5256
+ while (ctx.p < ctx.s.length && ((c = ctx.s.charCodeAt(ctx.p)) === 32 || c === 9 || !banNewLines && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)))
5257
+ ctx.p++;
5258
+ if (banComments || c !== 35)
5259
+ break;
5260
+ skipComment(ctx);
5142
5261
  }
5143
- return parseValue(ctx, integersAsBigInt, end);
5144
5262
  }
5145
5263
 
5146
5264
  // ../../node_modules/smol-toml/dist/struct.js
5147
- var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
5148
- function parseKey(ctx, end = "=") {
5149
- let start = ctx.p;
5150
- let dot = start - 1;
5265
+ function parseKey(ctx, end = 61) {
5266
+ let startPtr;
5267
+ let state = 0;
5151
5268
  let parsed = [];
5152
- let endPtr = ctx.s.indexOf(end, start);
5153
- if (endPtr < 0) {
5154
- throw new TomlError("incomplete key-value: cannot find end of key", {
5155
- toml: ctx.s,
5156
- ptr: start
5157
- });
5158
- }
5269
+ let sliceStart;
5270
+ let c = ctx.s.charCodeAt(startPtr = ctx.p);
5159
5271
  do {
5160
- let c = ctx.s.charCodeAt(ctx.p = ++dot);
5161
- if (c !== 32 && c !== 9) {
5162
- if (c === 34 || c === 39) {
5163
- if (c === ctx.s.charCodeAt(ctx.p + 1) && c === ctx.s.charCodeAt(ctx.p + 2)) {
5164
- throw new TomlError("multiline strings are not allowed in keys", {
5165
- toml: ctx.s,
5166
- ptr: ctx.p
5167
- });
5168
- }
5169
- let part = parseString(ctx);
5170
- dot = ctx.s.indexOf(".", ctx.p);
5171
- let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
5172
- let newLine = indexOfNewline(strEnd);
5173
- if (newLine > -1) {
5174
- throw new TomlError("newlines are not allowed in keys", {
5175
- toml: ctx.s,
5176
- ptr: newLine
5177
- });
5178
- }
5179
- if (strEnd.trimStart()) {
5180
- throw new TomlError("found extra tokens after the string part", {
5181
- toml: ctx.s,
5182
- ptr: ctx.p
5183
- });
5184
- }
5185
- if (endPtr < ctx.p) {
5186
- endPtr = ctx.s.indexOf(end, ctx.p);
5187
- if (endPtr < 0) {
5188
- throw new TomlError("incomplete key-value: cannot find end of key", {
5189
- toml: ctx.s,
5190
- ptr: start
5191
- });
5192
- }
5193
- }
5194
- parsed.push(part);
5195
- } else {
5196
- dot = ctx.s.indexOf(".", ctx.p);
5197
- let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
5198
- if (!KEY_PART_RE.test(part)) {
5199
- throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
5200
- toml: ctx.s,
5201
- ptr: ctx.p
5202
- });
5203
- }
5204
- parsed.push(part.trimEnd());
5272
+ if (c === end) {
5273
+ if (!state)
5274
+ TomlError.x("unexpected end of key", ctx);
5275
+ if (state === 1)
5276
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
5277
+ return ctx.p++, parsed;
5278
+ } else if (c === 46) {
5279
+ if (!state)
5280
+ TomlError.x("illegal empty bare key", ctx);
5281
+ if (state === 1)
5282
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
5283
+ state = 0;
5284
+ } else if (!state && (c === 34 || c === 39)) {
5285
+ if (c === ctx.s.charCodeAt(ctx.p + 1) && c === ctx.s.charCodeAt(ctx.p + 2))
5286
+ TomlError.x("illegal quoted key: multiline strings are not allowed", ctx);
5287
+ parsed.push(parseString(ctx));
5288
+ state = 2;
5289
+ ctx.p--;
5290
+ } else if (c === 32 || c === 9) {
5291
+ if (state === 1) {
5292
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
5293
+ state = 2;
5205
5294
  }
5295
+ } else if (state === 2 || c < 48 && c !== 45 || c > 57 && c < 65 || c > 90 && c < 97 && c !== 95 || c > 122) {
5296
+ TomlError.x("illegal character in key", ctx);
5297
+ } else if (!state) {
5298
+ state = 1;
5299
+ sliceStart = ctx.p;
5206
5300
  }
5207
- } while (dot + 1 && dot < endPtr);
5208
- ctx.p = endPtr + 1;
5209
- skipVoid(ctx, true, true);
5210
- return parsed;
5301
+ } while (c = ctx.s.charCodeAt(++ctx.p));
5302
+ TomlError.x("incomplete key-value: cannot find end of key", ctx, startPtr);
5211
5303
  }
5212
- function parseInlineTable(ctx, integersAsBigInt) {
5213
- let res = {};
5304
+ function parseInlineTable(ctx) {
5305
+ let startPtr = ctx.p++;
5306
+ let res = /* @__PURE__ */ Object.create(null);
5214
5307
  let seen = /* @__PURE__ */ new Set();
5215
5308
  let c;
5216
- ctx.p++;
5217
5309
  while (ctx.p < ctx.s.length) {
5218
5310
  skipVoid(ctx);
5219
5311
  if ((c = ctx.s.charCodeAt(ctx.p)) === 125) {
@@ -5223,70 +5315,71 @@ function parseInlineTable(ctx, integersAsBigInt) {
5223
5315
  let k;
5224
5316
  let t = res;
5225
5317
  let hasOwn = false;
5226
- let p = ctx.p;
5318
+ let errPtr = ctx.p;
5227
5319
  let key = parseKey(ctx);
5228
5320
  for (let i = 0; i < key.length; i++) {
5229
5321
  if (i)
5230
- t = hasOwn ? t[k] : t[k] = {};
5322
+ t = hasOwn ? t[k] : t[k] = /* @__PURE__ */ Object.create(null);
5231
5323
  k = key[i];
5232
5324
  if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
5233
- throw new TomlError("trying to redefine an already defined value", {
5234
- toml: ctx.s,
5235
- ptr: p
5236
- });
5325
+ TomlError.x("trying to redefine an already defined value", ctx, errPtr);
5237
5326
  }
5238
- if (!hasOwn && k === "__proto__") {
5327
+ let unsafe = k === "__proto__";
5328
+ if (ctx.uk && (unsafe || k === "constructor")) {
5329
+ t = ctx.uk !== 1 && TomlError.x("document contains an unsafe property", ctx, errPtr);
5330
+ break;
5331
+ }
5332
+ if (!hasOwn && unsafe) {
5239
5333
  Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
5240
5334
  }
5241
5335
  }
5242
5336
  if (hasOwn) {
5243
- throw new TomlError("trying to redefine an already defined value", {
5244
- toml: ctx.s,
5245
- ptr: ctx.p
5246
- });
5337
+ TomlError.x("trying to redefine an already defined value", ctx, errPtr);
5247
5338
  }
5248
- let value3 = extractValue(ctx, 125, integersAsBigInt);
5249
- seen.add(t[k] = value3);
5339
+ skipVoid(ctx, true, true);
5340
+ let value3 = extractValue(
5341
+ ctx,
5342
+ 125
5343
+ /* } */
5344
+ );
5345
+ if (t && typeof (t[k] = value3) === "object")
5346
+ seen.add(value3);
5250
5347
  skipVoid(ctx);
5251
5348
  if ((c = ctx.s.charCodeAt(ctx.p++)) === 125) {
5252
5349
  return res;
5253
5350
  }
5254
- if (c !== 44) {
5255
- throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
5256
- }
5351
+ if (c !== 44)
5352
+ TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
5257
5353
  }
5258
- throw new TomlError("unfinished table encountered", {
5259
- toml: ctx.s,
5260
- ptr: ctx.p
5261
- });
5354
+ TomlError.x("unfinished table", ctx, startPtr);
5262
5355
  }
5263
- function parseArray(ctx, integersAsBigInt) {
5356
+ function parseArray(ctx) {
5357
+ let startPtr = ctx.p++;
5264
5358
  let res = [];
5265
5359
  let c;
5266
- ctx.p++;
5267
5360
  while (ctx.p < ctx.s.length) {
5268
5361
  skipVoid(ctx);
5269
5362
  if ((c = ctx.s.charCodeAt(ctx.p)) === 93) {
5270
5363
  ctx.p++;
5271
5364
  return res;
5272
5365
  }
5273
- res.push(extractValue(ctx, 93, integersAsBigInt));
5366
+ res.push(extractValue(
5367
+ ctx,
5368
+ 93
5369
+ /* ] */
5370
+ ));
5274
5371
  skipVoid(ctx);
5275
5372
  if ((c = ctx.s.charCodeAt(ctx.p++)) === 93) {
5276
5373
  return res;
5277
5374
  }
5278
- if (c !== 44) {
5279
- throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
5280
- }
5375
+ if (c !== 44)
5376
+ TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
5281
5377
  }
5282
- throw new TomlError("unfinished array encountered", {
5283
- toml: ctx.s,
5284
- ptr: ctx.p
5285
- });
5378
+ TomlError.x("unfinished array", ctx, startPtr);
5286
5379
  }
5287
5380
 
5288
5381
  // ../../node_modules/smol-toml/dist/parse.js
5289
- function peekTable(key, table, meta, type) {
5382
+ function peekTable(ctx, key, table, meta, type) {
5290
5383
  let t = table;
5291
5384
  let m = meta;
5292
5385
  let k;
@@ -5294,7 +5387,7 @@ function peekTable(key, table, meta, type) {
5294
5387
  let state;
5295
5388
  for (let i = 0; i < key.length; i++) {
5296
5389
  if (i) {
5297
- t = hasOwn ? t[k] : t[k] = {};
5390
+ t = hasOwn ? t[k] : t[k] = /* @__PURE__ */ Object.create(null);
5298
5391
  m = (state = m[k]).c;
5299
5392
  if (type === 0 && (state.t === 1 || state.t === 2)) {
5300
5393
  return null;
@@ -5310,7 +5403,10 @@ function peekTable(key, table, meta, type) {
5310
5403
  return null;
5311
5404
  }
5312
5405
  if (!hasOwn) {
5313
- if (k === "__proto__") {
5406
+ let unsafe = k === "__proto__";
5407
+ if (ctx.uk && (unsafe || k === "constructor"))
5408
+ return false;
5409
+ if (unsafe) {
5314
5410
  Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
5315
5411
  Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
5316
5412
  }
@@ -5318,7 +5414,7 @@ function peekTable(key, table, meta, type) {
5318
5414
  t: i < key.length - 1 && type === 2 ? 3 : type,
5319
5415
  d: false,
5320
5416
  i: 0,
5321
- c: {}
5417
+ c: /* @__PURE__ */ Object.create(null)
5322
5418
  };
5323
5419
  }
5324
5420
  }
@@ -5331,43 +5427,60 @@ function peekTable(key, table, meta, type) {
5331
5427
  state.d = true;
5332
5428
  t[k] = [];
5333
5429
  }
5334
- t[k].push(t = {});
5335
- state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
5430
+ t[k].push(t = /* @__PURE__ */ Object.create(null));
5431
+ state.c[state.i++] = state = { t: 1, d: false, i: 0, c: /* @__PURE__ */ Object.create(null) };
5336
5432
  }
5337
5433
  if (state.d) {
5338
5434
  return null;
5339
5435
  }
5340
5436
  state.d = true;
5341
5437
  if (type === 1) {
5342
- t = hasOwn ? t[k] : t[k] = {};
5438
+ t = hasOwn ? t[k] : t[k] = /* @__PURE__ */ Object.create(null);
5343
5439
  } else if (type === 0 && hasOwn) {
5344
5440
  return null;
5345
5441
  }
5346
5442
  return [k, t, state.c];
5347
5443
  }
5348
- function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
5349
- let ctx = { s: toml, p: 0, d: maxDepth };
5350
- let res = {};
5351
- let meta = {};
5444
+ function validateTablePeek(ctx, peek, ptr) {
5445
+ if (peek === null || ctx.uk === 2)
5446
+ TomlError.x(peek === null ? "trying to redefine an already defined table or value" : "document contains an unsafe property", ctx, ptr);
5447
+ }
5448
+ function parse(toml, options = {}) {
5449
+ let ctx = {
5450
+ s: toml,
5451
+ p: 0,
5452
+ d: options.maxDepth ?? 1e3,
5453
+ bi: options.integersAsBigInt ?? false,
5454
+ ld: options.useLegacyDate ?? true,
5455
+ uk: options.unsafeKeyBehaviour === "throw" ? 2 : options.unsafeKeyBehaviour === "drop" ? 1 : 0
5456
+ };
5457
+ let res = /* @__PURE__ */ Object.create(null);
5458
+ let meta = /* @__PURE__ */ Object.create(null);
5352
5459
  let tmp;
5460
+ let skipping = false;
5353
5461
  let tbl = res;
5354
5462
  let m = meta;
5463
+ if (toml.charCodeAt(0) === 65279)
5464
+ ctx.p++;
5355
5465
  skipVoid(ctx);
5356
5466
  while (ctx.p < toml.length) {
5357
5467
  if (toml.charCodeAt(ctx.p) === 91) {
5358
5468
  let isTableArray = toml.charCodeAt(++ctx.p) === 91;
5359
5469
  tmp = ctx.p += +isTableArray;
5360
- let k = parseKey(ctx, "]");
5470
+ skipping = false;
5471
+ let k = parseKey(
5472
+ ctx,
5473
+ 93
5474
+ /* ] */
5475
+ );
5361
5476
  if (isTableArray) {
5362
- if (toml.charCodeAt(ctx.p - 1) !== 93) {
5363
- throw new TomlError("expected end of table declaration", {
5364
- toml,
5365
- ptr: ctx.p - 1
5366
- });
5477
+ if (toml.charCodeAt(ctx.p) !== 93) {
5478
+ TomlError.x("expected end of table array declaration", ctx);
5367
5479
  }
5368
5480
  ctx.p++;
5369
5481
  }
5370
5482
  let p = peekTable(
5483
+ ctx,
5371
5484
  k,
5372
5485
  res,
5373
5486
  meta,
@@ -5375,43 +5488,42 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
5375
5488
  /* Type.EXPLICIT */
5376
5489
  );
5377
5490
  if (!p) {
5378
- throw new TomlError("trying to redefine an already defined table or value", {
5379
- toml,
5380
- ptr: tmp
5381
- });
5491
+ validateTablePeek(ctx, p, tmp);
5492
+ skipping = true;
5493
+ } else {
5494
+ m = p[2];
5495
+ tbl = p[1];
5382
5496
  }
5383
- m = p[2];
5384
- tbl = p[1];
5385
5497
  } else {
5386
5498
  tmp = ctx.p;
5387
5499
  let k = parseKey(ctx);
5388
5500
  let p = peekTable(
5501
+ ctx,
5389
5502
  k,
5390
5503
  tbl,
5391
5504
  m,
5392
5505
  0
5393
5506
  /* Type.DOTTED */
5394
5507
  );
5395
- if (!p) {
5396
- throw new TomlError("trying to redefine an already defined table or value", {
5397
- toml,
5398
- ptr: tmp
5399
- });
5400
- }
5401
- p[1][p[0]] = extractValue(ctx, void 0, integersAsBigInt);
5508
+ if (!p && !skipping)
5509
+ validateTablePeek(ctx, p, tmp);
5510
+ skipVoid(ctx, true, true);
5511
+ let v = extractValue(ctx, void 0);
5512
+ if (p && !skipping)
5513
+ p[1][p[0]] = v;
5402
5514
  }
5403
5515
  skipVoid(ctx, true);
5404
- if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
5405
- throw new TomlError("each key-value declaration must be followed by an end-of-line", {
5406
- toml,
5407
- ptr: ctx.p
5408
- });
5516
+ if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && (tmp !== 13 || toml.charCodeAt(ctx.p + 1) !== 10)) {
5517
+ TomlError.x("each key-value declaration must be followed by an end-of-line", ctx);
5409
5518
  }
5410
5519
  skipVoid(ctx);
5411
5520
  }
5412
5521
  return res;
5413
5522
  }
5414
5523
 
5524
+ // ../../node_modules/smol-toml/dist/stringify.js
5525
+ var HAS_WELLFORMED = !!"".isWellFormed;
5526
+
5415
5527
  // ../crossfire/packages/domain/src/runtime/values.ts
5416
5528
  var MAX_INPUT_BYTES = 4 * 1024 * 1024;
5417
5529
  var MAX_REVIEW_BYTES = 8 * 1024 * 1024;
@@ -5881,11 +5993,11 @@ export {
5881
5993
  };
5882
5994
  /*! Bundled license information:
5883
5995
 
5884
- smol-toml/dist/date.js:
5885
5996
  smol-toml/dist/error.js:
5886
- smol-toml/dist/util.js:
5887
5997
  smol-toml/dist/primitive.js:
5998
+ smol-toml/dist/date.js:
5888
5999
  smol-toml/dist/extract.js:
6000
+ smol-toml/dist/util.js:
5889
6001
  smol-toml/dist/struct.js:
5890
6002
  smol-toml/dist/parse.js:
5891
6003
  smol-toml/dist/stringify.js:
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@ctlflow/fleet",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "publishConfig": { "access": "public" },
6
6
  "type": "module",
7
- "devDependencies": { "@ctlflow/crossfire-test-support": "0.1.2" },
7
+ "devDependencies": { "@ctlflow/crossfire-test-support": "0.1.4" },
8
8
  "bin": { "fleet": "./dist/bin/fleet.mjs" },
9
9
  "files": ["dist/bin", "docs", "README.md"],
10
10
  "exports": { "./executable": "./dist/bin/fleet.mjs", "./package.json": "./package.json" },
11
- "dependencies": { "@ctlflow/fleetd": "0.1.2" },
11
+ "dependencies": { "@ctlflow/fleetd": "0.1.4" },
12
12
  "engines": {
13
13
  "node": ">=26.0.0",
14
14
  "npm": ">=11.17.0"