@runfile/cli 1.8.5 → 1.9.0

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/README.md CHANGED
@@ -552,7 +552,7 @@ run deploy [--env=<value>] --token=<value> [--force]
552
552
  Deploy to an environment.
553
553
 
554
554
  Arguments
555
- --env=<value> defaults to staging
555
+ --env=<value> defaults to staging; one of staging, production
556
556
  --token=<value> required
557
557
  --force off unless passed
558
558
 
@@ -561,9 +561,21 @@ Environment
561
561
  ```
562
562
 
563
563
  Nothing is declared for that — a `?` chain is what makes a value optional, and the literal it ends in is the
564
- default. `run --stdin-args deploy` asks for the same list, in the same order, **before anything runs**. A name
565
- the target sets for itself with `.env.NAME` — above the read, or in a `_shared.run` — is not on the list at all,
566
- since nothing the caller passes would reach it.
564
+ default. A `one_of` with its options written out, `one_of(ARG.env ? "staging", "staging", "production")`, is
565
+ what lists the values a name takes. `run --stdin-args deploy` asks for the same list, in the same order,
566
+ **before anything runs**, and shows the same options; the target's own `one_of` is still what refuses a wrong
567
+ answer. A name the target sets for itself with `.env.NAME` — above the read, or in a `_shared.run` — is not on
568
+ the list at all, since nothing the caller passes would reach it.
569
+
570
+ A target that reads `ARGS` is asked for its positionals too, when none were given: one line, split the way a
571
+ command line is, so `"two words"` stays one. Enter passes none, which is what a wrapper usually wants. A
572
+ `confirm()` the target reaches is asked the same way. The answers come from stdin whether or not it is a
573
+ terminal, so they can be piped in. In CI nothing is asked unless stdin is a terminal.
574
+
575
+ ```bash
576
+ $ run --stdin-args release
577
+ [runfile] ARGS (one of major, minor, patch): minor
578
+ ```
567
579
 
568
580
  That refusal has one exception, and it is the useful one: **a target that reads `ARGS`**. A wrapper can read
569
581
  any word, so it gets any word — a `--flag` it does not claim for itself joins the positionals where it was
@@ -726,7 +738,8 @@ forgives it. `confirm("…")` asks, and stops the whole run if the answer is no.
726
738
  target that ran this one.
727
739
 
728
740
  `confirm` is a function rather than a property, so the question can depend on what is about to happen — and is
729
- skipped by `-y`, in CI, and under `--dry-run`, where there is nothing to approve.
741
+ skipped by `-y`, in CI, and under `--dry-run`, where there is nothing to approve. It is asked on a terminal, or
742
+ under `--stdin-args` on whatever stdin is: that flag is what says somebody answers there.
730
743
 
731
744
  A line that is only a value — `exit`, `abc`, `35` — is a parse error, since it computes something and throws
732
745
  it away. Most often it is a call with the parentheses left off, and the message says so.
@@ -1048,7 +1061,7 @@ whose state is still worth keeping, so a `setup` run under it is still recorded.
1048
1061
  | Flag | |
1049
1062
  | --- | --- |
1050
1063
  | `-y`, `--yes` | Skip confirmation prompts |
1051
- | `--stdin-args` | Prompt for every input the target reads, before it runs |
1064
+ | `--stdin-args` | Prompt for every input the target reads, positionals included, before it runs, and answer its `confirm()` on stdin too |
1052
1065
  | `--dry-run` | Print what would run, without running it — a preview reads no files outside the project, probes none, and never unlocks the credential store |
1053
1066
  | `--dir <path>` | Start discovery somewhere else |
1054
1067
  | `-h`, `--help` | Show the help for `run` or any of its commands |
Binary file
Binary file
Binary file
package/bin/linux-x64/run CHANGED
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -13,5 +13,5 @@
13
13
  "license": "MIT",
14
14
  "name": "@runfile/cli",
15
15
  "repository": "https://github.com/JoaaoVerona/runfile",
16
- "version": "1.8.5"
16
+ "version": "1.9.0"
17
17
  }