@olonjs/cli 3.0.161 → 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.
|
|
1821
|
-
"@olonjs/react": "^0.1.
|
|
1822
|
-
"@olonjs/studio": "^0.1.
|
|
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.
|
|
1821
|
-
"@olonjs/react": "^0.1.
|
|
1822
|
-
"@olonjs/studio": "^0.1.
|
|
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
|
|
|
@@ -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.
|
|
516
|
-
"@olonjs/next": "^0.0.
|
|
517
|
-
"@olonjs/react": "^0.1.
|
|
518
|
-
"@olonjs/studio": "^0.1.
|
|
515
|
+
"@olonjs/core": "^1.1.30",
|
|
516
|
+
"@olonjs/next": "^0.0.10",
|
|
517
|
+
"@olonjs/react": "^0.1.13",
|
|
518
|
+
"@olonjs/studio": "^0.1.13",
|
|
519
519
|
"clsx": "^2.1.1",
|
|
520
520
|
"lucide-react": "^0.474.0",
|
|
521
521
|
"next": "^15.5.0",
|