@runfile/cli 0.30.0 → 0.31.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/bin/darwin-arm64/README.md +12 -1
- package/bin/darwin-arm64/run +0 -0
- package/bin/darwin-x64/README.md +12 -1
- package/bin/darwin-x64/run +0 -0
- package/bin/linux-arm64/README.md +12 -1
- package/bin/linux-arm64/run +0 -0
- package/bin/linux-x64/README.md +12 -1
- package/bin/linux-x64/run +0 -0
- package/bin/win32-arm64/run.exe +0 -0
- package/bin/win32-x64/run.exe +0 -0
- package/package.json +1 -1
|
@@ -277,7 +277,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
277
277
|
// encoding : base64_encode, base64_decode, url_encode, url_decode
|
|
278
278
|
// hashing : sha256, md5
|
|
279
279
|
// ids/time : uuid, now
|
|
280
|
-
// files : read_file, write_file, file_exists
|
|
280
|
+
// files : read_file, write_file, file_exists, temp_file, temp_dir
|
|
281
281
|
// json : json_get, json_set
|
|
282
282
|
// control : try, error
|
|
283
283
|
// shell : shell_quote, capture
|
|
@@ -382,6 +382,17 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
382
382
|
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
383
383
|
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
384
384
|
|
|
385
|
+
// Create a temp file / dir in the OS temp directory, auto-deleted when the
|
|
386
|
+
// CLI exits. `temp_file([content], [extension])` writes `content` (if given)
|
|
387
|
+
// and appends `.<extension>` (leading dot optional); `temp_dir()` makes an
|
|
388
|
+
// empty directory (removed recursively). `--dry-run` → `<temp_file>` /
|
|
389
|
+
// `<temp_dir>` placeholders, nothing created. Capture the path once with
|
|
390
|
+
// `define` and reuse it:
|
|
391
|
+
"{{ define(cfg, temp_file('{\"env\":\"prod\"}', 'json')) }}",
|
|
392
|
+
"tool --config {{ VAR.cfg }}",
|
|
393
|
+
"{{ define(work, temp_dir()) }}",
|
|
394
|
+
"git clone --depth 1 $REPO {{ VAR.work }} && build {{ VAR.work }}",
|
|
395
|
+
|
|
385
396
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
386
397
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
387
398
|
|
package/bin/darwin-arm64/run
CHANGED
|
Binary file
|
package/bin/darwin-x64/README.md
CHANGED
|
@@ -277,7 +277,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
277
277
|
// encoding : base64_encode, base64_decode, url_encode, url_decode
|
|
278
278
|
// hashing : sha256, md5
|
|
279
279
|
// ids/time : uuid, now
|
|
280
|
-
// files : read_file, write_file, file_exists
|
|
280
|
+
// files : read_file, write_file, file_exists, temp_file, temp_dir
|
|
281
281
|
// json : json_get, json_set
|
|
282
282
|
// control : try, error
|
|
283
283
|
// shell : shell_quote, capture
|
|
@@ -382,6 +382,17 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
382
382
|
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
383
383
|
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
384
384
|
|
|
385
|
+
// Create a temp file / dir in the OS temp directory, auto-deleted when the
|
|
386
|
+
// CLI exits. `temp_file([content], [extension])` writes `content` (if given)
|
|
387
|
+
// and appends `.<extension>` (leading dot optional); `temp_dir()` makes an
|
|
388
|
+
// empty directory (removed recursively). `--dry-run` → `<temp_file>` /
|
|
389
|
+
// `<temp_dir>` placeholders, nothing created. Capture the path once with
|
|
390
|
+
// `define` and reuse it:
|
|
391
|
+
"{{ define(cfg, temp_file('{\"env\":\"prod\"}', 'json')) }}",
|
|
392
|
+
"tool --config {{ VAR.cfg }}",
|
|
393
|
+
"{{ define(work, temp_dir()) }}",
|
|
394
|
+
"git clone --depth 1 $REPO {{ VAR.work }} && build {{ VAR.work }}",
|
|
395
|
+
|
|
385
396
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
386
397
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
387
398
|
|
package/bin/darwin-x64/run
CHANGED
|
Binary file
|
|
@@ -277,7 +277,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
277
277
|
// encoding : base64_encode, base64_decode, url_encode, url_decode
|
|
278
278
|
// hashing : sha256, md5
|
|
279
279
|
// ids/time : uuid, now
|
|
280
|
-
// files : read_file, write_file, file_exists
|
|
280
|
+
// files : read_file, write_file, file_exists, temp_file, temp_dir
|
|
281
281
|
// json : json_get, json_set
|
|
282
282
|
// control : try, error
|
|
283
283
|
// shell : shell_quote, capture
|
|
@@ -382,6 +382,17 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
382
382
|
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
383
383
|
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
384
384
|
|
|
385
|
+
// Create a temp file / dir in the OS temp directory, auto-deleted when the
|
|
386
|
+
// CLI exits. `temp_file([content], [extension])` writes `content` (if given)
|
|
387
|
+
// and appends `.<extension>` (leading dot optional); `temp_dir()` makes an
|
|
388
|
+
// empty directory (removed recursively). `--dry-run` → `<temp_file>` /
|
|
389
|
+
// `<temp_dir>` placeholders, nothing created. Capture the path once with
|
|
390
|
+
// `define` and reuse it:
|
|
391
|
+
"{{ define(cfg, temp_file('{\"env\":\"prod\"}', 'json')) }}",
|
|
392
|
+
"tool --config {{ VAR.cfg }}",
|
|
393
|
+
"{{ define(work, temp_dir()) }}",
|
|
394
|
+
"git clone --depth 1 $REPO {{ VAR.work }} && build {{ VAR.work }}",
|
|
395
|
+
|
|
385
396
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
386
397
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
387
398
|
|
package/bin/linux-arm64/run
CHANGED
|
Binary file
|
package/bin/linux-x64/README.md
CHANGED
|
@@ -277,7 +277,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
277
277
|
// encoding : base64_encode, base64_decode, url_encode, url_decode
|
|
278
278
|
// hashing : sha256, md5
|
|
279
279
|
// ids/time : uuid, now
|
|
280
|
-
// files : read_file, write_file, file_exists
|
|
280
|
+
// files : read_file, write_file, file_exists, temp_file, temp_dir
|
|
281
281
|
// json : json_get, json_set
|
|
282
282
|
// control : try, error
|
|
283
283
|
// shell : shell_quote, capture
|
|
@@ -382,6 +382,17 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
382
382
|
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
383
383
|
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
384
384
|
|
|
385
|
+
// Create a temp file / dir in the OS temp directory, auto-deleted when the
|
|
386
|
+
// CLI exits. `temp_file([content], [extension])` writes `content` (if given)
|
|
387
|
+
// and appends `.<extension>` (leading dot optional); `temp_dir()` makes an
|
|
388
|
+
// empty directory (removed recursively). `--dry-run` → `<temp_file>` /
|
|
389
|
+
// `<temp_dir>` placeholders, nothing created. Capture the path once with
|
|
390
|
+
// `define` and reuse it:
|
|
391
|
+
"{{ define(cfg, temp_file('{\"env\":\"prod\"}', 'json')) }}",
|
|
392
|
+
"tool --config {{ VAR.cfg }}",
|
|
393
|
+
"{{ define(work, temp_dir()) }}",
|
|
394
|
+
"git clone --depth 1 $REPO {{ VAR.work }} && build {{ VAR.work }}",
|
|
395
|
+
|
|
385
396
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
386
397
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
387
398
|
|
package/bin/linux-x64/run
CHANGED
|
Binary file
|
package/bin/win32-arm64/run.exe
CHANGED
|
Binary file
|
package/bin/win32-x64/run.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED