@valbuild/shared 0.134.1 → 0.136.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 +52 -0
- package/dist/declarations/src/internal/ApiRoutes.d.ts +2 -0
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +42 -0
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +42 -0
- package/internal/dist/valbuild-shared-internal.esm.js +42 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @valbuild/shared
|
|
2
2
|
|
|
3
|
+
## 0.136.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#713](https://github.com/valbuild/val/pull/713) [`f3a4bb7`](https://github.com/valbuild/val/commit/f3a4bb7aea604943b92545c122243798c759715c) Thanks [@freekh](https://github.com/freekh)! - The Studio can load a bundler, and it stops telling a managed project that its
|
|
8
|
+
publish is on its way out.
|
|
9
|
+
|
|
10
|
+
**A managed project is one with no repository and no host watching one.** There
|
|
11
|
+
is nothing outside the browser to pick a commit up, so the Studio has been
|
|
12
|
+
showing it a story that belongs to a project with a repository: a `Building`
|
|
13
|
+
spinner, waiting for an event that can never arrive. It does not resolve on a
|
|
14
|
+
reload, on a retry, or tomorrow, and there is no way to tell it from a deploy
|
|
15
|
+
that is merely slow.
|
|
16
|
+
|
|
17
|
+
The content service now reports which kind of project this is, as `sourceMode`
|
|
18
|
+
on `/stat`, and the Studio narrates accordingly:
|
|
19
|
+
|
|
20
|
+
- a **connected** project keeps the deploy feed and keeps `Building`, because
|
|
21
|
+
there a host genuinely does pick the commit up;
|
|
22
|
+
- a **managed** one says `Saved, not yet live` instead — a durable condition,
|
|
23
|
+
not a phase, because nothing else will ever resolve it.
|
|
24
|
+
|
|
25
|
+
A server that reports no source mode keeps the behaviour it has today. Absence
|
|
26
|
+
means "not reported", never "managed": `fs` mode has no project to have a mode,
|
|
27
|
+
and neither does a content service that predates the field.
|
|
28
|
+
|
|
29
|
+
**The Studio also loads `@valbuild/tanstack-build` in the tab**, at mount and at
|
|
30
|
+
idle, for the managed projects that will need it — a browser that is the
|
|
31
|
+
deployer needs a bundler. This is the groundwork for browser-side publishing;
|
|
32
|
+
the publish path itself is unchanged in this release.
|
|
33
|
+
|
|
34
|
+
That bundler is `@rolldown/browser`, whose WebAssembly binary is 10.9 MB and is
|
|
35
|
+
**not** in the npm package. It is served from `static.val.build`, addressed by
|
|
36
|
+
the SHA-256 of its own bytes, so the build and the binary it needs cannot drift
|
|
37
|
+
apart. A deployment that must not reach that host — an air-gapped install, a
|
|
38
|
+
mirror — sets `globalThis.__VAL_ROLLDOWN_WASM_URL__` before the Studio loads and
|
|
39
|
+
needs no rebuild.
|
|
40
|
+
|
|
41
|
+
**Building in the browser requires a cross-origin isolated page.** Rolldown runs
|
|
42
|
+
WebAssembly on worker threads that share memory, and a browser will not hand a
|
|
43
|
+
`SharedArrayBuffer` to a worker otherwise. Without
|
|
44
|
+
`Cross-Origin-Opener-Policy: same-origin` and
|
|
45
|
+
`Cross-Origin-Embedder-Policy: require-corp` on the document Val is mounted in,
|
|
46
|
+
loading the bundler now fails with a message that says exactly that, instead of
|
|
47
|
+
a `DataCloneError` thrown from inside a worker. Nothing else in this release is
|
|
48
|
+
affected: a Studio that never builds in the browser never asks.
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [[`f3a4bb7`](https://github.com/valbuild/val/commit/f3a4bb7aea604943b92545c122243798c759715c)]:
|
|
53
|
+
- @valbuild/core@0.136.0
|
|
54
|
+
|
|
3
55
|
## 0.134.1
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|
|
@@ -423,6 +423,7 @@ export declare const Api: {
|
|
|
423
423
|
profileId: z.ZodNullable<z.ZodString>;
|
|
424
424
|
mode: z.ZodUnion<readonly [z.ZodLiteral<"http">, z.ZodLiteral<"fs">]>;
|
|
425
425
|
jsonEntriesSha: z.ZodOptional<z.ZodString>;
|
|
426
|
+
sourceMode: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"managed">, z.ZodLiteral<"connected">]>>;
|
|
426
427
|
publishRefusal: z.ZodOptional<z.ZodObject<{
|
|
427
428
|
code: z.ZodLiteral<"no-base">;
|
|
428
429
|
message: z.ZodString;
|
|
@@ -466,6 +467,7 @@ export declare const Api: {
|
|
|
466
467
|
}, z.core.$strip>;
|
|
467
468
|
profileId: z.ZodNullable<z.ZodString>;
|
|
468
469
|
mode: z.ZodUnion<readonly [z.ZodLiteral<"http">, z.ZodLiteral<"fs">]>;
|
|
470
|
+
sourceMode: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"managed">, z.ZodLiteral<"connected">]>>;
|
|
469
471
|
publishRefusal: z.ZodOptional<z.ZodObject<{
|
|
470
472
|
code: z.ZodLiteral<"no-base">;
|
|
471
473
|
message: z.ZodString;
|
|
@@ -1864,6 +1864,27 @@ var Api = {
|
|
|
1864
1864
|
profileId: zod.z.string().nullable(),
|
|
1865
1865
|
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs")]),
|
|
1866
1866
|
jsonEntriesSha: zod.z.string().optional(),
|
|
1867
|
+
/**
|
|
1868
|
+
* How this project's SOURCE is kept, when the server knows.
|
|
1869
|
+
*
|
|
1870
|
+
* `"managed"` -- the content service is the store of record,
|
|
1871
|
+
* there is no repository, and the Studio is the deployer: the
|
|
1872
|
+
* build that makes a publish live happens in the tab that started
|
|
1873
|
+
* it. `"connected"` -- commits are mirrored into a repository a
|
|
1874
|
+
* host watches, so something outside the browser finishes the
|
|
1875
|
+
* job.
|
|
1876
|
+
*
|
|
1877
|
+
* The Studio narrates a publish differently for each, because a
|
|
1878
|
+
* `building` state in managed mode is a spinner with no event
|
|
1879
|
+
* that can ever end it -- not on a reload, not on a retry, not
|
|
1880
|
+
* tomorrow.
|
|
1881
|
+
*
|
|
1882
|
+
* Optional, and absent means "not reported", never "managed":
|
|
1883
|
+
* `fs` mode has no project to have a mode, and so does an `http`
|
|
1884
|
+
* server that predates the field. Both keep the connected story,
|
|
1885
|
+
* which is the one the Studio has always told.
|
|
1886
|
+
*/
|
|
1887
|
+
sourceMode: zod.z.union([zod.z.literal("managed"), zod.z.literal("connected")]).optional(),
|
|
1867
1888
|
publishRefusal: PublishRefusal.optional()
|
|
1868
1889
|
}), zod.z.object({
|
|
1869
1890
|
type: zod.z.literal("use-websocket"),
|
|
@@ -1926,6 +1947,27 @@ var Api = {
|
|
|
1926
1947
|
config: ValConfig,
|
|
1927
1948
|
profileId: zod.z.string().nullable(),
|
|
1928
1949
|
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs")]),
|
|
1950
|
+
/**
|
|
1951
|
+
* How this project's SOURCE is kept, when the server knows.
|
|
1952
|
+
*
|
|
1953
|
+
* `"managed"` -- the content service is the store of record,
|
|
1954
|
+
* there is no repository, and the Studio is the deployer: the
|
|
1955
|
+
* build that makes a publish live happens in the tab that started
|
|
1956
|
+
* it. `"connected"` -- commits are mirrored into a repository a
|
|
1957
|
+
* host watches, so something outside the browser finishes the
|
|
1958
|
+
* job.
|
|
1959
|
+
*
|
|
1960
|
+
* The Studio narrates a publish differently for each, because a
|
|
1961
|
+
* `building` state in managed mode is a spinner with no event
|
|
1962
|
+
* that can ever end it -- not on a reload, not on a retry, not
|
|
1963
|
+
* tomorrow.
|
|
1964
|
+
*
|
|
1965
|
+
* Optional, and absent means "not reported", never "managed":
|
|
1966
|
+
* `fs` mode has no project to have a mode, and so does an `http`
|
|
1967
|
+
* server that predates the field. Both keep the connected story,
|
|
1968
|
+
* which is the one the Studio has always told.
|
|
1969
|
+
*/
|
|
1970
|
+
sourceMode: zod.z.union([zod.z.literal("managed"), zod.z.literal("connected")]).optional(),
|
|
1929
1971
|
publishRefusal: PublishRefusal.optional()
|
|
1930
1972
|
})])
|
|
1931
1973
|
})])
|
|
@@ -1864,6 +1864,27 @@ var Api = {
|
|
|
1864
1864
|
profileId: zod.z.string().nullable(),
|
|
1865
1865
|
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs")]),
|
|
1866
1866
|
jsonEntriesSha: zod.z.string().optional(),
|
|
1867
|
+
/**
|
|
1868
|
+
* How this project's SOURCE is kept, when the server knows.
|
|
1869
|
+
*
|
|
1870
|
+
* `"managed"` -- the content service is the store of record,
|
|
1871
|
+
* there is no repository, and the Studio is the deployer: the
|
|
1872
|
+
* build that makes a publish live happens in the tab that started
|
|
1873
|
+
* it. `"connected"` -- commits are mirrored into a repository a
|
|
1874
|
+
* host watches, so something outside the browser finishes the
|
|
1875
|
+
* job.
|
|
1876
|
+
*
|
|
1877
|
+
* The Studio narrates a publish differently for each, because a
|
|
1878
|
+
* `building` state in managed mode is a spinner with no event
|
|
1879
|
+
* that can ever end it -- not on a reload, not on a retry, not
|
|
1880
|
+
* tomorrow.
|
|
1881
|
+
*
|
|
1882
|
+
* Optional, and absent means "not reported", never "managed":
|
|
1883
|
+
* `fs` mode has no project to have a mode, and so does an `http`
|
|
1884
|
+
* server that predates the field. Both keep the connected story,
|
|
1885
|
+
* which is the one the Studio has always told.
|
|
1886
|
+
*/
|
|
1887
|
+
sourceMode: zod.z.union([zod.z.literal("managed"), zod.z.literal("connected")]).optional(),
|
|
1867
1888
|
publishRefusal: PublishRefusal.optional()
|
|
1868
1889
|
}), zod.z.object({
|
|
1869
1890
|
type: zod.z.literal("use-websocket"),
|
|
@@ -1926,6 +1947,27 @@ var Api = {
|
|
|
1926
1947
|
config: ValConfig,
|
|
1927
1948
|
profileId: zod.z.string().nullable(),
|
|
1928
1949
|
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs")]),
|
|
1950
|
+
/**
|
|
1951
|
+
* How this project's SOURCE is kept, when the server knows.
|
|
1952
|
+
*
|
|
1953
|
+
* `"managed"` -- the content service is the store of record,
|
|
1954
|
+
* there is no repository, and the Studio is the deployer: the
|
|
1955
|
+
* build that makes a publish live happens in the tab that started
|
|
1956
|
+
* it. `"connected"` -- commits are mirrored into a repository a
|
|
1957
|
+
* host watches, so something outside the browser finishes the
|
|
1958
|
+
* job.
|
|
1959
|
+
*
|
|
1960
|
+
* The Studio narrates a publish differently for each, because a
|
|
1961
|
+
* `building` state in managed mode is a spinner with no event
|
|
1962
|
+
* that can ever end it -- not on a reload, not on a retry, not
|
|
1963
|
+
* tomorrow.
|
|
1964
|
+
*
|
|
1965
|
+
* Optional, and absent means "not reported", never "managed":
|
|
1966
|
+
* `fs` mode has no project to have a mode, and so does an `http`
|
|
1967
|
+
* server that predates the field. Both keep the connected story,
|
|
1968
|
+
* which is the one the Studio has always told.
|
|
1969
|
+
*/
|
|
1970
|
+
sourceMode: zod.z.union([zod.z.literal("managed"), zod.z.literal("connected")]).optional(),
|
|
1929
1971
|
publishRefusal: PublishRefusal.optional()
|
|
1930
1972
|
})])
|
|
1931
1973
|
})])
|
|
@@ -1857,6 +1857,27 @@ var Api = {
|
|
|
1857
1857
|
profileId: z.string().nullable(),
|
|
1858
1858
|
mode: z.union([z.literal("http"), z.literal("fs")]),
|
|
1859
1859
|
jsonEntriesSha: z.string().optional(),
|
|
1860
|
+
/**
|
|
1861
|
+
* How this project's SOURCE is kept, when the server knows.
|
|
1862
|
+
*
|
|
1863
|
+
* `"managed"` -- the content service is the store of record,
|
|
1864
|
+
* there is no repository, and the Studio is the deployer: the
|
|
1865
|
+
* build that makes a publish live happens in the tab that started
|
|
1866
|
+
* it. `"connected"` -- commits are mirrored into a repository a
|
|
1867
|
+
* host watches, so something outside the browser finishes the
|
|
1868
|
+
* job.
|
|
1869
|
+
*
|
|
1870
|
+
* The Studio narrates a publish differently for each, because a
|
|
1871
|
+
* `building` state in managed mode is a spinner with no event
|
|
1872
|
+
* that can ever end it -- not on a reload, not on a retry, not
|
|
1873
|
+
* tomorrow.
|
|
1874
|
+
*
|
|
1875
|
+
* Optional, and absent means "not reported", never "managed":
|
|
1876
|
+
* `fs` mode has no project to have a mode, and so does an `http`
|
|
1877
|
+
* server that predates the field. Both keep the connected story,
|
|
1878
|
+
* which is the one the Studio has always told.
|
|
1879
|
+
*/
|
|
1880
|
+
sourceMode: z.union([z.literal("managed"), z.literal("connected")]).optional(),
|
|
1860
1881
|
publishRefusal: PublishRefusal.optional()
|
|
1861
1882
|
}), z.object({
|
|
1862
1883
|
type: z.literal("use-websocket"),
|
|
@@ -1919,6 +1940,27 @@ var Api = {
|
|
|
1919
1940
|
config: ValConfig,
|
|
1920
1941
|
profileId: z.string().nullable(),
|
|
1921
1942
|
mode: z.union([z.literal("http"), z.literal("fs")]),
|
|
1943
|
+
/**
|
|
1944
|
+
* How this project's SOURCE is kept, when the server knows.
|
|
1945
|
+
*
|
|
1946
|
+
* `"managed"` -- the content service is the store of record,
|
|
1947
|
+
* there is no repository, and the Studio is the deployer: the
|
|
1948
|
+
* build that makes a publish live happens in the tab that started
|
|
1949
|
+
* it. `"connected"` -- commits are mirrored into a repository a
|
|
1950
|
+
* host watches, so something outside the browser finishes the
|
|
1951
|
+
* job.
|
|
1952
|
+
*
|
|
1953
|
+
* The Studio narrates a publish differently for each, because a
|
|
1954
|
+
* `building` state in managed mode is a spinner with no event
|
|
1955
|
+
* that can ever end it -- not on a reload, not on a retry, not
|
|
1956
|
+
* tomorrow.
|
|
1957
|
+
*
|
|
1958
|
+
* Optional, and absent means "not reported", never "managed":
|
|
1959
|
+
* `fs` mode has no project to have a mode, and so does an `http`
|
|
1960
|
+
* server that predates the field. Both keep the connected story,
|
|
1961
|
+
* which is the one the Studio has always told.
|
|
1962
|
+
*/
|
|
1963
|
+
sourceMode: z.union([z.literal("managed"), z.literal("connected")]).optional(),
|
|
1922
1964
|
publishRefusal: PublishRefusal.optional()
|
|
1923
1965
|
})])
|
|
1924
1966
|
})])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.136.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Val shared types and utilities",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"flexsearch": "^0.8.212",
|
|
38
38
|
"zod": "^4.4.3",
|
|
39
39
|
"zod-validation-error": "^5.0.0",
|
|
40
|
-
"@valbuild/core": "0.
|
|
40
|
+
"@valbuild/core": "0.136.0"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"CHANGELOG.md",
|