@indigoai-us/hq-cli 5.77.2 → 5.77.3

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.
@@ -381,7 +381,7 @@ export function registerFilesCommand(program) {
381
381
  });
382
382
  files
383
383
  .command("versions <path>")
384
- .description("List prior content versions and delete markers for one exact vault key. Use --personal for your personal vault.")
384
+ .description("List prior content versions and delete markers for one exact vault key. Restore a listed version with restore --version-id <id>. Use --personal for your personal vault.")
385
385
  .option("--personal", "Target your own personal vault instead of a company vault (mutually exclusive with --company)")
386
386
  .action(async (path, opts) => {
387
387
  try {
@@ -397,9 +397,9 @@ export function registerFilesCommand(program) {
397
397
  });
398
398
  files
399
399
  .command("restore <path>")
400
- .description("Restore a prior version or undelete an exact vault key. Prompts before overwriting unless --yes. Use --personal for your personal vault.")
400
+ .description("Restore a prior version with --version-id or undelete an exact vault key. Prompts before overwriting unless --yes. Use --personal for your personal vault.")
401
401
  .option("--personal", "Target your own personal vault instead of a company vault (mutually exclusive with --company)")
402
- .option("--version <id>", "Content version ID to restore")
402
+ .option("--version-id <id>", "Content version ID to restore")
403
403
  .option("-y, --yes", "Skip the overwrite confirmation prompt (for scripts)")
404
404
  .action(async (path, opts) => {
405
405
  try {
@@ -408,7 +408,7 @@ export function registerFilesCommand(program) {
408
408
  assertRecoveryScope(personal, companySlug);
409
409
  await runFilesRestore({
410
410
  key: path,
411
- versionId: opts.version,
411
+ versionId: opts.versionId,
412
412
  yes: opts.yes === true,
413
413
  personal,
414
414
  companySlug,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.77.2",
3
+ "version": "5.77.3",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -308,18 +308,20 @@ describe("hq files trash", () => {
308
308
  });
309
309
 
310
310
  describe("hq files recovery command help", () => {
311
- it("documents the finalized --version and --prefix option forms", () => {
311
+ it("documents the finalized --version-id and --prefix option forms", () => {
312
312
  const program = buildProgram();
313
313
  const files = program.commands.find((command) => command.name() === "files");
314
314
  const restore = files?.commands.find((command) => command.name() === "restore");
315
315
  const trash = files?.commands.find((command) => command.name() === "trash");
316
316
 
317
317
  expect(files?.helpInformation()).toContain("versions [options] <path>");
318
- expect(restore?.helpInformation()).toContain("--version <id>");
318
+ expect(files?.helpInformation()).toContain("restore --version-id <id>");
319
+ expect(restore?.helpInformation()).toContain("--version-id <id>");
320
+ expect(restore?.helpInformation()).not.toContain("--version <id>");
319
321
  expect(trash?.helpInformation()).toContain("--prefix <prefix>");
320
322
  });
321
323
 
322
- it("passes --version to the restore request", async () => {
324
+ it("passes --version-id to the restore request", async () => {
323
325
  fetchSpy.mockResolvedValueOnce(membershipResponse());
324
326
  fetchSpy.mockResolvedValueOnce(
325
327
  jsonResponse(200, {
@@ -331,7 +333,14 @@ describe("hq files recovery command help", () => {
331
333
  );
332
334
 
333
335
  await buildProgram().parseAsync(
334
- ["files", "restore", "notes/a.md", "--version", "old-version", "--yes"],
336
+ [
337
+ "files",
338
+ "restore",
339
+ "notes/a.md",
340
+ "--version-id",
341
+ "old-version",
342
+ "--yes",
343
+ ],
335
344
  { from: "user" },
336
345
  );
337
346
 
@@ -515,7 +515,7 @@ export function registerFilesCommand(program: Command): Command {
515
515
  files
516
516
  .command("versions <path>")
517
517
  .description(
518
- "List prior content versions and delete markers for one exact vault key. Use --personal for your personal vault.",
518
+ "List prior content versions and delete markers for one exact vault key. Restore a listed version with restore --version-id <id>. Use --personal for your personal vault.",
519
519
  )
520
520
  .option(
521
521
  "--personal",
@@ -539,18 +539,18 @@ export function registerFilesCommand(program: Command): Command {
539
539
  files
540
540
  .command("restore <path>")
541
541
  .description(
542
- "Restore a prior version or undelete an exact vault key. Prompts before overwriting unless --yes. Use --personal for your personal vault.",
542
+ "Restore a prior version with --version-id or undelete an exact vault key. Prompts before overwriting unless --yes. Use --personal for your personal vault.",
543
543
  )
544
544
  .option(
545
545
  "--personal",
546
546
  "Target your own personal vault instead of a company vault (mutually exclusive with --company)",
547
547
  )
548
- .option("--version <id>", "Content version ID to restore")
548
+ .option("--version-id <id>", "Content version ID to restore")
549
549
  .option("-y, --yes", "Skip the overwrite confirmation prompt (for scripts)")
550
550
  .action(
551
551
  async (
552
552
  path: string,
553
- opts: { personal?: boolean; yes?: boolean; version?: string },
553
+ opts: { personal?: boolean; yes?: boolean; versionId?: string },
554
554
  ) => {
555
555
  try {
556
556
  const companySlug = files.opts().company as string | undefined;
@@ -558,7 +558,7 @@ export function registerFilesCommand(program: Command): Command {
558
558
  assertRecoveryScope(personal, companySlug);
559
559
  await runFilesRestore({
560
560
  key: path,
561
- versionId: opts.version,
561
+ versionId: opts.versionId,
562
562
  yes: opts.yes === true,
563
563
  personal,
564
564
  companySlug,