@olonjs/cli 3.0.160 → 3.0.162

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.28",
1821
- "@olonjs/react": "^0.1.11",
1822
- "@olonjs/studio": "^0.1.11",
1820
+ "@olonjs/core": "^1.1.30",
1821
+ "@olonjs/react": "^0.1.13",
1822
+ "@olonjs/studio": "^0.1.13",
1823
1823
  "class-variance-authority": "^0.7.1",
1824
1824
  "clsx": "^2.1.1",
1825
1825
  "lucide-react": "^0.474.0",
@@ -2137,6 +2137,9 @@ import fs from 'fs/promises';
2137
2137
  import { resolvePageMatchFromRegistry, resolvePublicPageDocument, webmcp } from '@olonjs/core';
2138
2138
 
2139
2139
  const {
2140
+ assertCollectionRecordKeys,
2141
+ buildCollectionContract,
2142
+ buildCollectionContractHref,
2140
2143
  buildPageContract,
2141
2144
  buildPageManifest,
2142
2145
  buildPageManifestHref,
@@ -2355,10 +2358,30 @@ for (const { slug } of targets) {
2355
2358
  // Export the site config for the agentic web
2356
2359
  await writeJsonTargets('config/site.json', webMcpBuildState.siteConfig);
2357
2360
 
2361
+ // Emit collection contracts and validate keyed-object invariant
2362
+ const collectionSchemas = webMcpBuildState.collectionSchemas ?? {};
2363
+ for (const [source, schema] of Object.entries(collectionSchemas)) {
2364
+ const collectionPath = path.resolve(collectionsDir, source, `${source}.json`);
2365
+ try {
2366
+ const collectionData = await readJsonFile(collectionPath);
2367
+ assertCollectionRecordKeys(source, collectionData);
2368
+ console.log(`[bake] Collection "${source}" keyed-object invariant OK`);
2369
+ } catch (err) {
2370
+ throw new Error(`[bake] Collection key invariant failed: ${err.message}`);
2371
+ }
2372
+
2373
+ const contract = buildCollectionContract({ source, schema });
2374
+ const contractRelPath = buildCollectionContractHref(source).replace(/^\//, '');
2375
+ await writeJsonTargets(contractRelPath, contract);
2376
+ await writeSsrJson(contractRelPath, contract);
2377
+ console.log(`[bake] Collection contract emitted: ${contractRelPath}`);
2378
+ }
2379
+
2358
2380
  const mcpManifest = buildSiteManifest({
2359
2381
  pages: webMcpBuildState.pages,
2360
2382
  schemas: webMcpBuildState.schemas,
2361
2383
  siteConfig: webMcpBuildState.siteConfig,
2384
+ collectionSchemas,
2362
2385
  });
2363
2386
  await writeJsonTargets('mcp-manifest.json', mcpManifest);
2364
2387
 
@@ -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.28",
1821
- "@olonjs/react": "^0.1.11",
1822
- "@olonjs/studio": "^0.1.11",
1820
+ "@olonjs/core": "^1.1.30",
1821
+ "@olonjs/react": "^0.1.13",
1822
+ "@olonjs/studio": "^0.1.13",
1823
1823
  "class-variance-authority": "^0.7.1",
1824
1824
  "clsx": "^2.1.1",
1825
1825
  "lucide-react": "^0.474.0",
@@ -2137,6 +2137,9 @@ import fs from 'fs/promises';
2137
2137
  import { resolvePageMatchFromRegistry, resolvePublicPageDocument, webmcp } from '@olonjs/core';
2138
2138
 
2139
2139
  const {
2140
+ assertCollectionRecordKeys,
2141
+ buildCollectionContract,
2142
+ buildCollectionContractHref,
2140
2143
  buildPageContract,
2141
2144
  buildPageManifest,
2142
2145
  buildPageManifestHref,
@@ -2355,10 +2358,30 @@ for (const { slug } of targets) {
2355
2358
  // Export the site config for the agentic web
2356
2359
  await writeJsonTargets('config/site.json', webMcpBuildState.siteConfig);
2357
2360
 
2361
+ // Emit collection contracts and validate keyed-object invariant
2362
+ const collectionSchemas = webMcpBuildState.collectionSchemas ?? {};
2363
+ for (const [source, schema] of Object.entries(collectionSchemas)) {
2364
+ const collectionPath = path.resolve(collectionsDir, source, `${source}.json`);
2365
+ try {
2366
+ const collectionData = await readJsonFile(collectionPath);
2367
+ assertCollectionRecordKeys(source, collectionData);
2368
+ console.log(`[bake] Collection "${source}" keyed-object invariant OK`);
2369
+ } catch (err) {
2370
+ throw new Error(`[bake] Collection key invariant failed: ${err.message}`);
2371
+ }
2372
+
2373
+ const contract = buildCollectionContract({ source, schema });
2374
+ const contractRelPath = buildCollectionContractHref(source).replace(/^\//, '');
2375
+ await writeJsonTargets(contractRelPath, contract);
2376
+ await writeSsrJson(contractRelPath, contract);
2377
+ console.log(`[bake] Collection contract emitted: ${contractRelPath}`);
2378
+ }
2379
+
2358
2380
  const mcpManifest = buildSiteManifest({
2359
2381
  pages: webMcpBuildState.pages,
2360
2382
  schemas: webMcpBuildState.schemas,
2361
2383
  siteConfig: webMcpBuildState.siteConfig,
2384
+ collectionSchemas,
2362
2385
  });
2363
2386
  await writeJsonTargets('mcp-manifest.json', mcpManifest);
2364
2387
 
@@ -496,6 +496,9 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
496
496
  "version": "0.0.1",
497
497
  "private": true,
498
498
  "type": "module",
499
+ "olonjs": {
500
+ "runtime": "next"
501
+ },
499
502
  "scripts": {
500
503
  "dev": "next dev",
501
504
  "prebuild": "node scripts/sync-pages-to-public.mjs && node scripts/generate-llms-txt.mjs && node scripts/bake.mjs && node scripts/sitemap.mjs && node scripts/robots.mjs",
@@ -509,10 +512,10 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
509
512
  "dist:dna": "npm run dist"
510
513
  },
511
514
  "dependencies": {
512
- "@olonjs/core": "^1.1.28",
513
- "@olonjs/next": "^0.0.8",
514
- "@olonjs/react": "^0.1.11",
515
- "@olonjs/studio": "^0.1.11",
515
+ "@olonjs/core": "^1.1.30",
516
+ "@olonjs/next": "^0.0.10",
517
+ "@olonjs/react": "^0.1.13",
518
+ "@olonjs/studio": "^0.1.13",
516
519
  "clsx": "^2.1.1",
517
520
  "lucide-react": "^0.474.0",
518
521
  "next": "^15.5.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olonjs/cli",
3
- "version": "3.0.160",
3
+ "version": "3.0.162",
4
4
  "description": "The Sovereign CLI Engine for OlonJS.",
5
5
  "type": "module",
6
6
  "bin": {