poe-code 3.0.391 → 3.0.392
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/index.js +42 -2
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/terminal-pilot/dist/cli.js +41 -1
- package/packages/terminal-pilot/dist/cli.js.map +2 -2
- package/packages/terminal-pilot/dist/testing/cli-repl.js +41 -1
- package/packages/terminal-pilot/dist/testing/cli-repl.js.map +2 -2
- package/packages/terminal-pilot/dist/testing/qa-cli.js +41 -1
- package/packages/terminal-pilot/dist/testing/qa-cli.js.map +2 -2
- package/packages/toolcraft/dist/cli.js +43 -1
package/dist/index.js
CHANGED
|
@@ -92946,13 +92946,23 @@ function findUnknownCommanderCommand(program, argv) {
|
|
|
92946
92946
|
commandPath: pathSegments2.join(" ")
|
|
92947
92947
|
};
|
|
92948
92948
|
}
|
|
92949
|
-
if (current.commands.length === 0
|
|
92949
|
+
if (current.commands.length === 0) {
|
|
92950
92950
|
return void 0;
|
|
92951
92951
|
}
|
|
92952
92952
|
const child = current.commands.find(
|
|
92953
92953
|
(command) => command.name() === token || command.aliases().includes(token)
|
|
92954
92954
|
);
|
|
92955
92955
|
if (child === void 0) {
|
|
92956
|
+
if (getDefaultCommanderCommandName(current) !== void 0) {
|
|
92957
|
+
if (shouldRejectDefaultCommandToken(current, token, pathSegments2)) {
|
|
92958
|
+
return {
|
|
92959
|
+
input: token,
|
|
92960
|
+
currentCommand: current,
|
|
92961
|
+
commandPath: pathSegments2.join(" ")
|
|
92962
|
+
};
|
|
92963
|
+
}
|
|
92964
|
+
return void 0;
|
|
92965
|
+
}
|
|
92956
92966
|
return {
|
|
92957
92967
|
input: token,
|
|
92958
92968
|
currentCommand: current,
|
|
@@ -92964,6 +92974,36 @@ function findUnknownCommanderCommand(program, argv) {
|
|
|
92964
92974
|
}
|
|
92965
92975
|
return void 0;
|
|
92966
92976
|
}
|
|
92977
|
+
function shouldRejectDefaultCommandToken(command, token, pathSegments2) {
|
|
92978
|
+
return pathSegments2.length === 0 && isBareCommandLikeToken(token) && hasNonDefaultPublicChildCommand(command);
|
|
92979
|
+
}
|
|
92980
|
+
function hasNonDefaultPublicChildCommand(command) {
|
|
92981
|
+
const defaultName = getDefaultCommanderCommandName(command);
|
|
92982
|
+
return command.commands.some(
|
|
92983
|
+
(child) => child.name() !== defaultName && !isToolcraftHiddenCommander(child) && !getToolcraftReservedChildNames(command).includes(child.name())
|
|
92984
|
+
);
|
|
92985
|
+
}
|
|
92986
|
+
function isBareCommandLikeToken(token) {
|
|
92987
|
+
if (token.length === 0) {
|
|
92988
|
+
return false;
|
|
92989
|
+
}
|
|
92990
|
+
for (const character of token) {
|
|
92991
|
+
if (!isCommandNameCharacter(character)) {
|
|
92992
|
+
return false;
|
|
92993
|
+
}
|
|
92994
|
+
}
|
|
92995
|
+
return true;
|
|
92996
|
+
}
|
|
92997
|
+
function isCommandNameCharacter(character) {
|
|
92998
|
+
const code = character.codePointAt(0);
|
|
92999
|
+
if (code === void 0) {
|
|
93000
|
+
return false;
|
|
93001
|
+
}
|
|
93002
|
+
const isLowercaseLetter2 = code >= 97 && code <= 122;
|
|
93003
|
+
const isUppercaseLetter = code >= 65 && code <= 90;
|
|
93004
|
+
const isDigit5 = code >= 48 && code <= 57;
|
|
93005
|
+
return isLowercaseLetter2 || isUppercaseLetter || isDigit5 || character === "-" || character === "_";
|
|
93006
|
+
}
|
|
92967
93007
|
function getDefaultCommanderCommandName(command) {
|
|
92968
93008
|
const candidate = command;
|
|
92969
93009
|
return typeof candidate._defaultCommandName === "string" ? candidate._defaultCommandName : void 0;
|
|
@@ -138699,7 +138739,7 @@ var init_package2 = __esm({
|
|
|
138699
138739
|
"package.json"() {
|
|
138700
138740
|
package_default2 = {
|
|
138701
138741
|
name: "poe-code",
|
|
138702
|
-
version: "3.0.
|
|
138742
|
+
version: "3.0.392",
|
|
138703
138743
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
138704
138744
|
type: "module",
|
|
138705
138745
|
main: "./dist/index.js",
|