fimo 0.12.0 → 0.12.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 (42) hide show
  1. package/assets/agent-templates/broken-link-sweeper/capabilities.yaml +0 -4
  2. package/assets/agent-templates/content-translator/capabilities.yaml +0 -2
  3. package/assets/agent-templates/seo-audit/capabilities.yaml +0 -1
  4. package/assets/content-templates/types-template.eta +13 -7
  5. package/assets/skills/fimo/SKILL.md +2 -2
  6. package/assets/skills/fimo-cli/SKILL.md +8 -8
  7. package/assets/skills/fimo-cli/references/agent-setup.md +1 -1
  8. package/assets/skills/fimo-cli/references/agents.md +5 -12
  9. package/assets/skills/fimo-cli/references/assets.md +2 -2
  10. package/assets/skills/fimo-cli/references/content.md +16 -30
  11. package/assets/skills/fimo-cli/references/describe.md +1 -1
  12. package/assets/skills/fimo-cli/references/forms.md +8 -8
  13. package/assets/skills/fimo-cli/references/init.md +5 -4
  14. package/assets/skills/fimo-cli/references/labels.md +4 -4
  15. package/assets/skills/fimo-cli/references/locales.md +3 -3
  16. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +1 -1
  17. package/assets/skills/fimo-code/SKILL.md +40 -50
  18. package/assets/skills/fimo-code/references/assets.md +6 -4
  19. package/assets/skills/fimo-code/references/content/clients.md +130 -0
  20. package/assets/skills/fimo-code/references/content/primitives.md +5 -0
  21. package/assets/skills/fimo-code/references/content/richtext.md +48 -0
  22. package/assets/skills/fimo-code/references/content/schema.md +122 -0
  23. package/assets/skills/fimo-code/references/content.md +12 -597
  24. package/assets/skills/fimo-code/references/design.md +1 -1
  25. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +116 -0
  26. package/assets/skills/fimo-code/references/frameworks/next/locales.md +59 -0
  27. package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +99 -0
  28. package/assets/skills/fimo-code/references/frameworks/next.md +116 -0
  29. package/assets/skills/fimo-code/references/frameworks/react-router.md +295 -0
  30. package/assets/skills/fimo-code/references/frameworks/vite-react.md +225 -0
  31. package/assets/skills/fimo-code/references/labels.md +24 -83
  32. package/assets/skills/fimo-code/references/locales.md +22 -111
  33. package/assets/skills/fimo-code/references/setup-plain-vite.md +3 -227
  34. package/assets/skills/fimo-code/references/setup-react-router.md +3 -276
  35. package/assets/skills/fimo-code/references/ui.md +32 -78
  36. package/dist/cli/bundle.json +2 -2
  37. package/dist/cli/index.js +16 -16
  38. package/dist/scripts/extract-translations.js +8 -1
  39. package/package.json +1 -1
  40. package/templates/react-router/AGENTS.md +10 -10
  41. package/templates/react-router/package.json +1 -1
  42. package/templates/react-router/react-router.config.ts +1 -1
@@ -40,7 +40,14 @@ function extractFromFile(filePath) {
40
40
  }
41
41
  if (node.type === 'CallExpression') {
42
42
  const callee = node.callee;
43
- if (callee?.type === 'Identifier' && callee?.name === 't') {
43
+ const isTranslationCall = (callee?.type === 'Identifier' && callee.name === 't') ||
44
+ (callee?.type === 'MemberExpression' &&
45
+ callee.computed === false &&
46
+ callee.object?.type === 'Identifier' &&
47
+ callee.object.name === 'labels' &&
48
+ callee.property?.type === 'Identifier' &&
49
+ callee.property.name === 't');
50
+ if (isTranslationCall) {
44
51
  const args = node.arguments || [];
45
52
  const firstArg = args[0];
46
53
  if (firstArg?.type === 'Literal' && typeof firstArg.value === 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "bin": {
6
6
  "fimo": "dist/cli/index.js"
@@ -1,6 +1,6 @@
1
1
  # Fimo project
2
2
 
3
- This is a Fimo project — a content + media + forms + analytics platform for React websites with a CMS
3
+ This is a Fimo project — a content + media + forms + analytics platform for web applications with a CMS
4
4
  dashboard. Fimo owns everything after the build: content, editing, environments, and hosting stay
5
5
  editable by the whole team.
6
6
 
@@ -8,26 +8,26 @@ When asked to create or manage an agent in this project, use Fimo's agent workfl
8
8
 
9
9
  ## Load the Fimo skills before doing Fimo work
10
10
 
11
- Fimo ships its skills through its CLI. Before writing schema-driven code, running CLI/deploy workflows,
12
- or migrating content, load the relevant skill:
11
+ Before writing schema-driven code, running CLI/deploy workflows, or migrating content, load only the
12
+ skill relevant to the task:
13
13
 
14
14
  ```bash
15
- npx fimo@latest skills list # what's available
16
- npx fimo@latest skills get fimo-code # writing code: schemas, forms, labels, fimo/ui
17
- npx fimo@latest skills get fimo-cli # CLI + workflows: push, deploy, sync, labels, domains
15
+ pnpm exec fimo skills get fimo-code # match the lockfile; code + framework APIs come from this project runtime
16
+ npx fimo@latest skills get fimo-cli # operational workflows: push, deploy, labels, domains
18
17
  ```
19
18
 
20
- Add `--ref <doc>` for a skill's reference docs. Always fetch fresh from the CLI rather than trusting a
21
- cached copy.
19
+ Use `npm exec fimo`, `yarn fimo`, or `bunx --no-install fimo` instead of `pnpm exec fimo` when that
20
+ matches the project lockfile. Add `--ref <doc>` for one reference at a time. Do not load `fimo-cli` for
21
+ a code-only task, or use `npx fimo@latest` for project-local code generation and validation.
22
22
 
23
23
  ## Critical: never hardcode user-facing things
24
24
 
25
25
  Fimo's whole point is that editors change content in the dashboard, not in code. Anything hardcoded
26
26
  breaks that. Load `fimo-code` for the exact primitives, but the rule is:
27
27
 
28
- - **Content** → declare a schema, render with the generated `useList()` / `useGet()` hooks + `fimo/ui`. Never `const posts = [...]` in JSX.
28
+ - **Content** → declare a schema, use its generated client, and render with the active framework adapter. Never `const posts = [...]` in JSX.
29
29
  - **Strings** → `t('key')` + `fimo labels set`. Never `<h1>Welcome</h1>`.
30
- - **Media** → `<Image>` / `<Video>` from `fimo/ui`. Never `<img src>`.
30
+ - **Media** → `<Image>` / `<Video>` from the active framework adapter. Never `<img src>` for tracked media.
31
31
  - **Forms** → the generated Zod schema + `submitX` helper. Never hand-roll fetch/validation.
32
32
 
33
33
  ## Development loop
@@ -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.12.0",
24
+ "fimo": "0.12.1",
25
25
  "input-otp": "^1.4.2",
26
26
  "isbot": "^5",
27
27
  "lucide-react": "^0.577.0",
@@ -11,7 +11,7 @@ export default {
11
11
  // prerender: async () => (await getFimoPaths()).map((p) => p.path),
12
12
  //
13
13
  // `getFimoPaths()` expands dynamic routes (e.g. `/blog/:slug`) by fetching
14
- // schema entries from the content API. See `references/setup-react-router.md`
14
+ // schema entries from the content API. See `references/frameworks/react-router.md`
15
15
  // in the fimo skill for the full setup pattern.
16
16
  buildDirectory: 'dist',
17
17
  // Feed Vite's dependency scanner the client entry + every route module.