@expofp/config 3.29.0 → 3.30.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/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { parseDeprecatedUrlParams } from './lib/deprecated-url-params.js';
5
5
  export { type LegacyOneShot, type LegacyPrimary, type LegacyUrlQuery, parseLegacyQuery, serializeSelection, splitPlatformParams, type UrlSelection, } from './lib/legacy-url.js';
6
6
  export { loadConfig } from './lib/load-config.js';
7
7
  export { type StorageLike } from './lib/local-storage-codec.js';
8
- export { type ConfigResourceStore, serializeConfigResources, } from './lib/serialize-config-resources.js';
8
+ export { type ConfigResourceStore, serializationFormat, serializeConfigResources, SERIALIZER_VERSION, } from './lib/serialize-config-resources.js';
9
9
  export { compactUrl, resolveUrl } from './lib/store-ref.js';
10
10
  export { parseFromUrlTolerant } from './lib/url-codec.js';
11
11
  export { parseIntentsFromUrl } from './lib/url-intents.js';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ export { toDebugSettings } from './lib/debug-settings.js';
6
6
  export { parseDeprecatedUrlParams } from './lib/deprecated-url-params.js';
7
7
  export { parseLegacyQuery, serializeSelection, splitPlatformParams, } from './lib/legacy-url.js';
8
8
  export { loadConfig } from './lib/load-config.js';
9
- export { serializeConfigResources, } from './lib/serialize-config-resources.js';
9
+ export { serializationFormat, serializeConfigResources, SERIALIZER_VERSION, } from './lib/serialize-config-resources.js';
10
10
  export { compactUrl, resolveUrl } from './lib/store-ref.js';
11
11
  export { parseFromUrlTolerant } from './lib/url-codec.js';
12
12
  export { parseIntentsFromUrl } from './lib/url-intents.js';
@@ -19,4 +19,28 @@ export type ConfigResourceStore = ResourceHandler;
19
19
  export declare function serializeConfigResources(config: Config, store: ConfigResourceStore, options?: {
20
20
  signal?: AbortSignal | null;
21
21
  }): Promise<Manifest>;
22
+ /**
23
+ * Version of the serialization POLICY — what {@link serializeConfigResources}
24
+ * does to a config beyond what the schema says: the walk's rewrite rules
25
+ * (`visit-resources`), the CSS `@import` splicing, the legacy normalization.
26
+ * Bump it by hand when that behavior changes without a schema change; it is
27
+ * one half of {@link serializationFormat}.
28
+ */
29
+ export declare const SERIALIZER_VERSION = 1;
30
+ /**
31
+ * The identity of the form a serialized manifest takes — the text a generator
32
+ * hashes into its format stamp. Two halves: the JSON Schema of `ConfigSchema`
33
+ * (the shape every snapshot follows; the referenced document schemas ride
34
+ * inside it, so a drawing- or wayfinding-schema change counts too — a schema
35
+ * change is a format change by construction, no hand bump needed) and
36
+ * {@link SERIALIZER_VERSION}. Deterministic across processes and platforms
37
+ * for one build of the packages.
38
+ *
39
+ * A snapshot built under one stamp must not be served under a runtime that
40
+ * expects another: the cloud generator (plan G § 2, wave G2) keys its
41
+ * level-0 "nothing changed" skip on this stamp next to the data revision, so
42
+ * a deploy that changes the format rebuilds every snapshot and a deploy that
43
+ * does not leaves them alone.
44
+ */
45
+ export declare function serializationFormat(): string;
22
46
  //# sourceMappingURL=serialize-config-resources.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { ConfigSchema } from '@expofp/schema';
2
+ import * as z from 'zod';
2
3
  import { visitResources } from './visit-resources.js';
3
4
  /**
4
5
  * Serialize a loaded config into a portable manifest: every schema-tagged
@@ -18,3 +19,32 @@ export async function serializeConfigResources(config, store, options) {
18
19
  await visitResources(ConfigSchema, manifest, store, { signal: options?.signal });
19
20
  return manifest;
20
21
  }
22
+ /**
23
+ * Version of the serialization POLICY — what {@link serializeConfigResources}
24
+ * does to a config beyond what the schema says: the walk's rewrite rules
25
+ * (`visit-resources`), the CSS `@import` splicing, the legacy normalization.
26
+ * Bump it by hand when that behavior changes without a schema change; it is
27
+ * one half of {@link serializationFormat}.
28
+ */
29
+ export const SERIALIZER_VERSION = 1;
30
+ /**
31
+ * The identity of the form a serialized manifest takes — the text a generator
32
+ * hashes into its format stamp. Two halves: the JSON Schema of `ConfigSchema`
33
+ * (the shape every snapshot follows; the referenced document schemas ride
34
+ * inside it, so a drawing- or wayfinding-schema change counts too — a schema
35
+ * change is a format change by construction, no hand bump needed) and
36
+ * {@link SERIALIZER_VERSION}. Deterministic across processes and platforms
37
+ * for one build of the packages.
38
+ *
39
+ * A snapshot built under one stamp must not be served under a runtime that
40
+ * expects another: the cloud generator (plan G § 2, wave G2) keys its
41
+ * level-0 "nothing changed" skip on this stamp next to the data revision, so
42
+ * a deploy that changes the format rebuilds every snapshot and a deploy that
43
+ * does not leaves them alone.
44
+ */
45
+ export function serializationFormat() {
46
+ return JSON.stringify({
47
+ serializer: SERIALIZER_VERSION,
48
+ schema: z.toJSONSchema(ConfigSchema, { io: 'input' }),
49
+ });
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/config",
3
- "version": "3.29.0",
3
+ "version": "3.30.0",
4
4
  "type": "module",
5
5
  "description": "ExpoFP SDK internal: config layer and schemas",
6
6
  "homepage": "https://developer.expofp.com/",
@@ -29,8 +29,8 @@
29
29
  "debug": "^4.4.3",
30
30
  "tslib": "^2.3.0",
31
31
  "zod": "4.4.3",
32
- "@expofp/resolve": "3.29.0",
33
- "@expofp/schema": "3.29.0",
34
- "@expofp/utils": "3.29.0"
32
+ "@expofp/resolve": "3.30.0",
33
+ "@expofp/schema": "3.30.0",
34
+ "@expofp/utils": "3.30.0"
35
35
  }
36
36
  }