spec-controller 0.1.78 → 0.1.80

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 +304 -162
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -210,17 +210,17 @@ ${message}`,
210
210
  [117 /* HistoryBoundary */]: (unread, risk) => `history: ${unread}; ${risk} may have been used before`,
211
211
  [118 /* ShallowHistoryUnread */]: (before) => `shallow clone \u2014 history before ${before} unread`,
212
212
  [119 /* NoRepositoryHistoryRead */]: () => "not a git repository \u2014 none read",
213
- [120 /* RiskOfPartCode */]: (part) => `a code of ${part}`,
213
+ [120 /* RiskOfPartCode */]: (part2) => `a code of ${part2}`,
214
214
  [121 /* RiskAboveCode */]: (code) => `a code above ${code}`,
215
215
  [122 /* HighestSeenNone */]: () => "highest seen: none",
216
216
  [123 /* HighestSeenInTree */]: (code, path, line) => `highest seen: ${code}, ${path}:${line}`,
217
217
  [124 /* HighestSeenInCommit */]: (code, path, line, commit) => `highest seen: ${code}, ${path}:${line} in ${commit}`,
218
- [125 /* UnknownPartRefused */]: (part, parts) => `spec-controller allocate: unknown part \u2014 no feature file's header carries ${part}.
218
+ [125 /* UnknownPartRefused */]: (part2, parts) => `spec-controller allocate: unknown part \u2014 no feature file's header carries ${part2}.
219
219
  The parts this corpus's feature files carry: ${parts}.`,
220
220
  [126 /* NoPartsCarried */]: () => "none",
221
- [127 /* PartAlreadyHeaded */]: (part) => `note: a feature file's header already carries ${part}, so --new was not needed`,
221
+ [127 /* PartAlreadyHeaded */]: (part2) => `note: a feature file's header already carries ${part2}, so --new was not needed`,
222
222
  [128 /* NoFeaturePartGiven */]: () => "no feature part was given: 'spec-controller allocate <FFF>' takes one, a feature file's header code.",
223
- [129 /* NotAFeaturePart */]: (part) => `'${part}' is not a feature part: two to five characters, each A-Z or 0-9.`,
223
+ [129 /* NotAFeaturePart */]: (part2) => `'${part2}' is not a feature part: two to five characters, each A-Z or 0-9.`,
224
224
  [130 /* DefaultCorpusFeatureFile */]: () => "a feature file of the corpus read by default",
225
225
  [131 /* FlaggedCorpusFeatureFile */]: () => "a feature file of the --features corpus",
226
226
  [132 /* DefaultCiWorkflow */]: () => "a CI workflow read by default",
@@ -4877,19 +4877,19 @@ var require_ClassTransformer = __commonJS({
4877
4877
  });
4878
4878
  return executor.transform(plainObject, object, void 0, void 0, void 0, void 0);
4879
4879
  }
4880
- plainToInstance(cls, plain, options) {
4880
+ plainToInstance(cls, plain2, options) {
4881
4881
  const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.PLAIN_TO_CLASS, {
4882
4882
  ...default_options_constant_1.defaultOptions,
4883
4883
  ...options
4884
4884
  });
4885
- return executor.transform(void 0, plain, cls, void 0, void 0, void 0);
4885
+ return executor.transform(void 0, plain2, cls, void 0, void 0, void 0);
4886
4886
  }
4887
- plainToClassFromExist(clsObject, plain, options) {
4887
+ plainToClassFromExist(clsObject, plain2, options) {
4888
4888
  const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.PLAIN_TO_CLASS, {
4889
4889
  ...default_options_constant_1.defaultOptions,
4890
4890
  ...options
4891
4891
  });
4892
- return executor.transform(clsObject, plain, void 0, void 0, void 0, void 0);
4892
+ return executor.transform(clsObject, plain2, void 0, void 0, void 0, void 0);
4893
4893
  }
4894
4894
  instanceToInstance(object, options) {
4895
4895
  const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_CLASS, {
@@ -5289,16 +5289,16 @@ var require_cjs = __commonJS({
5289
5289
  return classTransformer.classToPlainFromExist(object, plainObject, options);
5290
5290
  }
5291
5291
  exports2.classToPlainFromExist = classToPlainFromExist;
5292
- function plainToClass(cls, plain, options) {
5293
- return classTransformer.plainToInstance(cls, plain, options);
5292
+ function plainToClass(cls, plain2, options) {
5293
+ return classTransformer.plainToInstance(cls, plain2, options);
5294
5294
  }
5295
5295
  exports2.plainToClass = plainToClass;
5296
- function plainToInstance(cls, plain, options) {
5297
- return classTransformer.plainToInstance(cls, plain, options);
5296
+ function plainToInstance(cls, plain2, options) {
5297
+ return classTransformer.plainToInstance(cls, plain2, options);
5298
5298
  }
5299
5299
  exports2.plainToInstance = plainToInstance;
5300
- function plainToClassFromExist(clsObject, plain, options) {
5301
- return classTransformer.plainToClassFromExist(clsObject, plain, options);
5300
+ function plainToClassFromExist(clsObject, plain2, options) {
5301
+ return classTransformer.plainToClassFromExist(clsObject, plain2, options);
5302
5302
  }
5303
5303
  exports2.plainToClassFromExist = plainToClassFromExist;
5304
5304
  function instanceToInstance(object, options) {
@@ -11206,18 +11206,18 @@ var init_GherkinClassicTokenMatcher = __esm({
11206
11206
  this._match_DocStringSeparator(token, this.activeDocStringSeparator, false)
11207
11207
  );
11208
11208
  }
11209
- _match_DocStringSeparator(token, separator, isOpen) {
11210
- if (token.line.startsWith(separator)) {
11209
+ _match_DocStringSeparator(token, separator2, isOpen) {
11210
+ if (token.line.startsWith(separator2)) {
11211
11211
  let mediaType = null;
11212
11212
  if (isOpen) {
11213
- mediaType = token.line.getRestTrimmed(separator.length);
11214
- this.activeDocStringSeparator = separator;
11213
+ mediaType = token.line.getRestTrimmed(separator2.length);
11214
+ this.activeDocStringSeparator = separator2;
11215
11215
  this.indentToRemove = token.line.indent;
11216
11216
  } else {
11217
11217
  this.activeDocStringSeparator = null;
11218
11218
  this.indentToRemove = 0;
11219
11219
  }
11220
- this.setTokenMatched(token, TokenType.DocStringSeparator, mediaType, separator);
11220
+ this.setTokenMatched(token, TokenType.DocStringSeparator, mediaType, separator2);
11221
11221
  return true;
11222
11222
  }
11223
11223
  return false;
@@ -12500,11 +12500,11 @@ function outranks(code, occurrence, highest) {
12500
12500
  const difference = numberOf(code) - numberOf(highest.code);
12501
12501
  return difference > 0 || difference === 0 && occurrence.commit === void 0 && highest.occurrence.commit !== void 0;
12502
12502
  }
12503
- function highestOf(part, occurrences) {
12503
+ function highestOf(part2, occurrences) {
12504
12504
  let highest = null;
12505
12505
  for (const occurrence of occurrences) {
12506
12506
  for (const [code] of occurrence.text.matchAll(SCN_CODES)) {
12507
- if (featureCodeOf(code) !== part)
12507
+ if (featureCodeOf(code) !== part2)
12508
12508
  continue;
12509
12509
  if (highest === null || outranks(code, occurrence, highest))
12510
12510
  highest = { code, occurrence };
@@ -12868,11 +12868,113 @@ var init_cucumber = __esm({
12868
12868
  function wordsOf(text) {
12869
12869
  return text.trim().split(/\s+/);
12870
12870
  }
12871
- function commandHeads(line) {
12872
- return subshellsSpaced(line).split(COMMAND_SEPARATOR).map((command) => {
12873
- const words = wordsOf(command);
12874
- return words.slice(words.findIndex((word) => !ASSIGNMENT.test(word)));
12875
- });
12871
+ function pastQuote(text, from, quote) {
12872
+ const end = text.indexOf(quote, from);
12873
+ return end === -1 ? text.length : end + 1;
12874
+ }
12875
+ function pastBalanced(text, from, open, close) {
12876
+ let depth = 1;
12877
+ let at = from;
12878
+ while (at < text.length && depth > 0) {
12879
+ const char = text[at];
12880
+ if (char === "\\")
12881
+ at += 2;
12882
+ else if (char === "'" || char === "`")
12883
+ at = pastQuote(text, at + 1, char);
12884
+ else if (char === '"')
12885
+ at = doubleQuoted(text, at + 1)[1];
12886
+ else {
12887
+ if (char === open)
12888
+ depth += 1;
12889
+ if (char === close)
12890
+ depth -= 1;
12891
+ at += 1;
12892
+ }
12893
+ }
12894
+ return Math.min(at, text.length);
12895
+ }
12896
+ function expansionEnd(text, at, openers) {
12897
+ if (text[at] === "`")
12898
+ return pastQuote(text, at + 1, "`");
12899
+ const opener = openers.find((each) => text.startsWith(each, at));
12900
+ if (opener === void 0)
12901
+ return void 0;
12902
+ const open = opener.slice(-1);
12903
+ return pastBalanced(text, at + opener.length, open, open === "{" ? "}" : ")");
12904
+ }
12905
+ function doubleQuotedPart(text, at) {
12906
+ const char = text.charAt(at);
12907
+ if (char === "\\") {
12908
+ const next = text.charAt(at + 1);
12909
+ return [ESCAPED_IN_DOUBLE_QUOTES.includes(next) ? next : char + next, at + 2];
12910
+ }
12911
+ const end = expansionEnd(text, at, EXPANSIONS_IN_DOUBLE_QUOTES);
12912
+ return end === void 0 ? [char, at + 1] : [text.slice(at, end), end];
12913
+ }
12914
+ function doubleQuoted(text, from) {
12915
+ let value = "";
12916
+ let at = from;
12917
+ while (at < text.length && text[at] !== '"') {
12918
+ const [part2, next] = doubleQuotedPart(text, at);
12919
+ value += part2;
12920
+ at = next;
12921
+ }
12922
+ return [value, Math.min(at + 1, text.length)];
12923
+ }
12924
+ function plain(text, at) {
12925
+ PLAIN.lastIndex = at;
12926
+ const run3 = PLAIN.exec(text)?.[0] ?? text.charAt(at);
12927
+ return part(run3, false, at + run3.length);
12928
+ }
12929
+ function nextToken(text, at, word) {
12930
+ for (const read of READS) {
12931
+ const token = read(text, at, word);
12932
+ if (token !== void 0)
12933
+ return token;
12934
+ }
12935
+ return plain(text, at);
12936
+ }
12937
+ function simpleCommands(text) {
12938
+ const source = text.replace(JOINED_LINE, " ");
12939
+ const commands = [];
12940
+ let words = [];
12941
+ let word;
12942
+ let quoted = false;
12943
+ let target = false;
12944
+ const endWord = () => {
12945
+ if (word !== void 0) {
12946
+ if (!target)
12947
+ words.push(word);
12948
+ target = false;
12949
+ }
12950
+ word = void 0;
12951
+ quoted = false;
12952
+ };
12953
+ const endCommand = (piped) => {
12954
+ endWord();
12955
+ target = false;
12956
+ if (words.length > 0)
12957
+ commands.push({ words, piped });
12958
+ words = [];
12959
+ };
12960
+ let at = 0;
12961
+ while (at < source.length) {
12962
+ const token = nextToken(source, at, word);
12963
+ if (token.kind === "part") {
12964
+ word = (word ?? "") + token.value;
12965
+ quoted ||= token.quoted;
12966
+ } else if (token.kind === "separator")
12967
+ endCommand(token.pipe);
12968
+ else {
12969
+ if (token.kind === "redirection" && !quoted && FILE_DESCRIPTOR.test(word ?? ""))
12970
+ word = void 0;
12971
+ endWord();
12972
+ target ||= token.kind === "redirection";
12973
+ }
12974
+ at = token.end;
12975
+ }
12976
+ endCommand(false);
12977
+ return commands;
12876
12978
  }
12877
12979
  function handedOn(words) {
12878
12980
  const prefix = LAUNCHERS.find((row) => opensWith(words, row.words));
@@ -12895,8 +12997,7 @@ function scriptsNamedBy(head) {
12895
12997
  return void 0;
12896
12998
  const each = invocations.eachWorkspace;
12897
12999
  if (each !== void 0 && opensWith(head, each.words)) {
12898
- const [word2, next2] = head.slice(pastOptions(head, each.words.length, each));
12899
- return isOneOf(invocations.runWords, word2) ? [next2] : void 0;
13000
+ return scriptsNamedBy([each.words[0], ...head.slice(pastOptions(head, each.words.length, each))]);
12900
13001
  }
12901
13002
  const [word, next] = head.slice(afterSelections(head, 1, invocations));
12902
13003
  if (isOneOf(invocations.runWords, word))
@@ -12913,44 +13014,33 @@ function passedOn(words) {
12913
13014
  const prefix = COMMAND_PREFIXES.find((row) => opensWith(words, row.words));
12914
13015
  return prefix === void 0 ? void 0 : words.slice(pastOptions(words, prefix.words.length, prefix) + prefix.operands);
12915
13016
  }
12916
- function runsScript(head, script) {
12917
- if (scriptsNamedBy(head)?.includes(script) === true)
12918
- return true;
13017
+ function scriptsRunBy(head) {
12919
13018
  const next = passedOn(head);
12920
- return next !== void 0 && runsScript(next, script);
12921
- }
12922
- function headsOf(command) {
12923
- return command.split(/\r?\n/).flatMap((line) => quotedSeparatorsBlanked(line).split(BACKGROUND).flatMap(commandHeads));
13019
+ return [scriptsNamedBy(head), next === void 0 ? void 0 : scriptsRunBy(next)].flat();
12924
13020
  }
12925
13021
  function commandInvokesScript(command, script) {
12926
- return headsOf(command).some((head) => runsScript(head, script));
13022
+ return headsOf(command).some((head) => scriptsRunBy(head).includes(script));
12927
13023
  }
12928
- function runs(command, invocation, scripts, depth, lineRuns) {
12929
- if (command.split(/\r?\n/).some((line) => lineRuns(line, invocation)))
13024
+ function runs(command, invocation, scripts, depth, reading) {
13025
+ if (reading.names(command, invocation))
12930
13026
  return true;
12931
13027
  const entries = Object.entries(scripts);
12932
13028
  if (depth === 0 || entries.length === 0)
12933
13029
  return false;
12934
- const heads = headsOf(command);
12935
- return entries.some(([name, body]) => heads.some((head) => runsScript(head, name)) && runs(body, invocation, scripts, depth - 1, lineRuns));
13030
+ const run3 = reading.heads(command).flatMap(scriptsRunBy);
13031
+ return entries.some(([name, body]) => run3.includes(name) && runs(body, invocation, scripts, depth - 1, reading));
12936
13032
  }
12937
- function runsBy(lineRuns) {
13033
+ function runsBy(reading) {
12938
13034
  return (command, invocation, scripts) => {
12939
13035
  const words = wordsOf(invocation);
12940
- return words.join(" ") !== "" && runs(command, words, scripts, SCRIPT_CHAIN_DEPTH, lineRuns);
13036
+ return words.join(" ") !== "" && runs(command, words, scripts, SCRIPT_CHAIN_DEPTH, reading);
12941
13037
  };
12942
13038
  }
12943
- function finalStages(command) {
12944
- return command.replace(/\\\r?\n/g, " ").split(/\r?\n/).map((line) => line.replace(UP_TO_LAST_PIPE, "")).join("\n");
12945
- }
12946
- var SCRIPT_CHAIN_DEPTH, UP_TO_LAST_PIPE, COMMAND_SEPARATOR, BACKGROUND, ASSIGNMENT, launcher, runsNext, YARN_FOREACH, SHELL_WORDS, COMMAND_PREFIXES, LAUNCHERS, SCRIPT_INVOCATIONS, opensAt, opensWith, anywhere, subshellsSpaced, isOneOf, QUOTED, quotedSeparatorsBlanked, asCommand, commandRuns, commandRunsAsCommand, shellReading;
13039
+ var SCRIPT_CHAIN_DEPTH, ASSIGNMENT, launcher, runsNext, YARN_FOREACH, SHELL_WORDS, COMMAND_PREFIXES, LAUNCHERS, SCRIPT_INVOCATIONS, opensAt, opensWith, namedOnLine, pastAssignments, JOINED_LINE, SEPARATORS, REDIRECTION, FILE_DESCRIPTOR, PLAIN, ESCAPED_IN_DOUBLE_QUOTES, EXPANSIONS, EXPANSIONS_IN_DOUBLE_QUOTES, part, blank, comment, escaped, singleQuoted, doubleQuotedWord, expansion, redirection, separator, READS, isOneOf, headsOf, lastStageHeadsOf, anywhere, asCommand, commandRuns, shellReading;
12947
13040
  var init_commandRuns = __esm({
12948
13041
  "../core/dist/parse/commandRuns.js"() {
12949
13042
  "use strict";
12950
13043
  SCRIPT_CHAIN_DEPTH = 3;
12951
- UP_TO_LAST_PIPE = /^.*(?<!\|)\|(?!\|)/;
12952
- COMMAND_SEPARATOR = /&&|;|\|/;
12953
- BACKGROUND = /(?<!>)&/;
12954
13044
  ASSIGNMENT = /^[A-Za-z_]\w*=/;
12955
13045
  launcher = (words, ...valued) => ({
12956
13046
  words,
@@ -13037,20 +13127,74 @@ var init_commandRuns = __esm({
13037
13127
  ]);
13038
13128
  opensAt = (words, prefix, from) => prefix.every((word, at) => words[from + at] === word);
13039
13129
  opensWith = (words, prefix) => opensAt(words, prefix, 0);
13040
- anywhere = (line, invocation) => {
13130
+ namedOnLine = (line, invocation) => {
13041
13131
  const words = wordsOf(line);
13042
13132
  return words.some((_, at) => opensAt(words, invocation, at));
13043
13133
  };
13044
- subshellsSpaced = (line) => line.replace(/(^|\s)\(/g, "$1( ").replace(/\)(?=[\s;&|]|$)/g, " )");
13134
+ pastAssignments = (words) => words.slice(words.findIndex((word) => !ASSIGNMENT.test(word)));
13135
+ JOINED_LINE = /\\\r?\n/g;
13136
+ SEPARATORS = "&|;()\n";
13137
+ REDIRECTION = /&>|[<>]&|>>|[<>]/y;
13138
+ FILE_DESCRIPTOR = /^\d+$/;
13139
+ PLAIN = /[^\s&|;()<>'"\\`$]+/y;
13140
+ ESCAPED_IN_DOUBLE_QUOTES = '"\\$`';
13141
+ EXPANSIONS = ["$(", "${", "<(", ">("];
13142
+ EXPANSIONS_IN_DOUBLE_QUOTES = ["$(", "${"];
13143
+ part = (value, quoted, end) => ({ kind: "part", value, quoted, end });
13144
+ blank = (text, at) => {
13145
+ const char = text.charAt(at);
13146
+ return char !== "\n" && /\s/.test(char) ? { kind: "break", end: at + 1 } : void 0;
13147
+ };
13148
+ comment = (text, at, word) => {
13149
+ if (text[at] !== "#" || word !== void 0)
13150
+ return void 0;
13151
+ const end = text.indexOf("\n", at);
13152
+ return { kind: "break", end: end === -1 ? text.length : end };
13153
+ };
13154
+ escaped = (text, at) => text[at] === "\\" ? part(text.charAt(at + 1), true, at + 2) : void 0;
13155
+ singleQuoted = (text, at) => {
13156
+ if (text[at] !== "'")
13157
+ return void 0;
13158
+ const close = text.indexOf("'", at + 1);
13159
+ const end = close === -1 ? text.length : close;
13160
+ return part(text.slice(at + 1, end), true, end + 1);
13161
+ };
13162
+ doubleQuotedWord = (text, at) => {
13163
+ if (text[at] !== '"')
13164
+ return void 0;
13165
+ const [value, end] = doubleQuoted(text, at + 1);
13166
+ return part(value, true, end);
13167
+ };
13168
+ expansion = (text, at, word) => {
13169
+ const end = text[at] === "(" && word?.endsWith("=") === true ? pastBalanced(text, at + 1, "(", ")") : expansionEnd(text, at, EXPANSIONS);
13170
+ return end === void 0 ? void 0 : part(text.slice(at, end), false, end);
13171
+ };
13172
+ redirection = (text, at) => {
13173
+ REDIRECTION.lastIndex = at;
13174
+ const operator = REDIRECTION.exec(text)?.[0];
13175
+ return operator === void 0 ? void 0 : { kind: "redirection", end: at + operator.length };
13176
+ };
13177
+ separator = (text, at) => {
13178
+ const char = text.charAt(at);
13179
+ if (!SEPARATORS.includes(char))
13180
+ return void 0;
13181
+ return { kind: "separator", pipe: char === "|" && text.charAt(at + 1) !== "|", end: at + 1 };
13182
+ };
13183
+ READS = [blank, comment, escaped, singleQuoted, doubleQuotedWord, expansion, redirection, separator];
13045
13184
  isOneOf = (words, word) => words?.some((each) => each === word) === true;
13046
- QUOTED = /"[^"]*"|'[^']*'/g;
13047
- quotedSeparatorsBlanked = (line) => line.replace(QUOTED, (quoted) => quoted.replace(/[&;|]/g, " "));
13048
- asCommand = (line, invocation) => commandHeads(line).some((head) => opensWith(launched(head), invocation));
13185
+ headsOf = (command) => simpleCommands(command).map(({ words }) => pastAssignments(words));
13186
+ lastStageHeadsOf = (command) => simpleCommands(command).filter(({ piped }) => !piped).map(({ words }) => pastAssignments(words));
13187
+ anywhere = {
13188
+ names: (command, invocation) => command.split(/\r?\n/).some((line) => namedOnLine(line, invocation)),
13189
+ heads: headsOf
13190
+ };
13191
+ asCommand = {
13192
+ names: (command, invocation) => lastStageHeadsOf(command).some((head) => opensWith(launched(head), invocation)),
13193
+ heads: lastStageHeadsOf
13194
+ };
13049
13195
  commandRuns = runsBy(anywhere);
13050
- commandRunsAsCommand = runsBy(asCommand);
13051
13196
  shellReading = {
13052
- lastStagesOf: finalStages,
13053
- runsAsCommand: commandRunsAsCommand
13197
+ runsAsCommand: runsBy(asCommand)
13054
13198
  };
13055
13199
  }
13056
13200
  });
@@ -14001,12 +14145,12 @@ var require_stringifyComment = __commonJS({
14001
14145
  "../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
14002
14146
  "use strict";
14003
14147
  var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
14004
- function indentComment(comment, indent) {
14005
- if (/^\n+$/.test(comment))
14006
- return comment.substring(1);
14007
- return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
14148
+ function indentComment(comment2, indent) {
14149
+ if (/^\n+$/.test(comment2))
14150
+ return comment2.substring(1);
14151
+ return indent ? comment2.replace(/^(?! *$)/gm, indent) : comment2;
14008
14152
  }
14009
- var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
14153
+ var lineComment = (str, indent, comment2) => str.endsWith("\n") ? indentComment(comment2, indent) : comment2.includes("\n") ? "\n" + indentComment(comment2, indent) : (str.endsWith(" ") ? "" : " ") + comment2;
14010
14154
  exports2.indentComment = indentComment;
14011
14155
  exports2.lineComment = lineComment;
14012
14156
  exports2.stringifyComment = stringifyComment;
@@ -14290,7 +14434,7 @@ ${indent}`) + "'";
14290
14434
  } catch {
14291
14435
  blockEndNewlines = /\n+(?!\n|$)/g;
14292
14436
  }
14293
- function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
14437
+ function blockString({ comment: comment2, type, value }, ctx, onComment, onChompKeep) {
14294
14438
  const { blockQuote, commentString, lineWidth } = ctx.options;
14295
14439
  if (!blockQuote || /\n[\t ]+$/.test(value)) {
14296
14440
  return quotedString(value, ctx);
@@ -14342,8 +14486,8 @@ ${indent}`) + "'";
14342
14486
  }
14343
14487
  const indentSize = indent ? "2" : "1";
14344
14488
  let header = (startWithSpace ? indentSize : "") + chomp;
14345
- if (comment) {
14346
- header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
14489
+ if (comment2) {
14490
+ header += " " + commentString(comment2.replace(/ ?[\r\n]+/g, " "));
14347
14491
  if (onComment)
14348
14492
  onComment();
14349
14493
  }
@@ -14887,20 +15031,20 @@ var require_stringifyCollection = __commonJS({
14887
15031
  const stringify3 = flow ? stringifyFlowCollection : stringifyBlockCollection;
14888
15032
  return stringify3(collection, ctx, options);
14889
15033
  }
14890
- function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
15034
+ function stringifyBlockCollection({ comment: comment2, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
14891
15035
  const { indent, options: { commentString } } = ctx;
14892
15036
  const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
14893
15037
  let chompKeep = false;
14894
15038
  const lines = [];
14895
15039
  for (let i = 0; i < items.length; ++i) {
14896
15040
  const item = items[i];
14897
- let comment2 = null;
15041
+ let comment3 = null;
14898
15042
  if (identity.isNode(item)) {
14899
15043
  if (!chompKeep && item.spaceBefore)
14900
15044
  lines.push("");
14901
15045
  addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
14902
15046
  if (item.comment)
14903
- comment2 = item.comment;
15047
+ comment3 = item.comment;
14904
15048
  } else if (identity.isPair(item)) {
14905
15049
  const ik = identity.isNode(item.key) ? item.key : null;
14906
15050
  if (ik) {
@@ -14910,10 +15054,10 @@ var require_stringifyCollection = __commonJS({
14910
15054
  }
14911
15055
  }
14912
15056
  chompKeep = false;
14913
- let str2 = stringify2.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
14914
- if (comment2)
14915
- str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));
14916
- if (chompKeep && comment2)
15057
+ let str2 = stringify2.stringify(item, itemCtx, () => comment3 = null, () => chompKeep = true);
15058
+ if (comment3)
15059
+ str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment3));
15060
+ if (chompKeep && comment3)
14917
15061
  chompKeep = false;
14918
15062
  lines.push(blockItemPrefix + str2);
14919
15063
  }
@@ -14928,8 +15072,8 @@ var require_stringifyCollection = __commonJS({
14928
15072
  ${indent}${line}` : "\n";
14929
15073
  }
14930
15074
  }
14931
- if (comment) {
14932
- str += "\n" + stringifyComment.indentComment(commentString(comment), indent);
15075
+ if (comment2) {
15076
+ str += "\n" + stringifyComment.indentComment(commentString(comment2), indent);
14933
15077
  if (onComment)
14934
15078
  onComment();
14935
15079
  } else if (chompKeep && onChompKeep)
@@ -14949,13 +15093,13 @@ ${indent}${line}` : "\n";
14949
15093
  const lines = [];
14950
15094
  for (let i = 0; i < items.length; ++i) {
14951
15095
  const item = items[i];
14952
- let comment = null;
15096
+ let comment2 = null;
14953
15097
  if (identity.isNode(item)) {
14954
15098
  if (item.spaceBefore)
14955
15099
  lines.push("");
14956
15100
  addCommentBefore(ctx, lines, item.commentBefore, false);
14957
15101
  if (item.comment)
14958
- comment = item.comment;
15102
+ comment2 = item.comment;
14959
15103
  } else if (identity.isPair(item)) {
14960
15104
  const ik = identity.isNode(item.key) ? item.key : null;
14961
15105
  if (ik) {
@@ -14968,16 +15112,16 @@ ${indent}${line}` : "\n";
14968
15112
  const iv = identity.isNode(item.value) ? item.value : null;
14969
15113
  if (iv) {
14970
15114
  if (iv.comment)
14971
- comment = iv.comment;
15115
+ comment2 = iv.comment;
14972
15116
  if (iv.commentBefore)
14973
15117
  reqNewline = true;
14974
15118
  } else if (item.value == null && ik?.comment) {
14975
- comment = ik.comment;
15119
+ comment2 = ik.comment;
14976
15120
  }
14977
15121
  }
14978
- if (comment)
15122
+ if (comment2)
14979
15123
  reqNewline = true;
14980
- let str = stringify2.stringify(item, itemCtx, () => comment = null);
15124
+ let str = stringify2.stringify(item, itemCtx, () => comment2 = null);
14981
15125
  reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
14982
15126
  if (i < items.length - 1) {
14983
15127
  str += ",";
@@ -14989,8 +15133,8 @@ ${indent}${line}` : "\n";
14989
15133
  str += ",";
14990
15134
  }
14991
15135
  }
14992
- if (comment)
14993
- str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
15136
+ if (comment2)
15137
+ str += stringifyComment.lineComment(str, itemIndent, commentString(comment2));
14994
15138
  lines.push(str);
14995
15139
  linesAtValue = lines.length;
14996
15140
  }
@@ -15014,11 +15158,11 @@ ${indent}${end}`;
15014
15158
  }
15015
15159
  }
15016
15160
  }
15017
- function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
15018
- if (comment && chompKeep)
15019
- comment = comment.replace(/^\n+/, "");
15020
- if (comment) {
15021
- const ic = stringifyComment.indentComment(commentString(comment), indent);
15161
+ function addCommentBefore({ indent, options: { commentString } }, lines, comment2, chompKeep) {
15162
+ if (comment2 && chompKeep)
15163
+ comment2 = comment2.replace(/^\n+/, "");
15164
+ if (comment2) {
15165
+ const ic = stringifyComment.indentComment(commentString(comment2), indent);
15022
15166
  lines.push(ic.trimStart());
15023
15167
  }
15024
15168
  }
@@ -15638,7 +15782,7 @@ var require_binary = __commonJS({
15638
15782
  return src;
15639
15783
  }
15640
15784
  },
15641
- stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
15785
+ stringify({ comment: comment2, type, value }, ctx, onComment, onChompKeep) {
15642
15786
  if (!value)
15643
15787
  return "";
15644
15788
  const buf = value;
@@ -15663,7 +15807,7 @@ var require_binary = __commonJS({
15663
15807
  }
15664
15808
  str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
15665
15809
  }
15666
- return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
15810
+ return stringifyString.stringifyString({ comment: comment2, type, value: str }, ctx, onComment, onChompKeep);
15667
15811
  }
15668
15812
  };
15669
15813
  exports2.binary = binary;
@@ -16795,7 +16939,7 @@ var require_resolve_props = __commonJS({
16795
16939
  let spaceBefore = false;
16796
16940
  let atNewline = startOnNewline;
16797
16941
  let hasSpace = startOnNewline;
16798
- let comment = "";
16942
+ let comment2 = "";
16799
16943
  let commentSep = "";
16800
16944
  let hasNewline = false;
16801
16945
  let reqSpace = false;
@@ -16829,18 +16973,18 @@ var require_resolve_props = __commonJS({
16829
16973
  if (!hasSpace)
16830
16974
  onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
16831
16975
  const cb = token.source.substring(1) || " ";
16832
- if (!comment)
16833
- comment = cb;
16976
+ if (!comment2)
16977
+ comment2 = cb;
16834
16978
  else
16835
- comment += commentSep + cb;
16979
+ comment2 += commentSep + cb;
16836
16980
  commentSep = "";
16837
16981
  atNewline = false;
16838
16982
  break;
16839
16983
  }
16840
16984
  case "newline":
16841
16985
  if (atNewline) {
16842
- if (comment)
16843
- comment += token.source;
16986
+ if (comment2)
16987
+ comment2 += token.source;
16844
16988
  else if (!found || indicator !== "seq-item-ind")
16845
16989
  spaceBefore = true;
16846
16990
  } else
@@ -16908,7 +17052,7 @@ var require_resolve_props = __commonJS({
16908
17052
  comma,
16909
17053
  found,
16910
17054
  spaceBefore,
16911
- comment,
17055
+ comment: comment2,
16912
17056
  hasNewline,
16913
17057
  anchor,
16914
17058
  tag,
@@ -17161,7 +17305,7 @@ var require_resolve_end = __commonJS({
17161
17305
  "../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-end.js"(exports2) {
17162
17306
  "use strict";
17163
17307
  function resolveEnd(end, offset, reqSpace, onError) {
17164
- let comment = "";
17308
+ let comment2 = "";
17165
17309
  if (end) {
17166
17310
  let hasSpace = false;
17167
17311
  let sep5 = "";
@@ -17175,15 +17319,15 @@ var require_resolve_end = __commonJS({
17175
17319
  if (reqSpace && !hasSpace)
17176
17320
  onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
17177
17321
  const cb = source.substring(1) || " ";
17178
- if (!comment)
17179
- comment = cb;
17322
+ if (!comment2)
17323
+ comment2 = cb;
17180
17324
  else
17181
- comment += sep5 + cb;
17325
+ comment2 += sep5 + cb;
17182
17326
  sep5 = "";
17183
17327
  break;
17184
17328
  }
17185
17329
  case "newline":
17186
- if (comment)
17330
+ if (comment2)
17187
17331
  sep5 += source;
17188
17332
  hasSpace = true;
17189
17333
  break;
@@ -17193,7 +17337,7 @@ var require_resolve_end = __commonJS({
17193
17337
  offset += source.length;
17194
17338
  }
17195
17339
  }
17196
- return { comment, offset };
17340
+ return { comment: comment2, offset };
17197
17341
  }
17198
17342
  exports2.resolveEnd = resolveEnd;
17199
17343
  }
@@ -17592,7 +17736,7 @@ var require_resolve_block_scalar = __commonJS({
17592
17736
  if (error !== -1)
17593
17737
  onError(error, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`);
17594
17738
  let hasSpace = false;
17595
- let comment = "";
17739
+ let comment2 = "";
17596
17740
  let length = source.length;
17597
17741
  for (let i = 1; i < props.length; ++i) {
17598
17742
  const token = props[i];
@@ -17609,7 +17753,7 @@ var require_resolve_block_scalar = __commonJS({
17609
17753
  onError(token, "MISSING_CHAR", message);
17610
17754
  }
17611
17755
  length += token.source.length;
17612
- comment = token.source.substring(1);
17756
+ comment2 = token.source.substring(1);
17613
17757
  break;
17614
17758
  case "error":
17615
17759
  onError(token, "UNEXPECTED_TOKEN", token.message);
@@ -17625,7 +17769,7 @@ var require_resolve_block_scalar = __commonJS({
17625
17769
  }
17626
17770
  }
17627
17771
  }
17628
- return { mode, indent, chomp, comment, length };
17772
+ return { mode, indent, chomp, comment: comment2, length };
17629
17773
  }
17630
17774
  function splitLines(source) {
17631
17775
  const split = source.split(/\n( *)/);
@@ -17870,7 +18014,7 @@ var require_compose_scalar = __commonJS({
17870
18014
  var resolveBlockScalar = require_resolve_block_scalar();
17871
18015
  var resolveFlowScalar = require_resolve_flow_scalar();
17872
18016
  function composeScalar(ctx, token, tagToken, onError) {
17873
- const { value, type, comment, range } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
18017
+ const { value, type, comment: comment2, range } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
17874
18018
  const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
17875
18019
  let tag;
17876
18020
  if (ctx.options.stringKeys && ctx.atKey) {
@@ -17898,8 +18042,8 @@ var require_compose_scalar = __commonJS({
17898
18042
  scalar.tag = tagName;
17899
18043
  if (tag.format)
17900
18044
  scalar.format = tag.format;
17901
- if (comment)
17902
- scalar.comment = comment;
18045
+ if (comment2)
18046
+ scalar.comment = comment2;
17903
18047
  return scalar;
17904
18048
  }
17905
18049
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
@@ -17985,7 +18129,7 @@ var require_compose_node = __commonJS({
17985
18129
  var CN = { composeNode, composeEmptyNode };
17986
18130
  function composeNode(ctx, token, props, onError) {
17987
18131
  const atKey = ctx.atKey;
17988
- const { spaceBefore, comment, anchor, tag } = props;
18132
+ const { spaceBefore, comment: comment2, anchor, tag } = props;
17989
18133
  let node;
17990
18134
  let isSrcToken = true;
17991
18135
  switch (token.type) {
@@ -18029,17 +18173,17 @@ var require_compose_node = __commonJS({
18029
18173
  }
18030
18174
  if (spaceBefore)
18031
18175
  node.spaceBefore = true;
18032
- if (comment) {
18176
+ if (comment2) {
18033
18177
  if (token.type === "scalar" && token.source === "")
18034
- node.comment = comment;
18178
+ node.comment = comment2;
18035
18179
  else
18036
- node.commentBefore = comment;
18180
+ node.commentBefore = comment2;
18037
18181
  }
18038
18182
  if (ctx.options.keepSourceTokens && isSrcToken)
18039
18183
  node.srcToken = token;
18040
18184
  return node;
18041
18185
  }
18042
- function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
18186
+ function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment: comment2, anchor, tag, end }, onError) {
18043
18187
  const token = {
18044
18188
  type: "scalar",
18045
18189
  offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),
@@ -18054,8 +18198,8 @@ var require_compose_node = __commonJS({
18054
18198
  }
18055
18199
  if (spaceBefore)
18056
18200
  node.spaceBefore = true;
18057
- if (comment) {
18058
- node.comment = comment;
18201
+ if (comment2) {
18202
+ node.comment = comment2;
18059
18203
  node.range[2] = end;
18060
18204
  }
18061
18205
  return node;
@@ -18141,14 +18285,14 @@ var require_composer = __commonJS({
18141
18285
  return [offset, offset + (typeof source === "string" ? source.length : 1)];
18142
18286
  }
18143
18287
  function parsePrelude(prelude) {
18144
- let comment = "";
18288
+ let comment2 = "";
18145
18289
  let atComment = false;
18146
18290
  let afterEmptyLine = false;
18147
18291
  for (let i = 0; i < prelude.length; ++i) {
18148
18292
  const source = prelude[i];
18149
18293
  switch (source[0]) {
18150
18294
  case "#":
18151
- comment += (comment === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " ");
18295
+ comment2 += (comment2 === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " ");
18152
18296
  atComment = true;
18153
18297
  afterEmptyLine = false;
18154
18298
  break;
@@ -18163,7 +18307,7 @@ var require_composer = __commonJS({
18163
18307
  atComment = false;
18164
18308
  }
18165
18309
  }
18166
- return { comment, afterEmptyLine };
18310
+ return { comment: comment2, afterEmptyLine };
18167
18311
  }
18168
18312
  var Composer = class {
18169
18313
  constructor(options = {}) {
@@ -18183,25 +18327,25 @@ var require_composer = __commonJS({
18183
18327
  this.options = options;
18184
18328
  }
18185
18329
  decorate(doc, afterDoc) {
18186
- const { comment, afterEmptyLine } = parsePrelude(this.prelude);
18187
- if (comment) {
18330
+ const { comment: comment2, afterEmptyLine } = parsePrelude(this.prelude);
18331
+ if (comment2) {
18188
18332
  const dc = doc.contents;
18189
18333
  if (afterDoc) {
18190
18334
  doc.comment = doc.comment ? `${doc.comment}
18191
- ${comment}` : comment;
18335
+ ${comment2}` : comment2;
18192
18336
  } else if (afterEmptyLine || doc.directives.docStart || !dc) {
18193
- doc.commentBefore = comment;
18337
+ doc.commentBefore = comment2;
18194
18338
  } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
18195
18339
  let it = dc.items[0];
18196
18340
  if (identity.isPair(it))
18197
18341
  it = it.key;
18198
18342
  const cb = it.commentBefore;
18199
- it.commentBefore = cb ? `${comment}
18200
- ${cb}` : comment;
18343
+ it.commentBefore = cb ? `${comment2}
18344
+ ${cb}` : comment2;
18201
18345
  } else {
18202
18346
  const cb = dc.commentBefore;
18203
- dc.commentBefore = cb ? `${comment}
18204
- ${cb}` : comment;
18347
+ dc.commentBefore = cb ? `${comment2}
18348
+ ${cb}` : comment2;
18205
18349
  }
18206
18350
  }
18207
18351
  if (afterDoc) {
@@ -20556,12 +20700,10 @@ function discoveryScope(steps, dispositionOf) {
20556
20700
  return [...tallies.values()].sort((a, b) => a.source.localeCompare(b.source) || a.job.localeCompare(b.job));
20557
20701
  }
20558
20702
  function declaredRunnersRunBy(scripts, runners, shell) {
20559
- const lastStages = Object.fromEntries(Object.entries(scripts).map(([name, body]) => [name, shell.lastStagesOf(body)]));
20560
20703
  return (step) => {
20561
20704
  if (!("command" in step))
20562
20705
  return [];
20563
- const command = shell.lastStagesOf(step.command);
20564
- return Object.entries(runners).filter((entry) => entry[1] !== null && shell.runsAsCommand(command, entry[1], lastStages));
20706
+ return Object.entries(runners).filter((entry) => entry[1] !== null && shell.runsAsCommand(step.command, entry[1], scripts));
20565
20707
  };
20566
20708
  }
20567
20709
  function declaredRunnerTest(scripts, runners, shell) {
@@ -21949,7 +22091,7 @@ function observationSuffix(item) {
21949
22091
  const observationOnly = isObservationOnly(item.outcome);
21950
22092
  const remark = remarkWordsOf(item);
21951
22093
  if (item.outcome === "broken") {
21952
- const where2 = [item.locator, remark === void 0 ? void 0 : headlineOf(remark)].filter((part) => part !== void 0 && part.length > 0).join(": ");
22094
+ const where2 = [item.locator, remark === void 0 ? void 0 : headlineOf(remark)].filter((part2) => part2 !== void 0 && part2.length > 0).join(": ");
21953
22095
  return where2.length > 0 ? ` (${cellSafe(where2)})` : void 0;
21954
22096
  }
21955
22097
  if (!observationOnly)
@@ -22837,7 +22979,7 @@ function namesStdout(path) {
22837
22979
  return false;
22838
22980
  }
22839
22981
  function withFirstLinkFollowed(path) {
22840
- const parts = path.split(sep).filter((part) => part !== "");
22982
+ const parts = path.split(sep).filter((part2) => part2 !== "");
22841
22983
  for (let length = 1; length <= parts.length; length++) {
22842
22984
  const prefix = sep + parts.slice(0, length).join(sep);
22843
22985
  const target = linkTarget(prefix);
@@ -24154,7 +24296,7 @@ var init_DocTypeReader = __esm({
24154
24296
  if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") {
24155
24297
  i = i + 9;
24156
24298
  let angleBracketsCount = 1;
24157
- let hasBody = false, comment = false;
24299
+ let hasBody = false, comment2 = false;
24158
24300
  let quoteChar = null;
24159
24301
  let exp = "";
24160
24302
  for (; i < xmlData.length; i++) {
@@ -24163,12 +24305,12 @@ var init_DocTypeReader = __esm({
24163
24305
  exp += xmlData[i];
24164
24306
  continue;
24165
24307
  }
24166
- if (!hasBody && !comment && (xmlData[i] === '"' || xmlData[i] === "'")) {
24308
+ if (!hasBody && !comment2 && (xmlData[i] === '"' || xmlData[i] === "'")) {
24167
24309
  quoteChar = xmlData[i];
24168
24310
  exp += xmlData[i];
24169
24311
  continue;
24170
24312
  }
24171
- if (xmlData[i] === "<" && !comment) {
24313
+ if (xmlData[i] === "<" && !comment2) {
24172
24314
  if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
24173
24315
  i += 7;
24174
24316
  let entityName, val;
@@ -24192,14 +24334,14 @@ var init_DocTypeReader = __esm({
24192
24334
  i += 9;
24193
24335
  const { index } = this.readNotationExp(xmlData, i + 1, this.suppressValidationErr);
24194
24336
  i = index;
24195
- } else if (hasSeq(xmlData, "!--", i)) comment = true;
24337
+ } else if (hasSeq(xmlData, "!--", i)) comment2 = true;
24196
24338
  else throw new Error(`Invalid DOCTYPE`);
24197
24339
  angleBracketsCount++;
24198
24340
  exp = "";
24199
24341
  } else if (xmlData[i] === ">") {
24200
- if (comment) {
24342
+ if (comment2) {
24201
24343
  if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") {
24202
- comment = false;
24344
+ comment2 = false;
24203
24345
  angleBracketsCount--;
24204
24346
  }
24205
24347
  } else {
@@ -24889,11 +25031,11 @@ var init_Expression = __esm({
24889
25031
  * @param {string} part - Segment string (e.g., "user", "ns::user", "user[id]", "ns::user:first")
24890
25032
  * @returns {Object} Segment object
24891
25033
  */
24892
- _parseSegment(part) {
25034
+ _parseSegment(part2) {
24893
25035
  const segment = { type: "tag" };
24894
25036
  let bracketContent = null;
24895
- let withoutBrackets = part;
24896
- const bracketMatch = part.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
25037
+ let withoutBrackets = part2;
25038
+ const bracketMatch = part2.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
24897
25039
  if (bracketMatch) {
24898
25040
  withoutBrackets = bracketMatch[1] + bracketMatch[3];
24899
25041
  if (bracketMatch[2]) {
@@ -24910,7 +25052,7 @@ var init_Expression = __esm({
24910
25052
  namespace = withoutBrackets.substring(0, nsIndex).trim();
24911
25053
  tagAndPosition = withoutBrackets.substring(nsIndex + 2).trim();
24912
25054
  if (!namespace) {
24913
- throw new Error(`Invalid namespace in pattern: ${part}`);
25055
+ throw new Error(`Invalid namespace in pattern: ${part2}`);
24914
25056
  }
24915
25057
  }
24916
25058
  let tag = void 0;
@@ -24930,7 +25072,7 @@ var init_Expression = __esm({
24930
25072
  tag = tagAndPosition;
24931
25073
  }
24932
25074
  if (!tag) {
24933
- throw new Error(`Invalid segment pattern: ${part}`);
25075
+ throw new Error(`Invalid segment pattern: ${part2}`);
24934
25076
  }
24935
25077
  segment.tag = tag;
24936
25078
  if (namespace) {
@@ -25281,8 +25423,8 @@ var init_Matcher = __esm({
25281
25423
  * @param {boolean} [includeNamespace=true]
25282
25424
  * @returns {string}
25283
25425
  */
25284
- toString(separator, includeNamespace = true) {
25285
- return this._matcher.toString(separator, includeNamespace);
25426
+ toString(separator2, includeNamespace = true) {
25427
+ return this._matcher.toString(separator2, includeNamespace);
25286
25428
  }
25287
25429
  /**
25288
25430
  * Get path as array of tag names.
@@ -25499,8 +25641,8 @@ var init_Matcher = __esm({
25499
25641
  * @param {boolean} [includeNamespace=true]
25500
25642
  * @returns {string}
25501
25643
  */
25502
- toString(separator, includeNamespace = true) {
25503
- const sep5 = separator || this.separator;
25644
+ toString(separator2, includeNamespace = true) {
25645
+ const sep5 = separator2 || this.separator;
25504
25646
  const isDefault = sep5 === this.separator && includeNamespace === true;
25505
25647
  if (isDefault) {
25506
25648
  if (this._pathStringCache !== null) {
@@ -26953,9 +27095,9 @@ var init_OrderedObjParser = __esm({
26953
27095
  } else if (c1 === 33 && xmlData.charCodeAt(i + 2) === 45 && xmlData.charCodeAt(i + 3) === 45) {
26954
27096
  const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed.");
26955
27097
  if (options.commentPropName) {
26956
- const comment = xmlData.substring(i + 4, endIndex - 2);
27098
+ const comment2 = xmlData.substring(i + 4, endIndex - 2);
26957
27099
  textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
26958
- currentNode.add(options.commentPropName, [{ [options.textNodeName]: comment }]);
27100
+ currentNode.add(options.commentPropName, [{ [options.textNodeName]: comment2 }]);
26959
27101
  }
26960
27102
  i = endIndex;
26961
27103
  } else if (c1 === 33 && xmlData.charCodeAt(i + 2) === 68) {
@@ -28408,10 +28550,10 @@ function argvRefusal(argv, registry, toolVersion) {
28408
28550
  const args = parseArgs(argv);
28409
28551
  return checkMisplacedHostModifiers(args, registry, "allocate") ?? checkArgvShape(argv, registry, "allocate") ?? checkUnknownFlags(args, registry, "allocate", toolVersion);
28410
28552
  }
28411
- function partRefusal(part) {
28412
- if (part === void 0) return APP_MESSAGES[128 /* NoFeaturePartGiven */]();
28413
- if (isFeaturePart(part)) return null;
28414
- return APP_MESSAGES[129 /* NotAFeaturePart */](part);
28553
+ function partRefusal(part2) {
28554
+ if (part2 === void 0) return APP_MESSAGES[128 /* NoFeaturePartGiven */]();
28555
+ if (isFeaturePart(part2)) return null;
28556
+ return APP_MESSAGES[129 /* NotAFeaturePart */](part2);
28415
28557
  }
28416
28558
  var init_request = __esm({
28417
28559
  "src/cli-allocate/request.ts"() {
@@ -28463,9 +28605,9 @@ var init_refStore = __esm({
28463
28605
  import { spawnSync as spawnSync2 } from "node:child_process";
28464
28606
  import { lstatSync as lstatSync3, readFileSync as readFileSync7 } from "node:fs";
28465
28607
  import { dirname as dirname5, join as join8 } from "node:path";
28466
- function readHistory(cwd, part) {
28608
+ function readHistory(cwd, part2) {
28467
28609
  proveRefsReadable(cwd);
28468
- const args = ["log", "--all", "-p", "-U0", "--no-color", "--no-ext-diff", "--format=%x01%h", "-G", `SCN-${part}-`];
28610
+ const args = ["log", "--all", "-p", "-U0", "--no-color", "--no-ext-diff", "--format=%x01%h", "-G", `SCN-${part2}-`];
28469
28611
  const result = spawnSync2("git", args, { cwd, encoding: "utf8", maxBuffer: MAX_OUTPUT_BYTES });
28470
28612
  if (result.error !== void 0) refuse2(0 /* History */, cwd, result.error);
28471
28613
  if (result.status !== 0) {
@@ -28563,11 +28705,11 @@ var init_readHistory = __esm({
28563
28705
  import { spawnSync as spawnSync3 } from "node:child_process";
28564
28706
  import { accessSync, constants as constants2, lstatSync as lstatSync4, readdirSync as readdirSync4, readFileSync as readFileSync8 } from "node:fs";
28565
28707
  import { join as join9, relative as relative2, sep as sep4 } from "node:path";
28566
- function readTree(top, part) {
28708
+ function readTree(top, part2) {
28567
28709
  const listed = gitListing(top, ["ls-files", "-z", "--cached", "--others", "--exclude-standard"]);
28568
28710
  const ignored = gitListing(top, ["ls-files", "-z", "--others", "--ignored", "--exclude-standard", "--directory"]);
28569
28711
  proveListable(top, "", new Set(ignored.filter(isDirectoryEntry).map((entry) => entry.slice(0, -1))));
28570
- return listed.flatMap((path) => occurrencesInListed(top, path, `SCN-${part}-`));
28712
+ return listed.flatMap((path) => occurrencesInListed(top, path, `SCN-${part2}-`));
28571
28713
  }
28572
28714
  function gitListing(top, args) {
28573
28715
  const result = spawnSync3("git", args, { cwd: top, encoding: "utf8", maxBuffer: MAX_OUTPUT_BYTES2 });
@@ -28606,10 +28748,10 @@ function linesCarrying(path, content, needle) {
28606
28748
  function isWalkedDirectory(name) {
28607
28749
  return name !== "node_modules" && !name.startsWith(".");
28608
28750
  }
28609
- function walkTree(root, part) {
28751
+ function walkTree(root, part2) {
28610
28752
  return filesUnder(root).flatMap((file) => {
28611
28753
  const content = readOrRefuse(4 /* TreeFile */, file, () => readFileSync8(file));
28612
- return linesCarrying(relative2(root, file).split(sep4).join("/"), content, `SCN-${part}-`);
28754
+ return linesCarrying(relative2(root, file).split(sep4).join("/"), content, `SCN-${part2}-`);
28613
28755
  });
28614
28756
  }
28615
28757
  function filesUnder(dir) {
@@ -28688,11 +28830,11 @@ function refuseUsage(line) {
28688
28830
  process.stderr.write(line + "\n");
28689
28831
  endRunOn(USAGE_REFUSAL);
28690
28832
  }
28691
- function answerRequest({ part, isNew }) {
28833
+ function answerRequest({ part: part2, isNew }) {
28692
28834
  const cwd = readOrRefuse(7 /* WorkingDirectory */, "", () => process.cwd());
28693
28835
  const top = repositoryTop(cwd);
28694
28836
  const headerCodes = readHeaderCodes(join10(top ?? cwd, DEFAULT_FEATURES_DIR));
28695
- const answer = nextScnCode({ part, headerCodes, isNew }, occurrencesFrom(cwd, part, top));
28837
+ const answer = nextScnCode({ part: part2, headerCodes, isNew }, occurrencesFrom(cwd, part2, top));
28696
28838
  if (answer.kind === "unknown-part") {
28697
28839
  refuseUsage(unknownPartRefusal(answer));
28698
28840
  return;
@@ -28705,8 +28847,8 @@ function answerRequest({ part, isNew }) {
28705
28847
  function writeLineIfAny(line) {
28706
28848
  if (line !== null) process.stderr.write(line + "\n");
28707
28849
  }
28708
- function occurrencesFrom(cwd, part, top) {
28709
- return top !== null ? [...readTree(top, part), ...readHistory(cwd, part)] : walkTree(cwd, part);
28850
+ function occurrencesFrom(cwd, part2, top) {
28851
+ return top !== null ? [...readTree(top, part2), ...readHistory(cwd, part2)] : walkTree(cwd, part2);
28710
28852
  }
28711
28853
  var init_cli2 = __esm({
28712
28854
  "src/cli-allocate/cli.ts"() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
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
  "fast-xml-parser": "^5.11.2",
27
27
  "yaml": "^2.9.0",
28
- "@3f-consulting/spec-controller-core": "0.1.78"
28
+ "@3f-consulting/spec-controller-core": "0.1.80"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"