@valbuild/server 0.152.2 → 0.153.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 +44 -0
- package/browser/dist/valbuild-server-browser.cjs.dev.js +2 -2
- package/browser/dist/valbuild-server-browser.cjs.prod.js +2 -2
- package/browser/dist/valbuild-server-browser.esm.js +2 -2
- package/dist/{ValRouter-709cceaa.cjs.prod.js → ValRouter-40bf46a2.cjs.prod.js} +86 -11
- package/dist/{ValRouter-ff659cff.cjs.dev.js → ValRouter-6c633acf.cjs.dev.js} +86 -11
- package/dist/{ValRouter-7e314a55.esm.js → ValRouter-db465719.esm.js} +86 -12
- package/dist/{ValRouterCore-a5f17ad7.cjs.dev.js → ValRouterCore-2d86ff95.cjs.prod.js} +305 -251
- package/dist/{ValRouterCore-4e858bec.cjs.prod.js → ValRouterCore-a4d99115.cjs.dev.js} +305 -251
- package/dist/{ValRouterCore-c729eed3.esm.js → ValRouterCore-b3773130.esm.js} +305 -251
- package/dist/declarations/src/ValOps.d.ts +42 -4
- package/dist/declarations/src/ValOpsFS.d.ts +6 -3
- package/dist/declarations/src/ValOpsHttp.d.ts +5 -2
- package/dist/declarations/src/ValOpsMemory.d.ts +3 -2
- package/dist/declarations/src/ValRouter.d.ts +10 -0
- package/dist/declarations/src/ValServer.d.ts +2 -0
- package/dist/declarations/src/draftReads.d.ts +1 -8
- package/dist/declarations/src/internal/index.d.ts +2 -2
- package/dist/declarations/src/proposal.d.ts +19 -3
- package/dist/{draftReads-05415ff6.cjs.dev.js → draftReads-0dcddf72.cjs.prod.js} +0 -17
- package/dist/{draftReads-5f99edd3.esm.js → draftReads-1f29aedd.esm.js} +2 -18
- package/dist/{draftReads-ea3946e0.cjs.prod.js → draftReads-df44e629.cjs.dev.js} +0 -17
- package/dist/{inTabFetch-fb9ee475.cjs.dev.js → inTabFetch-6382d21a.cjs.dev.js} +1 -1
- package/dist/{inTabFetch-b0a0e42f.esm.js → inTabFetch-80b6b9e8.esm.js} +1 -1
- package/dist/{inTabFetch-9b93a5d8.cjs.prod.js → inTabFetch-95c17bcc.cjs.prod.js} +1 -1
- package/dist/{publishKit-9c0c6880.cjs.dev.js → publishKit-500645fd.cjs.dev.js} +2 -2
- package/dist/{publishKit-ba7ff0e3.cjs.prod.js → publishKit-b4c47ed0.cjs.prod.js} +2 -2
- package/dist/{publishKit-5fe7f248.esm.js → publishKit-c03f3e49.esm.js} +3 -3
- package/dist/valbuild-server.cjs.dev.js +2 -2
- package/dist/valbuild-server.cjs.prod.js +2 -2
- package/dist/valbuild-server.esm.js +4 -4
- package/internal/browser/dist/valbuild-server-internal-browser.cjs.dev.js +3 -3
- package/internal/browser/dist/valbuild-server-internal-browser.cjs.prod.js +3 -3
- package/internal/browser/dist/valbuild-server-internal-browser.esm.js +3 -3
- package/internal/dist/valbuild-server-internal.cjs.dev.js +4 -4
- package/internal/dist/valbuild-server-internal.cjs.prod.js +4 -4
- package/internal/dist/valbuild-server-internal.esm.js +3 -3
- package/package.json +4 -4
|
@@ -189,6 +189,14 @@ export declare abstract class ValOps {
|
|
|
189
189
|
* {@link ValOpsOptions.stagedAfterBuild}.
|
|
190
190
|
*/
|
|
191
191
|
private heldStaged;
|
|
192
|
+
/**
|
|
193
|
+
* The Source of each module NEW in the proposal -- staged after the build,
|
|
194
|
+
* and not in it at all -- read from its staged text: what a save applies
|
|
195
|
+
* its patches to and records (`getSources`, `prepare`). Not served: no
|
|
196
|
+
* reader at this build has its schema, and the page's code has not got
|
|
197
|
+
* the module. See {@link readStagedSources}.
|
|
198
|
+
*/
|
|
199
|
+
private stagedNewSources;
|
|
192
200
|
/**
|
|
193
201
|
* What the BUILD evaluated each module to, and its version: before a
|
|
194
202
|
* snapshot, a staging or a publish put anything over it. What a reader's
|
|
@@ -229,7 +237,15 @@ export declare abstract class ValOps {
|
|
|
229
237
|
*/
|
|
230
238
|
abstract getStat(params: {
|
|
231
239
|
baseSha: BaseSha;
|
|
232
|
-
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated Echoed by a Studio of the release that shipped the one
|
|
242
|
+
* content model; a Studio of the release after echoes {@link version}
|
|
243
|
+
* instead and this only when the server sent it. Goes from the wire a
|
|
244
|
+
* release later ("Release-delayed deletions").
|
|
245
|
+
*/
|
|
246
|
+
schemaSha?: SchemaSha;
|
|
247
|
+
/** What the last `/stat` answered: see {@link ValOps.chainBuild}. */
|
|
248
|
+
version?: ProjectVersion;
|
|
233
249
|
patches?: PatchId[];
|
|
234
250
|
profileId?: AuthorId;
|
|
235
251
|
/**
|
|
@@ -447,6 +463,19 @@ export declare abstract class ValOps {
|
|
|
447
463
|
* after the new one is still the old one.
|
|
448
464
|
*/
|
|
449
465
|
chainBaseSha(): Promise<SourcesSha>;
|
|
466
|
+
/**
|
|
467
|
+
* The build the chain is relative to, by its version's name
|
|
468
|
+
* (`ProjectVersion.build`): the newest build's in fs and memory, this
|
|
469
|
+
* instance's own in http -- the same rule as {@link chainBaseSha}, and for
|
|
470
|
+
* the same reason. `/stat` answers it as `version.build`, and the fs and
|
|
471
|
+
* memory long poll compare a Studio's echoed version with it, so every
|
|
472
|
+
* instance answering one store names one build: a Studio parked on the
|
|
473
|
+
* previous build's instance is told of the new build once, not on every
|
|
474
|
+
* poll.
|
|
475
|
+
*/
|
|
476
|
+
chainBuild(): Promise<string>;
|
|
477
|
+
/** This instance's own build, as `ProjectVersion.build` names it. */
|
|
478
|
+
ownBuild(): Promise<string>;
|
|
450
479
|
/**
|
|
451
480
|
* The data layer whose head answers what each module IS for this store's
|
|
452
481
|
* chain (`GET /manifest`, `GET /modules`): this one, unless the store keeps
|
|
@@ -1166,11 +1195,20 @@ export type PreparedCommit = {
|
|
|
1166
1195
|
schema: SerializedSchema;
|
|
1167
1196
|
/**
|
|
1168
1197
|
* `staged:<inputs>`: the module's code is staged in the proposal and
|
|
1169
|
-
* not in this build, so `schema` is not the one `source` fits;
|
|
1170
|
-
* records this as the version's schema instead
|
|
1171
|
-
* "Staged schemas"). Absent for every other module.
|
|
1198
|
+
* not in this build, so `schema` is not the one `source` fits;
|
|
1199
|
+
* content records this as the version's schema instead
|
|
1200
|
+
* (valbuild/home, "Staged schemas"). Absent for every other module.
|
|
1172
1201
|
*/
|
|
1173
1202
|
staged?: string;
|
|
1203
|
+
} | {
|
|
1204
|
+
source: JSONValue | null;
|
|
1205
|
+
/**
|
|
1206
|
+
* A module NEW in the proposal, which this build does not have at
|
|
1207
|
+
* all: there is no schema of this build's to send, and content
|
|
1208
|
+
* records the staging's ({@link staged}) without reading one.
|
|
1209
|
+
*/
|
|
1210
|
+
schema: null;
|
|
1211
|
+
staged: string;
|
|
1174
1212
|
}>;
|
|
1175
1213
|
/**
|
|
1176
1214
|
* Diagnosis only: what the source file looks like with the appliable patches
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PatchId, ModuleFilePath, ValModules } from "@valbuild/core";
|
|
2
2
|
import { AuthorId, BaseSha, BinaryFileType, BinaryFileReader, GenericErrorMessage, MetadataOfType, OpsMetadata, PreparedCommit, ValOps, ValOpsOptions, WithGenericError, SaveSourceFilePatchResult, SchemaSha, CommitSha, OrderedPatches, OrderedPatchesMetadata, SourcesSha } from "./ValOps.js";
|
|
3
|
-
import { Patch, ParentRef, ValCommit } from "@valbuild/shared/internal";
|
|
3
|
+
import { Patch, ParentRef, ValCommit, type ProjectVersion } from "@valbuild/shared/internal";
|
|
4
4
|
import type { HistoryError } from "./history/HistoryError.js";
|
|
5
5
|
import type { AffectedFile, StoredModuleVersion, CommitPage, CommitPatch, HistoricalCommit } from "./history/types.js";
|
|
6
6
|
import { result } from "@valbuild/core/fp";
|
|
@@ -71,8 +71,11 @@ export declare class ValOpsFS extends ValOps {
|
|
|
71
71
|
}>;
|
|
72
72
|
getStat(params: {
|
|
73
73
|
baseSha: BaseSha;
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
/** @deprecated See `ValOps.getStat`: echoed by the previous release. */
|
|
75
|
+
schemaSha?: SchemaSha;
|
|
76
|
+
/** @deprecated See `ValOps.getStat`: echoed by the previous release. */
|
|
77
|
+
sourcesSha?: SourcesSha;
|
|
78
|
+
version?: ProjectVersion;
|
|
76
79
|
patches: PatchId[];
|
|
77
80
|
profileId?: AuthorId;
|
|
78
81
|
jsonEntriesSha?: string;
|
|
@@ -5,7 +5,7 @@ import { type AuthorId, type BaseSha, BinaryFileType, type CommitSha, GenericErr
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import type { HistoryError } from "./history/HistoryError.js";
|
|
7
7
|
import type { AffectedFile, StoredModuleVersion, CommitPage, CommitPatch, HistoricalCommit } from "./history/types.js";
|
|
8
|
-
import { ParentRef, ValCommit, ValDeployment } from "@valbuild/shared/internal";
|
|
8
|
+
import { ParentRef, ValCommit, ValDeployment, type ProjectVersion } from "@valbuild/shared/internal";
|
|
9
9
|
import { result } from "@valbuild/core/fp";
|
|
10
10
|
import { type BuildRegistry } from "@valbuild/shared/internal";
|
|
11
11
|
import type { SketchpadStore } from "./sketchpads/SketchpadStore.js";
|
|
@@ -159,6 +159,8 @@ export declare class ValOpsHttp extends ValOps {
|
|
|
159
159
|
root?: string;
|
|
160
160
|
/** See `projectSource` on {@link ValApiOptions}. */
|
|
161
161
|
projectSource?: Record<string, string>;
|
|
162
|
+
/** See `moduleDependencies` on {@link ValApiOptions}. */
|
|
163
|
+
moduleDependencies?: Record<string, string[]>;
|
|
162
164
|
/** See `publishJob` on {@link ValApiOptions}. */
|
|
163
165
|
publishJob?: string;
|
|
164
166
|
/** See `publishBuild` on {@link ValApiOptions}. */
|
|
@@ -497,7 +499,8 @@ export declare class ValOpsHttp extends ValOps {
|
|
|
497
499
|
private keptStatChain;
|
|
498
500
|
getStat(params: {
|
|
499
501
|
baseSha: BaseSha;
|
|
500
|
-
schemaSha
|
|
502
|
+
schemaSha?: SchemaSha;
|
|
503
|
+
version?: ProjectVersion;
|
|
501
504
|
patches?: PatchId[];
|
|
502
505
|
profileId?: AuthorId;
|
|
503
506
|
} | null): Promise<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModuleFilePath, PatchId, ValModules } from "@valbuild/core";
|
|
2
|
-
import type { Patch, ParentRef } from "@valbuild/shared/internal";
|
|
2
|
+
import type { Patch, ParentRef, ProjectVersion } from "@valbuild/shared/internal";
|
|
3
3
|
import { ValOps, type AuthorId, type BaseSha, type GenericErrorMessage, type MetadataOfType, type OpsMetadata, type OrderedPatches, type OrderedPatchesMetadata, type PreparedCommit, type SaveSourceFilePatchResult, type SchemaSha, type SourcesSha, type ValOpsOptions, type WithGenericError } from "./ValOps.js";
|
|
4
4
|
import type { HistoryError } from "./history/HistoryError.js";
|
|
5
5
|
import type { AffectedFile, CommitPage, CommitPatch, HistoricalCommit, StoredModuleVersion } from "./history/types.js";
|
|
@@ -201,7 +201,8 @@ export declare class ValOpsMemory extends ValOps {
|
|
|
201
201
|
chainBaseSha(): Promise<SourcesSha>;
|
|
202
202
|
getStat(params: {
|
|
203
203
|
baseSha: BaseSha;
|
|
204
|
-
schemaSha
|
|
204
|
+
schemaSha?: SchemaSha;
|
|
205
|
+
version?: ProjectVersion;
|
|
205
206
|
patches?: PatchId[];
|
|
206
207
|
} | null): Promise<{
|
|
207
208
|
type: "request-again" | "no-change" | "did-change";
|
|
@@ -148,6 +148,16 @@ type ValServerOverrides = Partial<{
|
|
|
148
148
|
* itself embeds its source in the build and hands it over here.
|
|
149
149
|
*/
|
|
150
150
|
projectSource?: Record<string, string>;
|
|
151
|
+
/**
|
|
152
|
+
* For each of this build's module files, every project file it depends on
|
|
153
|
+
* as the build resolved its imports (by path with no leading slash,
|
|
154
|
+
* transitive): what tells a proposal's address that a module whose own
|
|
155
|
+
* file is not staged is of code the build was not made of, through a file
|
|
156
|
+
* it imports. A host that builds the project itself hands it over, beside
|
|
157
|
+
* {@link projectSource}; the build platform does, as
|
|
158
|
+
* `platform:val-module-dependencies`. Nothing else should set it.
|
|
159
|
+
*/
|
|
160
|
+
moduleDependencies?: Record<string, string[]>;
|
|
151
161
|
/**
|
|
152
162
|
* The publish job the RUNNING build was made for, when a Studio built it in
|
|
153
163
|
* a tab. Such a build has no commit to name its place in the content
|
|
@@ -155,6 +155,8 @@ export type ValServerConfig = ValServerOptions & ({
|
|
|
155
155
|
root?: string;
|
|
156
156
|
/** See `projectSource` on {@link ValApiOptions}. */
|
|
157
157
|
projectSource?: Record<string, string>;
|
|
158
|
+
/** See `moduleDependencies` on {@link ValApiOptions}. */
|
|
159
|
+
moduleDependencies?: Record<string, string[]>;
|
|
158
160
|
/** See `publishJob` on {@link ValApiOptions}. */
|
|
159
161
|
publishJob?: string;
|
|
160
162
|
/** See `publishBuild` on {@link ValApiOptions}. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Json, type ModuleFilePath
|
|
1
|
+
import { type Json, type ModuleFilePath } from "@valbuild/core";
|
|
2
2
|
import { type ContentSource, type ModuleVersion } from "@valbuild/shared/internal";
|
|
3
3
|
import type { ValRuntime } from "./valRuntime.js";
|
|
4
4
|
type Cookies = {
|
|
@@ -93,11 +93,4 @@ export declare function draftForRequest(opts: {
|
|
|
93
93
|
enabled: boolean;
|
|
94
94
|
draft: ContentSource | null;
|
|
95
95
|
}>;
|
|
96
|
-
/**
|
|
97
|
-
* The version of the schema a reader's own code has for a module: what the
|
|
98
|
-
* readers hold a draft's version against (`layered`'s schema rule), so
|
|
99
|
-
* content is never read with a schema it was not made for. Hashed once per
|
|
100
|
-
* module object, which a build makes once: a load cost, not a read cost.
|
|
101
|
-
*/
|
|
102
|
-
export declare function readerSchemaVersion(module: ValModule<SelectorSource>): string | null;
|
|
103
96
|
export {};
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* readers read from it (`draftForRequest` and friends).
|
|
9
9
|
*/
|
|
10
10
|
export { createValRuntime } from "../ValRouter.js";
|
|
11
|
-
export { draftForRequest, readDraftChanges,
|
|
11
|
+
export { draftForRequest, readDraftChanges, serverDraftSource, } from "../draftReads.js";
|
|
12
12
|
export type { DraftModuleRead } from "../draftReads.js";
|
|
13
|
-
export { proposalAsBuilt, stagedAfterBuild } from "../proposal.js";
|
|
13
|
+
export { proposalAsBuilt, servingBuildOf, stagedAfterBuild, type ServingBuild, } from "../proposal.js";
|
|
14
14
|
export { valRuntime, type ValRuntime } from "../valRuntime.js";
|
|
15
15
|
export { ValHead, headWork, HEAD_BUDGET_BYTES, HEAD_VERSIONS_PER_MODULE, type Draft, type HeadChain, type HeadEntries, type HeadModule, type HeadTree, type ModuleAnswer, } from "../head.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Json, type ModuleFilePath } from "@valbuild/core";
|
|
2
2
|
import type { JSONValue } from "@valbuild/core/patch";
|
|
3
3
|
import { STAGED_SCHEMA_PREFIX } from "@valbuild/shared/internal";
|
|
4
4
|
/**
|
|
@@ -90,7 +90,23 @@ export { STAGED_SCHEMA_PREFIX };
|
|
|
90
90
|
* sound: a module's schema can move with a file it imports, so "its own file
|
|
91
91
|
* is unchanged" never says its code is in the build.
|
|
92
92
|
*/
|
|
93
|
-
export declare function stagedAfterBuild(proposal: Pick<ValProposal, "staged" | "buildInputs">): Record<ModuleFilePath, string>;
|
|
93
|
+
export declare function stagedAfterBuild(proposal: Pick<ValProposal, "staged" | "buildInputs"> & Partial<Pick<ValProposal, "files">>, build?: ServingBuild): Record<ModuleFilePath, string>;
|
|
94
|
+
/**
|
|
95
|
+
* What the build serving the address was made of, as the platform builds it
|
|
96
|
+
* and embeds it: its own source (`platform:project-source`) and, for each
|
|
97
|
+
* module file, every project file it depends on as the build resolved its
|
|
98
|
+
* imports (`moduleDependencies`, by path with no leading slash, transitive).
|
|
99
|
+
* For {@link stagedAfterBuild}.
|
|
100
|
+
*/
|
|
101
|
+
export type ServingBuild = {
|
|
102
|
+
source: Record<string, string>;
|
|
103
|
+
moduleDependencies: Record<string, readonly string[]>;
|
|
104
|
+
};
|
|
105
|
+
/** The {@link ServingBuild} a host handed over, or `undefined` when not both. */
|
|
106
|
+
export declare function servingBuildOf(http: {
|
|
107
|
+
projectSource?: Record<string, string>;
|
|
108
|
+
moduleDependencies?: Record<string, readonly string[]>;
|
|
109
|
+
}): ServingBuild | undefined;
|
|
94
110
|
/**
|
|
95
111
|
* The proposal a platform describes in its runtime env, or `undefined` when
|
|
96
112
|
* this is not a proposal's address.
|
|
@@ -168,7 +184,7 @@ export declare function layeredSnapshot(proposal: Pick<ValProposal, "modules" |
|
|
|
168
184
|
* -- until a build of the staging serves the address. The same rule as
|
|
169
185
|
* `layered`'s, for the one source that carries no version.
|
|
170
186
|
*/
|
|
171
|
-
export declare function proposalAsBuilt<P extends Pick<ValProposal, "modules" | "staged" | "buildInputs"
|
|
187
|
+
export declare function proposalAsBuilt<P extends Pick<ValProposal, "modules" | "staged" | "buildInputs"> & Partial<Pick<ValProposal, "files">>>(proposal: P, build?: ServingBuild): P;
|
|
172
188
|
/**
|
|
173
189
|
* The proposal's saved Source, as Source: every module whose value is JSON.
|
|
174
190
|
* One place, so the server and the readers that render without it agree on
|
|
@@ -343,24 +343,7 @@ function getHost(headers) {
|
|
|
343
343
|
}
|
|
344
344
|
return host ? `${proto}://${host}` : null;
|
|
345
345
|
}
|
|
346
|
-
const schemaVersions = new WeakMap();
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* The version of the schema a reader's own code has for a module: what the
|
|
350
|
-
* readers hold a draft's version against (`layered`'s schema rule), so
|
|
351
|
-
* content is never read with a schema it was not made for. Hashed once per
|
|
352
|
-
* module object, which a build makes once: a load cost, not a read cost.
|
|
353
|
-
*/
|
|
354
|
-
function readerSchemaVersion(module) {
|
|
355
|
-
const cached = schemaVersions.get(module);
|
|
356
|
-
if (cached !== undefined) return cached;
|
|
357
|
-
const schema = core.Internal.getSchema(module);
|
|
358
|
-
const version = schema === undefined ? null : internal.schemaVersionOf(schema["executeSerialize"]());
|
|
359
|
-
schemaVersions.set(module, version);
|
|
360
|
-
return version;
|
|
361
|
-
}
|
|
362
346
|
|
|
363
347
|
exports.draftForRequest = draftForRequest;
|
|
364
348
|
exports.readDraftChanges = readDraftChanges;
|
|
365
|
-
exports.readerSchemaVersion = readerSchemaVersion;
|
|
366
349
|
exports.serverDraftSource = serverDraftSource;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Internal } from '@valbuild/core';
|
|
2
|
-
import { VAL_SESSION_COOKIE
|
|
2
|
+
import { VAL_SESSION_COOKIE } from '@valbuild/shared/internal';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* The draft a server-side reader reads (`fetchVal` and friends, in
|
|
@@ -341,21 +341,5 @@ function getHost(headers) {
|
|
|
341
341
|
}
|
|
342
342
|
return host ? `${proto}://${host}` : null;
|
|
343
343
|
}
|
|
344
|
-
const schemaVersions = new WeakMap();
|
|
345
344
|
|
|
346
|
-
|
|
347
|
-
* The version of the schema a reader's own code has for a module: what the
|
|
348
|
-
* readers hold a draft's version against (`layered`'s schema rule), so
|
|
349
|
-
* content is never read with a schema it was not made for. Hashed once per
|
|
350
|
-
* module object, which a build makes once: a load cost, not a read cost.
|
|
351
|
-
*/
|
|
352
|
-
function readerSchemaVersion(module) {
|
|
353
|
-
const cached = schemaVersions.get(module);
|
|
354
|
-
if (cached !== undefined) return cached;
|
|
355
|
-
const schema = Internal.getSchema(module);
|
|
356
|
-
const version = schema === undefined ? null : schemaVersionOf(schema["executeSerialize"]());
|
|
357
|
-
schemaVersions.set(module, version);
|
|
358
|
-
return version;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export { readerSchemaVersion as a, draftForRequest as d, readDraftChanges as r, serverDraftSource as s };
|
|
345
|
+
export { draftForRequest as d, readDraftChanges as r, serverDraftSource as s };
|
|
@@ -343,24 +343,7 @@ function getHost(headers) {
|
|
|
343
343
|
}
|
|
344
344
|
return host ? `${proto}://${host}` : null;
|
|
345
345
|
}
|
|
346
|
-
const schemaVersions = new WeakMap();
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* The version of the schema a reader's own code has for a module: what the
|
|
350
|
-
* readers hold a draft's version against (`layered`'s schema rule), so
|
|
351
|
-
* content is never read with a schema it was not made for. Hashed once per
|
|
352
|
-
* module object, which a build makes once: a load cost, not a read cost.
|
|
353
|
-
*/
|
|
354
|
-
function readerSchemaVersion(module) {
|
|
355
|
-
const cached = schemaVersions.get(module);
|
|
356
|
-
if (cached !== undefined) return cached;
|
|
357
|
-
const schema = core.Internal.getSchema(module);
|
|
358
|
-
const version = schema === undefined ? null : internal.schemaVersionOf(schema["executeSerialize"]());
|
|
359
|
-
schemaVersions.set(module, version);
|
|
360
|
-
return version;
|
|
361
|
-
}
|
|
362
346
|
|
|
363
347
|
exports.draftForRequest = draftForRequest;
|
|
364
348
|
exports.readDraftChanges = readDraftChanges;
|
|
365
|
-
exports.readerSchemaVersion = readerSchemaVersion;
|
|
366
349
|
exports.serverDraftSource = serverDraftSource;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var core = require('@valbuild/core');
|
|
4
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
4
|
+
var ValRouterCore = require('./ValRouterCore-a4d99115.cjs.dev.js');
|
|
5
5
|
|
|
6
6
|
const NO_SESSIONS = "Val: sessions are not available here -- this server runs in the browser, " + "has no secret to sign them with, and serves without authenticating.";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
2
|
-
import { e as ValOpsMemory, M as bytesToBase64, K as ValServer, L as createValRequestHandler } from './ValRouterCore-
|
|
2
|
+
import { e as ValOpsMemory, M as bytesToBase64, K as ValServer, L as createValRequestHandler } from './ValRouterCore-b3773130.esm.js';
|
|
3
3
|
|
|
4
4
|
const NO_SESSIONS = "Val: sessions are not available here -- this server runs in the browser, " + "has no secret to sign them with, and serves without authenticating.";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var core = require('@valbuild/core');
|
|
4
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
4
|
+
var ValRouterCore = require('./ValRouterCore-2d86ff95.cjs.prod.js');
|
|
5
5
|
|
|
6
6
|
const NO_SESSIONS = "Val: sessions are not available here -- this server runs in the browser, " + "has no secret to sign them with, and serves without authenticating.";
|
|
7
7
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ts = require('typescript');
|
|
4
4
|
var fp = require('@valbuild/core/fp');
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
6
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
5
|
+
var ValRouter = require('./ValRouter-6c633acf.cjs.dev.js');
|
|
6
|
+
var ValRouterCore = require('./ValRouterCore-a4d99115.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
require('@valbuild/ui/server');
|
|
9
9
|
require('path');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ts = require('typescript');
|
|
4
4
|
var fp = require('@valbuild/core/fp');
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
6
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
5
|
+
var ValRouter = require('./ValRouter-40bf46a2.cjs.prod.js');
|
|
6
|
+
var ValRouterCore = require('./ValRouterCore-2d86ff95.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
require('@valbuild/ui/server');
|
|
9
9
|
require('path');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
2
|
import { result, pipe } from '@valbuild/core/fp';
|
|
3
|
-
import { a as analyzeValModule, c as analyzeJsonValuesEntries, T as TSOps } from './ValRouter-
|
|
4
|
-
export { c as analyzeJsonValuesEntries, a as analyzeValModule,
|
|
5
|
-
import { R as bytesToUtf8, S as posixPath } from './ValRouterCore-
|
|
3
|
+
import { a as analyzeValModule, c as analyzeJsonValuesEntries, T as TSOps } from './ValRouter-db465719.esm.js';
|
|
4
|
+
export { c as analyzeJsonValuesEntries, a as analyzeValModule, a8 as evaluateModuleSource, i as insertValJsonEntry, a9 as jsonValuesRecordKeys, r as removeValJsonEntry } from './ValRouter-db465719.esm.js';
|
|
5
|
+
import { R as bytesToUtf8, S as posixPath } from './ValRouterCore-b3773130.esm.js';
|
|
6
6
|
import '@valbuild/core';
|
|
7
7
|
import '@valbuild/ui/server';
|
|
8
8
|
import 'path';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
5
|
+
var ValRouter = require('./ValRouter-6c633acf.cjs.dev.js');
|
|
6
6
|
var patch = require('@valbuild/core/patch');
|
|
7
7
|
var fp = require('@valbuild/core/fp');
|
|
8
8
|
var core = require('@valbuild/core');
|
|
@@ -11,7 +11,7 @@ var path = require('path');
|
|
|
11
11
|
var fs = require('fs');
|
|
12
12
|
var vm = require('node:vm');
|
|
13
13
|
var node_module = require('node:module');
|
|
14
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
14
|
+
var ValRouterCore = require('./ValRouterCore-a4d99115.cjs.dev.js');
|
|
15
15
|
var internal = require('@valbuild/shared/internal');
|
|
16
16
|
var sucrase = require('sucrase');
|
|
17
17
|
var fs$1 = require('fs/promises');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
5
|
+
var ValRouter = require('./ValRouter-40bf46a2.cjs.prod.js');
|
|
6
6
|
var patch = require('@valbuild/core/patch');
|
|
7
7
|
var fp = require('@valbuild/core/fp');
|
|
8
8
|
var core = require('@valbuild/core');
|
|
@@ -11,7 +11,7 @@ var path = require('path');
|
|
|
11
11
|
var fs = require('fs');
|
|
12
12
|
var vm = require('node:vm');
|
|
13
13
|
var node_module = require('node:module');
|
|
14
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
14
|
+
var ValRouterCore = require('./ValRouterCore-2d86ff95.cjs.prod.js');
|
|
15
15
|
var internal = require('@valbuild/shared/internal');
|
|
16
16
|
var sucrase = require('sucrase');
|
|
17
17
|
var fs$1 = require('fs/promises');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TSOps, a as analyzeValModule, f as flatMapErrors, b as formatSyntaxError, c as analyzeJsonValuesEntries, r as removeValJsonEntry, i as insertValJsonEntry, d as collectionReferencePatches, e as checkGalleryFiles, h as handleVideoUploadRemote, g as handleVideoDownloadRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, l as handleVideosetCheckRemote, m as handleVideosetCheckAllFiles, n as canReadVideoMetadata, u as unreadableVideoMetadataMessage, o as localFilesWarning, p as openRemoteUploadSession, q as uploadBytesToRemote, s as getPersonalAccessTokenPath, V as ValOpsFS } from './ValRouter-
|
|
2
|
-
export { F as APP_MODE_REQUIRES_REMOTE_FILES, V as ValOpsFS, X as ValOpsHttp, a as analyzeValModule, R as checkRemoteRef, x as contentFromEnv, H as createFixPatch, t as createValApiRouter, D as createValOps, v as createValServer, a0 as decodeJwtWithoutVerifying, _ as describePatchStoreProblems, S as downloadFileFromRemote, a2 as encodeJwt, M as extractFileMetadata, L as extractImageMetadata, N as extractVideoMetadata, O as extractVideoMetadataFromFile, P as filesOfVideo, J as filesOfVideosetEntry, G as formatSyntaxErrorTree, U as getCachedRemoteFileDir, W as getCachedRemoteFilePath, a1 as getExpire, s as getPersonalAccessTokenPath, Q as getValidationErrorFileRef, m as handleVideosetCheckAllFiles, l as handleVideosetCheckRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, C as initHandlerOptions, z as layeredSnapshot, Y as loadTypeScriptKit, K as parsePersonalAccessTokenFile, y as proposalFromEnv, A as proposalSnapshot, B as proposalSnapshotForReaders, Z as readPatchStore, E as resolveRemoteFileAuth, w as safeReadGit, $ as verifyJwt, I as videosetEntryVideoSchema } from './ValRouter-
|
|
1
|
+
import { T as TSOps, a as analyzeValModule, f as flatMapErrors, b as formatSyntaxError, c as analyzeJsonValuesEntries, r as removeValJsonEntry, i as insertValJsonEntry, d as collectionReferencePatches, e as checkGalleryFiles, h as handleVideoUploadRemote, g as handleVideoDownloadRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, l as handleVideosetCheckRemote, m as handleVideosetCheckAllFiles, n as canReadVideoMetadata, u as unreadableVideoMetadataMessage, o as localFilesWarning, p as openRemoteUploadSession, q as uploadBytesToRemote, s as getPersonalAccessTokenPath, V as ValOpsFS } from './ValRouter-db465719.esm.js';
|
|
2
|
+
export { F as APP_MODE_REQUIRES_REMOTE_FILES, V as ValOpsFS, X as ValOpsHttp, a as analyzeValModule, R as checkRemoteRef, x as contentFromEnv, H as createFixPatch, t as createValApiRouter, D as createValOps, v as createValServer, a0 as decodeJwtWithoutVerifying, _ as describePatchStoreProblems, S as downloadFileFromRemote, a2 as encodeJwt, M as extractFileMetadata, L as extractImageMetadata, N as extractVideoMetadata, O as extractVideoMetadataFromFile, P as filesOfVideo, J as filesOfVideosetEntry, G as formatSyntaxErrorTree, U as getCachedRemoteFileDir, W as getCachedRemoteFilePath, a1 as getExpire, s as getPersonalAccessTokenPath, Q as getValidationErrorFileRef, m as handleVideosetCheckAllFiles, l as handleVideosetCheckRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, C as initHandlerOptions, z as layeredSnapshot, Y as loadTypeScriptKit, K as parsePersonalAccessTokenFile, y as proposalFromEnv, A as proposalSnapshot, B as proposalSnapshotForReaders, Z as readPatchStore, E as resolveRemoteFileAuth, w as safeReadGit, $ as verifyJwt, I as videosetEntryVideoSchema } from './ValRouter-db465719.esm.js';
|
|
3
3
|
import { applyPatch, PatchError, JSONOps, deepClone } from '@valbuild/core/patch';
|
|
4
4
|
import { pipe, result } from '@valbuild/core/fp';
|
|
5
5
|
import { derefPatch, Internal, extractValModules, DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
@@ -9,8 +9,8 @@ import path from 'path';
|
|
|
9
9
|
import fs from 'fs';
|
|
10
10
|
import vm from 'node:vm';
|
|
11
11
|
import { Module } from 'node:module';
|
|
12
|
-
import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, g as getNewJsonEntryPaths, a as formatPatchSourceError, V as VAL_CLIENT_HEADERS } from './ValRouterCore-
|
|
13
|
-
export { I as InMemoryPatchStore, e as ValOpsMemory, b as askOncePerHost, a as formatPatchSourceError, d as getFileExt, c as getSettings, u as uploadRemoteFile } from './ValRouterCore-
|
|
12
|
+
import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, g as getNewJsonEntryPaths, a as formatPatchSourceError, V as VAL_CLIENT_HEADERS } from './ValRouterCore-b3773130.esm.js';
|
|
13
|
+
export { I as InMemoryPatchStore, e as ValOpsMemory, b as askOncePerHost, a as formatPatchSourceError, d as getFileExt, c as getSettings, u as uploadRemoteFile } from './ValRouterCore-b3773130.esm.js';
|
|
14
14
|
import { isJsonValuesRootOp, rebaseContentOp, classifyJsonValuesOp, richTextImageSchema } from '@valbuild/shared/internal';
|
|
15
15
|
export { classifyJsonValuesOp, rebaseContentOp } from '@valbuild/shared/internal';
|
|
16
16
|
import { transform } from 'sucrase';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var inTabFetch = require('../../../dist/inTabFetch-
|
|
6
|
-
var draftReads = require('../../../dist/draftReads-
|
|
5
|
+
var inTabFetch = require('../../../dist/inTabFetch-6382d21a.cjs.dev.js');
|
|
6
|
+
var draftReads = require('../../../dist/draftReads-df44e629.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
|
-
require('../../../dist/ValRouterCore-
|
|
8
|
+
require('../../../dist/ValRouterCore-a4d99115.cjs.dev.js');
|
|
9
9
|
require('zod');
|
|
10
10
|
require('@valbuild/shared/internal');
|
|
11
11
|
require('zod-validation-error');
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var inTabFetch = require('../../../dist/inTabFetch-
|
|
6
|
-
var draftReads = require('../../../dist/draftReads-
|
|
5
|
+
var inTabFetch = require('../../../dist/inTabFetch-95c17bcc.cjs.prod.js');
|
|
6
|
+
var draftReads = require('../../../dist/draftReads-0dcddf72.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
|
-
require('../../../dist/ValRouterCore-
|
|
8
|
+
require('../../../dist/ValRouterCore-2d86ff95.cjs.prod.js');
|
|
9
9
|
require('zod');
|
|
10
10
|
require('@valbuild/shared/internal');
|
|
11
11
|
require('zod-validation-error');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as createInTabVal } from '../../../dist/inTabFetch-
|
|
2
|
-
export { s as serverDraftSource } from '../../../dist/draftReads-
|
|
1
|
+
export { a as createInTabVal } from '../../../dist/inTabFetch-80b6b9e8.esm.js';
|
|
2
|
+
export { s as serverDraftSource } from '../../../dist/draftReads-1f29aedd.esm.js';
|
|
3
3
|
import '@valbuild/core';
|
|
4
|
-
import '../../../dist/ValRouterCore-
|
|
4
|
+
import '../../../dist/ValRouterCore-b3773130.esm.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '@valbuild/shared/internal';
|
|
7
7
|
import 'zod-validation-error';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('../../dist/ValRouter-
|
|
6
|
-
var draftReads = require('../../dist/draftReads-
|
|
7
|
-
var ValRouterCore = require('../../dist/ValRouterCore-
|
|
5
|
+
var ValRouter = require('../../dist/ValRouter-6c633acf.cjs.dev.js');
|
|
6
|
+
var draftReads = require('../../dist/draftReads-df44e629.cjs.dev.js');
|
|
7
|
+
var ValRouterCore = require('../../dist/ValRouterCore-a4d99115.cjs.dev.js');
|
|
8
8
|
require('@valbuild/core');
|
|
9
9
|
require('@valbuild/ui/server');
|
|
10
10
|
require('path');
|
|
@@ -31,11 +31,11 @@ require('https');
|
|
|
31
31
|
|
|
32
32
|
exports.createValRuntime = ValRouter.createValRuntime;
|
|
33
33
|
exports.proposalAsBuilt = ValRouter.proposalAsBuilt;
|
|
34
|
+
exports.servingBuildOf = ValRouter.servingBuildOf;
|
|
34
35
|
exports.stagedAfterBuild = ValRouter.stagedAfterBuild;
|
|
35
36
|
exports.valRuntime = ValRouter.valRuntime;
|
|
36
37
|
exports.draftForRequest = draftReads.draftForRequest;
|
|
37
38
|
exports.readDraftChanges = draftReads.readDraftChanges;
|
|
38
|
-
exports.readerSchemaVersion = draftReads.readerSchemaVersion;
|
|
39
39
|
exports.serverDraftSource = draftReads.serverDraftSource;
|
|
40
40
|
exports.HEAD_BUDGET_BYTES = ValRouterCore.HEAD_BUDGET_BYTES;
|
|
41
41
|
exports.HEAD_VERSIONS_PER_MODULE = ValRouterCore.HEAD_VERSIONS_PER_MODULE;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('../../dist/ValRouter-
|
|
6
|
-
var draftReads = require('../../dist/draftReads-
|
|
7
|
-
var ValRouterCore = require('../../dist/ValRouterCore-
|
|
5
|
+
var ValRouter = require('../../dist/ValRouter-40bf46a2.cjs.prod.js');
|
|
6
|
+
var draftReads = require('../../dist/draftReads-0dcddf72.cjs.prod.js');
|
|
7
|
+
var ValRouterCore = require('../../dist/ValRouterCore-2d86ff95.cjs.prod.js');
|
|
8
8
|
require('@valbuild/core');
|
|
9
9
|
require('@valbuild/ui/server');
|
|
10
10
|
require('path');
|
|
@@ -31,11 +31,11 @@ require('https');
|
|
|
31
31
|
|
|
32
32
|
exports.createValRuntime = ValRouter.createValRuntime;
|
|
33
33
|
exports.proposalAsBuilt = ValRouter.proposalAsBuilt;
|
|
34
|
+
exports.servingBuildOf = ValRouter.servingBuildOf;
|
|
34
35
|
exports.stagedAfterBuild = ValRouter.stagedAfterBuild;
|
|
35
36
|
exports.valRuntime = ValRouter.valRuntime;
|
|
36
37
|
exports.draftForRequest = draftReads.draftForRequest;
|
|
37
38
|
exports.readDraftChanges = draftReads.readDraftChanges;
|
|
38
|
-
exports.readerSchemaVersion = draftReads.readerSchemaVersion;
|
|
39
39
|
exports.serverDraftSource = draftReads.serverDraftSource;
|
|
40
40
|
exports.HEAD_BUDGET_BYTES = ValRouterCore.HEAD_BUDGET_BYTES;
|
|
41
41
|
exports.HEAD_VERSIONS_PER_MODULE = ValRouterCore.HEAD_VERSIONS_PER_MODULE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { a3 as createValRuntime, a4 as proposalAsBuilt, a5 as
|
|
2
|
-
export { d as draftForRequest, r as readDraftChanges,
|
|
3
|
-
export { P as HEAD_BUDGET_BYTES, Q as HEAD_VERSIONS_PER_MODULE, N as ValHead, O as headWork } from '../../dist/ValRouterCore-
|
|
1
|
+
export { a3 as createValRuntime, a4 as proposalAsBuilt, a5 as servingBuildOf, a6 as stagedAfterBuild, a7 as valRuntime } from '../../dist/ValRouter-db465719.esm.js';
|
|
2
|
+
export { d as draftForRequest, r as readDraftChanges, s as serverDraftSource } from '../../dist/draftReads-1f29aedd.esm.js';
|
|
3
|
+
export { P as HEAD_BUDGET_BYTES, Q as HEAD_VERSIONS_PER_MODULE, N as ValHead, O as headWork } from '../../dist/ValRouterCore-b3773130.esm.js';
|
|
4
4
|
import '@valbuild/core';
|
|
5
5
|
import '@valbuild/ui/server';
|
|
6
6
|
import 'path';
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"exports": true
|
|
39
39
|
},
|
|
40
|
-
"version": "0.
|
|
40
|
+
"version": "0.153.1",
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@prettier/sync": "^0.6.1",
|
|
43
43
|
"@types/jest": "^30.0.0",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"typescript": "^6.0.3",
|
|
52
52
|
"zod": "^4.4.3",
|
|
53
53
|
"zod-validation-error": "^5.0.0",
|
|
54
|
-
"@valbuild/
|
|
55
|
-
"@valbuild/
|
|
56
|
-
"@valbuild/
|
|
54
|
+
"@valbuild/core": "0.153.0",
|
|
55
|
+
"@valbuild/shared": "0.153.1",
|
|
56
|
+
"@valbuild/ui": "0.153.1"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": "^20.19.0 || >=22"
|