@udondan/avanti 0.21.2 → 0.23.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 +314 -10
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +45 -12
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/lock.d.ts.map +1 -1
- package/dist/commands/lock.js +11 -4
- package/dist/commands/lock.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +71 -16
- package/dist/commands/pull.js.map +1 -1
- package/dist/condition.js +2 -2
- package/dist/condition.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +83 -9
- package/dist/config.js.map +1 -1
- package/dist/dependencies.d.ts +3 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +161 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/diff.d.ts +0 -4
- package/dist/diff.d.ts.map +1 -1
- package/dist/diff.js +0 -51
- package/dist/diff.js.map +1 -1
- package/dist/paths.d.ts +7 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +141 -0
- package/dist/paths.js.map +1 -0
- package/dist/processors/json.d.ts.map +1 -1
- package/dist/processors/json.js +12 -0
- package/dist/processors/json.js.map +1 -1
- package/dist/processors/template.d.ts +4 -0
- package/dist/processors/template.d.ts.map +1 -0
- package/dist/processors/template.js +119 -0
- package/dist/processors/template.js.map +1 -0
- package/dist/processors/toml.d.ts.map +1 -1
- package/dist/processors/toml.js +11 -0
- package/dist/processors/toml.js.map +1 -1
- package/dist/processors/yaml.d.ts.map +1 -1
- package/dist/processors/yaml.js +14 -0
- package/dist/processors/yaml.js.map +1 -1
- package/dist/sources/github.d.ts.map +1 -1
- package/dist/sources/github.js +2 -4
- package/dist/sources/github.js.map +1 -1
- package/dist/sources/index.d.ts +1 -1
- package/dist/sources/index.d.ts.map +1 -1
- package/dist/sources/index.js +63 -6
- package/dist/sources/index.js.map +1 -1
- package/dist/sources/local.d.ts.map +1 -1
- package/dist/sources/local.js.map +1 -1
- package/dist/sources/vault.d.ts.map +1 -1
- package/dist/sources/vault.js +2 -1
- package/dist/sources/vault.js.map +1 -1
- package/dist/types.d.ts +10 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -1
- package/dist/variables-remote.d.ts.map +1 -1
- package/dist/variables-remote.js +47 -2
- package/dist/variables-remote.js.map +1 -1
- package/dist/variables.d.ts +6 -0
- package/dist/variables.d.ts.map +1 -1
- package/dist/variables.js +189 -2
- package/dist/variables.js.map +1 -1
- package/dist/writer.d.ts +1 -0
- package/dist/writer.d.ts.map +1 -1
- package/dist/writer.js +42 -1
- package/dist/writer.js.map +1 -1
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -31,8 +31,11 @@ atomic rollbacks, and diff-before-apply safety.
|
|
|
31
31
|
- [JSON Merging](#json-merging)
|
|
32
32
|
- [YAML Merging](#yaml-merging)
|
|
33
33
|
- [TOML Merging](#toml-merging)
|
|
34
|
+
- [Template Rendering](#template-rendering)
|
|
34
35
|
- [Insert Mode](#insert-mode)
|
|
35
36
|
- [Conditions](#conditions)
|
|
37
|
+
- [Scaffold Pattern](#scaffold-pattern)
|
|
38
|
+
- [Backup](#backup)
|
|
36
39
|
- [Variables](#variables)
|
|
37
40
|
- [$self — Self-managing Config](#self--self-managing-config)
|
|
38
41
|
- [Authentication](#authentication)
|
|
@@ -47,6 +50,7 @@ atomic rollbacks, and diff-before-apply safety.
|
|
|
47
50
|
- [Multi-Project Deployment](#multi-project-deployment)
|
|
48
51
|
- [Docker Compose from Upstream Sources](#docker-compose-from-upstream-sources)
|
|
49
52
|
- [Developer Onboarding Bootstrap](#developer-onboarding-bootstrap)
|
|
53
|
+
- [Scaffold Defaults with Local Overrides](#scaffold-defaults-with-local-overrides)
|
|
50
54
|
- [Self-managing Config](#self-managing-config)
|
|
51
55
|
- [Exit Codes](#exit-codes)
|
|
52
56
|
- [Development](#development)
|
|
@@ -383,6 +387,23 @@ files:
|
|
|
383
387
|
|
|
384
388
|
End the target path with `/` to write a directory source as a mirror; omit the trailing slash to merge all files from the directory into a single output file (YAML/JSON auto-detected by extension, or forced with `yaml:`/`json:`).
|
|
385
389
|
|
|
390
|
+
**Brace expansion** — use `{a,b,c}` in the target key to declare multiple entries from a single block. The config is equivalent to repeating the block for each alternative:
|
|
391
|
+
|
|
392
|
+
```yaml
|
|
393
|
+
files:
|
|
394
|
+
config/{dev,staging,prod}.yml:
|
|
395
|
+
src:
|
|
396
|
+
github:
|
|
397
|
+
repo: my-org/configs
|
|
398
|
+
file: $filename
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
This is identical to three separate entries for `config/dev.yml`, `config/staging.yml`, and `config/prod.yml`. Per-entry variables like `$filename`, `$basename`, and `$dirname` are derived from each expanded path, so they can be used directly in source fields (as above). Multiple brace groups in a single key are expanded as a cross-product: `{a,b}/{x,y}` produces four entries.
|
|
402
|
+
|
|
403
|
+
A brace group is only expanded when it contains **at least one comma** (e.g. `{foo,bar}`). A group without a comma — such as `{foo}` — is left as a literal brace sequence and is not expanded. This matches standard shell behavior and means filenames that happen to contain `{` or `}` (e.g. route patterns like `{id}`) require no escaping. YAML quoting is still required when the key itself starts with `{` — see the note below. A single key may produce at most 100 expanded entries; exceeding this limit throws a parse error.
|
|
404
|
+
|
|
405
|
+
> **YAML quoting:** YAML treats `{` at the start of a plain key as a flow mapping. If the brace group is the first character of a key, quote it: `'{dev,prod}.yml':` or `"{dev,prod}.yml":`. Keys where the brace group appears after a path prefix (e.g. `config/{dev,prod}.yml`) do not need quoting.
|
|
406
|
+
|
|
386
407
|
| Field | Required | Description |
|
|
387
408
|
| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
388
409
|
| `src` | Yes | Source (see below). May be a single source or a **list** of sources to concatenate. |
|
|
@@ -391,6 +412,7 @@ End the target path with `/` to write a directory source as a mirror; omit the t
|
|
|
391
412
|
| `mode` | No | File permission mode, e.g. `"0755"` |
|
|
392
413
|
| `replace` | No | List of `{from, to}` replacement rules. `from` may be a plain string or `/pattern/flags` regex. |
|
|
393
414
|
| `post` | No | Shell script. Content is piped via stdin; stdout is used as the result. Runs after `replace`. |
|
|
415
|
+
| `template` | No | Treat the fetched content as a template and render it with avanti config variables as context. See [Template Rendering](#template-rendering). |
|
|
394
416
|
| `json` | No | JSON merge/format options (see below). When omitted, merging is auto-enabled if all sources have a `.json` or `.jsonc` extension. Use `true`/`false` to force on or off regardless of extension. |
|
|
395
417
|
| `yaml` | No | YAML merge/format options (see below). When omitted, merging is auto-enabled if all sources have a `.yaml` or `.yml` extension. Use `true`/`false` to force on or off regardless of extension. Comments are preserved in merged output. |
|
|
396
418
|
| `strategy` | No | Write strategy: `replace` _(default)_ — overwrite the target file entirely; `insert` — merge content into the existing file without clobbering unrelated content. See [Insert Mode](#insert-mode). |
|
|
@@ -632,7 +654,7 @@ files:
|
|
|
632
654
|
file: overrides.json
|
|
633
655
|
json:
|
|
634
656
|
conflicts: last_wins # abort | first_wins | last_wins (default)
|
|
635
|
-
arrays: replace # replace (default) | concat
|
|
657
|
+
arrays: replace # replace (default) | concat | dedupe
|
|
636
658
|
objects: merge # merge (default) | replace
|
|
637
659
|
indent: 2 # number of spaces, or "tab"
|
|
638
660
|
trailing_commas: false # add trailing comma after last item (valid JSONC)
|
|
@@ -648,6 +670,7 @@ files:
|
|
|
648
670
|
- `arrays` — how to combine arrays at the same key:
|
|
649
671
|
- `replace` _(default)_ — the later source's array replaces the earlier one
|
|
650
672
|
- `concat` — arrays are concatenated (no deduplication)
|
|
673
|
+
- `dedupe` — items from the later source are appended only if not already present in the base (set-union, deep equality, order preserved)
|
|
651
674
|
- `objects` — how to combine objects (maps) at the same key:
|
|
652
675
|
- `merge` _(default)_ — deep merge, applying the same rules recursively to nested keys
|
|
653
676
|
- `replace` — the later source's object replaces the earlier one entirely
|
|
@@ -702,7 +725,7 @@ files:
|
|
|
702
725
|
file: overrides.yaml
|
|
703
726
|
yaml:
|
|
704
727
|
conflicts: last_wins # abort | first_wins | last_wins (default)
|
|
705
|
-
arrays: replace # replace (default) | concat
|
|
728
|
+
arrays: replace # replace (default) | concat | dedupe
|
|
706
729
|
objects: merge # merge (default) | replace
|
|
707
730
|
```
|
|
708
731
|
|
|
@@ -715,6 +738,7 @@ The options behave identically to JSON merging:
|
|
|
715
738
|
- `arrays` — how to combine arrays at the same key:
|
|
716
739
|
- `replace` _(default)_ — the later source's array replaces the earlier one
|
|
717
740
|
- `concat` — arrays are concatenated (no deduplication)
|
|
741
|
+
- `dedupe` — items from the later source are appended only if not already present in the base (set-union, deep equality, order preserved)
|
|
718
742
|
- `objects` — how to combine objects (maps) at the same key:
|
|
719
743
|
- `merge` _(default)_ — deep merge, applying the same rules recursively to nested keys
|
|
720
744
|
- `replace` — the later source's object replaces the earlier one entirely
|
|
@@ -767,7 +791,7 @@ files:
|
|
|
767
791
|
file: overrides.toml
|
|
768
792
|
toml:
|
|
769
793
|
conflicts: last_wins # abort | first_wins | last_wins (default)
|
|
770
|
-
arrays: replace # replace (default) | concat
|
|
794
|
+
arrays: replace # replace (default) | concat | dedupe
|
|
771
795
|
objects: merge # merge (default) | replace
|
|
772
796
|
```
|
|
773
797
|
|
|
@@ -780,6 +804,7 @@ The options behave identically to JSON and YAML merging:
|
|
|
780
804
|
- `arrays` — how to combine arrays at the same key:
|
|
781
805
|
- `replace` _(default)_ — the later source's array replaces the earlier one
|
|
782
806
|
- `concat` — arrays are concatenated (no deduplication)
|
|
807
|
+
- `dedupe` — items from the later source are appended only if not already present in the base (set-union, deep equality, order preserved)
|
|
783
808
|
- `objects` — how to combine objects (tables) at the same key:
|
|
784
809
|
- `merge` _(default)_ — deep merge, applying the same rules recursively to nested keys
|
|
785
810
|
- `replace` — the later source's table replaces the earlier one entirely
|
|
@@ -797,6 +822,53 @@ files:
|
|
|
797
822
|
src: ./config.toml
|
|
798
823
|
```
|
|
799
824
|
|
|
825
|
+
### Template Rendering
|
|
826
|
+
|
|
827
|
+
Set `template` to treat the fetched content as a template. avanti renders it at deploy time using all avanti config variables as the template context, then writes the rendered output to the target file.
|
|
828
|
+
|
|
829
|
+
> **Security note** — EJS and Eta templates execute arbitrary JavaScript at render time. Handlebars, Nunjucks, Liquid, and Mustache are logic-limited and do not execute raw JS. For any engine, template sources must be trusted: either authored locally, fetched from a controlled internal source, or SHA-pinned (see [`sha:`](#sha-pinning)). Treat a compromised remote template as equivalent to a compromised `post:` script or `exec:` source.
|
|
830
|
+
|
|
831
|
+
```yaml
|
|
832
|
+
variables:
|
|
833
|
+
env: production
|
|
834
|
+
region: us-east-1
|
|
835
|
+
|
|
836
|
+
files:
|
|
837
|
+
deploy-config.txt:
|
|
838
|
+
src: ./deploy.hbs
|
|
839
|
+
template: handlebars
|
|
840
|
+
|
|
841
|
+
k8s-manifest.yaml:
|
|
842
|
+
src: ./manifest.njk
|
|
843
|
+
template: nunjucks # or: template: jinja2 (alias)
|
|
844
|
+
|
|
845
|
+
nginx.conf:
|
|
846
|
+
src: ./nginx.conf.liquid
|
|
847
|
+
template: true # auto-detect engine from file extension
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
**Supported engines:**
|
|
851
|
+
|
|
852
|
+
| Engine | Value | Variable syntax | Auto-detected extensions |
|
|
853
|
+
| ------------ | ------------ | ---------------- | ---------------------------------- |
|
|
854
|
+
| Handlebars | `handlebars` | `{{varName}}` | `.hbs`, `.handlebars` |
|
|
855
|
+
| Nunjucks | `nunjucks` | `{{ varName }}` | `.njk`, `.j2`, `.jinja`, `.jinja2` |
|
|
856
|
+
| Jinja2 alias | `jinja2` | `{{ varName }}` | _(same as nunjucks)_ |
|
|
857
|
+
| Liquid | `liquidjs` | `{{ varName }}` | `.liquid` |
|
|
858
|
+
| EJS | `ejs` | `<%= varName %>` | `.ejs` |
|
|
859
|
+
| Mustache | `mustache` | `{{varName}}` | `.mustache`, `.mst` |
|
|
860
|
+
| Eta | `eta` | `<%= varName %>` | `.eta` |
|
|
861
|
+
|
|
862
|
+
All engines are configured with HTML escaping **disabled** — variable values are written verbatim, without converting `&`, `<`, `>`, `"`, or `'` to HTML entities.
|
|
863
|
+
|
|
864
|
+
`template: true` infers the engine from the source file's extension (including the filename extracted from a URL). Use an explicit engine name when the extension is absent or unrecognised — e.g. `exec:` sources, `raw:` sources, or URLs whose path has no recognised template extension.
|
|
865
|
+
|
|
866
|
+
For multi-source arrays (`src: [a, b, c]`) and directory-to-single-file merges, all sources are concatenated or merged into a single buffer before rendering, and the key used for auto-detection is `path.basename(entry.target)`. In those cases, use an explicit engine name unless the target filename itself has a recognised template extension.
|
|
867
|
+
|
|
868
|
+
**`jinja2` alias** — `template: jinja2` is equivalent to `template: nunjucks`. Nunjucks is a JavaScript implementation heavily inspired by Jinja2; most Jinja2 templates work without changes.
|
|
869
|
+
|
|
870
|
+
**Pipeline order** — template rendering runs first, before `replace` and `post`. Subsequent processors receive the already-rendered content.
|
|
871
|
+
|
|
800
872
|
### Insert Mode
|
|
801
873
|
|
|
802
874
|
By default (`strategy: replace`) avanti overwrites the target file with the fully processed source content. Set `strategy: insert` to **merge** content into an existing file instead of replacing it.
|
|
@@ -850,13 +922,13 @@ When both are present, both must pass. Each condition object may also include `n
|
|
|
850
922
|
|
|
851
923
|
#### Condition fields
|
|
852
924
|
|
|
853
|
-
| Field | Type | Description
|
|
854
|
-
| --------------- | -------------- |
|
|
855
|
-
| `os` | string or list | Platform must match. Values: `linux`, `mac`, `windows`. List = any matches.
|
|
856
|
-
| `exists` | string | Path (file or directory) must exist. Variables are resolved.
|
|
857
|
-
| `exec` | string | Shell command must exit with code `0`.
|
|
858
|
-
| `target_exists` | `true`
|
|
859
|
-
| `not` | boolean | `true` — invert the result of all checks in this condition object.
|
|
925
|
+
| Field | Type | Description |
|
|
926
|
+
| --------------- | -------------- | ---------------------------------------------------------------------------------- |
|
|
927
|
+
| `os` | string or list | Platform must match. Values: `linux`, `mac`, `windows`. List = any matches. |
|
|
928
|
+
| `exists` | string | Path (file or directory) must exist. Variables are resolved. |
|
|
929
|
+
| `exec` | string | Shell command must exit with code `0`. |
|
|
930
|
+
| `target_exists` | boolean | `true` — pass only if target exists. `false` — pass only if target does not exist. |
|
|
931
|
+
| `not` | boolean | `true` — invert the result of all checks in this condition object. |
|
|
860
932
|
|
|
861
933
|
#### Examples
|
|
862
934
|
|
|
@@ -920,6 +992,116 @@ files:
|
|
|
920
992
|
- path: /common/base.conf
|
|
921
993
|
```
|
|
922
994
|
|
|
995
|
+
### Scaffold Pattern
|
|
996
|
+
|
|
997
|
+
A local file can be both a **write target** and a **source** for another entry in the same run. When avanti processes an entry whose source path resolves to a file that is also being written in the same run, it uses the **pending content** — the content that entry would write — rather than whatever is currently on disk. This means the downstream entry sees the final result even if the target file does not exist yet.
|
|
998
|
+
|
|
999
|
+
This enables a scaffold-and-customize pattern: create a default file on first run, let the user modify it, and automatically incorporate their changes into downstream files on every subsequent run.
|
|
1000
|
+
|
|
1001
|
+
```yaml
|
|
1002
|
+
files:
|
|
1003
|
+
# Created once with a default template. Never touched again after the user edits it.
|
|
1004
|
+
./config/team.md:
|
|
1005
|
+
src:
|
|
1006
|
+
raw: |
|
|
1007
|
+
# Team Configuration
|
|
1008
|
+
Edit this file to customize your team settings.
|
|
1009
|
+
if:
|
|
1010
|
+
target_exists: false
|
|
1011
|
+
|
|
1012
|
+
# Always rebuilt. On first run it picks up the default template above.
|
|
1013
|
+
# After the user edits team.md, it picks up their version.
|
|
1014
|
+
./docs/handbook.md:
|
|
1015
|
+
src:
|
|
1016
|
+
- github:
|
|
1017
|
+
repo: org/docs
|
|
1018
|
+
file: handbook-base.md
|
|
1019
|
+
ref: main
|
|
1020
|
+
- path: ./config/team.md
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
On **first run**: `team.md` does not exist, so the `raw:` entry creates it. `handbook.md` sources from `team.md` and picks up the default template content — even though `team.md` has not been written to disk yet.
|
|
1024
|
+
|
|
1025
|
+
On **subsequent runs**: `team.md` already exists, so the `target_exists: false` condition skips it. `handbook.md` reads `team.md` from disk and picks up any changes the user made.
|
|
1026
|
+
|
|
1027
|
+
**Automatic ordering** — avanti resolves dependencies between entries and processes them in the correct order automatically. You can define entries in any order in the config; if entry B sources from entry A's target path, A is always processed before B.
|
|
1028
|
+
|
|
1029
|
+
**Cycle detection** — if two entries form a cycle (A sources from B and B sources from A), avanti exits with an error listing the cycle before writing any files.
|
|
1030
|
+
|
|
1031
|
+
### Backup
|
|
1032
|
+
|
|
1033
|
+
> **Note:** avanti already maintains an internal pull history under `~/.config/avanti/` and you can restore any file with `avanti revert`. The `backup:` field is for additional, fine-grained control — for example, keeping a copy on an external drive, in a dedicated folder, or with a custom naming scheme.
|
|
1034
|
+
|
|
1035
|
+
Add `backup:` to a file entry to copy the current file to a backup location before overwriting it:
|
|
1036
|
+
|
|
1037
|
+
```yaml
|
|
1038
|
+
files:
|
|
1039
|
+
config.yaml:
|
|
1040
|
+
src: github:org/repo/config.yaml
|
|
1041
|
+
backup: $dirname/$filename.bkp
|
|
1042
|
+
```
|
|
1043
|
+
|
|
1044
|
+
Backup only happens when the target is a regular file (not a symlink or directory). If the backup path already exists it is overwritten — use the [counter pattern](#counter-pattern) or `$datetime` when you want to keep every backup.
|
|
1045
|
+
|
|
1046
|
+
#### Path variables
|
|
1047
|
+
|
|
1048
|
+
All [system-injected variables](#system-injected-variables) — per-file path variables (`$path`, `$filename`, `$basename`, `$ext`, `$dirname`, `$basedir`) and pull-time variables (`$date`, `$datetime`) — are available in `backup:` patterns.
|
|
1049
|
+
|
|
1050
|
+
#### Counter pattern
|
|
1051
|
+
|
|
1052
|
+
Use `%d+` in the backup path to auto-increment to the lowest unused slot. The number of `d` characters sets the zero-padding width and maximum slot:
|
|
1053
|
+
|
|
1054
|
+
| Token | Slots |
|
|
1055
|
+
| ------ | ----------- |
|
|
1056
|
+
| `%d` | `1`–`9` |
|
|
1057
|
+
| `%dd` | `01`–`99` |
|
|
1058
|
+
| `%ddd` | `001`–`999` |
|
|
1059
|
+
|
|
1060
|
+
Only one counter token per backup path is allowed. If all slots are taken, avanti exits with an error.
|
|
1061
|
+
|
|
1062
|
+
```yaml
|
|
1063
|
+
files:
|
|
1064
|
+
config.yaml:
|
|
1065
|
+
src: github:org/repo/config.yaml
|
|
1066
|
+
backup: $dirname/$basename.%dd.$ext # config.01.yaml → config.02.yaml → …
|
|
1067
|
+
```
|
|
1068
|
+
|
|
1069
|
+
#### Security: backup_roots
|
|
1070
|
+
|
|
1071
|
+
By default, backup paths are restricted to the working directory — the same constraint applied to target paths. To back up outside the working directory, declare the allowed roots at the top level:
|
|
1072
|
+
|
|
1073
|
+
```yaml
|
|
1074
|
+
backup_roots:
|
|
1075
|
+
- ~/backups
|
|
1076
|
+
- /mnt/nas/backups
|
|
1077
|
+
|
|
1078
|
+
files:
|
|
1079
|
+
config.yaml:
|
|
1080
|
+
src: github:org/repo/config.yaml
|
|
1081
|
+
backup: ~/backups/$filename
|
|
1082
|
+
```
|
|
1083
|
+
|
|
1084
|
+
Each entry in `backup_roots` supports `~/` expansion. Paths not covered by the working directory or a declared root are rejected with an error before any file is written.
|
|
1085
|
+
|
|
1086
|
+
#### Backup examples
|
|
1087
|
+
|
|
1088
|
+
```yaml
|
|
1089
|
+
# Same directory, .bkp extension appended
|
|
1090
|
+
backup: $dirname/$filename.bkp # /project/config.yaml.bkp
|
|
1091
|
+
|
|
1092
|
+
# Separate backup folder within the working directory
|
|
1093
|
+
backup: backups/$filename # <workingDir>/backups/config.yaml
|
|
1094
|
+
|
|
1095
|
+
# Timestamped — one file per pull
|
|
1096
|
+
backup: $dirname/$filename.$datetime # config.yaml.2026-05-20-14-30-00
|
|
1097
|
+
|
|
1098
|
+
# Auto-increment — keeps up to 99 rotating backups
|
|
1099
|
+
backup: $dirname/$basename.%dd.$ext # config.01.yaml, config.02.yaml, …
|
|
1100
|
+
|
|
1101
|
+
# Separate directory outside the working directory (requires backup_roots)
|
|
1102
|
+
backup: ~/backups/$filename
|
|
1103
|
+
```
|
|
1104
|
+
|
|
923
1105
|
### Variables
|
|
924
1106
|
|
|
925
1107
|
Define reusable values at the top level under `variables:`:
|
|
@@ -1035,6 +1217,96 @@ variables:
|
|
|
1035
1217
|
|
|
1036
1218
|
When `ref` is omitted, all source types (GitHub, GitLab, Bitbucket, git) resolve to the repository's default branch.
|
|
1037
1219
|
|
|
1220
|
+
`$self` is a reserved keyword that expands to the absolute path of the active config file. It is injected automatically and cannot be used as a variable name. Use it anywhere a variable is valid — `exec:` commands, `replace:` rules, `exists:` conditions, `post:` scripts, or any source field:
|
|
1221
|
+
|
|
1222
|
+
```yaml
|
|
1223
|
+
files:
|
|
1224
|
+
./output.txt:
|
|
1225
|
+
src:
|
|
1226
|
+
raw: 'generated from: PLACEHOLDER'
|
|
1227
|
+
replace:
|
|
1228
|
+
- from: PLACEHOLDER
|
|
1229
|
+
to: $self # expands to e.g. /home/user/project/.avanti.yml
|
|
1230
|
+
|
|
1231
|
+
./copy-of-config.yml:
|
|
1232
|
+
src:
|
|
1233
|
+
exec: cat $self # reads the config file itself
|
|
1234
|
+
|
|
1235
|
+
./guarded.txt:
|
|
1236
|
+
src:
|
|
1237
|
+
raw: 'only written when config exists'
|
|
1238
|
+
if:
|
|
1239
|
+
exists: $self
|
|
1240
|
+
```
|
|
1241
|
+
|
|
1242
|
+
When the config is specified as a remote spec (e.g. `--config github:org/repo:.avanti.yml`), `$self` expands to that spec string. In an `exists:` condition this will always evaluate to false since the remote spec is not a local path.
|
|
1243
|
+
|
|
1244
|
+
#### System-injected variables
|
|
1245
|
+
|
|
1246
|
+
In addition to `$self` and `$latest`, avanti injects several variables automatically at the start of every run. These names are reserved and cannot be used in `variables:`.
|
|
1247
|
+
|
|
1248
|
+
**Per-file path variables** — avanti derives the following variables from each file entry's resolved target path. They can be used in source URLs, `ref:`, conditions, `replace:`, `post:`, template rendering, and `backup:` patterns.
|
|
1249
|
+
|
|
1250
|
+
Example with working directory `/home/user/project` and map key `configs/app.yaml`:
|
|
1251
|
+
|
|
1252
|
+
| Variable | Value |
|
|
1253
|
+
| ----------- | ------------------------------------- |
|
|
1254
|
+
| `$path` | `/home/user/project/configs/app.yaml` |
|
|
1255
|
+
| `$filename` | `app.yaml` |
|
|
1256
|
+
| `$basename` | `app` |
|
|
1257
|
+
| `$ext` | `yaml` (no leading dot) |
|
|
1258
|
+
| `$dirname` | `/home/user/project/configs` |
|
|
1259
|
+
| `$basedir` | `configs` |
|
|
1260
|
+
|
|
1261
|
+
> **Availability in source URLs and conditions:** per-file path variables are only resolved before the fetch when the map key is a fixed (non-directory) path. They are always available in processors (`replace:`, `post:`, template rendering) and `backup:`.
|
|
1262
|
+
|
|
1263
|
+
```yaml
|
|
1264
|
+
variables:
|
|
1265
|
+
env: production
|
|
1266
|
+
|
|
1267
|
+
files:
|
|
1268
|
+
# $filename in source URL — fetches each file by its own target name
|
|
1269
|
+
configs/nginx.conf:
|
|
1270
|
+
src: github:org/config-store/$env/$filename # → …/production/nginx.conf
|
|
1271
|
+
|
|
1272
|
+
# $basename strips the extension — useful when the remote has no extension
|
|
1273
|
+
services/auth.yaml:
|
|
1274
|
+
src: https://config-api.example.com/v1/$basename # → …/v1/auth
|
|
1275
|
+
|
|
1276
|
+
# $path in a condition — only overwrite if the local file already exists
|
|
1277
|
+
generated/report.json:
|
|
1278
|
+
src:
|
|
1279
|
+
exec: generate-report.sh
|
|
1280
|
+
if:
|
|
1281
|
+
exists: $path
|
|
1282
|
+
|
|
1283
|
+
# $dirname in a processor — log which directory was updated
|
|
1284
|
+
app/config.yaml:
|
|
1285
|
+
src: github:org/repo/app/config.yaml
|
|
1286
|
+
post: echo updated $dirname >> pull.log
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1289
|
+
**Pull-time variables** — injected once at the start of every run and available everywhere (source URLs, conditions, `replace:`, `post:`, template rendering, `backup:`):
|
|
1290
|
+
|
|
1291
|
+
| Variable | Value | Example |
|
|
1292
|
+
| ----------- | --------------------------------------- | --------------------- |
|
|
1293
|
+
| `$date` | Current date `YYYY-MM-DD` | `2026-05-20` |
|
|
1294
|
+
| `$datetime` | Current date+time `YYYY-MM-DD-HH-mm-ss` | `2026-05-20-14-30-00` |
|
|
1295
|
+
|
|
1296
|
+
```yaml
|
|
1297
|
+
files:
|
|
1298
|
+
# Fetch today's report by date
|
|
1299
|
+
reports/daily.json:
|
|
1300
|
+
src: https://reports.example.com/$date/summary.json
|
|
1301
|
+
|
|
1302
|
+
# Stamp the pull time into fetched content
|
|
1303
|
+
version.txt:
|
|
1304
|
+
src: github:org/repo/version.txt
|
|
1305
|
+
replace:
|
|
1306
|
+
- from: GENERATED_AT
|
|
1307
|
+
to: $datetime
|
|
1308
|
+
```
|
|
1309
|
+
|
|
1038
1310
|
### $self — Self-managing Config
|
|
1039
1311
|
|
|
1040
1312
|
The special `$self` key in the `files:` map tells avanti to manage its own config file. When `$self` is present, avanti fetches the listed sources and uses the result as the active config for the rest of the run — all in a single invocation.
|
|
@@ -1464,6 +1736,38 @@ files:
|
|
|
1464
1736
|
ref: main
|
|
1465
1737
|
```
|
|
1466
1738
|
|
|
1739
|
+
### Scaffold Defaults with Local Overrides
|
|
1740
|
+
|
|
1741
|
+
Ship default config files that users can customize, and automatically compose downstream files from those customized versions — all in a single `avanti pull`.
|
|
1742
|
+
|
|
1743
|
+
```yaml
|
|
1744
|
+
files:
|
|
1745
|
+
# Created once on first run. The user edits this to set their preferences.
|
|
1746
|
+
./config/prettier.json:
|
|
1747
|
+
src:
|
|
1748
|
+
raw: |
|
|
1749
|
+
{
|
|
1750
|
+
"singleQuote": true,
|
|
1751
|
+
"semi": false
|
|
1752
|
+
}
|
|
1753
|
+
if:
|
|
1754
|
+
target_exists: false
|
|
1755
|
+
|
|
1756
|
+
# Always rebuilt. Sources org defaults from GitHub, then merges in local overrides.
|
|
1757
|
+
./.prettierrc.json:
|
|
1758
|
+
src:
|
|
1759
|
+
- github:
|
|
1760
|
+
repo: org/standards
|
|
1761
|
+
file: prettier-base.json
|
|
1762
|
+
ref: main
|
|
1763
|
+
- path: ./config/prettier.json
|
|
1764
|
+
json:
|
|
1765
|
+
conflicts: last_wins
|
|
1766
|
+
objects: merge
|
|
1767
|
+
```
|
|
1768
|
+
|
|
1769
|
+
On first run both files are created: `config/prettier.json` gets the default template, `.prettierrc.json` merges the org base with those defaults. The user then edits `config/prettier.json` to suit their preferences. On every subsequent run, `.prettierrc.json` is rebuilt from the org base plus whatever the user has in their local override file — and `config/prettier.json` is left untouched.
|
|
1770
|
+
|
|
1467
1771
|
### Self-managing Config
|
|
1468
1772
|
|
|
1469
1773
|
avanti can manage any file — including its own config. The special `$self` key in the `files:` map fetches and merges one or more sources, uses the result as the active config, and then applies all the files it declares — in the same run, with a single confirmation prompt.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyMpC,wBAAgB,WAAW,IAAI,OAAO,CAwJrC"}
|
package/dist/commands/diff.js
CHANGED
|
@@ -39,15 +39,18 @@ const fs = __importStar(require("fs"));
|
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
40
|
const config_1 = require("../config");
|
|
41
41
|
const sources_1 = require("../sources");
|
|
42
|
+
const dependencies_1 = require("../dependencies");
|
|
42
43
|
const replace_1 = require("../processors/replace");
|
|
43
44
|
const post_1 = require("../processors/post");
|
|
44
45
|
const insert_1 = require("../processors/insert");
|
|
45
46
|
const binary_1 = require("../binary");
|
|
46
47
|
const diff_1 = require("../diff");
|
|
48
|
+
const paths_1 = require("../paths");
|
|
47
49
|
const history_1 = require("../history");
|
|
48
50
|
const variables_remote_1 = require("../variables-remote");
|
|
49
51
|
const condition_1 = require("../condition");
|
|
50
|
-
|
|
52
|
+
const variables_1 = require("../variables");
|
|
53
|
+
async function runDiffLoop(config, workingDir, dateVars, cache, configPath, history) {
|
|
51
54
|
let vars;
|
|
52
55
|
try {
|
|
53
56
|
vars = await (0, variables_remote_1.resolveVariableSpec)(config.variables ?? {}, workingDir, cache);
|
|
@@ -56,7 +59,12 @@ async function runDiffLoop(config, workingDir, cache, configPath, history) {
|
|
|
56
59
|
console.error(err instanceof Error ? err.message : String(err));
|
|
57
60
|
return { allDiffs: [], hasError: true };
|
|
58
61
|
}
|
|
62
|
+
if (configPath !== undefined) {
|
|
63
|
+
vars['self'] = configPath;
|
|
64
|
+
}
|
|
65
|
+
Object.assign(vars, dateVars);
|
|
59
66
|
const allDiffs = [];
|
|
67
|
+
const pendingWrites = new Map();
|
|
60
68
|
let hasError = false;
|
|
61
69
|
let selfContent;
|
|
62
70
|
let hasSelf = config_1.SELF_KEY in config.files;
|
|
@@ -65,22 +73,35 @@ async function runDiffLoop(config, workingDir, cache, configPath, history) {
|
|
|
65
73
|
try {
|
|
66
74
|
hasSelf = (0, condition_1.evaluateConditions)(selfEntry['if'], selfEntry.ifAny, () => configPath !== undefined
|
|
67
75
|
? configPath
|
|
68
|
-
: (0,
|
|
76
|
+
: (0, paths_1.resolveTargetPath)(selfEntry, '', workingDir, vars), workingDir, vars);
|
|
69
77
|
}
|
|
70
78
|
catch (err) {
|
|
71
79
|
console.error(`Error processing ${config_1.SELF_KEY}: ${err instanceof Error ? err.message : String(err)}`);
|
|
72
80
|
return { allDiffs: [], hasError: true };
|
|
73
81
|
}
|
|
74
82
|
}
|
|
75
|
-
|
|
83
|
+
const nonSelfEntries = Object.entries(config.files).filter(([k]) => k !== config_1.SELF_KEY);
|
|
84
|
+
let sortedEntries;
|
|
85
|
+
try {
|
|
86
|
+
sortedEntries = (0, dependencies_1.sortByDependencies)(nonSelfEntries, workingDir, vars);
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
90
|
+
return { allDiffs: [], hasError: true };
|
|
91
|
+
}
|
|
92
|
+
const entriesToProcess = hasSelf
|
|
93
|
+
? [[config_1.SELF_KEY, config.files[config_1.SELF_KEY]], ...sortedEntries]
|
|
94
|
+
: sortedEntries;
|
|
95
|
+
for (const [key, entry] of entriesToProcess) {
|
|
76
96
|
const isSelf = key === config_1.SELF_KEY;
|
|
77
97
|
if (hasSelf !== isSelf)
|
|
78
98
|
continue;
|
|
79
99
|
try {
|
|
100
|
+
const preVars = (0, paths_1.buildEntryPreVars)(entry, isSelf, workingDir, vars);
|
|
80
101
|
if (!isSelf &&
|
|
81
|
-
!(0, condition_1.evaluateConditions)(entry['if'], entry.ifAny, () => (0,
|
|
102
|
+
!(0, condition_1.evaluateConditions)(entry['if'], entry.ifAny, () => (0, paths_1.resolveTargetPath)(entry, '', workingDir, vars), workingDir, preVars))
|
|
82
103
|
continue;
|
|
83
|
-
const result = await (0, sources_1.fetchSource)(entry, workingDir,
|
|
104
|
+
const result = await (0, sources_1.fetchSource)(entry, workingDir, preVars, cache, isSelf && configPath !== undefined ? () => configPath : undefined, pendingWrites);
|
|
84
105
|
for (const rec of result.sourceRecords) {
|
|
85
106
|
if (!rec.matched) {
|
|
86
107
|
console.error(`⚠ SHA mismatch for ${rec.sourceLabel}\n` +
|
|
@@ -91,17 +112,28 @@ async function runDiffLoop(config, workingDir, cache, configPath, history) {
|
|
|
91
112
|
if (isSelf && result.files.size !== 1) {
|
|
92
113
|
throw new Error(`$self must resolve to exactly one file, got ${result.files.size}. Use yaml: true or json: true to merge multiple sources into one.`);
|
|
93
114
|
}
|
|
115
|
+
const applyTemplate = entry.template !== undefined
|
|
116
|
+
? (await Promise.resolve().then(() => __importStar(require('../processors/template')))).applyTemplate
|
|
117
|
+
: undefined;
|
|
94
118
|
for (const [relPath, rawContent] of result.files) {
|
|
119
|
+
const targetPath = isSelf
|
|
120
|
+
? undefined
|
|
121
|
+
: (0, paths_1.resolveTargetPath)(entry, relPath, workingDir, vars);
|
|
122
|
+
const entryVars = targetPath !== undefined
|
|
123
|
+
? Object.assign(Object.create(null), vars, (0, variables_1.buildFileVars)(targetPath))
|
|
124
|
+
: vars;
|
|
95
125
|
let content = rawContent;
|
|
96
126
|
if (!(0, binary_1.isBinary)(content)) {
|
|
97
127
|
const rawText = content.toString('utf8');
|
|
98
128
|
let text = rawText;
|
|
129
|
+
if (applyTemplate !== undefined) {
|
|
130
|
+
text = await applyTemplate(text, entry.template, entryVars, relPath || undefined);
|
|
131
|
+
}
|
|
99
132
|
if (entry.replace?.length)
|
|
100
|
-
text = (0, replace_1.applyReplace)(text, entry.replace,
|
|
133
|
+
text = (0, replace_1.applyReplace)(text, entry.replace, entryVars);
|
|
101
134
|
if (entry.post)
|
|
102
|
-
text = (0, post_1.applyPost)(text, entry.post,
|
|
135
|
+
text = (0, post_1.applyPost)(text, entry.post, entryVars);
|
|
103
136
|
if (entry.strategy === 'insert' && !isSelf) {
|
|
104
|
-
const targetPath = (0, diff_1.resolveTargetPath)(entry, relPath, workingDir, vars);
|
|
105
137
|
const lastInserted = history?.getInsertedFragment(targetPath) ?? null;
|
|
106
138
|
if (lastInserted !== null &&
|
|
107
139
|
rawText === lastInserted.raw &&
|
|
@@ -117,8 +149,8 @@ async function runDiffLoop(config, workingDir, cache, configPath, history) {
|
|
|
117
149
|
selfContent = content.toString('utf8');
|
|
118
150
|
continue;
|
|
119
151
|
}
|
|
120
|
-
const targetPath = (0, diff_1.resolveTargetPath)(entry, relPath, workingDir, vars);
|
|
121
152
|
allDiffs.push((0, diff_1.computeDiff)(targetPath, content));
|
|
153
|
+
pendingWrites.set(targetPath, content);
|
|
122
154
|
}
|
|
123
155
|
}
|
|
124
156
|
catch (err) {
|
|
@@ -152,8 +184,9 @@ function diffCommand() {
|
|
|
152
184
|
process.exit(2);
|
|
153
185
|
}
|
|
154
186
|
const fetchCache = new Map();
|
|
187
|
+
const dateVars = (0, variables_1.buildDateVars)();
|
|
155
188
|
const history = new history_1.HistoryManager((0, config_1.normalizeConfigKey)(configPath), workingDir);
|
|
156
|
-
const firstPass = await runDiffLoop(config, workingDir, fetchCache, configPath, history);
|
|
189
|
+
const firstPass = await runDiffLoop(config, workingDir, dateVars, fetchCache, configPath, history);
|
|
157
190
|
let { allDiffs, hasError } = firstPass;
|
|
158
191
|
if (hasError)
|
|
159
192
|
process.exit(2);
|
|
@@ -176,7 +209,7 @@ function diffCommand() {
|
|
|
176
209
|
break;
|
|
177
210
|
}
|
|
178
211
|
console.log('$self config resolved; re-evaluating with merged config...');
|
|
179
|
-
const next = await runDiffLoop(currentConfig, workingDir, fetchCache, configPath, history);
|
|
212
|
+
const next = await runDiffLoop(currentConfig, workingDir, dateVars, fetchCache, configPath, history);
|
|
180
213
|
if (next.hasError) {
|
|
181
214
|
hasError = true;
|
|
182
215
|
break;
|
|
@@ -197,7 +230,7 @@ function diffCommand() {
|
|
|
197
230
|
filesWithoutSelf[k] = v;
|
|
198
231
|
}
|
|
199
232
|
if (Object.keys(filesWithoutSelf).length > 0) {
|
|
200
|
-
const second = await runDiffLoop({ ...stableConfig, files: filesWithoutSelf }, workingDir, fetchCache, configPath, history);
|
|
233
|
+
const second = await runDiffLoop({ ...stableConfig, files: filesWithoutSelf }, workingDir, dateVars, fetchCache, configPath, history);
|
|
201
234
|
allDiffs = second.allDiffs;
|
|
202
235
|
hasError = second.hasError;
|
|
203
236
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKA,kCAoJC;AAvTD,yCAAoC;AACpC,uCAAyB;AACzB,2CAA6B;AAC7B,sCAQmB;AACnB,wCAAqD;AACrD,mDAAqD;AACrD,6CAA+C;AAC/C,iDAAuD;AACvD,sCAAqC;AACrC,kCAKiB;AAGjB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AC,CAAC;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/commands/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/commands/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,wBAAgB,WAAW,IAAI,OAAO,CAiHrC"}
|