@ductape/cli 0.3.2 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -564,15 +564,20 @@ productEnvironments
564
564
  productEnvironments
565
565
  .command('create <product_tag>')
566
566
  .description('Idempotently create a product environment and verify persistence')
567
- .requiredOption('-f, --file <path>', 'Environment JSON: env_name, description, slug, active?')
567
+ // NOTE: cannot use -f/--file here it collides with the parent `products` command's own
568
+ // -f/--file option (used by `products create`/`products update`). Commander resolves a flag
569
+ // shared by an ancestor and a descendant command against the ancestor, so the value never
570
+ // reaches this subcommand's own opts, and requiredOption fails even when -f is supplied.
571
+ .requiredOption('--env-file <path>', 'Environment JSON: env_name, description, slug, active?')
568
572
  .option('--json', 'JSON output')
569
- .action(wrap((productTag, opts) => runProductEnvironments('create', { product: productTag, file: opts.file, json: opts.json }, [])));
573
+ .action(wrap((productTag, opts) => runProductEnvironments('create', { product: productTag, file: opts.envFile, json: opts.json }, [])));
570
574
  productEnvironments
571
575
  .command('update <product_tag> <slug>')
572
576
  .description('Update a product environment and verify persistence')
573
- .requiredOption('-f, --file <path>', 'Environment patch JSON')
577
+ // See NOTE above on `create` — same -f/--file collision with the parent `products` command.
578
+ .requiredOption('--env-file <path>', 'Environment patch JSON')
574
579
  .option('--json', 'JSON output')
575
- .action(wrap((productTag, slug, opts) => runProductEnvironments('update', { product: productTag, slug, file: opts.file, json: opts.json }, [])));
580
+ .action(wrap((productTag, slug, opts) => runProductEnvironments('update', { product: productTag, slug, file: opts.envFile, json: opts.json }, [])));
576
581
  productEnvironments
577
582
  .command('get <product_tag> [slug]')
578
583
  .description('Fetch a single product environment by slug')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Ductape CLI — local platform, login, link projects, and manage resources via the proxy (Workbench-compatible)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",