fimo 0.8.0 → 0.9.0-experimental.2

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 (190) hide show
  1. package/assets/content-templates/hooks-template.eta +4 -2
  2. package/assets/content-templates/types-template.eta +66 -1
  3. package/assets/skills/fimo/SKILL.md +1 -1
  4. package/assets/skills/fimo/references/content.md +86 -15
  5. package/assets/skills/fimo-cli/SKILL.md +6 -2
  6. package/assets/skills/fimo-cli/references/content.md +61 -2
  7. package/assets/skills/fimo-cli/references/integrations/firecrawl.md +20 -4
  8. package/assets/skills/fimo-cli/references/integrations.md +5 -1
  9. package/assets/skills/fimo-cli/references/webhooks.md +162 -0
  10. package/assets/skills/fimo-migration/SKILL.md +22 -2
  11. package/assets/skills/fimo-migration/references/content.md +24 -0
  12. package/assets/skills/fimo-migration/references/manifest.md +35 -0
  13. package/assets/skills/fimo-migration/references/qa.md +24 -2
  14. package/assets/skills/fimo-migration/references/workflow.md +12 -1
  15. package/assets/skills/fimo-migration/references/wrap.md +617 -0
  16. package/assets/skills/fimo-studio/SKILL.md +5 -3
  17. package/assets/skills/fimo-studio/references/cms.md +9 -1
  18. package/assets/skills/fimo-studio/references/visual-editing.md +5 -3
  19. package/assets/skills/fimo-studio/references/webhooks.md +42 -0
  20. package/dist/build/vite/plugins/translations.d.ts +2 -8
  21. package/dist/build/vite/plugins/translations.js +3 -121
  22. package/dist/cli/bundle.json +1 -1
  23. package/dist/cli/index.js +1051 -144
  24. package/dist/runtime/app/FimoProviders.d.ts +1 -11
  25. package/dist/runtime/app/FimoProviders.js +2 -23
  26. package/dist/runtime/astro/index.d.ts +2 -0
  27. package/dist/runtime/astro/index.js +3 -0
  28. package/dist/runtime/astro/server.d.ts +3 -0
  29. package/dist/runtime/astro/server.js +6 -0
  30. package/dist/runtime/content/client/internal.js +1 -0
  31. package/dist/runtime/content/client/types.d.ts +16 -0
  32. package/dist/runtime/i18n/FimoLocaleContext.js +1 -0
  33. package/dist/runtime/next/FimoNextProviders.d.ts +24 -0
  34. package/dist/runtime/next/FimoNextProviders.js +20 -0
  35. package/dist/runtime/next/FimoNextScripts.d.ts +10 -0
  36. package/dist/runtime/next/FimoNextScripts.js +19 -0
  37. package/dist/runtime/next/index.d.ts +14 -0
  38. package/dist/runtime/next/index.js +14 -0
  39. package/dist/runtime/next/server.d.ts +2 -0
  40. package/dist/runtime/next/server.js +4 -0
  41. package/dist/runtime/nuxt/composables.d.ts +9 -0
  42. package/dist/runtime/nuxt/composables.js +57 -0
  43. package/dist/runtime/nuxt/index.d.ts +3 -0
  44. package/dist/runtime/nuxt/index.js +6 -0
  45. package/dist/runtime/nuxt/server.d.ts +3 -0
  46. package/dist/runtime/nuxt/server.js +6 -0
  47. package/dist/runtime/primitives/labels-hook.d.ts +33 -0
  48. package/dist/runtime/primitives/labels-hook.js +41 -0
  49. package/dist/runtime/primitives/labels-store.d.ts +12 -0
  50. package/dist/runtime/primitives/labels-store.js +60 -0
  51. package/dist/runtime/primitives/lib/useFimoLiveValue.d.ts +5 -3
  52. package/dist/runtime/primitives/lib/useFimoLiveValue.js +11 -4
  53. package/dist/runtime/primitives/translations.d.ts +1 -27
  54. package/dist/runtime/primitives/translations.js +7 -85
  55. package/dist/runtime/react/FimoSpaProviders.d.ts +36 -0
  56. package/dist/runtime/react/FimoSpaProviders.js +63 -0
  57. package/dist/runtime/react/index.d.ts +33 -0
  58. package/dist/runtime/react/index.js +39 -0
  59. package/dist/runtime/remix/FimoRemixProviders.d.ts +16 -0
  60. package/dist/runtime/remix/FimoRemixProviders.js +12 -0
  61. package/dist/runtime/remix/FimoRemixScripts.d.ts +10 -0
  62. package/dist/runtime/remix/FimoRemixScripts.js +19 -0
  63. package/dist/runtime/remix/index.d.ts +12 -0
  64. package/dist/runtime/remix/index.js +11 -0
  65. package/dist/runtime/remix/server.d.ts +2 -0
  66. package/dist/runtime/remix/server.js +2 -0
  67. package/dist/runtime/shared/display-routes.d.ts +14 -0
  68. package/dist/runtime/shared/display-routes.js +25 -0
  69. package/dist/runtime/shared/fimo-config.server.js +1 -0
  70. package/dist/runtime/shared/fimo-config.types.d.ts +2 -0
  71. package/dist/runtime/shared/i18n-messages.d.ts +29 -0
  72. package/dist/runtime/shared/i18n-messages.js +79 -0
  73. package/dist/runtime/shared/labels-fetch.pure.d.ts +17 -0
  74. package/dist/runtime/shared/labels-fetch.pure.js +71 -0
  75. package/dist/runtime/shared/labels-fetch.server.d.ts +7 -0
  76. package/dist/runtime/shared/labels-fetch.server.js +97 -0
  77. package/dist/runtime/shared/labels-t.pure.d.ts +2 -0
  78. package/dist/runtime/shared/labels-t.pure.js +10 -0
  79. package/dist/runtime/strapi/client.d.ts +30 -0
  80. package/dist/runtime/strapi/client.js +89 -0
  81. package/dist/runtime/strapi/index.d.ts +5 -0
  82. package/dist/runtime/strapi/index.js +6 -0
  83. package/dist/runtime/strapi/reshape.d.ts +46 -0
  84. package/dist/runtime/strapi/reshape.js +114 -0
  85. package/dist/runtime/svelte/index.d.ts +3 -0
  86. package/dist/runtime/svelte/index.js +7 -0
  87. package/dist/runtime/svelte/server.d.ts +3 -0
  88. package/dist/runtime/svelte/server.js +6 -0
  89. package/dist/runtime/vue/index.d.ts +3 -0
  90. package/dist/runtime/vue/index.js +5 -0
  91. package/dist/runtime/vue/server.d.ts +3 -0
  92. package/dist/runtime/vue/server.js +6 -0
  93. package/dist/runtime/wrapped/FimoFileLink.d.ts +17 -0
  94. package/dist/runtime/wrapped/FimoFileLink.js +19 -0
  95. package/dist/runtime/wrapped/FimoMediaImage.d.ts +14 -0
  96. package/dist/runtime/wrapped/FimoMediaImage.js +20 -0
  97. package/dist/runtime/wrapped/FimoMediaVideo.d.ts +14 -0
  98. package/dist/runtime/wrapped/FimoMediaVideo.js +20 -0
  99. package/dist/runtime/wrapped/FimoRichTextBlock.d.ts +23 -0
  100. package/dist/runtime/wrapped/FimoRichTextBlock.js +22 -0
  101. package/dist/runtime/wrapped/FimoText.d.ts +22 -0
  102. package/dist/runtime/wrapped/FimoText.js +20 -0
  103. package/dist/runtime/wrapped/WrappedContentContext.d.ts +28 -0
  104. package/dist/runtime/wrapped/WrappedContentContext.js +30 -0
  105. package/dist/runtime/wrapped/WrappedProviders.d.ts +33 -0
  106. package/dist/runtime/wrapped/WrappedProviders.js +101 -0
  107. package/dist/runtime/wrapped/dom.d.ts +4 -0
  108. package/dist/runtime/wrapped/dom.js +23 -0
  109. package/dist/runtime/wrapped/server.d.ts +77 -0
  110. package/dist/runtime/wrapped/server.js +237 -0
  111. package/dist/scripts/apply-wrap-templates.d.ts +61 -0
  112. package/dist/scripts/apply-wrap-templates.js +132 -0
  113. package/dist/scripts/apply-wrap.d.ts +46 -0
  114. package/dist/scripts/apply-wrap.js +278 -0
  115. package/dist/scripts/cms/discover.d.ts +2 -0
  116. package/dist/scripts/cms/discover.js +17 -0
  117. package/dist/scripts/cms/example-content.d.ts +33 -0
  118. package/dist/scripts/cms/example-content.js +163 -0
  119. package/dist/scripts/cms/strapi/detect.d.ts +2 -0
  120. package/dist/scripts/cms/strapi/detect.js +186 -0
  121. package/dist/scripts/cms/strapi/index.d.ts +3 -0
  122. package/dist/scripts/cms/strapi/index.js +25 -0
  123. package/dist/scripts/cms/strapi/list-source.d.ts +17 -0
  124. package/dist/scripts/cms/strapi/list-source.js +90 -0
  125. package/dist/scripts/cms/strapi/schema-map.d.ts +9 -0
  126. package/dist/scripts/cms/strapi/schema-map.js +279 -0
  127. package/dist/scripts/cms/strapi/shapes.d.ts +23 -0
  128. package/dist/scripts/cms/strapi/shapes.js +38 -0
  129. package/dist/scripts/cms/strapi/touchpoints.d.ts +31 -0
  130. package/dist/scripts/cms/strapi/touchpoints.js +145 -0
  131. package/dist/scripts/cms/strapi/wire-client.d.ts +15 -0
  132. package/dist/scripts/cms/strapi/wire-client.js +107 -0
  133. package/dist/scripts/cms/strapi/wiring.d.ts +17 -0
  134. package/dist/scripts/cms/strapi/wiring.js +46 -0
  135. package/dist/scripts/cms/types.d.ts +145 -0
  136. package/dist/scripts/cms/types.js +11 -0
  137. package/dist/scripts/detect-framework.d.ts +39 -0
  138. package/dist/scripts/detect-framework.js +133 -0
  139. package/dist/scripts/draft-rows.d.ts +19 -0
  140. package/dist/scripts/draft-rows.js +135 -0
  141. package/dist/scripts/draft-schemas.d.ts +27 -0
  142. package/dist/scripts/draft-schemas.js +188 -0
  143. package/dist/scripts/extract-translations.js +16 -11
  144. package/dist/scripts/frameworks/astro/routes.d.ts +3 -0
  145. package/dist/scripts/frameworks/astro/routes.js +55 -0
  146. package/dist/scripts/frameworks/astro/template-style.d.ts +7 -0
  147. package/dist/scripts/frameworks/astro/template-style.js +19 -0
  148. package/dist/scripts/frameworks/discover.d.ts +70 -0
  149. package/dist/scripts/frameworks/discover.js +178 -0
  150. package/dist/scripts/frameworks/next/rewire.d.ts +30 -0
  151. package/dist/scripts/frameworks/next/rewire.js +258 -0
  152. package/dist/scripts/frameworks/next/routes.d.ts +17 -0
  153. package/dist/scripts/frameworks/next/routes.js +134 -0
  154. package/dist/scripts/frameworks/next/wiring.d.ts +33 -0
  155. package/dist/scripts/frameworks/next/wiring.js +186 -0
  156. package/dist/scripts/frameworks/nuxt/routes.d.ts +3 -0
  157. package/dist/scripts/frameworks/nuxt/routes.js +54 -0
  158. package/dist/scripts/frameworks/nuxt/template-style.d.ts +9 -0
  159. package/dist/scripts/frameworks/nuxt/template-style.js +27 -0
  160. package/dist/scripts/frameworks/remix/routes.d.ts +3 -0
  161. package/dist/scripts/frameworks/remix/routes.js +50 -0
  162. package/dist/scripts/frameworks/support.d.ts +75 -0
  163. package/dist/scripts/frameworks/support.js +165 -0
  164. package/dist/scripts/frameworks/sveltekit/routes.d.ts +3 -0
  165. package/dist/scripts/frameworks/sveltekit/routes.js +50 -0
  166. package/dist/scripts/frameworks/sveltekit/template-style.d.ts +9 -0
  167. package/dist/scripts/frameworks/sveltekit/template-style.js +54 -0
  168. package/dist/scripts/frameworks/vite/routes.d.ts +15 -0
  169. package/dist/scripts/frameworks/vite/routes.js +93 -0
  170. package/dist/scripts/frameworks/vite/wiring.d.ts +10 -0
  171. package/dist/scripts/frameworks/vite/wiring.js +99 -0
  172. package/dist/scripts/i18n-namespace.d.ts +27 -0
  173. package/dist/scripts/i18n-namespace.js +155 -0
  174. package/dist/scripts/lib/validation-report.d.ts +1 -0
  175. package/dist/scripts/lib/validation-report.js +3 -0
  176. package/dist/scripts/render-parity/capture.d.ts +56 -0
  177. package/dist/scripts/render-parity/capture.js +366 -0
  178. package/dist/scripts/render-parity/compare.d.ts +59 -0
  179. package/dist/scripts/render-parity/compare.js +0 -0
  180. package/dist/scripts/render-parity/normalize-html.d.ts +13 -0
  181. package/dist/scripts/render-parity/normalize-html.js +223 -0
  182. package/dist/scripts/render-parity/types.d.ts +41 -0
  183. package/dist/scripts/render-parity/types.js +1 -0
  184. package/dist/scripts/scan-wrappable.d.ts +196 -0
  185. package/dist/scripts/scan-wrappable.js +1232 -0
  186. package/dist/scripts/validate-route-metadata.js +11 -0
  187. package/dist/scripts/validate-schemas.js +42 -1
  188. package/package.json +84 -4
  189. package/release.json +2 -2
  190. package/templates/react-router/package.json +1 -1
@@ -31,6 +31,17 @@ export function validateRouteMetadata(options = {}) {
31
31
  const srcDir = path.resolve(cwd, 'src');
32
32
  const routesFilePath = path.resolve(srcDir, 'routes.ts');
33
33
  const errors = [];
34
+ // Everything below the i18n checks cross-validates React Router's
35
+ // src/routes.ts. Adopted (wrapped) projects on another framework declare it
36
+ // in fimo-config.json — their routes come from framework scans, so only the
37
+ // framework-neutral config checks apply.
38
+ const earlyConfig = readJson(configFilePath);
39
+ const framework = typeof earlyConfig.framework === 'string' ? earlyConfig.framework : 'react-router';
40
+ if (framework !== 'react-router') {
41
+ const i18n = validateI18nConfig(earlyConfig);
42
+ const configRoutes = loadConfigRoutes(earlyConfig);
43
+ return { errors: i18n.errors, routesChecked: configRoutes.length };
44
+ }
34
45
  // Parse routes from src/routes.ts (file → path mapping)
35
46
  let fileRoutes = [];
36
47
  if (!fs.existsSync(routesFilePath)) {
@@ -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, FieldTypeSchema, RESERVED_CONTENT_FIELD_NAMES, } 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, FieldTypeSchema, MAX_STRUCTURED_CONTENT_DEPTH, RESERVED_CONTENT_FIELD_NAMES, 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
@@ -169,6 +169,47 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
169
169
  file,
170
170
  });
171
171
  }
172
+ if (type === 'blocks') {
173
+ const parsed = ContentFieldDefinitionSchema.safeParse(definition);
174
+ if (!parsed.success) {
175
+ for (const issue of parsed.error.issues) {
176
+ errors.push({
177
+ rule: 'schemas/structured-content-shape',
178
+ message: `Field "${fieldName}"${issue.path.length > 0 ? ` at ${issue.path.join('.')}` : ''}: ${issue.message}`,
179
+ file,
180
+ });
181
+ }
182
+ continue;
183
+ }
184
+ walkContentFields({ [fieldName]: parsed.data }, ({ field, path, structuredDepth, insideStructuredContent }) => {
185
+ if (field.type === 'blocks' && structuredDepth >= MAX_STRUCTURED_CONTENT_DEPTH) {
186
+ errors.push({
187
+ rule: 'schemas/structured-content-depth',
188
+ message: `Field "${path.join('.')}" exceeds the ${MAX_STRUCTURED_CONTENT_DEPTH}-level blocks limit.`,
189
+ file,
190
+ });
191
+ }
192
+ if (!insideStructuredContent || field.type !== 'reference') {
193
+ return;
194
+ }
195
+ if (field.targets) {
196
+ errors.push({
197
+ rule: 'schemas/structured-content-reference',
198
+ message: `Reference field "${path.join('.')}" must use one fixed "target" inside blocks.`,
199
+ file,
200
+ });
201
+ return;
202
+ }
203
+ if (field.target && schemaUids.size > 0 && !schemaUids.has(field.target)) {
204
+ errors.push({
205
+ rule: 'schemas/reference-target',
206
+ message: `Reference field "${path.join('.')}" targets unknown schema "${field.target}".`,
207
+ file,
208
+ });
209
+ }
210
+ });
211
+ continue;
212
+ }
172
213
  if (type === 'reference') {
173
214
  const { target, targets, many } = definition;
174
215
  if (targets !== undefined && target !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "0.8.0",
3
+ "version": "0.9.0-experimental.2",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "bin": {
6
6
  "fimo": "dist/cli/index.js"
@@ -22,6 +22,18 @@
22
22
  "types": "./dist/runtime/index.d.ts",
23
23
  "import": "./dist/runtime/index.js"
24
24
  },
25
+ "./react": {
26
+ "types": "./dist/runtime/react/index.d.ts",
27
+ "import": "./dist/runtime/react/index.js"
28
+ },
29
+ "./next": {
30
+ "types": "./dist/runtime/next/index.d.ts",
31
+ "import": "./dist/runtime/next/index.js"
32
+ },
33
+ "./next/server": {
34
+ "types": "./dist/runtime/next/server.d.ts",
35
+ "import": "./dist/runtime/next/server.js"
36
+ },
25
37
  "./react-router": {
26
38
  "types": "./dist/runtime/react-router/index.d.ts",
27
39
  "import": "./dist/runtime/react-router/index.js"
@@ -41,6 +53,50 @@
41
53
  "./templates": {
42
54
  "types": "./dist/runtime/templates.d.ts",
43
55
  "import": "./dist/runtime/templates.js"
56
+ },
57
+ "./strapi": {
58
+ "types": "./dist/runtime/strapi/index.d.ts",
59
+ "import": "./dist/runtime/strapi/index.js"
60
+ },
61
+ "./remix": {
62
+ "types": "./dist/runtime/remix/index.d.ts",
63
+ "import": "./dist/runtime/remix/index.js"
64
+ },
65
+ "./remix/server": {
66
+ "types": "./dist/runtime/remix/server.d.ts",
67
+ "import": "./dist/runtime/remix/server.js"
68
+ },
69
+ "./astro": {
70
+ "types": "./dist/runtime/astro/index.d.ts",
71
+ "import": "./dist/runtime/astro/index.js"
72
+ },
73
+ "./astro/server": {
74
+ "types": "./dist/runtime/astro/server.d.ts",
75
+ "import": "./dist/runtime/astro/server.js"
76
+ },
77
+ "./nuxt": {
78
+ "types": "./dist/runtime/nuxt/index.d.ts",
79
+ "import": "./dist/runtime/nuxt/index.js"
80
+ },
81
+ "./nuxt/server": {
82
+ "types": "./dist/runtime/nuxt/server.d.ts",
83
+ "import": "./dist/runtime/nuxt/server.js"
84
+ },
85
+ "./svelte": {
86
+ "types": "./dist/runtime/svelte/index.d.ts",
87
+ "import": "./dist/runtime/svelte/index.js"
88
+ },
89
+ "./svelte/server": {
90
+ "types": "./dist/runtime/svelte/server.d.ts",
91
+ "import": "./dist/runtime/svelte/server.js"
92
+ },
93
+ "./vue": {
94
+ "types": "./dist/runtime/vue/index.d.ts",
95
+ "import": "./dist/runtime/vue/index.js"
96
+ },
97
+ "./vue/server": {
98
+ "types": "./dist/runtime/vue/server.d.ts",
99
+ "import": "./dist/runtime/vue/server.js"
44
100
  }
45
101
  },
46
102
  "publishConfig": {
@@ -97,16 +153,37 @@
97
153
  "yaml": "2.8.2"
98
154
  },
99
155
  "peerDependencies": {
156
+ "@remix-run/react": ">=2.0.0",
157
+ "@sveltejs/kit": ">=2.0.0",
100
158
  "@tanstack/react-query": "^5.80.6",
101
- "react": "^19.0.0",
102
- "react-dom": "^19.0.0",
159
+ "astro": ">=4.0.0",
160
+ "next": ">=14.0.0",
161
+ "nuxt": ">=3.0.0",
162
+ "react": "^18.2.0 || ^19.0.0",
163
+ "react-dom": "^18.2.0 || ^19.0.0",
103
164
  "react-router": "^7.0.0 || ^8.0.0",
104
- "vite": "^7.0.0 || ^8.0.0"
165
+ "vite": "^7.0.0 || ^8.0.0",
166
+ "vue": ">=3.0.0"
105
167
  },
106
168
  "peerDependenciesMeta": {
169
+ "@remix-run/react": {
170
+ "optional": true
171
+ },
172
+ "@sveltejs/kit": {
173
+ "optional": true
174
+ },
107
175
  "@tanstack/react-query": {
108
176
  "optional": true
109
177
  },
178
+ "astro": {
179
+ "optional": true
180
+ },
181
+ "next": {
182
+ "optional": true
183
+ },
184
+ "nuxt": {
185
+ "optional": true
186
+ },
110
187
  "react": {
111
188
  "optional": true
112
189
  },
@@ -118,6 +195,9 @@
118
195
  },
119
196
  "vite": {
120
197
  "optional": true
198
+ },
199
+ "vue": {
200
+ "optional": true
121
201
  }
122
202
  },
123
203
  "engines": {
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
  }
@@ -21,7 +21,7 @@
21
21
  "cmdk": "^1.1.1",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "0.8.0",
24
+ "fimo": "0.9.0-experimental.2",
25
25
  "input-otp": "^1.4.2",
26
26
  "isbot": "^5",
27
27
  "lucide-react": "^0.577.0",