spec-controller 0.1.277 → 0.1.279

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/cli.js +69 -66
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -22895,10 +22895,10 @@ var require_resolve_block_map = __commonJS({
22895
22895
  let offset = bm.offset;
22896
22896
  let commentEnd = null;
22897
22897
  for (const collItem of bm.items) {
22898
- const { start, key, sep: sep3, value } = collItem;
22898
+ const { start, key, sep: sep4, value } = collItem;
22899
22899
  const keyProps = resolveProps.resolveProps(start, {
22900
22900
  indicator: "explicit-key-ind",
22901
- next: key ?? sep3?.[0],
22901
+ next: key ?? sep4?.[0],
22902
22902
  offset,
22903
22903
  onError,
22904
22904
  parentIndent: bm.indent,
@@ -22912,7 +22912,7 @@ var require_resolve_block_map = __commonJS({
22912
22912
  else if ("indent" in key && key.indent !== bm.indent)
22913
22913
  onError(offset, "BAD_INDENT", startColMsg);
22914
22914
  }
22915
- if (!keyProps.anchor && !keyProps.tag && !sep3) {
22915
+ if (!keyProps.anchor && !keyProps.tag && !sep4) {
22916
22916
  commentEnd = keyProps.end;
22917
22917
  if (keyProps.comment) {
22918
22918
  if (map.comment)
@@ -22936,7 +22936,7 @@ var require_resolve_block_map = __commonJS({
22936
22936
  ctx.atKey = false;
22937
22937
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
22938
22938
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
22939
- const valueProps = resolveProps.resolveProps(sep3 ?? [], {
22939
+ const valueProps = resolveProps.resolveProps(sep4 ?? [], {
22940
22940
  indicator: "map-value-ind",
22941
22941
  next: value,
22942
22942
  offset: keyNode.range[2],
@@ -22952,7 +22952,7 @@ var require_resolve_block_map = __commonJS({
22952
22952
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
22953
22953
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
22954
22954
  }
22955
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep3, null, valueProps, onError);
22955
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep4, null, valueProps, onError);
22956
22956
  if (ctx.schema.compat)
22957
22957
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
22958
22958
  offset = valueNode.range[2];
@@ -23043,7 +23043,7 @@ var require_resolve_end = __commonJS({
23043
23043
  let comment = "";
23044
23044
  if (end) {
23045
23045
  let hasSpace = false;
23046
- let sep3 = "";
23046
+ let sep4 = "";
23047
23047
  for (const token of end) {
23048
23048
  const { source, type } = token;
23049
23049
  switch (type) {
@@ -23057,13 +23057,13 @@ var require_resolve_end = __commonJS({
23057
23057
  if (!comment)
23058
23058
  comment = cb;
23059
23059
  else
23060
- comment += sep3 + cb;
23061
- sep3 = "";
23060
+ comment += sep4 + cb;
23061
+ sep4 = "";
23062
23062
  break;
23063
23063
  }
23064
23064
  case "newline":
23065
23065
  if (comment)
23066
- sep3 += source;
23066
+ sep4 += source;
23067
23067
  hasSpace = true;
23068
23068
  break;
23069
23069
  default:
@@ -23106,18 +23106,18 @@ var require_resolve_flow_collection = __commonJS({
23106
23106
  let offset = fc.offset + fc.start.source.length;
23107
23107
  for (let i = 0; i < fc.items.length; ++i) {
23108
23108
  const collItem = fc.items[i];
23109
- const { start, key, sep: sep3, value } = collItem;
23109
+ const { start, key, sep: sep4, value } = collItem;
23110
23110
  const props = resolveProps.resolveProps(start, {
23111
23111
  flow: fcName,
23112
23112
  indicator: "explicit-key-ind",
23113
- next: key ?? sep3?.[0],
23113
+ next: key ?? sep4?.[0],
23114
23114
  offset,
23115
23115
  onError,
23116
23116
  parentIndent: fc.indent,
23117
23117
  startOnNewline: false
23118
23118
  });
23119
23119
  if (!props.found) {
23120
- if (!props.anchor && !props.tag && !sep3 && !value) {
23120
+ if (!props.anchor && !props.tag && !sep4 && !value) {
23121
23121
  if (i === 0 && props.comma)
23122
23122
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
23123
23123
  else if (i < fc.items.length - 1)
@@ -23171,8 +23171,8 @@ var require_resolve_flow_collection = __commonJS({
23171
23171
  }
23172
23172
  }
23173
23173
  }
23174
- if (!isMap && !sep3 && !props.found) {
23175
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep3, null, props, onError);
23174
+ if (!isMap && !sep4 && !props.found) {
23175
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep4, null, props, onError);
23176
23176
  coll.items.push(valueNode);
23177
23177
  offset = valueNode.range[2];
23178
23178
  if (isBlock(value))
@@ -23184,7 +23184,7 @@ var require_resolve_flow_collection = __commonJS({
23184
23184
  if (isBlock(key))
23185
23185
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
23186
23186
  ctx.atKey = false;
23187
- const valueProps = resolveProps.resolveProps(sep3 ?? [], {
23187
+ const valueProps = resolveProps.resolveProps(sep4 ?? [], {
23188
23188
  flow: fcName,
23189
23189
  indicator: "map-value-ind",
23190
23190
  next: value,
@@ -23195,8 +23195,8 @@ var require_resolve_flow_collection = __commonJS({
23195
23195
  });
23196
23196
  if (valueProps.found) {
23197
23197
  if (!isMap && !props.found && ctx.options.strict) {
23198
- if (sep3)
23199
- for (const st of sep3) {
23198
+ if (sep4)
23199
+ for (const st of sep4) {
23200
23200
  if (st === valueProps.found)
23201
23201
  break;
23202
23202
  if (st.type === "newline") {
@@ -23213,7 +23213,7 @@ var require_resolve_flow_collection = __commonJS({
23213
23213
  else
23214
23214
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
23215
23215
  }
23216
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep3, null, valueProps, onError) : null;
23216
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep4, null, valueProps, onError) : null;
23217
23217
  if (valueNode) {
23218
23218
  if (isBlock(value))
23219
23219
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -23393,7 +23393,7 @@ var require_resolve_block_scalar = __commonJS({
23393
23393
  chompStart = i + 1;
23394
23394
  }
23395
23395
  let value = "";
23396
- let sep3 = "";
23396
+ let sep4 = "";
23397
23397
  let prevMoreIndented = false;
23398
23398
  for (let i = 0; i < contentStart; ++i)
23399
23399
  value += lines[i][0].slice(trimIndent) + "\n";
@@ -23410,24 +23410,24 @@ var require_resolve_block_scalar = __commonJS({
23410
23410
  indent = "";
23411
23411
  }
23412
23412
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
23413
- value += sep3 + indent.slice(trimIndent) + content;
23414
- sep3 = "\n";
23413
+ value += sep4 + indent.slice(trimIndent) + content;
23414
+ sep4 = "\n";
23415
23415
  } else if (indent.length > trimIndent || content[0] === " ") {
23416
- if (sep3 === " ")
23417
- sep3 = "\n";
23418
- else if (!prevMoreIndented && sep3 === "\n")
23419
- sep3 = "\n\n";
23420
- value += sep3 + indent.slice(trimIndent) + content;
23421
- sep3 = "\n";
23416
+ if (sep4 === " ")
23417
+ sep4 = "\n";
23418
+ else if (!prevMoreIndented && sep4 === "\n")
23419
+ sep4 = "\n\n";
23420
+ value += sep4 + indent.slice(trimIndent) + content;
23421
+ sep4 = "\n";
23422
23422
  prevMoreIndented = true;
23423
23423
  } else if (content === "") {
23424
- if (sep3 === "\n")
23424
+ if (sep4 === "\n")
23425
23425
  value += "\n";
23426
23426
  else
23427
- sep3 = "\n";
23427
+ sep4 = "\n";
23428
23428
  } else {
23429
- value += sep3 + content;
23430
- sep3 = " ";
23429
+ value += sep4 + content;
23430
+ sep4 = " ";
23431
23431
  prevMoreIndented = false;
23432
23432
  }
23433
23433
  }
@@ -23609,25 +23609,25 @@ var require_resolve_flow_scalar = __commonJS({
23609
23609
  if (!match)
23610
23610
  return source;
23611
23611
  let res = match[1];
23612
- let sep3 = " ";
23612
+ let sep4 = " ";
23613
23613
  let pos = first.lastIndex;
23614
23614
  line.lastIndex = pos;
23615
23615
  while (match = line.exec(source)) {
23616
23616
  if (match[1] === "") {
23617
- if (sep3 === "\n")
23618
- res += sep3;
23617
+ if (sep4 === "\n")
23618
+ res += sep4;
23619
23619
  else
23620
- sep3 = "\n";
23620
+ sep4 = "\n";
23621
23621
  } else {
23622
- res += sep3 + match[1];
23623
- sep3 = " ";
23622
+ res += sep4 + match[1];
23623
+ sep4 = " ";
23624
23624
  }
23625
23625
  pos = line.lastIndex;
23626
23626
  }
23627
23627
  const last = /[ \t]*(.*)/sy;
23628
23628
  last.lastIndex = pos;
23629
23629
  match = last.exec(source);
23630
- return res + sep3 + (match?.[1] ?? "");
23630
+ return res + sep4 + (match?.[1] ?? "");
23631
23631
  }
23632
23632
  function doubleQuotedValue(source, onError) {
23633
23633
  let res = "";
@@ -24437,14 +24437,14 @@ var require_cst_stringify = __commonJS({
24437
24437
  }
24438
24438
  }
24439
24439
  }
24440
- function stringifyItem({ start, key, sep: sep3, value }) {
24440
+ function stringifyItem({ start, key, sep: sep4, value }) {
24441
24441
  let res = "";
24442
24442
  for (const st of start)
24443
24443
  res += st.source;
24444
24444
  if (key)
24445
24445
  res += stringifyToken(key);
24446
- if (sep3)
24447
- for (const st of sep3)
24446
+ if (sep4)
24447
+ for (const st of sep4)
24448
24448
  res += st.source;
24449
24449
  if (value)
24450
24450
  res += stringifyToken(value);
@@ -25611,18 +25611,18 @@ var require_parser = __commonJS({
25611
25611
  if (this.type === "map-value-ind") {
25612
25612
  const prev = getPrevProps(this.peek(2));
25613
25613
  const start = getFirstKeyStartProps(prev);
25614
- let sep3;
25614
+ let sep4;
25615
25615
  if (scalar.end) {
25616
- sep3 = scalar.end;
25617
- sep3.push(this.sourceToken);
25616
+ sep4 = scalar.end;
25617
+ sep4.push(this.sourceToken);
25618
25618
  delete scalar.end;
25619
25619
  } else
25620
- sep3 = [this.sourceToken];
25620
+ sep4 = [this.sourceToken];
25621
25621
  const map = {
25622
25622
  type: "block-map",
25623
25623
  offset: scalar.offset,
25624
25624
  indent: scalar.indent,
25625
- items: [{ start, key: scalar, sep: sep3 }]
25625
+ items: [{ start, key: scalar, sep: sep4 }]
25626
25626
  };
25627
25627
  this.onKeyLine = true;
25628
25628
  this.stack[this.stack.length - 1] = map;
@@ -25775,15 +25775,15 @@ var require_parser = __commonJS({
25775
25775
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
25776
25776
  const start2 = getFirstKeyStartProps(it.start);
25777
25777
  const key = it.key;
25778
- const sep3 = it.sep;
25779
- sep3.push(this.sourceToken);
25778
+ const sep4 = it.sep;
25779
+ sep4.push(this.sourceToken);
25780
25780
  delete it.key;
25781
25781
  delete it.sep;
25782
25782
  this.stack.push({
25783
25783
  type: "block-map",
25784
25784
  offset: this.offset,
25785
25785
  indent: this.indent,
25786
- items: [{ start: start2, key, sep: sep3 }]
25786
+ items: [{ start: start2, key, sep: sep4 }]
25787
25787
  });
25788
25788
  } else if (start.length > 0) {
25789
25789
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -25977,13 +25977,13 @@ var require_parser = __commonJS({
25977
25977
  const prev = getPrevProps(parent);
25978
25978
  const start = getFirstKeyStartProps(prev);
25979
25979
  fixFlowSeqItems(fc);
25980
- const sep3 = fc.end.splice(1, fc.end.length);
25981
- sep3.push(this.sourceToken);
25980
+ const sep4 = fc.end.splice(1, fc.end.length);
25981
+ sep4.push(this.sourceToken);
25982
25982
  const map = {
25983
25983
  type: "block-map",
25984
25984
  offset: fc.offset,
25985
25985
  indent: fc.indent,
25986
- items: [{ start, key: fc, sep: sep3 }]
25986
+ items: [{ start, key: fc, sep: sep4 }]
25987
25987
  };
25988
25988
  this.onKeyLine = true;
25989
25989
  this.stack[this.stack.length - 1] = map;
@@ -31793,21 +31793,21 @@ var init_Matcher = __esm({
31793
31793
  * @returns {string}
31794
31794
  */
31795
31795
  toString(separator, includeNamespace = true) {
31796
- const sep3 = separator || this.separator;
31797
- const isDefault = sep3 === this.separator && includeNamespace === true;
31796
+ const sep4 = separator || this.separator;
31797
+ const isDefault = sep4 === this.separator && includeNamespace === true;
31798
31798
  if (isDefault) {
31799
31799
  if (this._pathStringCache !== null) {
31800
31800
  return this._pathStringCache;
31801
31801
  }
31802
31802
  const result = this.path.map(
31803
31803
  (n) => n.namespace ? `${n.namespace}:${n.tag}` : n.tag
31804
- ).join(sep3);
31804
+ ).join(sep4);
31805
31805
  this._pathStringCache = result;
31806
31806
  return result;
31807
31807
  }
31808
31808
  return this.path.map(
31809
31809
  (n) => includeNamespace && n.namespace ? `${n.namespace}:${n.tag}` : n.tag
31810
- ).join(sep3);
31810
+ ).join(sep4);
31811
31811
  }
31812
31812
  /**
31813
31813
  * Get path as array of tag names.
@@ -34250,7 +34250,7 @@ function treeLines({ in: where2, top }, featureCode) {
34250
34250
  const { status, stdout, stderr } = gitIn(top, ["grep", "-n", "-z", "-I", ...among]);
34251
34251
  const unreadable = UNREADABLE.exec(stderr);
34252
34252
  if (unreadable !== null) return { refusal: { key: "unreadable-in-tree", values: { path: unreadable[1] ?? unreadable[2], said: unreadable[0] } } };
34253
- if (status !== 0 && status !== 1) return { refusal: { key: "unreadable-in-tree", values: { path: top, said: stderr.trim() } } };
34253
+ if (status !== 0 && status !== 1) return { refusal: { key: "unreadable-in-tree", values: { path: top, said: stderr } } };
34254
34254
  const lines = stdout.split("\n").slice(0, -1).map((record) => {
34255
34255
  const [path, line, text4] = record.split("\0");
34256
34256
  return { text: text4, path, line: Number(line) };
@@ -34522,24 +34522,23 @@ var init_runIdentity = __esm({
34522
34522
 
34523
34523
  // src/output/identity.ts
34524
34524
  import { fstatSync, lstatSync, readlinkSync, realpathSync, statSync as statSync2 } from "node:fs";
34525
- import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve3 } from "node:path";
34525
+ import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve3, sep as sep3 } from "node:path";
34526
34526
  function streamIdentity(fd, stream) {
34527
34527
  const stats = fstatSync(fd, EXACT);
34528
34528
  return stats.isFile() ? regularFile(stats) : stream;
34529
34529
  }
34530
34530
  function foldsCase(folder) {
34531
- const name = basename2(folder);
34532
- if (name.toUpperCase() === name.toLowerCase()) return false;
34533
- const [upper, lower] = [name.toUpperCase(), name.toLowerCase()].map((spelled) => statSync2(join5(dirname2(folder), spelled), PROBED));
34534
- return upper !== void 0 && upper.dev === lower?.dev && upper.ino === lower.ino;
34531
+ const names = folder.split(sep3);
34532
+ const at = names.map((name2) => name2.toUpperCase() !== name2.toLowerCase()).lastIndexOf(true);
34533
+ const name = names.at(at);
34534
+ const [byUpper, byLower] = [name.toUpperCase(), name.toLowerCase()].map((spelled) => statSync2(join5(sep3, ...names.slice(0, at), spelled), PROBED));
34535
+ return byUpper !== void 0 && byUpper.ino === byLower?.ino;
34535
34536
  }
34536
34537
  function notMadeYet(path) {
34537
34538
  const where2 = whereItWillBe(path);
34538
- const folder = realpathSync(dirname2(where2));
34539
- const at = join5(folder, basename2(where2));
34540
- return { is: "absent", path: foldsCase(folder) ? at.toLowerCase() : at };
34539
+ return { is: "absent", path: join5(realpathSync(dirname2(where2)), basename2(where2)) };
34541
34540
  }
34542
- function pathIdentity(path) {
34541
+ function identityOf(path) {
34543
34542
  try {
34544
34543
  const stream = streamNamedBy(path);
34545
34544
  if (stream !== void 0) return { is: stream };
@@ -34550,6 +34549,10 @@ function pathIdentity(path) {
34550
34549
  }
34551
34550
  return { is: "not-a-regular-file" };
34552
34551
  }
34552
+ function pathIdentity(path) {
34553
+ const identity = identityOf(path);
34554
+ return identity.is === "absent" && foldsCase(dirname2(identity.path)) ? { is: "absent", path: identity.path.toLowerCase() } : identity;
34555
+ }
34553
34556
  var EXACT, regularFile, PROBED, STREAM_NAMED, whereItWillBe, streamNamedBy;
34554
34557
  var init_identity = __esm({
34555
34558
  "src/output/identity.ts"() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.277",
3
+ "version": "0.1.279",
4
4
  "description": "Reconcile the behaviour your scenarios name against the evidence that actually ran — the deterministic `balance` CLI.",
5
5
  "keywords": [
6
6
  "reconciliation",
@@ -25,7 +25,7 @@
25
25
  "esbuild": "0.28.1",
26
26
  "ts-json-schema-generator": "^2.9.0",
27
27
  "yaml": "^2.9.0",
28
- "@3f-consulting/spec-controller-core": "0.1.277"
28
+ "@3f-consulting/spec-controller-core": "0.1.279"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"