spec-controller 0.1.79 → 0.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +332 -162
- 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 */]: (
|
|
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 */]: (
|
|
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 */]: (
|
|
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 */]: (
|
|
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,
|
|
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,
|
|
4885
|
+
return executor.transform(void 0, plain2, cls, void 0, void 0, void 0);
|
|
4886
4886
|
}
|
|
4887
|
-
plainToClassFromExist(clsObject,
|
|
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,
|
|
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,
|
|
5293
|
-
return classTransformer.plainToInstance(cls,
|
|
5292
|
+
function plainToClass(cls, plain2, options) {
|
|
5293
|
+
return classTransformer.plainToInstance(cls, plain2, options);
|
|
5294
5294
|
}
|
|
5295
5295
|
exports2.plainToClass = plainToClass;
|
|
5296
|
-
function plainToInstance(cls,
|
|
5297
|
-
return classTransformer.plainToInstance(cls,
|
|
5296
|
+
function plainToInstance(cls, plain2, options) {
|
|
5297
|
+
return classTransformer.plainToInstance(cls, plain2, options);
|
|
5298
5298
|
}
|
|
5299
5299
|
exports2.plainToInstance = plainToInstance;
|
|
5300
|
-
function plainToClassFromExist(clsObject,
|
|
5301
|
-
return classTransformer.plainToClassFromExist(clsObject,
|
|
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,
|
|
11210
|
-
if (token.line.startsWith(
|
|
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(
|
|
11214
|
-
this.activeDocStringSeparator =
|
|
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,
|
|
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(
|
|
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) !==
|
|
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,138 @@ var init_cucumber = __esm({
|
|
|
12868
12868
|
function wordsOf(text) {
|
|
12869
12869
|
return text.trim().split(/\s+/);
|
|
12870
12870
|
}
|
|
12871
|
-
function
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
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 pastBody(text, from, { delimiter, tabs }) {
|
|
12938
|
+
const lines = text.slice(from).split("\n");
|
|
12939
|
+
const last = lines.findIndex((line) => (tabs ? line.replace(/^\t*/, "") : line) === delimiter);
|
|
12940
|
+
return last === -1 ? text.length : from + lines.slice(0, last + 1).join("\n").length;
|
|
12941
|
+
}
|
|
12942
|
+
function commandList() {
|
|
12943
|
+
const commands = [];
|
|
12944
|
+
const opens = [];
|
|
12945
|
+
let closed;
|
|
12946
|
+
const read = (token, char) => {
|
|
12947
|
+
if (token.kind === "break")
|
|
12948
|
+
return;
|
|
12949
|
+
if (token.kind === "separator" && token.pipe && closed !== void 0) {
|
|
12950
|
+
commands.splice(closed, Infinity, ...commands.slice(closed).map((command) => ({ ...command, piped: true })));
|
|
12951
|
+
}
|
|
12952
|
+
if (char === "(")
|
|
12953
|
+
opens.push(commands.length);
|
|
12954
|
+
closed = char === ")" ? opens.pop() : void 0;
|
|
12955
|
+
};
|
|
12956
|
+
return { commands, push: (command) => commands.push(command), read };
|
|
12957
|
+
}
|
|
12958
|
+
function simpleCommands(text) {
|
|
12959
|
+
const source = text.replace(JOINED_LINE, (joined, pairs) => pairs.padEnd(joined.length));
|
|
12960
|
+
const { commands, push, read } = commandList();
|
|
12961
|
+
const bodies = [];
|
|
12962
|
+
let words = [];
|
|
12963
|
+
let word;
|
|
12964
|
+
let quoted = false;
|
|
12965
|
+
let target;
|
|
12966
|
+
const endWord = () => {
|
|
12967
|
+
if (word !== void 0) {
|
|
12968
|
+
if (target === void 0)
|
|
12969
|
+
words.push(word);
|
|
12970
|
+
else if (target.kind === "heredoc")
|
|
12971
|
+
bodies.push({ delimiter: word, tabs: target.tabs, quoted });
|
|
12972
|
+
target = void 0;
|
|
12973
|
+
}
|
|
12974
|
+
word = void 0;
|
|
12975
|
+
quoted = false;
|
|
12976
|
+
};
|
|
12977
|
+
const endCommand = (piped) => {
|
|
12978
|
+
endWord();
|
|
12979
|
+
target = void 0;
|
|
12980
|
+
if (words.length > 0)
|
|
12981
|
+
push({ words, piped });
|
|
12982
|
+
words = [];
|
|
12983
|
+
};
|
|
12984
|
+
for (let at = 0; at < source.length; ) {
|
|
12985
|
+
const token = nextToken(source, at, word);
|
|
12986
|
+
if (token.kind === "part") {
|
|
12987
|
+
word = (word ?? "") + token.value;
|
|
12988
|
+
quoted ||= token.quoted;
|
|
12989
|
+
} else if (token.kind === "separator")
|
|
12990
|
+
endCommand(token.pipe);
|
|
12991
|
+
else {
|
|
12992
|
+
if (token.kind !== "break" && !quoted && FILE_DESCRIPTOR.test(word ?? ""))
|
|
12993
|
+
word = void 0;
|
|
12994
|
+
endWord();
|
|
12995
|
+
if (token.kind !== "break")
|
|
12996
|
+
target = token;
|
|
12997
|
+
}
|
|
12998
|
+
read(token, source.charAt(at));
|
|
12999
|
+
at = source[at] === "\n" ? bodies.splice(0).reduce((from, body) => pastBody(body.quoted ? text : source, from, body), token.end) : token.end;
|
|
13000
|
+
}
|
|
13001
|
+
endCommand(false);
|
|
13002
|
+
return commands;
|
|
12876
13003
|
}
|
|
12877
13004
|
function handedOn(words) {
|
|
12878
13005
|
const prefix = LAUNCHERS.find((row) => opensWith(words, row.words));
|
|
@@ -12895,8 +13022,7 @@ function scriptsNamedBy(head) {
|
|
|
12895
13022
|
return void 0;
|
|
12896
13023
|
const each = invocations.eachWorkspace;
|
|
12897
13024
|
if (each !== void 0 && opensWith(head, each.words)) {
|
|
12898
|
-
|
|
12899
|
-
return isOneOf(invocations.runWords, word2) ? [next2] : void 0;
|
|
13025
|
+
return scriptsNamedBy([each.words[0], ...head.slice(pastOptions(head, each.words.length, each))]);
|
|
12900
13026
|
}
|
|
12901
13027
|
const [word, next] = head.slice(afterSelections(head, 1, invocations));
|
|
12902
13028
|
if (isOneOf(invocations.runWords, word))
|
|
@@ -12913,44 +13039,33 @@ function passedOn(words) {
|
|
|
12913
13039
|
const prefix = COMMAND_PREFIXES.find((row) => opensWith(words, row.words));
|
|
12914
13040
|
return prefix === void 0 ? void 0 : words.slice(pastOptions(words, prefix.words.length, prefix) + prefix.operands);
|
|
12915
13041
|
}
|
|
12916
|
-
function
|
|
12917
|
-
if (scriptsNamedBy(head)?.includes(script) === true)
|
|
12918
|
-
return true;
|
|
13042
|
+
function scriptsRunBy(head) {
|
|
12919
13043
|
const next = passedOn(head);
|
|
12920
|
-
return next
|
|
12921
|
-
}
|
|
12922
|
-
function headsOf(command) {
|
|
12923
|
-
return command.split(/\r?\n/).flatMap((line) => quotedSeparatorsBlanked(line).split(BACKGROUND).flatMap(commandHeads));
|
|
13044
|
+
return [scriptsNamedBy(head), next === void 0 ? void 0 : scriptsRunBy(next)].flat();
|
|
12924
13045
|
}
|
|
12925
13046
|
function commandInvokesScript(command, script) {
|
|
12926
|
-
return headsOf(command).some((head) =>
|
|
13047
|
+
return headsOf(command).some((head) => scriptsRunBy(head).includes(script));
|
|
12927
13048
|
}
|
|
12928
|
-
function runs(command, invocation, scripts, depth,
|
|
12929
|
-
if (
|
|
13049
|
+
function runs(command, invocation, scripts, depth, reading) {
|
|
13050
|
+
if (reading.names(command, invocation))
|
|
12930
13051
|
return true;
|
|
12931
13052
|
const entries = Object.entries(scripts);
|
|
12932
13053
|
if (depth === 0 || entries.length === 0)
|
|
12933
13054
|
return false;
|
|
12934
|
-
const
|
|
12935
|
-
return entries.some(([name, body]) =>
|
|
13055
|
+
const run3 = reading.heads(command).flatMap(scriptsRunBy);
|
|
13056
|
+
return entries.some(([name, body]) => run3.includes(name) && runs(body, invocation, scripts, depth - 1, reading));
|
|
12936
13057
|
}
|
|
12937
|
-
function runsBy(
|
|
13058
|
+
function runsBy(reading) {
|
|
12938
13059
|
return (command, invocation, scripts) => {
|
|
12939
13060
|
const words = wordsOf(invocation);
|
|
12940
|
-
return words.join(" ") !== "" && runs(command, words, scripts, SCRIPT_CHAIN_DEPTH,
|
|
13061
|
+
return words.join(" ") !== "" && runs(command, words, scripts, SCRIPT_CHAIN_DEPTH, reading);
|
|
12941
13062
|
};
|
|
12942
13063
|
}
|
|
12943
|
-
|
|
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;
|
|
13064
|
+
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
13065
|
var init_commandRuns = __esm({
|
|
12948
13066
|
"../core/dist/parse/commandRuns.js"() {
|
|
12949
13067
|
"use strict";
|
|
12950
13068
|
SCRIPT_CHAIN_DEPTH = 3;
|
|
12951
|
-
UP_TO_LAST_PIPE = /^.*(?<!\|)\|(?!\|)/;
|
|
12952
|
-
COMMAND_SEPARATOR = /&&|;|\|/;
|
|
12953
|
-
BACKGROUND = /(?<!>)&/;
|
|
12954
13069
|
ASSIGNMENT = /^[A-Za-z_]\w*=/;
|
|
12955
13070
|
launcher = (words, ...valued) => ({
|
|
12956
13071
|
words,
|
|
@@ -13037,20 +13152,77 @@ var init_commandRuns = __esm({
|
|
|
13037
13152
|
]);
|
|
13038
13153
|
opensAt = (words, prefix, from) => prefix.every((word, at) => words[from + at] === word);
|
|
13039
13154
|
opensWith = (words, prefix) => opensAt(words, prefix, 0);
|
|
13040
|
-
|
|
13155
|
+
namedOnLine = (line, invocation) => {
|
|
13041
13156
|
const words = wordsOf(line);
|
|
13042
13157
|
return words.some((_, at) => opensAt(words, invocation, at));
|
|
13043
13158
|
};
|
|
13044
|
-
|
|
13159
|
+
pastAssignments = (words) => words.slice(words.findIndex((word) => !ASSIGNMENT.test(word)));
|
|
13160
|
+
JOINED_LINE = /(?<!\\)((?:\\\\)*)\\\r?\n/g;
|
|
13161
|
+
SEPARATORS = "&|;()\n";
|
|
13162
|
+
REDIRECTION = /<<<|<<-?|&>|[<>]&|>>|[<>]/y;
|
|
13163
|
+
FILE_DESCRIPTOR = /^\d+$/;
|
|
13164
|
+
PLAIN = /[^\s&|;()<>'"\\`$]+/y;
|
|
13165
|
+
ESCAPED_IN_DOUBLE_QUOTES = '"\\$`';
|
|
13166
|
+
EXPANSIONS = ["$(", "${", "<(", ">("];
|
|
13167
|
+
EXPANSIONS_IN_DOUBLE_QUOTES = ["$(", "${"];
|
|
13168
|
+
part = (value, quoted, end) => ({ kind: "part", value, quoted, end });
|
|
13169
|
+
blank = (text, at) => {
|
|
13170
|
+
const char = text.charAt(at);
|
|
13171
|
+
return char !== "\n" && /\s/.test(char) ? { kind: "break", end: at + 1 } : void 0;
|
|
13172
|
+
};
|
|
13173
|
+
comment = (text, at, word) => {
|
|
13174
|
+
if (text[at] !== "#" || word !== void 0)
|
|
13175
|
+
return void 0;
|
|
13176
|
+
const end = text.indexOf("\n", at);
|
|
13177
|
+
return { kind: "break", end: end === -1 ? text.length : end };
|
|
13178
|
+
};
|
|
13179
|
+
escaped = (text, at) => text[at] === "\\" ? part(text.charAt(at + 1), true, at + 2) : void 0;
|
|
13180
|
+
singleQuoted = (text, at) => {
|
|
13181
|
+
if (text[at] !== "'")
|
|
13182
|
+
return void 0;
|
|
13183
|
+
const close = text.indexOf("'", at + 1);
|
|
13184
|
+
const end = close === -1 ? text.length : close;
|
|
13185
|
+
return part(text.slice(at + 1, end), true, end + 1);
|
|
13186
|
+
};
|
|
13187
|
+
doubleQuotedWord = (text, at) => {
|
|
13188
|
+
if (text[at] !== '"')
|
|
13189
|
+
return void 0;
|
|
13190
|
+
const [value, end] = doubleQuoted(text, at + 1);
|
|
13191
|
+
return part(value, true, end);
|
|
13192
|
+
};
|
|
13193
|
+
expansion = (text, at, word) => {
|
|
13194
|
+
const end = text[at] === "(" && word?.endsWith("=") === true ? pastBalanced(text, at + 1, "(", ")") : expansionEnd(text, at, EXPANSIONS);
|
|
13195
|
+
return end === void 0 ? void 0 : part(text.slice(at, end), false, end);
|
|
13196
|
+
};
|
|
13197
|
+
redirection = (text, at) => {
|
|
13198
|
+
REDIRECTION.lastIndex = at;
|
|
13199
|
+
const operator = REDIRECTION.exec(text)?.[0];
|
|
13200
|
+
if (operator === void 0)
|
|
13201
|
+
return void 0;
|
|
13202
|
+
const end = at + operator.length;
|
|
13203
|
+
return operator === "<<" || operator === "<<-" ? { kind: "heredoc", tabs: operator === "<<-", end } : { kind: "redirection", end };
|
|
13204
|
+
};
|
|
13205
|
+
separator = (text, at) => {
|
|
13206
|
+
const char = text.charAt(at);
|
|
13207
|
+
if (!SEPARATORS.includes(char))
|
|
13208
|
+
return void 0;
|
|
13209
|
+
return { kind: "separator", pipe: char === "|" && text.charAt(at + 1) !== "|", end: at + 1 };
|
|
13210
|
+
};
|
|
13211
|
+
READS = [blank, comment, escaped, singleQuoted, doubleQuotedWord, expansion, redirection, separator];
|
|
13045
13212
|
isOneOf = (words, word) => words?.some((each) => each === word) === true;
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13213
|
+
headsOf = (command) => simpleCommands(command).map(({ words }) => pastAssignments(words));
|
|
13214
|
+
lastStageHeadsOf = (command) => simpleCommands(command).filter(({ piped }) => !piped).map(({ words }) => pastAssignments(words));
|
|
13215
|
+
anywhere = {
|
|
13216
|
+
names: (command, invocation) => command.split(/\r?\n/).some((line) => namedOnLine(line, invocation)),
|
|
13217
|
+
heads: headsOf
|
|
13218
|
+
};
|
|
13219
|
+
asCommand = {
|
|
13220
|
+
names: (command, invocation) => lastStageHeadsOf(command).some((head) => opensWith(launched(head), invocation)),
|
|
13221
|
+
heads: lastStageHeadsOf
|
|
13222
|
+
};
|
|
13049
13223
|
commandRuns = runsBy(anywhere);
|
|
13050
|
-
commandRunsAsCommand = runsBy(asCommand);
|
|
13051
13224
|
shellReading = {
|
|
13052
|
-
|
|
13053
|
-
runsAsCommand: commandRunsAsCommand
|
|
13225
|
+
runsAsCommand: runsBy(asCommand)
|
|
13054
13226
|
};
|
|
13055
13227
|
}
|
|
13056
13228
|
});
|
|
@@ -14001,12 +14173,12 @@ var require_stringifyComment = __commonJS({
|
|
|
14001
14173
|
"../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
|
|
14002
14174
|
"use strict";
|
|
14003
14175
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
14004
|
-
function indentComment(
|
|
14005
|
-
if (/^\n+$/.test(
|
|
14006
|
-
return
|
|
14007
|
-
return indent ?
|
|
14176
|
+
function indentComment(comment2, indent) {
|
|
14177
|
+
if (/^\n+$/.test(comment2))
|
|
14178
|
+
return comment2.substring(1);
|
|
14179
|
+
return indent ? comment2.replace(/^(?! *$)/gm, indent) : comment2;
|
|
14008
14180
|
}
|
|
14009
|
-
var lineComment = (str, indent,
|
|
14181
|
+
var lineComment = (str, indent, comment2) => str.endsWith("\n") ? indentComment(comment2, indent) : comment2.includes("\n") ? "\n" + indentComment(comment2, indent) : (str.endsWith(" ") ? "" : " ") + comment2;
|
|
14010
14182
|
exports2.indentComment = indentComment;
|
|
14011
14183
|
exports2.lineComment = lineComment;
|
|
14012
14184
|
exports2.stringifyComment = stringifyComment;
|
|
@@ -14290,7 +14462,7 @@ ${indent}`) + "'";
|
|
|
14290
14462
|
} catch {
|
|
14291
14463
|
blockEndNewlines = /\n+(?!\n|$)/g;
|
|
14292
14464
|
}
|
|
14293
|
-
function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
14465
|
+
function blockString({ comment: comment2, type, value }, ctx, onComment, onChompKeep) {
|
|
14294
14466
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
14295
14467
|
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
14296
14468
|
return quotedString(value, ctx);
|
|
@@ -14342,8 +14514,8 @@ ${indent}`) + "'";
|
|
|
14342
14514
|
}
|
|
14343
14515
|
const indentSize = indent ? "2" : "1";
|
|
14344
14516
|
let header = (startWithSpace ? indentSize : "") + chomp;
|
|
14345
|
-
if (
|
|
14346
|
-
header += " " + commentString(
|
|
14517
|
+
if (comment2) {
|
|
14518
|
+
header += " " + commentString(comment2.replace(/ ?[\r\n]+/g, " "));
|
|
14347
14519
|
if (onComment)
|
|
14348
14520
|
onComment();
|
|
14349
14521
|
}
|
|
@@ -14887,20 +15059,20 @@ var require_stringifyCollection = __commonJS({
|
|
|
14887
15059
|
const stringify3 = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
14888
15060
|
return stringify3(collection, ctx, options);
|
|
14889
15061
|
}
|
|
14890
|
-
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
15062
|
+
function stringifyBlockCollection({ comment: comment2, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
14891
15063
|
const { indent, options: { commentString } } = ctx;
|
|
14892
15064
|
const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
|
|
14893
15065
|
let chompKeep = false;
|
|
14894
15066
|
const lines = [];
|
|
14895
15067
|
for (let i = 0; i < items.length; ++i) {
|
|
14896
15068
|
const item = items[i];
|
|
14897
|
-
let
|
|
15069
|
+
let comment3 = null;
|
|
14898
15070
|
if (identity.isNode(item)) {
|
|
14899
15071
|
if (!chompKeep && item.spaceBefore)
|
|
14900
15072
|
lines.push("");
|
|
14901
15073
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
14902
15074
|
if (item.comment)
|
|
14903
|
-
|
|
15075
|
+
comment3 = item.comment;
|
|
14904
15076
|
} else if (identity.isPair(item)) {
|
|
14905
15077
|
const ik = identity.isNode(item.key) ? item.key : null;
|
|
14906
15078
|
if (ik) {
|
|
@@ -14910,10 +15082,10 @@ var require_stringifyCollection = __commonJS({
|
|
|
14910
15082
|
}
|
|
14911
15083
|
}
|
|
14912
15084
|
chompKeep = false;
|
|
14913
|
-
let str2 = stringify2.stringify(item, itemCtx, () =>
|
|
14914
|
-
if (
|
|
14915
|
-
str2 += stringifyComment.lineComment(str2, itemIndent, commentString(
|
|
14916
|
-
if (chompKeep &&
|
|
15085
|
+
let str2 = stringify2.stringify(item, itemCtx, () => comment3 = null, () => chompKeep = true);
|
|
15086
|
+
if (comment3)
|
|
15087
|
+
str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment3));
|
|
15088
|
+
if (chompKeep && comment3)
|
|
14917
15089
|
chompKeep = false;
|
|
14918
15090
|
lines.push(blockItemPrefix + str2);
|
|
14919
15091
|
}
|
|
@@ -14928,8 +15100,8 @@ var require_stringifyCollection = __commonJS({
|
|
|
14928
15100
|
${indent}${line}` : "\n";
|
|
14929
15101
|
}
|
|
14930
15102
|
}
|
|
14931
|
-
if (
|
|
14932
|
-
str += "\n" + stringifyComment.indentComment(commentString(
|
|
15103
|
+
if (comment2) {
|
|
15104
|
+
str += "\n" + stringifyComment.indentComment(commentString(comment2), indent);
|
|
14933
15105
|
if (onComment)
|
|
14934
15106
|
onComment();
|
|
14935
15107
|
} else if (chompKeep && onChompKeep)
|
|
@@ -14949,13 +15121,13 @@ ${indent}${line}` : "\n";
|
|
|
14949
15121
|
const lines = [];
|
|
14950
15122
|
for (let i = 0; i < items.length; ++i) {
|
|
14951
15123
|
const item = items[i];
|
|
14952
|
-
let
|
|
15124
|
+
let comment2 = null;
|
|
14953
15125
|
if (identity.isNode(item)) {
|
|
14954
15126
|
if (item.spaceBefore)
|
|
14955
15127
|
lines.push("");
|
|
14956
15128
|
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
14957
15129
|
if (item.comment)
|
|
14958
|
-
|
|
15130
|
+
comment2 = item.comment;
|
|
14959
15131
|
} else if (identity.isPair(item)) {
|
|
14960
15132
|
const ik = identity.isNode(item.key) ? item.key : null;
|
|
14961
15133
|
if (ik) {
|
|
@@ -14968,16 +15140,16 @@ ${indent}${line}` : "\n";
|
|
|
14968
15140
|
const iv = identity.isNode(item.value) ? item.value : null;
|
|
14969
15141
|
if (iv) {
|
|
14970
15142
|
if (iv.comment)
|
|
14971
|
-
|
|
15143
|
+
comment2 = iv.comment;
|
|
14972
15144
|
if (iv.commentBefore)
|
|
14973
15145
|
reqNewline = true;
|
|
14974
15146
|
} else if (item.value == null && ik?.comment) {
|
|
14975
|
-
|
|
15147
|
+
comment2 = ik.comment;
|
|
14976
15148
|
}
|
|
14977
15149
|
}
|
|
14978
|
-
if (
|
|
15150
|
+
if (comment2)
|
|
14979
15151
|
reqNewline = true;
|
|
14980
|
-
let str = stringify2.stringify(item, itemCtx, () =>
|
|
15152
|
+
let str = stringify2.stringify(item, itemCtx, () => comment2 = null);
|
|
14981
15153
|
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
|
|
14982
15154
|
if (i < items.length - 1) {
|
|
14983
15155
|
str += ",";
|
|
@@ -14989,8 +15161,8 @@ ${indent}${line}` : "\n";
|
|
|
14989
15161
|
str += ",";
|
|
14990
15162
|
}
|
|
14991
15163
|
}
|
|
14992
|
-
if (
|
|
14993
|
-
str += stringifyComment.lineComment(str, itemIndent, commentString(
|
|
15164
|
+
if (comment2)
|
|
15165
|
+
str += stringifyComment.lineComment(str, itemIndent, commentString(comment2));
|
|
14994
15166
|
lines.push(str);
|
|
14995
15167
|
linesAtValue = lines.length;
|
|
14996
15168
|
}
|
|
@@ -15014,11 +15186,11 @@ ${indent}${end}`;
|
|
|
15014
15186
|
}
|
|
15015
15187
|
}
|
|
15016
15188
|
}
|
|
15017
|
-
function addCommentBefore({ indent, options: { commentString } }, lines,
|
|
15018
|
-
if (
|
|
15019
|
-
|
|
15020
|
-
if (
|
|
15021
|
-
const ic = stringifyComment.indentComment(commentString(
|
|
15189
|
+
function addCommentBefore({ indent, options: { commentString } }, lines, comment2, chompKeep) {
|
|
15190
|
+
if (comment2 && chompKeep)
|
|
15191
|
+
comment2 = comment2.replace(/^\n+/, "");
|
|
15192
|
+
if (comment2) {
|
|
15193
|
+
const ic = stringifyComment.indentComment(commentString(comment2), indent);
|
|
15022
15194
|
lines.push(ic.trimStart());
|
|
15023
15195
|
}
|
|
15024
15196
|
}
|
|
@@ -15638,7 +15810,7 @@ var require_binary = __commonJS({
|
|
|
15638
15810
|
return src;
|
|
15639
15811
|
}
|
|
15640
15812
|
},
|
|
15641
|
-
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
15813
|
+
stringify({ comment: comment2, type, value }, ctx, onComment, onChompKeep) {
|
|
15642
15814
|
if (!value)
|
|
15643
15815
|
return "";
|
|
15644
15816
|
const buf = value;
|
|
@@ -15663,7 +15835,7 @@ var require_binary = __commonJS({
|
|
|
15663
15835
|
}
|
|
15664
15836
|
str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
15665
15837
|
}
|
|
15666
|
-
return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
|
|
15838
|
+
return stringifyString.stringifyString({ comment: comment2, type, value: str }, ctx, onComment, onChompKeep);
|
|
15667
15839
|
}
|
|
15668
15840
|
};
|
|
15669
15841
|
exports2.binary = binary;
|
|
@@ -16795,7 +16967,7 @@ var require_resolve_props = __commonJS({
|
|
|
16795
16967
|
let spaceBefore = false;
|
|
16796
16968
|
let atNewline = startOnNewline;
|
|
16797
16969
|
let hasSpace = startOnNewline;
|
|
16798
|
-
let
|
|
16970
|
+
let comment2 = "";
|
|
16799
16971
|
let commentSep = "";
|
|
16800
16972
|
let hasNewline = false;
|
|
16801
16973
|
let reqSpace = false;
|
|
@@ -16829,18 +17001,18 @@ var require_resolve_props = __commonJS({
|
|
|
16829
17001
|
if (!hasSpace)
|
|
16830
17002
|
onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
|
|
16831
17003
|
const cb = token.source.substring(1) || " ";
|
|
16832
|
-
if (!
|
|
16833
|
-
|
|
17004
|
+
if (!comment2)
|
|
17005
|
+
comment2 = cb;
|
|
16834
17006
|
else
|
|
16835
|
-
|
|
17007
|
+
comment2 += commentSep + cb;
|
|
16836
17008
|
commentSep = "";
|
|
16837
17009
|
atNewline = false;
|
|
16838
17010
|
break;
|
|
16839
17011
|
}
|
|
16840
17012
|
case "newline":
|
|
16841
17013
|
if (atNewline) {
|
|
16842
|
-
if (
|
|
16843
|
-
|
|
17014
|
+
if (comment2)
|
|
17015
|
+
comment2 += token.source;
|
|
16844
17016
|
else if (!found || indicator !== "seq-item-ind")
|
|
16845
17017
|
spaceBefore = true;
|
|
16846
17018
|
} else
|
|
@@ -16908,7 +17080,7 @@ var require_resolve_props = __commonJS({
|
|
|
16908
17080
|
comma,
|
|
16909
17081
|
found,
|
|
16910
17082
|
spaceBefore,
|
|
16911
|
-
comment,
|
|
17083
|
+
comment: comment2,
|
|
16912
17084
|
hasNewline,
|
|
16913
17085
|
anchor,
|
|
16914
17086
|
tag,
|
|
@@ -17161,7 +17333,7 @@ var require_resolve_end = __commonJS({
|
|
|
17161
17333
|
"../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-end.js"(exports2) {
|
|
17162
17334
|
"use strict";
|
|
17163
17335
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
17164
|
-
let
|
|
17336
|
+
let comment2 = "";
|
|
17165
17337
|
if (end) {
|
|
17166
17338
|
let hasSpace = false;
|
|
17167
17339
|
let sep5 = "";
|
|
@@ -17175,15 +17347,15 @@ var require_resolve_end = __commonJS({
|
|
|
17175
17347
|
if (reqSpace && !hasSpace)
|
|
17176
17348
|
onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
|
|
17177
17349
|
const cb = source.substring(1) || " ";
|
|
17178
|
-
if (!
|
|
17179
|
-
|
|
17350
|
+
if (!comment2)
|
|
17351
|
+
comment2 = cb;
|
|
17180
17352
|
else
|
|
17181
|
-
|
|
17353
|
+
comment2 += sep5 + cb;
|
|
17182
17354
|
sep5 = "";
|
|
17183
17355
|
break;
|
|
17184
17356
|
}
|
|
17185
17357
|
case "newline":
|
|
17186
|
-
if (
|
|
17358
|
+
if (comment2)
|
|
17187
17359
|
sep5 += source;
|
|
17188
17360
|
hasSpace = true;
|
|
17189
17361
|
break;
|
|
@@ -17193,7 +17365,7 @@ var require_resolve_end = __commonJS({
|
|
|
17193
17365
|
offset += source.length;
|
|
17194
17366
|
}
|
|
17195
17367
|
}
|
|
17196
|
-
return { comment, offset };
|
|
17368
|
+
return { comment: comment2, offset };
|
|
17197
17369
|
}
|
|
17198
17370
|
exports2.resolveEnd = resolveEnd;
|
|
17199
17371
|
}
|
|
@@ -17592,7 +17764,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
17592
17764
|
if (error !== -1)
|
|
17593
17765
|
onError(error, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`);
|
|
17594
17766
|
let hasSpace = false;
|
|
17595
|
-
let
|
|
17767
|
+
let comment2 = "";
|
|
17596
17768
|
let length = source.length;
|
|
17597
17769
|
for (let i = 1; i < props.length; ++i) {
|
|
17598
17770
|
const token = props[i];
|
|
@@ -17609,7 +17781,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
17609
17781
|
onError(token, "MISSING_CHAR", message);
|
|
17610
17782
|
}
|
|
17611
17783
|
length += token.source.length;
|
|
17612
|
-
|
|
17784
|
+
comment2 = token.source.substring(1);
|
|
17613
17785
|
break;
|
|
17614
17786
|
case "error":
|
|
17615
17787
|
onError(token, "UNEXPECTED_TOKEN", token.message);
|
|
@@ -17625,7 +17797,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
17625
17797
|
}
|
|
17626
17798
|
}
|
|
17627
17799
|
}
|
|
17628
|
-
return { mode, indent, chomp, comment, length };
|
|
17800
|
+
return { mode, indent, chomp, comment: comment2, length };
|
|
17629
17801
|
}
|
|
17630
17802
|
function splitLines(source) {
|
|
17631
17803
|
const split = source.split(/\n( *)/);
|
|
@@ -17870,7 +18042,7 @@ var require_compose_scalar = __commonJS({
|
|
|
17870
18042
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
17871
18043
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
17872
18044
|
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);
|
|
18045
|
+
const { value, type, comment: comment2, range } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
|
|
17874
18046
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
|
|
17875
18047
|
let tag;
|
|
17876
18048
|
if (ctx.options.stringKeys && ctx.atKey) {
|
|
@@ -17898,8 +18070,8 @@ var require_compose_scalar = __commonJS({
|
|
|
17898
18070
|
scalar.tag = tagName;
|
|
17899
18071
|
if (tag.format)
|
|
17900
18072
|
scalar.format = tag.format;
|
|
17901
|
-
if (
|
|
17902
|
-
scalar.comment =
|
|
18073
|
+
if (comment2)
|
|
18074
|
+
scalar.comment = comment2;
|
|
17903
18075
|
return scalar;
|
|
17904
18076
|
}
|
|
17905
18077
|
function findScalarTagByName(schema, value, tagName, tagToken, onError) {
|
|
@@ -17985,7 +18157,7 @@ var require_compose_node = __commonJS({
|
|
|
17985
18157
|
var CN = { composeNode, composeEmptyNode };
|
|
17986
18158
|
function composeNode(ctx, token, props, onError) {
|
|
17987
18159
|
const atKey = ctx.atKey;
|
|
17988
|
-
const { spaceBefore, comment, anchor, tag } = props;
|
|
18160
|
+
const { spaceBefore, comment: comment2, anchor, tag } = props;
|
|
17989
18161
|
let node;
|
|
17990
18162
|
let isSrcToken = true;
|
|
17991
18163
|
switch (token.type) {
|
|
@@ -18029,17 +18201,17 @@ var require_compose_node = __commonJS({
|
|
|
18029
18201
|
}
|
|
18030
18202
|
if (spaceBefore)
|
|
18031
18203
|
node.spaceBefore = true;
|
|
18032
|
-
if (
|
|
18204
|
+
if (comment2) {
|
|
18033
18205
|
if (token.type === "scalar" && token.source === "")
|
|
18034
|
-
node.comment =
|
|
18206
|
+
node.comment = comment2;
|
|
18035
18207
|
else
|
|
18036
|
-
node.commentBefore =
|
|
18208
|
+
node.commentBefore = comment2;
|
|
18037
18209
|
}
|
|
18038
18210
|
if (ctx.options.keepSourceTokens && isSrcToken)
|
|
18039
18211
|
node.srcToken = token;
|
|
18040
18212
|
return node;
|
|
18041
18213
|
}
|
|
18042
|
-
function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
|
|
18214
|
+
function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment: comment2, anchor, tag, end }, onError) {
|
|
18043
18215
|
const token = {
|
|
18044
18216
|
type: "scalar",
|
|
18045
18217
|
offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),
|
|
@@ -18054,8 +18226,8 @@ var require_compose_node = __commonJS({
|
|
|
18054
18226
|
}
|
|
18055
18227
|
if (spaceBefore)
|
|
18056
18228
|
node.spaceBefore = true;
|
|
18057
|
-
if (
|
|
18058
|
-
node.comment =
|
|
18229
|
+
if (comment2) {
|
|
18230
|
+
node.comment = comment2;
|
|
18059
18231
|
node.range[2] = end;
|
|
18060
18232
|
}
|
|
18061
18233
|
return node;
|
|
@@ -18141,14 +18313,14 @@ var require_composer = __commonJS({
|
|
|
18141
18313
|
return [offset, offset + (typeof source === "string" ? source.length : 1)];
|
|
18142
18314
|
}
|
|
18143
18315
|
function parsePrelude(prelude) {
|
|
18144
|
-
let
|
|
18316
|
+
let comment2 = "";
|
|
18145
18317
|
let atComment = false;
|
|
18146
18318
|
let afterEmptyLine = false;
|
|
18147
18319
|
for (let i = 0; i < prelude.length; ++i) {
|
|
18148
18320
|
const source = prelude[i];
|
|
18149
18321
|
switch (source[0]) {
|
|
18150
18322
|
case "#":
|
|
18151
|
-
|
|
18323
|
+
comment2 += (comment2 === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " ");
|
|
18152
18324
|
atComment = true;
|
|
18153
18325
|
afterEmptyLine = false;
|
|
18154
18326
|
break;
|
|
@@ -18163,7 +18335,7 @@ var require_composer = __commonJS({
|
|
|
18163
18335
|
atComment = false;
|
|
18164
18336
|
}
|
|
18165
18337
|
}
|
|
18166
|
-
return { comment, afterEmptyLine };
|
|
18338
|
+
return { comment: comment2, afterEmptyLine };
|
|
18167
18339
|
}
|
|
18168
18340
|
var Composer = class {
|
|
18169
18341
|
constructor(options = {}) {
|
|
@@ -18183,25 +18355,25 @@ var require_composer = __commonJS({
|
|
|
18183
18355
|
this.options = options;
|
|
18184
18356
|
}
|
|
18185
18357
|
decorate(doc, afterDoc) {
|
|
18186
|
-
const { comment, afterEmptyLine } = parsePrelude(this.prelude);
|
|
18187
|
-
if (
|
|
18358
|
+
const { comment: comment2, afterEmptyLine } = parsePrelude(this.prelude);
|
|
18359
|
+
if (comment2) {
|
|
18188
18360
|
const dc = doc.contents;
|
|
18189
18361
|
if (afterDoc) {
|
|
18190
18362
|
doc.comment = doc.comment ? `${doc.comment}
|
|
18191
|
-
${
|
|
18363
|
+
${comment2}` : comment2;
|
|
18192
18364
|
} else if (afterEmptyLine || doc.directives.docStart || !dc) {
|
|
18193
|
-
doc.commentBefore =
|
|
18365
|
+
doc.commentBefore = comment2;
|
|
18194
18366
|
} else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
|
|
18195
18367
|
let it = dc.items[0];
|
|
18196
18368
|
if (identity.isPair(it))
|
|
18197
18369
|
it = it.key;
|
|
18198
18370
|
const cb = it.commentBefore;
|
|
18199
|
-
it.commentBefore = cb ? `${
|
|
18200
|
-
${cb}` :
|
|
18371
|
+
it.commentBefore = cb ? `${comment2}
|
|
18372
|
+
${cb}` : comment2;
|
|
18201
18373
|
} else {
|
|
18202
18374
|
const cb = dc.commentBefore;
|
|
18203
|
-
dc.commentBefore = cb ? `${
|
|
18204
|
-
${cb}` :
|
|
18375
|
+
dc.commentBefore = cb ? `${comment2}
|
|
18376
|
+
${cb}` : comment2;
|
|
18205
18377
|
}
|
|
18206
18378
|
}
|
|
18207
18379
|
if (afterDoc) {
|
|
@@ -20556,12 +20728,10 @@ function discoveryScope(steps, dispositionOf) {
|
|
|
20556
20728
|
return [...tallies.values()].sort((a, b) => a.source.localeCompare(b.source) || a.job.localeCompare(b.job));
|
|
20557
20729
|
}
|
|
20558
20730
|
function declaredRunnersRunBy(scripts, runners, shell) {
|
|
20559
|
-
const lastStages = Object.fromEntries(Object.entries(scripts).map(([name, body]) => [name, shell.lastStagesOf(body)]));
|
|
20560
20731
|
return (step) => {
|
|
20561
20732
|
if (!("command" in step))
|
|
20562
20733
|
return [];
|
|
20563
|
-
|
|
20564
|
-
return Object.entries(runners).filter((entry) => entry[1] !== null && shell.runsAsCommand(command, entry[1], lastStages));
|
|
20734
|
+
return Object.entries(runners).filter((entry) => entry[1] !== null && shell.runsAsCommand(step.command, entry[1], scripts));
|
|
20565
20735
|
};
|
|
20566
20736
|
}
|
|
20567
20737
|
function declaredRunnerTest(scripts, runners, shell) {
|
|
@@ -21949,7 +22119,7 @@ function observationSuffix(item) {
|
|
|
21949
22119
|
const observationOnly = isObservationOnly(item.outcome);
|
|
21950
22120
|
const remark = remarkWordsOf(item);
|
|
21951
22121
|
if (item.outcome === "broken") {
|
|
21952
|
-
const where2 = [item.locator, remark === void 0 ? void 0 : headlineOf(remark)].filter((
|
|
22122
|
+
const where2 = [item.locator, remark === void 0 ? void 0 : headlineOf(remark)].filter((part2) => part2 !== void 0 && part2.length > 0).join(": ");
|
|
21953
22123
|
return where2.length > 0 ? ` (${cellSafe(where2)})` : void 0;
|
|
21954
22124
|
}
|
|
21955
22125
|
if (!observationOnly)
|
|
@@ -22837,7 +23007,7 @@ function namesStdout(path) {
|
|
|
22837
23007
|
return false;
|
|
22838
23008
|
}
|
|
22839
23009
|
function withFirstLinkFollowed(path) {
|
|
22840
|
-
const parts = path.split(sep).filter((
|
|
23010
|
+
const parts = path.split(sep).filter((part2) => part2 !== "");
|
|
22841
23011
|
for (let length = 1; length <= parts.length; length++) {
|
|
22842
23012
|
const prefix = sep + parts.slice(0, length).join(sep);
|
|
22843
23013
|
const target = linkTarget(prefix);
|
|
@@ -24154,7 +24324,7 @@ var init_DocTypeReader = __esm({
|
|
|
24154
24324
|
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
24325
|
i = i + 9;
|
|
24156
24326
|
let angleBracketsCount = 1;
|
|
24157
|
-
let hasBody = false,
|
|
24327
|
+
let hasBody = false, comment2 = false;
|
|
24158
24328
|
let quoteChar = null;
|
|
24159
24329
|
let exp = "";
|
|
24160
24330
|
for (; i < xmlData.length; i++) {
|
|
@@ -24163,12 +24333,12 @@ var init_DocTypeReader = __esm({
|
|
|
24163
24333
|
exp += xmlData[i];
|
|
24164
24334
|
continue;
|
|
24165
24335
|
}
|
|
24166
|
-
if (!hasBody && !
|
|
24336
|
+
if (!hasBody && !comment2 && (xmlData[i] === '"' || xmlData[i] === "'")) {
|
|
24167
24337
|
quoteChar = xmlData[i];
|
|
24168
24338
|
exp += xmlData[i];
|
|
24169
24339
|
continue;
|
|
24170
24340
|
}
|
|
24171
|
-
if (xmlData[i] === "<" && !
|
|
24341
|
+
if (xmlData[i] === "<" && !comment2) {
|
|
24172
24342
|
if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
|
|
24173
24343
|
i += 7;
|
|
24174
24344
|
let entityName, val;
|
|
@@ -24192,14 +24362,14 @@ var init_DocTypeReader = __esm({
|
|
|
24192
24362
|
i += 9;
|
|
24193
24363
|
const { index } = this.readNotationExp(xmlData, i + 1, this.suppressValidationErr);
|
|
24194
24364
|
i = index;
|
|
24195
|
-
} else if (hasSeq(xmlData, "!--", i))
|
|
24365
|
+
} else if (hasSeq(xmlData, "!--", i)) comment2 = true;
|
|
24196
24366
|
else throw new Error(`Invalid DOCTYPE`);
|
|
24197
24367
|
angleBracketsCount++;
|
|
24198
24368
|
exp = "";
|
|
24199
24369
|
} else if (xmlData[i] === ">") {
|
|
24200
|
-
if (
|
|
24370
|
+
if (comment2) {
|
|
24201
24371
|
if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") {
|
|
24202
|
-
|
|
24372
|
+
comment2 = false;
|
|
24203
24373
|
angleBracketsCount--;
|
|
24204
24374
|
}
|
|
24205
24375
|
} else {
|
|
@@ -24889,11 +25059,11 @@ var init_Expression = __esm({
|
|
|
24889
25059
|
* @param {string} part - Segment string (e.g., "user", "ns::user", "user[id]", "ns::user:first")
|
|
24890
25060
|
* @returns {Object} Segment object
|
|
24891
25061
|
*/
|
|
24892
|
-
_parseSegment(
|
|
25062
|
+
_parseSegment(part2) {
|
|
24893
25063
|
const segment = { type: "tag" };
|
|
24894
25064
|
let bracketContent = null;
|
|
24895
|
-
let withoutBrackets =
|
|
24896
|
-
const bracketMatch =
|
|
25065
|
+
let withoutBrackets = part2;
|
|
25066
|
+
const bracketMatch = part2.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
|
|
24897
25067
|
if (bracketMatch) {
|
|
24898
25068
|
withoutBrackets = bracketMatch[1] + bracketMatch[3];
|
|
24899
25069
|
if (bracketMatch[2]) {
|
|
@@ -24910,7 +25080,7 @@ var init_Expression = __esm({
|
|
|
24910
25080
|
namespace = withoutBrackets.substring(0, nsIndex).trim();
|
|
24911
25081
|
tagAndPosition = withoutBrackets.substring(nsIndex + 2).trim();
|
|
24912
25082
|
if (!namespace) {
|
|
24913
|
-
throw new Error(`Invalid namespace in pattern: ${
|
|
25083
|
+
throw new Error(`Invalid namespace in pattern: ${part2}`);
|
|
24914
25084
|
}
|
|
24915
25085
|
}
|
|
24916
25086
|
let tag = void 0;
|
|
@@ -24930,7 +25100,7 @@ var init_Expression = __esm({
|
|
|
24930
25100
|
tag = tagAndPosition;
|
|
24931
25101
|
}
|
|
24932
25102
|
if (!tag) {
|
|
24933
|
-
throw new Error(`Invalid segment pattern: ${
|
|
25103
|
+
throw new Error(`Invalid segment pattern: ${part2}`);
|
|
24934
25104
|
}
|
|
24935
25105
|
segment.tag = tag;
|
|
24936
25106
|
if (namespace) {
|
|
@@ -25281,8 +25451,8 @@ var init_Matcher = __esm({
|
|
|
25281
25451
|
* @param {boolean} [includeNamespace=true]
|
|
25282
25452
|
* @returns {string}
|
|
25283
25453
|
*/
|
|
25284
|
-
toString(
|
|
25285
|
-
return this._matcher.toString(
|
|
25454
|
+
toString(separator2, includeNamespace = true) {
|
|
25455
|
+
return this._matcher.toString(separator2, includeNamespace);
|
|
25286
25456
|
}
|
|
25287
25457
|
/**
|
|
25288
25458
|
* Get path as array of tag names.
|
|
@@ -25499,8 +25669,8 @@ var init_Matcher = __esm({
|
|
|
25499
25669
|
* @param {boolean} [includeNamespace=true]
|
|
25500
25670
|
* @returns {string}
|
|
25501
25671
|
*/
|
|
25502
|
-
toString(
|
|
25503
|
-
const sep5 =
|
|
25672
|
+
toString(separator2, includeNamespace = true) {
|
|
25673
|
+
const sep5 = separator2 || this.separator;
|
|
25504
25674
|
const isDefault = sep5 === this.separator && includeNamespace === true;
|
|
25505
25675
|
if (isDefault) {
|
|
25506
25676
|
if (this._pathStringCache !== null) {
|
|
@@ -26953,9 +27123,9 @@ var init_OrderedObjParser = __esm({
|
|
|
26953
27123
|
} else if (c1 === 33 && xmlData.charCodeAt(i + 2) === 45 && xmlData.charCodeAt(i + 3) === 45) {
|
|
26954
27124
|
const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed.");
|
|
26955
27125
|
if (options.commentPropName) {
|
|
26956
|
-
const
|
|
27126
|
+
const comment2 = xmlData.substring(i + 4, endIndex - 2);
|
|
26957
27127
|
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
26958
|
-
currentNode.add(options.commentPropName, [{ [options.textNodeName]:
|
|
27128
|
+
currentNode.add(options.commentPropName, [{ [options.textNodeName]: comment2 }]);
|
|
26959
27129
|
}
|
|
26960
27130
|
i = endIndex;
|
|
26961
27131
|
} else if (c1 === 33 && xmlData.charCodeAt(i + 2) === 68) {
|
|
@@ -28408,10 +28578,10 @@ function argvRefusal(argv, registry, toolVersion) {
|
|
|
28408
28578
|
const args = parseArgs(argv);
|
|
28409
28579
|
return checkMisplacedHostModifiers(args, registry, "allocate") ?? checkArgvShape(argv, registry, "allocate") ?? checkUnknownFlags(args, registry, "allocate", toolVersion);
|
|
28410
28580
|
}
|
|
28411
|
-
function partRefusal(
|
|
28412
|
-
if (
|
|
28413
|
-
if (isFeaturePart(
|
|
28414
|
-
return APP_MESSAGES[129 /* NotAFeaturePart */](
|
|
28581
|
+
function partRefusal(part2) {
|
|
28582
|
+
if (part2 === void 0) return APP_MESSAGES[128 /* NoFeaturePartGiven */]();
|
|
28583
|
+
if (isFeaturePart(part2)) return null;
|
|
28584
|
+
return APP_MESSAGES[129 /* NotAFeaturePart */](part2);
|
|
28415
28585
|
}
|
|
28416
28586
|
var init_request = __esm({
|
|
28417
28587
|
"src/cli-allocate/request.ts"() {
|
|
@@ -28463,9 +28633,9 @@ var init_refStore = __esm({
|
|
|
28463
28633
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
28464
28634
|
import { lstatSync as lstatSync3, readFileSync as readFileSync7 } from "node:fs";
|
|
28465
28635
|
import { dirname as dirname5, join as join8 } from "node:path";
|
|
28466
|
-
function readHistory(cwd,
|
|
28636
|
+
function readHistory(cwd, part2) {
|
|
28467
28637
|
proveRefsReadable(cwd);
|
|
28468
|
-
const args = ["log", "--all", "-p", "-U0", "--no-color", "--no-ext-diff", "--format=%x01%h", "-G", `SCN-${
|
|
28638
|
+
const args = ["log", "--all", "-p", "-U0", "--no-color", "--no-ext-diff", "--format=%x01%h", "-G", `SCN-${part2}-`];
|
|
28469
28639
|
const result = spawnSync2("git", args, { cwd, encoding: "utf8", maxBuffer: MAX_OUTPUT_BYTES });
|
|
28470
28640
|
if (result.error !== void 0) refuse2(0 /* History */, cwd, result.error);
|
|
28471
28641
|
if (result.status !== 0) {
|
|
@@ -28563,11 +28733,11 @@ var init_readHistory = __esm({
|
|
|
28563
28733
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
28564
28734
|
import { accessSync, constants as constants2, lstatSync as lstatSync4, readdirSync as readdirSync4, readFileSync as readFileSync8 } from "node:fs";
|
|
28565
28735
|
import { join as join9, relative as relative2, sep as sep4 } from "node:path";
|
|
28566
|
-
function readTree(top,
|
|
28736
|
+
function readTree(top, part2) {
|
|
28567
28737
|
const listed = gitListing(top, ["ls-files", "-z", "--cached", "--others", "--exclude-standard"]);
|
|
28568
28738
|
const ignored = gitListing(top, ["ls-files", "-z", "--others", "--ignored", "--exclude-standard", "--directory"]);
|
|
28569
28739
|
proveListable(top, "", new Set(ignored.filter(isDirectoryEntry).map((entry) => entry.slice(0, -1))));
|
|
28570
|
-
return listed.flatMap((path) => occurrencesInListed(top, path, `SCN-${
|
|
28740
|
+
return listed.flatMap((path) => occurrencesInListed(top, path, `SCN-${part2}-`));
|
|
28571
28741
|
}
|
|
28572
28742
|
function gitListing(top, args) {
|
|
28573
28743
|
const result = spawnSync3("git", args, { cwd: top, encoding: "utf8", maxBuffer: MAX_OUTPUT_BYTES2 });
|
|
@@ -28606,10 +28776,10 @@ function linesCarrying(path, content, needle) {
|
|
|
28606
28776
|
function isWalkedDirectory(name) {
|
|
28607
28777
|
return name !== "node_modules" && !name.startsWith(".");
|
|
28608
28778
|
}
|
|
28609
|
-
function walkTree(root,
|
|
28779
|
+
function walkTree(root, part2) {
|
|
28610
28780
|
return filesUnder(root).flatMap((file) => {
|
|
28611
28781
|
const content = readOrRefuse(4 /* TreeFile */, file, () => readFileSync8(file));
|
|
28612
|
-
return linesCarrying(relative2(root, file).split(sep4).join("/"), content, `SCN-${
|
|
28782
|
+
return linesCarrying(relative2(root, file).split(sep4).join("/"), content, `SCN-${part2}-`);
|
|
28613
28783
|
});
|
|
28614
28784
|
}
|
|
28615
28785
|
function filesUnder(dir) {
|
|
@@ -28688,11 +28858,11 @@ function refuseUsage(line) {
|
|
|
28688
28858
|
process.stderr.write(line + "\n");
|
|
28689
28859
|
endRunOn(USAGE_REFUSAL);
|
|
28690
28860
|
}
|
|
28691
|
-
function answerRequest({ part, isNew }) {
|
|
28861
|
+
function answerRequest({ part: part2, isNew }) {
|
|
28692
28862
|
const cwd = readOrRefuse(7 /* WorkingDirectory */, "", () => process.cwd());
|
|
28693
28863
|
const top = repositoryTop(cwd);
|
|
28694
28864
|
const headerCodes = readHeaderCodes(join10(top ?? cwd, DEFAULT_FEATURES_DIR));
|
|
28695
|
-
const answer = nextScnCode({ part, headerCodes, isNew }, occurrencesFrom(cwd,
|
|
28865
|
+
const answer = nextScnCode({ part: part2, headerCodes, isNew }, occurrencesFrom(cwd, part2, top));
|
|
28696
28866
|
if (answer.kind === "unknown-part") {
|
|
28697
28867
|
refuseUsage(unknownPartRefusal(answer));
|
|
28698
28868
|
return;
|
|
@@ -28705,8 +28875,8 @@ function answerRequest({ part, isNew }) {
|
|
|
28705
28875
|
function writeLineIfAny(line) {
|
|
28706
28876
|
if (line !== null) process.stderr.write(line + "\n");
|
|
28707
28877
|
}
|
|
28708
|
-
function occurrencesFrom(cwd,
|
|
28709
|
-
return top !== null ? [...readTree(top,
|
|
28878
|
+
function occurrencesFrom(cwd, part2, top) {
|
|
28879
|
+
return top !== null ? [...readTree(top, part2), ...readHistory(cwd, part2)] : walkTree(cwd, part2);
|
|
28710
28880
|
}
|
|
28711
28881
|
var init_cli2 = __esm({
|
|
28712
28882
|
"src/cli-allocate/cli.ts"() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.81",
|
|
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.
|
|
28
|
+
"@3f-consulting/spec-controller-core": "0.1.81"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|