@olonjs/cli 3.0.162 → 3.0.163

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.
@@ -1817,9 +1817,9 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
1817
1817
  "@tiptap/extension-link": "^2.11.5",
1818
1818
  "@tiptap/react": "^2.11.5",
1819
1819
  "@tiptap/starter-kit": "^2.11.5",
1820
- "@olonjs/core": "^1.1.30",
1821
- "@olonjs/react": "^0.1.13",
1822
- "@olonjs/studio": "^0.1.13",
1820
+ "@olonjs/core": "^1.1.31",
1821
+ "@olonjs/react": "^0.1.14",
1822
+ "@olonjs/studio": "^0.1.14",
1823
1823
  "class-variance-authority": "^0.7.1",
1824
1824
  "clsx": "^2.1.1",
1825
1825
  "lucide-react": "^0.474.0",
@@ -1817,9 +1817,9 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
1817
1817
  "@tiptap/extension-link": "^2.11.5",
1818
1818
  "@tiptap/react": "^2.11.5",
1819
1819
  "@tiptap/starter-kit": "^2.11.5",
1820
- "@olonjs/core": "^1.1.30",
1821
- "@olonjs/react": "^0.1.13",
1822
- "@olonjs/studio": "^0.1.13",
1820
+ "@olonjs/core": "^1.1.31",
1821
+ "@olonjs/react": "^0.1.14",
1822
+ "@olonjs/studio": "^0.1.14",
1823
1823
  "class-variance-authority": "^0.7.1",
1824
1824
  "clsx": "^2.1.1",
1825
1825
  "lucide-react": "^0.474.0",
@@ -512,10 +512,10 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
512
512
  "dist:dna": "npm run dist"
513
513
  },
514
514
  "dependencies": {
515
- "@olonjs/core": "^1.1.30",
516
- "@olonjs/next": "^0.0.10",
517
- "@olonjs/react": "^0.1.13",
518
- "@olonjs/studio": "^0.1.13",
515
+ "@olonjs/core": "^1.1.31",
516
+ "@olonjs/next": "^0.0.11",
517
+ "@olonjs/react": "^0.1.14",
518
+ "@olonjs/studio": "^0.1.14",
519
519
  "clsx": "^2.1.1",
520
520
  "lucide-react": "^0.474.0",
521
521
  "next": "^15.5.0",
@@ -600,6 +600,9 @@ import { getFilePages } from '../src/lib/loaders/getFilePages';
600
600
  import { getFileSiteBundle } from '../src/lib/loaders/getFileSiteConfig';
601
601
 
602
602
  const {
603
+ assertCollectionRecordKeys,
604
+ buildCollectionContract,
605
+ buildCollectionContractHref,
603
606
  buildPageContract,
604
607
  buildPageManifest,
605
608
  buildPageManifestHref,
@@ -766,10 +769,28 @@ async function main(): Promise<void> {
766
769
 
767
770
  await writePublicJson('config/site.json', siteConfig);
768
771
 
772
+ // Emit collection contracts and validate keyed-object invariant
773
+ for (const [source, schema] of Object.entries(collectionSchemas)) {
774
+ const collectionPath = path.resolve(collectionsDir, source, `${source}.json`);
775
+ try {
776
+ const collectionData = (await readJsonFile(collectionPath)) as Record<string, unknown>;
777
+ assertCollectionRecordKeys(source, collectionData);
778
+ console.log(`[bake] Collection "${source}" keyed-object invariant OK`);
779
+ } catch (err) {
780
+ throw new Error(`[bake] Collection key invariant failed: ${(err as Error).message}`);
781
+ }
782
+
783
+ const contract = buildCollectionContract({ source, schema: schema as never });
784
+ const contractRelPath = buildCollectionContractHref(source).replace(/^\//, '');
785
+ await writePublicJson(contractRelPath, contract);
786
+ console.log(`[bake] Collection contract emitted: ${contractRelPath}`);
787
+ }
788
+
769
789
  const mcpManifest = buildSiteManifest({
770
790
  pages: pagesForManifest,
771
791
  schemas: schemas as never,
772
792
  siteConfig,
793
+ collectionSchemas: collectionSchemas as never,
773
794
  });
774
795
  await writePublicJson('mcp-manifest.json', mcpManifest);
775
796
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olonjs/cli",
3
- "version": "3.0.162",
3
+ "version": "3.0.163",
4
4
  "description": "The Sovereign CLI Engine for OlonJS.",
5
5
  "type": "module",
6
6
  "bin": {