@indigoai-us/hq-cli 5.8.4 → 5.8.5
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/commands/groups.js +8 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/commands/groups.ts +6 -2
- package/src/index.ts +1 -1
package/dist/commands/groups.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="37e6bf57-eabb-58da-874c-57cc39e78d89")}catch(e){}}();
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { ensureCognitoToken } from "../utils/cognito-session.js";
|
|
5
5
|
import { vaultApiFetch, getCompanyUid } from "./secrets.js";
|
|
@@ -30,10 +30,14 @@ export function registerGroupsCommand(program) {
|
|
|
30
30
|
.description("Create a new group")
|
|
31
31
|
.requiredOption("--name <name>", "Human-readable group name")
|
|
32
32
|
.option("--description <desc>", "Optional description")
|
|
33
|
-
.action(async (
|
|
33
|
+
.action(async (rawGroupId, opts) => {
|
|
34
34
|
try {
|
|
35
|
+
// Auto-prepend `grp_` when the caller passes a bare id (`core` →
|
|
36
|
+
// `grp_core`); the server does the same as a defense-in-depth
|
|
37
|
+
// backstop. The post-prepend form must still match GROUP_ID_PATTERN.
|
|
38
|
+
const groupId = rawGroupId.startsWith("grp_") ? rawGroupId : `grp_${rawGroupId}`;
|
|
35
39
|
if (!GROUP_ID_PATTERN.test(groupId)) {
|
|
36
|
-
console.error(chalk.red(`Invalid group id '${
|
|
40
|
+
console.error(chalk.red(`Invalid group id '${rawGroupId}': resulting id '${groupId}' must match grp_<alphanumeric, underscore, hyphen>`));
|
|
37
41
|
process.exit(1);
|
|
38
42
|
}
|
|
39
43
|
const token = await ensureCognitoToken();
|
|
@@ -341,4 +345,4 @@ export function registerGroupsCommand(program) {
|
|
|
341
345
|
});
|
|
342
346
|
}
|
|
343
347
|
//# sourceMappingURL=groups.js.map
|
|
344
|
-
//# debugId=
|
|
348
|
+
//# debugId=37e6bf57-eabb-58da-874c-57cc39e78d89
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ const program = new Command();
|
|
|
30
30
|
program
|
|
31
31
|
.name("hq")
|
|
32
32
|
.description("HQ management CLI — modules, packages, and cloud sync")
|
|
33
|
-
.version("5.8.
|
|
33
|
+
.version("5.8.5");
|
|
34
34
|
// Module management subcommand group
|
|
35
35
|
const modulesCmd = program
|
|
36
36
|
.command("modules")
|
package/package.json
CHANGED
package/src/commands/groups.ts
CHANGED
|
@@ -36,10 +36,14 @@ export function registerGroupsCommand(program: Command): void {
|
|
|
36
36
|
.description("Create a new group")
|
|
37
37
|
.requiredOption("--name <name>", "Human-readable group name")
|
|
38
38
|
.option("--description <desc>", "Optional description")
|
|
39
|
-
.action(async (
|
|
39
|
+
.action(async (rawGroupId: string, opts: { name: string; description?: string }) => {
|
|
40
40
|
try {
|
|
41
|
+
// Auto-prepend `grp_` when the caller passes a bare id (`core` →
|
|
42
|
+
// `grp_core`); the server does the same as a defense-in-depth
|
|
43
|
+
// backstop. The post-prepend form must still match GROUP_ID_PATTERN.
|
|
44
|
+
const groupId = rawGroupId.startsWith("grp_") ? rawGroupId : `grp_${rawGroupId}`;
|
|
41
45
|
if (!GROUP_ID_PATTERN.test(groupId)) {
|
|
42
|
-
console.error(chalk.red(`Invalid group id '${
|
|
46
|
+
console.error(chalk.red(`Invalid group id '${rawGroupId}': resulting id '${groupId}' must match grp_<alphanumeric, underscore, hyphen>`));
|
|
43
47
|
process.exit(1);
|
|
44
48
|
}
|
|
45
49
|
|
package/src/index.ts
CHANGED