fimo 0.7.0-experimental.7 → 0.7.0-experimental.9
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/skills/fimo-migration/references/wrap.md +35 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +2649 -2360
- package/dist/scripts/cms/example-content.d.ts +2 -2
- package/dist/scripts/cms/strapi/index.js +2 -0
- package/dist/scripts/cms/strapi/touchpoints.d.ts +31 -0
- package/dist/scripts/cms/strapi/touchpoints.js +145 -0
- package/dist/scripts/cms/strapi/touchpoints.test.d.ts +1 -0
- package/dist/scripts/cms/strapi/touchpoints.test.js +62 -0
- package/dist/scripts/cms/types.d.ts +24 -1
- package/dist/scripts/extract-translations.js +59 -12
- package/dist/scripts/extract-translations.test.d.ts +1 -0
- package/dist/scripts/extract-translations.test.js +66 -0
- package/dist/scripts/frameworks/discover.d.ts +1 -1
- package/dist/scripts/frameworks/discover.js +12 -5
- package/dist/scripts/frameworks/next/wiring.d.ts +7 -0
- package/dist/scripts/frameworks/next/wiring.js +29 -6
- package/dist/scripts/frameworks/next/wiring.test.js +28 -0
- package/package.json +1 -1
- package/templates/react-router/package.json +1 -1
|
@@ -351,6 +351,41 @@ owner to decide, not the agent). Additional manual checks:
|
|
|
351
351
|
that an edited label round-trips (`fimo labels set <key> "new"` → reload →
|
|
352
352
|
rendered). `fimo publish` / `fimo deploy --publish` remain owner-only.
|
|
353
353
|
|
|
354
|
+
### W7. Unwire the previous CMS — the cutover (when scaffolded)
|
|
355
|
+
|
|
356
|
+
Injecting Fimo is only **half** a migration. If a CMS was scaffolded (W2/W5),
|
|
357
|
+
the site now READS example content from Fimo but is still **wired to the old
|
|
358
|
+
CMS**: the generated Fimo adapter falls back to it, the SDK/client is still
|
|
359
|
+
imported, and the CMS env is still present. The migration is not done until a
|
|
360
|
+
plain `pnpm dev` runs **purely on Fimo, with zero requests to the old CMS**.
|
|
361
|
+
That cutover is the "wow" — deliver it.
|
|
362
|
+
|
|
363
|
+
This phase is the agent's: every codebase talks to its CMS differently (bare
|
|
364
|
+
`fetch`, an SDK client, axios, GraphQL, RSC loaders, image hosts), so the
|
|
365
|
+
replacement needs judgment. The machine hands you the worklist; you do the work.
|
|
366
|
+
|
|
367
|
+
1. **Read the worklist.** `npx fimo migrate cutover` lists every remaining
|
|
368
|
+
coupling — SDK/client/type deps, source lines that reach the CMS (env /
|
|
369
|
+
content-type IDs / SDK import), and leftover env keys. The generated agent
|
|
370
|
+
prompt embeds the same list under **Unwire <CMS>**.
|
|
371
|
+
2. **Replace the data-access layer.** Prefer rewriting the CMS **client module**
|
|
372
|
+
(the one file that instantiates the SDK / holds the fetch helpers) into a
|
|
373
|
+
Fimo-backed adapter exposing the **same interface**, so every caller is fixed
|
|
374
|
+
by a single change. Read from Fimo with `fetchEntries` (`fimo/<framework>/server`).
|
|
375
|
+
3. **Sever the fallthrough.** The generated Fimo adapter falls back to the CMS
|
|
376
|
+
for unmapped reads — a scaffold crutch. Once the client is Fimo-backed, drop
|
|
377
|
+
the fallthrough so an unmapped read fails loudly, never silently hits the CMS.
|
|
378
|
+
4. **Remove the coupling.** Delete the CMS SDK/client/type dependencies and the
|
|
379
|
+
base-URL / token env, and fix any standalone routing the CMS handled (e.g. a
|
|
380
|
+
`/` → `/[locale]` redirect its middleware provided).
|
|
381
|
+
5. **Verify — the cutover gate.** `npx fimo migrate cutover --check` must report
|
|
382
|
+
a **clean** cutover (0 couplings). Then `pnpm dev` and confirm the network
|
|
383
|
+
tab shows **zero** requests to the old CMS. Record the cutover in the manifest.
|
|
384
|
+
|
|
385
|
+
Detection keys on actual CMS references, not filenames — a CMS client module you
|
|
386
|
+
rewrote to call Fimo reads as clean. Keep-live sites (the user chose NOT to
|
|
387
|
+
scaffold) skip this phase: the CMS stays the source of truth.
|
|
388
|
+
|
|
354
389
|
## Manifest
|
|
355
390
|
|
|
356
391
|
Record wrap mode in the canonical ledger (`references/manifest.md`): set
|