@valbuild/tanstack-build 0.144.2 → 0.144.4
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 +6 -0
- package/dist/declarations/src/build.d.ts +18 -0
- package/dist/declarations/src/contract.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +1 -0
- package/dist/declarations/src/inputId.d.ts +23 -0
- package/dist/declarations/src/wire.d.ts +8 -0
- package/dist/{regeneratorValues-af449040.esm.js → regeneratorValues-4fe49970.esm.js} +1 -1
- package/dist/valbuild-tanstack-build.cjs.dev.js +3176 -2860
- package/dist/valbuild-tanstack-build.cjs.prod.js +3176 -2860
- package/dist/valbuild-tanstack-build.esm.js +3178 -2864
- package/node/dist/valbuild-tanstack-build-node.esm.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @valbuild/tanstack-build
|
|
2
2
|
|
|
3
|
+
## 0.144.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#835](https://github.com/valbuild/val/pull/835) [`e70a261`](https://github.com/valbuild/val/commit/e70a261ed8c0938b635214721fc4e445704b1f1f) Thanks [@freekh](https://github.com/freekh)! - A build is now named by what it was built from rather than by what it produced, so publishing the same project files again reuses the build the site already has. When that build is still held, the Studio skips building and uploading it.
|
|
8
|
+
|
|
3
9
|
## 0.144.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -122,6 +122,13 @@ export interface BuildInput {
|
|
|
122
122
|
* load unless the project actually renders server components.
|
|
123
123
|
*/
|
|
124
124
|
rsc?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* What the caller adds to the output after the build, by name, each with a
|
|
127
|
+
* value that changes when it does: part of the build's id
|
|
128
|
+
* (`buildInputId`), since the build never sees it. The Studio's carried
|
|
129
|
+
* live stylesheet is one.
|
|
130
|
+
*/
|
|
131
|
+
extraInputs?: Record<string, string>;
|
|
125
132
|
}
|
|
126
133
|
export interface BuildOutput {
|
|
127
134
|
/** ESM module for the Dynamic Worker module map, at key `app.js`. */
|
|
@@ -176,7 +183,18 @@ export interface BuildOutput {
|
|
|
176
183
|
* builds coexist in one map without either knowing about the other.
|
|
177
184
|
*/
|
|
178
185
|
rscCode?: string;
|
|
186
|
+
/**
|
|
187
|
+
* The build's name: a hash of its INPUTS (`buildInputId`), so the same
|
|
188
|
+
* inputs are the same build and the platform builds it once.
|
|
189
|
+
*/
|
|
179
190
|
hash: string;
|
|
191
|
+
/**
|
|
192
|
+
* A hash of what came out: every emitted byte, and the base and layer revs.
|
|
193
|
+
* The build's name until it was named by its inputs; kept to tell two
|
|
194
|
+
* builds of one name apart, should a builder ever emit different bytes from
|
|
195
|
+
* the same inputs.
|
|
196
|
+
*/
|
|
197
|
+
outputHash: string;
|
|
180
198
|
vendorRev: string;
|
|
181
199
|
/** Wall-clock milliseconds per phase; the number the whole design lives on. */
|
|
182
200
|
timings: {
|
|
@@ -30,7 +30,7 @@ export interface UserAppModule {
|
|
|
30
30
|
/** What the studio uploads and the loader Worker stores per publish. */
|
|
31
31
|
export interface PublishManifest {
|
|
32
32
|
projectId: string;
|
|
33
|
-
/**
|
|
33
|
+
/** The build's name, a hash of its inputs (`buildInputId`); the loader's isolate cache id. */
|
|
34
34
|
hash: string;
|
|
35
35
|
/** Vendor artifact revision the app was built against. */
|
|
36
36
|
vendorRev: string;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* is what keeps that true.
|
|
26
26
|
*/
|
|
27
27
|
export * from "./build.js";
|
|
28
|
+
export { buildInputId } from "./inputId.js";
|
|
28
29
|
export { aliasMap, type AliasMap } from "./tsconfigPaths.js";
|
|
29
30
|
export { resolveInFiles } from "./paths.js";
|
|
30
31
|
export { scanCandidates, usesTailwind } from "./tailwind.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BuildInput } from "./build.js";
|
|
2
|
+
/**
|
|
3
|
+
* A BUILD'S NAME: a hash of what it is built from, not of what came out.
|
|
4
|
+
*
|
|
5
|
+
* So the same inputs are the same build, which the platform builds once and
|
|
6
|
+
* then only refers to (valbuild/home `docs/hosted-publishing.md`, step 3).
|
|
7
|
+
* Everything that can change a byte of the output is in it:
|
|
8
|
+
*
|
|
9
|
+
* - this builder's version;
|
|
10
|
+
* - the target, but not the shell revisions, which the loader picks when it
|
|
11
|
+
* serves and which no byte of the build depends on;
|
|
12
|
+
* - every file and the embedded source record (`projectSource`), each by
|
|
13
|
+
* sha256, content included -- the bundle holds it -- and the publish job
|
|
14
|
+
* baked into `val.server.ts` taken out (`withoutBakedJob`), or no two
|
|
15
|
+
* builds would ever be the same;
|
|
16
|
+
* - env, public files, assets, and which options are on;
|
|
17
|
+
* - `extraInputs`: what a caller adds to the output after the build, by
|
|
18
|
+
* name, each value digested here (the Studio's carried public files, and
|
|
19
|
+
* the live stylesheet it ships in place of an empty one).
|
|
20
|
+
*
|
|
21
|
+
* 32 hex characters, as the output hash it replaces.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildInputId(input: BuildInput): Promise<string>;
|
|
@@ -63,6 +63,14 @@ export declare const VAL_SERVER_PATH = "src/val/val.server.ts";
|
|
|
63
63
|
* would be a bug that only shows up on the second publish.
|
|
64
64
|
*/
|
|
65
65
|
export declare function wiredValServer(options: WireOptions): string;
|
|
66
|
+
/**
|
|
67
|
+
* The source with no publish job baked in: what a build's id is taken over
|
|
68
|
+
* (`buildInputId`), so builds of the same inputs for different jobs are the
|
|
69
|
+
* same build. The job only says where a commitless build sits in the content
|
|
70
|
+
* service's chain, and a content version the platform hands the server names
|
|
71
|
+
* its own job, which wins (`ValOpsHttp`).
|
|
72
|
+
*/
|
|
73
|
+
export declare function withoutBakedJob(text: string): string;
|
|
66
74
|
/** The publish job a record is wired for: see `BUILT_FOR_JOB` in the template. */
|
|
67
75
|
export declare function bakedJob(files: Record<string, string>): string | undefined;
|
|
68
76
|
export declare function bakedGit(files: Record<string, string>): {
|
|
@@ -447,4 +447,4 @@ function _regeneratorValues(e) {
|
|
|
447
447
|
throw new TypeError(typeof e + " is not iterable");
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
export { ASSET_BASE as A, INLINE_LIMIT as I, _createForOfIteratorHelper as _, _asyncToGenerator as a, _regenerator as b, _toConsumableArray as c, _slicedToArray as d,
|
|
450
|
+
export { ASSET_BASE as A, INLINE_LIMIT as I, _createForOfIteratorHelper as _, _asyncToGenerator as a, _regenerator as b, _toConsumableArray as c, _slicedToArray as d, _objectSpread2 as e, _defineProperty as f, _regeneratorValues as g, assetModule as h, isAsset as i, base64Bytes as j, resolveAsset as r, sha256Hex as s };
|