fimo 0.20.0 → 0.21.0-experimental.1

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.
Files changed (322) hide show
  1. package/README.md +1 -1
  2. package/assets/agent-templates/_default/GOAL.md +10 -0
  3. package/assets/agent-templates/_default/capabilities.yaml +10 -0
  4. package/assets/content-templates/shared/types.eta +1 -1
  5. package/assets/skills/fimo-cli/SKILL.md +2 -1
  6. package/assets/skills/fimo-cli/references/agents.md +136 -36
  7. package/assets/skills/fimo-cli/references/branches.md +8 -5
  8. package/assets/skills/fimo-cli/references/deploy.md +11 -2
  9. package/assets/skills/fimo-cli/references/domains.md +12 -0
  10. package/assets/skills/fimo-cli/references/forms.md +1 -1
  11. package/assets/skills/fimo-cli/references/init.md +9 -2
  12. package/assets/skills/fimo-cli/references/locales.md +1 -1
  13. package/assets/skills/fimo-cli/references/mcp.md +1 -1
  14. package/assets/skills/fimo-cli/references/media.md +18 -1
  15. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +3 -1
  16. package/assets/skills/fimo-cli/references/projects.md +7 -7
  17. package/assets/skills/fimo-code/assets/react-router-locales/navigation.tsx +1 -1
  18. package/assets/skills/fimo-code/references/assets.md +2 -2
  19. package/assets/skills/fimo-code/references/best-practices/next.md +1 -1
  20. package/assets/skills/fimo-code/references/content/schema.md +23 -0
  21. package/assets/skills/fimo-code/references/forms.md +1 -1
  22. package/assets/skills/fimo-code/references/frameworks/astro.md +8 -2
  23. package/assets/skills/fimo-code/references/frameworks/compatibility.md +9 -9
  24. package/assets/skills/fimo-code/references/frameworks/hosting.md +17 -13
  25. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +8 -9
  26. package/assets/skills/fimo-code/references/frameworks/next/locales.md +5 -5
  27. package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +5 -5
  28. package/assets/skills/fimo-code/references/frameworks/next.md +41 -32
  29. package/assets/skills/fimo-code/references/frameworks/react-router.md +10 -7
  30. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +22 -15
  31. package/assets/skills/fimo-code/references/frameworks/vite-react.md +7 -5
  32. package/assets/skills/fimo-code/references/labels.md +4 -4
  33. package/assets/skills/fimo-code/references/locales.md +2 -2
  34. package/assets/skills/fimo-code/references/ui.md +4 -4
  35. package/assets/skills/fimo-migration/SKILL.md +51 -30
  36. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +12 -15
  37. package/assets/skills/fimo-migration/references/media.md +12 -8
  38. package/assets/skills/fimo-migration/references/qa.md +12 -11
  39. package/assets/skills/fimo-migration/references/workers/content-planner.md +33 -4
  40. package/assets/skills/fimo-migration/references/workers/validator.md +10 -0
  41. package/assets/skills/fimo-migration/references/workers.md +19 -10
  42. package/assets/skills/fimo-migration/references/workflow.md +29 -11
  43. package/assets/skills/fimo-studio/references/ai-chat.md +1 -1
  44. package/assets/skills/fimo-studio/references/billing-and-credits.md +18 -1
  45. package/assets/skills/fimo-studio/references/cms.md +2 -0
  46. package/assets/skills/fimo-studio/references/preview-and-responsive.md +1 -0
  47. package/assets/starters/fimo-site/template/src/pages/Contact.tsx +1 -1
  48. package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +1 -1
  49. package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +3 -3
  50. package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +1 -1
  51. package/dist/build/astro/config.d.ts +13 -2
  52. package/dist/build/astro/config.js +9 -24
  53. package/dist/build/next/moved.d.ts +2 -0
  54. package/dist/build/next/moved.js +2 -0
  55. package/dist/build/react/router-moved.d.ts +2 -0
  56. package/dist/build/react/router-moved.js +2 -0
  57. package/dist/build/react/router-preset-moved.d.ts +2 -0
  58. package/dist/build/react/router-preset-moved.js +2 -0
  59. package/dist/build/react/router-routes-moved.d.ts +2 -0
  60. package/dist/build/react/router-routes-moved.js +2 -0
  61. package/dist/build/react/ui-moved.d.ts +2 -0
  62. package/dist/build/react/ui-moved.js +2 -0
  63. package/dist/build/react/vite-moved.d.ts +2 -0
  64. package/dist/build/react/vite-moved.js +2 -0
  65. package/dist/build/sveltekit/config.d.ts +5 -4
  66. package/dist/build/sveltekit/config.js +6 -15
  67. package/dist/build/sveltekit/moved.d.ts +13 -0
  68. package/dist/build/sveltekit/moved.js +3 -0
  69. package/dist/build/vite/data-id.d.ts +11 -0
  70. package/dist/build/vite/data-id.js +20 -0
  71. package/dist/build/vite/plugins/runtime-env.d.ts +1 -1
  72. package/dist/build/vite/plugins/runtime-env.js +6 -2
  73. package/dist/build/vite/runtime-env.d.ts +2 -0
  74. package/dist/build/vite/runtime-env.js +1 -0
  75. package/dist/cli/bundle.json +1 -1
  76. package/dist/cli/index.js +115 -110
  77. package/dist/runtime/content/client/internal.js +1 -1
  78. package/dist/runtime/content/index.d.ts +6 -1
  79. package/dist/runtime/content/index.js +6 -0
  80. package/dist/runtime/i18n/index.d.ts +2 -0
  81. package/dist/runtime/i18n/index.js +1 -0
  82. package/dist/runtime/labels/index.d.ts +3 -0
  83. package/dist/runtime/labels/index.js +2 -0
  84. package/dist/runtime/preview/index.d.ts +5 -0
  85. package/dist/runtime/preview/index.js +4 -0
  86. package/dist/runtime/preview/script.d.ts +3 -0
  87. package/dist/runtime/preview/script.js +14 -0
  88. package/dist/runtime/primitives/lib/index.d.ts +2 -0
  89. package/dist/runtime/primitives/lib/index.js +2 -0
  90. package/dist/runtime/seo/index.d.ts +0 -8
  91. package/dist/runtime/seo/index.js +0 -8
  92. package/dist/runtime/shared/config.d.ts +6 -0
  93. package/dist/runtime/shared/config.js +4 -0
  94. package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
  95. package/dist/runtime/shared/local-runtime-env.js +7 -5
  96. package/dist/runtime/templates.d.ts +20 -4
  97. package/dist/runtime/templates.js +60 -18
  98. package/dist/scripts/extract-translations.js +8 -3
  99. package/dist/scripts/index.d.ts +3 -0
  100. package/dist/scripts/index.js +2 -0
  101. package/dist/scripts/sync-forms.js +21 -9
  102. package/dist/scripts/sync-schemas.js +129 -21
  103. package/dist/scripts/validate-schemas.js +63 -2
  104. package/package.json +72 -71
  105. package/release.json +2 -2
  106. package/templates/astro/AGENTS.md +1 -1
  107. package/templates/astro/astro.config.mjs +1 -1
  108. package/templates/astro/package.json +4 -2
  109. package/templates/astro/pnpm-workspace.yaml +6 -2
  110. package/templates/nextjs/.fimo/config.json +1 -2
  111. package/templates/nextjs/AGENTS.md +6 -16
  112. package/templates/nextjs/next.config.ts +4 -2
  113. package/templates/nextjs/package.json +4 -2
  114. package/templates/nextjs/pnpm-workspace.yaml +6 -2
  115. package/templates/nextjs/src/app/layout.tsx +16 -0
  116. package/templates/nextjs/src/locales.ts +3 -6
  117. package/templates/react-router/AGENTS.md +1 -1
  118. package/templates/react-router/package.json +5 -2
  119. package/templates/react-router/pnpm-workspace.yaml +6 -6
  120. package/templates/react-router/react-router.config.ts +1 -1
  121. package/templates/react-router/src/pages/legal/LegalPage.tsx +1 -1
  122. package/templates/react-router/src/root.tsx +1 -1
  123. package/templates/react-router/src/vite-env.d.ts +0 -1
  124. package/templates/react-router/vite.config.ts +1 -1
  125. package/templates/sveltekit/AGENTS.md +1 -1
  126. package/templates/sveltekit/package.json +4 -2
  127. package/templates/sveltekit/pnpm-workspace.yaml +6 -2
  128. package/templates/sveltekit/src/routes/+layout.server.ts +1 -1
  129. package/templates/sveltekit/src/routes/+layout.svelte +1 -1
  130. package/templates/sveltekit/svelte.config.js +1 -1
  131. package/templates/sveltekit/vite.config.ts +1 -1
  132. package/assets/sveltekit/components/Boolean.svelte +0 -19
  133. package/assets/sveltekit/components/Date.svelte +0 -33
  134. package/assets/sveltekit/components/DateTime.svelte +0 -35
  135. package/assets/sveltekit/components/FimoProvider.svelte +0 -35
  136. package/assets/sveltekit/components/Image.svelte +0 -80
  137. package/assets/sveltekit/components/Json.svelte +0 -18
  138. package/assets/sveltekit/components/Label.svelte +0 -16
  139. package/assets/sveltekit/components/Number.svelte +0 -21
  140. package/assets/sveltekit/components/RichText.svelte +0 -19
  141. package/assets/sveltekit/components/Text.svelte +0 -30
  142. package/assets/sveltekit/components/Video.svelte +0 -37
  143. package/assets/sveltekit/components/index.d.ts +0 -11
  144. package/assets/sveltekit/components/index.js +0 -11
  145. package/dist/build/next/config.d.ts +0 -17
  146. package/dist/build/next/config.js +0 -66
  147. package/dist/build/sveltekit/data-id.d.ts +0 -3
  148. package/dist/build/sveltekit/data-id.js +0 -171
  149. package/dist/build/sveltekit/files/edge.js +0 -68
  150. package/dist/build/sveltekit/files/serverless.js +0 -42
  151. package/dist/build/sveltekit/vite.d.ts +0 -12
  152. package/dist/build/sveltekit/vite.js +0 -14
  153. package/dist/build/vite/index.d.ts +0 -42
  154. package/dist/build/vite/index.js +0 -160
  155. package/dist/build/vite/plugins/content-sync.d.ts +0 -11
  156. package/dist/build/vite/plugins/content-sync.js +0 -41
  157. package/dist/build/vite/plugins/data-id.d.ts +0 -12
  158. package/dist/build/vite/plugins/data-id.js +0 -109
  159. package/dist/build/vite/plugins/fimo-config.d.ts +0 -12
  160. package/dist/build/vite/plugins/fimo-config.js +0 -68
  161. package/dist/build/vite/plugins/overlay.d.ts +0 -3
  162. package/dist/build/vite/plugins/overlay.js +0 -154
  163. package/dist/build/vite/plugins/robots.d.ts +0 -10
  164. package/dist/build/vite/plugins/robots.js +0 -56
  165. package/dist/build/vite/plugins/seo.d.ts +0 -3
  166. package/dist/build/vite/plugins/seo.js +0 -112
  167. package/dist/build/vite/plugins/server-config.d.ts +0 -3
  168. package/dist/build/vite/plugins/server-config.js +0 -36
  169. package/dist/build/vite/plugins/sitemap.d.ts +0 -3
  170. package/dist/build/vite/plugins/sitemap.js +0 -73
  171. package/dist/build/vite/plugins/translations.d.ts +0 -11
  172. package/dist/build/vite/plugins/translations.js +0 -601
  173. package/dist/runtime/app/FimoProviders.d.ts +0 -30
  174. package/dist/runtime/app/FimoProviders.js +0 -186
  175. package/dist/runtime/app/FimoScripts.d.ts +0 -14
  176. package/dist/runtime/app/FimoScripts.js +0 -48
  177. package/dist/runtime/app/index.d.ts +0 -8
  178. package/dist/runtime/app/index.js +0 -4
  179. package/dist/runtime/app/prefetch.d.ts +0 -9
  180. package/dist/runtime/app/prefetch.js +0 -39
  181. package/dist/runtime/content/DataSourcesProvider.d.ts +0 -4
  182. package/dist/runtime/content/DataSourcesProvider.js +0 -63
  183. package/dist/runtime/content/RefreshContentProvider.d.ts +0 -19
  184. package/dist/runtime/content/RefreshContentProvider.js +0 -71
  185. package/dist/runtime/content/client/createContentClient.d.ts +0 -7
  186. package/dist/runtime/content/client/createContentClient.js +0 -7
  187. package/dist/runtime/content/client/createSingletonClient.d.ts +0 -5
  188. package/dist/runtime/content/client/createSingletonClient.js +0 -6
  189. package/dist/runtime/content/client/react-content-client.d.ts +0 -10
  190. package/dist/runtime/content/client/react-content-client.js +0 -165
  191. package/dist/runtime/content/client/react-singleton-client.d.ts +0 -7
  192. package/dist/runtime/content/client/react-singleton-client.js +0 -38
  193. package/dist/runtime/content/client/types.d.ts +0 -42
  194. package/dist/runtime/content/client/types.js +0 -1
  195. package/dist/runtime/content/client/useQueryLocale.d.ts +0 -2
  196. package/dist/runtime/content/client/useQueryLocale.js +0 -5
  197. package/dist/runtime/content/client/vite-runtime.d.ts +0 -3
  198. package/dist/runtime/content/client/vite-runtime.js +0 -23
  199. package/dist/runtime/content/utils/retrieve-data-sources.d.ts +0 -29
  200. package/dist/runtime/content/utils/retrieve-data-sources.js +0 -107
  201. package/dist/runtime/core/AppErrorBoundary.d.ts +0 -10
  202. package/dist/runtime/core/AppErrorBoundary.js +0 -27
  203. package/dist/runtime/core/ViteLifecycles.d.ts +0 -5
  204. package/dist/runtime/core/ViteLifecycles.js +0 -35
  205. package/dist/runtime/i18n/FimoLocaleContext.d.ts +0 -9
  206. package/dist/runtime/i18n/FimoLocaleContext.js +0 -17
  207. package/dist/runtime/iframe/ConsoleErrorProvider.d.ts +0 -3
  208. package/dist/runtime/iframe/ConsoleErrorProvider.js +0 -103
  209. package/dist/runtime/iframe/ScreenshotProvider.d.ts +0 -3
  210. package/dist/runtime/iframe/ScreenshotProvider.js +0 -60
  211. package/dist/runtime/iframe/runtime/overlay-hmr.d.ts +0 -2
  212. package/dist/runtime/iframe/runtime/overlay-hmr.js +0 -27
  213. package/dist/runtime/iframe/runtime/overlay-runtime.d.ts +0 -2
  214. package/dist/runtime/iframe/runtime/overlay-runtime.js +0 -103
  215. package/dist/runtime/index.d.ts +0 -22
  216. package/dist/runtime/index.js +0 -23
  217. package/dist/runtime/next/client-runtime.d.ts +0 -3
  218. package/dist/runtime/next/client-runtime.js +0 -24
  219. package/dist/runtime/next/client.d.ts +0 -28
  220. package/dist/runtime/next/client.js +0 -25
  221. package/dist/runtime/next/facade.d.ts +0 -8
  222. package/dist/runtime/next/facade.js +0 -34
  223. package/dist/runtime/next/labels.d.ts +0 -7
  224. package/dist/runtime/next/labels.js +0 -9
  225. package/dist/runtime/next/preview.d.ts +0 -13
  226. package/dist/runtime/next/preview.js +0 -34
  227. package/dist/runtime/next/primitives/Text.d.ts +0 -10
  228. package/dist/runtime/next/primitives/Text.js +0 -18
  229. package/dist/runtime/next/primitives/server.d.ts +0 -11
  230. package/dist/runtime/next/primitives/server.js +0 -54
  231. package/dist/runtime/next/provider.d.ts +0 -18
  232. package/dist/runtime/next/provider.js +0 -39
  233. package/dist/runtime/next/server-runtime.d.ts +0 -3
  234. package/dist/runtime/next/server-runtime.js +0 -23
  235. package/dist/runtime/next/server.d.ts +0 -21
  236. package/dist/runtime/next/server.js +0 -16
  237. package/dist/runtime/primitives/index.d.ts +0 -16
  238. package/dist/runtime/primitives/index.js +0 -17
  239. package/dist/runtime/react/primitives/contracts.d.ts +0 -94
  240. package/dist/runtime/react/primitives/contracts.js +0 -1
  241. package/dist/runtime/react/primitives/editable/Boolean.d.ts +0 -5
  242. package/dist/runtime/react/primitives/editable/Boolean.js +0 -11
  243. package/dist/runtime/react/primitives/editable/Date.d.ts +0 -4
  244. package/dist/runtime/react/primitives/editable/Date.js +0 -12
  245. package/dist/runtime/react/primitives/editable/DateTime.d.ts +0 -4
  246. package/dist/runtime/react/primitives/editable/DateTime.js +0 -13
  247. package/dist/runtime/react/primitives/editable/Image.d.ts +0 -4
  248. package/dist/runtime/react/primitives/editable/Image.js +0 -10
  249. package/dist/runtime/react/primitives/editable/Json.d.ts +0 -5
  250. package/dist/runtime/react/primitives/editable/Json.js +0 -11
  251. package/dist/runtime/react/primitives/editable/RichText.d.ts +0 -4
  252. package/dist/runtime/react/primitives/editable/RichText.js +0 -11
  253. package/dist/runtime/react/primitives/editable/Text.d.ts +0 -20
  254. package/dist/runtime/react/primitives/editable/Text.js +0 -36
  255. package/dist/runtime/react/primitives/editable/Video.d.ts +0 -4
  256. package/dist/runtime/react/primitives/editable/Video.js +0 -10
  257. package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +0 -17
  258. package/dist/runtime/react/primitives/renderers/DateRenderer.js +0 -17
  259. package/dist/runtime/react/primitives/renderers/ImageRenderer.d.ts +0 -8
  260. package/dist/runtime/react/primitives/renderers/ImageRenderer.js +0 -31
  261. package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +0 -12
  262. package/dist/runtime/react/primitives/renderers/RichTextRenderer.js +0 -135
  263. package/dist/runtime/react/primitives/renderers/StaticImage.d.ts +0 -35
  264. package/dist/runtime/react/primitives/renderers/StaticImage.js +0 -58
  265. package/dist/runtime/react/primitives/renderers/VideoRenderer.d.ts +0 -8
  266. package/dist/runtime/react/primitives/renderers/VideoRenderer.js +0 -10
  267. package/dist/runtime/react/useFimoLiveValue.d.ts +0 -20
  268. package/dist/runtime/react/useFimoLiveValue.js +0 -43
  269. package/dist/runtime/react-router/active-routes.d.ts +0 -12
  270. package/dist/runtime/react-router/active-routes.js +0 -60
  271. package/dist/runtime/react-router/index.d.ts +0 -16
  272. package/dist/runtime/react-router/index.js +0 -20
  273. package/dist/runtime/react-router/legacy/routes.d.ts +0 -35
  274. package/dist/runtime/react-router/legacy/routes.js +0 -86
  275. package/dist/runtime/react-router/navigation-utils.d.ts +0 -8
  276. package/dist/runtime/react-router/navigation-utils.js +0 -36
  277. package/dist/runtime/react-router/navigation.d.ts +0 -12
  278. package/dist/runtime/react-router/navigation.js +0 -28
  279. package/dist/runtime/react-router/preset.d.ts +0 -30
  280. package/dist/runtime/react-router/preset.js +0 -33
  281. package/dist/runtime/routing/AppResetScrollOnNavigate.d.ts +0 -2
  282. package/dist/runtime/routing/AppResetScrollOnNavigate.js +0 -12
  283. package/dist/runtime/routing/AppRoutesProvider.d.ts +0 -25
  284. package/dist/runtime/routing/AppRoutesProvider.js +0 -112
  285. package/dist/runtime/seo/buildSeoForPath.d.ts +0 -74
  286. package/dist/runtime/seo/buildSeoForPath.js +0 -55
  287. package/dist/runtime/seo/htmlProps.d.ts +0 -13
  288. package/dist/runtime/seo/htmlProps.js +0 -15
  289. package/dist/runtime/sveltekit/content.d.ts +0 -25
  290. package/dist/runtime/sveltekit/content.js +0 -33
  291. package/dist/runtime/sveltekit/context-contract.d.ts +0 -5
  292. package/dist/runtime/sveltekit/context-contract.js +0 -2
  293. package/dist/runtime/sveltekit/context.d.ts +0 -8
  294. package/dist/runtime/sveltekit/context.js +0 -25
  295. package/dist/runtime/sveltekit/forms.d.ts +0 -15
  296. package/dist/runtime/sveltekit/forms.js +0 -15
  297. package/dist/runtime/sveltekit/index.d.ts +0 -9
  298. package/dist/runtime/sveltekit/index.js +0 -5
  299. package/dist/runtime/sveltekit/internal.d.ts +0 -6
  300. package/dist/runtime/sveltekit/internal.js +0 -12
  301. package/dist/runtime/sveltekit/labels.d.ts +0 -20
  302. package/dist/runtime/sveltekit/labels.js +0 -13
  303. package/dist/runtime/sveltekit/preview.d.ts +0 -28
  304. package/dist/runtime/sveltekit/preview.js +0 -82
  305. package/dist/runtime/sveltekit/runtime.d.ts +0 -9
  306. package/dist/runtime/sveltekit/runtime.js +0 -26
  307. package/dist/runtime/t/OptionalTracking.d.ts +0 -13
  308. package/dist/runtime/t/OptionalTracking.js +0 -28
  309. package/dist/runtime/t/Pageview.d.ts +0 -9
  310. package/dist/runtime/t/Pageview.js +0 -118
  311. package/dist/runtime/vite/Label.d.ts +0 -13
  312. package/dist/runtime/vite/Label.js +0 -16
  313. package/dist/runtime/vite/primitives/Images.d.ts +0 -4
  314. package/dist/runtime/vite/primitives/Images.js +0 -12
  315. package/dist/runtime/vite/translations.d.ts +0 -28
  316. package/dist/runtime/vite/translations.js +0 -103
  317. package/templates/nextjs/src/app/(default)/layout.tsx +0 -10
  318. package/templates/nextjs/src/app/[locale]/layout.tsx +0 -22
  319. package/templates/nextjs/src/app/[locale]/page.tsx +0 -1
  320. package/templates/nextjs/src/components/Document.tsx +0 -26
  321. package/templates/nextjs/src/components/FimoPreviewBridge.tsx +0 -13
  322. /package/templates/nextjs/src/app/{(default)/page.tsx → page.tsx} +0 -0
@@ -23,8 +23,28 @@ const SCHEMA_DEFINITION_SCHEMA = z.object({
23
23
  name: z.string().min(1).optional(),
24
24
  isSingleton: z.boolean().optional(),
25
25
  i18n: z.object({ enabled: z.boolean().optional() }).optional(),
26
+ groups: z
27
+ .array(z.object({ id: z.string().min(1), label: z.string().min(1), default: z.boolean().optional() }).strict())
28
+ .optional(),
26
29
  fields: z.record(z.string(), z.unknown()).optional(),
27
30
  });
31
+ const RUNTIME_TYPE_IMPORT_ORDER = [
32
+ 'Fields',
33
+ 'FimoBoolean',
34
+ 'FimoMedia',
35
+ 'FimoPolymorphicReference',
36
+ 'FimoReference',
37
+ 'FimoRichText',
38
+ 'FimoRichTextContent',
39
+ 'FimoString',
40
+ 'Populate',
41
+ 'PopulatedResult',
42
+ 'ProjectedWithPopulate',
43
+ 'Query',
44
+ 'Sort',
45
+ 'Where',
46
+ 'WithReferences',
47
+ ];
28
48
  const CONTENT_TEMPLATE_PATHS = {
29
49
  types: { current: 'shared/types.eta', legacy: 'types-template.eta' },
30
50
  sharedServer: { current: 'shared/server.eta' },
@@ -83,6 +103,18 @@ function packageExportsSubpath(packageJson, subpath) {
83
103
  !Array.isArray(exports) &&
84
104
  Object.prototype.hasOwnProperty.call(exports, subpath));
85
105
  }
106
+ function readProjectPackage(cwd, name) {
107
+ const packagePath = join(cwd, 'node_modules', name, 'package.json');
108
+ if (!existsSync(packagePath)) {
109
+ return null;
110
+ }
111
+ try {
112
+ return JSON.parse(readFileSync(packagePath, 'utf-8'));
113
+ }
114
+ catch {
115
+ return null;
116
+ }
117
+ }
86
118
  function resolveProjectRuntime(cwd) {
87
119
  const packagePath = join(cwd, 'node_modules', 'fimo', 'package.json');
88
120
  if (!existsSync(packagePath)) {
@@ -108,22 +140,29 @@ function resolveProjectRuntime(cwd) {
108
140
  return {
109
141
  packageRoot: dirname(packagePath),
110
142
  version,
111
- providesNextRuntime: packageExportsSubpath(packageJson, './next') && packageExportsSubpath(packageJson, './next/client'),
143
+ providesReactRuntime: packageExportsSubpath(readProjectPackage(cwd, 'fimo-react'), '.'),
144
+ providesNextRuntime: packageExportsSubpath(readProjectPackage(cwd, 'fimo-next'), '.') &&
145
+ packageExportsSubpath(readProjectPackage(cwd, 'fimo-next'), './client'),
112
146
  providesAstroRuntime: packageExportsSubpath(packageJson, './astro'),
113
- providesSvelteKitRuntime: packageExportsSubpath(packageJson, './sveltekit'),
147
+ // The SvelteKit runtime ships as its own package, so this probes the
148
+ // companion rather than a `fimo` subpath (FIMO-1635).
149
+ providesSvelteKitRuntime: packageExportsSubpath(readProjectPackage(cwd, 'fimo-sveltekit'), '.'),
114
150
  };
115
151
  }
116
152
  function contentRuntimeImportFor(framework) {
117
153
  if (framework === 'nextjs') {
118
- return 'fimo/next';
154
+ return 'fimo-next';
119
155
  }
120
156
  if (framework === 'astro') {
121
157
  return 'fimo/astro';
122
158
  }
123
- if (framework === 'sveltekit') {
124
- return 'fimo/sveltekit';
159
+ // @vercel/frameworks reports SvelteKit as `sveltekit-1`, while Fimo's
160
+ // public runtime profile is `sveltekit`. Both describe the same codegen
161
+ // target; callers may supply either the detector evidence or the profile.
162
+ if (framework === 'sveltekit' || framework === 'sveltekit-1') {
163
+ return 'fimo-sveltekit';
125
164
  }
126
- return 'fimo/ui';
165
+ return 'fimo-react';
127
166
  }
128
167
  function templatePath(runtime, templateName) {
129
168
  const template = CONTENT_TEMPLATE_PATHS[templateName];
@@ -134,13 +173,19 @@ function templatePath(runtime, templateName) {
134
173
  return assetPath('content-templates', template.current);
135
174
  }
136
175
  function resolveSchemaGenerationTarget(runtimeImport, runtime) {
137
- if (runtimeImport === 'fimo/ui') {
176
+ if (runtimeImport === 'fimo-react' && !runtime.providesReactRuntime) {
177
+ throw new Error(`Cannot generate schema clients because the project does not provide the ` +
178
+ 'fimo-react package required by this React project. ' +
179
+ `Install fimo-react@${runtime.version} alongside fimo, then run \`npx fimo@latest validate\` again. ` +
180
+ 'No generated files were changed.');
181
+ }
182
+ if (runtimeImport === 'fimo-react') {
138
183
  return 'react';
139
184
  }
140
- if (runtimeImport === 'fimo/next' && !runtime.providesNextRuntime) {
141
- throw new Error(`Cannot generate schema clients because project-local fimo@${runtime.version} does not provide the ` +
142
- 'fimo/next and fimo/next/client exports required by this Next.js project. ' +
143
- `Run \`${CONTENT_CLIENT_RUNTIME_UPGRADE_COMMAND}\` in the project, then run \`npx fimo@latest validate\` again. ` +
185
+ if (runtimeImport === 'fimo-next' && !runtime.providesNextRuntime) {
186
+ throw new Error(`Cannot generate schema clients because the project does not provide the ` +
187
+ 'fimo-next and fimo-next/client exports required by this Next.js project. ' +
188
+ `Install fimo-next@${runtime.version} alongside fimo, then run \`npx fimo@latest validate\` again. ` +
144
189
  'No generated files were changed.');
145
190
  }
146
191
  if (runtimeImport === 'fimo/astro' && !runtime.providesAstroRuntime) {
@@ -149,13 +194,12 @@ function resolveSchemaGenerationTarget(runtimeImport, runtime) {
149
194
  `Run \`${CONTENT_CLIENT_RUNTIME_UPGRADE_COMMAND}\` in the project, then run \`npx fimo@latest validate\` again. ` +
150
195
  'No generated files were changed.');
151
196
  }
152
- if (runtimeImport === 'fimo/sveltekit' && !runtime.providesSvelteKitRuntime) {
153
- throw new Error(`Cannot generate schema clients because project-local fimo@${runtime.version} does not provide the ` +
154
- 'fimo/sveltekit export required by this SvelteKit project. ' +
155
- `Run \`${CONTENT_CLIENT_RUNTIME_UPGRADE_COMMAND}\` in the project, then run \`npx fimo@latest validate\` again. ` +
197
+ if (runtimeImport === 'fimo-sveltekit' && !runtime.providesSvelteKitRuntime) {
198
+ throw new Error('Cannot generate schema clients because this SvelteKit project has no project-local fimo-sveltekit package. ' +
199
+ `Run \`npm install fimo-sveltekit@${runtime.version}\` in the project, then run \`npx fimo@latest validate\` again. ` +
156
200
  'No generated files were changed.');
157
201
  }
158
- if (runtimeImport === 'fimo/next') {
202
+ if (runtimeImport === 'fimo-next') {
159
203
  return 'next';
160
204
  }
161
205
  return runtimeImport === 'fimo/astro' ? 'astro' : 'sveltekit';
@@ -166,17 +210,17 @@ function templatesForTarget(target, runtime, runtimeImport) {
166
210
  {
167
211
  suffix: '.types.ts',
168
212
  path: templatePath(runtime, 'types'),
169
- runtimeImport: 'fimo/next',
213
+ runtimeImport: 'fimo-next',
170
214
  },
171
215
  {
172
216
  suffix: '.ts',
173
217
  path: templatePath(runtime, 'nextServer'),
174
- runtimeImport: 'fimo/next',
218
+ runtimeImport: 'fimo-next',
175
219
  },
176
220
  {
177
221
  suffix: '.client.ts',
178
222
  path: templatePath(runtime, 'nextClient'),
179
- runtimeImport: 'fimo/next/client',
223
+ runtimeImport: 'fimo-next/client',
180
224
  },
181
225
  ];
182
226
  }
@@ -199,12 +243,12 @@ function templatesForTarget(target, runtime, runtimeImport) {
199
243
  {
200
244
  suffix: '.types.ts',
201
245
  path: templatePath(runtime, 'types'),
202
- runtimeImport: 'fimo/sveltekit',
246
+ runtimeImport: 'fimo-sveltekit',
203
247
  },
204
248
  {
205
249
  suffix: '.ts',
206
250
  path: templatePath(runtime, 'svelteKitContent'),
207
- runtimeImport: 'fimo/sveltekit',
251
+ runtimeImport: 'fimo-sveltekit',
208
252
  },
209
253
  ];
210
254
  }
@@ -335,6 +379,69 @@ function referenceImportsFor(schema, fields) {
335
379
  }
336
380
  return [...imports.values()].sort((a, b) => a.pascal.localeCompare(b.pascal));
337
381
  }
382
+ function collectFieldRuntimeTypeImports(field, imports) {
383
+ if (!field || typeof field !== 'object' || Array.isArray(field)) {
384
+ return;
385
+ }
386
+ const definition = field;
387
+ switch (definition.type) {
388
+ case 'boolean':
389
+ imports.add('FimoBoolean');
390
+ return;
391
+ case 'media':
392
+ imports.add('FimoMedia');
393
+ return;
394
+ case 'reference':
395
+ imports.add(Array.isArray(definition.targets) && definition.targets.length > 0
396
+ ? 'FimoPolymorphicReference'
397
+ : 'FimoReference');
398
+ return;
399
+ case 'richtext':
400
+ imports.add('FimoRichText');
401
+ imports.add('FimoRichTextContent');
402
+ return;
403
+ case 'blocks': {
404
+ const schema = definition.schema;
405
+ if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {
406
+ return;
407
+ }
408
+ const blockSchema = schema;
409
+ const fieldGroups = Array.isArray(blockSchema.oneOf)
410
+ ? blockSchema.oneOf.map((variant) => variant && typeof variant === 'object' && !Array.isArray(variant)
411
+ ? variant.fields
412
+ : undefined)
413
+ : [blockSchema.fields];
414
+ for (const fields of fieldGroups) {
415
+ if (!fields || typeof fields !== 'object' || Array.isArray(fields)) {
416
+ continue;
417
+ }
418
+ for (const nestedField of Object.values(fields)) {
419
+ collectFieldRuntimeTypeImports(nestedField, imports);
420
+ }
421
+ }
422
+ return;
423
+ }
424
+ default:
425
+ return;
426
+ }
427
+ }
428
+ function runtimeTypeImportsFor(fields) {
429
+ const imports = new Set([
430
+ 'Fields',
431
+ 'FimoString',
432
+ 'Populate',
433
+ 'PopulatedResult',
434
+ 'ProjectedWithPopulate',
435
+ 'Query',
436
+ 'Sort',
437
+ 'Where',
438
+ 'WithReferences',
439
+ ]);
440
+ for (const field of Object.values(fields)) {
441
+ collectFieldRuntimeTypeImports(field, imports);
442
+ }
443
+ return RUNTIME_TYPE_IMPORT_ORDER.filter((typeImport) => imports.has(typeImport));
444
+ }
338
445
  function schemaToModel(schema, localizedByUid) {
339
446
  const fields = normalizeFields(schema.fields ?? {});
340
447
  return {
@@ -353,6 +460,7 @@ function schemaToModel(schema, localizedByUid) {
353
460
  .map(([fieldName]) => fieldName),
354
461
  fields,
355
462
  referenceImports: referenceImportsFor(schema, fields),
463
+ runtimeTypeImports: runtimeTypeImportsFor(fields),
356
464
  };
357
465
  }
358
466
  export function syncSchemas(options) {
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync, readdirSync } from 'node:fs';
2
2
  import { basename, join, resolve } from 'node:path';
3
- import { CONTENT_FIELD_NAME_PATTERN, CONTENT_FIELD_NAME_PATTERN_DESCRIPTION, CONTENT_TYPE_NAME_PATTERN, CONTENT_TYPE_NAME_PATTERN_DESCRIPTION, ContentFieldDefinitionSchema, FieldTypeSchema, MAX_STRUCTURED_CONTENT_DEPTH, RESERVED_CONTENT_FIELD_NAMES, collectConditionProblems, walkContentFields, } from '@fimo/api-contracts';
3
+ import { CONTENT_FIELD_NAME_PATTERN, CONTENT_FIELD_NAME_PATTERN_DESCRIPTION, CONTENT_TYPE_NAME_PATTERN, CONTENT_TYPE_NAME_PATTERN_DESCRIPTION, ContentFieldDefinitionSchema, ContentFieldGroupSchema, FieldTypeSchema, MAX_STRUCTURED_CONTENT_DEPTH, RESERVED_CONTENT_FIELD_NAMES, collectConditionProblems, walkContentFields, } from '@fimo/api-contracts';
4
4
  /**
5
5
  * Validate `src/schemas/*.json` locally against the same rules the API's
6
6
  * schema validator enforces (field types, reserved field names, required
@@ -63,7 +63,7 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
63
63
  return [{ rule: 'schemas/shape', message: 'Schema must be a JSON object.', file }];
64
64
  }
65
65
  const errors = [];
66
- const { uid, name, fields, i18n, isSingleton } = schema;
66
+ const { uid, name, fields, i18n, isSingleton, groups } = schema;
67
67
  const expectedUid = basename(file, '.json');
68
68
  if (typeof uid !== 'string' || uid.length === 0) {
69
69
  errors.push({
@@ -119,6 +119,39 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
119
119
  }
120
120
  }
121
121
  }
122
+ const groupIds = new Set();
123
+ if (groups !== undefined) {
124
+ if (!Array.isArray(groups)) {
125
+ errors.push({ rule: 'schemas/groups', message: '"groups" must be an array.', file });
126
+ }
127
+ else {
128
+ let defaults = 0;
129
+ for (const [index, group] of groups.entries()) {
130
+ const parsed = ContentFieldGroupSchema.safeParse(group);
131
+ if (!parsed.success) {
132
+ errors.push({
133
+ rule: 'schemas/groups',
134
+ message: `Group at index ${index} is invalid: ${parsed.error.issues[0]?.message ?? 'invalid group'}.`,
135
+ file,
136
+ });
137
+ continue;
138
+ }
139
+ if (groupIds.has(parsed.data.id)) {
140
+ errors.push({
141
+ rule: 'schemas/groups',
142
+ message: `Group ID "${parsed.data.id}" is declared more than once.`,
143
+ file,
144
+ });
145
+ }
146
+ groupIds.add(parsed.data.id);
147
+ if (parsed.data.default)
148
+ defaults += 1;
149
+ }
150
+ if (defaults > 1) {
151
+ errors.push({ rule: 'schemas/groups', message: 'At most one group may be the default.', file });
152
+ }
153
+ }
154
+ }
122
155
  if (typeof fields !== 'object' || fields === null || Array.isArray(fields)) {
123
156
  errors.push({
124
157
  rule: 'schemas/fields',
@@ -155,6 +188,27 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
155
188
  continue;
156
189
  }
157
190
  const { type } = definition;
191
+ const memberships = Array.isArray(definition.group)
192
+ ? definition.group
193
+ : definition.group === undefined
194
+ ? []
195
+ : [definition.group];
196
+ if (new Set(memberships).size !== memberships.length) {
197
+ errors.push({
198
+ rule: 'schemas/field-group',
199
+ message: `Field "${fieldName}" lists the same group more than once.`,
200
+ file,
201
+ });
202
+ }
203
+ for (const membership of memberships) {
204
+ if (typeof membership !== 'string' || !groupIds.has(membership)) {
205
+ errors.push({
206
+ rule: 'schemas/field-group',
207
+ message: `Field "${fieldName}" references unknown group "${String(membership)}".`,
208
+ file,
209
+ });
210
+ }
211
+ }
158
212
  if (typeof type !== 'string' || !FIELD_TYPES.has(type)) {
159
213
  errors.push({
160
214
  rule: 'schemas/field-type',
@@ -203,6 +257,13 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
203
257
  }
204
258
  parsedFields[fieldName] = parsed.data;
205
259
  walkContentFields({ [fieldName]: parsed.data }, ({ field, path, structuredDepth, insideStructuredContent }) => {
260
+ if (insideStructuredContent && field.group !== undefined) {
261
+ errors.push({
262
+ rule: 'schemas/field-group',
263
+ message: `Field "${path.join('.')}" cannot use "group" inside blocks.`,
264
+ file,
265
+ });
266
+ }
206
267
  if (field.type === 'blocks' && structuredDepth >= MAX_STRUCTURED_CONTENT_DEPTH) {
207
268
  errors.push({
208
269
  rule: 'schemas/structured-content-depth',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "0.20.0",
3
+ "version": "0.21.0-experimental.1",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "bin": {
6
6
  "fimo": "dist/cli/index.js"
@@ -19,8 +19,8 @@
19
19
  "exports": {
20
20
  "./package.json": "./package.json",
21
21
  "./ui": {
22
- "types": "./dist/runtime/index.d.ts",
23
- "import": "./dist/runtime/index.js"
22
+ "types": "./dist/build/react/ui-moved.d.ts",
23
+ "import": "./dist/build/react/ui-moved.js"
24
24
  },
25
25
  "./content": {
26
26
  "types": "./dist/runtime/content/index.d.ts",
@@ -30,6 +30,34 @@
30
30
  "types": "./dist/runtime/forms/index.d.ts",
31
31
  "import": "./dist/runtime/forms/index.js"
32
32
  },
33
+ "./labels": {
34
+ "types": "./dist/runtime/labels/index.d.ts",
35
+ "import": "./dist/runtime/labels/index.js"
36
+ },
37
+ "./i18n": {
38
+ "types": "./dist/runtime/i18n/index.d.ts",
39
+ "import": "./dist/runtime/i18n/index.js"
40
+ },
41
+ "./preview": {
42
+ "types": "./dist/runtime/preview/index.d.ts",
43
+ "import": "./dist/runtime/preview/index.js"
44
+ },
45
+ "./primitives": {
46
+ "types": "./dist/runtime/primitives/lib/index.d.ts",
47
+ "import": "./dist/runtime/primitives/lib/index.js"
48
+ },
49
+ "./config": {
50
+ "types": "./dist/runtime/shared/config.d.ts",
51
+ "import": "./dist/runtime/shared/config.js"
52
+ },
53
+ "./seo": {
54
+ "types": "./dist/runtime/seo/index.d.ts",
55
+ "import": "./dist/runtime/seo/index.js"
56
+ },
57
+ "./sync": {
58
+ "types": "./dist/scripts/index.d.ts",
59
+ "import": "./dist/scripts/index.js"
60
+ },
33
61
  "./astro": {
34
62
  "types": "./dist/runtime/astro/server.d.ts",
35
63
  "import": "./dist/runtime/astro/server.js"
@@ -47,50 +75,49 @@
47
75
  "import": "./dist/runtime/astro/internal.js"
48
76
  },
49
77
  "./next": {
50
- "types": "./dist/runtime/next/server.d.ts",
51
- "import": "./dist/runtime/next/server.js"
78
+ "types": "./dist/build/next/moved.d.ts",
79
+ "import": "./dist/build/next/moved.js"
52
80
  },
53
81
  "./next/client": {
54
- "types": "./dist/runtime/next/client.d.ts",
55
- "import": "./dist/runtime/next/client.js"
82
+ "types": "./dist/build/next/moved.d.ts",
83
+ "import": "./dist/build/next/moved.js"
56
84
  },
57
85
  "./next/config": {
58
- "types": "./dist/build/next/config.d.ts",
59
- "import": "./dist/build/next/config.js",
60
- "require": "./dist/build/next/config.js"
86
+ "types": "./dist/build/next/moved.d.ts",
87
+ "import": "./dist/build/next/moved.js",
88
+ "require": "./dist/build/next/moved.js"
61
89
  },
62
90
  "./react-router": {
63
- "types": "./dist/runtime/react-router/index.d.ts",
64
- "import": "./dist/runtime/react-router/index.js"
91
+ "types": "./dist/build/react/router-moved.d.ts",
92
+ "import": "./dist/build/react/router-moved.js"
65
93
  },
66
94
  "./react-router/routes": {
67
- "types": "./dist/runtime/react-router/legacy/routes.d.ts",
68
- "import": "./dist/runtime/react-router/legacy/routes.js"
95
+ "types": "./dist/build/react/router-routes-moved.d.ts",
96
+ "import": "./dist/build/react/router-routes-moved.js"
69
97
  },
70
98
  "./react-router/preset": {
71
- "types": "./dist/runtime/react-router/preset.d.ts",
72
- "import": "./dist/runtime/react-router/preset.js"
99
+ "types": "./dist/build/react/router-preset-moved.d.ts",
100
+ "import": "./dist/build/react/router-preset-moved.js"
73
101
  },
74
102
  "./sveltekit": {
75
- "types": "./dist/runtime/sveltekit/index.d.ts",
76
- "import": "./dist/runtime/sveltekit/index.js"
103
+ "types": "./dist/build/sveltekit/moved.d.ts",
104
+ "import": "./dist/build/sveltekit/moved.js"
77
105
  },
78
106
  "./sveltekit/components": {
79
- "types": "./assets/sveltekit/components/index.d.ts",
80
- "svelte": "./assets/sveltekit/components/index.js",
81
- "import": "./assets/sveltekit/components/index.js"
107
+ "types": "./dist/build/sveltekit/moved.d.ts",
108
+ "import": "./dist/build/sveltekit/moved.js"
82
109
  },
83
110
  "./sveltekit/config": {
84
111
  "types": "./dist/build/sveltekit/config.d.ts",
85
112
  "import": "./dist/build/sveltekit/config.js"
86
113
  },
87
114
  "./sveltekit/internal": {
88
- "types": "./dist/runtime/sveltekit/internal.d.ts",
89
- "import": "./dist/runtime/sveltekit/internal.js"
115
+ "types": "./dist/build/sveltekit/moved.d.ts",
116
+ "import": "./dist/build/sveltekit/moved.js"
90
117
  },
91
118
  "./sveltekit/vite": {
92
- "types": "./dist/build/sveltekit/vite.d.ts",
93
- "import": "./dist/build/sveltekit/vite.js"
119
+ "types": "./dist/build/sveltekit/moved.d.ts",
120
+ "import": "./dist/build/sveltekit/moved.js"
94
121
  },
95
122
  "./paths": {
96
123
  "types": "./dist/runtime/paths/index.d.ts",
@@ -101,8 +128,16 @@
101
128
  "import": "./dist/runtime/routes/index.js"
102
129
  },
103
130
  "./vite": {
104
- "types": "./dist/build/vite/index.d.ts",
105
- "import": "./dist/build/vite/index.js"
131
+ "types": "./dist/build/react/vite-moved.d.ts",
132
+ "import": "./dist/build/react/vite-moved.js"
133
+ },
134
+ "./vite/runtime-env": {
135
+ "types": "./dist/build/vite/runtime-env.d.ts",
136
+ "import": "./dist/build/vite/runtime-env.js"
137
+ },
138
+ "./vite/data-id": {
139
+ "types": "./dist/build/vite/data-id.d.ts",
140
+ "import": "./dist/build/vite/data-id.js"
106
141
  },
107
142
  "./templates": {
108
143
  "types": "./dist/runtime/templates.d.ts",
@@ -118,7 +153,7 @@
118
153
  },
119
154
  "scripts": {
120
155
  "build": "pnpm run clean && tsc -b tsconfig.json && chmod +x dist/cli/index.js",
121
- "build:bundle": "node scripts/bundle-cli.mjs && node scripts/bundle-routes.mjs && node scripts/bundle-sveltekit.mjs",
156
+ "build:bundle": "node scripts/bundle-cli.mjs && node scripts/bundle-routes.mjs",
122
157
  "check:types": "tsc -b tsconfig.json && tsc -p tsconfig.test.json",
123
158
  "start": "tsx src/cli/index.ts",
124
159
  "install-cli": "pnpm build && node scripts/install-cli.mjs",
@@ -138,40 +173,30 @@
138
173
  "clean": "rm -rf dist *.tsbuildinfo"
139
174
  },
140
175
  "dependencies": {
141
- "@astrojs/vercel": "11.0.4",
142
- "@rollup/pluginutils": "^5.1.0",
143
- "@vercel/nft": "^1.10.2",
144
176
  "change-case": "^5.4.4",
145
- "esbuild": "^0.28.1",
146
177
  "eta": "^3.5.0",
147
178
  "oxc-parser": "^0.118.0",
148
- "react-error-boundary": "^6.0.0",
149
179
  "zod": "4.4.3"
150
180
  },
151
181
  "devDependencies": {
152
182
  "@clack/core": "^1.2.0",
153
183
  "@clack/prompts": "^1.2.0",
154
- "@fimo/agents-bundle": "workspace:*",
155
- "@fimo/api-contracts": "workspace:*",
156
- "@fimo/cli-kit": "workspace:*",
157
- "@fimo/framework-detect": "workspace:*",
158
- "@fimo/mcp": "workspace:*",
159
- "@fimo/routes": "workspace:*",
160
- "@fimo/tsconfig": "workspace:*",
184
+ "@fimo/agents-bundle": "0.21.0-experimental.1",
185
+ "@fimo/api-contracts": "0.21.0-experimental.1",
186
+ "@fimo/cli-kit": "0.21.0-experimental.1",
187
+ "@fimo/framework-detect": "0.21.0-experimental.1",
188
+ "@fimo/mcp": "0.21.0-experimental.1",
189
+ "@fimo/routes": "0.21.0-experimental.1",
190
+ "@fimo/tsconfig": "0.21.0-experimental.1",
161
191
  "@modelcontextprotocol/sdk": "1.27.1",
162
- "@sveltejs/adapter-vercel": "6.3.4",
163
- "@tanstack/react-query": "^5.80.6",
164
192
  "@types/node": "^22.15.29",
165
- "@types/react": "^19.2.14",
166
- "@types/react-dom": "^19.2.3",
167
193
  "agent-install": "^0.0.5",
194
+ "astro": "^7.1.6",
168
195
  "better-auth": "1.6.25",
169
196
  "cheerio": "^1.0.0",
170
197
  "commander": "^13.1.0",
198
+ "esbuild": "^0.25.10",
171
199
  "open": "^10.1.2",
172
- "react": "^19.2.4",
173
- "react-dom": "^19.2.4",
174
- "react-router": "^7.15.1",
175
200
  "tsx": "^4.19.4",
176
201
  "typescript": "7.0.2",
177
202
  "vite": "^8.0.13",
@@ -180,37 +205,13 @@
180
205
  "yaml": "2.8.2"
181
206
  },
182
207
  "peerDependencies": {
183
- "@sveltejs/kit": "^2.0.0",
184
- "@tanstack/react-query": "^5.80.6",
185
208
  "astro": "^5.0.0 || ^6.0.0 || ^7.0.0",
186
- "react": "^18.2.0 || ^19.0.0",
187
- "react-dom": "^18.2.0 || ^19.0.0",
188
- "react-router": "^7.0.0 || ^8.0.0",
189
- "svelte": "^5.0.0",
190
209
  "vite": "^7.0.0 || ^8.0.0"
191
210
  },
192
211
  "peerDependenciesMeta": {
193
- "@tanstack/react-query": {
194
- "optional": true
195
- },
196
- "@sveltejs/kit": {
197
- "optional": true
198
- },
199
212
  "astro": {
200
213
  "optional": true
201
214
  },
202
- "react": {
203
- "optional": true
204
- },
205
- "react-dom": {
206
- "optional": true
207
- },
208
- "react-router": {
209
- "optional": true
210
- },
211
- "svelte": {
212
- "optional": true
213
- },
214
215
  "vite": {
215
216
  "optional": true
216
217
  }
package/release.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "source": "npm",
3
- "apiUrl": "https://api.fimo.ai",
4
- "webUrl": "https://fimo.ai"
3
+ "apiUrl": "https://api.staging.fimo.team",
4
+ "webUrl": "https://staging.fimo.team"
5
5
  }
@@ -27,7 +27,7 @@ a code-only task, or use `npx fimo@latest` for project-local code generation and
27
27
  ## Project rules
28
28
 
29
29
  - **Deploy is on-demand**, not a save step. Batch related edits into one deploy.
30
- - With pnpm, run `pnpm install --config.dangerouslyAllowAllBuilds=true`; a bare install can skip the build scripts required by Fimo and the framework toolchain.
30
+ - Use the selected package manager's committed build-script policy. pnpm projects pin `pnpm@10.26.0` and approve `esbuild` and `fimo` through `pnpm-workspace.yaml#allowBuilds`; Bun projects trust the same packages through `package.json#trustedDependencies`. Run a plain install with the selected manager so local installation matches Preview and production publishing. Review new dependencies before extending the policy; all three paths stop on unreviewed scripts.
31
31
  - Treat the user's language request as part of setup. The first explicitly requested locale is the primary locale; put it first and set it as `i18n.defaultLocale` in `.fimo/config.json`. If no language is requested, keep `en` and state that choice. Astro reads this configuration directly, keeps the default locale unprefixed, and prefixes the others.
32
32
  - Preserve both the unprefixed default pages and the `[locale]` page tree. Astro has no optional single-segment file route, so the paired native pages keep one-locale URLs clean and allow another locale without changing the route shape. Use `Astro.currentLocale` for Fimo content reads, `getLabels`, and document language.
33
33
  - Keep `.fimo/config.json#routes` as Studio metadata aligned with Astro's page files. It does not configure Astro routing.
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from 'astro/config';
2
- import { fimo } from 'fimo/astro/config';
2
+ import { fimo } from 'fimo-astro/config';
3
3
 
4
4
  import fimoConfig from './.fimo/config.json' with { type: 'json' };
5
5
 
@@ -9,7 +9,8 @@
9
9
  "check": "astro sync && astro check"
10
10
  },
11
11
  "dependencies": {
12
- "fimo": "latest"
12
+ "fimo": "0.21.0-experimental.1",
13
+ "fimo-astro": "0.21.0-experimental.1"
13
14
  },
14
15
  "devDependencies": {
15
16
  "@astrojs/check": "^0.9.10",
@@ -18,5 +19,6 @@
18
19
  },
19
20
  "engines": {
20
21
  "node": ">=22.22.0"
21
- }
22
+ },
23
+ "packageManager": "pnpm@10.26.0"
22
24
  }
@@ -1,4 +1,8 @@
1
- # Build approval is handled by Fimo-controlled install commands. Do not add a
2
- # package-level allowlist because Fimo installs with dangerouslyAllowAllBuilds.
1
+ # Keep dependency-script decisions explicit across local, Preview, and production installs.
2
+
3
+ strictDepBuilds: true
4
+ allowBuilds:
5
+ esbuild: true
6
+ fimo: true
3
7
 
4
8
  packages: []
@@ -7,8 +7,7 @@
7
7
  "routes": {
8
8
  "home": {
9
9
  "label": "Home",
10
- "path": "/:locale",
11
- "params": { "locale": { "type": "locale", "optional": true } }
10
+ "path": "/"
12
11
  }
13
12
  },
14
13
  "version": "4",