valise-sh 0.2.0 → 0.3.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 (92) hide show
  1. package/CHANGELOG.md +152 -2
  2. package/README.md +99 -146
  3. package/bin/valise +57 -5376
  4. package/docs/architecture.md +77 -121
  5. package/docs/contrib-modules.md +172 -218
  6. package/docs/installation.md +137 -83
  7. package/docs/module-abi.md +125 -126
  8. package/docs/projects.md +249 -0
  9. package/docs/release-policy.md +68 -93
  10. package/docs/shared-modules.md +40 -39
  11. package/examples/README.md +12 -11
  12. package/examples/e2e/README.md +59 -66
  13. package/examples/e2e/bundles.tsv +6 -0
  14. package/examples/e2e/module.d/e2e_aliases.meta +1 -2
  15. package/examples/e2e/module.d/e2e_completions_bash.meta +0 -1
  16. package/examples/e2e/module.d/e2e_completions_zsh.meta +0 -1
  17. package/examples/e2e/module.d/e2e_env_setup.meta +2 -3
  18. package/examples/e2e/module.d/e2e_fish_features.meta +0 -1
  19. package/examples/e2e/module.d/e2e_generated_config.meta +1 -2
  20. package/examples/e2e/module.d/e2e_ksh_features.meta +0 -1
  21. package/examples/e2e/module.d/e2e_layer_probe.meta +1 -2
  22. package/examples/e2e/module.d/e2e_optional_network.meta +1 -2
  23. package/examples/e2e/module.d/e2e_platform_tools.meta +8 -0
  24. package/examples/e2e/module.d/e2e_platform_tools_bsd.meta +2 -3
  25. package/examples/e2e/module.d/e2e_platform_tools_darwin.meta +2 -3
  26. package/examples/e2e/module.d/e2e_platform_tools_linux.meta +2 -3
  27. package/examples/e2e/valise.conf +4 -0
  28. package/examples/e2e/variants.tsv +3 -0
  29. package/examples/local/module.d/hello_valise.meta +1 -2
  30. package/examples/profile-project/README.md +78 -108
  31. package/examples/profile-project/bundles.tsv +8 -0
  32. package/examples/profile-project/{shell/layers → layers}/demo/module.d/contrib_demo_greeting.meta +1 -2
  33. package/examples/profile-project/{shell/module.d → module.d}/greeting.meta +1 -2
  34. package/examples/profile-project/{shell/module.d → module.d}/profile_main.meta +0 -1
  35. package/examples/profile-project/{shell/modules → modules}/greeting.sh +1 -1
  36. package/examples/profile-project/valise.conf +4 -0
  37. package/examples/profile-project/variants.tsv +3 -0
  38. package/examples/shared/README.md +13 -34
  39. package/examples/shared/module.d/contrib_shared_paths.meta +2 -3
  40. package/examples/shared/module.d/contrib_shared_umask.meta +1 -2
  41. package/examples/shared/modules/shared/contrib_shared_paths.sh +2 -2
  42. package/lib/capabilities.sh +40 -13
  43. package/lib/cli/commands.sh +278 -0
  44. package/lib/cli/common.sh +326 -0
  45. package/lib/cli/devtools.sh +539 -0
  46. package/lib/cli/fish-hook.sh +986 -0
  47. package/lib/cli/integration.sh +337 -0
  48. package/lib/cli/lifecycle.sh +578 -0
  49. package/lib/cli/project.sh +1807 -0
  50. package/lib/cli/store.sh +1023 -0
  51. package/lib/cli/usage.sh +308 -0
  52. package/lib/compiler.awk +11 -4
  53. package/lib/fish/loader.fish +69 -9
  54. package/lib/fish/metadata.fish +49 -5
  55. package/lib/fish/profile.fish +170 -0
  56. package/lib/loader.sh +6 -8
  57. package/lib/metadata.sh +111 -5
  58. package/manifests/parser-support.tsv +2 -2
  59. package/module.d/valise_editor.meta +9 -0
  60. package/module.d/valise_history.meta +9 -0
  61. package/module.d/valise_pager.meta +9 -0
  62. package/module.d/valise_path.meta +9 -0
  63. package/module.d/{platform_bsd.meta → valise_platform_bsd.meta} +3 -4
  64. package/module.d/{platform_linux.meta → valise_platform_linux.meta} +3 -4
  65. package/module.d/{platform_macos.meta → valise_platform_macos.meta} +3 -4
  66. package/module.d/{platform_posix.meta → valise_platform_posix.meta} +2 -3
  67. package/module.d/valise_xdg.meta +9 -0
  68. package/modules/system/{contrib_editor.sh → valise_editor.sh} +2 -2
  69. package/modules/system/{contrib_history.sh → valise_history.sh} +2 -2
  70. package/modules/system/{contrib_pager.sh → valise_pager.sh} +2 -2
  71. package/modules/system/{contrib_path.sh → valise_path.sh} +3 -3
  72. package/modules/system/{contrib_xdg.sh → valise_xdg.sh} +2 -2
  73. package/package.json +91 -10
  74. package/docs/variants.md +0 -327
  75. package/entrypoints/.gitkeep +0 -0
  76. package/entrypoints/fish/profile.fish +0 -99
  77. package/examples/e2e/build-manifest.sh +0 -138
  78. package/examples/local/.gitkeep +0 -0
  79. package/examples/profile-project/shell/release/bundle-roots +0 -9
  80. package/examples/profile-project/shell/release/install-variants +0 -3
  81. package/examples/profile-project/shell/release/module-registry.tsv +0 -4
  82. package/examples/profile-project/shell/release/project.conf +0 -3
  83. package/lib/.gitkeep +0 -0
  84. package/manifests/.gitkeep +0 -0
  85. package/module.d/.gitkeep +0 -0
  86. package/module.d/contrib_editor.meta +0 -10
  87. package/module.d/contrib_history.meta +0 -10
  88. package/module.d/contrib_pager.meta +0 -10
  89. package/module.d/contrib_path.meta +0 -10
  90. package/module.d/contrib_xdg.meta +0 -10
  91. package/modules/.gitkeep +0 -0
  92. /package/examples/profile-project/{shell/layers → layers}/demo/modules/shared/contrib_demo_greeting.sh +0 -0
@@ -1,9 +1,8 @@
1
1
  name=e2e_generated_config
2
2
  requires=e2e_env_setup
3
3
  optional=
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=any
6
6
  side_effect=read-only
7
7
  exports=e2e_config_loaded
8
- updates=
9
8
  load=modules/e2e/generated_config.sh
@@ -5,5 +5,4 @@ shells=ksh
5
5
  platforms=any
6
6
  side_effect=read-only
7
7
  exports=e2e_ksh_loaded
8
- updates=
9
8
  load=modules/e2e/ksh_features.sh
@@ -1,9 +1,8 @@
1
1
  name=e2e_layer_probe
2
2
  requires=e2e_env_setup
3
3
  optional=contrib_shared_paths
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=any
6
6
  side_effect=read-only
7
7
  exports=e2e_layer_probe_ok
8
- updates=
9
8
  load=modules/e2e/layer_probe.sh
@@ -1,9 +1,8 @@
1
1
  name=e2e_optional_network
2
2
  requires=
3
3
  optional=e2e_env_setup
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=any
6
6
  side_effect=read-only
7
7
  exports=e2e_net_available
8
- updates=
9
8
  load=modules/e2e/optional_network.sh
@@ -0,0 +1,8 @@
1
+ name=e2e_platform_tools
2
+ requires=e2e_env_setup
3
+ optional=e2e_platform_tools_darwin e2e_platform_tools_linux e2e_platform_tools_bsd
4
+ shells=posix
5
+ platforms=any
6
+ side_effect=read-only
7
+ exports=
8
+ load=
@@ -1,9 +1,8 @@
1
1
  name=e2e_platform_tools_bsd
2
- requires=platform_bsd
2
+ requires=valise_platform_bsd
3
3
  optional=
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=bsd freebsd openbsd netbsd
6
6
  side_effect=read-only
7
7
  exports=e2e_bsd_tools_ready
8
- updates=
9
8
  load=modules/e2e/platform_tools_bsd.sh
@@ -1,9 +1,8 @@
1
1
  name=e2e_platform_tools_darwin
2
- requires=platform_macos
2
+ requires=valise_platform_macos
3
3
  optional=e2e_env_setup
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=darwin
6
6
  side_effect=read-only
7
7
  exports=e2e_darwin_tools_ready
8
- updates=
9
8
  load=modules/e2e/platform_tools_darwin.sh
@@ -1,9 +1,8 @@
1
1
  name=e2e_platform_tools_linux
2
- requires=platform_linux
2
+ requires=valise_platform_linux
3
3
  optional=
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=linux
6
6
  side_effect=read-only
7
7
  exports=e2e_linux_tools_ready
8
- updates=
9
8
  load=modules/e2e/platform_tools_linux.sh
@@ -0,0 +1,4 @@
1
+ # valise project configuration.
2
+ bundle=default
3
+ variant=default
4
+ requires_valise=0.3.0
@@ -0,0 +1,3 @@
1
+ variant description excluded
2
+ default Every e2e module
3
+ no-network Without the network probe e2e_optional_network
@@ -1,9 +1,8 @@
1
1
  name=hello_valise
2
2
  requires=
3
3
  optional=
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=any
6
6
  side_effect=read-only
7
7
  exports=hello_valise_loaded
8
- updates=
9
8
  load=modules/hello_valise.sh
@@ -1,40 +1,32 @@
1
- # profile-project: a complete valise project
1
+ # profile-project: a small valise project
2
2
 
3
- This is a small but complete consuming project. It shows every piece a
4
- profile project needs: metadata that describes the modules, module bodies,
5
- a provider layer contributed by somebody else, a bundle that says which
6
- roots load, a variant that says what to leave out, and project defaults.
7
-
8
- Everything here is plain text. There is no build script and no hand-written
9
- registry. `valise` reads the metadata and generates what it needs.
3
+ This project has two modules of its own, one module from a provider layer, a
4
+ bundle, and two variants. Everything is plain text; `valise` reads the
5
+ metadata and generates the rest.
10
6
 
11
7
  ## What is in it
12
8
 
13
9
  ```
14
- shell/
15
- module.d/ the project's own modules
16
- profile_main.meta the entry module
17
- greeting.meta a dependency of profile_main
18
- modules/ the bodies of those modules
19
- greeting.sh
20
- layers/demo/ a provider layer
21
- module.d/contrib_demo_greeting.meta
22
- modules/shared/contrib_demo_greeting.sh
23
- release/
24
- bundle-roots which roots load, per shell
25
- install-variants named exclusion sets
26
- project.conf defaults for build and apply
10
+ valise.conf default bundle and variant
11
+ module.d/
12
+ profile_main.meta the root: requires greeting
13
+ greeting.meta defines greet
14
+ modules/
15
+ greeting.sh
16
+ layers/demo/ a provider layer
17
+ module.d/contrib_demo_greeting.meta
18
+ modules/shared/contrib_demo_greeting.sh
19
+ bundles.tsv the roots for bash, zsh, and ksh
20
+ variants.tsv default and workstation-lean
27
21
  ```
28
22
 
29
- `profile_main` is a meta module: it has `requires=greeting` and no body of
30
- its own, so there is no `modules/profile_main.sh`. It exists only to name
31
- what the project loads. `greeting` is an ordinary module that defines
32
- `greet`.
23
+ `profile_main` is a meta module: it has `requires=greeting` and no body. It
24
+ names what the project loads. `greeting` is an ordinary module with
25
+ `shells=posix`.
33
26
 
34
- The layer under `shell/layers/demo/` is a provider layer. Its module is
35
- named `contrib_demo_greeting`, following the `contrib_<owner>_<thing>`
36
- convention, and its body lives under `layers/demo/` in the installed
37
- release, so it never collides with the project's own modules.
27
+ The layer module is named `contrib_demo_greeting`, following the
28
+ `contrib_<owner>_<thing>` convention. A release copies it to
29
+ `layers/demo/`, so it cannot collide with the project's own files.
38
30
 
39
31
  ## Build it
40
32
 
@@ -44,60 +36,38 @@ From this directory:
44
36
  valise build
45
37
  ```
46
38
 
47
- That compiles a plan for each supported shell and writes a release under
48
- `build/release/`. The release contains:
49
-
50
39
  ```
51
40
  build/release/
52
- generated/installed-modules.bash compiled plan for bash
53
- generated/installed-modules.zsh compiled plan for zsh
54
- generated/installed-modules.ksh compiled plan for ksh
55
- vendor/shell-profile/lib/capabilities.sh
56
- module.d/ the project's metadata
57
- modules/ the project's bodies
58
- layers/demo/module.d/ the layer's metadata
59
- layers/demo/modules/shared/ the layer's bodies
60
- shell/release/ registry, bundle, variants, defaults
61
- shell/install/profile-release.manifest
41
+ valise-release.conf bundle, variant, roots, modules
42
+ manifest.tsv every file with its size and SHA-256
43
+ plans/bash.sh the compiled plan for bash
44
+ plans/zsh.sh
45
+ plans/ksh.sh
46
+ runtime/capabilities.sh the sp_cap_* helpers
47
+ module.d/, modules/ the project's modules
48
+ layers/demo/ the layer module
62
49
  ```
63
50
 
64
- The plans are plain POSIX shell. You can read one to see exactly what will
65
- run.
51
+ The plans are plain POSIX shell; read one to see what will run at startup.
52
+ `bundles.tsv` has no `sh` row, so dash and other plain `sh` shells load
53
+ nothing.
66
54
 
67
55
  ## Load it
68
56
 
69
- ```sh
70
- valise apply
71
- ```
72
-
73
- `apply` builds the release, installs it under your XDG data directory, and
74
- writes a managed block into the startup files your shells read. It prints
75
- what it changed and where.
76
-
77
- The managed block is guarded by a source-once variable, so your login shell
78
- loads the profile exactly once. It prefers the compiled plan for your shell
79
- and falls back to the loader if the release has no compiled plan.
80
-
81
- zsh does not read `~/.profile` on its own, so when zsh is present `apply`
82
- writes the same managed block to `~/.zprofile`. bash reads `~/.profile` only
83
- when no `~/.bash_profile` exists; `apply` never creates one, so it does not
84
- shadow your `~/.profile`.
85
-
86
- Now open a new login shell:
57
+ Run this in a scratch `HOME` (see the main README) unless you want it in your
58
+ real startup files:
87
59
 
88
60
  ```sh
89
- bash -l
90
- greet
61
+ valise apply
62
+ bash -l -c greet
91
63
  # hello from the valise profile project
92
64
  ```
93
65
 
94
- The same works in zsh and ksh. It does not work in dash: the plans are
95
- compiled for bash, zsh and ksh, and dash is not one of them.
96
-
97
- To undo it, remove the managed block from every startup file `apply`
98
- reported.
99
-
100
- To check the current state:
66
+ `apply` builds the release, installs it under your XDG data directory, and
67
+ writes a managed block into `~/.profile`, `~/.zprofile` when zsh is
68
+ installed, and `~/.bashrc` or `~/.zshrc` when that is your shell. It prints
69
+ each file it wrote. `valise apply --dry-run` prints what it would change
70
+ without changing it.
101
71
 
102
72
  ```sh
103
73
  valise status
@@ -105,77 +75,77 @@ valise status
105
75
 
106
76
  ```
107
77
  project: /path/to/profile-project
108
- variant: default
109
- bundle: default
78
+ project default bundle: default
79
+ project default variant: default
110
80
  integration: /home/you/.profile: managed block present
111
81
  integration: /home/you/.zprofile: managed block present
112
- registry: up to date
113
- active release: 0a723dcb0860bcae3ea259c631aaa76ce8e0b4e6991448979018c1d08fc35802
114
- build output: /path/to/profile-project/build/release
82
+ active release: ad98ea2ba30bb6c6d4f08b6dec59585228cdf855b814543a37f80ee0f0518773
83
+ active bundle: default
84
+ active variant: default
85
+ active built by valise: 0.3.0
86
+ build output: /path/to/profile-project/build/release (bundle default, variant default)
115
87
  drift: active release matches build output
116
88
  ```
117
89
 
118
- `status` reports the active release, the startup files, and whether the
119
- installed release still matches what the project would build. If you edit a
120
- module and re-apply, the release changes and the drift line tells you the
121
- active release is no longer the one you built.
90
+ Edit a module and run `valise status` again after `valise build`: the drift
91
+ line reports that the active release no longer matches the build.
92
+
93
+ `valise uninstall` removes the managed blocks, the Fish hook, and the
94
+ installed releases.
122
95
 
123
96
  ## Try a variant
124
97
 
125
- The project ships two variants. `default` loads everything;
126
- `workstation-lean` leaves out the provider layer:
98
+ `workstation-lean` leaves out the layer module:
127
99
 
128
100
  ```sh
129
101
  valise explain-variant workstation-lean
130
102
  ```
131
103
 
132
- To use the lean variant, set it in `shell/release/project.conf`:
133
-
134
- ```sh
135
- variant=workstation-lean
136
104
  ```
105
+ Variant: workstation-lean
106
+ Description: No provider layer
107
+ Excluded modules: contrib_demo_greeting@layers/demo/module.d
137
108
 
138
- Then re-apply. The `contrib_demo_greeting` module disappears from the plan
139
- and the rest still loads.
140
-
141
- An exclusion that removes a module something else still depends on is an
142
- error, not a silent surprise:
143
-
144
- ```
145
- ERROR: variant exclusion breaks a required dependency: profile_main requires contrib_demo_greeting
109
+ Per-shell impact (bundle default):
110
+ bash: 1 of 2 roots, 2 of 3 modules
111
+ zsh: 1 of 2 roots, 2 of 3 modules
112
+ ksh: 1 of 2 roots, 2 of 3 modules
146
113
  ```
147
114
 
115
+ Build it with `valise apply --variant=workstation-lean`, or set
116
+ `variant=workstation-lean` in `valise.conf`. An exclusion that removes a
117
+ module something else still requires fails the build and names both
118
+ modules.
119
+
148
120
  ## Try a bundle
149
121
 
150
- `shell/release/bundle-roots` says which roots load for each shell:
122
+ `bundles.tsv` lists the roots for each shell:
151
123
 
152
124
  ```
153
- default bash profile_main contrib_demo_greeting@shell/layers/demo/module.d
125
+ default bash profile_main contrib_demo_greeting
154
126
  ```
155
127
 
156
- The first root is a bare name, meaning a module from the project's own
157
- `shell/module.d/`. The second is qualified with its source, so it is
158
- unambiguous even though it lives in a layer.
128
+ A bare name means the project's own module when there is one, otherwise the
129
+ only module with that name. `name@layers/demo/module.d` names the layer's
130
+ copy exactly, which you need when two sources define the same name.
159
131
 
160
132
  ```sh
161
133
  valise explain-bundles
162
134
  ```
163
135
 
164
- ## Check the layer
165
-
166
- A provider layer has rules: the `contrib_` prefix, a version, a body that
167
- exists, and no dependency that escapes the layer.
136
+ ## Check it
168
137
 
169
138
  ```sh
139
+ valise lint # metadata, layers, every bundle and variant, syntax
170
140
  valise layer-lint demo
171
141
  # layer demo: 1 module(s) validated
172
142
  ```
173
143
 
174
144
  ## Where to go next
175
145
 
176
- - [The module ABI](../../docs/module-abi.md) — every metadata field.
177
- - [The authoring guide](../../docs/contrib-modules.md) — writing modules.
178
- - [The compile and build contract](../../docs/variants.md) — the registry,
179
- bundles, variants, and what a compiled plan contains.
180
- - [Shared modules](../../docs/shared-modules.md) — how layer modules are
146
+ - [Projects](../../docs/projects.md): bundles, variants, compile, and build.
147
+ - [Writing modules](../../docs/contrib-modules.md): authoring, linting, and
148
+ testing.
149
+ - [The module ABI](../../docs/module-abi.md): every metadata field.
150
+ - [Shared modules](../../docs/shared-modules.md): how layer modules are
181
151
  named and owned.
@@ -0,0 +1,8 @@
1
+ bundle shell roots
2
+ # Each row names a bundle, a shell (sh bash zsh ksh fish), and the
3
+ # space-separated root modules for that shell. A bare name means the module
4
+ # in module.d/, else the only module of that name; name@layers/<p>/module.d
5
+ # names a layer module exactly.
6
+ default bash profile_main contrib_demo_greeting
7
+ default zsh profile_main contrib_demo_greeting
8
+ default ksh profile_main contrib_demo_greeting
@@ -3,8 +3,7 @@ version=1.0.0
3
3
  side_effect=read-only
4
4
  requires=
5
5
  optional=
6
- shells=sh bash zsh ksh
6
+ shells=posix
7
7
  platforms=any
8
8
  exports=contrib_demo_greeting_ready
9
- updates=
10
9
  load=modules/shared/contrib_demo_greeting.sh
@@ -3,8 +3,7 @@ version=1.0.0
3
3
  side_effect=read-only
4
4
  requires=
5
5
  optional=
6
- shells=sh bash zsh ksh
6
+ shells=posix
7
7
  platforms=any
8
8
  exports=greet
9
- updates=
10
9
  load=modules/greeting.sh
@@ -6,4 +6,3 @@ optional=
6
6
  shells=bash zsh ksh
7
7
  platforms=any
8
8
  exports=
9
- updates=
@@ -1,4 +1,4 @@
1
- # A plain POSIX module. `shells=sh` covers every POSIX shell: sh, bash,
1
+ # A plain POSIX module. `shells=posix` covers every POSIX shell: sh, bash,
2
2
  # zsh, ksh, and dash.
3
3
  greet() {
4
4
  printf '%s\n' "hello from the valise profile project"
@@ -0,0 +1,4 @@
1
+ # valise project configuration. `valise build` and `valise apply` read these
2
+ # defaults; --bundle and --variant override them.
3
+ bundle=default
4
+ variant=default
@@ -0,0 +1,3 @@
1
+ variant description excluded
2
+ default Every module in the project
3
+ workstation-lean No provider layer contrib_demo_greeting@layers/demo/module.d
@@ -9,41 +9,20 @@ be pinned to a reviewed commit in the consuming project.
9
9
 
10
10
  | Module | Version | Export | Behavior |
11
11
  |---|---|---|---|
12
- | `contrib_shared_paths` | 1.0.0 | `contrib_shared_paths_setup` | Adds `$HOME/.local/bin` and `$HOME/.go/bin` using `contrib_path_prepend`. |
12
+ | `contrib_shared_paths` | 1.0.0 | `contrib_shared_paths_setup` | Adds `$HOME/.local/bin` and `$HOME/.go/bin` using `valise_path_prepend`. |
13
13
  | `contrib_shared_umask` | 1.0.0 | `contrib_shared_umask_secure` | Sets `umask 077` when explicitly called. |
14
14
 
15
15
  The modules and their metadata are under `modules/shared/` and
16
16
  `module.d/`. Layer-only modules use the `contrib_` prefix. The paths module
17
- requires the engine's `contrib_path` module; this exercises dependency
18
- resolution from a layer into the primary module root.
19
-
20
- ## Use in the sample profile
21
-
22
- From the repository root, build the sample release and install it from the
23
- e2e directory. Installation adds an integration hook under `HOME`; use a
24
- temporary home to avoid changing your own shell startup files (see the top
25
- level README).
26
-
27
- ```sh
28
- sh examples/e2e/build-manifest.sh
29
- cd examples/e2e/build/release
30
- valise install
31
- valise release verify
32
- ```
33
-
34
- Then load the shared modules from a POSIX shell. The active release path
35
- below uses the default XDG locations; if you set `XDG_CONFIG_HOME`, use that
36
- instead.
37
-
38
- ```sh
39
- _active=$(cd "$HOME/.config/valise/active" && pwd -P)
40
- VALISE_MODULE_ROOT="$_active" \
41
- VALISE_MODULE_PATH="$_active/layer/shared" \
42
- VALISE_MODULES='e2e_layer_probe contrib_shared_umask' \
43
- VALISE_MODE=strict \
44
- . "$_active/entrypoints/profile.sh"
45
- ```
46
-
47
- For a Fish example and details about provider pinning, see
48
- [the end-to-end walkthrough](../e2e/README.md) and the
49
- [module ABI](../../docs/module-abi.md).
17
+ requires the engine's `valise_path` module; this exercises dependency
18
+ resolution from a layer into the engine's modules.
19
+
20
+ ## Use in a project
21
+
22
+ A consuming project vendors this directory as `layers/<provider>/`, for
23
+ example `layers/shared/`, and names the modules it wants in `bundles.tsv` or
24
+ in the `requires=` and `optional=` fields of its own modules. `valise build`
25
+ then copies only the provider modules some plan loads into the release under
26
+ `layers/shared/`. [The end-to-end walkthrough](../e2e/README.md) shows the
27
+ steps against the sample project; see the [module ABI](../../docs/module-abi.md)
28
+ for dependency resolution across a project and its layers.
@@ -1,10 +1,9 @@
1
1
  name=contrib_shared_paths
2
- requires=contrib_path
2
+ requires=valise_path
3
3
  optional=
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=any
6
6
  side_effect=path-env
7
7
  exports=contrib_shared_paths_setup
8
- updates=
9
8
  version=1.0.0
10
9
  load=modules/shared/contrib_shared_paths.sh
@@ -1,10 +1,9 @@
1
1
  name=contrib_shared_umask
2
2
  requires=
3
3
  optional=
4
- shells=sh bash zsh ksh
4
+ shells=posix bash zsh ksh
5
5
  platforms=any
6
6
  side_effect=work-only
7
7
  exports=contrib_shared_umask_secure
8
- updates=
9
8
  version=1.0.0
10
9
  load=modules/shared/contrib_shared_umask.sh
@@ -4,7 +4,7 @@
4
4
  # contrib_shared_paths: team-standard development directories on PATH.
5
5
  #
6
6
  # Puts $HOME/.local/bin and $HOME/.go/bin on PATH through
7
- # contrib_path_prepend (provided by the engine's contrib_path module,
7
+ # valise_path_prepend (provided by the engine's valise_path module,
8
8
  # which this module requires), keeping PATH duplicate-free. When HOME is
9
9
  # unset, nothing is added. Prints nothing and succeeds in every case.
10
10
 
@@ -12,5 +12,5 @@ contrib_shared_paths_setup() {
12
12
  if [ -z "${HOME-}" ]; then
13
13
  return 0
14
14
  fi
15
- contrib_path_prepend "$HOME/.local/bin" "$HOME/.go/bin"
15
+ valise_path_prepend "$HOME/.local/bin" "$HOME/.go/bin"
16
16
  }