@runfile/cli 1.1.0 → 1.1.1

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
@@ -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
- Arguments are `--key=value`. Writing `--key value` gives you a flag and a positional, because nothing declares
436
- which names take values — and if you meant an argument, the error says so.
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
- Everything after a bare `--` is passed through untouched, flags included. That is how a wrapper forwards a
460
- command line it does not understand:
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 -- s3api list-buckets --output json
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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/linux-x64/run CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -14,5 +14,5 @@
14
14
  "license": "MIT",
15
15
  "name": "@runfile/cli",
16
16
  "repository": "https://github.com/JoaaoVerona/runfile",
17
- "version": "1.1.0"
17
+ "version": "1.1.1"
18
18
  }