@valbuild/core 0.97.0 → 0.97.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/dist/declarations/src/extractValModules.d.ts +27 -0
- package/dist/declarations/src/index.d.ts +1 -0
- package/dist/declarations/src/selector/index.d.ts +0 -1
- package/dist/{index-96716d5d.cjs.dev.js → index-039896b7.cjs.dev.js} +499 -137
- package/dist/{index-f203e2fa.cjs.prod.js → index-4da4ac5a.cjs.prod.js} +499 -137
- package/dist/{index-50fd9c06.esm.js → index-8c26d8f4.esm.js} +499 -138
- package/dist/valbuild-core.cjs.dev.js +2 -1
- package/dist/valbuild-core.cjs.prod.js +2 -1
- package/dist/valbuild-core.esm.js +1 -1
- package/package.json +1 -1
- package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
- package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
- package/patch/dist/valbuild-core-patch.esm.js +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ValModules } from "./modules.js";
|
|
2
|
+
import type { Schema, SerializedSchema } from "./schema/index.js";
|
|
3
|
+
import { SelectorSource } from "./selector/index.js";
|
|
4
|
+
import { Source } from "./source/index.js";
|
|
5
|
+
import { ModuleFilePath } from "./val/index.js";
|
|
6
|
+
export type ExtractedModuleError = {
|
|
7
|
+
message: string;
|
|
8
|
+
path?: ModuleFilePath;
|
|
9
|
+
};
|
|
10
|
+
export type ExtractedValModules = {
|
|
11
|
+
sources: Record<ModuleFilePath, Source>;
|
|
12
|
+
schemas: Record<ModuleFilePath, Schema<SelectorSource>>;
|
|
13
|
+
serializedSchemas: Record<ModuleFilePath, SerializedSchema>;
|
|
14
|
+
baseSha: string;
|
|
15
|
+
schemaSha: string;
|
|
16
|
+
sourcesSha: string;
|
|
17
|
+
configSha: string;
|
|
18
|
+
moduleErrors: ExtractedModuleError[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Extracts schemas and sources from a ValModules registry and computes the
|
|
22
|
+
* deterministic SHAs that the server and client both use to detect changes.
|
|
23
|
+
*
|
|
24
|
+
* Used by ValOps on the server and by ValSyncEngine on the client so the
|
|
25
|
+
* hash algorithm has a single source of truth.
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractValModules(valModules: ValModules): Promise<ExtractedValModules>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { initVal, type ConfigDirectory } from "./initVal.js";
|
|
2
2
|
export { modules, type ValModules } from "./modules.js";
|
|
3
|
+
export { extractValModules, type ExtractedValModules, type ExtractedModuleError, } from "./extractValModules.js";
|
|
3
4
|
export type { InitVal, ValConfig, ValConstructor, ContentConstructor, } from "./initVal.js";
|
|
4
5
|
export { Schema, type SerializedSchema, type SelectorOfSchema } from "./schema/index.js";
|
|
5
6
|
export type { ImageMetadata } from "./schema/image.js";
|