@valkyrjaio/sindri 26.6.93 → 26.6.94

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.
@@ -211607,14 +211607,14 @@ var require_commonjs2 = __commonJS({
211607
211607
  "node_modules/brace-expansion/dist/commonjs/index.js"(exports2) {
211608
211608
  "use strict";
211609
211609
  Object.defineProperty(exports2, "__esModule", { value: true });
211610
- exports2.EXPANSION_MAX_REWRITES = exports2.EXPANSION_MAX_DEPTH = exports2.EXPANSION_MAX_LENGTH = exports2.EXPANSION_MAX = void 0;
211610
+ exports2.EXPANSION_MAX_STEPS = exports2.EXPANSION_MAX_REWRITES = exports2.EXPANSION_MAX_DEPTH = exports2.EXPANSION_MAX_LENGTH = exports2.EXPANSION_MAX = void 0;
211611
211611
  exports2.expand = expand;
211612
211612
  var balanced_match_1 = require_commonjs();
211613
- var escSlash = "\0SLASH" + Math.random() + "\0";
211614
- var escOpen = "\0OPEN" + Math.random() + "\0";
211615
- var escClose = "\0CLOSE" + Math.random() + "\0";
211616
- var escComma = "\0COMMA" + Math.random() + "\0";
211617
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
211613
+ var escSlash = "\0SLASH" + Math.random().toFixed(16) + "\0";
211614
+ var escOpen = "\0OPEN" + Math.random().toFixed(16) + "\0";
211615
+ var escClose = "\0CLOSE" + Math.random().toFixed(16) + "\0";
211616
+ var escComma = "\0COMMA" + Math.random().toFixed(16) + "\0";
211617
+ var escPeriod = "\0PERIOD" + Math.random().toFixed(16) + "\0";
211618
211618
  var escSlashPattern = new RegExp(escSlash, "g");
211619
211619
  var escOpenPattern = new RegExp(escOpen, "g");
211620
211620
  var escClosePattern = new RegExp(escClose, "g");
@@ -211629,6 +211629,8 @@ var require_commonjs2 = __commonJS({
211629
211629
  exports2.EXPANSION_MAX_LENGTH = 4e6;
211630
211630
  exports2.EXPANSION_MAX_DEPTH = 1e3;
211631
211631
  exports2.EXPANSION_MAX_REWRITES = 1e3;
211632
+ exports2.EXPANSION_MAX_STEPS = 2e7;
211633
+ var CALL_STEPS = 16;
211632
211634
  function numeric(str) {
211633
211635
  return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
211634
211636
  }
@@ -211643,11 +211645,70 @@ var require_commonjs2 = __commonJS({
211643
211645
  target.push(items[i]);
211644
211646
  }
211645
211647
  }
211646
- function parseCommaParts(str) {
211648
+ function balancedWithBudget(str, masked, budget) {
211649
+ if (budget.remaining < 0) {
211650
+ return void 0;
211651
+ }
211652
+ const r = (0, balanced_match_1.range)("{", "}", masked);
211653
+ const unmatched = r !== void 0 && masked.indexOf("{") < r[0];
211654
+ budget.remaining -= r && !unmatched ? r[1] + 1 : str.length;
211655
+ if (!r || budget.remaining < 0) {
211656
+ return void 0;
211657
+ }
211658
+ return {
211659
+ end: r[1],
211660
+ pre: str.slice(0, r[0]),
211661
+ body: str.slice(r[0] + 1, r[1]),
211662
+ post: str.slice(r[1] + 1),
211663
+ unmatched
211664
+ };
211665
+ }
211666
+ function maskUnmatchedOpens(masked, budget) {
211667
+ budget.remaining -= masked.length;
211668
+ const open = [];
211669
+ for (let i = 0; i < masked.length; i++) {
211670
+ const c = masked.charCodeAt(i);
211671
+ if (c === 123) {
211672
+ open.push(i);
211673
+ } else if (c === 125 && open.length) {
211674
+ open.pop();
211675
+ }
211676
+ }
211677
+ let out = "";
211678
+ let last = 0;
211679
+ for (let i = 0; i < open.length; i++) {
211680
+ const at = open[i];
211681
+ out += masked.slice(last, at) + "\0";
211682
+ last = at + 1;
211683
+ }
211684
+ return out + masked.slice(last);
211685
+ }
211686
+ function commaSetFollows(str, budget) {
211687
+ budget.remaining -= str.length;
211688
+ if (budget.remaining < 0) {
211689
+ return false;
211690
+ }
211691
+ let close = false;
211692
+ for (let i = str.length - 1; i >= 0; i--) {
211693
+ const c = str.charCodeAt(i);
211694
+ if (c === 125) {
211695
+ close = true;
211696
+ } else if (c === 10 || c === 13 || c === 8232 || c === 8233) {
211697
+ close = false;
211698
+ } else if (c === 44 && close && str.charCodeAt(i + 1) !== 44) {
211699
+ return true;
211700
+ }
211701
+ }
211702
+ return false;
211703
+ }
211704
+ function parseCommaParts(str, budget) {
211647
211705
  const parts = [];
211648
211706
  let carry = "";
211649
211707
  for (; ; ) {
211650
- const m = (0, balanced_match_1.balanced)("{", "}", str);
211708
+ const m = balancedWithBudget(str, str, budget);
211709
+ if (budget.remaining < 0) {
211710
+ return void 0;
211711
+ }
211651
211712
  if (!m) {
211652
211713
  const tail = str.split(",");
211653
211714
  tail[0] = carry + tail[0];
@@ -211667,15 +211728,22 @@ var require_commonjs2 = __commonJS({
211667
211728
  str = post;
211668
211729
  }
211669
211730
  }
211731
+ function bound(value, fallback) {
211732
+ return value === void 0 || isNaN(value) ? fallback : value;
211733
+ }
211670
211734
  function expand(str, options = {}) {
211671
211735
  if (!str) {
211672
211736
  return [];
211673
211737
  }
211674
- const { max = exports2.EXPANSION_MAX, maxLength = exports2.EXPANSION_MAX_LENGTH, maxDepth = exports2.EXPANSION_MAX_DEPTH, maxRewrites = exports2.EXPANSION_MAX_REWRITES } = options;
211738
+ const max = bound(options.max, exports2.EXPANSION_MAX);
211739
+ const maxLength = bound(options.maxLength, exports2.EXPANSION_MAX_LENGTH);
211740
+ const maxDepth = bound(options.maxDepth, exports2.EXPANSION_MAX_DEPTH);
211741
+ const maxRewrites = bound(options.maxRewrites, exports2.EXPANSION_MAX_REWRITES);
211742
+ const maxSteps = bound(options.maxSteps, exports2.EXPANSION_MAX_STEPS);
211675
211743
  if (str.slice(0, 2) === "{}") {
211676
211744
  str = "\\{\\}" + str.slice(2);
211677
211745
  }
211678
- return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
211746
+ return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, { remaining: maxSteps }, true).map(unescapeBraces);
211679
211747
  }
211680
211748
  function embrace(str) {
211681
211749
  return "{" + str + "}";
@@ -211689,25 +211757,32 @@ var require_commonjs2 = __commonJS({
211689
211757
  function gte(i, y) {
211690
211758
  return i >= y;
211691
211759
  }
211692
- function combine(acc, pre, values, max, maxLength, dropEmpties) {
211760
+ function combine(acc, pre, values, max, maxLength, dropEmpties, budget) {
211693
211761
  const out = [];
211694
211762
  let length = 0;
211695
- for (let a = 0; a < acc.length; a++) {
211696
- for (let v = 0; v < values.length; v++) {
211763
+ let nonEmpty;
211764
+ outer: for (let a = 0; a < acc.length; a++) {
211765
+ const prefix = acc[a] + pre;
211766
+ let vs = values;
211767
+ if (dropEmpties && !prefix) {
211768
+ if (!nonEmpty)
211769
+ nonEmpty = values.filter((v) => v);
211770
+ vs = nonEmpty;
211771
+ }
211772
+ for (let v = 0; v < vs.length; v++) {
211697
211773
  if (out.length >= max)
211698
- return out;
211699
- const expansion = acc[a] + pre + values[v];
211700
- if (dropEmpties && !expansion)
211701
- continue;
211774
+ break outer;
211775
+ const expansion = prefix + vs[v];
211702
211776
  if (length + expansion.length > maxLength)
211703
- return out;
211777
+ break outer;
211704
211778
  out.push(expansion);
211705
211779
  length += expansion.length;
211706
211780
  }
211707
211781
  }
211782
+ budget.remaining -= out.length;
211708
211783
  return out;
211709
211784
  }
211710
- function expandSequence(body, isAlphaSequence, max, maxLength) {
211785
+ function expandSequence(body, isAlphaSequence, max, maxLength, budget) {
211711
211786
  const n = body.split(/\.\./);
211712
211787
  const N = [];
211713
211788
  if (n[0] === void 0 || n[1] === void 0) {
@@ -211724,8 +211799,13 @@ var require_commonjs2 = __commonJS({
211724
211799
  test = gte;
211725
211800
  }
211726
211801
  const pad = n.some(isPadded);
211802
+ const cost = pad ? width : 1;
211727
211803
  let length = 0;
211728
211804
  for (let i = x; test(i, y) && N.length < max; i += incr) {
211805
+ budget.remaining -= cost;
211806
+ if (budget.remaining < 0) {
211807
+ return void 0;
211808
+ }
211729
211809
  let c;
211730
211810
  if (isAlphaSequence) {
211731
211811
  c = String.fromCharCode(i);
@@ -211753,7 +211833,8 @@ var require_commonjs2 = __commonJS({
211753
211833
  }
211754
211834
  return N;
211755
211835
  }
211756
- function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
211836
+ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, budget, isTop) {
211837
+ budget.remaining -= CALL_STEPS;
211757
211838
  if (depth > maxDepth) {
211758
211839
  return [str];
211759
211840
  }
@@ -211761,18 +211842,24 @@ var require_commonjs2 = __commonJS({
211761
211842
  let rewrites = 0;
211762
211843
  let dropEmpties = false;
211763
211844
  let firstGroup = true;
211845
+ let masked = str;
211764
211846
  for (; ; ) {
211765
- const m = (0, balanced_match_1.balanced)("{", "}", str);
211847
+ const m = balancedWithBudget(str, masked, budget);
211766
211848
  if (!m) {
211767
- return combine(acc, str, [""], max, maxLength, dropEmpties);
211849
+ return combine(acc, str, [""], max, maxLength, dropEmpties, budget);
211850
+ }
211851
+ if (m.unmatched) {
211852
+ masked = maskUnmatchedOpens(masked, budget);
211768
211853
  }
211769
211854
  const pre = m.pre;
211855
+ const literal = () => combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties, budget);
211770
211856
  if (/\$$/.test(pre)) {
211771
- acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length);
211857
+ acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length, budget);
211772
211858
  firstGroup = false;
211773
211859
  if (!m.post.length)
211774
211860
  break;
211775
211861
  str = m.post;
211862
+ masked = masked.slice(m.end + 1);
211776
211863
  continue;
211777
211864
  }
211778
211865
  const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
@@ -211780,13 +211867,14 @@ var require_commonjs2 = __commonJS({
211780
211867
  const isSequence = isNumericSequence || isAlphaSequence;
211781
211868
  const isOptions = m.body.indexOf(",") >= 0;
211782
211869
  if (!isSequence && !isOptions) {
211783
- if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) {
211870
+ if (rewrites < maxRewrites && commaSetFollows(m.post, budget)) {
211784
211871
  rewrites++;
211785
211872
  str = m.pre + "{" + m.body + escClose + m.post;
211873
+ masked = masked.slice(0, m.end) + escClose + masked.slice(m.end + 1);
211786
211874
  isTop = true;
211787
211875
  continue;
211788
211876
  }
211789
- return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties);
211877
+ return literal();
211790
211878
  }
211791
211879
  if (firstGroup) {
211792
211880
  dropEmpties = isTop && !isSequence;
@@ -211794,16 +211882,30 @@ var require_commonjs2 = __commonJS({
211794
211882
  }
211795
211883
  let values;
211796
211884
  if (isSequence) {
211797
- values = expandSequence(m.body, isAlphaSequence, max, maxLength);
211885
+ values = expandSequence(m.body, isAlphaSequence, max, maxLength, budget);
211886
+ if (!values) {
211887
+ return literal();
211888
+ }
211798
211889
  } else {
211799
- let n = parseCommaParts(m.body);
211890
+ let n = parseCommaParts(m.body, budget);
211891
+ if (!n) {
211892
+ return literal();
211893
+ }
211800
211894
  if (n.length === 1 && n[0] !== void 0) {
211801
- n = expand_(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
211895
+ n = expand_(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, budget, false).map(embrace);
211896
+ if (budget.remaining < 0) {
211897
+ return literal();
211898
+ }
211802
211899
  if (n.length === 1) {
211803
- acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
211900
+ const next2 = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length, budget);
211901
+ if (budget.remaining < 0) {
211902
+ return literal();
211903
+ }
211904
+ acc = next2;
211804
211905
  if (!m.post.length)
211805
211906
  break;
211806
211907
  str = m.post;
211908
+ masked = masked.slice(m.end + 1);
211807
211909
  continue;
211808
211910
  }
211809
211911
  }
@@ -211816,7 +211918,10 @@ var require_commonjs2 = __commonJS({
211816
211918
  values = [];
211817
211919
  let valuesLength = 0;
211818
211920
  outer: for (let j = 0; j < n.length; j++) {
211819
- const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
211921
+ const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, budget, false);
211922
+ if (budget.remaining < 0) {
211923
+ return literal();
211924
+ }
211820
211925
  for (let k = 0; k < expanded.length; k++) {
211821
211926
  const v = expanded[k];
211822
211927
  if (dropsEmpties && !v)
@@ -211829,10 +211934,15 @@ var require_commonjs2 = __commonJS({
211829
211934
  }
211830
211935
  }
211831
211936
  }
211832
- acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
211937
+ const next = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length, budget);
211938
+ if (budget.remaining < 0) {
211939
+ return literal();
211940
+ }
211941
+ acc = next;
211833
211942
  if (!m.post.length)
211834
211943
  break;
211835
211944
  str = m.post;
211945
+ masked = masked.slice(m.end + 1);
211836
211946
  }
211837
211947
  return acc;
211838
211948
  }
@@ -243924,8 +244034,8 @@ var WarningFormatter = class extends Formatter {
243924
244034
 
243925
244035
  // node_modules/@valkyrjaio/valkyrja/src/Valkyrja/Application/Constant/ApplicationInfo.ts
243926
244036
  var ApplicationInfo = class {
243927
- static VERSION = "26.9.17";
243928
- static VERSION_BUILD_DATE_TIME = "November 10 2026 12:33:58 MST";
244037
+ static VERSION = "26.9.18";
244038
+ static VERSION_BUILD_DATE_TIME = "November 11 2026 12:28:30 MST";
243929
244039
  static ASCII = `
243930
244040
  _ _ _
243931
244041
  /\\ /\\__ _| | | ___ _ _ __(_) __ _
@@ -244034,8 +244144,8 @@ var Header = class extends Message {
244034
244144
 
244035
244145
  // src/Sindri/Constant/SindriInfo.ts
244036
244146
  var SindriInfo = class {
244037
- static VERSION = "26.6.93";
244038
- static VERSION_BUILD_DATE_TIME = "November 10 2026 13:15:54 MST";
244147
+ static VERSION = "26.6.94";
244148
+ static VERSION_BUILD_DATE_TIME = "November 11 2026 13:01:14 MST";
244039
244149
  static ICON = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
244040
244150
  \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588
244041
244151
  \u2588\u2588\u2588\u2588
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valkyrjaio/sindri",
3
- "version": "26.6.93",
3
+ "version": "26.6.94",
4
4
  "description": "The Valkyrja Sindri build tool.",
5
5
  "homepage": "https://www.valkyrja.io/sindri",
6
6
  "keywords": [
@@ -38,7 +38,7 @@
38
38
  "node": ">=22"
39
39
  },
40
40
  "dependencies": {
41
- "@valkyrjaio/valkyrja": "^26.9.17",
41
+ "@valkyrjaio/valkyrja": "^26.9.18",
42
42
  "ts-morph": "^28.0.0"
43
43
  },
44
44
  "scripts": {
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  export class SindriInfo {
10
- static readonly VERSION = '26.6.93' as const;
11
- static readonly VERSION_BUILD_DATE_TIME = 'November 10 2026 13:15:54 MST' as const;
10
+ static readonly VERSION = '26.6.94' as const;
11
+ static readonly VERSION_BUILD_DATE_TIME = 'November 11 2026 13:01:14 MST' as const;
12
12
  static readonly ICON = `\
13
13
  ██████████
14
14
  ████ ████