@valbuild/cli 0.133.0 → 0.134.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @valbuild/cli
2
2
 
3
+ ## 0.134.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#698](https://github.com/valbuild/val/pull/698) [`15c5367`](https://github.com/valbuild/val/commit/15c536746c0f813a51a2dce8a2cb1e617174c238) Thanks [@freekh](https://github.com/freekh)! - Add `val publish`, which publishes a project's build through content.val.build.
8
+
9
+ ```sh
10
+ npx val publish # publish the artifacts in .val/publish
11
+ npx val publish --artifacts build/out # publish a directory by name
12
+ npx val publish --dry-run # verify, and stop before the site changes
13
+ ```
14
+
15
+ It declares what the build is made of — every artifact by key, sha256 and size
16
+ — uploads only the ones content does not already hold, straight to object
17
+ storage, and then has content build and render the build as a canary before
18
+ anything goes live. A build content already holds uploads nothing. A canary
19
+ that does not render is never promoted, and the command exits non-zero with
20
+ content's own problem codes, hints included, so CI gates on it. Declaring the
21
+ same build twice resumes that publish rather than starting a second one, so a
22
+ re-run of a CI job picks up where it left off.
23
+
24
+ The artifacts are read from a directory whose layout is the key namespace:
25
+ the path of each file under it is its artifact key — `server`, `client`,
26
+ `css`, `rsc`, `layer`, or a path under `chunk/server`, `chunk/client`,
27
+ `chunk/rsc`, `asset`, `public`. Nothing is renamed on the way, since an asset
28
+ is addressed by the path the built code imports it at.
29
+
30
+ Authenticates with `VAL_PROJECT_TOKEN` — the single secret a repository needs,
31
+ since the token names its project — or with the `val login` token in
32
+ `.val/pat.json`, which is exchanged for a ten minute publish token and needs
33
+ the project (`"<org>/<project>"`) in `val.config` or `VAL_PROJECT`. Never a
34
+ command line flag: an argument is visible to anyone who can list processes,
35
+ and it is kept in shell history and in the log of every CI job that echoes its
36
+ command line.
37
+
38
+ The commit and branch the build is of are taken from `--commit` / `--branch`,
39
+ then `VAL_GIT_COMMIT` / `VAL_GIT_BRANCH`, then `GITHUB_SHA` / `GITHUB_REF_NAME`,
40
+ then git. The commit is baked into the published site and decides which version
41
+ of its own content it reads, so the command refuses rather than guessing when
42
+ it cannot tell.
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [[`be78a9b`](https://github.com/valbuild/val/commit/be78a9b51678439f7ecb1c7f3887f9e8e1261a13), [`16c49ea`](https://github.com/valbuild/val/commit/16c49ea6dd97c7a96bbfdf211af9bab5884579e2), [`eaa265e`](https://github.com/valbuild/val/commit/eaa265e78d9f6d2a1b685c38901612b8a3704eed)]:
47
+ - @valbuild/server@0.134.0
48
+ - @valbuild/core@0.134.0
49
+ - @valbuild/shared@0.134.0
50
+ - @valbuild/language-server@0.134.0
51
+
3
52
  ## 0.133.0
4
53
 
5
54
  ### Minor Changes