@helix3/helix-cli 0.1.13-helix3.92 → 0.1.13-helix3.93

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 CHANGED
@@ -694,6 +694,39 @@ item
694
694
  : `✖ ${err instanceof Error ? err.message : String(err)}`);
695
695
  }
696
696
  });
697
+ // `delete` is a dead end once anyone owns an instance — and a publish always
698
+ // self-grants the creator one — so the server refuses it with "Delist or
699
+ // suspend it instead." (CH-1669). This is the "instead": a creator-owned,
700
+ // non-destructive unlist. Existing owners keep their copies; the item stops
701
+ // appearing on browse/marketplace and can no longer be newly acquired. It is
702
+ // NOT a delete and NOT reversible from the CLI today — there is no `relist`.
703
+ // Distinct from `item distribution disable` below: a distribution is ONE
704
+ // acquisition route (you can have several); delist takes the whole item
705
+ // definition off browse/marketplace regardless of how many routes it has.
706
+ item
707
+ .command('delist')
708
+ .description('Unlist a published item you own — existing owners keep what they own, nobody new can acquire it. Not a delete (see `helix item publish` for why delete refuses an owned item), and not currently reversible.')
709
+ .argument('<item-id>', 'the universal item id (printed by `helix item publish`, or from the item URL/API)')
710
+ .option('--reason <text>', 'optional note for your own record; not shown to anyone else')
711
+ .option('--json', 'machine-readable output')
712
+ .action(async (itemId, opts) => {
713
+ const creds = requireAuth();
714
+ try {
715
+ const result = await (0, lib_1.delistItem)(itemId, creds, { reason: opts.reason });
716
+ if (opts.json) {
717
+ console.log(JSON.stringify(result, null, 2));
718
+ return;
719
+ }
720
+ console.log(`✔ Delisted "${result.title}" (${result.slug})`);
721
+ console.log(` status: ${result.status}`);
722
+ console.log(' existing owners keep their copies; nobody new can acquire it.');
723
+ }
724
+ catch (err) {
725
+ fail(err instanceof lib_1.ApiError
726
+ ? err.render()
727
+ : `✖ ${err instanceof Error ? err.message : String(err)}`);
728
+ }
729
+ });
697
730
  const itemDistribution = item
698
731
  .command('distribution')
699
732
  .description('Create and manage primary Claim/Buy routes for one published item definition');