@olonjs/cli 3.0.95 → 3.0.97

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.83",
1648
+ "@olonjs/core": "^1.0.85",
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 = menuData as unknown as 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": [
@@ -10975,23 +10979,6 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
10975
10979
  "description": "OlonJS standardizes machine-readable web content across tenants. Predictable page endpoints for agents, typed schema contracts, repeatable governance."
10976
10980
  },
10977
10981
  "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
- },
10995
10982
  {
10996
10983
  "id": "hero-main",
10997
10984
  "type": "hero",
@@ -11162,8 +11149,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
11162
11149
  "showOauth": true
11163
11150
  }
11164
11151
  }
11165
- ],
11166
- "global-header": false
11152
+ ]
11167
11153
  }
11168
11154
  END_OF_FILE_CONTENT
11169
11155
  mkdir -p "src/data/pages/platform"
@@ -11539,7 +11525,7 @@ echo "Creating src/entry-ssg.tsx..."
11539
11525
  cat << 'END_OF_FILE_CONTENT' > "src/entry-ssg.tsx"
11540
11526
  import { renderToString } from 'react-dom/server';
11541
11527
  import { StaticRouter } from 'react-router-dom/server';
11542
- import { ConfigProvider, PageRenderer, StudioProvider } from '@olonjs/core';
11528
+ import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core';
11543
11529
  import type { JsonPagesConfig, MenuConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
11544
11530
  import { ThemeProvider } from '@/components/ThemeProvider';
11545
11531
  import { ComponentRegistry } from '@/lib/ComponentRegistry';
@@ -11551,9 +11537,14 @@ import themeData from '@/data/config/theme.json';
11551
11537
  import tenantCss from '@/index.css?inline';
11552
11538
 
11553
11539
  const siteConfig = siteData as unknown as SiteConfig;
11554
- const menuConfig = menuData as unknown as MenuConfig;
11540
+ const menuConfig: MenuConfig = { main: [] };
11555
11541
  const themeConfig = themeData as unknown as ThemeConfig;
11556
11542
  const pages = getFilePages();
11543
+ const refDocuments = {
11544
+ 'menu.json': menuData,
11545
+ 'config/menu.json': menuData,
11546
+ 'src/data/config/menu.json': menuData,
11547
+ } satisfies NonNullable<JsonPagesConfig['refDocuments']>;
11557
11548
 
11558
11549
  function isRecord(value: unknown): value is Record<string, unknown> {
11559
11550
  return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -11635,6 +11626,14 @@ function resolveTenantId(): string {
11635
11626
  export function render(slug: string): string {
11636
11627
  const resolved = resolvePage(slug);
11637
11628
  const location = resolved.slug === 'home' ? '/' : `/${resolved.slug}`;
11629
+ const resolvedRuntime = resolveRuntimeConfig({
11630
+ pages,
11631
+ siteConfig,
11632
+ themeConfig,
11633
+ menuConfig,
11634
+ refDocuments,
11635
+ });
11636
+ const resolvedPage = resolvedRuntime.pages[resolved.slug] ?? resolved.page;
11638
11637
 
11639
11638
  return renderToString(
11640
11639
  <StaticRouter location={location}>
@@ -11647,7 +11646,11 @@ export function render(slug: string): string {
11647
11646
  >
11648
11647
  <StudioProvider mode="visitor">
11649
11648
  <ThemeProvider>
11650
- <PageRenderer pageConfig={resolved.page} siteConfig={siteConfig} menuConfig={menuConfig} />
11649
+ <PageRenderer
11650
+ pageConfig={resolvedPage}
11651
+ siteConfig={resolvedRuntime.siteConfig}
11652
+ menuConfig={resolvedRuntime.menuConfig}
11653
+ />
11651
11654
  </ThemeProvider>
11652
11655
  </StudioProvider>
11653
11656
  </ConfigProvider>
@@ -11673,7 +11676,6 @@ export function getPageMeta(slug: string): { title: string; description: string
11673
11676
  }
11674
11677
 
11675
11678
  END_OF_FILE_CONTENT
11676
- # SKIP: src/entry-ssg.tsx:Zone.Identifier is binary and cannot be embedded as text.
11677
11679
  echo "Creating src/fonts.css..."
11678
11680
  cat << 'END_OF_FILE_CONTENT' > "src/fonts.css"
11679
11681
  @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 +13455,6 @@ export default defineConfig({
13453
13455
  if (!fs.existsSync(DATA_PAGES_DIR)) fs.mkdirSync(DATA_PAGES_DIR, { recursive: true });
13454
13456
  if (projectState.site != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'site.json'), JSON.stringify(projectState.site, null, 2), 'utf8');
13455
13457
  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
13458
  if (projectState.page != null) {
13458
13459
  const safeSlug = (slug.replace(/[^a-zA-Z0-9-_]/g, '_') || 'page');
13459
13460
  fs.writeFileSync(path.join(DATA_PAGES_DIR, `${safeSlug}.json`), JSON.stringify(projectState.page, null, 2), 'utf8');
@@ -13494,8 +13495,8 @@ export default defineConfig({
13494
13495
  },
13495
13496
  });
13496
13497
 
13497
-
13498
-
13499
-
13498
+
13499
+
13500
+
13500
13501
 
13501
13502
  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.83",
599
+ "@olonjs/core": "^1.0.85",
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.83",
1648
+ "@olonjs/core": "^1.0.85",
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 = menuData as unknown as 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": [
@@ -10975,23 +10979,6 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
10975
10979
  "description": "OlonJS standardizes machine-readable web content across tenants. Predictable page endpoints for agents, typed schema contracts, repeatable governance."
10976
10980
  },
10977
10981
  "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
- },
10995
10982
  {
10996
10983
  "id": "hero-main",
10997
10984
  "type": "hero",
@@ -11162,8 +11149,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/data/pages/home.json"
11162
11149
  "showOauth": true
11163
11150
  }
11164
11151
  }
11165
- ],
11166
- "global-header": false
11152
+ ]
11167
11153
  }
11168
11154
  END_OF_FILE_CONTENT
11169
11155
  mkdir -p "src/data/pages/platform"
@@ -11539,7 +11525,7 @@ echo "Creating src/entry-ssg.tsx..."
11539
11525
  cat << 'END_OF_FILE_CONTENT' > "src/entry-ssg.tsx"
11540
11526
  import { renderToString } from 'react-dom/server';
11541
11527
  import { StaticRouter } from 'react-router-dom/server';
11542
- import { ConfigProvider, PageRenderer, StudioProvider } from '@olonjs/core';
11528
+ import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core';
11543
11529
  import type { JsonPagesConfig, MenuConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
11544
11530
  import { ThemeProvider } from '@/components/ThemeProvider';
11545
11531
  import { ComponentRegistry } from '@/lib/ComponentRegistry';
@@ -11551,9 +11537,14 @@ import themeData from '@/data/config/theme.json';
11551
11537
  import tenantCss from '@/index.css?inline';
11552
11538
 
11553
11539
  const siteConfig = siteData as unknown as SiteConfig;
11554
- const menuConfig = menuData as unknown as MenuConfig;
11540
+ const menuConfig: MenuConfig = { main: [] };
11555
11541
  const themeConfig = themeData as unknown as ThemeConfig;
11556
11542
  const pages = getFilePages();
11543
+ const refDocuments = {
11544
+ 'menu.json': menuData,
11545
+ 'config/menu.json': menuData,
11546
+ 'src/data/config/menu.json': menuData,
11547
+ } satisfies NonNullable<JsonPagesConfig['refDocuments']>;
11557
11548
 
11558
11549
  function isRecord(value: unknown): value is Record<string, unknown> {
11559
11550
  return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -11635,6 +11626,14 @@ function resolveTenantId(): string {
11635
11626
  export function render(slug: string): string {
11636
11627
  const resolved = resolvePage(slug);
11637
11628
  const location = resolved.slug === 'home' ? '/' : `/${resolved.slug}`;
11629
+ const resolvedRuntime = resolveRuntimeConfig({
11630
+ pages,
11631
+ siteConfig,
11632
+ themeConfig,
11633
+ menuConfig,
11634
+ refDocuments,
11635
+ });
11636
+ const resolvedPage = resolvedRuntime.pages[resolved.slug] ?? resolved.page;
11638
11637
 
11639
11638
  return renderToString(
11640
11639
  <StaticRouter location={location}>
@@ -11647,7 +11646,11 @@ export function render(slug: string): string {
11647
11646
  >
11648
11647
  <StudioProvider mode="visitor">
11649
11648
  <ThemeProvider>
11650
- <PageRenderer pageConfig={resolved.page} siteConfig={siteConfig} menuConfig={menuConfig} />
11649
+ <PageRenderer
11650
+ pageConfig={resolvedPage}
11651
+ siteConfig={resolvedRuntime.siteConfig}
11652
+ menuConfig={resolvedRuntime.menuConfig}
11653
+ />
11651
11654
  </ThemeProvider>
11652
11655
  </StudioProvider>
11653
11656
  </ConfigProvider>
@@ -11673,7 +11676,6 @@ export function getPageMeta(slug: string): { title: string; description: string
11673
11676
  }
11674
11677
 
11675
11678
  END_OF_FILE_CONTENT
11676
- # SKIP: src/entry-ssg.tsx:Zone.Identifier is binary and cannot be embedded as text.
11677
11679
  echo "Creating src/fonts.css..."
11678
11680
  cat << 'END_OF_FILE_CONTENT' > "src/fonts.css"
11679
11681
  @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 +13455,6 @@ export default defineConfig({
13453
13455
  if (!fs.existsSync(DATA_PAGES_DIR)) fs.mkdirSync(DATA_PAGES_DIR, { recursive: true });
13454
13456
  if (projectState.site != null) fs.writeFileSync(path.join(DATA_CONFIG_DIR, 'site.json'), JSON.stringify(projectState.site, null, 2), 'utf8');
13455
13457
  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
13458
  if (projectState.page != null) {
13458
13459
  const safeSlug = (slug.replace(/[^a-zA-Z0-9-_]/g, '_') || 'page');
13459
13460
  fs.writeFileSync(path.join(DATA_PAGES_DIR, `${safeSlug}.json`), JSON.stringify(projectState.page, null, 2), 'utf8');
@@ -13494,8 +13495,8 @@ export default defineConfig({
13494
13495
  },
13495
13496
  });
13496
13497
 
13497
-
13498
-
13499
-
13498
+
13499
+
13500
+
13500
13501
 
13501
13502
  END_OF_FILE_CONTENT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olonjs/cli",
3
- "version": "3.0.95",
3
+ "version": "3.0.97",
4
4
  "description": "The Sovereign CLI Engine for OlonJS.",
5
5
  "type": "module",
6
6
  "bin": {