@udondan/avanti 0.12.0 → 0.13.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.
Files changed (75) hide show
  1. package/README.md +161 -87
  2. package/dist/cli.js +2 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/diff.d.ts.map +1 -1
  5. package/dist/commands/diff.js +7 -0
  6. package/dist/commands/diff.js.map +1 -1
  7. package/dist/commands/lock.d.ts +3 -0
  8. package/dist/commands/lock.d.ts.map +1 -0
  9. package/dist/commands/lock.js +103 -0
  10. package/dist/commands/lock.js.map +1 -0
  11. package/dist/commands/log.d.ts.map +1 -1
  12. package/dist/commands/log.js +37 -3
  13. package/dist/commands/log.js.map +1 -1
  14. package/dist/commands/pull.d.ts.map +1 -1
  15. package/dist/commands/pull.js +126 -15
  16. package/dist/commands/pull.js.map +1 -1
  17. package/dist/commands/reset.d.ts.map +1 -1
  18. package/dist/commands/reset.js +1 -1
  19. package/dist/commands/reset.js.map +1 -1
  20. package/dist/commands/revert.d.ts.map +1 -1
  21. package/dist/commands/revert.js +1 -1
  22. package/dist/commands/revert.js.map +1 -1
  23. package/dist/config-writeback.d.ts +12 -0
  24. package/dist/config-writeback.d.ts.map +1 -0
  25. package/dist/config-writeback.js +183 -0
  26. package/dist/config-writeback.js.map +1 -0
  27. package/dist/config.d.ts.map +1 -1
  28. package/dist/config.js +53 -47
  29. package/dist/config.js.map +1 -1
  30. package/dist/fetch.d.ts +3 -0
  31. package/dist/fetch.d.ts.map +1 -1
  32. package/dist/fetch.js +6 -5
  33. package/dist/fetch.js.map +1 -1
  34. package/dist/history.d.ts +9 -1
  35. package/dist/history.d.ts.map +1 -1
  36. package/dist/history.js +21 -15
  37. package/dist/history.js.map +1 -1
  38. package/dist/processors/post.js +1 -1
  39. package/dist/processors/post.js.map +1 -1
  40. package/dist/sha.d.ts +2 -0
  41. package/dist/sha.d.ts.map +1 -0
  42. package/dist/sha.js +32 -0
  43. package/dist/sha.js.map +1 -0
  44. package/dist/sources/bitbucket.d.ts.map +1 -1
  45. package/dist/sources/bitbucket.js +8 -6
  46. package/dist/sources/bitbucket.js.map +1 -1
  47. package/dist/sources/git.js +1 -1
  48. package/dist/sources/git.js.map +1 -1
  49. package/dist/sources/github.d.ts.map +1 -1
  50. package/dist/sources/github.js +44 -36
  51. package/dist/sources/github.js.map +1 -1
  52. package/dist/sources/gitlab.d.ts.map +1 -1
  53. package/dist/sources/gitlab.js +5 -3
  54. package/dist/sources/gitlab.js.map +1 -1
  55. package/dist/sources/index.d.ts +7 -0
  56. package/dist/sources/index.d.ts.map +1 -1
  57. package/dist/sources/index.js +154 -97
  58. package/dist/sources/index.js.map +1 -1
  59. package/dist/sources/local.d.ts.map +1 -1
  60. package/dist/sources/local.js +5 -1
  61. package/dist/sources/local.js.map +1 -1
  62. package/dist/sources/s3.js +1 -1
  63. package/dist/sources/s3.js.map +1 -1
  64. package/dist/sources/vault.js +1 -1
  65. package/dist/sources/vault.js.map +1 -1
  66. package/dist/types.d.ts +13 -1
  67. package/dist/types.d.ts.map +1 -1
  68. package/dist/variables.d.ts +1 -0
  69. package/dist/variables.d.ts.map +1 -1
  70. package/dist/variables.js +27 -1
  71. package/dist/variables.js.map +1 -1
  72. package/dist/writer.d.ts.map +1 -1
  73. package/dist/writer.js +18 -12
  74. package/dist/writer.js.map +1 -1
  75. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # avanti
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)
@@ -37,7 +38,6 @@ Assemble local files from any source via a declarative YAML spec.
37
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
 
@@ -79,15 +79,16 @@ npx @udondan/avanti --help
79
79
  avanti [options] [command]
80
80
 
81
81
  Options:
82
- -c, --config <path|url> path or remote spec for config file (default: auto-detected)
83
- -w, --working-dir <path> working directory for resolving paths (default: current directory)
82
+ -c, --config <path|url> path or remote spec for config file (default: auto-detected)
83
+ -w, --working-dir <path> working directory for resolving paths (default: current directory)
84
84
 
85
85
  Commands:
86
- diff [pullId] Show diff between remote sources and local files, or vs a past pull
87
- pull [--yes] Pull remote sources and write to local files
88
- log [file] Show pull history for the current project
89
- revert [pullId] [--yes] Atomically revert all project files to a past pull state
90
- reset [--yes] Restore all tracked files to their pre-avanti state
86
+ diff [pullId] Show diff between remote sources and local files, or vs a past pull
87
+ pull [--yes] [--accept-changes] Pull remote sources and write to local files
88
+ lock [--force] Pin SHA values for all remote sources in the config
89
+ log [file] Show pull history for the current project
90
+ revert [pullId] [--yes] Atomically revert all project files to a past pull state
91
+ reset [--yes] Restore all tracked files to their pre-avanti state
91
92
  ```
92
93
 
93
94
  ### `avanti diff`
@@ -98,8 +99,35 @@ Shows a colored git-diff-like output of what would change. Exits `0` if no chang
98
99
 
99
100
  Fetches all sources, shows the diff, and prompts for confirmation before writing. Use `--yes` to skip the prompt.
100
101
 
102
+ If any source has a `sha` field and the fetched content's SHA no longer matches, the pull is aborted with a mismatch error. Use `--accept-changes` to review the diff, confirm, and automatically update the SHA values in the config file.
103
+
101
104
  When avanti has previously synced a directory from a remote source and a file is no longer present in that source, the file is treated as stale: if avanti created it, it is deleted; if it existed before avanti first touched it, the original content is restored. Stale file changes appear in the diff before you confirm.
102
105
 
106
+ ### `avanti lock`
107
+
108
+ Fetches all remote sources and writes a SHA-256 fingerprint for each one into the config file. Comments and formatting are preserved.
109
+
110
+ ```sh
111
+ avanti lock # pin all unpinned remote sources
112
+ avanti lock --force # overwrite existing SHA values with fresh ones
113
+ ```
114
+
115
+ Once a source is pinned, `avanti pull` will verify the fetched content's SHA before applying any changes. If the upstream changed unexpectedly, avanti aborts with a clear error pointing to the affected source:
116
+
117
+ ```text
118
+ SHA mismatch for github:org/standards:company-rules.md
119
+ expected: abc123...
120
+ got: def456...
121
+
122
+ Run `avanti pull --accept-changes` to review the diff and update SHA values.
123
+ ```
124
+
125
+ `avanti diff` shows a `⚠ SHA mismatch` warning inline for any source that no longer matches its pinned SHA.
126
+
127
+ SHA is computed over the raw fetched content of each source, before any `replace` or `post` processing. Each file's path and content are fed into the hash in sorted order, separated by null bytes — so renames and additions affect the fingerprint even for single-file sources. Pull history records the observed SHA for every source, so `avanti log` shows a full audit trail of what changed and when.
128
+
129
+ Excluded from SHA pinning: local paths and `raw:` sources (their content is either authored locally or inline in the config, so changes are always visible).
130
+
103
131
  ## History
104
132
 
105
133
  Every successful `avanti pull` that writes at least one file is recorded in a local history store. This lets you inspect what changed, preview past states, revert the whole project, or fully undo all avanti changes.
@@ -287,27 +315,34 @@ src: ~/templates/file.txt
287
315
  src: /absolute/path/file.txt
288
316
  ```
289
317
 
290
- **Map** — for exec, gitlab, github, bitbucket, git, s3, vault, raw:
318
+ **Map** — for exec, gitlab, github, bitbucket, git, s3, vault, http, raw:
291
319
 
292
320
  ```yaml
293
321
  src:
294
322
  exec: <shell command> # stdout becomes file content; target required
323
+ sha: abc123... # optional SHA-256 to verify stdout (see below)
295
324
 
296
325
  src:
297
326
  raw: | # inline content; target required
298
327
  your content here
299
328
 
329
+ src:
330
+ http: https://example.com/file.txt # explicit http/https URL with optional SHA
331
+ sha: abc123...
332
+
300
333
  src:
301
334
  gitlab:
302
335
  project: group/repo # GitLab project path
303
336
  file: path/to/file.txt # file or directory in repo
304
337
  ref: main # branch, tag, or $latest (optional)
338
+ sha: abc123... # optional SHA-256 fingerprint
305
339
 
306
340
  src:
307
341
  github:
308
342
  repo: owner/repo # GitHub owner/repo
309
343
  file: path/to/file.txt # file or directory in repo
310
344
  ref: main # branch, tag, or $latest (optional)
345
+ sha: abc123... # optional SHA-256 fingerprint
311
346
 
312
347
  src:
313
348
  bitbucket:
@@ -315,22 +350,32 @@ src:
315
350
  repo: my-repo # repository slug
316
351
  file: path/to/file.txt # file or directory in repo
317
352
  ref: main # branch, tag, or $latest (optional)
353
+ sha: abc123... # optional SHA-256 fingerprint
318
354
 
319
355
  src:
320
356
  git:
321
357
  repo: https://github.com/org/repo.git # any git remote (HTTPS or SSH)
322
358
  file: path/to/file.txt # file or directory in repo
323
359
  ref: main # branch, tag, or commit hash (optional)
360
+ sha: abc123... # optional SHA-256 fingerprint
324
361
 
325
362
  src:
326
363
  s3: s3://my-bucket/path/to/file.txt # S3 URI; end with / for a prefix sync
364
+ sha: abc123... # optional SHA-256 fingerprint
327
365
 
328
366
  src:
329
367
  vault:
330
368
  path: secret/myapp/config # Vault KV path (mount/subpath)
331
369
  field: db_password # specific field to extract (optional; omit for full JSON)
370
+ sha: abc123... # optional SHA-256 fingerprint
332
371
  ```
333
372
 
373
+ #### SHA pinning
374
+
375
+ The optional `sha` field pins a source to a specific content fingerprint. When present, avanti verifies the SHA-256 of the raw fetched content matches before writing anything. This makes your config act as a selective lockfile — only sources you care about get pinned, and changes are surfaced explicitly rather than applied silently.
376
+
377
+ Use `avanti lock` to compute and write SHA values automatically. Use `avanti pull --accept-changes` to review a mismatch and update the pinned SHA. Local paths and `raw:` sources do not support `sha` (changes to those are inherently visible).
378
+
334
379
  ### Directory Sources
335
380
 
336
381
  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.
@@ -568,6 +613,19 @@ Variables are resolved in every string field: `target`, `ref`, `exec` commands,
568
613
 
569
614
  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.
570
615
 
616
+ **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.
617
+
618
+ ```yaml
619
+ variables:
620
+ version: '1.0'
621
+
622
+ files:
623
+ - src:
624
+ exec: curl https://example.com/api/$version/data # expands to: curl …/'1.0'/data
625
+ target: data.json
626
+ post: sed 's/$version/replaced/g' # expands to: sed 's/'\''1.0'\''/replaced/g'
627
+ ```
628
+
571
629
  **Environment variables** use the `$env:NAME` form:
572
630
 
573
631
  ```yaml
@@ -578,7 +636,9 @@ replace:
578
636
 
579
637
  Referencing an undefined variable or a missing environment variable is an error.
580
638
 
581
- `$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.
639
+ `$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.
640
+
641
+ When `ref` is omitted, all source types (GitHub, GitLab, Bitbucket, git) resolve to the repository's default branch.
582
642
 
583
643
  ### Authentication
584
644
 
@@ -615,6 +675,95 @@ GITHUB_HOST=github.mycompany.com avanti pull
615
675
 
616
676
  ## Use Cases
617
677
 
678
+ ### Avanti as a Package Manager
679
+
680
+ 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.
681
+
682
+ 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.
683
+
684
+ **Declare dependencies** — pin versions with a variable and bump in one place to upgrade everything at once:
685
+
686
+ ```yaml
687
+ variables:
688
+ frontend_standards: myorg/frontend-standards
689
+ platform: myorg/platform-templates
690
+ standards_ref: v2.4.1 # pinned — bump here to upgrade
691
+
692
+ files:
693
+ - src:
694
+ github:
695
+ repo: $frontend_standards
696
+ file: eslint.config.js
697
+ ref: $standards_ref
698
+
699
+ - src:
700
+ github:
701
+ repo: $frontend_standards
702
+ file: .prettierrc
703
+ ref: $standards_ref
704
+
705
+ - src:
706
+ github:
707
+ repo: $platform
708
+ file: workflows/test.yml
709
+ ref: $standards_ref
710
+ target: .github/workflows/test.yml
711
+
712
+ - src:
713
+ github:
714
+ repo: $platform
715
+ file: workflows/deploy.yml
716
+ ref: $standards_ref
717
+ target: .github/workflows/deploy.yml
718
+ ```
719
+
720
+ **Review and apply upgrades** — the same workflow as reading a lockfile diff before committing:
721
+
722
+ ```sh
723
+ # Bump standards_ref: v2.4.1 → v2.5.0, then:
724
+ avanti diff # see every file that would change
725
+ avanti pull # apply after review
726
+ avanti revert # roll back instantly if something breaks
727
+ ```
728
+
729
+ **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:
730
+
731
+ ```yaml
732
+ # myorg/frontend-standards:avanti-snippet.yml — published alongside eslint.config.js, .prettierrc, etc.
733
+ files:
734
+ - src:
735
+ github:
736
+ repo: myorg/frontend-standards
737
+ file: eslint.config.js
738
+ ref: $latest
739
+
740
+ - src:
741
+ github:
742
+ repo: myorg/frontend-standards
743
+ file: .prettierrc
744
+ ref: $latest
745
+ ```
746
+
747
+ ```yaml
748
+ # .avanti.yml — assembled from team snippets via YAML merge
749
+ files:
750
+ - src:
751
+ - github:
752
+ repo: myorg/frontend-standards
753
+ file: avanti-snippet.yml
754
+ ref: $latest
755
+ - github:
756
+ repo: myorg/platform-templates
757
+ file: avanti-snippet.yml
758
+ ref: $latest
759
+ target: .avanti.yml
760
+ yaml:
761
+ arrays: concat # file lists from all snippets are concatenated
762
+ conflicts: last_wins
763
+ ```
764
+
765
+ 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.
766
+
618
767
  ### Composable AI Agent Instructions (CLAUDE.md / AGENTS.md)
619
768
 
620
769
  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.
@@ -987,81 +1136,6 @@ The config format is `github:owner/repo:path/to/file.yml[@ref]` and `gitlab:grou
987
1136
 
988
1137
  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.
989
1138
 
990
- ### Avanti as a Package Manager
991
-
992
- 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.
993
-
994
- ```yaml
995
- # .avanti.yml — pulling from multiple upstream "packages"
996
- variables:
997
- frontend_standards: myorg/frontend-standards
998
- platform: myorg/platform-templates
999
- standards_ref: $latest
1000
-
1001
- files:
1002
- # "package": frontend team standards
1003
- - src:
1004
- github:
1005
- repo: $frontend_standards
1006
- file: eslint.config.js
1007
- ref: $standards_ref
1008
- target: eslint.config.js
1009
-
1010
- - src:
1011
- github:
1012
- repo: $frontend_standards
1013
- file: .prettierrc
1014
- ref: $standards_ref
1015
- target: .prettierrc
1016
-
1017
- # "package": platform team CI templates
1018
- - src:
1019
- github:
1020
- repo: $platform
1021
- file: workflows/test.yml
1022
- ref: $standards_ref
1023
- target: .github/workflows/test.yml
1024
-
1025
- - src:
1026
- github:
1027
- repo: $platform
1028
- file: workflows/deploy.yml
1029
- ref: $standards_ref
1030
- target: .github/workflows/deploy.yml
1031
- ```
1032
-
1033
- 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:
1034
-
1035
- ```yaml
1036
- # myorg/devtools — avanti.yml assembled from team snippets
1037
- files:
1038
- # Self-update
1039
- - src:
1040
- github:
1041
- repo: myorg/devtools
1042
- file: avanti.yml
1043
- ref: $latest
1044
- target: ~/.avanti.yml
1045
-
1046
- # Snippet contributed by the frontend team
1047
- - src:
1048
- github:
1049
- repo: myorg/frontend-standards
1050
- file: avanti-snippet.yml # their entries live here
1051
- ref: $latest
1052
- target: /tmp/avanti-snippets/frontend.yml
1053
-
1054
- # Snippet contributed by the platform team
1055
- - src:
1056
- github:
1057
- repo: myorg/platform-templates
1058
- file: avanti-snippet.yml
1059
- ref: $latest
1060
- target: /tmp/avanti-snippets/platform.yml
1061
- ```
1062
-
1063
- 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.
1064
-
1065
1139
  ## Exit Codes
1066
1140
 
1067
1141
  | Code | Meaning |
package/dist/cli.js CHANGED
@@ -5,6 +5,7 @@ const commander_1 = require("commander");
5
5
  const diff_1 = require("./commands/diff");
6
6
  const pull_1 = require("./commands/pull");
7
7
  const log_1 = require("./commands/log");
8
+ const lock_1 = require("./commands/lock");
8
9
  const revert_1 = require("./commands/revert");
9
10
  const reset_1 = require("./commands/reset");
10
11
  const package_json_1 = require("../package.json");
@@ -17,6 +18,7 @@ program
17
18
  .option('-w, --working-dir <path>', 'working directory for resolving relative paths (default: current directory)');
18
19
  program.addCommand((0, diff_1.diffCommand)());
19
20
  program.addCommand((0, pull_1.pullCommand)());
21
+ program.addCommand((0, lock_1.lockCommand)());
20
22
  program.addCommand((0, log_1.logCommand)());
21
23
  program.addCommand((0, revert_1.revertCommand)());
22
24
  program.addCommand((0, reset_1.resetCommand)());
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,0CAA8C;AAC9C,0CAA8C;AAC9C,wCAA4C;AAC5C,8CAAkD;AAClD,4CAAgD;AAChD,kDAA0C;AAE1C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CACV,kEAAkE,CACnE;KACA,OAAO,CAAC,sBAAO,CAAC;KAChB,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;KACpD,MAAM,CACL,0BAA0B,EAC1B,6EAA6E,CAC9E,CAAC;AAEJ,OAAO,CAAC,UAAU,CAAC,IAAA,kBAAW,GAAE,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,IAAA,kBAAW,GAAE,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,IAAA,gBAAU,GAAE,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,IAAA,sBAAa,GAAE,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,IAAA,oBAAY,GAAE,CAAC,CAAC;AAEnC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,0CAA8C;AAC9C,0CAA8C;AAC9C,wCAA4C;AAC5C,0CAA8C;AAC9C,8CAAkD;AAClD,4CAAgD;AAChD,kDAA0C;AAE1C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CACV,kEAAkE,CACnE;KACA,OAAO,CAAC,sBAAO,CAAC;KAChB,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;KACpD,MAAM,CACL,0BAA0B,EAC1B,6EAA6E,CAC9E,CAAC;AAEJ,OAAO,CAAC,UAAU,CAAC,IAAA,kBAAW,GAAE,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,IAAA,kBAAW,GAAE,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,IAAA,kBAAW,GAAE,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,IAAA,gBAAU,GAAE,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,IAAA,sBAAa,GAAE,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,IAAA,oBAAY,GAAE,CAAC,CAAC;AAEnC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -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;AAepC,wBAAgB,WAAW,IAAI,OAAO,CAyErC"}
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,wBAAgB,WAAW,IAAI,OAAO,CAkFrC"}
@@ -60,6 +60,13 @@ function diffCommand() {
60
60
  for (const entry of config.files) {
61
61
  try {
62
62
  const result = await (0, sources_1.fetchSource)(entry, workingDir, vars);
63
+ for (const rec of result.sourceRecords) {
64
+ if (!rec.matched) {
65
+ console.error(`⚠ SHA mismatch for ${rec.sourceLabel}\n` +
66
+ ` expected: ${rec.expectedSha}\n` +
67
+ ` got: ${rec.observedSha}`);
68
+ }
69
+ }
63
70
  for (const [relPath, rawContent] of result.files) {
64
71
  let content = rawContent;
65
72
  if (entry.replace?.length)
@@ -1 +1 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,2CAA6B;AAC7B,sCAA8E;AAC9E,wCAAyC;AACzC,mDAAqD;AACrD,6CAA+C;AAC/C,kCAKiB;AAEjB,wCAA4C;AAE5C,SAAgB,WAAW;IACzB,OAAO,IAAI,mBAAO,CAAC,MAAM,CAAC;SACvB,WAAW,CACV,0FAA0F,CAC3F;SACA,QAAQ,CACP,UAAU,EACV,uDAAuD,CACxD;SACA,MAAM,CACL,KAAK,EAAE,MAA0B,EAAE,QAAiB,EAAE,GAAY,EAAE,EAAE;QACpE,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAClC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,MAA4B,CAChD,CAAC;QACF,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,UAE5B,CAAC;QACd,MAAM,UAAU,GAAG,aAAa;YAC9B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YAC7B,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAElB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,kBAAkB,CAChB,MAAM,EACN,IAAA,2BAAkB,EAAC,UAAU,CAAC,EAC9B,UAAU,CACX,CAAC;YACF,OAAO;QACT,CAAC;QAED,IAAI,MAAM,CAAC;QACX,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,IAAA,mBAAU,EAAC,UAAU,CAAC,CAAC;QACxC,CAAC;QAAC,OAAO,GAAY,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AAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,KAAK,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC;QACnD,MAAM,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACrE,IAAI,iBAAiB,KAAK,IAAI;YAAE,SAAS;QACzC,KAAK,CAAC,IAAI,CAAC,IAAA,kBAAW,EAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,oFAAoF;IACpF,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAC9C,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/C,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;YAAE,SAAS;QACnD,sEAAsE;QACtE,KAAK,CAAC,IAAI,CAAC,IAAA,wBAAiB,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,IAAA,iBAAU,EAAC,KAAK,CAAC,CAAC;IAClB,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function lockCommand(): Command;
3
+ //# sourceMappingURL=lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/commands/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,WAAW,IAAI,OAAO,CAkFrC"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.lockCommand = void 0;
27
+ const commander_1 = require("commander");
28
+ const path = __importStar(require("path"));
29
+ const config_1 = require("../config");
30
+ const sources_1 = require("../sources");
31
+ const config_writeback_1 = require("../config-writeback");
32
+ function lockCommand() {
33
+ return new commander_1.Command('lock')
34
+ .description('Compute and pin SHA values for all remote sources in the config')
35
+ .option('--force', 'overwrite existing SHA values')
36
+ .action(async (options, cmd) => {
37
+ const opts = options;
38
+ const configPath = (0, config_1.resolveConfigPath)(cmd.parent?.opts().config);
39
+ const rawWorkingDir = cmd.parent?.opts().workingDir;
40
+ const workingDir = rawWorkingDir
41
+ ? path.resolve(rawWorkingDir)
42
+ : process.cwd();
43
+ if ((0, config_1.isRemoteConfigSpec)(configPath)) {
44
+ console.error('avanti lock requires a local config file.');
45
+ process.exit(2);
46
+ }
47
+ let config;
48
+ try {
49
+ config = await (0, config_1.loadConfig)(configPath);
50
+ }
51
+ catch (err) {
52
+ console.error(err.message);
53
+ process.exit(2);
54
+ }
55
+ const vars = config.variables ?? {};
56
+ const toPin = new Map(); // label → sha
57
+ let hasError = false;
58
+ let remoteSourceCount = 0;
59
+ for (const entry of config.files) {
60
+ try {
61
+ const result = await (0, sources_1.fetchSource)(entry, workingDir, vars);
62
+ remoteSourceCount += result.sourceRecords.length;
63
+ for (const rec of result.sourceRecords) {
64
+ if (!opts.force && rec.expectedSha !== undefined)
65
+ continue;
66
+ toPin.set(rec.sourceLabel, rec.observedSha);
67
+ }
68
+ }
69
+ catch (err) {
70
+ console.error(`Error processing ${JSON.stringify(entry.src)}: ${err.message}`);
71
+ hasError = true;
72
+ }
73
+ }
74
+ if (toPin.size === 0) {
75
+ if (hasError)
76
+ process.exit(2);
77
+ if (remoteSourceCount === 0) {
78
+ console.log('No SHA-pinnable remote sources found in config.');
79
+ }
80
+ else {
81
+ console.log('All remote sources already have SHA values pinned. Use --force to overwrite.');
82
+ }
83
+ process.exit(0);
84
+ }
85
+ if (hasError) {
86
+ console.error('Aborting: one or more sources failed to fetch. No changes written.');
87
+ process.exit(2);
88
+ }
89
+ const pinned = (0, config_writeback_1.writeUpdatedShas)(configPath, toPin);
90
+ if (pinned) {
91
+ for (const [label, sha] of toPin) {
92
+ console.log(` pinned ${label} ${sha.slice(0, 16)}`);
93
+ }
94
+ console.log(`\nPinned ${toPin.size} source(s).`);
95
+ }
96
+ else {
97
+ console.log('All SHA values are already up to date.');
98
+ }
99
+ process.exit(0);
100
+ });
101
+ }
102
+ exports.lockCommand = lockCommand;
103
+ //# sourceMappingURL=lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/commands/lock.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA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QAED,MAAM,MAAM,GAAG,IAAA,mCAAgB,EAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAEnD,IAAI,MAAM,EAAE,CAAC;YACX,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC;gBACjC,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YACzD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC;AAlFD,kCAkFC"}
@@ -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
  }
@@ -62,6 +62,18 @@ function showPullHistory(history) {
62
62
  for (const ref of pull.files) {
63
63
  const label = ref.wasNew ? '(new file)' : '(modified)';
64
64
  console.log(` ${ref.absolutePath} → v${ref.version} ${label}`);
65
+ if (ref.sources && ref.sources.length > 0) {
66
+ for (const s of ref.sources) {
67
+ const shaShort = s.observedSha.slice(0, 16);
68
+ if (s.accepted && s.expectedSha) {
69
+ const prevShort = s.expectedSha.slice(0, 16);
70
+ console.log(` ${s.label} sha:${shaShort} ⚠ accepted (was: ${prevShort})`);
71
+ }
72
+ else {
73
+ console.log(` ${s.label} sha:${shaShort}`);
74
+ }
75
+ }
76
+ }
65
77
  }
66
78
  console.log('');
67
79
  }
@@ -76,12 +88,14 @@ function showFileHistory(history, filePath, workingDir) {
76
88
  return;
77
89
  }
78
90
  console.log(`${absolutePath}\n`);
91
+ const pulls = history.listPulls();
92
+ const pullsById = new Map(pulls.map((p) => [p.pullId, p]));
79
93
  const versions = [...fileHistory.versions].reverse();
80
94
  for (const v of versions) {
81
95
  const vLabel = `v${v.version}`;
82
96
  const ts = v.pulledAt
83
97
  ? formatTimestamp(v.pulledAt)
84
- : '— ';
98
+ : '— ';
85
99
  const pullRef = v.pullId ? `pull ${v.pullId.slice(0, 8)}` : '— ';
86
100
  let suffix = '';
87
101
  if (v.version === fileHistory.currentVersion)
@@ -89,12 +103,32 @@ function showFileHistory(history, filePath, workingDir) {
89
103
  if (v.isOriginal)
90
104
  suffix = ' (original, before avanti)';
91
105
  console.log(` ${vLabel.padEnd(4)} ${ts} ${pullRef}${suffix}`);
106
+ if (v.pullId) {
107
+ const pullEntry = pullsById.get(v.pullId);
108
+ const fileRef = pullEntry?.files.find((f) => f.absolutePath === absolutePath && f.version === v.version);
109
+ if (fileRef?.sources && fileRef.sources.length > 0) {
110
+ for (const s of fileRef.sources) {
111
+ const shaShort = s.observedSha.slice(0, 16);
112
+ if (s.accepted && s.expectedSha) {
113
+ const prevShort = s.expectedSha.slice(0, 16);
114
+ console.log(` ${s.label} sha:${shaShort} ⚠ accepted (was: ${prevShort})`);
115
+ }
116
+ else {
117
+ console.log(` ${s.label} sha:${shaShort}`);
118
+ }
119
+ }
120
+ }
121
+ }
92
122
  }
93
123
  }
94
124
  function formatTimestamp(iso) {
95
125
  const d = new Date(iso);
96
126
  const pad = (n) => String(n).padStart(2, '0');
127
+ const offsetMin = -d.getTimezoneOffset();
128
+ const sign = offsetMin >= 0 ? '+' : '-';
129
+ const absMin = Math.abs(offsetMin);
130
+ const tz = `${sign}${pad(Math.floor(absMin / 60))}:${pad(absMin % 60)}`;
97
131
  return (`${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ` +
98
- `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`);
132
+ `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())} ${tz}`);
99
133
  }
100
134
  //# 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,CAAC,QAAQ,EAAE,0CAA0C,CAAC;SAC9D,MAAM,CAAC,CAAC,IAAwB,EAAE,QAAiB,EAAE,GAAY,EAAE,EAAE;QACpE,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAClC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,MAA4B,CAChD,CAAC;QACF,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,UAAgC,CAAC;QAC1E,MAAM,UAAU,GAAG,aAAa;YAC9B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YAC7B,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAElB,MAAM,OAAO,GAAG,IAAI,wBAAc,CAAC,UAAU,EA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MAAM,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,CAAC;IACxE,OAAO,CACL,GAAG,CAAC,CAAC,WAAW,EAAE,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":"pull.d.ts","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8DpC,wBAAgB,WAAW,IAAI,OAAO,CAoKrC"}
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmGpC,wBAAgB,WAAW,IAAI,OAAO,CAoSrC"}