@udondan/avanti 0.11.0 → 0.12.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.
Files changed (51) hide show
  1. package/README.md +164 -98
  2. package/dist/commands/log.d.ts.map +1 -1
  3. package/dist/commands/log.js +7 -3
  4. package/dist/commands/log.js.map +1 -1
  5. package/dist/commands/reset.d.ts.map +1 -1
  6. package/dist/commands/reset.js +1 -1
  7. package/dist/commands/reset.js.map +1 -1
  8. package/dist/commands/revert.d.ts.map +1 -1
  9. package/dist/commands/revert.js +1 -1
  10. package/dist/commands/revert.js.map +1 -1
  11. package/dist/config.js +9 -43
  12. package/dist/config.js.map +1 -1
  13. package/dist/fetch.d.ts +3 -0
  14. package/dist/fetch.d.ts.map +1 -1
  15. package/dist/fetch.js +6 -5
  16. package/dist/fetch.js.map +1 -1
  17. package/dist/history.d.ts +1 -0
  18. package/dist/history.d.ts.map +1 -1
  19. package/dist/history.js +16 -12
  20. package/dist/history.js.map +1 -1
  21. package/dist/processors/post.js +1 -1
  22. package/dist/processors/post.js.map +1 -1
  23. package/dist/sources/bitbucket.d.ts.map +1 -1
  24. package/dist/sources/bitbucket.js +8 -6
  25. package/dist/sources/bitbucket.js.map +1 -1
  26. package/dist/sources/git.js +1 -1
  27. package/dist/sources/git.js.map +1 -1
  28. package/dist/sources/github.d.ts.map +1 -1
  29. package/dist/sources/github.js +44 -36
  30. package/dist/sources/github.js.map +1 -1
  31. package/dist/sources/gitlab.d.ts.map +1 -1
  32. package/dist/sources/gitlab.js +5 -3
  33. package/dist/sources/gitlab.js.map +1 -1
  34. package/dist/sources/index.d.ts.map +1 -1
  35. package/dist/sources/index.js +50 -85
  36. package/dist/sources/index.js.map +1 -1
  37. package/dist/sources/local.d.ts.map +1 -1
  38. package/dist/sources/local.js +5 -1
  39. package/dist/sources/local.js.map +1 -1
  40. package/dist/sources/s3.js +1 -1
  41. package/dist/sources/s3.js.map +1 -1
  42. package/dist/sources/vault.js +1 -1
  43. package/dist/sources/vault.js.map +1 -1
  44. package/dist/variables.d.ts +1 -0
  45. package/dist/variables.d.ts.map +1 -1
  46. package/dist/variables.js +27 -1
  47. package/dist/variables.js.map +1 -1
  48. package/dist/writer.d.ts.map +1 -1
  49. package/dist/writer.js +18 -12
  50. package/dist/writer.js.map +1 -1
  51. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # avanti
2
2
 
3
- Assemble local files from any source via a declarative YAML spec.
3
+ A stateful package manager for arbitrary text files. Declare what you need and where to get it; avanti fetches, diffs, and writes with full version history, atomic rollbacks, and diff-before-apply safety.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -27,6 +27,7 @@ Assemble local files from any source via a declarative YAML spec.
27
27
  - [Authentication](#authentication)
28
28
  - [Private Instances](#private-instances)
29
29
  - [Use Cases](#use-cases)
30
+ - [Avanti as a Package Manager](#avanti-as-a-package-manager)
30
31
  - [Composable AI Agent Instructions (CLAUDE.md / AGENTS.md)](#composable-ai-agent-instructions-claudemd--agentsmd)
31
32
  - [Shared Tooling Config (Renovate, ESLint, Prettier, TSConfig)](#shared-tooling-config-renovate-eslint-prettier-tsconfig)
32
33
  - [CI/CD: Shared Workflow Fragments](#cicd-shared-workflow-fragments)
@@ -34,10 +35,9 @@ Assemble local files from any source via a declarative YAML spec.
34
35
  - [Environment-Specific Config from a Single Spec](#environment-specific-config-from-a-single-spec)
35
36
  - [Secrets from Vault or S3](#secrets-from-vault-or-s3)
36
37
  - [Multi-Project Deployment](#multi-project-deployment)
37
- - [Docker Compose Layering](#docker-compose-layering)
38
+ - [Docker Compose from Upstream Sources](#docker-compose-from-upstream-sources)
38
39
  - [Developer Onboarding Bootstrap](#developer-onboarding-bootstrap)
39
40
  - [Self-managing Config](#self-managing-config)
40
- - [Avanti as a Package Manager](#avanti-as-a-package-manager)
41
41
  - [Exit Codes](#exit-codes)
42
42
  - [Development](#development)
43
43
 
@@ -267,15 +267,15 @@ files:
267
267
 
268
268
  ### File Entry Fields
269
269
 
270
- | Field | Required | Description |
271
- | --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
272
- | `src` | Yes | Source (see below). May be a single source or a **list** of sources to concatenate. |
273
- | `target` | Conditional | Local path to write to. Required for `exec:` and `raw:` sources and when `src` is a list. May be omitted when filename is inferable. End with `/` when `src` is a directory files are written inside, preserving their relative paths. |
274
- | `mode` | No | File permission mode, e.g. `"0755"` |
275
- | `replace` | No | List of `{from, to}` replacement rules. `from` may be a plain string or `/pattern/flags` regex. |
276
- | `post` | No | Shell script. Content is piped via stdin; stdout is used as the result. Runs after `replace`. |
277
- | `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. |
278
- | `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. |
270
+ | Field | Required | Description |
271
+ | --------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
272
+ | `src` | Yes | Source (see below). May be a single source or a **list** of sources to concatenate. |
273
+ | `target` | Conditional | Local path to write to. Required for `exec:` and `raw:` sources and when `src` is a list. May be omitted when filename is inferable. End with `/` when `src` is a directory and you want the files written individually (directory 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:`). |
274
+ | `mode` | No | File permission mode, e.g. `"0755"` |
275
+ | `replace` | No | List of `{from, to}` replacement rules. `from` may be a plain string or `/pattern/flags` regex. |
276
+ | `post` | No | Shell script. Content is piped via stdin; stdout is used as the result. Runs after `replace`. |
277
+ | `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. |
278
+ | `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. |
279
279
 
280
280
  ### Source Types
281
281
 
@@ -335,7 +335,7 @@ src:
335
335
 
336
336
  Any source type that references a path (local, GitLab, GitHub, Bitbucket, git, S3) can point to a directory instead of a single file. End the path with `/` to declare it a directory explicitly; without a trailing slash the tool probes the remote to decide.
337
337
 
338
- When `src` is a directory, the matched files are written individually under `target` (which must also end with `/`), preserving the subdirectory structure relative to the source root:
338
+ **Directory directory (mirror):** end `target` with `/` and each file is written individually, preserving subdirectory structure relative to the source root:
339
339
 
340
340
  ```yaml
341
341
  # All files under skills/ in the GitLab repo are written into local skills.new/
@@ -381,6 +381,24 @@ When `src` is a directory, the matched files are written individually under `tar
381
381
  target: .githooks/
382
382
  ```
383
383
 
384
+ **Directory → single file (merge):** omit the trailing `/` from `target` and all files in the directory are merged into one. Files are sorted alphabetically — later names win on key conflicts. YAML/JSON merge is auto-detected from the contained file extensions, or forced with `yaml:`/`json:`:
385
+
386
+ ```yaml
387
+ # One folder per service, each a separate .yml file → single docker-compose.yml
388
+ - src: ./services/
389
+ target: docker-compose.yml
390
+
391
+ # Same with explicit yaml merge options (e.g. to concat arrays)
392
+ - src: ./services/
393
+ target: docker-compose.yml
394
+ yaml:
395
+ arrays: concat
396
+
397
+ # JSON: one file per environment → merged config
398
+ - src: ./config/
399
+ target: config.json
400
+ ```
401
+
384
402
  Directory sources cannot be mixed into a multi-source list (`src` as a list), because the list mode always produces a single file.
385
403
 
386
404
  **List** — combine multiple sources into one file (all source types supported; `target` required):
@@ -550,6 +568,19 @@ Variables are resolved in every string field: `target`, `ref`, `exec` commands,
550
568
 
551
569
  For `raw:` sources, variables are resolved in the content itself. For all other source types (`http`, `local`, `github`, `gitlab`, `exec`), variables are only resolved in the fields that locate the source (URL, path, command) — not in the fetched content. Use a `replace:` rule if you need to substitute values in fetched content.
552
570
 
571
+ **Shell safety in `exec:` and `post:`** — when a variable is substituted into an `exec:` command or a `post:` script, its value is automatically wrapped in POSIX single quotes. This means shell metacharacters (`;`, `&&`, `$(...)`, etc.) in the value are treated as literal data and are never executed. The surrounding command template itself is not quoted, so the static shell syntax you write is executed as usual.
572
+
573
+ ```yaml
574
+ variables:
575
+ version: '1.0'
576
+
577
+ files:
578
+ - src:
579
+ exec: curl https://example.com/api/$version/data # expands to: curl …/'1.0'/data
580
+ target: data.json
581
+ post: sed 's/$version/replaced/g' # expands to: sed 's/'\''1.0'\''/replaced/g'
582
+ ```
583
+
553
584
  **Environment variables** use the `$env:NAME` form:
554
585
 
555
586
  ```yaml
@@ -560,7 +591,9 @@ replace:
560
591
 
561
592
  Referencing an undefined variable or a missing environment variable is an error.
562
593
 
563
- `$latest` is a reserved keyword that resolves to the latest published version and cannot be used as a variable name. For GitLab it resolves to the latest tag sorted by semantic version. For GitHub it resolves to the tag of the latest release; if the repository has no releases, it falls back to the most recently created tag.
594
+ `$latest` is a reserved keyword that resolves to the latest published version and cannot be used as a variable name. For GitLab it resolves to the latest tag sorted by semantic version. For GitHub it resolves to the tag of the latest release; if the repository has no releases, it falls back to the most recently created tag. For Bitbucket it resolves to the latest tag sorted by name; if no tags exist, it falls back to the repository's default branch.
595
+
596
+ When `ref` is omitted, all source types (GitHub, GitLab, Bitbucket, git) resolve to the repository's default branch.
564
597
 
565
598
  ### Authentication
566
599
 
@@ -597,6 +630,95 @@ GITHUB_HOST=github.mycompany.com avanti pull
597
630
 
598
631
  ## Use Cases
599
632
 
633
+ ### Avanti as a Package Manager
634
+
635
+ avanti is a package manager for arbitrary text files. Your `.avanti.yml` is the manifest — it declares what you consume, where to fetch it, and which version to pin, the same role as `package.json` or `Cargo.toml`. Source repositories are the packages. `avanti pull` is the install command.
636
+
637
+ What makes it stateful: every successful pull is recorded in a local history store. You can diff any two states, revert the whole project to a prior pull, or fully undo all avanti changes — the same guarantees as a lockfile, extended to any text file from any source.
638
+
639
+ **Declare dependencies** — pin versions with a variable and bump in one place to upgrade everything at once:
640
+
641
+ ```yaml
642
+ variables:
643
+ frontend_standards: myorg/frontend-standards
644
+ platform: myorg/platform-templates
645
+ standards_ref: v2.4.1 # pinned — bump here to upgrade
646
+
647
+ files:
648
+ - src:
649
+ github:
650
+ repo: $frontend_standards
651
+ file: eslint.config.js
652
+ ref: $standards_ref
653
+
654
+ - src:
655
+ github:
656
+ repo: $frontend_standards
657
+ file: .prettierrc
658
+ ref: $standards_ref
659
+
660
+ - src:
661
+ github:
662
+ repo: $platform
663
+ file: workflows/test.yml
664
+ ref: $standards_ref
665
+ target: .github/workflows/test.yml
666
+
667
+ - src:
668
+ github:
669
+ repo: $platform
670
+ file: workflows/deploy.yml
671
+ ref: $standards_ref
672
+ target: .github/workflows/deploy.yml
673
+ ```
674
+
675
+ **Review and apply upgrades** — the same workflow as reading a lockfile diff before committing:
676
+
677
+ ```sh
678
+ # Bump standards_ref: v2.4.1 → v2.5.0, then:
679
+ avanti diff # see every file that would change
680
+ avanti pull # apply after review
681
+ avanti revert # roll back instantly if something breaks
682
+ ```
683
+
684
+ **Publish your own packages** — any repo can ship an `avanti-snippet.yml` alongside its files. Consumers YAML-merge those snippets into their own config. The snippet is a valid avanti config fragment with its own `files:` list:
685
+
686
+ ```yaml
687
+ # myorg/frontend-standards:avanti-snippet.yml — published alongside eslint.config.js, .prettierrc, etc.
688
+ files:
689
+ - src:
690
+ github:
691
+ repo: myorg/frontend-standards
692
+ file: eslint.config.js
693
+ ref: $latest
694
+
695
+ - src:
696
+ github:
697
+ repo: myorg/frontend-standards
698
+ file: .prettierrc
699
+ ref: $latest
700
+ ```
701
+
702
+ ```yaml
703
+ # .avanti.yml — assembled from team snippets via YAML merge
704
+ files:
705
+ - src:
706
+ - github:
707
+ repo: myorg/frontend-standards
708
+ file: avanti-snippet.yml
709
+ ref: $latest
710
+ - github:
711
+ repo: myorg/platform-templates
712
+ file: avanti-snippet.yml
713
+ ref: $latest
714
+ target: .avanti.yml
715
+ yaml:
716
+ arrays: concat # file lists from all snippets are concatenated
717
+ conflicts: last_wins
718
+ ```
719
+
720
+ Each team controls what they publish and when they cut a release. The YAML-merged config self-updates on every pull — add a snippet source to opt into a new package, remove it to opt out. `avanti diff` shows exactly what would change before you apply any update.
721
+
600
722
  ### Composable AI Agent Instructions (CLAUDE.md / AGENTS.md)
601
723
 
602
724
  Assemble agent instruction files from multiple sources: a static header defined inline, team-specific rules from a shared GitLab repo, and company-wide standards from GitHub — all merged into one file. Every developer runs `avanti pull` and stays in sync without copy-paste drift across dozens of repos.
@@ -814,25 +936,44 @@ for dir in services/*/; do
814
936
  done
815
937
  ```
816
938
 
817
- ### Docker Compose Layering
939
+ ### Docker Compose from Upstream Sources
818
940
 
819
- Maintain a shared `docker-compose.yml` in a central repo and let each project layer its own overrides on top. A `avanti pull` merges them into a single ready-to-run file no manual copy-paste, no diverging base definitions.
941
+ Many open source projects ship example `docker-compose.yml` files. Pull them directly from their repos, merge them into a single file, and use `replace` rules to substitute placeholder values no forking, no copy-paste, no drift.
942
+
943
+ This example assembles a self-hosted [n8n](https://github.com/n8n-io/n8n-hosting/blob/main/docker-caddy/docker-compose.yml) workflow automation stack: n8n and Caddy as the reverse proxy, backed by [Postgres](https://github.com/docker-library/docs/blob/master/postgres/compose.yaml).
820
944
 
821
945
  ```yaml
946
+ variables:
947
+ n8n_version: 1.94.1
948
+ domain: n8n.example.com
949
+ db_password: changeme
950
+
822
951
  files:
823
952
  - src:
824
953
  - github:
825
- repo: org/platform
826
- file: docker/compose-base.yml # shared service definitions and networks
954
+ repo: n8n-io/n8n-hosting
955
+ file: docker-caddy/docker-compose.yml
827
956
  ref: main
828
- - ./docker-compose.override.yml # project-specific ports, volumes, env vars
829
- target: ./docker-compose.yml
957
+ - github:
958
+ repo: docker-library/docs
959
+ file: postgres/compose.yaml
960
+ ref: master
961
+ target: docker-compose.yml
962
+ replace:
963
+ - from: '${N8N_VERSION}'
964
+ to: $n8n_version # pin version at pull time
965
+ - from: '${SUBDOMAIN}.${DOMAIN_NAME}'
966
+ to: $domain # flatten two-part domain into one value
967
+ - from: 'POSTGRES_PASSWORD: example'
968
+ to: 'POSTGRES_PASSWORD: $db_password'
830
969
  yaml:
831
- conflicts: last_wins # local overrides win
832
- arrays: concat # environment and volumes lists are appended, not replaced
970
+ conflicts: last_wins
971
+ arrays: concat # environment lists are appended, not replaced
833
972
  ```
834
973
 
835
- The base file defines the canonical service images, healthchecks, and network topology. Each project's override only declares what differs a different port, an extra volume mount, a local build context. Comments from both files survive in the merged output, so the generated `docker-compose.yml` stays readable and self-documenting.
974
+ YAML merge combines both files' `services` blocks into a single `docker-compose.yml`. The `replace` rules fix the postgres placeholder password and bake in your domain and version before the file is written. The remaining `${...}` placeholders in the n8n compose (`DATA_FOLDER`, `GENERIC_TIMEZONE`, `RUNNERS_AUTH_TOKEN`) are resolved by Docker Compose itself at runtime from a `.env` file, so they pass through unchanged.
975
+
976
+ Run `avanti pull` whenever either upstream file updates — your customizations stay in the config, not in a fork.
836
977
 
837
978
  ### Developer Onboarding Bootstrap
838
979
 
@@ -950,81 +1091,6 @@ The config format is `github:owner/repo:path/to/file.yml[@ref]` and `gitlab:grou
950
1091
 
951
1092
  This scales to any number of machines or containers. Update the central repo once; every client picks up the change on its next pull. No config drift, no manual distribution.
952
1093
 
953
- ### Avanti as a Package Manager
954
-
955
- Think of avanti like `package.json` — your config declares what you consume and where, and each source repo is a "package" that owns its files. Adding a dependency means adding entries; updating means running `avanti pull`. Teams publish their own snippets; projects compose from them.
956
-
957
- ```yaml
958
- # .avanti.yml — pulling from multiple upstream "packages"
959
- variables:
960
- frontend_standards: myorg/frontend-standards
961
- platform: myorg/platform-templates
962
- standards_ref: $latest
963
-
964
- files:
965
- # "package": frontend team standards
966
- - src:
967
- github:
968
- repo: $frontend_standards
969
- file: eslint.config.js
970
- ref: $standards_ref
971
- target: eslint.config.js
972
-
973
- - src:
974
- github:
975
- repo: $frontend_standards
976
- file: .prettierrc
977
- ref: $standards_ref
978
- target: .prettierrc
979
-
980
- # "package": platform team CI templates
981
- - src:
982
- github:
983
- repo: $platform
984
- file: workflows/test.yml
985
- ref: $standards_ref
986
- target: .github/workflows/test.yml
987
-
988
- - src:
989
- github:
990
- repo: $platform
991
- file: workflows/deploy.yml
992
- ref: $standards_ref
993
- target: .github/workflows/deploy.yml
994
- ```
995
-
996
- The two patterns compose naturally. Each team publishes its own avanti snippet alongside the files it owns. A central config pulls in those snippets and merges them into the canonical config that all clients self-manage:
997
-
998
- ```yaml
999
- # myorg/devtools — avanti.yml assembled from team snippets
1000
- files:
1001
- # Self-update
1002
- - src:
1003
- github:
1004
- repo: myorg/devtools
1005
- file: avanti.yml
1006
- ref: $latest
1007
- target: ~/.avanti.yml
1008
-
1009
- # Snippet contributed by the frontend team
1010
- - src:
1011
- github:
1012
- repo: myorg/frontend-standards
1013
- file: avanti-snippet.yml # their entries live here
1014
- ref: $latest
1015
- target: /tmp/avanti-snippets/frontend.yml
1016
-
1017
- # Snippet contributed by the platform team
1018
- - src:
1019
- github:
1020
- repo: myorg/platform-templates
1021
- file: avanti-snippet.yml
1022
- ref: $latest
1023
- target: /tmp/avanti-snippets/platform.yml
1024
- ```
1025
-
1026
- Each team controls what they publish and when they cut a new release. Projects opt in by referencing the snippet. `avanti diff` shows exactly what would change before you apply any update — the same safety you get with a lockfile review in npm or Cargo.
1027
-
1028
1094
  ## Exit Codes
1029
1095
 
1030
1096
  | Code | Meaning |
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/commands/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,UAAU,IAAI,OAAO,CAqBpC"}
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/commands/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,UAAU,IAAI,OAAO,CAwBpC"}
@@ -38,7 +38,7 @@ function logCommand() {
38
38
  const workingDir = rawWorkingDir
39
39
  ? path.resolve(rawWorkingDir)
40
40
  : process.cwd();
41
- const history = new history_1.HistoryManager(configPath, workingDir);
41
+ const history = new history_1.HistoryManager((0, config_1.normalizeConfigKey)(configPath), workingDir);
42
42
  if (file !== undefined) {
43
43
  showFileHistory(history, file, workingDir);
44
44
  }
@@ -81,7 +81,7 @@ function showFileHistory(history, filePath, workingDir) {
81
81
  const vLabel = `v${v.version}`;
82
82
  const ts = v.pulledAt
83
83
  ? formatTimestamp(v.pulledAt)
84
- : '— ';
84
+ : '— ';
85
85
  const pullRef = v.pullId ? `pull ${v.pullId.slice(0, 8)}` : '— ';
86
86
  let suffix = '';
87
87
  if (v.version === fileHistory.currentVersion)
@@ -94,7 +94,11 @@ function showFileHistory(history, filePath, workingDir) {
94
94
  function formatTimestamp(iso) {
95
95
  const d = new Date(iso);
96
96
  const pad = (n) => String(n).padStart(2, '0');
97
+ const offsetMin = -d.getTimezoneOffset();
98
+ const sign = offsetMin >= 0 ? '+' : '-';
99
+ const absMin = Math.abs(offsetMin);
100
+ const tz = `${sign}${pad(Math.floor(absMin / 60))}:${pad(absMin % 60)}`;
97
101
  return (`${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ` +
98
- `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`);
102
+ `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())} ${tz}`);
99
103
  }
100
104
  //# sourceMappingURL=log.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/commands/log.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,2CAA6B;AAC7B,sCAA8C;AAC9C,wCAA4C;AAE5C,SAAgB,UAAU;IACxB,OAAO,IAAI,mBAAO,CAAC,KAAK,CAAC;SACtB,WAAW,CAAC,2CAA2C,CAAC;SACxD,QAAQ,CA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AAE,IAAI,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG;QAClE,GAAG,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAC3E,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../src/commands/reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,YAAY,IAAI,OAAO,CAqFtC"}
1
+ {"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../src/commands/reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,YAAY,IAAI,OAAO,CAwFtC"}
@@ -42,7 +42,7 @@ function resetCommand() {
42
42
  const workingDir = rawWorkingDir
43
43
  ? path.resolve(rawWorkingDir)
44
44
  : process.cwd();
45
- const history = new history_1.HistoryManager(configPath, workingDir);
45
+ const history = new history_1.HistoryManager((0, config_1.normalizeConfigKey)(configPath), workingDir);
46
46
  if (!history.hasHistory()) {
47
47
  console.log('No avanti history found. Nothing to reset.');
48
48
  process.exit(0);
@@ -1 +1 @@
1
- {"version":3,"file":"reset.js","sourceRoot":"","sources":["../../src/commands/reset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,2CAA6B;AAC7B,sCAA8C;AAC9C,wCAA4C;AAC5C,kCAAqE;AACrE,sCAAqD;AACrD,sCAAoC;AAGpC,SAAgB,YAAY;IAC1B,OAAO,IAAI,mBAAO,CAAC,OAAO,CAAC;SACxB,WAAW,CACV,oFAAoF,CACrF;SACA,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D,oCAwFC"}
@@ -1 +1 @@
1
- {"version":3,"file":"revert.d.ts","sourceRoot":"","sources":["../../src/commands/revert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,aAAa,IAAI,OAAO,CAsJvC"}
1
+ {"version":3,"file":"revert.d.ts","sourceRoot":"","sources":["../../src/commands/revert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,aAAa,IAAI,OAAO,CAyJvC"}
@@ -43,7 +43,7 @@ function revertCommand() {
43
43
  const workingDir = rawWorkingDir
44
44
  ? path.resolve(rawWorkingDir)
45
45
  : process.cwd();
46
- const history = new history_1.HistoryManager(configPath, workingDir);
46
+ const history = new history_1.HistoryManager((0, config_1.normalizeConfigKey)(configPath), workingDir);
47
47
  if (!history.hasHistory()) {
48
48
  console.error('No history found. Run avanti pull first.');
49
49
  process.exit(2);
@@ -1 +1 @@
1
- {"version":3,"file":"revert.js","sourceRoot":"","sources":["../../src/commands/revert.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,2CAA6B;AAC7B,sCAA8C;AAC9C,wCAA4C;AAC5C,kCAAqE;AACrE,sCAAqD;AACrD,sCAAoC;AAGpC,SAAgB,aAAa;IAC3B,OAAO,IAAI,mBAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,CACV,8FAA8F,CAC/F;SACA,QAAQ,CACP,UAAU,EACV,sDAAsD,CACvD;SACA,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC;SAC/C,MAAM,CACL,KAAK,EAAE,MAA0B,EAAE,OAAgB,EAAE,GAAY,EAAE,EAAE;QACnE,MAAM,IAAI,GAAG,OAA4B,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAClC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,MAA4B,CAChD,CAAC;QACF,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;QACzC,MAAM,KAAK,GACT,MAAM,KAAK,SAAS;YAClB,CAAC,CAAC,sBAAsB,OAAO,GAAG;YAClC,CAAC,CAAC,iCAAiC,OAAO,EAAE,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC;QAC3B,IAAA,iBAAU,EAAC,KAAK,CAAC,CAAC;QAElB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC;QAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,EAAE,GAAG,MAAM,IAAA,gBAAO,EAAC,eAAe,CAAC,CAAC;YAC1C,IAAI,CAAC,EAAE,EAAE,CAAC;gBACR,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QAED,IAAI,CAAC;YACH,IAAA,oBAAW,EAAC,YAAY,EAAE,SAAS,CAAC,CAAC;YACrC,OAAO,CAAC,GAAG,CACT,YAAY,YAAY,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,WAAW,CAC9D,CAAC;QACJ,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,OAAO,CAAC,KAAK,CAAC,kBAAmB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CACF,CAAC;AACN,CAAC;AAzJD,sCAyJC"}
package/dist/config.js CHANGED
@@ -368,71 +368,37 @@ function isExecSrc(src) {
368
368
  function isRawSrc(src) {
369
369
  return typeof src === 'object' && 'raw' in src;
370
370
  }
371
- function parseJsonMergeOptions(raw, i) {
371
+ function parseMergeOptions(raw, i, kind, conflictValues, arrayValues, objectValues) {
372
372
  if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
373
- throw new Error(`files[${i}]: "json" must be an object`);
373
+ throw new Error(`files[${i}]: "${kind}" must be an object`);
374
374
  }
375
375
  const obj = raw;
376
376
  const opts = {};
377
- const conflictValues = [
378
- 'abort',
379
- 'first_wins',
380
- 'last_wins',
381
- ];
382
377
  if (obj['conflicts'] !== undefined) {
383
378
  if (!conflictValues.includes(obj['conflicts'])) {
384
- throw new Error(`files[${i}].json.conflicts: must be one of ${conflictValues.join(', ')}`);
379
+ throw new Error(`files[${i}].${kind}.conflicts: must be one of ${conflictValues.join(', ')}`);
385
380
  }
386
381
  opts.conflicts = obj['conflicts'];
387
382
  }
388
- const arrayValues = ['replace', 'concat'];
389
383
  if (obj['arrays'] !== undefined) {
390
384
  if (!arrayValues.includes(obj['arrays'])) {
391
- throw new Error(`files[${i}].json.arrays: must be one of ${arrayValues.join(', ')}`);
385
+ throw new Error(`files[${i}].${kind}.arrays: must be one of ${arrayValues.join(', ')}`);
392
386
  }
393
387
  opts.arrays = obj['arrays'];
394
388
  }
395
- const objectValues = ['replace', 'merge'];
396
389
  if (obj['objects'] !== undefined) {
397
390
  if (!objectValues.includes(obj['objects'])) {
398
- throw new Error(`files[${i}].json.objects: must be one of ${objectValues.join(', ')}`);
391
+ throw new Error(`files[${i}].${kind}.objects: must be one of ${objectValues.join(', ')}`);
399
392
  }
400
393
  opts.objects = obj['objects'];
401
394
  }
402
395
  return opts;
403
396
  }
397
+ function parseJsonMergeOptions(raw, i) {
398
+ return parseMergeOptions(raw, i, 'json', ['abort', 'first_wins', 'last_wins'], ['replace', 'concat'], ['replace', 'merge']);
399
+ }
404
400
  function parseYamlMergeOptions(raw, i) {
405
- if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
406
- throw new Error(`files[${i}]: "yaml" must be an object`);
407
- }
408
- const obj = raw;
409
- const opts = {};
410
- const conflictValues = [
411
- 'abort',
412
- 'first_wins',
413
- 'last_wins',
414
- ];
415
- if (obj['conflicts'] !== undefined) {
416
- if (!conflictValues.includes(obj['conflicts'])) {
417
- throw new Error(`files[${i}].yaml.conflicts: must be one of ${conflictValues.join(', ')}`);
418
- }
419
- opts.conflicts = obj['conflicts'];
420
- }
421
- const arrayValues = ['replace', 'concat'];
422
- if (obj['arrays'] !== undefined) {
423
- if (!arrayValues.includes(obj['arrays'])) {
424
- throw new Error(`files[${i}].yaml.arrays: must be one of ${arrayValues.join(', ')}`);
425
- }
426
- opts.arrays = obj['arrays'];
427
- }
428
- const objectValues = ['replace', 'merge'];
429
- if (obj['objects'] !== undefined) {
430
- if (!objectValues.includes(obj['objects'])) {
431
- throw new Error(`files[${i}].yaml.objects: must be one of ${objectValues.join(', ')}`);
432
- }
433
- opts.objects = obj['objects'];
434
- }
435
- return opts;
401
+ return parseMergeOptions(raw, i, 'yaml', ['abort', 'first_wins', 'last_wins'], ['replace', 'concat'], ['replace', 'merge']);
436
402
  }
437
403
  function parseReplaceRule(r, i, j) {
438
404
  if (!r || typeof r !== 'object' || Array.isArray(r)) {