@runfile/cli 0.17.0 → 0.18.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 +10 -1
- package/bin/darwin-arm64/run +0 -0
- package/bin/darwin-x64/README.md +10 -1
- package/bin/darwin-x64/run +0 -0
- package/bin/linux-arm64/README.md +10 -1
- package/bin/linux-arm64/run +0 -0
- package/bin/linux-x64/README.md +10 -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
|
@@ -255,7 +255,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
255
255
|
// validate : one_of
|
|
256
256
|
// encoding : base64_encode, base64_decode
|
|
257
257
|
// hashing : sha256, md5
|
|
258
|
-
// files : read_file, file_exists
|
|
258
|
+
// files : read_file, write_file, file_exists
|
|
259
259
|
// json : json_get, json_set
|
|
260
260
|
// error : try
|
|
261
261
|
// shell : shell_quote, capture
|
|
@@ -320,6 +320,15 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
320
320
|
// Use `try(...)` to recover from missing files.
|
|
321
321
|
"echo version={{ try(read_file('VERSION')) ? '0.0.0-dev' }}",
|
|
322
322
|
|
|
323
|
+
// Write a file straight from a substitution — pairs with `read_file` for
|
|
324
|
+
// read-modify-write pipelines (version bumps, config edits, …). Returns
|
|
325
|
+
// an empty string, so a line containing only this call is dropped silently
|
|
326
|
+
// (same convention as `define`). Goes through Rust's `std::fs::write`, so
|
|
327
|
+
// it sidesteps the shell entirely — safe for large content, content with
|
|
328
|
+
// quotes, embedded newlines, anything that would break a
|
|
329
|
+
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
330
|
+
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
331
|
+
|
|
323
332
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
324
333
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
325
334
|
|
package/bin/darwin-arm64/run
CHANGED
|
Binary file
|
package/bin/darwin-x64/README.md
CHANGED
|
@@ -255,7 +255,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
255
255
|
// validate : one_of
|
|
256
256
|
// encoding : base64_encode, base64_decode
|
|
257
257
|
// hashing : sha256, md5
|
|
258
|
-
// files : read_file, file_exists
|
|
258
|
+
// files : read_file, write_file, file_exists
|
|
259
259
|
// json : json_get, json_set
|
|
260
260
|
// error : try
|
|
261
261
|
// shell : shell_quote, capture
|
|
@@ -320,6 +320,15 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
320
320
|
// Use `try(...)` to recover from missing files.
|
|
321
321
|
"echo version={{ try(read_file('VERSION')) ? '0.0.0-dev' }}",
|
|
322
322
|
|
|
323
|
+
// Write a file straight from a substitution — pairs with `read_file` for
|
|
324
|
+
// read-modify-write pipelines (version bumps, config edits, …). Returns
|
|
325
|
+
// an empty string, so a line containing only this call is dropped silently
|
|
326
|
+
// (same convention as `define`). Goes through Rust's `std::fs::write`, so
|
|
327
|
+
// it sidesteps the shell entirely — safe for large content, content with
|
|
328
|
+
// quotes, embedded newlines, anything that would break a
|
|
329
|
+
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
330
|
+
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
331
|
+
|
|
323
332
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
324
333
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
325
334
|
|
package/bin/darwin-x64/run
CHANGED
|
Binary file
|
|
@@ -255,7 +255,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
255
255
|
// validate : one_of
|
|
256
256
|
// encoding : base64_encode, base64_decode
|
|
257
257
|
// hashing : sha256, md5
|
|
258
|
-
// files : read_file, file_exists
|
|
258
|
+
// files : read_file, write_file, file_exists
|
|
259
259
|
// json : json_get, json_set
|
|
260
260
|
// error : try
|
|
261
261
|
// shell : shell_quote, capture
|
|
@@ -320,6 +320,15 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
320
320
|
// Use `try(...)` to recover from missing files.
|
|
321
321
|
"echo version={{ try(read_file('VERSION')) ? '0.0.0-dev' }}",
|
|
322
322
|
|
|
323
|
+
// Write a file straight from a substitution — pairs with `read_file` for
|
|
324
|
+
// read-modify-write pipelines (version bumps, config edits, …). Returns
|
|
325
|
+
// an empty string, so a line containing only this call is dropped silently
|
|
326
|
+
// (same convention as `define`). Goes through Rust's `std::fs::write`, so
|
|
327
|
+
// it sidesteps the shell entirely — safe for large content, content with
|
|
328
|
+
// quotes, embedded newlines, anything that would break a
|
|
329
|
+
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
330
|
+
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
331
|
+
|
|
323
332
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
324
333
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
325
334
|
|
package/bin/linux-arm64/run
CHANGED
|
Binary file
|
package/bin/linux-x64/README.md
CHANGED
|
@@ -255,7 +255,7 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
255
255
|
// validate : one_of
|
|
256
256
|
// encoding : base64_encode, base64_decode
|
|
257
257
|
// hashing : sha256, md5
|
|
258
|
-
// files : read_file, file_exists
|
|
258
|
+
// files : read_file, write_file, file_exists
|
|
259
259
|
// json : json_get, json_set
|
|
260
260
|
// error : try
|
|
261
261
|
// shell : shell_quote, capture
|
|
@@ -320,6 +320,15 @@ and work as full substitution bodies *or* as chain segments:
|
|
|
320
320
|
// Use `try(...)` to recover from missing files.
|
|
321
321
|
"echo version={{ try(read_file('VERSION')) ? '0.0.0-dev' }}",
|
|
322
322
|
|
|
323
|
+
// Write a file straight from a substitution — pairs with `read_file` for
|
|
324
|
+
// read-modify-write pipelines (version bumps, config edits, …). Returns
|
|
325
|
+
// an empty string, so a line containing only this call is dropped silently
|
|
326
|
+
// (same convention as `define`). Goes through Rust's `std::fs::write`, so
|
|
327
|
+
// it sidesteps the shell entirely — safe for large content, content with
|
|
328
|
+
// quotes, embedded newlines, anything that would break a
|
|
329
|
+
// `printf > file`-style redirect on Windows. `--dry-run` skips the write.
|
|
330
|
+
"{{ write_file('build.gradle.kts', regex_replace(read_file('build.gradle.kts'), 'versionCode = [0-9]+', 'versionCode = 43')) }}",
|
|
331
|
+
|
|
323
332
|
// Pull values out of arbitrary JSON without `jq` (works on every shell):
|
|
324
333
|
"echo db_host={{ json_get(read_file('config.json'), 'database.host') }}",
|
|
325
334
|
|
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