@valbuild/tanstack-build 0.150.9 → 0.151.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 +55 -0
- package/README.md +5 -0
- package/constants/dist/valbuild-tanstack-build-constants.cjs.dev.js +1 -1
- package/constants/dist/valbuild-tanstack-build-constants.cjs.prod.js +1 -1
- package/constants/dist/valbuild-tanstack-build-constants.esm.js +1 -1
- package/dist/declarations/src/projectPaths.d.ts +12 -0
- package/dist/declarations/src/valModules.d.ts +22 -0
- package/dist/{projectPaths-5e4defea.esm.js → projectPaths-521a37ed.esm.js} +16 -1
- package/dist/{projectPaths-9cbecebf.cjs.prod.js → projectPaths-cb474a60.cjs.dev.js} +16 -0
- package/dist/{projectPaths-f222255a.cjs.dev.js → projectPaths-d08a9ea7.cjs.prod.js} +16 -0
- package/dist/{regeneratorValues-a8bd356a.esm.js → regeneratorValues-56b72784.esm.js} +1 -1
- package/dist/valbuild-tanstack-build.cjs.dev.js +544 -433
- package/dist/valbuild-tanstack-build.cjs.prod.js +544 -433
- package/dist/valbuild-tanstack-build.esm.js +547 -436
- package/node/dist/valbuild-tanstack-build-node.cjs.dev.js +1 -1
- package/node/dist/valbuild-tanstack-build-node.cjs.prod.js +1 -1
- package/node/dist/valbuild-tanstack-build-node.esm.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @valbuild/tanstack-build
|
|
2
2
|
|
|
3
|
+
## 0.151.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1006](https://github.com/valbuild/val/pull/1006) [`04bae7e`](https://github.com/valbuild/val/commit/04bae7e54e6b191fc70f45e6f10bbce820b6069c) Thanks [@freekh](https://github.com/freekh)! - **No more "A new version has been deployed" dialog.** A Studio that is open
|
|
8
|
+
while the site is deployed no longer stops you with a dialog you can only
|
|
9
|
+
answer by reloading. Instead:
|
|
10
|
+
|
|
11
|
+
- **On Val's hosting**, the Studio takes the new build's fields in where you
|
|
12
|
+
are, without reloading: a field the deploy added can be filled in at once,
|
|
13
|
+
and the assistant's chat, the page you were on and your unsaved edits stay
|
|
14
|
+
as they were. Each build now carries its content schemas as a small file of
|
|
15
|
+
its own beside its scripts, which the Studio loads.
|
|
16
|
+
- **Anywhere else** (a Next.js site, or a TanStack Start site hosted
|
|
17
|
+
somewhere else), the Studio reloads itself a few seconds after the deploy,
|
|
18
|
+
once everything you typed has been saved. Nothing is lost: where you were is
|
|
19
|
+
in the address, and every edit is on the server.
|
|
20
|
+
- **In local development** nothing changes: your dev server's hot reload
|
|
21
|
+
brings the new fields, as before.
|
|
22
|
+
|
|
23
|
+
When a deploy upgrades Val itself, the Studio reloads itself the same way,
|
|
24
|
+
since its own code changed too.
|
|
25
|
+
|
|
26
|
+
- [#1006](https://github.com/valbuild/val/pull/1006) [`be276e7`](https://github.com/valbuild/val/commit/be276e76f5849fcc421398abdb7e114f3de4d3e8) Thanks [@freekh](https://github.com/freekh)! - In a proposal in code mode, an edit to a field the assistant has just added is
|
|
27
|
+
saved with the assistant's next change, without waiting for the proposal to be
|
|
28
|
+
built.
|
|
29
|
+
|
|
30
|
+
The Studio already let you type into a field that only the assistant's staged
|
|
31
|
+
code has. But the save that runs before the assistant's next change applied
|
|
32
|
+
your edit to the content as the proposal's last build had it -- without the new
|
|
33
|
+
field -- so it failed, and the assistant's next change was refused ("the
|
|
34
|
+
changes waiting to be saved could not be saved first") until someone pressed
|
|
35
|
+
Build.
|
|
36
|
+
|
|
37
|
+
Val's server at the proposal's address now learns which staged code the build
|
|
38
|
+
it runs was made of (the platform hands it over beside the build), and saves a
|
|
39
|
+
module whose code was staged after that build from the staged `.val.ts` itself.
|
|
40
|
+
A page at the address keeps reading such a module as its build has it until a
|
|
41
|
+
build of the new code serves it, so it never shows content made for code it
|
|
42
|
+
does not have.
|
|
43
|
+
|
|
44
|
+
When the server cannot read a staged module's content without running it --
|
|
45
|
+
its content is built by code, or it is a `.jsonValues()` record -- the edit is
|
|
46
|
+
kept, and the assistant's change is refused saying the proposal has to be built
|
|
47
|
+
first, rather than failing with no reason.
|
|
48
|
+
|
|
49
|
+
`@valbuild/tanstack-build` rewrites the proposal block of a `val.server.ts`
|
|
50
|
+
generated before this, so a site picks it up at its next build.
|
|
51
|
+
|
|
52
|
+
## 0.150.12
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- [#980](https://github.com/valbuild/val/pull/980) [`46f07c7`](https://github.com/valbuild/val/commit/46f07c77f71b0d3b1f3964d648ff31eaf8e5eec3) Thanks [@freekh](https://github.com/freekh)! - Building a site in Safari (and every browser on an iPhone) no longer fails with "Cannot access '…' before initialization". The browser build loaded rolldown's bundler and its parser at the same time, and Safari could hand back the bundler before it had finished loading; they now load one after the other.
|
|
57
|
+
|
|
3
58
|
## 0.150.9
|
|
4
59
|
|
|
5
60
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -20,6 +20,11 @@ package because they are one decision — what a published build IS.
|
|
|
20
20
|
`BuildTarget` and produces the server, client and (optionally) RSC bundles,
|
|
21
21
|
the CSS, the assets and the chunk map. It runs on `@rolldown/browser`, so it
|
|
22
22
|
runs in a tab.
|
|
23
|
+
- **The build's Val modules, for an open Studio.** Beside its client chunks,
|
|
24
|
+
every build emits the project's `val.modules` as one ES module named after
|
|
25
|
+
the build (`val-modules-<build>.js`, `valModulesEntry`). The server running
|
|
26
|
+
the build names it on its manifest, and a Studio opened on an older build
|
|
27
|
+
imports it to take the new schemas in without reloading the page.
|
|
23
28
|
- **The wiring.** `wireUp(files, options)` turns an imported checkout into
|
|
24
29
|
something a host with no filesystem can serve: it writes the project's
|
|
25
30
|
`src/val/val.server.ts` against `@valbuild/tanstack/server`. That file is the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var projectPaths = require('../../dist/projectPaths-
|
|
5
|
+
var projectPaths = require('../../dist/projectPaths-cb474a60.cjs.dev.js');
|
|
6
6
|
var artifactKeys = require('../../dist/artifactKeys-ad3e41fc.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 projectPaths = require('../../dist/projectPaths-
|
|
5
|
+
var projectPaths = require('../../dist/projectPaths-d08a9ea7.cjs.prod.js');
|
|
6
6
|
var artifactKeys = require('../../dist/artifactKeys-700b9044.cjs.prod.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { E as ENTRY, a as ENTRY_SHIM, R as ROUTES_DIR, T as TREE } from '../../dist/projectPaths-
|
|
1
|
+
export { E as ENTRY, a as ENTRY_SHIM, R as ROUTES_DIR, T as TREE } from '../../dist/projectPaths-521a37ed.esm.js';
|
|
2
2
|
export { A as ARTIFACT_KEYS, a as ARTIFACT_PREFIXES } from '../../dist/artifactKeys-3a40f3a0.esm.js';
|
|
@@ -22,3 +22,15 @@ export declare const ROUTES_DIR = "src/routes";
|
|
|
22
22
|
* the platform's browser generator, which reaches it through `/constants`).
|
|
23
23
|
*/
|
|
24
24
|
export declare const ENTRY_SHIM = "export { routeTree } from './routeTree.gen'\n";
|
|
25
|
+
/**
|
|
26
|
+
* The file a build's `val.modules` registry is emitted as, among its client
|
|
27
|
+
* chunks: served at `/_app/val-modules-<build>.js`, where a Studio opened
|
|
28
|
+
* on an older build imports it to take this build's code in without
|
|
29
|
+
* reloading the page. The server running the build names it on its
|
|
30
|
+
* manifest by the same name (`valModulesEntryPath` in
|
|
31
|
+
* `@valbuild/shared/internal`). Neither package depends on the other, so each
|
|
32
|
+
* pins the same literal, `val-modules-<build>.js`: `valModules.test.ts` here,
|
|
33
|
+
* `buildRegistry.test.ts` there. Not exported: the name is a contract
|
|
34
|
+
* between the two, not API. See `valModulesEntry`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function valModulesEntryFile(build: string): string;
|
|
@@ -27,3 +27,25 @@ export declare function bundleValModules(input: {
|
|
|
27
27
|
}): Promise<{
|
|
28
28
|
code: string;
|
|
29
29
|
}>;
|
|
30
|
+
/**
|
|
31
|
+
* A build's `val.modules` registry, as the build emits it beside its client
|
|
32
|
+
* chunks: `{ "val-modules-<build>.js": code }`, served at `/_app/` with
|
|
33
|
+
* them, its npm imports pointing at the site's vendor chunks on its own
|
|
34
|
+
* origin (`/_vendor/`, `/_pvendor/<rev>/`) as the client bundle's do.
|
|
35
|
+
*
|
|
36
|
+
* What a Studio opened on an older build imports, once the server's
|
|
37
|
+
* manifest names it (`registry`, from the build's name the platform hands
|
|
38
|
+
* the server: `VAL_BUILD`), to take this build's schemas in WITHOUT
|
|
39
|
+
* reloading the page: `HostStore.reloadCode` in `@valbuild/ui`, and phase 9
|
|
40
|
+
* of `docs/plans/one-content-model.md` in valbuild/val.
|
|
41
|
+
*
|
|
42
|
+
* Empty -- and the build goes on -- for a project with no `val.modules.ts`,
|
|
43
|
+
* or one whose Val modules cannot be bundled for the browser (a `.val.ts`
|
|
44
|
+
* importing something server-only): such a build has no entry, and a Studio
|
|
45
|
+
* that cannot import one reloads the page instead, as it did before. Said
|
|
46
|
+
* in the build's warnings.
|
|
47
|
+
*/
|
|
48
|
+
export declare function valModulesEntry(input: {
|
|
49
|
+
files: Record<string, string>;
|
|
50
|
+
target: BuildTarget;
|
|
51
|
+
}, build: string, warnings: string[]): Promise<Record<string, string>>;
|
|
@@ -27,4 +27,19 @@ var ROUTES_DIR = "src/routes";
|
|
|
27
27
|
*/
|
|
28
28
|
var ENTRY_SHIM = "export { routeTree } from './routeTree.gen'\n";
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The file a build's `val.modules` registry is emitted as, among its client
|
|
32
|
+
* chunks: served at `/_app/val-modules-<build>.js`, where a Studio opened
|
|
33
|
+
* on an older build imports it to take this build's code in without
|
|
34
|
+
* reloading the page. The server running the build names it on its
|
|
35
|
+
* manifest by the same name (`valModulesEntryPath` in
|
|
36
|
+
* `@valbuild/shared/internal`). Neither package depends on the other, so each
|
|
37
|
+
* pins the same literal, `val-modules-<build>.js`: `valModules.test.ts` here,
|
|
38
|
+
* `buildRegistry.test.ts` there. Not exported: the name is a contract
|
|
39
|
+
* between the two, not API. See `valModulesEntry`.
|
|
40
|
+
*/
|
|
41
|
+
function valModulesEntryFile(build) {
|
|
42
|
+
return "val-modules-".concat(build, ".js");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { ENTRY as E, ROUTES_DIR as R, TREE as T, ENTRY_SHIM as a, valModulesEntryFile as v };
|
|
@@ -29,7 +29,23 @@ var ROUTES_DIR = "src/routes";
|
|
|
29
29
|
*/
|
|
30
30
|
var ENTRY_SHIM = "export { routeTree } from './routeTree.gen'\n";
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* The file a build's `val.modules` registry is emitted as, among its client
|
|
34
|
+
* chunks: served at `/_app/val-modules-<build>.js`, where a Studio opened
|
|
35
|
+
* on an older build imports it to take this build's code in without
|
|
36
|
+
* reloading the page. The server running the build names it on its
|
|
37
|
+
* manifest by the same name (`valModulesEntryPath` in
|
|
38
|
+
* `@valbuild/shared/internal`). Neither package depends on the other, so each
|
|
39
|
+
* pins the same literal, `val-modules-<build>.js`: `valModules.test.ts` here,
|
|
40
|
+
* `buildRegistry.test.ts` there. Not exported: the name is a contract
|
|
41
|
+
* between the two, not API. See `valModulesEntry`.
|
|
42
|
+
*/
|
|
43
|
+
function valModulesEntryFile(build) {
|
|
44
|
+
return "val-modules-".concat(build, ".js");
|
|
45
|
+
}
|
|
46
|
+
|
|
32
47
|
exports.ENTRY = ENTRY;
|
|
33
48
|
exports.ENTRY_SHIM = ENTRY_SHIM;
|
|
34
49
|
exports.ROUTES_DIR = ROUTES_DIR;
|
|
35
50
|
exports.TREE = TREE;
|
|
51
|
+
exports.valModulesEntryFile = valModulesEntryFile;
|
|
@@ -29,7 +29,23 @@ var ROUTES_DIR = "src/routes";
|
|
|
29
29
|
*/
|
|
30
30
|
var ENTRY_SHIM = "export { routeTree } from './routeTree.gen'\n";
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* The file a build's `val.modules` registry is emitted as, among its client
|
|
34
|
+
* chunks: served at `/_app/val-modules-<build>.js`, where a Studio opened
|
|
35
|
+
* on an older build imports it to take this build's code in without
|
|
36
|
+
* reloading the page. The server running the build names it on its
|
|
37
|
+
* manifest by the same name (`valModulesEntryPath` in
|
|
38
|
+
* `@valbuild/shared/internal`). Neither package depends on the other, so each
|
|
39
|
+
* pins the same literal, `val-modules-<build>.js`: `valModules.test.ts` here,
|
|
40
|
+
* `buildRegistry.test.ts` there. Not exported: the name is a contract
|
|
41
|
+
* between the two, not API. See `valModulesEntry`.
|
|
42
|
+
*/
|
|
43
|
+
function valModulesEntryFile(build) {
|
|
44
|
+
return "val-modules-".concat(build, ".js");
|
|
45
|
+
}
|
|
46
|
+
|
|
32
47
|
exports.ENTRY = ENTRY;
|
|
33
48
|
exports.ENTRY_SHIM = ENTRY_SHIM;
|
|
34
49
|
exports.ROUTES_DIR = ROUTES_DIR;
|
|
35
50
|
exports.TREE = TREE;
|
|
51
|
+
exports.valModulesEntryFile = valModulesEntryFile;
|
|
@@ -457,4 +457,4 @@ function _regeneratorValues(e) {
|
|
|
457
457
|
throw new TypeError(typeof e + " is not iterable");
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
-
export { ASSET_BASE as A, INLINE_LIMIT as I,
|
|
460
|
+
export { ASSET_BASE as A, INLINE_LIMIT as I, _asyncToGenerator as _, _regenerator as a, _createForOfIteratorHelper as b, _toConsumableArray as c, _slicedToArray as d, _typeof as e, _objectSpread2 as f, _defineProperty as g, _regeneratorValues as h, assetModule as i, isAsset as j, base64Bytes as k, _toPropertyKey as l, resolveAsset as r, sha256Hex as s };
|