@boltic/cli 1.0.28 → 1.0.29
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/cli.js +9 -1
- package/commands/mcp.js +0 -2
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -56,6 +56,7 @@ const createCLI = (consoleUrl, apiUrl, serviceName, env) => {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
const command = args[2];
|
|
59
|
+
const subCommand = args.length >= 3 ? args[3] : undefined;
|
|
59
60
|
|
|
60
61
|
if (!command) {
|
|
61
62
|
showHelp(commands);
|
|
@@ -81,12 +82,19 @@ const createCLI = (consoleUrl, apiUrl, serviceName, env) => {
|
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
if (!subCommand) {
|
|
86
|
+
// Show help for the command if no subcommand is provided
|
|
87
|
+
const commandObj = commands[command];
|
|
88
|
+
await commandObj.action(args.slice(3));
|
|
89
|
+
}
|
|
90
|
+
|
|
84
91
|
// Check if user is authenticated for all commands except login, logout, help, and version
|
|
85
92
|
if (
|
|
86
93
|
command !== "login" &&
|
|
87
94
|
command !== "logout" &&
|
|
88
95
|
command !== "help" &&
|
|
89
|
-
command !== "version"
|
|
96
|
+
command !== "version" &&
|
|
97
|
+
(command !== "mcp" || subCommand !== "setup")
|
|
90
98
|
) {
|
|
91
99
|
const secrets = await getAllSecrets();
|
|
92
100
|
const userData = secrets?.reduce(
|
package/commands/mcp.js
CHANGED
package/package.json
CHANGED