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.
- package/assets/agent-templates/broken-link-sweeper/capabilities.yaml +0 -4
- package/assets/agent-templates/content-translator/capabilities.yaml +0 -2
- package/assets/agent-templates/seo-audit/capabilities.yaml +0 -1
- package/assets/content-templates/types-template.eta +13 -7
- package/assets/skills/fimo/SKILL.md +2 -2
- package/assets/skills/fimo-cli/SKILL.md +8 -8
- package/assets/skills/fimo-cli/references/agent-setup.md +1 -1
- package/assets/skills/fimo-cli/references/agents.md +5 -12
- package/assets/skills/fimo-cli/references/assets.md +2 -2
- package/assets/skills/fimo-cli/references/content.md +16 -30
- package/assets/skills/fimo-cli/references/describe.md +1 -1
- package/assets/skills/fimo-cli/references/forms.md +8 -8
- package/assets/skills/fimo-cli/references/init.md +5 -4
- package/assets/skills/fimo-cli/references/labels.md +4 -4
- package/assets/skills/fimo-cli/references/locales.md +3 -3
- package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +1 -1
- package/assets/skills/fimo-code/SKILL.md +40 -50
- package/assets/skills/fimo-code/references/assets.md +6 -4
- package/assets/skills/fimo-code/references/content/clients.md +130 -0
- package/assets/skills/fimo-code/references/content/primitives.md +5 -0
- package/assets/skills/fimo-code/references/content/richtext.md +48 -0
- package/assets/skills/fimo-code/references/content/schema.md +122 -0
- package/assets/skills/fimo-code/references/content.md +12 -597
- package/assets/skills/fimo-code/references/design.md +1 -1
- package/assets/skills/fimo-code/references/frameworks/next/app-router.md +116 -0
- package/assets/skills/fimo-code/references/frameworks/next/locales.md +59 -0
- package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +99 -0
- package/assets/skills/fimo-code/references/frameworks/next.md +116 -0
- package/assets/skills/fimo-code/references/frameworks/react-router.md +295 -0
- package/assets/skills/fimo-code/references/frameworks/vite-react.md +225 -0
- package/assets/skills/fimo-code/references/labels.md +24 -83
- package/assets/skills/fimo-code/references/locales.md +22 -111
- package/assets/skills/fimo-code/references/setup-plain-vite.md +3 -227
- package/assets/skills/fimo-code/references/setup-react-router.md +3 -276
- package/assets/skills/fimo-code/references/ui.md +32 -78
- package/dist/cli/bundle.json +2 -2
- package/dist/cli/index.js +16 -16
- package/dist/scripts/extract-translations.js +8 -1
- package/package.json +1 -1
- package/templates/react-router/AGENTS.md +10 -10
- package/templates/react-router/package.json +1 -1
- 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
|
-
|
|
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
|
# Fimo project
|
|
2
2
|
|
|
3
|
-
This is a Fimo project — a content + media + forms + analytics platform for
|
|
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
|
-
|
|
12
|
-
|
|
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
|
-
|
|
16
|
-
npx fimo@latest skills get fimo-
|
|
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
|
-
|
|
21
|
-
|
|
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,
|
|
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
|
|
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
|
|
@@ -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/
|
|
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.
|