@sarimarcus/content-sites-core 0.1.0 → 0.2.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/types/index.ts +48 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.2.0 (2026-09-29)
|
|
6
|
+
|
|
7
|
+
- Stable release of 0.2.0-rc.0, unchanged: installed on all three sites, `astro check` enforcing `SiteConfig` on each generated `site.generated.ts`, builds unchanged (SLA-2733).
|
|
8
|
+
|
|
9
|
+
## 0.2.0-rc.0 (2026-09-29)
|
|
10
|
+
|
|
11
|
+
- `./types`: `SiteConfig` (the shape of each site's generated `src/config/site.generated.ts`), `VerticalDefinition`, `CityPlaces`, `WorldwidePlaces` and `DEFINITION_SCHEMA_VERSION` (SLA-2733).
|
|
12
|
+
|
|
5
13
|
## 0.1.0 (2026-09-29)
|
|
6
14
|
|
|
7
15
|
- Stable release of 0.1.0-rc.0, unchanged: installed from the registry on all three sites, whose builds stayed byte-identical (SLA-2742).
|
package/package.json
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
// Public surface of @sarimarcus/content-sites-core/types.
|
|
2
|
-
|
|
1
|
+
// Public surface of @sarimarcus/content-sites-core/types.
|
|
2
|
+
|
|
3
|
+
/** Version of the site and vertical definition schemas. The factory validator refuses any other value. */
|
|
4
|
+
export const DEFINITION_SCHEMA_VERSION = 1;
|
|
5
|
+
|
|
6
|
+
export type CityPlaces = {
|
|
7
|
+
mode: 'city';
|
|
8
|
+
cityName: string;
|
|
9
|
+
lat: number;
|
|
10
|
+
lng: number;
|
|
11
|
+
regionCode: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type WorldwidePlaces = { mode: 'worldwide' };
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A site's identity, as generated into `src/config/site.generated.ts` from its `sites.json` entry.
|
|
18
|
+
* Only fields a site renders from belong here; factory-only registry keys stay in `sites.json`.
|
|
19
|
+
*/
|
|
20
|
+
export interface SiteConfig {
|
|
21
|
+
schemaVersion: typeof DEFINITION_SCHEMA_VERSION;
|
|
22
|
+
key: string;
|
|
23
|
+
siteName: string;
|
|
24
|
+
/** Absolute origin, no trailing slash: `https://<domain>`. */
|
|
25
|
+
url: string;
|
|
26
|
+
language: string;
|
|
27
|
+
locale: string;
|
|
28
|
+
/** The vertical this site belongs to, or null for a one-off site. */
|
|
29
|
+
vertical: string | null;
|
|
30
|
+
analytics: { gtmId: string };
|
|
31
|
+
social: { twitterHandle?: string };
|
|
32
|
+
places: CityPlaces | WorldwidePlaces;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** A vertical manifest, `verticals/<id>/vertical.json` in the factory. Never published. */
|
|
36
|
+
export interface VerticalDefinition {
|
|
37
|
+
schemaVersion: typeof DEFINITION_SCHEMA_VERSION;
|
|
38
|
+
/** Equal to the manifest's directory name. */
|
|
39
|
+
id: string;
|
|
40
|
+
/** The vertical's npm package, or null when it has none yet. */
|
|
41
|
+
package: string | null;
|
|
42
|
+
/** Collections the vertical owns; each must be in every member site's `content_types`. */
|
|
43
|
+
contentTypes: string[];
|
|
44
|
+
/** Dotted paths into a site's `sites.json` entry that every member site must set, e.g. `places.cityName`. */
|
|
45
|
+
requires: string[];
|
|
46
|
+
/** Reserved for SLA-2744; empty until then. */
|
|
47
|
+
routes: [];
|
|
48
|
+
}
|