@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.
- package/dist/index.js +9 -4
- 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
|
-
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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