@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.
@@ -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]="e84b2c37-90d0-559c-ace0-2b08fb69eec5")}catch(e){}}();
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 (groupId, opts) => {
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 '${groupId}': must match grp_<alphanumeric>`));
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=e84b2c37-90d0-559c-ace0-2b08fb69eec5
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.4");
33
+ .version("5.8.5");
34
34
  // Module management subcommand group
35
35
  const modulesCmd = program
36
36
  .command("modules")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.8.4",
3
+ "version": "5.8.5",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -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 (groupId: string, opts: { name: string; description?: string }) => {
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 '${groupId}': must match grp_<alphanumeric>`));
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
@@ -33,7 +33,7 @@ const program = new Command();
33
33
  program
34
34
  .name("hq")
35
35
  .description("HQ management CLI — modules, packages, and cloud sync")
36
- .version("5.8.4");
36
+ .version("5.8.5");
37
37
 
38
38
  // Module management subcommand group
39
39
  const modulesCmd = program