@olonjs/cli 3.0.108 → 3.0.109
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.
|
@@ -1646,7 +1646,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
1646
1646
|
"@tiptap/extension-link": "^2.11.5",
|
|
1647
1647
|
"@tiptap/react": "^2.11.5",
|
|
1648
1648
|
"@tiptap/starter-kit": "^2.11.5",
|
|
1649
|
-
"@olonjs/core": "^1.0.
|
|
1649
|
+
"@olonjs/core": "^1.0.96",
|
|
1650
1650
|
"class-variance-authority": "^0.7.1",
|
|
1651
1651
|
"clsx": "^2.1.1",
|
|
1652
1652
|
"lucide-react": "^0.474.0",
|
|
@@ -2079,6 +2079,10 @@ const webMcpBuildState = getWebMcpBuildState();
|
|
|
2079
2079
|
for (const { slug } of targets) {
|
|
2080
2080
|
const pageConfig = webMcpBuildState.pages[slug];
|
|
2081
2081
|
if (!pageConfig) continue;
|
|
2082
|
+
|
|
2083
|
+
// Export the raw JSON data for the agentic web (so readResource works on SSG)
|
|
2084
|
+
await writeJsonTargets(`pages/${slug}.json`, pageConfig);
|
|
2085
|
+
|
|
2082
2086
|
const contract = buildPageContract({
|
|
2083
2087
|
slug,
|
|
2084
2088
|
pageConfig,
|
|
@@ -2095,6 +2099,9 @@ for (const { slug } of targets) {
|
|
|
2095
2099
|
await writeJsonTargets(buildPageManifestHref(slug).replace(/^\//, ''), pageManifest);
|
|
2096
2100
|
}
|
|
2097
2101
|
|
|
2102
|
+
// Export the site config for the agentic web
|
|
2103
|
+
await writeJsonTargets('config/site.json', webMcpBuildState.siteConfig);
|
|
2104
|
+
|
|
2098
2105
|
const mcpManifest = buildSiteManifest({
|
|
2099
2106
|
pages: webMcpBuildState.pages,
|
|
2100
2107
|
schemas: webMcpBuildState.schemas,
|
|
@@ -12918,7 +12925,12 @@ export default defineConfig({
|
|
|
12918
12925
|
|
|
12919
12926
|
if (isPageJsonRequest) {
|
|
12920
12927
|
const normalizedPath = decodeURIComponent(pathname).replace(/\\/g, '/');
|
|
12921
|
-
|
|
12928
|
+
// Rimuoviamo la root folder opzionale "/pages/" introdotta per matchare la prod e il file extension
|
|
12929
|
+
const slug = normalizedPath
|
|
12930
|
+
.replace(/^\/+/, '')
|
|
12931
|
+
.replace(/^pages\//i, '')
|
|
12932
|
+
.replace(/\.json$/i, '')
|
|
12933
|
+
.replace(/^\/+|\/+$/g, '');
|
|
12922
12934
|
const candidate = path.resolve(DATA_PAGES_DIR, `${slug}.json`);
|
|
12923
12935
|
const isInsidePagesDir = candidate.startsWith(`${DATA_PAGES_DIR}${path.sep}`) || candidate === DATA_PAGES_DIR;
|
|
12924
12936
|
if (!slug || !isInsidePagesDir || !fs.existsSync(candidate) || !fs.statSync(candidate).isFile()) {
|
|
@@ -596,7 +596,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
596
596
|
"@tiptap/extension-link": "^2.11.5",
|
|
597
597
|
"@tiptap/react": "^2.11.5",
|
|
598
598
|
"@tiptap/starter-kit": "^2.11.5",
|
|
599
|
-
"@olonjs/core": "^1.0.
|
|
599
|
+
"@olonjs/core": "^1.0.96",
|
|
600
600
|
"clsx": "^2.1.1",
|
|
601
601
|
"lucide-react": "^0.474.0",
|
|
602
602
|
"react": "^19.0.0",
|
|
@@ -1646,7 +1646,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
1646
1646
|
"@tiptap/extension-link": "^2.11.5",
|
|
1647
1647
|
"@tiptap/react": "^2.11.5",
|
|
1648
1648
|
"@tiptap/starter-kit": "^2.11.5",
|
|
1649
|
-
"@olonjs/core": "^1.0.
|
|
1649
|
+
"@olonjs/core": "^1.0.96",
|
|
1650
1650
|
"class-variance-authority": "^0.7.1",
|
|
1651
1651
|
"clsx": "^2.1.1",
|
|
1652
1652
|
"lucide-react": "^0.474.0",
|
|
@@ -2079,6 +2079,10 @@ const webMcpBuildState = getWebMcpBuildState();
|
|
|
2079
2079
|
for (const { slug } of targets) {
|
|
2080
2080
|
const pageConfig = webMcpBuildState.pages[slug];
|
|
2081
2081
|
if (!pageConfig) continue;
|
|
2082
|
+
|
|
2083
|
+
// Export the raw JSON data for the agentic web (so readResource works on SSG)
|
|
2084
|
+
await writeJsonTargets(`pages/${slug}.json`, pageConfig);
|
|
2085
|
+
|
|
2082
2086
|
const contract = buildPageContract({
|
|
2083
2087
|
slug,
|
|
2084
2088
|
pageConfig,
|
|
@@ -2095,6 +2099,9 @@ for (const { slug } of targets) {
|
|
|
2095
2099
|
await writeJsonTargets(buildPageManifestHref(slug).replace(/^\//, ''), pageManifest);
|
|
2096
2100
|
}
|
|
2097
2101
|
|
|
2102
|
+
// Export the site config for the agentic web
|
|
2103
|
+
await writeJsonTargets('config/site.json', webMcpBuildState.siteConfig);
|
|
2104
|
+
|
|
2098
2105
|
const mcpManifest = buildSiteManifest({
|
|
2099
2106
|
pages: webMcpBuildState.pages,
|
|
2100
2107
|
schemas: webMcpBuildState.schemas,
|
|
@@ -12918,7 +12925,12 @@ export default defineConfig({
|
|
|
12918
12925
|
|
|
12919
12926
|
if (isPageJsonRequest) {
|
|
12920
12927
|
const normalizedPath = decodeURIComponent(pathname).replace(/\\/g, '/');
|
|
12921
|
-
|
|
12928
|
+
// Rimuoviamo la root folder opzionale "/pages/" introdotta per matchare la prod e il file extension
|
|
12929
|
+
const slug = normalizedPath
|
|
12930
|
+
.replace(/^\/+/, '')
|
|
12931
|
+
.replace(/^pages\//i, '')
|
|
12932
|
+
.replace(/\.json$/i, '')
|
|
12933
|
+
.replace(/^\/+|\/+$/g, '');
|
|
12922
12934
|
const candidate = path.resolve(DATA_PAGES_DIR, `${slug}.json`);
|
|
12923
12935
|
const isInsidePagesDir = candidate.startsWith(`${DATA_PAGES_DIR}${path.sep}`) || candidate === DATA_PAGES_DIR;
|
|
12924
12936
|
if (!slug || !isInsidePagesDir || !fs.existsSync(candidate) || !fs.statSync(candidate).isFile()) {
|