@sjawhar/pi-envoy 10.8.0 → 10.9.1
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/dispatch.js +7 -0
- package/package.json +1 -1
package/dist/dispatch.js
CHANGED
|
@@ -14770,6 +14770,12 @@ function parseCommand(argv, io) {
|
|
|
14770
14770
|
for (let index = 0;index < rest.length; index++) {
|
|
14771
14771
|
const token = rest[index];
|
|
14772
14772
|
if (!token.startsWith("--")) {
|
|
14773
|
+
if (ISSUE_KEY.test(token) && surface.flags.has("--issue") && !setBy.has("issue")) {
|
|
14774
|
+
const corrected = [command, ...rest.slice(0, index), "--issue", token];
|
|
14775
|
+
corrected.push(...rest.slice(index + 1));
|
|
14776
|
+
problems.push(`unexpected argument ${token}: use --issue <KEY>, as in: dispatch ${corrected.map(quoteWord).join(" ")}`);
|
|
14777
|
+
continue;
|
|
14778
|
+
}
|
|
14773
14779
|
problems.push(`unexpected argument ${quoteWord(token)}: every value follows its flag`);
|
|
14774
14780
|
continue;
|
|
14775
14781
|
}
|
|
@@ -14873,6 +14879,7 @@ function appendedItem(kind, flag, value, number4) {
|
|
|
14873
14879
|
const parsed = number4(flag, value);
|
|
14874
14880
|
return parsed === undefined ? undefined : { value: parsed };
|
|
14875
14881
|
}
|
|
14882
|
+
var ISSUE_KEY = /^[A-Z][A-Z0-9]*-\d+$/;
|
|
14876
14883
|
function quoteWord(value) {
|
|
14877
14884
|
return BARE_WORD.test(value) ? value : `'${value.replaceAll("'", "'\\''")}'`;
|
|
14878
14885
|
}
|