@raybase/create 0.0.2 → 0.3.3
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.
- package/LICENSE +21 -0
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/assets/apple-touch-icons/0.png +0 -0
- package/assets/apple-touch-icons/1.png +0 -0
- package/assets/apple-touch-icons/2.png +0 -0
- package/assets/apple-touch-icons/3.png +0 -0
- package/assets/apple-touch-icons/4.png +0 -0
- package/assets/apple-touch-icons/5.png +0 -0
- package/assets/apple-touch-icons/6.png +0 -0
- package/assets/apple-touch-icons/7.png +0 -0
- package/assets/apple-touch-icons/8.png +0 -0
- package/assets/apple-touch-icons/9.png +0 -0
- package/assets/apple-touch-icons/A.png +0 -0
- package/assets/apple-touch-icons/B.png +0 -0
- package/assets/apple-touch-icons/C.png +0 -0
- package/assets/apple-touch-icons/D.png +0 -0
- package/assets/apple-touch-icons/E.png +0 -0
- package/assets/apple-touch-icons/F.png +0 -0
- package/assets/apple-touch-icons/G.png +0 -0
- package/assets/apple-touch-icons/H.png +0 -0
- package/assets/apple-touch-icons/I.png +0 -0
- package/assets/apple-touch-icons/J.png +0 -0
- package/assets/apple-touch-icons/K.png +0 -0
- package/assets/apple-touch-icons/L.png +0 -0
- package/assets/apple-touch-icons/M.png +0 -0
- package/assets/apple-touch-icons/N.png +0 -0
- package/assets/apple-touch-icons/O.png +0 -0
- package/assets/apple-touch-icons/P.png +0 -0
- package/assets/apple-touch-icons/Q.png +0 -0
- package/assets/apple-touch-icons/R.png +0 -0
- package/assets/apple-touch-icons/S.png +0 -0
- package/assets/apple-touch-icons/T.png +0 -0
- package/assets/apple-touch-icons/U.png +0 -0
- package/assets/apple-touch-icons/V.png +0 -0
- package/assets/apple-touch-icons/W.png +0 -0
- package/assets/apple-touch-icons/X.png +0 -0
- package/assets/apple-touch-icons/Y.png +0 -0
- package/assets/apple-touch-icons/Z.png +0 -0
- package/assets/apple-touch-icons/default.png +0 -0
- package/dist/.source-hash +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2351 -0
- package/dist/index.js.map +1 -0
- package/dist/raybase-package-ranges.d.ts +11 -0
- package/dist/raybase-package-ranges.d.ts.map +1 -0
- package/dist/raybase-package-ranges.js +11 -0
- package/dist/raybase-package-ranges.js.map +1 -0
- package/dist/source-fetch.d.ts +91 -0
- package/dist/source-fetch.d.ts.map +1 -0
- package/dist/source-fetch.js +325 -0
- package/dist/source-fetch.js.map +1 -0
- package/dist/source-hash.d.ts +2 -0
- package/dist/source-hash.d.ts.map +1 -0
- package/dist/source-hash.js +23 -0
- package/dist/source-hash.js.map +1 -0
- package/dist/starter-description.d.ts +44 -0
- package/dist/starter-description.d.ts.map +1 -0
- package/dist/starter-description.js +273 -0
- package/dist/starter-description.js.map +1 -0
- package/dist/starter-source.d.ts +43 -0
- package/dist/starter-source.d.ts.map +1 -0
- package/dist/starter-source.js +156 -0
- package/dist/starter-source.js.map +1 -0
- package/dist/store-app-apply.d.ts +27 -0
- package/dist/store-app-apply.d.ts.map +1 -0
- package/dist/store-app-apply.js +100 -0
- package/dist/store-app-apply.js.map +1 -0
- package/dist/store-app-manifest.d.ts +86 -0
- package/dist/store-app-manifest.d.ts.map +1 -0
- package/dist/store-app-manifest.js +110 -0
- package/dist/store-app-manifest.js.map +1 -0
- package/dist/store-app-registry.d.ts +30 -0
- package/dist/store-app-registry.d.ts.map +1 -0
- package/dist/store-app-registry.js +232 -0
- package/dist/store-app-registry.js.map +1 -0
- package/models/recommended.json +42 -0
- package/modules/api/templates/react-router/app/api/operations.ts +8 -0
- package/modules/api/templates/tanstack-start/src/api/operations.ts +15 -0
- package/modules/docs/templates/astro-emdash/content/docs/getting-started.mdx +13 -0
- package/modules/docs/templates/astro-emdash/content/docs/index.mdx +13 -0
- package/modules/docs/templates/astro-emdash/content/docs/mcp.mdx +11 -0
- package/modules/docs/templates/astro-emdash/content/docs/meta.json +4 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/getting-started.mdx +12 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/index.mdx +12 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/mcp.mdx +10 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/meta.json +4 -0
- package/modules/docs/templates/astro-emdash/site/source.config.ts +10 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/source.ts +7 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/[...slug].ts +6 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/markdown.ts +4 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/search.ts +4 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/llms.txt.ts +8 -0
- package/modules/docs/templates/astro-emdash/site/src/styles-docs.css +3 -0
- package/modules/docs/templates/astro-emdash/source.config.ts +10 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/astro-emdash/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/astro-emdash/src/docs/source.ts +7 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/styles-docs.css +3 -0
- package/modules/docs/templates/react-router/app/components/mdx.tsx +79 -0
- package/modules/docs/templates/react-router/app/lib/layout.shared.tsx +54 -0
- package/modules/docs/templates/react-router/app/lib/source.ts +7 -0
- package/modules/docs/templates/react-router/app/routes/docs.$.tsx +49 -0
- package/modules/docs/templates/react-router/app/routes/docs.api.search.ts +10 -0
- package/modules/docs/templates/react-router/app/routes/docs.tsx +13 -0
- package/modules/docs/templates/react-router/content/docs/getting-started.mdx +8 -0
- package/modules/docs/templates/react-router/content/docs/index.mdx +8 -0
- package/modules/docs/templates/react-router/content/docs/mcp.mdx +121 -0
- package/modules/docs/templates/react-router/content/docs/meta.json +4 -0
- package/modules/docs/templates/react-router/source.config.ts +5 -0
- package/modules/docs/templates/tanstack-start/content/docs/getting-started.mdx +10 -0
- package/modules/docs/templates/tanstack-start/content/docs/index.mdx +8 -0
- package/modules/docs/templates/tanstack-start/content/docs/mcp.mdx +121 -0
- package/modules/docs/templates/tanstack-start/content/docs/meta.json +4 -0
- package/modules/docs/templates/tanstack-start/source.config.ts +10 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/tanstack-start/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/tanstack-start/src/docs/source.ts +7 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/styles-docs.css +3 -0
- package/modules/guide/templates/astro-emdash/content/guide/capability-map.md +17 -0
- package/modules/guide/templates/astro-emdash/src/components/guide-widget.tsx +41 -0
- package/modules/guide/templates/astro-emdash/src/guide/actions.ts +8 -0
- package/modules/guide/templates/astro-emdash/src/guide/config.ts +21 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.ts +4 -0
- package/modules/guide/templates/astro-emdash/src/guide/resources.json +4 -0
- package/modules/guide/templates/react-router/app/components/guide-widget.tsx +29 -0
- package/modules/guide/templates/react-router/app/guide/actions.ts +3 -0
- package/modules/guide/templates/react-router/app/guide/config.ts +21 -0
- package/modules/guide/templates/react-router/app/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/react-router/app/guide/corpus.manifest.json +22 -0
- package/modules/guide/templates/react-router/app/guide/corpus.ts +4 -0
- package/modules/guide/templates/react-router/app/guide/resources.json +4 -0
- package/modules/guide/templates/react-router/content/guide/capability-map.md +13 -0
- package/modules/guide/templates/tanstack-start/content/guide/capability-map.md +17 -0
- package/modules/guide/templates/tanstack-start/src/components/guide-widget.tsx +41 -0
- package/modules/guide/templates/tanstack-start/src/guide/actions.ts +17 -0
- package/modules/guide/templates/tanstack-start/src/guide/config.ts +21 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.manifest.json +22 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.ts +4 -0
- package/modules/guide/templates/tanstack-start/src/guide/resources.json +4 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/astro-emdash/src/openai-subscription.ts +11 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/react-router/app/openai-subscription.ts +11 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/tanstack-start/src/openai-subscription.ts +11 -0
- package/package.json +34 -8
- package/skills/README.md +122 -0
- package/skills/raybase-actions/SKILL.md +223 -0
- package/skills/raybase-actions/references/action-patterns.md +190 -0
- package/skills/raybase-actions/references/adapting-actions.md +93 -0
- package/skills/raybase-actions/references/testing-actions.md +48 -0
- package/skills/raybase-agent-debugging/SKILL.md +230 -0
- package/skills/raybase-ai/SKILL.md +1310 -0
- package/skills/raybase-api/SKILL.md +45 -0
- package/skills/raybase-astro-emdash/SKILL.md +143 -0
- package/skills/raybase-astro-emdash-content-model/SKILL.md +217 -0
- package/skills/raybase-astro-emdash-content-model/references/LICENSE-emdash +9 -0
- package/skills/raybase-astro-emdash-content-model/references/emdash-collections.md +265 -0
- package/skills/raybase-astro-emdash-design/LICENSE-impeccable +60 -0
- package/skills/raybase-astro-emdash-design/SKILL.md +170 -0
- package/skills/raybase-astro-emdash-design/reference/color.md +91 -0
- package/skills/raybase-astro-emdash-design/reference/copy.md +73 -0
- package/skills/raybase-astro-emdash-design/reference/direction.md +115 -0
- package/skills/raybase-astro-emdash-design/reference/imagery.md +84 -0
- package/skills/raybase-astro-emdash-design/reference/layout.md +69 -0
- package/skills/raybase-astro-emdash-design/reference/motion.md +75 -0
- package/skills/raybase-astro-emdash-design/reference/polish.md +75 -0
- package/skills/raybase-astro-emdash-design/reference/typography.md +72 -0
- package/skills/raybase-astro-emdash-galley/SKILL.md +265 -0
- package/skills/raybase-astro-emdash-migration/SKILL.md +218 -0
- package/skills/raybase-astro-emdash-migration/references/inventory-and-conversion.md +242 -0
- package/skills/raybase-astro-emdash-security-review/SKILL.md +68 -0
- package/skills/raybase-astro-emdash-theme-selection/SKILL.md +216 -0
- package/skills/raybase-auth/SKILL.md +358 -0
- package/skills/raybase-background-jobs/SKILL.md +774 -0
- package/skills/raybase-building/SKILL.md +409 -0
- package/skills/raybase-building/references/interview-and-spec.md +87 -0
- package/skills/raybase-building/references/planning-docs.md +26 -0
- package/skills/raybase-building/references/schema-and-config.md +70 -0
- package/skills/raybase-changing-a-live-app/SKILL.md +119 -0
- package/skills/raybase-data-and-policies/SKILL.md +377 -0
- package/skills/raybase-deploy/SKILL.md +136 -0
- package/skills/raybase-docs-writing/SKILL.md +119 -0
- package/skills/raybase-guide/SKILL.md +235 -0
- package/skills/raybase-mcp/SKILL.md +309 -0
- package/skills/raybase-mcp/agents/openai.yaml +4 -0
- package/skills/raybase-notifications/SKILL.md +138 -0
- package/skills/raybase-pro-migration/SKILL.md +28 -0
- package/skills/raybase-react-router/SKILL.md +241 -0
- package/skills/raybase-react-router-design/LICENSE-impeccable +60 -0
- package/skills/raybase-react-router-design/SKILL.md +135 -0
- package/skills/raybase-react-router-design/reference/color.md +87 -0
- package/skills/raybase-react-router-design/reference/copy.md +83 -0
- package/skills/raybase-react-router-design/reference/delight.md +48 -0
- package/skills/raybase-react-router-design/reference/interaction.md +91 -0
- package/skills/raybase-react-router-design/reference/layout.md +82 -0
- package/skills/raybase-react-router-design/reference/motion.md +86 -0
- package/skills/raybase-react-router-design/reference/polish.md +79 -0
- package/skills/raybase-react-router-design/reference/typography.md +71 -0
- package/skills/raybase-react-router-security-review/LICENSE +22 -0
- package/skills/raybase-react-router-security-review/SKILL.md +190 -0
- package/skills/raybase-react-router-security-review/agents/openai.yaml +4 -0
- package/skills/raybase-react-router-security-review/references/api-security.md +519 -0
- package/skills/raybase-react-router-security-review/references/authentication.md +353 -0
- package/skills/raybase-react-router-security-review/references/authorization.md +372 -0
- package/skills/raybase-react-router-security-review/references/business-logic.md +443 -0
- package/skills/raybase-react-router-security-review/references/cryptography.md +329 -0
- package/skills/raybase-react-router-security-review/references/csrf.md +398 -0
- package/skills/raybase-react-router-security-review/references/data-protection.md +378 -0
- package/skills/raybase-react-router-security-review/references/deserialization.md +410 -0
- package/skills/raybase-react-router-security-review/references/error-handling.md +436 -0
- package/skills/raybase-react-router-security-review/references/file-security.md +457 -0
- package/skills/raybase-react-router-security-review/references/injection.md +259 -0
- package/skills/raybase-react-router-security-review/references/logging.md +433 -0
- package/skills/raybase-react-router-security-review/references/misconfiguration.md +435 -0
- package/skills/raybase-react-router-security-review/references/modern-threats.md +475 -0
- package/skills/raybase-react-router-security-review/references/raybase-react-router-security.md +235 -0
- package/skills/raybase-react-router-security-review/references/ssrf.md +413 -0
- package/skills/raybase-react-router-security-review/references/supply-chain.md +405 -0
- package/skills/raybase-react-router-security-review/references/xss.md +336 -0
- package/skills/raybase-realtime/SKILL.md +158 -0
- package/skills/raybase-realtime/agents/openai.yaml +4 -0
- package/skills/raybase-schema/SKILL.md +209 -0
- package/skills/raybase-search/SKILL.md +137 -0
- package/skills/raybase-search/agents/openai.yaml +4 -0
- package/skills/raybase-settings/SKILL.md +139 -0
- package/skills/raybase-settings/agents/openai.yaml +4 -0
- package/skills/raybase-tanstack-start/SKILL.md +166 -0
- package/skills/raybase-tanstack-start-design/LICENSE-impeccable +60 -0
- package/skills/raybase-tanstack-start-design/SKILL.md +140 -0
- package/skills/raybase-tanstack-start-design/reference/color.md +80 -0
- package/skills/raybase-tanstack-start-design/reference/copy.md +83 -0
- package/skills/raybase-tanstack-start-design/reference/delight.md +48 -0
- package/skills/raybase-tanstack-start-design/reference/interaction.md +91 -0
- package/skills/raybase-tanstack-start-design/reference/layout.md +82 -0
- package/skills/raybase-tanstack-start-design/reference/motion.md +86 -0
- package/skills/raybase-tanstack-start-design/reference/polish.md +79 -0
- package/skills/raybase-tanstack-start-design/reference/typography.md +71 -0
- package/skills/raybase-tanstack-start-security-review/LICENSE +22 -0
- package/skills/raybase-tanstack-start-security-review/SKILL.md +194 -0
- package/skills/raybase-tanstack-start-security-review/agents/openai.yaml +4 -0
- package/skills/raybase-tanstack-start-security-review/references/api-security.md +519 -0
- package/skills/raybase-tanstack-start-security-review/references/authentication.md +353 -0
- package/skills/raybase-tanstack-start-security-review/references/authorization.md +372 -0
- package/skills/raybase-tanstack-start-security-review/references/business-logic.md +443 -0
- package/skills/raybase-tanstack-start-security-review/references/cryptography.md +329 -0
- package/skills/raybase-tanstack-start-security-review/references/csrf.md +398 -0
- package/skills/raybase-tanstack-start-security-review/references/data-protection.md +378 -0
- package/skills/raybase-tanstack-start-security-review/references/deserialization.md +410 -0
- package/skills/raybase-tanstack-start-security-review/references/error-handling.md +436 -0
- package/skills/raybase-tanstack-start-security-review/references/file-security.md +457 -0
- package/skills/raybase-tanstack-start-security-review/references/injection.md +259 -0
- package/skills/raybase-tanstack-start-security-review/references/logging.md +433 -0
- package/skills/raybase-tanstack-start-security-review/references/misconfiguration.md +435 -0
- package/skills/raybase-tanstack-start-security-review/references/modern-threats.md +475 -0
- package/skills/raybase-tanstack-start-security-review/references/raybase-tanstack-security.md +208 -0
- package/skills/raybase-tanstack-start-security-review/references/ssrf.md +413 -0
- package/skills/raybase-tanstack-start-security-review/references/supply-chain.md +405 -0
- package/skills/raybase-tanstack-start-security-review/references/xss.md +336 -0
- package/skills-manifest.json +41 -0
- package/templates/astro-emdash/.dev.vars.example +7 -0
- package/templates/astro-emdash/AGENTS.md +122 -0
- package/templates/astro-emdash/DESIGN.md +90 -0
- package/templates/astro-emdash/components.json +21 -0
- package/templates/astro-emdash/content/docs/getting-started.mdx +20 -0
- package/templates/astro-emdash/content/docs/index.mdx +13 -0
- package/templates/astro-emdash/content/docs/mcp.mdx +11 -0
- package/templates/astro-emdash/content/docs/meta.json +4 -0
- package/templates/astro-emdash/content/docs/site-templates.mdx +62 -0
- package/templates/astro-emdash/dev/CODEBASE-MAP.md +46 -0
- package/templates/astro-emdash/dev/SPEC-OVERVIEW.md +15 -0
- package/templates/astro-emdash/dev/SPEC.md +84 -0
- package/templates/astro-emdash/dev/features/archive/.gitkeep +1 -0
- package/templates/astro-emdash/docs/theme-previews/base.svg +24 -0
- package/templates/astro-emdash/docs/theme-previews/steel.svg +24 -0
- package/templates/astro-emdash/docs/theme-previews/zen.svg +24 -0
- package/templates/astro-emdash/docs/themes.md +106 -0
- package/templates/astro-emdash/drizzle.config.ts +5 -0
- package/templates/astro-emdash/gitignore +11 -0
- package/templates/astro-emdash/migrations/app/meta/_journal.json +5 -0
- package/templates/astro-emdash/package.json +79 -0
- package/templates/astro-emdash/pnpm-workspace.yaml +71 -0
- package/templates/astro-emdash/public/_headers +4 -0
- package/templates/astro-emdash/site/astro.config.mjs +120 -0
- package/templates/astro-emdash/site/demo/README.md +72 -0
- package/templates/astro-emdash/site/demo/content/collection.json +43 -0
- package/templates/astro-emdash/site/demo/content/entries.json +120 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/manifest.json +51 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/sample-content.json +5 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/template.liquid +48 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/host.json +9 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/manifest.json +38 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/sample-content.json +34 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/template.liquid +84 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/manifest.json +64 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/page.json +7 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/sample-content.json +24 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/template.liquid +100 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/manifest.json +51 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/sample-content.json +5 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/template.liquid +70 -0
- package/templates/astro-emdash/site/gitignore +1 -0
- package/templates/astro-emdash/site/package.json +56 -0
- package/templates/astro-emdash/site/scripts/apply-site-templates.mjs +560 -0
- package/templates/astro-emdash/site/scripts/galley-demo.mjs +298 -0
- package/templates/astro-emdash/site/scripts/seed-galley-starter.mjs +360 -0
- package/templates/astro-emdash/site/scripts/site-origin.mjs +45 -0
- package/templates/astro-emdash/site/seed/seed.json +154 -0
- package/templates/astro-emdash/site/seed/templates/.gitkeep +1 -0
- package/templates/astro-emdash/site/src/components/RaybaseSignedInMenu.astro +163 -0
- package/templates/astro-emdash/site/src/components/blocks/RaybaseActionIsland.astro +41 -0
- package/templates/astro-emdash/site/src/content-door/raybase-routes.ts +738 -0
- package/templates/astro-emdash/site/src/content-door/resolve-page.ts +142 -0
- package/templates/astro-emdash/site/src/content-door/seed.ts +85 -0
- package/templates/astro-emdash/site/src/env.d.ts +12 -0
- package/templates/astro-emdash/site/src/layouts/SiteLayout.astro +68 -0
- package/templates/astro-emdash/site/src/lib/palettes.gen.ts +7 -0
- package/templates/astro-emdash/site/src/lib/site-motion.ts +169 -0
- package/templates/astro-emdash/site/src/lib/site-shell.ts +294 -0
- package/templates/astro-emdash/site/src/live.config.ts +8 -0
- package/templates/astro-emdash/site/src/middleware.ts +20 -0
- package/templates/astro-emdash/site/src/pages/[...slug].astro +113 -0
- package/templates/astro-emdash/site/src/pages/_raybase/handoff/consume.ts +6 -0
- package/templates/astro-emdash/site/src/pages/_raybase/islands/action.ts +8 -0
- package/templates/astro-emdash/site/src/pages/_raybase/sign-out/index.ts +6 -0
- package/templates/astro-emdash/site/src/styles/palette-fonts.gen.css +1 -0
- package/templates/astro-emdash/site/src/styles/palettes.gen.css +3 -0
- package/templates/astro-emdash/site/src/styles.css +607 -0
- package/templates/astro-emdash/site/tsconfig.json +12 -0
- package/templates/astro-emdash/site/wrangler.jsonc +34 -0
- package/templates/astro-emdash/source.config.ts +10 -0
- package/templates/astro-emdash/src/actions.ts +58 -0
- package/templates/astro-emdash/src/ai/agents.ts +20 -0
- package/templates/astro-emdash/src/ai/retrieval.ts +36 -0
- package/templates/astro-emdash/src/auth-door.ts +18 -0
- package/templates/astro-emdash/src/client.tsx +25 -0
- package/templates/astro-emdash/src/components/.gitkeep +1 -0
- package/templates/astro-emdash/src/components/account-menu.tsx +91 -0
- package/templates/astro-emdash/src/components/auth-shell.tsx +69 -0
- package/templates/astro-emdash/src/components/mode-toggle.tsx +32 -0
- package/templates/astro-emdash/src/components/search-command-palette.tsx +107 -0
- package/templates/astro-emdash/src/components/setup-token-page.tsx +196 -0
- package/templates/astro-emdash/src/components/ui/avatar.tsx +107 -0
- package/templates/astro-emdash/src/components/ui/badge.tsx +52 -0
- package/templates/astro-emdash/src/components/ui/button.tsx +69 -0
- package/templates/astro-emdash/src/components/ui/checkbox.tsx +29 -0
- package/templates/astro-emdash/src/components/ui/dialog.tsx +158 -0
- package/templates/astro-emdash/src/components/ui/dropdown-menu.tsx +303 -0
- package/templates/astro-emdash/src/components/ui/input.tsx +20 -0
- package/templates/astro-emdash/src/components/ui/label.tsx +20 -0
- package/templates/astro-emdash/src/components/ui/scroll-area.tsx +53 -0
- package/templates/astro-emdash/src/components/ui/select.tsx +215 -0
- package/templates/astro-emdash/src/components/ui/separator.tsx +23 -0
- package/templates/astro-emdash/src/components/ui/sheet.tsx +138 -0
- package/templates/astro-emdash/src/components/ui/sidebar.tsx +728 -0
- package/templates/astro-emdash/src/components/ui/skeleton.tsx +13 -0
- package/templates/astro-emdash/src/components/ui/textarea.tsx +18 -0
- package/templates/astro-emdash/src/components/ui/tooltip.tsx +66 -0
- package/templates/astro-emdash/src/db/migrations.gen.ts +6 -0
- package/templates/astro-emdash/src/db/schema.ts +6 -0
- package/templates/astro-emdash/src/db/seed.ts +16 -0
- package/templates/astro-emdash/src/db/storage.ts +32 -0
- package/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
- package/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
- package/templates/astro-emdash/src/docs/docs-data.ts +24 -0
- package/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
- package/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
- package/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
- package/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
- package/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
- package/templates/astro-emdash/src/docs/llm-text.ts +61 -0
- package/templates/astro-emdash/src/docs/source.ts +7 -0
- package/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
- package/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
- package/templates/astro-emdash/src/hooks/use-mobile.ts +19 -0
- package/templates/astro-emdash/src/jobs.example.ts +48 -0
- package/templates/astro-emdash/src/lib/account.ts +12 -0
- package/templates/astro-emdash/src/lib/auth-client.ts +181 -0
- package/templates/astro-emdash/src/lib/utils.ts +6 -0
- package/templates/astro-emdash/src/mcp-app.ts +57 -0
- package/templates/astro-emdash/src/notifications.example.ts +37 -0
- package/templates/astro-emdash/src/raybase.auth.ts +70 -0
- package/templates/astro-emdash/src/raybase.config.ts +49 -0
- package/templates/astro-emdash/src/raybase.server.ts +56 -0
- package/templates/astro-emdash/src/realtime.example.ts +18 -0
- package/templates/astro-emdash/src/router.tsx +19 -0
- package/templates/astro-emdash/src/routes/__root.tsx +56 -0
- package/templates/astro-emdash/src/routes/_app/admin.tsx +13 -0
- package/templates/astro-emdash/src/routes/_app/forgot-password.tsx +97 -0
- package/templates/astro-emdash/src/routes/_app/index.tsx +169 -0
- package/templates/astro-emdash/src/routes/_app/invite.$token.tsx +11 -0
- package/templates/astro-emdash/src/routes/_app/login.tsx +193 -0
- package/templates/astro-emdash/src/routes/_app/profile.tsx +98 -0
- package/templates/astro-emdash/src/routes/_app/reset-password.$token.tsx +15 -0
- package/templates/astro-emdash/src/routes/_app/reset-password.tsx +115 -0
- package/templates/astro-emdash/src/routes/_app/setup.$token.tsx +11 -0
- package/templates/astro-emdash/src/routes/_app/signup.tsx +141 -0
- package/templates/astro-emdash/src/routes/_app/verify-email.$token.tsx +15 -0
- package/templates/astro-emdash/src/routes/_app/verify-email.tsx +154 -0
- package/templates/astro-emdash/src/routes/_app.tsx +33 -0
- package/templates/astro-emdash/src/routes/admin/$.ts +20 -0
- package/templates/astro-emdash/src/routes/api/$.ts +19 -0
- package/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
- package/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
- package/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
- package/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
- package/templates/astro-emdash/src/routes/docs.tsx +22 -0
- package/templates/astro-emdash/src/search.ts +6 -0
- package/templates/astro-emdash/src/settings.ts +12 -0
- package/templates/astro-emdash/src/styles-docs.css +3 -0
- package/templates/astro-emdash/src/styles.css +101 -0
- package/templates/astro-emdash/src/themes/base.css +76 -0
- package/templates/astro-emdash/src/themes/carbon.css +76 -0
- package/templates/astro-emdash/src/themes/fonts.css +25 -0
- package/templates/astro-emdash/src/themes/sage.css +76 -0
- package/templates/astro-emdash/src/themes/sand.css +76 -0
- package/templates/astro-emdash/src/themes/slate.css +81 -0
- package/templates/astro-emdash/src/themes/ultra.css +76 -0
- package/templates/astro-emdash/src/themes/zen.css +76 -0
- package/templates/astro-emdash/src/worker-entry.ts +31 -0
- package/templates/astro-emdash/tests/raybase-patterns.test.ts +29 -0
- package/templates/astro-emdash/tsconfig.json +36 -0
- package/templates/astro-emdash/vite.config.ts +130 -0
- package/templates/astro-emdash/vitest.config.ts +8 -0
- package/templates/astro-emdash/wrangler.jsonc +112 -0
- package/templates/react-router/.dev.vars.example +5 -0
- package/templates/react-router/.editorconfig +15 -0
- package/templates/react-router/AGENTS.md +54 -0
- package/templates/react-router/README.md +52 -0
- package/templates/react-router/app/app.css +44 -0
- package/templates/react-router/app/components/mdx.tsx +79 -0
- package/templates/react-router/app/components/ui/button.tsx +45 -0
- package/templates/react-router/app/components/ui/card.tsx +87 -0
- package/templates/react-router/app/components/ui/separator.tsx +22 -0
- package/templates/react-router/app/db/migrations.gen.ts +6 -0
- package/templates/react-router/app/db/schema.ts +56 -0
- package/templates/react-router/app/db/seed.ts +14 -0
- package/templates/react-router/app/entry.server.tsx +41 -0
- package/templates/react-router/app/globals.d.ts +1 -0
- package/templates/react-router/app/lib/layout.shared.tsx +52 -0
- package/templates/react-router/app/lib/source.ts +7 -0
- package/templates/react-router/app/lib/utils.ts +6 -0
- package/templates/react-router/app/raybase.server.ts +65 -0
- package/templates/react-router/app/root.tsx +23 -0
- package/templates/react-router/app/routes/_index.tsx +53 -0
- package/templates/react-router/app/routes/docs.$.tsx +49 -0
- package/templates/react-router/app/routes/docs.api.search.ts +10 -0
- package/templates/react-router/app/routes/docs.tsx +13 -0
- package/templates/react-router/app/routes.ts +3 -0
- package/templates/react-router/components.json +22 -0
- package/templates/react-router/content/docs/getting-started.mdx +15 -0
- package/templates/react-router/content/docs/index.mdx +8 -0
- package/templates/react-router/content/docs/mcp.mdx +121 -0
- package/templates/react-router/content/docs/meta.json +4 -0
- package/templates/react-router/dev/CODEBASE-MAP.md +48 -0
- package/templates/react-router/dev/SPEC-OVERVIEW.md +35 -0
- package/templates/react-router/dev/SPEC.md +93 -0
- package/templates/react-router/dev/features/archive/.gitkeep +1 -0
- package/templates/react-router/drizzle.config.ts +5 -0
- package/templates/react-router/env.d.ts +53 -0
- package/templates/react-router/gitignore +23 -0
- package/templates/react-router/migrations/app/meta/_journal.json +1 -0
- package/templates/react-router/package.json +70 -0
- package/templates/react-router/public/_headers +4 -0
- package/templates/react-router/public/favicon.ico +0 -0
- package/templates/react-router/react-router.config.ts +9 -0
- package/templates/react-router/source.config.ts +5 -0
- package/templates/react-router/tests/raybase-patterns.test.ts +23 -0
- package/templates/react-router/tsconfig.json +27 -0
- package/templates/react-router/vite.config.ts +59 -0
- package/templates/react-router/vitest.config.ts +8 -0
- package/templates/react-router/workers/app.ts +40 -0
- package/templates/react-router/wrangler.jsonc +111 -0
- package/templates/tanstack-start/.dev.vars.example +5 -0
- package/templates/tanstack-start/AGENTS.md +95 -0
- package/templates/tanstack-start/DESIGN.md +65 -0
- package/templates/tanstack-start/components.json +21 -0
- package/templates/tanstack-start/content/docs/getting-started.mdx +65 -0
- package/templates/tanstack-start/content/docs/index.mdx +10 -0
- package/templates/tanstack-start/content/docs/mcp.mdx +122 -0
- package/templates/tanstack-start/content/docs/meta.json +4 -0
- package/templates/tanstack-start/dev/CODEBASE-MAP.md +84 -0
- package/templates/tanstack-start/dev/SPEC-OVERVIEW.md +46 -0
- package/templates/tanstack-start/dev/SPEC.md +213 -0
- package/templates/tanstack-start/dev/features/archive/.gitkeep +1 -0
- package/templates/tanstack-start/docs/theme-previews/base.svg +24 -0
- package/templates/tanstack-start/docs/theme-previews/steel.svg +24 -0
- package/templates/tanstack-start/docs/theme-previews/zen.svg +24 -0
- package/templates/tanstack-start/docs/themes.md +116 -0
- package/templates/tanstack-start/drizzle.config.ts +5 -0
- package/templates/tanstack-start/gitignore +11 -0
- package/templates/tanstack-start/migrations/app/0000_low_karen_page.sql +26 -0
- package/templates/tanstack-start/migrations/app/meta/0000_snapshot.json +196 -0
- package/templates/tanstack-start/migrations/app/meta/_journal.json +13 -0
- package/templates/tanstack-start/package.json +77 -0
- package/templates/tanstack-start/public/_headers +8 -0
- package/templates/tanstack-start/public/icons/app-icon-maskable.svg +1 -0
- package/templates/tanstack-start/public/icons/app-icon.svg +1 -0
- package/templates/tanstack-start/public/icons/apple-touch-icon.png +0 -0
- package/templates/tanstack-start/public/manifest.webmanifest +14 -0
- package/templates/tanstack-start/public/raybase-push-sw.js +32 -0
- package/templates/tanstack-start/source.config.ts +10 -0
- package/templates/tanstack-start/src/actions.ts +560 -0
- package/templates/tanstack-start/src/ai/agents.ts +78 -0
- package/templates/tanstack-start/src/ai/retrieval.ts +36 -0
- package/templates/tanstack-start/src/auth-door.ts +18 -0
- package/templates/tanstack-start/src/client.tsx +25 -0
- package/templates/tanstack-start/src/components/.gitkeep +1 -0
- package/templates/tanstack-start/src/components/account-menu.tsx +127 -0
- package/templates/tanstack-start/src/components/auth-shell.tsx +69 -0
- package/templates/tanstack-start/src/components/install-app.tsx +35 -0
- package/templates/tanstack-start/src/components/mode-toggle.tsx +32 -0
- package/templates/tanstack-start/src/components/search-command-palette.tsx +107 -0
- package/templates/tanstack-start/src/components/setup-token-page.tsx +197 -0
- package/templates/tanstack-start/src/components/ui/avatar.tsx +107 -0
- package/templates/tanstack-start/src/components/ui/badge.tsx +52 -0
- package/templates/tanstack-start/src/components/ui/button.tsx +69 -0
- package/templates/tanstack-start/src/components/ui/checkbox.tsx +29 -0
- package/templates/tanstack-start/src/components/ui/dialog.tsx +158 -0
- package/templates/tanstack-start/src/components/ui/dropdown-menu.tsx +303 -0
- package/templates/tanstack-start/src/components/ui/input.tsx +20 -0
- package/templates/tanstack-start/src/components/ui/label.tsx +20 -0
- package/templates/tanstack-start/src/components/ui/scroll-area.tsx +53 -0
- package/templates/tanstack-start/src/components/ui/select.tsx +215 -0
- package/templates/tanstack-start/src/components/ui/separator.tsx +23 -0
- package/templates/tanstack-start/src/components/ui/sheet.tsx +138 -0
- package/templates/tanstack-start/src/components/ui/sidebar.tsx +728 -0
- package/templates/tanstack-start/src/components/ui/skeleton.tsx +13 -0
- package/templates/tanstack-start/src/components/ui/textarea.tsx +18 -0
- package/templates/tanstack-start/src/components/ui/tooltip.tsx +66 -0
- package/templates/tanstack-start/src/db/migrations.gen.ts +6 -0
- package/templates/tanstack-start/src/db/schema.ts +90 -0
- package/templates/tanstack-start/src/db/seed.ts +106 -0
- package/templates/tanstack-start/src/db/storage.ts +32 -0
- package/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
- package/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
- package/templates/tanstack-start/src/docs/docs-data.ts +24 -0
- package/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
- package/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
- package/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
- package/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
- package/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
- package/templates/tanstack-start/src/docs/llm-text.ts +61 -0
- package/templates/tanstack-start/src/docs/source.ts +7 -0
- package/templates/tanstack-start/src/hooks/use-mobile.ts +19 -0
- package/templates/tanstack-start/src/hooks/use-pwa-install.ts +77 -0
- package/templates/tanstack-start/src/jobs.example.ts +56 -0
- package/templates/tanstack-start/src/lib/account.ts +13 -0
- package/templates/tanstack-start/src/lib/auth-client.ts +187 -0
- package/templates/tanstack-start/src/lib/push-client.ts +98 -0
- package/templates/tanstack-start/src/lib/utils.ts +6 -0
- package/templates/tanstack-start/src/mcp-app.ts +74 -0
- package/templates/tanstack-start/src/notifications.example.ts +37 -0
- package/templates/tanstack-start/src/raybase.auth.ts +86 -0
- package/templates/tanstack-start/src/raybase.config.ts +86 -0
- package/templates/tanstack-start/src/raybase.server.ts +155 -0
- package/templates/tanstack-start/src/realtime.example.ts +46 -0
- package/templates/tanstack-start/src/router.tsx +19 -0
- package/templates/tanstack-start/src/routes/__root.tsx +73 -0
- package/templates/tanstack-start/src/routes/_app/admin.tsx +13 -0
- package/templates/tanstack-start/src/routes/_app/forgot-password.tsx +97 -0
- package/templates/tanstack-start/src/routes/_app/index.tsx +1316 -0
- package/templates/tanstack-start/src/routes/_app/invite.$token.tsx +11 -0
- package/templates/tanstack-start/src/routes/_app/login.tsx +193 -0
- package/templates/tanstack-start/src/routes/_app/profile.tsx +98 -0
- package/templates/tanstack-start/src/routes/_app/reset-password.$token.tsx +16 -0
- package/templates/tanstack-start/src/routes/_app/reset-password.tsx +115 -0
- package/templates/tanstack-start/src/routes/_app/setup.$token.tsx +11 -0
- package/templates/tanstack-start/src/routes/_app/signup.tsx +141 -0
- package/templates/tanstack-start/src/routes/_app/verify-email.$token.tsx +15 -0
- package/templates/tanstack-start/src/routes/_app/verify-email.tsx +154 -0
- package/templates/tanstack-start/src/routes/_app.tsx +33 -0
- package/templates/tanstack-start/src/routes/admin/$.ts +20 -0
- package/templates/tanstack-start/src/routes/api/$.ts +19 -0
- package/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
- package/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
- package/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
- package/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
- package/templates/tanstack-start/src/routes/docs.tsx +22 -0
- package/templates/tanstack-start/src/search.ts +26 -0
- package/templates/tanstack-start/src/settings.ts +12 -0
- package/templates/tanstack-start/src/styles-docs.css +3 -0
- package/templates/tanstack-start/src/styles.css +73 -0
- package/templates/tanstack-start/src/themes/base.css +76 -0
- package/templates/tanstack-start/src/themes/carbon.css +76 -0
- package/templates/tanstack-start/src/themes/fonts.css +18 -0
- package/templates/tanstack-start/src/themes/sage.css +76 -0
- package/templates/tanstack-start/src/themes/sand.css +76 -0
- package/templates/tanstack-start/src/themes/slate.css +76 -0
- package/templates/tanstack-start/src/themes/ultra.css +76 -0
- package/templates/tanstack-start/src/themes/zen.css +76 -0
- package/templates/tanstack-start/src/worker-entry.ts +30 -0
- package/templates/tanstack-start/tests/raybase-patterns.test.ts +247 -0
- package/templates/tanstack-start/tsconfig.json +33 -0
- package/templates/tanstack-start/vite.config.ts +132 -0
- package/templates/tanstack-start/vitest.config.ts +8 -0
- package/templates/tanstack-start/wrangler.jsonc +112 -0
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-app-apply.js","sourceRoot":"","sources":["../src/store-app-apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnI,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA2B/D,MAAM,UAAU,oBAAoB,CAAC,UAAkB,EAAE,QAA0B,EAAE,SAAwB;IA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CAAC;IAC9E,OAAO,MAAM,CAAC,OAAO,IAAI,SAAS,CAAC;AACrC,CAAC;AAED,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,IAAI,CAAC,WAAW,EAAE;YAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;;YAC/C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type StoreAppTier = "core" | "pro-single" | "pro-multi";
|
|
2
|
+
export type StoreAppBaseFramework = "tanstack-start" | "react-router";
|
|
3
|
+
export type StoreAppManifest = {
|
|
4
|
+
schemaVersion: 1;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
version: string;
|
|
9
|
+
updatedAt?: string;
|
|
10
|
+
tier: StoreAppTier;
|
|
11
|
+
baseFramework: StoreAppBaseFramework;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
compatibility: {
|
|
14
|
+
raybaseCli?: string;
|
|
15
|
+
raybaseCore?: string;
|
|
16
|
+
raybasePro?: string | null;
|
|
17
|
+
node?: string;
|
|
18
|
+
baseFrameworks: StoreAppBaseFramework[];
|
|
19
|
+
};
|
|
20
|
+
modules?: {
|
|
21
|
+
docs?: {
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
};
|
|
24
|
+
guide?: {
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
};
|
|
27
|
+
api?: {
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
capabilities: {
|
|
32
|
+
tables: string[];
|
|
33
|
+
roles: string[];
|
|
34
|
+
secrets: string[];
|
|
35
|
+
bindings: string[];
|
|
36
|
+
publicRoutes: string[];
|
|
37
|
+
externalHosts: string[];
|
|
38
|
+
storageBuckets: string[];
|
|
39
|
+
};
|
|
40
|
+
install: {
|
|
41
|
+
mode: "scaffold-overlay";
|
|
42
|
+
overlay: string;
|
|
43
|
+
deleteBaseFiles?: string[];
|
|
44
|
+
appNameSuggestion?: string;
|
|
45
|
+
};
|
|
46
|
+
verification?: {
|
|
47
|
+
commands?: string[];
|
|
48
|
+
smokeTests?: string[];
|
|
49
|
+
};
|
|
50
|
+
store: {
|
|
51
|
+
listing: string;
|
|
52
|
+
screenshots?: string[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export type StoreRegistryIndex = {
|
|
56
|
+
schemaVersion: 1;
|
|
57
|
+
generatedAt: string;
|
|
58
|
+
registry: {
|
|
59
|
+
name: string;
|
|
60
|
+
displayName: string;
|
|
61
|
+
homepage: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
};
|
|
64
|
+
featured?: string[];
|
|
65
|
+
apps: StoreRegistryApp[];
|
|
66
|
+
};
|
|
67
|
+
export type StoreRegistryApp = {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
version: string;
|
|
72
|
+
tier: StoreAppTier;
|
|
73
|
+
baseFramework: StoreAppBaseFramework;
|
|
74
|
+
manifestUrl: string;
|
|
75
|
+
listingUrl: string;
|
|
76
|
+
fileManifestUrl: string;
|
|
77
|
+
fileManifestIntegrity: string;
|
|
78
|
+
manifestIntegrity: string;
|
|
79
|
+
updatedAt: string;
|
|
80
|
+
verified: boolean;
|
|
81
|
+
tags?: string[];
|
|
82
|
+
};
|
|
83
|
+
export declare function validateStoreAppManifest(value: unknown, expectedId?: string): StoreAppManifest;
|
|
84
|
+
export declare function validateStoreRegistryIndex(value: unknown): StoreRegistryIndex;
|
|
85
|
+
export declare function validateRelativePath(value: string, label: string): void;
|
|
86
|
+
//# sourceMappingURL=store-app-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-app-manifest.d.ts","sourceRoot":"","sources":["../src/store-app-manifest.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,CAAC;AAC/D,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,CAAC,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,aAAa,EAAE,qBAAqB,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,EAAE;QACb,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,EAAE,qBAAqB,EAAE,CAAC;KACzC,CAAC;IACF,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QAC7B,KAAK,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QAC9B,GAAG,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KAC7B,CAAC;IACF,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,KAAK,EAAE,MAA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ACnB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAIF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAyC9F;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAkB7E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIvE"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const RESERVED_FRAMEWORK_IDS = new Set(["tanstack-start", "react-router", "astro-emdash"]);
|
|
2
|
+
export function validateStoreAppManifest(value, expectedId) {
|
|
3
|
+
const manifest = asRecord(value);
|
|
4
|
+
if (manifest.schemaVersion !== 1) {
|
|
5
|
+
throw new Error("Unsupported Store app schemaVersion. Upgrade Raybase/create-raybase to use this Store app.");
|
|
6
|
+
}
|
|
7
|
+
const id = stringField(manifest, "id");
|
|
8
|
+
validateSlug(id, "Store app id");
|
|
9
|
+
validateStoreAppId(id);
|
|
10
|
+
if (expectedId && id !== expectedId)
|
|
11
|
+
throw new Error(`Store app manifest id ${id} does not match registry id ${expectedId}.`);
|
|
12
|
+
stringField(manifest, "name");
|
|
13
|
+
stringField(manifest, "description");
|
|
14
|
+
stringField(manifest, "version");
|
|
15
|
+
const tier = stringField(manifest, "tier");
|
|
16
|
+
if (!["core", "pro-single", "pro-multi"].includes(tier))
|
|
17
|
+
throw new Error(`Unsupported Store app tier ${tier}.`);
|
|
18
|
+
if (tier !== "core")
|
|
19
|
+
throw new Error(`Store app ${id} requires ${tier}; Store v1 can install only core-tier Store apps.`);
|
|
20
|
+
const baseFramework = stringField(manifest, "baseFramework");
|
|
21
|
+
if (!["tanstack-start", "react-router"].includes(baseFramework))
|
|
22
|
+
throw new Error(`Unsupported base framework ${baseFramework}.`);
|
|
23
|
+
const compatibility = asRecord(manifest.compatibility);
|
|
24
|
+
const baseFrameworks = arrayOfStrings(compatibility.baseFrameworks, "compatibility.baseFrameworks");
|
|
25
|
+
if (!baseFrameworks.includes(baseFramework))
|
|
26
|
+
throw new Error("Store app compatibility.baseFrameworks must include baseFramework.");
|
|
27
|
+
const install = asRecord(manifest.install);
|
|
28
|
+
if (install.mode !== "scaffold-overlay")
|
|
29
|
+
throw new Error("Store v1 supports only scaffold-overlay Store apps.");
|
|
30
|
+
validateRelativePath(stringField(install, "overlay"), "install.overlay");
|
|
31
|
+
for (const file of arrayOfStrings(install.deleteBaseFiles ?? [], "install.deleteBaseFiles"))
|
|
32
|
+
validateRelativePath(file, "install.deleteBaseFiles entry");
|
|
33
|
+
const store = asRecord(manifest.store);
|
|
34
|
+
validateRelativePath(stringField(store, "listing"), "store.listing");
|
|
35
|
+
for (const screenshot of arrayOfStrings(store.screenshots ?? [], "store.screenshots"))
|
|
36
|
+
validateRelativePath(screenshot, "store.screenshots entry");
|
|
37
|
+
for (const command of arrayOfStrings(asRecord(manifest.verification ?? {}).commands ?? [], "verification.commands")) {
|
|
38
|
+
if (!command.trim())
|
|
39
|
+
throw new Error("verification.commands entries must be non-empty strings.");
|
|
40
|
+
}
|
|
41
|
+
const capabilities = asRecord(manifest.capabilities);
|
|
42
|
+
for (const field of ["tables", "roles", "secrets", "bindings", "publicRoutes", "externalHosts", "storageBuckets"]) {
|
|
43
|
+
arrayOfStrings(capabilities[field], `capabilities.${field}`);
|
|
44
|
+
}
|
|
45
|
+
if (arrayOfStrings(capabilities.secrets, "capabilities.secrets").length)
|
|
46
|
+
throw new Error("Store v1 apps must not require secrets.");
|
|
47
|
+
if (arrayOfStrings(capabilities.externalHosts, "capabilities.externalHosts").length)
|
|
48
|
+
throw new Error("Store v1 apps must not require external hosts.");
|
|
49
|
+
if (arrayOfStrings(capabilities.storageBuckets, "capabilities.storageBuckets").length)
|
|
50
|
+
throw new Error("Store v1 apps must not require storage buckets.");
|
|
51
|
+
for (const smoke of arrayOfStrings(asRecord(manifest.verification ?? {}).smokeTests ?? [], "verification.smokeTests")) {
|
|
52
|
+
validateRelativePath(smoke, "verification.smokeTests entry");
|
|
53
|
+
}
|
|
54
|
+
return manifest;
|
|
55
|
+
}
|
|
56
|
+
export function validateStoreRegistryIndex(value) {
|
|
57
|
+
const index = asRecord(value);
|
|
58
|
+
if (index.schemaVersion !== 1)
|
|
59
|
+
throw new Error("Unsupported Store registry schemaVersion. Upgrade Raybase/create-raybase.");
|
|
60
|
+
const registry = asRecord(index.registry);
|
|
61
|
+
stringField(registry, "name");
|
|
62
|
+
stringField(registry, "displayName");
|
|
63
|
+
stringField(registry, "homepage");
|
|
64
|
+
const apps = Array.isArray(index.apps) ? index.apps : null;
|
|
65
|
+
if (!apps)
|
|
66
|
+
throw new Error("Store registry is missing apps.");
|
|
67
|
+
for (const app of apps) {
|
|
68
|
+
const entry = asRecord(app);
|
|
69
|
+
const id = stringField(entry, "id");
|
|
70
|
+
validateSlug(id, "registry Store app id");
|
|
71
|
+
validateStoreAppId(id);
|
|
72
|
+
for (const field of ["name", "description", "version", "manifestUrl", "listingUrl", "fileManifestUrl", "fileManifestIntegrity", "manifestIntegrity"])
|
|
73
|
+
stringField(entry, field);
|
|
74
|
+
if (entry.verified !== true)
|
|
75
|
+
throw new Error(`Store app ${entry.id} is not verified.`);
|
|
76
|
+
}
|
|
77
|
+
return index;
|
|
78
|
+
}
|
|
79
|
+
export function validateRelativePath(value, label) {
|
|
80
|
+
if (!value || value.startsWith("/") || value.split(/[\\/]+/).includes("..")) {
|
|
81
|
+
throw new Error(`${label} must be a safe relative path.`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function validateSlug(value, label) {
|
|
85
|
+
if (!/^[a-z0-9][a-z0-9-]*$/.test(value))
|
|
86
|
+
throw new Error(`${label} must be a lowercase slug.`);
|
|
87
|
+
}
|
|
88
|
+
function validateStoreAppId(value) {
|
|
89
|
+
if (RESERVED_FRAMEWORK_IDS.has(value)) {
|
|
90
|
+
throw new Error(`Store app id ${value} is reserved: it names a framework.`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function stringField(value, field) {
|
|
94
|
+
const result = value[field];
|
|
95
|
+
if (typeof result !== "string" || !result.trim())
|
|
96
|
+
throw new Error(`Store app manifest is missing ${field}.`);
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
function arrayOfStrings(value, label) {
|
|
100
|
+
if (!Array.isArray(value) || !value.every((item) => typeof item === "string")) {
|
|
101
|
+
throw new Error(`${label} must be an array of strings.`);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
function asRecord(value) {
|
|
106
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
107
|
+
throw new Error("Expected object.");
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=store-app-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-app-manifest.js","sourceRoot":"","sources":["../src/store-app-manifest.ts"],"names":[],"mappings":"AAgFA,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,gBAAgB,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;AAE3F,MAAM,UAAU,wBAAwB,CAAC,KAAc,EAAE,UAAmB;IAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,aAAa,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;IAChH,CAAC;IACD,MAAM,EAAE,GAAG,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,EAAE,cAAc,CA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M,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,GAAG,CAAC,CAAC;IAC7G,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,cAAc,CAAC,KAAc,EAAE,KAAa;IACnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,+BAA+B,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACrG,OAAO,KAAgC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type StoreAppManifest, type StoreRegistryApp } from "./store-app-manifest.js";
|
|
2
|
+
export type ResolvedStoreApp = {
|
|
3
|
+
id: string;
|
|
4
|
+
manifest: StoreAppManifest;
|
|
5
|
+
registryEntry: StoreRegistryApp;
|
|
6
|
+
registrySource: string;
|
|
7
|
+
manifestUrl: string;
|
|
8
|
+
listingUrl: string;
|
|
9
|
+
fileManifestUrl: string;
|
|
10
|
+
manifestIntegrity: string;
|
|
11
|
+
fileManifestIntegrity: string;
|
|
12
|
+
frameworkRoot: string;
|
|
13
|
+
cleanup: () => void;
|
|
14
|
+
};
|
|
15
|
+
type StoreAppSpec = {
|
|
16
|
+
type: "store";
|
|
17
|
+
raw: string;
|
|
18
|
+
id: string;
|
|
19
|
+
registry?: string;
|
|
20
|
+
} | {
|
|
21
|
+
type: "github";
|
|
22
|
+
raw: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function resolveStoreApp(spec: string, options: {
|
|
25
|
+
registry?: string;
|
|
26
|
+
offline?: boolean;
|
|
27
|
+
}): Promise<ResolvedStoreApp>;
|
|
28
|
+
export declare function parseStoreAppSpec(spec: string): StoreAppSpec;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=store-app-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-app-registry.d.ts","sourceRoot":"","sources":["../src/store-app-registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,aAAa,EAAE,gBAAgB,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAOF,KAAK,YAAY,GACb;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAKpC,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,gBAAgB,CAAC,CAyC3B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAwB5D"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { existsSync, lstatSync, mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { dirname, join, relative, resolve } from "node:path";
|
|
5
|
+
import { validateStoreAppManifest, validateRelativePath, validateStoreRegistryIndex } from "./store-app-manifest.js";
|
|
6
|
+
const defaultRegistryUrl = "https://registry.raybase.dev/store/v1/index.json";
|
|
7
|
+
const maxTotalBytes = 25 * 1024 * 1024;
|
|
8
|
+
export async function resolveStoreApp(spec, options) {
|
|
9
|
+
const parsed = parseStoreAppSpec(spec);
|
|
10
|
+
if (parsed.type === "github") {
|
|
11
|
+
throw new Error("GitHub Store apps are reserved for a future Raybase Store release.");
|
|
12
|
+
}
|
|
13
|
+
if (options.offline) {
|
|
14
|
+
throw new Error("Verified Raybase Store apps are online-only; --offline is only supported for built-in starters.");
|
|
15
|
+
}
|
|
16
|
+
const registrySource = parsed.registry ?? options.registry ?? process.env.RAYBASE_STORE_REGISTRY ?? defaultRegistryUrl;
|
|
17
|
+
const loaded = await loadRegistry(registrySource);
|
|
18
|
+
const id = parsed.id;
|
|
19
|
+
const entry = loaded.index.apps.find((template) => template.id === id);
|
|
20
|
+
if (!entry)
|
|
21
|
+
throw new Error(`Unknown Raybase Store app "${id}".`);
|
|
22
|
+
const manifestBytes = await readResource(entry.manifestUrl, loaded.baseUrl);
|
|
23
|
+
const manifestIntegrity = sha256Integrity(manifestBytes);
|
|
24
|
+
if (manifestIntegrity !== entry.manifestIntegrity)
|
|
25
|
+
throw new Error(`Manifest integrity mismatch for ${id}.`);
|
|
26
|
+
const manifest = validateStoreAppManifest(JSON.parse(manifestBytes.toString("utf8")), id);
|
|
27
|
+
const fileManifestBytes = await readResource(entry.fileManifestUrl, loaded.baseUrl);
|
|
28
|
+
const fileManifestIntegrity = sha256Integrity(fileManifestBytes);
|
|
29
|
+
if (fileManifestIntegrity !== entry.fileManifestIntegrity)
|
|
30
|
+
throw new Error(`File manifest integrity mismatch for ${id}.`);
|
|
31
|
+
const fileManifest = validateStoreFileManifest(JSON.parse(fileManifestBytes.toString("utf8")), id);
|
|
32
|
+
const materialized = await materializeStoreApp(id, entry.fileManifestUrl, loaded.baseUrl, fileManifest, fileManifestBytes);
|
|
33
|
+
try {
|
|
34
|
+
validateExtractedStoreApp(materialized.frameworkRoot);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
materialized.cleanup();
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
id,
|
|
42
|
+
manifest,
|
|
43
|
+
registryEntry: entry,
|
|
44
|
+
registrySource: loaded.source,
|
|
45
|
+
manifestUrl: absoluteResourceUrl(entry.manifestUrl, loaded.baseUrl),
|
|
46
|
+
listingUrl: absoluteResourceUrl(entry.listingUrl, loaded.baseUrl),
|
|
47
|
+
fileManifestUrl: absoluteResourceUrl(entry.fileManifestUrl, loaded.baseUrl),
|
|
48
|
+
manifestIntegrity,
|
|
49
|
+
fileManifestIntegrity,
|
|
50
|
+
frameworkRoot: materialized.frameworkRoot,
|
|
51
|
+
cleanup: materialized.cleanup
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function parseStoreAppSpec(spec) {
|
|
55
|
+
const raw = spec.trim();
|
|
56
|
+
if (!raw)
|
|
57
|
+
throw new Error("--from requires a Raybase Store app id.");
|
|
58
|
+
if (/^https?:\/\//.test(raw)) {
|
|
59
|
+
if (/\.md(?:$|[?#])/.test(raw)) {
|
|
60
|
+
throw new Error("Store markdown pages are readable runbooks, not CLI template sources. Read the listing, install/update Raybase from https://raybase.dev/install if needed, then run `raybase create --from asset-manager`.");
|
|
61
|
+
}
|
|
62
|
+
const url = new URL(raw);
|
|
63
|
+
const id = url.hash.slice(1);
|
|
64
|
+
if (!id) {
|
|
65
|
+
throw new Error("HTTP(S) Store registry specs must include a Store app id fragment, for example https://registry.raybase.dev/store/v1/index.json#asset-manager.");
|
|
66
|
+
}
|
|
67
|
+
if (!isStoreAppId(id))
|
|
68
|
+
throw new Error(`Unknown Store app source "${raw}". Use a verified Store id such as asset-manager.`);
|
|
69
|
+
url.hash = "";
|
|
70
|
+
return { type: "store", raw, id, registry: url.toString() };
|
|
71
|
+
}
|
|
72
|
+
if (raw.startsWith("github:"))
|
|
73
|
+
return { type: "github", raw };
|
|
74
|
+
if (raw.startsWith("file://")) {
|
|
75
|
+
throw new Error("Local file Store registries are not supported. Verified Raybase Store apps are online-only; use a Store id such as asset-manager.");
|
|
76
|
+
}
|
|
77
|
+
if (!isStoreAppId(raw))
|
|
78
|
+
throw new Error(`Unknown Store app source "${raw}". Use a verified Store id such as asset-manager.`);
|
|
79
|
+
return { type: "store", raw, id: raw };
|
|
80
|
+
}
|
|
81
|
+
function isStoreAppId(value) {
|
|
82
|
+
return /^[a-z0-9][a-z0-9-]*$/.test(value);
|
|
83
|
+
}
|
|
84
|
+
async function loadRegistry(source) {
|
|
85
|
+
assertOnlineRegistrySource(source);
|
|
86
|
+
const bytes = await readResource(source, null);
|
|
87
|
+
const index = validateStoreRegistryIndex(JSON.parse(bytes.toString("utf8")));
|
|
88
|
+
return { index, source: displaySource(source), baseUrl: baseUrlFor(source) };
|
|
89
|
+
}
|
|
90
|
+
async function readResource(urlOrPath, baseUrl) {
|
|
91
|
+
const url = baseUrl ? new URL(urlOrPath, baseUrl).toString() : urlOrPath;
|
|
92
|
+
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
93
|
+
const parsed = new URL(url);
|
|
94
|
+
const localHttp = parsed.protocol === "http:" && ["localhost", "127.0.0.1", "::1"].includes(parsed.hostname);
|
|
95
|
+
if (parsed.protocol === "http:" && !localHttp)
|
|
96
|
+
throw new Error(`Refusing insecure Store URL ${url}. Use https:// or local http://localhost.`);
|
|
97
|
+
const response = await fetch(url);
|
|
98
|
+
if (!response.ok)
|
|
99
|
+
throw new Error(`Failed to fetch ${url}: ${response.status}`);
|
|
100
|
+
return Buffer.from(await response.arrayBuffer());
|
|
101
|
+
}
|
|
102
|
+
throw new Error(`Unsupported Store resource URL ${url}.`);
|
|
103
|
+
}
|
|
104
|
+
function assertOnlineRegistrySource(source) {
|
|
105
|
+
if (source.startsWith("file://") || existsSync(source)) {
|
|
106
|
+
throw new Error("Local file Store registries are not supported. Verified Raybase Store apps are online-only.");
|
|
107
|
+
}
|
|
108
|
+
if (!source.startsWith("http://") && !source.startsWith("https://")) {
|
|
109
|
+
throw new Error("Store registry must be an HTTPS URL or local http://localhost URL.");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function baseUrlFor(source) {
|
|
113
|
+
return new URL(".", source).toString();
|
|
114
|
+
}
|
|
115
|
+
function absoluteResourceUrl(relativeUrl, baseUrl) {
|
|
116
|
+
return new URL(relativeUrl, baseUrl).toString();
|
|
117
|
+
}
|
|
118
|
+
function displaySource(source) {
|
|
119
|
+
return source.startsWith("file://") ? source : source;
|
|
120
|
+
}
|
|
121
|
+
function validateStoreFileManifest(value, id) {
|
|
122
|
+
const manifest = value;
|
|
123
|
+
if (!manifest || typeof manifest !== "object")
|
|
124
|
+
throw new Error(`Store app ${id} file manifest must be an object.`);
|
|
125
|
+
if (manifest.schemaVersion !== 1)
|
|
126
|
+
throw new Error(`Store app ${id} file manifest has an unsupported schemaVersion. Upgrade Raybase/create-raybase.`);
|
|
127
|
+
if (!Array.isArray(manifest.files) || !manifest.files.length)
|
|
128
|
+
throw new Error(`Store app ${id} file manifest lists no files.`);
|
|
129
|
+
for (const file of manifest.files) {
|
|
130
|
+
validateRelativePath(file.path, `${id} file manifest path`);
|
|
131
|
+
if (!Number.isInteger(file.size) || file.size < 0)
|
|
132
|
+
throw new Error(`Store app ${id} file manifest entry ${file.path} has an invalid size.`);
|
|
133
|
+
if (typeof file.sha256 !== "string" || !/^[0-9a-f]{64}$/.test(file.sha256))
|
|
134
|
+
throw new Error(`Store app ${id} file manifest entry ${file.path} has an invalid sha256.`);
|
|
135
|
+
}
|
|
136
|
+
return manifest;
|
|
137
|
+
}
|
|
138
|
+
// The Store registry ships direct files only (no archives); runtime consumers
|
|
139
|
+
// have no filesystem to extract into, and create-raybase mirrors that
|
|
140
|
+
// contract. Each file listed in file-manifest.json is fetched from the files/
|
|
141
|
+
// directory beside the manifest and verified against its pinned sha256 + size.
|
|
142
|
+
async function materializeStoreApp(id, fileManifestUrl, baseUrl, fileManifest, fileManifestBytes) {
|
|
143
|
+
const totalBytes = fileManifest.files.reduce((sum, file) => sum + file.size, 0);
|
|
144
|
+
if (totalBytes > maxTotalBytes)
|
|
145
|
+
throw new Error(`${id} files exceed ${maxTotalBytes} bytes.`);
|
|
146
|
+
const filesBaseUrl = siblingResourceUrl(fileManifestUrl, "files/");
|
|
147
|
+
const root = mkdtempSync(join(tmpdir(), `raybase-store-${id}-`));
|
|
148
|
+
const frameworkRoot = join(root, "template");
|
|
149
|
+
mkdirSync(frameworkRoot, { recursive: true });
|
|
150
|
+
try {
|
|
151
|
+
writeFileSync(join(frameworkRoot, "file-manifest.json"), fileManifestBytes);
|
|
152
|
+
for (const file of fileManifest.files) {
|
|
153
|
+
const bytes = await readResource(`${filesBaseUrl}${file.path}`, baseUrl);
|
|
154
|
+
if (bytes.byteLength !== file.size)
|
|
155
|
+
throw new Error(`Store app ${id} file size mismatch: ${file.path}.`);
|
|
156
|
+
if (sha256Hex(bytes) !== file.sha256)
|
|
157
|
+
throw new Error(`Store app ${id} file hash mismatch: ${file.path}.`);
|
|
158
|
+
const target = join(frameworkRoot, file.path);
|
|
159
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
160
|
+
writeFileSync(target, bytes);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
rmSync(root, { recursive: true, force: true });
|
|
165
|
+
throw error;
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
frameworkRoot,
|
|
169
|
+
cleanup: () => rmSync(root, { recursive: true, force: true })
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function siblingResourceUrl(url, suffix) {
|
|
173
|
+
const slash = url.lastIndexOf("/");
|
|
174
|
+
return slash === -1 ? suffix : `${url.slice(0, slash + 1)}${suffix}`;
|
|
175
|
+
}
|
|
176
|
+
function validateExtractedStoreApp(root) {
|
|
177
|
+
const manifestPath = join(root, "file-manifest.json");
|
|
178
|
+
if (!existsSync(manifestPath))
|
|
179
|
+
throw new Error("Store archive is missing file-manifest.json.");
|
|
180
|
+
const fileManifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
181
|
+
if (fileManifest.schemaVersion !== 1 || !Array.isArray(fileManifest.files))
|
|
182
|
+
throw new Error("Store archive file-manifest.json is invalid.");
|
|
183
|
+
const seen = new Set();
|
|
184
|
+
for (const file of walk(root)) {
|
|
185
|
+
const rel = relative(root, file).replace(/\\/g, "/");
|
|
186
|
+
if (rel === "file-manifest.json")
|
|
187
|
+
continue;
|
|
188
|
+
validateRelativePath(rel, "archive file path");
|
|
189
|
+
seen.add(rel);
|
|
190
|
+
}
|
|
191
|
+
const declared = new Set(fileManifest.files.map((entry) => entry.path));
|
|
192
|
+
for (const rel of seen) {
|
|
193
|
+
if (!declared.has(rel))
|
|
194
|
+
throw new Error(`Archive contains undeclared file: ${rel}`);
|
|
195
|
+
}
|
|
196
|
+
for (const entry of fileManifest.files) {
|
|
197
|
+
validateRelativePath(entry.path, "archive manifest path");
|
|
198
|
+
const file = join(root, entry.path);
|
|
199
|
+
if (!seen.has(entry.path) || !existsSync(file))
|
|
200
|
+
throw new Error(`Archive file listed but missing: ${entry.path}`);
|
|
201
|
+
const stat = lstatSync(file);
|
|
202
|
+
if (!stat.isFile())
|
|
203
|
+
throw new Error(`Archive entry is not a file: ${entry.path}`);
|
|
204
|
+
if (stat.size !== entry.size)
|
|
205
|
+
throw new Error(`Archive file size mismatch: ${entry.path}`);
|
|
206
|
+
if (sha256File(file) !== entry.sha256)
|
|
207
|
+
throw new Error(`Archive file hash mismatch: ${entry.path}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function walk(directory) {
|
|
211
|
+
const files = [];
|
|
212
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
213
|
+
const full = join(directory, entry.name);
|
|
214
|
+
if (entry.isSymbolicLink())
|
|
215
|
+
throw new Error(`Store archive symlink is not allowed: ${full}`);
|
|
216
|
+
if (entry.isDirectory())
|
|
217
|
+
files.push(...walk(full));
|
|
218
|
+
else if (entry.isFile())
|
|
219
|
+
files.push(resolve(full));
|
|
220
|
+
}
|
|
221
|
+
return files;
|
|
222
|
+
}
|
|
223
|
+
function sha256Integrity(value) {
|
|
224
|
+
return `sha256-${createHash("sha256").update(value).digest("base64")}`;
|
|
225
|
+
}
|
|
226
|
+
function sha256File(file) {
|
|
227
|
+
return createHash("sha256").update(readFileSync(file)).digest("hex");
|
|
228
|
+
}
|
|
229
|
+
function sha256Hex(value) {
|
|
230
|
+
return createHash("sha256").update(value).digest("hex");
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=store-app-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-app-registry.js","sourceRoot":"","sources":["../src/store-app-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1H,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAA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,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"publishedAt": "2026-06-21",
|
|
4
|
+
"provider": "cloudflare-workers-ai",
|
|
5
|
+
"gatewayRecommended": true,
|
|
6
|
+
"gatewayReason": "AI Gateway gives Raybase operators centralized logs, caching controls, and a place to route model changes without editing app source.",
|
|
7
|
+
"defaults": {
|
|
8
|
+
"guide": {
|
|
9
|
+
"model": "@cf/zai-org/glm-4.7-flash",
|
|
10
|
+
"reason": "Recommended for Guide and Raybase Agents because Cloudflare documents it as a text generation model with function calling and a large context window."
|
|
11
|
+
},
|
|
12
|
+
"embedding": {
|
|
13
|
+
"model": "@cf/baai/bge-base-en-v1.5",
|
|
14
|
+
"reason": "Current Raybase default for retrieval embeddings."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"chatModels": [
|
|
18
|
+
{
|
|
19
|
+
"id": "@cf/zai-org/glm-4.7-flash",
|
|
20
|
+
"label": "GLM-4.7-Flash",
|
|
21
|
+
"recommendedFor": ["guide", "agent-tool-use", "app-help"],
|
|
22
|
+
"source": "https://developers.cloudflare.com/workers-ai/models/glm-4.7-flash/"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
|
26
|
+
"label": "Llama 3.3 70B Instruct FP8 Fast",
|
|
27
|
+
"recommendedFor": ["general-chat"],
|
|
28
|
+
"source": "https://developers.cloudflare.com/workers-ai/models/"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "@cf/meta/llama-3.1-8b-instruct-fp8-fast",
|
|
32
|
+
"label": "Llama 3.1 8B Instruct FP8 Fast",
|
|
33
|
+
"recommendedFor": ["low-cost-fallback"],
|
|
34
|
+
"source": "https://developers.cloudflare.com/workers-ai/models/"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"notes": [
|
|
38
|
+
"Scaffold tooling writes the recommended chat model into appConfig.ai.defaults.model; Core then seeds the app default model setting from app config when no stored model exists.",
|
|
39
|
+
"Model availability and pricing can change. Treat this manifest as Raybase guidance, not a guarantee that a Cloudflare account has every listed model enabled.",
|
|
40
|
+
"Use a Cloudflare AI Gateway id in app config or RAYBASE_AI_GATEWAY_ID for observability and centralized model operations."
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { apiModule, defineApiOperations } from "@raybase/api";
|
|
2
|
+
|
|
3
|
+
// Add external API operations by adapting declared Raybase actions with
|
|
4
|
+
// apiOperation(action, { method, path, scopes, parseRequest }).
|
|
5
|
+
export const api = apiModule({
|
|
6
|
+
prefix: "/api/v1",
|
|
7
|
+
operations: defineApiOperations({})
|
|
8
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { apiModule, apiOperation, defineApiOperations } from "@raybase/api";
|
|
2
|
+
import { actions } from "../actions";
|
|
3
|
+
|
|
4
|
+
export const api = apiModule({
|
|
5
|
+
prefix: "/api/v1",
|
|
6
|
+
operations: defineApiOperations({
|
|
7
|
+
markTodoDone: apiOperation(actions.markTodoDone, {
|
|
8
|
+
method: "POST",
|
|
9
|
+
path: "/todos/:id/done",
|
|
10
|
+
scopes: ["todos:write"],
|
|
11
|
+
summary: "Mark todo done",
|
|
12
|
+
parseRequest: ({ params }) => ({ id: params.id })
|
|
13
|
+
})
|
|
14
|
+
})
|
|
15
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Opening the CMS
|
|
3
|
+
description: Sign in and start editing pages.
|
|
4
|
+
public: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Sign in with the account your team gave you, then open the public site and choose CMS from the signed-in menu.
|
|
8
|
+
|
|
9
|
+
Start with Pages. Open an existing draft to review the editing pattern, or create a page when you need a new public URL.
|
|
10
|
+
|
|
11
|
+
Use the page content field to arrange reusable sections. Each section owns its own copy, media, links, and display options.
|
|
12
|
+
|
|
13
|
+
Preview before publishing. If a page needs a new reusable section or a layout change, note the goal clearly and ask the project maintainer to add the building block.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Editing the site
|
|
3
|
+
description: A quick map for signed-in content editors.
|
|
4
|
+
public: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The CMS is where signed-in editors manage public site pages, drafts, media, and reusable page sections.
|
|
8
|
+
|
|
9
|
+
Use the CMS link in the signed-in site menu to open the editing workspace. If the link is not visible, ask the person who manages access to invite you or adjust your role.
|
|
10
|
+
|
|
11
|
+
Most pages are built from a title, slug, metadata, and a sequence of reusable sections. Edit copy and media in the CMS, preview changes, then publish when the page is ready.
|
|
12
|
+
|
|
13
|
+
Keep structural changes deliberate. If you need a new section type, navigation pattern, layout, or data-backed block, ask the project maintainer to add it safely.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Connecting an assistant
|
|
3
|
+
description: How signed-in members can connect an approved assistant.
|
|
4
|
+
public: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Some apps let signed-in members connect an approved AI assistant through the app's `/mcp` endpoint.
|
|
8
|
+
|
|
9
|
+
Only connect assistants you trust. The assistant should explain what it can read or change before you approve a task.
|
|
10
|
+
|
|
11
|
+
If the connection fails, confirm you are signed in and ask the project maintainer whether assistant access is enabled for your role.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Finding and updating pages
|
|
3
|
+
description: Navigate published pages and make safe CMS edits.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the site navigation to find published pages. Editors can sign in, open the CMS from the site menu, and work with drafts before publishing.
|
|
7
|
+
|
|
8
|
+
Start with Pages. Open an existing draft to review the editing pattern, or create a page when you need a new public URL.
|
|
9
|
+
|
|
10
|
+
Use the page content field to arrange reusable sections. Each section owns its own copy, media, links, and display options.
|
|
11
|
+
|
|
12
|
+
Preview before publishing. If a page needs a new reusable section or a layout change, note the goal clearly and ask the project maintainer to add the building block.
|