@olonjs/cli 3.0.94 → 3.0.96
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.
|
@@ -1645,7 +1645,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
1645
1645
|
"@tiptap/extension-link": "^2.11.5",
|
|
1646
1646
|
"@tiptap/react": "^2.11.5",
|
|
1647
1647
|
"@tiptap/starter-kit": "^2.11.5",
|
|
1648
|
-
"@olonjs/core": "^1.0.
|
|
1648
|
+
"@olonjs/core": "^1.0.84",
|
|
1649
1649
|
"class-variance-authority": "^0.7.1",
|
|
1650
1650
|
"clsx": "^2.1.1",
|
|
1651
1651
|
"lucide-react": "^0.474.0",
|
|
@@ -2079,7 +2079,6 @@ for (const { slug, out, depth } of targets) {
|
|
|
2079
2079
|
console.log('\n[bake] All pages baked. OK\n');
|
|
2080
2080
|
|
|
2081
2081
|
END_OF_FILE_CONTENT
|
|
2082
|
-
# SKIP: scripts/bake.mjs:Zone.Identifier is binary and cannot be embedded as text.
|
|
2083
2082
|
echo "Creating scripts/sync-pages-to-public.mjs..."
|
|
2084
2083
|
cat << 'END_OF_FILE_CONTENT' > "scripts/sync-pages-to-public.mjs"
|
|
2085
2084
|
import fs from 'fs';
|
|
@@ -2749,7 +2748,12 @@ const CLOUD_API_KEY =
|
|
|
2749
2748
|
import.meta.env.VITE_OLONJS_API_KEY ?? import.meta.env.VITE_JSONPAGES_API_KEY;
|
|
2750
2749
|
|
|
2751
2750
|
const themeConfig = themeData as unknown as ThemeConfig;
|
|
2752
|
-
const menuConfig =
|
|
2751
|
+
const menuConfig: MenuConfig = { main: [] };
|
|
2752
|
+
const refDocuments = {
|
|
2753
|
+
'menu.json': menuData,
|
|
2754
|
+
'config/menu.json': menuData,
|
|
2755
|
+
'src/data/config/menu.json': menuData,
|
|
2756
|
+
} satisfies NonNullable<JsonPagesConfig['refDocuments']>;
|
|
2753
2757
|
const TENANT_ID = 'alpha';
|
|
2754
2758
|
|
|
2755
2759
|
const filePages = getFilePages();
|
|
@@ -3412,6 +3416,7 @@ function App() {
|
|
|
3412
3416
|
siteConfig,
|
|
3413
3417
|
themeConfig,
|
|
3414
3418
|
menuConfig,
|
|
3419
|
+
refDocuments,
|
|
3415
3420
|
themeCss: { tenant: `${buildThemeFontVarsCss(themeConfig)}\n${tenantCss}` },
|
|
3416
3421
|
addSection: addSectionConfig,
|
|
3417
3422
|
persistence: {
|
|
@@ -3694,7 +3699,6 @@ export default App;
|
|
|
3694
3699
|
|
|
3695
3700
|
|
|
3696
3701
|
END_OF_FILE_CONTENT
|
|
3697
|
-
# SKIP: src/App.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
3698
3702
|
echo "Creating src/App_.tsx..."
|
|
3699
3703
|
cat << 'END_OF_FILE_CONTENT' > "src/App_.tsx"
|
|
3700
3704
|
/**
|
|
@@ -10602,7 +10606,7 @@ echo "Creating src/data/config/menu.json..."
|
|
|
10602
10606
|
cat << 'END_OF_FILE_CONTENT' > "src/data/config/menu.json"
|
|
10603
10607
|
{
|
|
10604
10608
|
"main": [
|
|
10605
|
-
{
|
|
10609
|
+
{
|
|
10606
10610
|
"label": "Platform",
|
|
10607
10611
|
"href": "/platform",
|
|
10608
10612
|
"children": [
|
|
@@ -10667,46 +10671,9 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/config/site.json"
|
|
|
10667
10671
|
"data": {
|
|
10668
10672
|
"logoText": "Olon",
|
|
10669
10673
|
"badge": "",
|
|
10670
|
-
"links":
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
"href": "/platform",
|
|
10674
|
-
"children": [
|
|
10675
|
-
{
|
|
10676
|
-
"label": "Overview",
|
|
10677
|
-
"href": "/platform/overview"
|
|
10678
|
-
},
|
|
10679
|
-
{
|
|
10680
|
-
"label": "Architecture",
|
|
10681
|
-
"href": "/platform/architecture"
|
|
10682
|
-
},
|
|
10683
|
-
{
|
|
10684
|
-
"label": "Security",
|
|
10685
|
-
"href": "/platform/security"
|
|
10686
|
-
},
|
|
10687
|
-
{
|
|
10688
|
-
"label": "Integrations",
|
|
10689
|
-
"href": "/platform/integrations"
|
|
10690
|
-
},
|
|
10691
|
-
{
|
|
10692
|
-
"label": "Roadmap",
|
|
10693
|
-
"href": "/platform/roadmap"
|
|
10694
|
-
}
|
|
10695
|
-
]
|
|
10696
|
-
},
|
|
10697
|
-
{
|
|
10698
|
-
"label": "Solutions",
|
|
10699
|
-
"href": "/solutions"
|
|
10700
|
-
},
|
|
10701
|
-
{
|
|
10702
|
-
"label": "Pricing",
|
|
10703
|
-
"href": "/pricing"
|
|
10704
|
-
},
|
|
10705
|
-
{
|
|
10706
|
-
"label": "Resources",
|
|
10707
|
-
"href": "/resources"
|
|
10708
|
-
}
|
|
10709
|
-
],
|
|
10674
|
+
"links": {
|
|
10675
|
+
"$ref": "../config/menu.json#/main"
|
|
10676
|
+
},
|
|
10710
10677
|
"ctaLabel": "Get started →",
|
|
10711
10678
|
"ctaHref": "#contact",
|
|
10712
10679
|
"signinHref": "#login"
|
|
@@ -10975,23 +10942,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
|
|
|
10975
10942
|
"description": "OlonJS standardizes machine-readable web content across tenants. Predictable page endpoints for agents, typed schema contracts, repeatable governance."
|
|
10976
10943
|
},
|
|
10977
10944
|
"sections": [
|
|
10978
|
-
|
|
10979
|
-
"id": "global-header",
|
|
10980
|
-
"type": "header",
|
|
10981
|
-
"data": {
|
|
10982
|
-
"logoText": "Olon",
|
|
10983
|
-
"badge": "",
|
|
10984
|
-
"links": {
|
|
10985
|
-
"$ref": "../config/menu.json#/main"
|
|
10986
|
-
},
|
|
10987
|
-
"ctaLabel": "Get started →",
|
|
10988
|
-
"ctaHref": "#contact",
|
|
10989
|
-
"signinHref": "#login"
|
|
10990
|
-
},
|
|
10991
|
-
"settings": {
|
|
10992
|
-
"sticky": true
|
|
10993
|
-
}
|
|
10994
|
-
},
|
|
10945
|
+
|
|
10995
10946
|
{
|
|
10996
10947
|
"id": "hero-main",
|
|
10997
10948
|
"type": "hero",
|
|
@@ -11162,8 +11113,8 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
|
|
|
11162
11113
|
"showOauth": true
|
|
11163
11114
|
}
|
|
11164
11115
|
}
|
|
11165
|
-
]
|
|
11166
|
-
|
|
11116
|
+
]
|
|
11117
|
+
|
|
11167
11118
|
}
|
|
11168
11119
|
END_OF_FILE_CONTENT
|
|
11169
11120
|
mkdir -p "src/data/pages/platform"
|
|
@@ -11539,7 +11490,7 @@ echo "Creating src/entry-ssg.tsx..."
|
|
|
11539
11490
|
cat << 'END_OF_FILE_CONTENT' > "src/entry-ssg.tsx"
|
|
11540
11491
|
import { renderToString } from 'react-dom/server';
|
|
11541
11492
|
import { StaticRouter } from 'react-router-dom/server';
|
|
11542
|
-
import { ConfigProvider, PageRenderer, StudioProvider } from '@olonjs/core';
|
|
11493
|
+
import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core';
|
|
11543
11494
|
import type { JsonPagesConfig, MenuConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
|
|
11544
11495
|
import { ThemeProvider } from '@/components/ThemeProvider';
|
|
11545
11496
|
import { ComponentRegistry } from '@/lib/ComponentRegistry';
|
|
@@ -11551,9 +11502,14 @@ import themeData from '@/data/config/theme.json';
|
|
|
11551
11502
|
import tenantCss from '@/index.css?inline';
|
|
11552
11503
|
|
|
11553
11504
|
const siteConfig = siteData as unknown as SiteConfig;
|
|
11554
|
-
const menuConfig =
|
|
11505
|
+
const menuConfig: MenuConfig = { main: [] };
|
|
11555
11506
|
const themeConfig = themeData as unknown as ThemeConfig;
|
|
11556
11507
|
const pages = getFilePages();
|
|
11508
|
+
const refDocuments = {
|
|
11509
|
+
'menu.json': menuData,
|
|
11510
|
+
'config/menu.json': menuData,
|
|
11511
|
+
'src/data/config/menu.json': menuData,
|
|
11512
|
+
} satisfies NonNullable<JsonPagesConfig['refDocuments']>;
|
|
11557
11513
|
|
|
11558
11514
|
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
11559
11515
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -11635,6 +11591,14 @@ function resolveTenantId(): string {
|
|
|
11635
11591
|
export function render(slug: string): string {
|
|
11636
11592
|
const resolved = resolvePage(slug);
|
|
11637
11593
|
const location = resolved.slug === 'home' ? '/' : `/${resolved.slug}`;
|
|
11594
|
+
const resolvedRuntime = resolveRuntimeConfig({
|
|
11595
|
+
pages,
|
|
11596
|
+
siteConfig,
|
|
11597
|
+
themeConfig,
|
|
11598
|
+
menuConfig,
|
|
11599
|
+
refDocuments,
|
|
11600
|
+
});
|
|
11601
|
+
const resolvedPage = resolvedRuntime.pages[resolved.slug] ?? resolved.page;
|
|
11638
11602
|
|
|
11639
11603
|
return renderToString(
|
|
11640
11604
|
<StaticRouter location={location}>
|
|
@@ -11647,7 +11611,11 @@ export function render(slug: string): string {
|
|
|
11647
11611
|
>
|
|
11648
11612
|
<StudioProvider mode="visitor">
|
|
11649
11613
|
<ThemeProvider>
|
|
11650
|
-
<PageRenderer
|
|
11614
|
+
<PageRenderer
|
|
11615
|
+
pageConfig={resolvedPage}
|
|
11616
|
+
siteConfig={resolvedRuntime.siteConfig}
|
|
11617
|
+
menuConfig={resolvedRuntime.menuConfig}
|
|
11618
|
+
/>
|
|
11651
11619
|
</ThemeProvider>
|
|
11652
11620
|
</StudioProvider>
|
|
11653
11621
|
</ConfigProvider>
|
|
@@ -11673,7 +11641,6 @@ export function getPageMeta(slug: string): { title: string; description: string
|
|
|
11673
11641
|
}
|
|
11674
11642
|
|
|
11675
11643
|
END_OF_FILE_CONTENT
|
|
11676
|
-
# SKIP: src/entry-ssg.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
11677
11644
|
echo "Creating src/fonts.css..."
|
|
11678
11645
|
cat << 'END_OF_FILE_CONTENT' > "src/fonts.css"
|
|
11679
11646
|
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');
|
|
@@ -13453,7 +13420,6 @@ export default defineConfig({
|
|
|
13453
13420
|
if (!fs.existsSync(DATA_PAGES_DIR)) fs.mkdirSync(DATA_PAGES_DIR, { recursive: true });
|
|
13454
13421
|
if (projectState.site != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'site.json'), JSON.stringify(projectState.site, null, 2), 'utf8');
|
|
13455
13422
|
if (projectState.theme != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'theme.json'), JSON.stringify(projectState.theme, null, 2), 'utf8');
|
|
13456
|
-
if (projectState.menu != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'menu.json'), JSON.stringify(projectState.menu, null, 2), 'utf8');
|
|
13457
13423
|
if (projectState.page != null) {
|
|
13458
13424
|
const safeSlug = (slug.replace(/[^a-zA-Z0-9-_]/g, '_') || 'page');
|
|
13459
13425
|
fs.writeFileSync(path.join(DATA_PAGES_DIR, `${safeSlug}.json`), JSON.stringify(projectState.page, null, 2), 'utf8');
|
|
@@ -13494,8 +13460,8 @@ export default defineConfig({
|
|
|
13494
13460
|
},
|
|
13495
13461
|
});
|
|
13496
13462
|
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13463
|
+
|
|
13464
|
+
|
|
13465
|
+
|
|
13500
13466
|
|
|
13501
13467
|
END_OF_FILE_CONTENT
|
|
@@ -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.84",
|
|
600
600
|
"clsx": "^2.1.1",
|
|
601
601
|
"lucide-react": "^0.474.0",
|
|
602
602
|
"react": "^19.0.0",
|
|
@@ -1645,7 +1645,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
1645
1645
|
"@tiptap/extension-link": "^2.11.5",
|
|
1646
1646
|
"@tiptap/react": "^2.11.5",
|
|
1647
1647
|
"@tiptap/starter-kit": "^2.11.5",
|
|
1648
|
-
"@olonjs/core": "^1.0.
|
|
1648
|
+
"@olonjs/core": "^1.0.84",
|
|
1649
1649
|
"class-variance-authority": "^0.7.1",
|
|
1650
1650
|
"clsx": "^2.1.1",
|
|
1651
1651
|
"lucide-react": "^0.474.0",
|
|
@@ -2079,7 +2079,6 @@ for (const { slug, out, depth } of targets) {
|
|
|
2079
2079
|
console.log('\n[bake] All pages baked. OK\n');
|
|
2080
2080
|
|
|
2081
2081
|
END_OF_FILE_CONTENT
|
|
2082
|
-
# SKIP: scripts/bake.mjs:Zone.Identifier is binary and cannot be embedded as text.
|
|
2083
2082
|
echo "Creating scripts/sync-pages-to-public.mjs..."
|
|
2084
2083
|
cat << 'END_OF_FILE_CONTENT' > "scripts/sync-pages-to-public.mjs"
|
|
2085
2084
|
import fs from 'fs';
|
|
@@ -2749,7 +2748,12 @@ const CLOUD_API_KEY =
|
|
|
2749
2748
|
import.meta.env.VITE_OLONJS_API_KEY ?? import.meta.env.VITE_JSONPAGES_API_KEY;
|
|
2750
2749
|
|
|
2751
2750
|
const themeConfig = themeData as unknown as ThemeConfig;
|
|
2752
|
-
const menuConfig =
|
|
2751
|
+
const menuConfig: MenuConfig = { main: [] };
|
|
2752
|
+
const refDocuments = {
|
|
2753
|
+
'menu.json': menuData,
|
|
2754
|
+
'config/menu.json': menuData,
|
|
2755
|
+
'src/data/config/menu.json': menuData,
|
|
2756
|
+
} satisfies NonNullable<JsonPagesConfig['refDocuments']>;
|
|
2753
2757
|
const TENANT_ID = 'alpha';
|
|
2754
2758
|
|
|
2755
2759
|
const filePages = getFilePages();
|
|
@@ -3412,6 +3416,7 @@ function App() {
|
|
|
3412
3416
|
siteConfig,
|
|
3413
3417
|
themeConfig,
|
|
3414
3418
|
menuConfig,
|
|
3419
|
+
refDocuments,
|
|
3415
3420
|
themeCss: { tenant: `${buildThemeFontVarsCss(themeConfig)}\n${tenantCss}` },
|
|
3416
3421
|
addSection: addSectionConfig,
|
|
3417
3422
|
persistence: {
|
|
@@ -3694,7 +3699,6 @@ export default App;
|
|
|
3694
3699
|
|
|
3695
3700
|
|
|
3696
3701
|
END_OF_FILE_CONTENT
|
|
3697
|
-
# SKIP: src/App.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
3698
3702
|
echo "Creating src/App_.tsx..."
|
|
3699
3703
|
cat << 'END_OF_FILE_CONTENT' > "src/App_.tsx"
|
|
3700
3704
|
/**
|
|
@@ -10602,7 +10606,7 @@ echo "Creating src/data/config/menu.json..."
|
|
|
10602
10606
|
cat << 'END_OF_FILE_CONTENT' > "src/data/config/menu.json"
|
|
10603
10607
|
{
|
|
10604
10608
|
"main": [
|
|
10605
|
-
{
|
|
10609
|
+
{
|
|
10606
10610
|
"label": "Platform",
|
|
10607
10611
|
"href": "/platform",
|
|
10608
10612
|
"children": [
|
|
@@ -10667,46 +10671,9 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/config/site.json"
|
|
|
10667
10671
|
"data": {
|
|
10668
10672
|
"logoText": "Olon",
|
|
10669
10673
|
"badge": "",
|
|
10670
|
-
"links":
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
"href": "/platform",
|
|
10674
|
-
"children": [
|
|
10675
|
-
{
|
|
10676
|
-
"label": "Overview",
|
|
10677
|
-
"href": "/platform/overview"
|
|
10678
|
-
},
|
|
10679
|
-
{
|
|
10680
|
-
"label": "Architecture",
|
|
10681
|
-
"href": "/platform/architecture"
|
|
10682
|
-
},
|
|
10683
|
-
{
|
|
10684
|
-
"label": "Security",
|
|
10685
|
-
"href": "/platform/security"
|
|
10686
|
-
},
|
|
10687
|
-
{
|
|
10688
|
-
"label": "Integrations",
|
|
10689
|
-
"href": "/platform/integrations"
|
|
10690
|
-
},
|
|
10691
|
-
{
|
|
10692
|
-
"label": "Roadmap",
|
|
10693
|
-
"href": "/platform/roadmap"
|
|
10694
|
-
}
|
|
10695
|
-
]
|
|
10696
|
-
},
|
|
10697
|
-
{
|
|
10698
|
-
"label": "Solutions",
|
|
10699
|
-
"href": "/solutions"
|
|
10700
|
-
},
|
|
10701
|
-
{
|
|
10702
|
-
"label": "Pricing",
|
|
10703
|
-
"href": "/pricing"
|
|
10704
|
-
},
|
|
10705
|
-
{
|
|
10706
|
-
"label": "Resources",
|
|
10707
|
-
"href": "/resources"
|
|
10708
|
-
}
|
|
10709
|
-
],
|
|
10674
|
+
"links": {
|
|
10675
|
+
"$ref": "../config/menu.json#/main"
|
|
10676
|
+
},
|
|
10710
10677
|
"ctaLabel": "Get started →",
|
|
10711
10678
|
"ctaHref": "#contact",
|
|
10712
10679
|
"signinHref": "#login"
|
|
@@ -10975,23 +10942,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
|
|
|
10975
10942
|
"description": "OlonJS standardizes machine-readable web content across tenants. Predictable page endpoints for agents, typed schema contracts, repeatable governance."
|
|
10976
10943
|
},
|
|
10977
10944
|
"sections": [
|
|
10978
|
-
|
|
10979
|
-
"id": "global-header",
|
|
10980
|
-
"type": "header",
|
|
10981
|
-
"data": {
|
|
10982
|
-
"logoText": "Olon",
|
|
10983
|
-
"badge": "",
|
|
10984
|
-
"links": {
|
|
10985
|
-
"$ref": "../config/menu.json#/main"
|
|
10986
|
-
},
|
|
10987
|
-
"ctaLabel": "Get started →",
|
|
10988
|
-
"ctaHref": "#contact",
|
|
10989
|
-
"signinHref": "#login"
|
|
10990
|
-
},
|
|
10991
|
-
"settings": {
|
|
10992
|
-
"sticky": true
|
|
10993
|
-
}
|
|
10994
|
-
},
|
|
10945
|
+
|
|
10995
10946
|
{
|
|
10996
10947
|
"id": "hero-main",
|
|
10997
10948
|
"type": "hero",
|
|
@@ -11162,8 +11113,8 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
|
|
|
11162
11113
|
"showOauth": true
|
|
11163
11114
|
}
|
|
11164
11115
|
}
|
|
11165
|
-
]
|
|
11166
|
-
|
|
11116
|
+
]
|
|
11117
|
+
|
|
11167
11118
|
}
|
|
11168
11119
|
END_OF_FILE_CONTENT
|
|
11169
11120
|
mkdir -p "src/data/pages/platform"
|
|
@@ -11539,7 +11490,7 @@ echo "Creating src/entry-ssg.tsx..."
|
|
|
11539
11490
|
cat << 'END_OF_FILE_CONTENT' > "src/entry-ssg.tsx"
|
|
11540
11491
|
import { renderToString } from 'react-dom/server';
|
|
11541
11492
|
import { StaticRouter } from 'react-router-dom/server';
|
|
11542
|
-
import { ConfigProvider, PageRenderer, StudioProvider } from '@olonjs/core';
|
|
11493
|
+
import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core';
|
|
11543
11494
|
import type { JsonPagesConfig, MenuConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
|
|
11544
11495
|
import { ThemeProvider } from '@/components/ThemeProvider';
|
|
11545
11496
|
import { ComponentRegistry } from '@/lib/ComponentRegistry';
|
|
@@ -11551,9 +11502,14 @@ import themeData from '@/data/config/theme.json';
|
|
|
11551
11502
|
import tenantCss from '@/index.css?inline';
|
|
11552
11503
|
|
|
11553
11504
|
const siteConfig = siteData as unknown as SiteConfig;
|
|
11554
|
-
const menuConfig =
|
|
11505
|
+
const menuConfig: MenuConfig = { main: [] };
|
|
11555
11506
|
const themeConfig = themeData as unknown as ThemeConfig;
|
|
11556
11507
|
const pages = getFilePages();
|
|
11508
|
+
const refDocuments = {
|
|
11509
|
+
'menu.json': menuData,
|
|
11510
|
+
'config/menu.json': menuData,
|
|
11511
|
+
'src/data/config/menu.json': menuData,
|
|
11512
|
+
} satisfies NonNullable<JsonPagesConfig['refDocuments']>;
|
|
11557
11513
|
|
|
11558
11514
|
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
11559
11515
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -11635,6 +11591,14 @@ function resolveTenantId(): string {
|
|
|
11635
11591
|
export function render(slug: string): string {
|
|
11636
11592
|
const resolved = resolvePage(slug);
|
|
11637
11593
|
const location = resolved.slug === 'home' ? '/' : `/${resolved.slug}`;
|
|
11594
|
+
const resolvedRuntime = resolveRuntimeConfig({
|
|
11595
|
+
pages,
|
|
11596
|
+
siteConfig,
|
|
11597
|
+
themeConfig,
|
|
11598
|
+
menuConfig,
|
|
11599
|
+
refDocuments,
|
|
11600
|
+
});
|
|
11601
|
+
const resolvedPage = resolvedRuntime.pages[resolved.slug] ?? resolved.page;
|
|
11638
11602
|
|
|
11639
11603
|
return renderToString(
|
|
11640
11604
|
<StaticRouter location={location}>
|
|
@@ -11647,7 +11611,11 @@ export function render(slug: string): string {
|
|
|
11647
11611
|
>
|
|
11648
11612
|
<StudioProvider mode="visitor">
|
|
11649
11613
|
<ThemeProvider>
|
|
11650
|
-
<PageRenderer
|
|
11614
|
+
<PageRenderer
|
|
11615
|
+
pageConfig={resolvedPage}
|
|
11616
|
+
siteConfig={resolvedRuntime.siteConfig}
|
|
11617
|
+
menuConfig={resolvedRuntime.menuConfig}
|
|
11618
|
+
/>
|
|
11651
11619
|
</ThemeProvider>
|
|
11652
11620
|
</StudioProvider>
|
|
11653
11621
|
</ConfigProvider>
|
|
@@ -11673,7 +11641,6 @@ export function getPageMeta(slug: string): { title: string; description: string
|
|
|
11673
11641
|
}
|
|
11674
11642
|
|
|
11675
11643
|
END_OF_FILE_CONTENT
|
|
11676
|
-
# SKIP: src/entry-ssg.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
11677
11644
|
echo "Creating src/fonts.css..."
|
|
11678
11645
|
cat << 'END_OF_FILE_CONTENT' > "src/fonts.css"
|
|
11679
11646
|
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');
|
|
@@ -13453,7 +13420,6 @@ export default defineConfig({
|
|
|
13453
13420
|
if (!fs.existsSync(DATA_PAGES_DIR)) fs.mkdirSync(DATA_PAGES_DIR, { recursive: true });
|
|
13454
13421
|
if (projectState.site != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'site.json'), JSON.stringify(projectState.site, null, 2), 'utf8');
|
|
13455
13422
|
if (projectState.theme != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'theme.json'), JSON.stringify(projectState.theme, null, 2), 'utf8');
|
|
13456
|
-
if (projectState.menu != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'menu.json'), JSON.stringify(projectState.menu, null, 2), 'utf8');
|
|
13457
13423
|
if (projectState.page != null) {
|
|
13458
13424
|
const safeSlug = (slug.replace(/[^a-zA-Z0-9-_]/g, '_') || 'page');
|
|
13459
13425
|
fs.writeFileSync(path.join(DATA_PAGES_DIR, `${safeSlug}.json`), JSON.stringify(projectState.page, null, 2), 'utf8');
|
|
@@ -13494,8 +13460,8 @@ export default defineConfig({
|
|
|
13494
13460
|
},
|
|
13495
13461
|
});
|
|
13496
13462
|
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13463
|
+
|
|
13464
|
+
|
|
13465
|
+
|
|
13500
13466
|
|
|
13501
13467
|
END_OF_FILE_CONTENT
|