@valbuild/core 0.134.0 → 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 CHANGED
@@ -1,5 +1,52 @@
1
1
  # @valbuild/core
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
+
3
50
  ## 0.134.0
4
51
 
5
52
  ### Minor Changes
@@ -86,6 +86,20 @@ export declare const FATAL_ERROR_TYPES: readonly ["no-schema", "no-source", "inv
86
86
  export type FatalErrorType = (typeof FATAL_ERROR_TYPES)[number];
87
87
  export declare const DEFAULT_CONTENT_HOST = "https://content.val.build";
88
88
  export declare const DEFAULT_APP_HOST = "https://admin.val.build";
89
+ /**
90
+ * Where Val's own immutable build artifacts are served from.
91
+ *
92
+ * Only one kind of thing lives here so far: the WebAssembly binary of the
93
+ * bundler the Studio builds a site with. It cannot travel with the Studio's
94
+ * own bundle -- 10.9 MB of binary, and `/api/val/static` is a base64 record of
95
+ * TEXT inside the server bundle, which both corrupts it and would carry it
96
+ * into every project that installs `@valbuild/ui`.
97
+ *
98
+ * Everything under this host is addressed by the SHA-256 of its own bytes, so
99
+ * an upload is idempotent, a URL is immutable, and the artifact a build asks
100
+ * for cannot be a different one than the build was made against.
101
+ */
102
+ export declare const DEFAULT_STATIC_HOST = "https://static.val.build";
89
103
  declare const Internal: {
90
104
  VERSION: {
91
105
  core: string;
@@ -14165,7 +14165,7 @@ function isPageRouter(routerId) {
14165
14165
 
14166
14166
  var corePackageJson = {
14167
14167
  name: "@valbuild/core",
14168
- version: "0.134.0",
14168
+ version: "0.136.0",
14169
14169
  "private": false,
14170
14170
  description: "Val - supercharged hard-coded content",
14171
14171
  repository: {
@@ -14223,6 +14223,20 @@ var ModuleFilePathSep = "?p=";
14223
14223
  var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "invalid-patch"];
14224
14224
  var DEFAULT_CONTENT_HOST = "https://content.val.build";
14225
14225
  var DEFAULT_APP_HOST = "https://admin.val.build";
14226
+ /**
14227
+ * Where Val's own immutable build artifacts are served from.
14228
+ *
14229
+ * Only one kind of thing lives here so far: the WebAssembly binary of the
14230
+ * bundler the Studio builds a site with. It cannot travel with the Studio's
14231
+ * own bundle -- 10.9 MB of binary, and `/api/val/static` is a base64 record of
14232
+ * TEXT inside the server bundle, which both corrupts it and would carry it
14233
+ * into every project that installs `@valbuild/ui`.
14234
+ *
14235
+ * Everything under this host is addressed by the SHA-256 of its own bytes, so
14236
+ * an upload is idempotent, a URL is immutable, and the artifact a build asks
14237
+ * for cannot be a different one than the build was made against.
14238
+ */
14239
+ var DEFAULT_STATIC_HOST = "https://static.val.build";
14226
14240
  var Internal = {
14227
14241
  VERSION: {
14228
14242
  core: corePackageJson.version
@@ -14344,4 +14358,4 @@ function tryJsonParse(str) {
14344
14358
  }
14345
14359
  }
14346
14360
 
14347
- export { KeyOfSchema as $, ArraySchema as A, BooleanSchema as B, localeTagError as C, DEFAULT_CONTENT_HOST as D, localeOfValue as E, FATAL_ERROR_TYPES as F, GenericSelector as G, declaredKeySetOf as H, Internal as I, missingDeclaredKeys as J, discriminatedUnionBranchOf as K, LocaleSchema as L, ModuleFilePathSep as M, NumberSchema as N, ObjectSchema as O, PatchError as P, ColorSchema as Q, RecordSchema as R, Schema as S, THEME_LOGO_DIRECTORY as T, CodeSchema as U, VAL_EXTENSION as V, CODE_LANGUAGES as W, COLOR_FORMATS as X, DEFAULT_COLOR_FORMAT as Y, DateTimeSchema as Z, _typeof as _, _slicedToArray as a, ValViewSchema as a0, isValViewSource as a1, RouteSchema as a2, RichTextSchema as a3, DiscriminatedUnionSchema as a4, EnumSchema as a5, LiteralSchema as a6, deserializeSchema as a7, previewScope as a8, isInlineRender as a9, parseNextJsRoutePattern as aa, parseTanStackRoutePattern as ab, tanStackSegmentsOfRoutePath as ac, validateUrlAgainstPattern as ad, getSourcePathFromRoute as ae, isPageRouter as af, _createClass as b, _classCallCheck as c, _toConsumableArray as d, DEFAULT_APP_HOST as e, extractValModules as f, computeValModuleShas as g, hasRemoteFileSchema as h, initVal as i, hasMediaSchema as j, DEFAULT_VAL_REMOTE_HOST as k, derefPatch as l, modules as m, StringSchema as n, ImageSchema as o, FileSchema as p, DateSchema as q, SettingsSchema as r, splitModuleFilePathAndModulePath as s, ASSISTANT_SETTINGS_MAX_LENGTH as t, THEME_RADIUS_STEPS as u, THEME_RADIUS_LENGTHS as v, assistantAvailability as w, SETTINGS_MODULE_CONVENTION as x, isRootModuleFilePath as y, resolveSettingsModule as z };
14361
+ export { DateTimeSchema as $, ArraySchema as A, BooleanSchema as B, resolveSettingsModule as C, DEFAULT_CONTENT_HOST as D, localeTagError as E, FATAL_ERROR_TYPES as F, GenericSelector as G, localeOfValue as H, Internal as I, declaredKeySetOf as J, missingDeclaredKeys as K, LocaleSchema as L, ModuleFilePathSep as M, NumberSchema as N, ObjectSchema as O, PatchError as P, discriminatedUnionBranchOf as Q, RecordSchema as R, Schema as S, THEME_LOGO_DIRECTORY as T, ColorSchema as U, VAL_EXTENSION as V, CodeSchema as W, CODE_LANGUAGES as X, COLOR_FORMATS as Y, DEFAULT_COLOR_FORMAT as Z, _typeof as _, _slicedToArray as a, KeyOfSchema as a0, ValViewSchema as a1, isValViewSource as a2, RouteSchema as a3, RichTextSchema as a4, DiscriminatedUnionSchema as a5, EnumSchema as a6, LiteralSchema as a7, deserializeSchema as a8, previewScope as a9, isInlineRender as aa, parseNextJsRoutePattern as ab, parseTanStackRoutePattern as ac, tanStackSegmentsOfRoutePath as ad, validateUrlAgainstPattern as ae, getSourcePathFromRoute as af, isPageRouter as ag, _createClass as b, _classCallCheck as c, _toConsumableArray as d, DEFAULT_APP_HOST as e, DEFAULT_STATIC_HOST as f, extractValModules as g, computeValModuleShas as h, initVal as i, hasRemoteFileSchema as j, hasMediaSchema as k, DEFAULT_VAL_REMOTE_HOST as l, modules as m, derefPatch as n, StringSchema as o, ImageSchema as p, FileSchema as q, DateSchema as r, splitModuleFilePathAndModulePath as s, SettingsSchema as t, ASSISTANT_SETTINGS_MAX_LENGTH as u, THEME_RADIUS_STEPS as v, THEME_RADIUS_LENGTHS as w, assistantAvailability as x, SETTINGS_MODULE_CONVENTION as y, isRootModuleFilePath as z };
@@ -14167,7 +14167,7 @@ function isPageRouter(routerId) {
14167
14167
 
14168
14168
  var corePackageJson = {
14169
14169
  name: "@valbuild/core",
14170
- version: "0.134.0",
14170
+ version: "0.136.0",
14171
14171
  "private": false,
14172
14172
  description: "Val - supercharged hard-coded content",
14173
14173
  repository: {
@@ -14225,6 +14225,20 @@ var ModuleFilePathSep = "?p=";
14225
14225
  var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "invalid-patch"];
14226
14226
  var DEFAULT_CONTENT_HOST = "https://content.val.build";
14227
14227
  var DEFAULT_APP_HOST = "https://admin.val.build";
14228
+ /**
14229
+ * Where Val's own immutable build artifacts are served from.
14230
+ *
14231
+ * Only one kind of thing lives here so far: the WebAssembly binary of the
14232
+ * bundler the Studio builds a site with. It cannot travel with the Studio's
14233
+ * own bundle -- 10.9 MB of binary, and `/api/val/static` is a base64 record of
14234
+ * TEXT inside the server bundle, which both corrupts it and would carry it
14235
+ * into every project that installs `@valbuild/ui`.
14236
+ *
14237
+ * Everything under this host is addressed by the SHA-256 of its own bytes, so
14238
+ * an upload is idempotent, a URL is immutable, and the artifact a build asks
14239
+ * for cannot be a different one than the build was made against.
14240
+ */
14241
+ var DEFAULT_STATIC_HOST = "https://static.val.build";
14228
14242
  var Internal = {
14229
14243
  VERSION: {
14230
14244
  core: corePackageJson.version
@@ -14356,6 +14370,7 @@ exports.ColorSchema = ColorSchema;
14356
14370
  exports.DEFAULT_APP_HOST = DEFAULT_APP_HOST;
14357
14371
  exports.DEFAULT_COLOR_FORMAT = DEFAULT_COLOR_FORMAT;
14358
14372
  exports.DEFAULT_CONTENT_HOST = DEFAULT_CONTENT_HOST;
14373
+ exports.DEFAULT_STATIC_HOST = DEFAULT_STATIC_HOST;
14359
14374
  exports.DEFAULT_VAL_REMOTE_HOST = DEFAULT_VAL_REMOTE_HOST;
14360
14375
  exports.DateSchema = DateSchema;
14361
14376
  exports.DateTimeSchema = DateTimeSchema;
@@ -14167,7 +14167,7 @@ function isPageRouter(routerId) {
14167
14167
 
14168
14168
  var corePackageJson = {
14169
14169
  name: "@valbuild/core",
14170
- version: "0.134.0",
14170
+ version: "0.136.0",
14171
14171
  "private": false,
14172
14172
  description: "Val - supercharged hard-coded content",
14173
14173
  repository: {
@@ -14225,6 +14225,20 @@ var ModuleFilePathSep = "?p=";
14225
14225
  var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "invalid-patch"];
14226
14226
  var DEFAULT_CONTENT_HOST = "https://content.val.build";
14227
14227
  var DEFAULT_APP_HOST = "https://admin.val.build";
14228
+ /**
14229
+ * Where Val's own immutable build artifacts are served from.
14230
+ *
14231
+ * Only one kind of thing lives here so far: the WebAssembly binary of the
14232
+ * bundler the Studio builds a site with. It cannot travel with the Studio's
14233
+ * own bundle -- 10.9 MB of binary, and `/api/val/static` is a base64 record of
14234
+ * TEXT inside the server bundle, which both corrupts it and would carry it
14235
+ * into every project that installs `@valbuild/ui`.
14236
+ *
14237
+ * Everything under this host is addressed by the SHA-256 of its own bytes, so
14238
+ * an upload is idempotent, a URL is immutable, and the artifact a build asks
14239
+ * for cannot be a different one than the build was made against.
14240
+ */
14241
+ var DEFAULT_STATIC_HOST = "https://static.val.build";
14228
14242
  var Internal = {
14229
14243
  VERSION: {
14230
14244
  core: corePackageJson.version
@@ -14356,6 +14370,7 @@ exports.ColorSchema = ColorSchema;
14356
14370
  exports.DEFAULT_APP_HOST = DEFAULT_APP_HOST;
14357
14371
  exports.DEFAULT_COLOR_FORMAT = DEFAULT_COLOR_FORMAT;
14358
14372
  exports.DEFAULT_CONTENT_HOST = DEFAULT_CONTENT_HOST;
14373
+ exports.DEFAULT_STATIC_HOST = DEFAULT_STATIC_HOST;
14359
14374
  exports.DEFAULT_VAL_REMOTE_HOST = DEFAULT_VAL_REMOTE_HOST;
14360
14375
  exports.DateSchema = DateSchema;
14361
14376
  exports.DateTimeSchema = DateTimeSchema;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-85a2ffba.cjs.dev.js');
5
+ var dist_valbuildCore = require('./index-8a6c2682.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
 
8
8
 
@@ -17,6 +17,7 @@ exports.ColorSchema = dist_valbuildCore.ColorSchema;
17
17
  exports.DEFAULT_APP_HOST = dist_valbuildCore.DEFAULT_APP_HOST;
18
18
  exports.DEFAULT_COLOR_FORMAT = dist_valbuildCore.DEFAULT_COLOR_FORMAT;
19
19
  exports.DEFAULT_CONTENT_HOST = dist_valbuildCore.DEFAULT_CONTENT_HOST;
20
+ exports.DEFAULT_STATIC_HOST = dist_valbuildCore.DEFAULT_STATIC_HOST;
20
21
  exports.DEFAULT_VAL_REMOTE_HOST = dist_valbuildCore.DEFAULT_VAL_REMOTE_HOST;
21
22
  exports.DateSchema = dist_valbuildCore.DateSchema;
22
23
  exports.DateTimeSchema = dist_valbuildCore.DateTimeSchema;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-48a8f8a5.cjs.prod.js');
5
+ var dist_valbuildCore = require('./index-e4035f4d.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
 
8
8
 
@@ -17,6 +17,7 @@ exports.ColorSchema = dist_valbuildCore.ColorSchema;
17
17
  exports.DEFAULT_APP_HOST = dist_valbuildCore.DEFAULT_APP_HOST;
18
18
  exports.DEFAULT_COLOR_FORMAT = dist_valbuildCore.DEFAULT_COLOR_FORMAT;
19
19
  exports.DEFAULT_CONTENT_HOST = dist_valbuildCore.DEFAULT_CONTENT_HOST;
20
+ exports.DEFAULT_STATIC_HOST = dist_valbuildCore.DEFAULT_STATIC_HOST;
20
21
  exports.DEFAULT_VAL_REMOTE_HOST = dist_valbuildCore.DEFAULT_VAL_REMOTE_HOST;
21
22
  exports.DateSchema = dist_valbuildCore.DateSchema;
22
23
  exports.DateTimeSchema = dist_valbuildCore.DateTimeSchema;
@@ -1,2 +1,2 @@
1
- export { t as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, W as CODE_LANGUAGES, X as COLOR_FORMATS, U as CodeSchema, Q as ColorSchema, e as DEFAULT_APP_HOST, Y as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, k as DEFAULT_VAL_REMOTE_HOST, q as DateSchema, Z as DateTimeSchema, a4 as DiscriminatedUnionSchema, a5 as EnumSchema, F as FATAL_ERROR_TYPES, p as FileSchema, G as GenericSelector, o as ImageSchema, I as Internal, $ as KeyOfSchema, a6 as LiteralSchema, L as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, a3 as RichTextSchema, a2 as RouteSchema, x as SETTINGS_MODULE_CONVENTION, S as Schema, r as SettingsSchema, n as StringSchema, T as THEME_LOGO_DIRECTORY, v as THEME_RADIUS_LENGTHS, u as THEME_RADIUS_STEPS, V as VAL_EXTENSION, a0 as ValViewSchema, w as assistantAvailability, g as computeValModuleShas, H as declaredKeySetOf, l as derefPatch, a7 as deserializeSchema, K as discriminatedUnionBranchOf, f as extractValModules, ae as getSourcePathFromRoute, j as hasMediaSchema, h as hasRemoteFileSchema, i as initVal, a9 as isInlineRender, af as isPageRouter, y as isRootModuleFilePath, a1 as isValViewSource, E as localeOfValue, C as localeTagError, J as missingDeclaredKeys, m as modules, aa as parseNextJsRoutePattern, ab as parseTanStackRoutePattern, a8 as previewScope, z as resolveSettingsModule, ac as tanStackSegmentsOfRoutePath, ad as validateUrlAgainstPattern } from './index-e3458565.esm.js';
1
+ export { u as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, X as CODE_LANGUAGES, Y as COLOR_FORMATS, W as CodeSchema, U as ColorSchema, e as DEFAULT_APP_HOST, Z as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, f as DEFAULT_STATIC_HOST, l as DEFAULT_VAL_REMOTE_HOST, r as DateSchema, $ as DateTimeSchema, a5 as DiscriminatedUnionSchema, a6 as EnumSchema, F as FATAL_ERROR_TYPES, q as FileSchema, G as GenericSelector, p as ImageSchema, I as Internal, a0 as KeyOfSchema, a7 as LiteralSchema, L as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, a4 as RichTextSchema, a3 as RouteSchema, y as SETTINGS_MODULE_CONVENTION, S as Schema, t as SettingsSchema, o as StringSchema, T as THEME_LOGO_DIRECTORY, w as THEME_RADIUS_LENGTHS, v as THEME_RADIUS_STEPS, V as VAL_EXTENSION, a1 as ValViewSchema, x as assistantAvailability, h as computeValModuleShas, J as declaredKeySetOf, n as derefPatch, a8 as deserializeSchema, Q as discriminatedUnionBranchOf, g as extractValModules, af as getSourcePathFromRoute, k as hasMediaSchema, j as hasRemoteFileSchema, i as initVal, aa as isInlineRender, ag as isPageRouter, z as isRootModuleFilePath, a2 as isValViewSource, H as localeOfValue, E as localeTagError, K as missingDeclaredKeys, m as modules, ab as parseNextJsRoutePattern, ac as parseTanStackRoutePattern, a9 as previewScope, C as resolveSettingsModule, ad as tanStackSegmentsOfRoutePath, ae as validateUrlAgainstPattern } from './index-84fa4a70.esm.js';
2
2
  import './result-daff1cae.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/core",
3
- "version": "0.134.0",
3
+ "version": "0.136.0",
4
4
  "private": false,
5
5
  "description": "Val - supercharged hard-coded content",
6
6
  "repository": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-85a2ffba.cjs.dev.js');
5
+ var dist_valbuildCore = require('../../dist/index-8a6c2682.cjs.dev.js');
6
6
  var result = require('../../dist/result-bb1f436e.cjs.dev.js');
7
7
  var util = require('../../dist/util-b213092b.cjs.dev.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-48a8f8a5.cjs.prod.js');
5
+ var dist_valbuildCore = require('../../dist/index-e4035f4d.cjs.prod.js');
6
6
  var result = require('../../dist/result-787e35f6.cjs.prod.js');
7
7
  var util = require('../../dist/util-030d8a1f.cjs.prod.js');
8
8
 
@@ -1,5 +1,5 @@
1
- import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-e3458565.esm.js';
2
- export { P as PatchError } from '../../dist/index-e3458565.esm.js';
1
+ import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-84fa4a70.esm.js';
2
+ export { P as PatchError } from '../../dist/index-84fa4a70.esm.js';
3
3
  import { f as isNonEmpty, e as err, o as ok, m as map, g as flatMap, i as isErr, h as flatMapReduce, j as filterOrElse, k as mapErr, l as map$1, n as all, p as flatten, q as allT } from '../../dist/result-daff1cae.esm.js';
4
4
  import { p as pipe } from '../../dist/util-18613e99.esm.js';
5
5