@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.
@@ -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";
@@ -23,7 +23,6 @@ export type SelectorSource = SourcePrimitive | undefined | readonly SelectorSour
23
23
  * @internal
24
24
  */
25
25
  export declare const GetSchema: unique symbol;
26
- /**
27
26
  /**
28
27
  * @internal
29
28
  */