@olonjs/cli 3.0.142 → 3.0.144

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,7 +1817,7 @@ 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.6",
1820
+ "@olonjs/core": "^1.1.10",
1821
1821
  "class-variance-authority": "^0.7.1",
1822
1822
  "clsx": "^2.1.1",
1823
1823
  "lucide-react": "^0.474.0",
@@ -2146,6 +2146,7 @@ const root = path.resolve(__dirname, '..');
2146
2146
  const pagesDir = path.resolve(root, 'src/data/pages');
2147
2147
  const publicDir = path.resolve(root, 'public');
2148
2148
  const distDir = path.resolve(root, 'dist');
2149
+ const distSsrDir = path.resolve(root, 'dist-ssr');
2149
2150
 
2150
2151
  async function writeTargets(relativePath, content) {
2151
2152
  const targets = [
@@ -2163,6 +2164,15 @@ async function writeJsonTargets(relativePath, value) {
2163
2164
  await writeTargets(relativePath, `${JSON.stringify(value, null, 2)}\n`);
2164
2165
  }
2165
2166
 
2167
+ // Schemas go to dist-ssr ONLY: committed (dist-ssr is not gitignored) so provisioning can read
2168
+ // them from the repo, but NOT served as static files — so /schemas/* falls through to the
2169
+ // blob rewrite, and provision/hotSave own the served contract.
2170
+ async function writeSsrJson(relativePath, value) {
2171
+ const target = path.resolve(distSsrDir, relativePath);
2172
+ await fs.mkdir(path.dirname(target), { recursive: true });
2173
+ await fs.writeFile(target, `${JSON.stringify(value, null, 2)}\n`, 'utf-8');
2174
+ }
2175
+
2166
2176
  function escapeHtmlAttribute(value) {
2167
2177
  return String(value).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
2168
2178
  }
@@ -2264,9 +2274,10 @@ for (const { slug } of targets) {
2264
2274
  slug,
2265
2275
  pageConfig,
2266
2276
  schemas: webMcpBuildState.schemas,
2277
+ submissionSchemas: webMcpBuildState.submissionSchemas,
2267
2278
  siteConfig: webMcpBuildState.siteConfig,
2268
2279
  });
2269
- await writeJsonTargets(`schemas/${slug}.schema.json`, contract);
2280
+ await writeSsrJson(`schemas/${slug}.schema.json`, contract);
2270
2281
  const pageManifest = buildPageManifest({
2271
2282
  slug,
2272
2283
  pageConfig,
@@ -2342,6 +2353,7 @@ for (const { slug, out, depth } of targets) {
2342
2353
  console.log('\n[bake] All pages baked. OK\n');
2343
2354
 
2344
2355
  END_OF_FILE_CONTENT
2356
+ # SKIP: scripts/bake.mjs:Zone.Identifier is binary and cannot be embedded as text.
2345
2357
  echo "Creating scripts/generate-llms-txt.mjs..."
2346
2358
  cat << 'END_OF_FILE_CONTENT' > "scripts/generate-llms-txt.mjs"
2347
2359
  import fs from 'fs';
@@ -2873,7 +2885,7 @@ import { JsonPagesEngine } from '@olonjs/core';
2873
2885
  import type { JsonPagesConfig, LibraryImageEntry, ProjectState } from '@olonjs/core';
2874
2886
  import { normalizeBasePath, withBasePath } from '@olonjs/core';
2875
2887
  import { ComponentRegistry } from '@/lib/ComponentRegistry';
2876
- import { SECTION_SCHEMAS, SECTION_SUBMISSION_SCHEMAS } from '@/lib/schemas';
2888
+ import { SECTION_SCHEMAS } from '@/lib/schemas';
2877
2889
  import { addSectionConfig } from '@/lib/addSectionConfig';
2878
2890
  import { getHydratedData } from '@/lib/draftStorage';
2879
2891
  import type { SiteConfig, ThemeConfig, MenuConfig, PageConfig } from '@/types';
@@ -3037,6 +3049,7 @@ function coerceSiteConfig(value: unknown): SiteConfig | null {
3037
3049
  }
3038
3050
  if (!isObjectRecord(input)) return null;
3039
3051
  if (!isObjectRecord(input.identity)) return null;
3052
+ if (!Array.isArray(input.pages)) return null;
3040
3053
 
3041
3054
  return input as unknown as SiteConfig;
3042
3055
  }
@@ -3727,14 +3740,13 @@ function App() {
3727
3740
  basePath: APP_BASE_PATH,
3728
3741
  registry: ComponentRegistry as JsonPagesConfig['registry'],
3729
3742
  schemas: SECTION_SCHEMAS as unknown as JsonPagesConfig['schemas'],
3730
- submissionSchemas: SECTION_SUBMISSION_SCHEMAS as unknown as JsonPagesConfig['submissionSchemas'],
3731
3743
  pages,
3732
3744
  siteConfig,
3733
3745
  themeConfig,
3734
3746
  menuConfig,
3735
3747
  refDocuments,
3736
- iconRegistry: iconMap,
3737
3748
  themeCss: { tenant: resolvedTenantCss },
3749
+ iconRegistry: iconMap,
3738
3750
  addSection: addSectionConfig,
3739
3751
  webmcp: {
3740
3752
  enabled: true,
@@ -3950,13 +3962,7 @@ function App() {
3950
3962
  </div>
3951
3963
  </div>
3952
3964
  ) : null}
3953
- {shouldRenderEngine ? (
3954
- isTenantEmpty ? (
3955
- <EmptyTenantView />
3956
- ) : (
3957
- <JsonPagesEngine config={config} />
3958
- )
3959
- ) : null}
3965
+ {shouldRenderEngine ? (isTenantEmpty ? <EmptyTenantView /> : <JsonPagesEngine config={config} />) : null}
3960
3966
  {isCloudMode && (contentMode === 'error' || contentFallback?.reasonCode === 'CLOUD_REFRESH_FAILED') ? (
3961
3967
  <div
3962
3968
  role="status"
@@ -4032,6 +4038,7 @@ function App() {
4032
4038
  export default App;
4033
4039
 
4034
4040
  END_OF_FILE_CONTENT
4041
+ # SKIP: src/App.tsx:Zone.Identifier is binary and cannot be embedded as text.
4035
4042
  mkdir -p "src/components"
4036
4043
  echo "Creating src/components/ThemeProvider.tsx..."
4037
4044
  cat << 'END_OF_FILE_CONTENT' > "src/components/ThemeProvider.tsx"
@@ -10810,7 +10817,7 @@ END_OF_FILE_CONTENT
10810
10817
  echo "Creating src/runtime.ts..."
10811
10818
  cat << 'END_OF_FILE_CONTENT' > "src/runtime.ts"
10812
10819
  import type { JsonPagesConfig, MenuConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
10813
- import { SECTION_SCHEMAS, SECTION_SUBMISSION_SCHEMAS } from '@/lib/schemas';
10820
+ import { SECTION_SCHEMAS } from '@/lib/schemas';
10814
10821
  import { getFilePages } from '@/lib/getFilePages';
10815
10822
  import siteData from '@/data/config/site.json';
10816
10823
  import menuData from '@/data/config/menu.json';
@@ -10829,18 +10836,17 @@ export const refDocuments = {
10829
10836
  export function getWebMcpBuildState(): {
10830
10837
  pages: Record<string, PageConfig>;
10831
10838
  schemas: JsonPagesConfig['schemas'];
10832
- submissionSchemas: JsonPagesConfig['submissionSchemas'];
10833
10839
  siteConfig: SiteConfig;
10834
10840
  } {
10835
10841
  return {
10836
10842
  pages,
10837
10843
  schemas: SECTION_SCHEMAS as unknown as JsonPagesConfig['schemas'],
10838
- submissionSchemas: SECTION_SUBMISSION_SCHEMAS as unknown as JsonPagesConfig['submissionSchemas'],
10839
10844
  siteConfig,
10840
10845
  };
10841
10846
  }
10842
10847
 
10843
10848
  END_OF_FILE_CONTENT
10849
+ # SKIP: src/runtime.ts:Zone.Identifier is binary and cannot be embedded as text.
10844
10850
  echo "Creating src/types.ts..."
10845
10851
  cat << 'END_OF_FILE_CONTENT' > "src/types.ts"
10846
10852
  import type { EmptyTenantData, EmptyTenantSettings } from '@/components/empty-tenant';
@@ -10865,6 +10871,61 @@ declare module '@olonjs/core' {
10865
10871
  export * from '@olonjs/core';
10866
10872
 
10867
10873
  END_OF_FILE_CONTENT
10874
+ echo "Creating src/vercel.json..."
10875
+ cat << 'END_OF_FILE_CONTENT' > "src/vercel.json"
10876
+ {
10877
+ "rewrites": [
10878
+ {
10879
+ "source": "/robots.txt",
10880
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/robots.txt"
10881
+ },
10882
+ {
10883
+ "source": "/sitemap.xml",
10884
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/sitemap.xml"
10885
+ },
10886
+ {
10887
+ "source": "/llms.txt",
10888
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/llms.txt"
10889
+ },
10890
+ {
10891
+ "source": "/.well-known/agent-card.json",
10892
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/.well-known/agent-card.json"
10893
+ },
10894
+ {
10895
+ "source": "/mcp-manifest.json",
10896
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/mcp-manifest.json"
10897
+ },
10898
+ {
10899
+ "source": "/mcp-manifests/:path*.json",
10900
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/mcp-manifests/:path*.json"
10901
+ },
10902
+ {
10903
+ "source": "/schemas/:path*.json",
10904
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/schemas/:path*.json"
10905
+ },
10906
+ {
10907
+ "source": "/:path*.json",
10908
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/pages/:path*.json"
10909
+ },
10910
+ {
10911
+ "source": "/(.*)",
10912
+ "destination": "/index.html"
10913
+ }
10914
+ ],
10915
+ "headers": [
10916
+ {
10917
+ "source": "/assets/(.*)",
10918
+ "headers": [
10919
+ {
10920
+ "key": "Cache-Control",
10921
+ "value": "public, max-age=31536000, immutable"
10922
+ }
10923
+ ]
10924
+ }
10925
+ ]
10926
+ }
10927
+ END_OF_FILE_CONTENT
10928
+ # SKIP: src/vercel.json:Zone.Identifier is binary and cannot be embedded as text.
10868
10929
  echo "Creating src/vite-env.d.ts..."
10869
10930
  cat << 'END_OF_FILE_CONTENT' > "src/vite-env.d.ts"
10870
10931
  /// <reference types="vite/client" />
@@ -1817,7 +1817,7 @@ 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.6",
1820
+ "@olonjs/core": "^1.1.10",
1821
1821
  "class-variance-authority": "^0.7.1",
1822
1822
  "clsx": "^2.1.1",
1823
1823
  "lucide-react": "^0.474.0",
@@ -2146,6 +2146,7 @@ const root = path.resolve(__dirname, '..');
2146
2146
  const pagesDir = path.resolve(root, 'src/data/pages');
2147
2147
  const publicDir = path.resolve(root, 'public');
2148
2148
  const distDir = path.resolve(root, 'dist');
2149
+ const distSsrDir = path.resolve(root, 'dist-ssr');
2149
2150
 
2150
2151
  async function writeTargets(relativePath, content) {
2151
2152
  const targets = [
@@ -2163,6 +2164,15 @@ async function writeJsonTargets(relativePath, value) {
2163
2164
  await writeTargets(relativePath, `${JSON.stringify(value, null, 2)}\n`);
2164
2165
  }
2165
2166
 
2167
+ // Schemas go to dist-ssr ONLY: committed (dist-ssr is not gitignored) so provisioning can read
2168
+ // them from the repo, but NOT served as static files — so /schemas/* falls through to the
2169
+ // blob rewrite, and provision/hotSave own the served contract.
2170
+ async function writeSsrJson(relativePath, value) {
2171
+ const target = path.resolve(distSsrDir, relativePath);
2172
+ await fs.mkdir(path.dirname(target), { recursive: true });
2173
+ await fs.writeFile(target, `${JSON.stringify(value, null, 2)}\n`, 'utf-8');
2174
+ }
2175
+
2166
2176
  function escapeHtmlAttribute(value) {
2167
2177
  return String(value).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
2168
2178
  }
@@ -2264,9 +2274,10 @@ for (const { slug } of targets) {
2264
2274
  slug,
2265
2275
  pageConfig,
2266
2276
  schemas: webMcpBuildState.schemas,
2277
+ submissionSchemas: webMcpBuildState.submissionSchemas,
2267
2278
  siteConfig: webMcpBuildState.siteConfig,
2268
2279
  });
2269
- await writeJsonTargets(`schemas/${slug}.schema.json`, contract);
2280
+ await writeSsrJson(`schemas/${slug}.schema.json`, contract);
2270
2281
  const pageManifest = buildPageManifest({
2271
2282
  slug,
2272
2283
  pageConfig,
@@ -2342,6 +2353,7 @@ for (const { slug, out, depth } of targets) {
2342
2353
  console.log('\n[bake] All pages baked. OK\n');
2343
2354
 
2344
2355
  END_OF_FILE_CONTENT
2356
+ # SKIP: scripts/bake.mjs:Zone.Identifier is binary and cannot be embedded as text.
2345
2357
  echo "Creating scripts/generate-llms-txt.mjs..."
2346
2358
  cat << 'END_OF_FILE_CONTENT' > "scripts/generate-llms-txt.mjs"
2347
2359
  import fs from 'fs';
@@ -2873,7 +2885,7 @@ import { JsonPagesEngine } from '@olonjs/core';
2873
2885
  import type { JsonPagesConfig, LibraryImageEntry, ProjectState } from '@olonjs/core';
2874
2886
  import { normalizeBasePath, withBasePath } from '@olonjs/core';
2875
2887
  import { ComponentRegistry } from '@/lib/ComponentRegistry';
2876
- import { SECTION_SCHEMAS, SECTION_SUBMISSION_SCHEMAS } from '@/lib/schemas';
2888
+ import { SECTION_SCHEMAS } from '@/lib/schemas';
2877
2889
  import { addSectionConfig } from '@/lib/addSectionConfig';
2878
2890
  import { getHydratedData } from '@/lib/draftStorage';
2879
2891
  import type { SiteConfig, ThemeConfig, MenuConfig, PageConfig } from '@/types';
@@ -3037,6 +3049,7 @@ function coerceSiteConfig(value: unknown): SiteConfig | null {
3037
3049
  }
3038
3050
  if (!isObjectRecord(input)) return null;
3039
3051
  if (!isObjectRecord(input.identity)) return null;
3052
+ if (!Array.isArray(input.pages)) return null;
3040
3053
 
3041
3054
  return input as unknown as SiteConfig;
3042
3055
  }
@@ -3727,14 +3740,13 @@ function App() {
3727
3740
  basePath: APP_BASE_PATH,
3728
3741
  registry: ComponentRegistry as JsonPagesConfig['registry'],
3729
3742
  schemas: SECTION_SCHEMAS as unknown as JsonPagesConfig['schemas'],
3730
- submissionSchemas: SECTION_SUBMISSION_SCHEMAS as unknown as JsonPagesConfig['submissionSchemas'],
3731
3743
  pages,
3732
3744
  siteConfig,
3733
3745
  themeConfig,
3734
3746
  menuConfig,
3735
3747
  refDocuments,
3736
- iconRegistry: iconMap,
3737
3748
  themeCss: { tenant: resolvedTenantCss },
3749
+ iconRegistry: iconMap,
3738
3750
  addSection: addSectionConfig,
3739
3751
  webmcp: {
3740
3752
  enabled: true,
@@ -3950,13 +3962,7 @@ function App() {
3950
3962
  </div>
3951
3963
  </div>
3952
3964
  ) : null}
3953
- {shouldRenderEngine ? (
3954
- isTenantEmpty ? (
3955
- <EmptyTenantView />
3956
- ) : (
3957
- <JsonPagesEngine config={config} />
3958
- )
3959
- ) : null}
3965
+ {shouldRenderEngine ? (isTenantEmpty ? <EmptyTenantView /> : <JsonPagesEngine config={config} />) : null}
3960
3966
  {isCloudMode && (contentMode === 'error' || contentFallback?.reasonCode === 'CLOUD_REFRESH_FAILED') ? (
3961
3967
  <div
3962
3968
  role="status"
@@ -4032,6 +4038,7 @@ function App() {
4032
4038
  export default App;
4033
4039
 
4034
4040
  END_OF_FILE_CONTENT
4041
+ # SKIP: src/App.tsx:Zone.Identifier is binary and cannot be embedded as text.
4035
4042
  mkdir -p "src/components"
4036
4043
  echo "Creating src/components/ThemeProvider.tsx..."
4037
4044
  cat << 'END_OF_FILE_CONTENT' > "src/components/ThemeProvider.tsx"
@@ -10810,7 +10817,7 @@ END_OF_FILE_CONTENT
10810
10817
  echo "Creating src/runtime.ts..."
10811
10818
  cat << 'END_OF_FILE_CONTENT' > "src/runtime.ts"
10812
10819
  import type { JsonPagesConfig, MenuConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
10813
- import { SECTION_SCHEMAS, SECTION_SUBMISSION_SCHEMAS } from '@/lib/schemas';
10820
+ import { SECTION_SCHEMAS } from '@/lib/schemas';
10814
10821
  import { getFilePages } from '@/lib/getFilePages';
10815
10822
  import siteData from '@/data/config/site.json';
10816
10823
  import menuData from '@/data/config/menu.json';
@@ -10829,18 +10836,17 @@ export const refDocuments = {
10829
10836
  export function getWebMcpBuildState(): {
10830
10837
  pages: Record<string, PageConfig>;
10831
10838
  schemas: JsonPagesConfig['schemas'];
10832
- submissionSchemas: JsonPagesConfig['submissionSchemas'];
10833
10839
  siteConfig: SiteConfig;
10834
10840
  } {
10835
10841
  return {
10836
10842
  pages,
10837
10843
  schemas: SECTION_SCHEMAS as unknown as JsonPagesConfig['schemas'],
10838
- submissionSchemas: SECTION_SUBMISSION_SCHEMAS as unknown as JsonPagesConfig['submissionSchemas'],
10839
10844
  siteConfig,
10840
10845
  };
10841
10846
  }
10842
10847
 
10843
10848
  END_OF_FILE_CONTENT
10849
+ # SKIP: src/runtime.ts:Zone.Identifier is binary and cannot be embedded as text.
10844
10850
  echo "Creating src/types.ts..."
10845
10851
  cat << 'END_OF_FILE_CONTENT' > "src/types.ts"
10846
10852
  import type { EmptyTenantData, EmptyTenantSettings } from '@/components/empty-tenant';
@@ -10865,6 +10871,61 @@ declare module '@olonjs/core' {
10865
10871
  export * from '@olonjs/core';
10866
10872
 
10867
10873
  END_OF_FILE_CONTENT
10874
+ echo "Creating src/vercel.json..."
10875
+ cat << 'END_OF_FILE_CONTENT' > "src/vercel.json"
10876
+ {
10877
+ "rewrites": [
10878
+ {
10879
+ "source": "/robots.txt",
10880
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/robots.txt"
10881
+ },
10882
+ {
10883
+ "source": "/sitemap.xml",
10884
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/sitemap.xml"
10885
+ },
10886
+ {
10887
+ "source": "/llms.txt",
10888
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/llms.txt"
10889
+ },
10890
+ {
10891
+ "source": "/.well-known/agent-card.json",
10892
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/.well-known/agent-card.json"
10893
+ },
10894
+ {
10895
+ "source": "/mcp-manifest.json",
10896
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/mcp-manifest.json"
10897
+ },
10898
+ {
10899
+ "source": "/mcp-manifests/:path*.json",
10900
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/mcp-manifests/:path*.json"
10901
+ },
10902
+ {
10903
+ "source": "/schemas/:path*.json",
10904
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/schemas/:path*.json"
10905
+ },
10906
+ {
10907
+ "source": "/:path*.json",
10908
+ "destination": "https://bat5elmxofxdroan.public.blob.vercel-storage.com/tenants/santa1/pages/:path*.json"
10909
+ },
10910
+ {
10911
+ "source": "/(.*)",
10912
+ "destination": "/index.html"
10913
+ }
10914
+ ],
10915
+ "headers": [
10916
+ {
10917
+ "source": "/assets/(.*)",
10918
+ "headers": [
10919
+ {
10920
+ "key": "Cache-Control",
10921
+ "value": "public, max-age=31536000, immutable"
10922
+ }
10923
+ ]
10924
+ }
10925
+ ]
10926
+ }
10927
+ END_OF_FILE_CONTENT
10928
+ # SKIP: src/vercel.json:Zone.Identifier is binary and cannot be embedded as text.
10868
10929
  echo "Creating src/vite-env.d.ts..."
10869
10930
  cat << 'END_OF_FILE_CONTENT' > "src/vite-env.d.ts"
10870
10931
  /// <reference types="vite/client" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olonjs/cli",
3
- "version": "3.0.142",
3
+ "version": "3.0.144",
4
4
  "description": "The Sovereign CLI Engine for OlonJS.",
5
5
  "type": "module",
6
6
  "bin": {