@runfile/cli 1.1.0 → 1.1.2
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 +21 -7
- package/bin/darwin-arm64/run +0 -0
- package/bin/darwin-arm64/runfile-lsp +0 -0
- package/bin/darwin-x64/run +0 -0
- package/bin/darwin-x64/runfile-lsp +0 -0
- package/bin/linux-arm64/run +0 -0
- package/bin/linux-arm64/runfile-lsp +0 -0
- package/bin/linux-x64/run +0 -0
- package/bin/linux-x64/runfile-lsp +0 -0
- package/bin/win32-arm64/run.exe +0 -0
- package/bin/win32-arm64/runfile-lsp.exe +0 -0
- package/bin/win32-x64/run.exe +0 -0
- package/bin/win32-x64/runfile-lsp.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -420,7 +420,7 @@ language.
|
|
|
420
420
|
|
|
421
421
|
| Source | From |
|
|
422
422
|
| --- | --- |
|
|
423
|
-
| `ARG.name` | `--name=value` |
|
|
423
|
+
| `ARG.name` | `--name=value`, or `--name value` |
|
|
424
424
|
| `FLAG.name` | `--name` (a boolean) |
|
|
425
425
|
| `ARGS` | positional arguments, as a list |
|
|
426
426
|
| `ENV.NAME` | the environment |
|
|
@@ -432,8 +432,12 @@ language.
|
|
|
432
432
|
let port = ARG.port ? ENV.PORT ? "3000"
|
|
433
433
|
```
|
|
434
434
|
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
An argument takes its value two ways, `--key=value` and `--key value`, and nothing is declared to make the
|
|
436
|
+
second one work: `run` walks the target's parsed tree, so it already knows `ARG.target` takes a value and
|
|
437
|
+
`FLAG.force` does not. `--target aarch64` is the triple; `--force x` is a flag and a positional. Where a name
|
|
438
|
+
is read both ways the bare `--name` is the flag, and `--name=value` is the argument. A value starting with a
|
|
439
|
+
dash needs the `=` form — `--target --release` is refused rather than quietly setting the triple to
|
|
440
|
+
`--release`.
|
|
437
441
|
|
|
438
442
|
**A flag a target cannot read is an error**, not a typo you find out about later. `run` knows exactly what a
|
|
439
443
|
target reads by walking its parsed tree, so `--forse` stops the run and points at `--help`:
|
|
@@ -456,8 +460,9 @@ Environment
|
|
|
456
460
|
Nothing is declared for that — a `?` chain is what makes a value optional, and the literal it ends in is the
|
|
457
461
|
default. `run --stdin-args deploy` asks for the same list, in the same order, **before anything runs**.
|
|
458
462
|
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
That refusal has one exception, and it is the useful one: **a target that reads `ARGS`**. A wrapper can read
|
|
464
|
+
any word, so it gets any word — a `--flag` it does not claim for itself joins the positionals where it was
|
|
465
|
+
written, and forwarding a whole command line needs nothing special.
|
|
461
466
|
|
|
462
467
|
```sh
|
|
463
468
|
# runfiles/aws.run
|
|
@@ -467,7 +472,15 @@ $ docker run --rm amazon/aws-cli {{ ARGS }}
|
|
|
467
472
|
```
|
|
468
473
|
|
|
469
474
|
```bash
|
|
470
|
-
run aws
|
|
475
|
+
run aws s3api list-buckets --output json
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Everything after a bare `--` is passed through untouched, whatever the target reads. That is how a wrapper
|
|
479
|
+
forwards a word the target would otherwise claim — its own `--output`, or a `--help` meant for the command
|
|
480
|
+
inside:
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
run aws -- s3api list-buckets --help
|
|
471
484
|
```
|
|
472
485
|
|
|
473
486
|
### Interpolation quotes itself
|
|
@@ -673,7 +686,8 @@ invoke `run` from.
|
|
|
673
686
|
|
|
674
687
|
`$HOME/.runfiles/` holds machine-wide targets, available in every project. If you would rather see the
|
|
675
688
|
directory than hide it, `$HOME/runfiles/` and `$HOME/Runfiles/` are read too — but only one of the three may
|
|
676
|
-
hold anything.
|
|
689
|
+
hold anything. `run :list` puts them first, under `global:`: they are the part of the listing you cannot see
|
|
690
|
+
by looking at the project.
|
|
677
691
|
|
|
678
692
|
**Not in CI.** A runner's home directory is nobody's, so `run` reads none of the three there: what runs is
|
|
679
693
|
what is checked in and reviewable. This is also why nothing has to be cleaned up after a job.
|
package/bin/darwin-arm64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/darwin-x64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/linux-arm64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/linux-x64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/win32-arm64/run.exe
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/win32-x64/run.exe
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED