@valbuild/core 0.136.0 → 0.136.1

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,18 @@
1
1
  # @valbuild/core
2
2
 
3
+ ## 0.136.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#716](https://github.com/valbuild/val/pull/716) [`d2f385a`](https://github.com/valbuild/val/commit/d2f385a04978992a5036379235e447ba7775faef) Thanks [@freekh](https://github.com/freekh)! - The Studio works again when served from the published package, and a managed project's publish now puts the saved edit on the site.
8
+
9
+ - **The Studio did not start in 0.136.0.** Its main bundle imports sibling chunks by relative path, and the Studio is served at `/api/val/static/<version>/app`, so those imports resolved to paths the handler did not know and came back as the HTML fallback — which a browser refuses as a module script. Preview was gone with it. The handler now serves those chunks, and the package build follows every import the bundle makes before it lets a release through.
10
+ - **The in-browser builder could not load.** The Studio's bundle carried rolldown's Node WASI binding, which throws `process is not defined` in a tab. It now uses the browser binding, and the build refuses a bundle that contains the Node one.
11
+ - **A managed publish builds what was just saved.** `/save` returns the source files the commit wrote, the Studio builds with them laid over the project's stored source, and publishes that source back with the build — so the next edit starts from this one rather than undoing it. The save's commit is also passed through to the build, which previously ran as though no commit had been made.
12
+ - **The bundler's WebAssembly is served from `content.val.build/v1/static`** (`DEFAULT_STATIC_HOST`), still addressed by its SHA-256. `globalThis.__VAL_ROLLDOWN_WASM_URL__` still overrides it.
13
+ - The `val.server.ts` that `@valbuild/tanstack-build` generates no longer hands a save's files to the platform (`platform.internal/__api/source`). A managed project's Studio builds in its own tab, and the platform has closed that door. `isWired` recognises files wired either way.
14
+ - `@valbuild/tanstack-build/constants` exports the contract paths and the artifact key namespace from an entrypoint that imports nothing else, for callers that must not load the bundler. The namespace gains a `source` key.
15
+
3
16
  ## 0.136.0
4
17
 
5
18
  ### Minor Changes
@@ -87,7 +87,8 @@ 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
89
  /**
90
- * Where Val's own immutable build artifacts are served from.
90
+ * Where Val's own immutable build artifacts are served from: the content
91
+ * service's `/v1/static`.
91
92
  *
92
93
  * Only one kind of thing lives here so far: the WebAssembly binary of the
93
94
  * bundler the Studio builds a site with. It cannot travel with the Studio's
@@ -95,11 +96,23 @@ export declare const DEFAULT_APP_HOST = "https://admin.val.build";
95
96
  * TEXT inside the server bundle, which both corrupts it and would carry it
96
97
  * into every project that installs `@valbuild/ui`.
97
98
  *
98
- * Everything under this host is addressed by the SHA-256 of its own bytes, so
99
+ * Everything under this path is addressed by the SHA-256 of its own bytes, so
99
100
  * an upload is idempotent, a URL is immutable, and the artifact a build asks
100
101
  * for cannot be a different one than the build was made against.
102
+ *
103
+ * On content rather than a host of its own because a publish cannot happen
104
+ * without content anyway -- declare, upload, verify, promote, `/build-target`
105
+ * and `/project-source` all go through it -- so a separate host would add no
106
+ * availability and one more domain to every customer's egress allowlist.
107
+ *
108
+ * A FIXED LITERAL, and deliberately not derived from a project's configured
109
+ * content host (`VAL_CONTENT_URL`). Deriving it would make serving this binary
110
+ * an obligation of every content service anybody points Val at, self-hosted
111
+ * ones included. A deployment that must fetch it from somewhere else sets
112
+ * `globalThis.__VAL_ROLLDOWN_WASM_URL__` instead (see
113
+ * `packages/ui/build/rolldownWasm.ts`).
101
114
  */
102
- export declare const DEFAULT_STATIC_HOST = "https://static.val.build";
115
+ export declare const DEFAULT_STATIC_HOST = "https://content.val.build/v1/static";
103
116
  declare const Internal: {
104
117
  VERSION: {
105
118
  core: string;
@@ -14165,7 +14165,7 @@ function isPageRouter(routerId) {
14165
14165
 
14166
14166
  var corePackageJson = {
14167
14167
  name: "@valbuild/core",
14168
- version: "0.136.0",
14168
+ version: "0.136.1",
14169
14169
  "private": false,
14170
14170
  description: "Val - supercharged hard-coded content",
14171
14171
  repository: {
@@ -14224,7 +14224,8 @@ var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "i
14224
14224
  var DEFAULT_CONTENT_HOST = "https://content.val.build";
14225
14225
  var DEFAULT_APP_HOST = "https://admin.val.build";
14226
14226
  /**
14227
- * Where Val's own immutable build artifacts are served from.
14227
+ * Where Val's own immutable build artifacts are served from: the content
14228
+ * service's `/v1/static`.
14228
14229
  *
14229
14230
  * Only one kind of thing lives here so far: the WebAssembly binary of the
14230
14231
  * bundler the Studio builds a site with. It cannot travel with the Studio's
@@ -14232,11 +14233,23 @@ var DEFAULT_APP_HOST = "https://admin.val.build";
14232
14233
  * TEXT inside the server bundle, which both corrupts it and would carry it
14233
14234
  * into every project that installs `@valbuild/ui`.
14234
14235
  *
14235
- * Everything under this host is addressed by the SHA-256 of its own bytes, so
14236
+ * Everything under this path is addressed by the SHA-256 of its own bytes, so
14236
14237
  * an upload is idempotent, a URL is immutable, and the artifact a build asks
14237
14238
  * for cannot be a different one than the build was made against.
14239
+ *
14240
+ * On content rather than a host of its own because a publish cannot happen
14241
+ * without content anyway -- declare, upload, verify, promote, `/build-target`
14242
+ * and `/project-source` all go through it -- so a separate host would add no
14243
+ * availability and one more domain to every customer's egress allowlist.
14244
+ *
14245
+ * A FIXED LITERAL, and deliberately not derived from a project's configured
14246
+ * content host (`VAL_CONTENT_URL`). Deriving it would make serving this binary
14247
+ * an obligation of every content service anybody points Val at, self-hosted
14248
+ * ones included. A deployment that must fetch it from somewhere else sets
14249
+ * `globalThis.__VAL_ROLLDOWN_WASM_URL__` instead (see
14250
+ * `packages/ui/build/rolldownWasm.ts`).
14238
14251
  */
14239
- var DEFAULT_STATIC_HOST = "https://static.val.build";
14252
+ var DEFAULT_STATIC_HOST = "https://content.val.build/v1/static";
14240
14253
  var Internal = {
14241
14254
  VERSION: {
14242
14255
  core: corePackageJson.version
@@ -14167,7 +14167,7 @@ function isPageRouter(routerId) {
14167
14167
 
14168
14168
  var corePackageJson = {
14169
14169
  name: "@valbuild/core",
14170
- version: "0.136.0",
14170
+ version: "0.136.1",
14171
14171
  "private": false,
14172
14172
  description: "Val - supercharged hard-coded content",
14173
14173
  repository: {
@@ -14226,7 +14226,8 @@ var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "i
14226
14226
  var DEFAULT_CONTENT_HOST = "https://content.val.build";
14227
14227
  var DEFAULT_APP_HOST = "https://admin.val.build";
14228
14228
  /**
14229
- * Where Val's own immutable build artifacts are served from.
14229
+ * Where Val's own immutable build artifacts are served from: the content
14230
+ * service's `/v1/static`.
14230
14231
  *
14231
14232
  * Only one kind of thing lives here so far: the WebAssembly binary of the
14232
14233
  * bundler the Studio builds a site with. It cannot travel with the Studio's
@@ -14234,11 +14235,23 @@ var DEFAULT_APP_HOST = "https://admin.val.build";
14234
14235
  * TEXT inside the server bundle, which both corrupts it and would carry it
14235
14236
  * into every project that installs `@valbuild/ui`.
14236
14237
  *
14237
- * Everything under this host is addressed by the SHA-256 of its own bytes, so
14238
+ * Everything under this path is addressed by the SHA-256 of its own bytes, so
14238
14239
  * an upload is idempotent, a URL is immutable, and the artifact a build asks
14239
14240
  * for cannot be a different one than the build was made against.
14241
+ *
14242
+ * On content rather than a host of its own because a publish cannot happen
14243
+ * without content anyway -- declare, upload, verify, promote, `/build-target`
14244
+ * and `/project-source` all go through it -- so a separate host would add no
14245
+ * availability and one more domain to every customer's egress allowlist.
14246
+ *
14247
+ * A FIXED LITERAL, and deliberately not derived from a project's configured
14248
+ * content host (`VAL_CONTENT_URL`). Deriving it would make serving this binary
14249
+ * an obligation of every content service anybody points Val at, self-hosted
14250
+ * ones included. A deployment that must fetch it from somewhere else sets
14251
+ * `globalThis.__VAL_ROLLDOWN_WASM_URL__` instead (see
14252
+ * `packages/ui/build/rolldownWasm.ts`).
14240
14253
  */
14241
- var DEFAULT_STATIC_HOST = "https://static.val.build";
14254
+ var DEFAULT_STATIC_HOST = "https://content.val.build/v1/static";
14242
14255
  var Internal = {
14243
14256
  VERSION: {
14244
14257
  core: corePackageJson.version
@@ -14167,7 +14167,7 @@ function isPageRouter(routerId) {
14167
14167
 
14168
14168
  var corePackageJson = {
14169
14169
  name: "@valbuild/core",
14170
- version: "0.136.0",
14170
+ version: "0.136.1",
14171
14171
  "private": false,
14172
14172
  description: "Val - supercharged hard-coded content",
14173
14173
  repository: {
@@ -14226,7 +14226,8 @@ var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "i
14226
14226
  var DEFAULT_CONTENT_HOST = "https://content.val.build";
14227
14227
  var DEFAULT_APP_HOST = "https://admin.val.build";
14228
14228
  /**
14229
- * Where Val's own immutable build artifacts are served from.
14229
+ * Where Val's own immutable build artifacts are served from: the content
14230
+ * service's `/v1/static`.
14230
14231
  *
14231
14232
  * Only one kind of thing lives here so far: the WebAssembly binary of the
14232
14233
  * bundler the Studio builds a site with. It cannot travel with the Studio's
@@ -14234,11 +14235,23 @@ var DEFAULT_APP_HOST = "https://admin.val.build";
14234
14235
  * TEXT inside the server bundle, which both corrupts it and would carry it
14235
14236
  * into every project that installs `@valbuild/ui`.
14236
14237
  *
14237
- * Everything under this host is addressed by the SHA-256 of its own bytes, so
14238
+ * Everything under this path is addressed by the SHA-256 of its own bytes, so
14238
14239
  * an upload is idempotent, a URL is immutable, and the artifact a build asks
14239
14240
  * for cannot be a different one than the build was made against.
14241
+ *
14242
+ * On content rather than a host of its own because a publish cannot happen
14243
+ * without content anyway -- declare, upload, verify, promote, `/build-target`
14244
+ * and `/project-source` all go through it -- so a separate host would add no
14245
+ * availability and one more domain to every customer's egress allowlist.
14246
+ *
14247
+ * A FIXED LITERAL, and deliberately not derived from a project's configured
14248
+ * content host (`VAL_CONTENT_URL`). Deriving it would make serving this binary
14249
+ * an obligation of every content service anybody points Val at, self-hosted
14250
+ * ones included. A deployment that must fetch it from somewhere else sets
14251
+ * `globalThis.__VAL_ROLLDOWN_WASM_URL__` instead (see
14252
+ * `packages/ui/build/rolldownWasm.ts`).
14240
14253
  */
14241
- var DEFAULT_STATIC_HOST = "https://static.val.build";
14254
+ var DEFAULT_STATIC_HOST = "https://content.val.build/v1/static";
14242
14255
  var Internal = {
14243
14256
  VERSION: {
14244
14257
  core: corePackageJson.version
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-8a6c2682.cjs.dev.js');
5
+ var dist_valbuildCore = require('./index-a9e97674.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
 
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-e4035f4d.cjs.prod.js');
5
+ var dist_valbuildCore = require('./index-ab3e94a0.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
 
8
8
 
@@ -1,2 +1,2 @@
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';
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-3b96790c.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.136.0",
3
+ "version": "0.136.1",
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-8a6c2682.cjs.dev.js');
5
+ var dist_valbuildCore = require('../../dist/index-a9e97674.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-e4035f4d.cjs.prod.js');
5
+ var dist_valbuildCore = require('../../dist/index-ab3e94a0.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-84fa4a70.esm.js';
2
- export { P as PatchError } from '../../dist/index-84fa4a70.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-3b96790c.esm.js';
2
+ export { P as PatchError } from '../../dist/index-3b96790c.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