fimo 0.7.0-experimental.2 → 0.7.0-experimental.4
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/README.md +1 -1
- package/assets/content-templates/hooks-template.eta +27 -73
- package/assets/content-templates/types-template.eta +1 -4
- package/assets/skills/fimo/SKILL.md +2 -2
- package/assets/skills/fimo/references/content.md +42 -46
- package/assets/skills/fimo/references/locales.md +0 -8
- package/assets/skills/fimo/references/setup-react-router.md +2 -2
- package/assets/skills/fimo/references/ui.md +1 -1
- package/assets/skills/fimo-cli/references/content.md +14 -17
- package/assets/skills/fimo-cli/references/domains.md +1 -1
- package/assets/skills/fimo-cli/references/locales.md +0 -6
- package/assets/skills/fimo-migration/SKILL.md +22 -2
- package/assets/skills/fimo-migration/references/content.md +8 -0
- package/assets/skills/fimo-migration/references/manifest.md +35 -0
- package/assets/skills/fimo-migration/references/qa.md +24 -2
- package/assets/skills/fimo-migration/references/workflow.md +12 -1
- package/assets/skills/fimo-migration/references/wrap.md +582 -0
- package/assets/skills/fimo-studio/references/custom-domains.md +1 -1
- package/assets/skills/fimo-studio/references/visual-editing.md +5 -3
- package/dist/build/vite/index.d.ts.map +1 -0
- package/dist/build/vite/plugins/content-sync.d.ts.map +1 -0
- package/dist/build/vite/plugins/content-sync.test.d.ts +2 -0
- package/dist/build/vite/plugins/content-sync.test.d.ts.map +1 -0
- package/dist/build/vite/plugins/content-sync.test.js +64 -0
- package/dist/build/vite/plugins/data-id.d.ts.map +1 -0
- package/dist/build/vite/plugins/fimo-config.d.ts.map +1 -0
- package/dist/build/vite/plugins/fimo-config.test.d.ts +2 -0
- package/dist/build/vite/plugins/fimo-config.test.d.ts.map +1 -0
- package/dist/build/vite/plugins/fimo-config.test.js +46 -0
- package/dist/build/vite/plugins/overlay.d.ts.map +1 -0
- package/dist/build/vite/plugins/robots.d.ts.map +1 -0
- package/dist/build/vite/plugins/seo.d.ts.map +1 -0
- package/dist/build/vite/plugins/server-config.d.ts.map +1 -0
- package/dist/build/vite/plugins/sitemap.d.ts.map +1 -0
- package/dist/build/vite/plugins/translations.d.ts +2 -8
- package/dist/build/vite/plugins/translations.d.ts.map +1 -0
- package/dist/build/vite/plugins/translations.js +3 -121
- package/dist/build/vite/plugins/translations.test.d.ts +2 -0
- package/dist/build/vite/plugins/translations.test.d.ts.map +1 -0
- package/dist/build/vite/plugins/translations.test.js +266 -0
- package/dist/cli/bundle.json +2 -3
- package/dist/cli/index.js +117939 -1186
- package/dist/runtime/app/FimoProviders.d.ts +1 -11
- package/dist/runtime/app/FimoProviders.d.ts.map +1 -0
- package/dist/runtime/app/FimoProviders.js +2 -23
- package/dist/runtime/app/FimoScripts.d.ts.map +1 -0
- package/dist/runtime/app/index.d.ts.map +1 -0
- package/dist/runtime/app/prefetch.d.ts.map +1 -0
- package/dist/runtime/astro/index.d.ts +2 -0
- package/dist/runtime/astro/index.d.ts.map +1 -0
- package/dist/runtime/astro/index.js +3 -0
- package/dist/runtime/astro/server.d.ts +3 -0
- package/dist/runtime/astro/server.d.ts.map +1 -0
- package/dist/runtime/astro/server.js +6 -0
- package/dist/runtime/content/DataSourcesProvider.d.ts.map +1 -0
- package/dist/runtime/content/RefreshContentProvider.d.ts.map +1 -0
- package/dist/runtime/content/RefreshContentProvider.test.d.ts +2 -0
- package/dist/runtime/content/RefreshContentProvider.test.d.ts.map +1 -0
- package/dist/runtime/content/RefreshContentProvider.test.js +33 -0
- package/dist/runtime/content/parseCollectionResponse.d.ts.map +1 -0
- package/dist/runtime/content/parseCollectionResponse.test.d.ts +2 -0
- package/dist/runtime/content/parseCollectionResponse.test.d.ts.map +1 -0
- package/dist/runtime/content/parseCollectionResponse.test.js +20 -0
- package/dist/runtime/content/utils/retrieve-data-sources.d.ts +0 -1
- package/dist/runtime/content/utils/retrieve-data-sources.d.ts.map +1 -0
- package/dist/runtime/content/utils/retrieve-data-sources.js +4 -27
- package/dist/runtime/core/AppErrorBoundary.d.ts.map +1 -0
- package/dist/runtime/core/ViteLifecycles.d.ts.map +1 -0
- package/dist/runtime/i18n/FimoLocaleContext.d.ts.map +1 -0
- package/dist/runtime/i18n/FimoLocaleContext.js +1 -0
- package/dist/runtime/i18n/locale.d.ts.map +1 -0
- package/dist/runtime/i18n/locale.test.d.ts +2 -0
- package/dist/runtime/i18n/locale.test.d.ts.map +1 -0
- package/dist/runtime/i18n/locale.test.js +58 -0
- package/dist/runtime/iframe/ConsoleErrorProvider.d.ts.map +1 -0
- package/dist/runtime/iframe/ScreenshotProvider.d.ts.map +1 -0
- package/dist/runtime/iframe/runtime/overlay-hmr.d.ts.map +1 -0
- package/dist/runtime/iframe/runtime/overlay-hmr.js +0 -3
- package/dist/runtime/iframe/runtime/overlay-runtime.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +0 -2
- package/dist/runtime/next/FimoNextProviders.d.ts +24 -0
- package/dist/runtime/next/FimoNextProviders.d.ts.map +1 -0
- package/dist/runtime/next/FimoNextProviders.js +20 -0
- package/dist/runtime/next/FimoNextScripts.d.ts +10 -0
- package/dist/runtime/next/FimoNextScripts.d.ts.map +1 -0
- package/dist/runtime/next/FimoNextScripts.js +19 -0
- package/dist/runtime/next/index.d.ts +14 -0
- package/dist/runtime/next/index.d.ts.map +1 -0
- package/dist/runtime/next/index.js +14 -0
- package/dist/runtime/next/server.d.ts +2 -0
- package/dist/runtime/next/server.d.ts.map +1 -0
- package/dist/runtime/next/server.js +4 -0
- package/dist/runtime/nuxt/composables.d.ts +9 -0
- package/dist/runtime/nuxt/composables.d.ts.map +1 -0
- package/dist/runtime/nuxt/composables.js +57 -0
- package/dist/runtime/nuxt/index.d.ts +3 -0
- package/dist/runtime/nuxt/index.d.ts.map +1 -0
- package/dist/runtime/nuxt/index.js +6 -0
- package/dist/runtime/nuxt/server.d.ts +3 -0
- package/dist/runtime/nuxt/server.d.ts.map +1 -0
- package/dist/runtime/nuxt/server.js +6 -0
- package/dist/runtime/paths/get-fimo-paths.d.ts.map +1 -0
- package/dist/runtime/paths/get-fimo-paths.js +5 -15
- package/dist/runtime/paths/index.d.ts.map +1 -0
- package/dist/runtime/paths/types.d.ts.map +1 -0
- package/dist/runtime/primitives/components/Boolean.d.ts.map +1 -0
- package/dist/runtime/primitives/components/Date.d.ts.map +1 -0
- package/dist/runtime/primitives/components/Image.d.ts.map +1 -0
- package/dist/runtime/primitives/components/RichText.d.ts.map +1 -0
- package/dist/runtime/primitives/components/StaticImage.d.ts.map +1 -0
- package/dist/runtime/primitives/components/Text.d.ts.map +1 -0
- package/dist/runtime/primitives/components/Video.d.ts.map +1 -0
- package/dist/runtime/primitives/components/index.d.ts.map +1 -0
- package/dist/runtime/primitives/index.d.ts.map +1 -0
- package/dist/runtime/primitives/labels-hook.d.ts +33 -0
- package/dist/runtime/primitives/labels-hook.d.ts.map +1 -0
- package/dist/runtime/primitives/labels-hook.js +41 -0
- package/dist/runtime/primitives/labels-store.d.ts +12 -0
- package/dist/runtime/primitives/labels-store.d.ts.map +1 -0
- package/dist/runtime/primitives/labels-store.js +60 -0
- package/dist/runtime/primitives/labels-store.test.d.ts +2 -0
- package/dist/runtime/primitives/labels-store.test.d.ts.map +1 -0
- package/dist/runtime/primitives/labels-store.test.js +66 -0
- package/dist/runtime/primitives/lib/image-optimization.d.ts.map +1 -0
- package/dist/runtime/primitives/lib/index.d.ts.map +1 -0
- package/dist/runtime/primitives/lib/primitives.d.ts +2 -2
- package/dist/runtime/primitives/lib/primitives.d.ts.map +1 -0
- package/dist/runtime/primitives/lib/query.d.ts +3 -5
- package/dist/runtime/primitives/lib/query.d.ts.map +1 -0
- package/dist/runtime/primitives/lib/template.d.ts.map +1 -0
- package/dist/runtime/primitives/lib/useFimoLiveValue.d.ts +5 -3
- package/dist/runtime/primitives/lib/useFimoLiveValue.d.ts.map +1 -0
- package/dist/runtime/primitives/lib/useFimoLiveValue.js +11 -4
- package/dist/runtime/primitives/public-surface.test.d.ts +2 -0
- package/dist/runtime/primitives/public-surface.test.d.ts.map +1 -0
- package/dist/runtime/primitives/public-surface.test.js +45 -0
- package/dist/runtime/primitives/translations.d.ts +1 -27
- package/dist/runtime/primitives/translations.d.ts.map +1 -0
- package/dist/runtime/primitives/translations.js +7 -85
- package/dist/runtime/react/FimoSpaProviders.d.ts +36 -0
- package/dist/runtime/react/FimoSpaProviders.d.ts.map +1 -0
- package/dist/runtime/react/FimoSpaProviders.js +63 -0
- package/dist/runtime/react/index.d.ts +33 -0
- package/dist/runtime/react/index.d.ts.map +1 -0
- package/dist/runtime/react/index.js +39 -0
- package/dist/runtime/react-router/index.d.ts.map +1 -0
- package/dist/runtime/react-router/navigation-utils.d.ts.map +1 -0
- package/dist/runtime/react-router/navigation.d.ts.map +1 -0
- package/dist/runtime/react-router/navigation.test.d.ts +2 -0
- package/dist/runtime/react-router/navigation.test.d.ts.map +1 -0
- package/dist/runtime/react-router/navigation.test.js +35 -0
- package/dist/runtime/react-router/routes.d.ts.map +1 -0
- package/dist/runtime/react-router/routes.test.d.ts +2 -0
- package/dist/runtime/react-router/routes.test.d.ts.map +1 -0
- package/dist/runtime/react-router/routes.test.js +67 -0
- package/dist/runtime/remix/FimoRemixProviders.d.ts +16 -0
- package/dist/runtime/remix/FimoRemixProviders.d.ts.map +1 -0
- package/dist/runtime/remix/FimoRemixProviders.js +12 -0
- package/dist/runtime/remix/FimoRemixScripts.d.ts +10 -0
- package/dist/runtime/remix/FimoRemixScripts.d.ts.map +1 -0
- package/dist/runtime/remix/FimoRemixScripts.js +19 -0
- package/dist/runtime/remix/index.d.ts +12 -0
- package/dist/runtime/remix/index.d.ts.map +1 -0
- package/dist/runtime/remix/index.js +11 -0
- package/dist/runtime/remix/server.d.ts +2 -0
- package/dist/runtime/remix/server.d.ts.map +1 -0
- package/dist/runtime/remix/server.js +2 -0
- package/dist/runtime/routing/AppResetScrollOnNavigate.d.ts.map +1 -0
- package/dist/runtime/routing/AppRoutesProvider.d.ts.map +1 -0
- package/dist/runtime/seo/buildSeoForPath.d.ts +3 -1
- package/dist/runtime/seo/buildSeoForPath.d.ts.map +1 -0
- package/dist/runtime/seo/buildSeoForPath.js +1 -4
- package/dist/runtime/seo/htmlProps.d.ts.map +1 -0
- package/dist/runtime/seo/index.d.ts.map +1 -0
- package/dist/runtime/seo/resolver.d.ts.map +1 -0
- package/dist/runtime/shared/display-routes.d.ts +14 -0
- package/dist/runtime/shared/display-routes.d.ts.map +1 -0
- package/dist/runtime/shared/display-routes.js +25 -0
- package/dist/runtime/shared/fimo-config.server.d.ts.map +1 -0
- package/dist/runtime/shared/fimo-config.server.js +1 -0
- package/dist/runtime/shared/fimo-config.types.d.ts +2 -0
- package/dist/runtime/shared/fimo-config.types.d.ts.map +1 -0
- package/dist/runtime/shared/i18n-messages.d.ts +29 -0
- package/dist/runtime/shared/i18n-messages.d.ts.map +1 -0
- package/dist/runtime/shared/i18n-messages.js +79 -0
- package/dist/runtime/shared/i18n-messages.test.d.ts +2 -0
- package/dist/runtime/shared/i18n-messages.test.d.ts.map +1 -0
- package/dist/runtime/shared/i18n-messages.test.js +39 -0
- package/dist/runtime/shared/labels-fetch.pure.d.ts +17 -0
- package/dist/runtime/shared/labels-fetch.pure.d.ts.map +1 -0
- package/dist/runtime/shared/labels-fetch.pure.js +71 -0
- package/dist/runtime/shared/labels-fetch.server.d.ts +7 -0
- package/dist/runtime/shared/labels-fetch.server.d.ts.map +1 -0
- package/dist/runtime/shared/labels-fetch.server.js +97 -0
- package/dist/runtime/shared/labels-t.pure.d.ts +2 -0
- package/dist/runtime/shared/labels-t.pure.d.ts.map +1 -0
- package/dist/runtime/shared/labels-t.pure.js +10 -0
- package/dist/runtime/svelte/index.d.ts +3 -0
- package/dist/runtime/svelte/index.d.ts.map +1 -0
- package/dist/runtime/svelte/index.js +7 -0
- package/dist/runtime/svelte/server.d.ts +3 -0
- package/dist/runtime/svelte/server.d.ts.map +1 -0
- package/dist/runtime/svelte/server.js +6 -0
- package/dist/runtime/t/OptionalTracking.d.ts.map +1 -0
- package/dist/runtime/t/OptionalTracking.test.d.ts +2 -0
- package/dist/runtime/t/OptionalTracking.test.d.ts.map +1 -0
- package/dist/runtime/t/OptionalTracking.test.js +11 -0
- package/dist/runtime/t/Pageview.d.ts.map +1 -0
- package/dist/runtime/templates.d.ts.map +1 -0
- package/dist/runtime/vue/index.d.ts +3 -0
- package/dist/runtime/vue/index.d.ts.map +1 -0
- package/dist/runtime/vue/index.js +5 -0
- package/dist/runtime/vue/server.d.ts +3 -0
- package/dist/runtime/vue/server.d.ts.map +1 -0
- package/dist/runtime/vue/server.js +6 -0
- package/dist/runtime/wrapped/FimoFileLink.d.ts +17 -0
- package/dist/runtime/wrapped/FimoFileLink.d.ts.map +1 -0
- package/dist/runtime/wrapped/FimoFileLink.js +19 -0
- package/dist/runtime/wrapped/FimoMediaImage.d.ts +14 -0
- package/dist/runtime/wrapped/FimoMediaImage.d.ts.map +1 -0
- package/dist/runtime/wrapped/FimoMediaImage.js +20 -0
- package/dist/runtime/wrapped/FimoMediaVideo.d.ts +14 -0
- package/dist/runtime/wrapped/FimoMediaVideo.d.ts.map +1 -0
- package/dist/runtime/wrapped/FimoMediaVideo.js +20 -0
- package/dist/runtime/wrapped/FimoRichTextBlock.d.ts +23 -0
- package/dist/runtime/wrapped/FimoRichTextBlock.d.ts.map +1 -0
- package/dist/runtime/wrapped/FimoRichTextBlock.js +22 -0
- package/dist/runtime/wrapped/FimoText.d.ts +22 -0
- package/dist/runtime/wrapped/FimoText.d.ts.map +1 -0
- package/dist/runtime/wrapped/FimoText.js +20 -0
- package/dist/runtime/wrapped/WrappedContentContext.d.ts +28 -0
- package/dist/runtime/wrapped/WrappedContentContext.d.ts.map +1 -0
- package/dist/runtime/wrapped/WrappedContentContext.js +30 -0
- package/dist/runtime/wrapped/WrappedProviders.d.ts +33 -0
- package/dist/runtime/wrapped/WrappedProviders.d.ts.map +1 -0
- package/dist/runtime/wrapped/WrappedProviders.js +101 -0
- package/dist/runtime/wrapped/dom.d.ts +4 -0
- package/dist/runtime/wrapped/dom.d.ts.map +1 -0
- package/dist/runtime/wrapped/dom.js +23 -0
- package/dist/runtime/wrapped/dom.test.d.ts +2 -0
- package/dist/runtime/wrapped/dom.test.d.ts.map +1 -0
- package/dist/runtime/wrapped/dom.test.js +16 -0
- package/dist/runtime/wrapped/server.d.ts +77 -0
- package/dist/runtime/wrapped/server.d.ts.map +1 -0
- package/dist/runtime/wrapped/server.js +237 -0
- package/dist/runtime/wrapped/server.test.d.ts +2 -0
- package/dist/runtime/wrapped/server.test.d.ts.map +1 -0
- package/dist/runtime/wrapped/server.test.js +91 -0
- package/dist/scripts/apply-wrap-templates.d.ts +61 -0
- package/dist/scripts/apply-wrap-templates.js +132 -0
- package/dist/scripts/apply-wrap-templates.test.js +199 -0
- package/dist/scripts/apply-wrap.d.ts +46 -0
- package/dist/scripts/apply-wrap.js +278 -0
- package/dist/scripts/apply-wrap.test.d.ts +1 -0
- package/dist/scripts/apply-wrap.test.js +226 -0
- package/dist/scripts/cms/discover.d.ts +2 -0
- package/dist/scripts/cms/discover.js +17 -0
- package/dist/scripts/cms/example-content.d.ts +32 -0
- package/dist/scripts/cms/example-content.js +87 -0
- package/dist/scripts/cms/example-content.test.d.ts +1 -0
- package/dist/scripts/cms/example-content.test.js +57 -0
- package/dist/scripts/cms/strapi/detect.d.ts +2 -0
- package/dist/scripts/cms/strapi/detect.js +185 -0
- package/dist/scripts/cms/strapi/detect.test.d.ts +1 -0
- package/dist/scripts/cms/strapi/detect.test.js +56 -0
- package/dist/scripts/cms/strapi/index.d.ts +3 -0
- package/dist/scripts/cms/strapi/index.js +15 -0
- package/dist/scripts/cms/strapi/list-source.d.ts +17 -0
- package/dist/scripts/cms/strapi/list-source.js +90 -0
- package/dist/scripts/cms/strapi/list-source.test.d.ts +1 -0
- package/dist/scripts/cms/strapi/list-source.test.js +33 -0
- package/dist/scripts/cms/strapi/schema-map.d.ts +9 -0
- package/dist/scripts/cms/strapi/schema-map.js +138 -0
- package/dist/scripts/cms/strapi/schema-map.test.d.ts +1 -0
- package/dist/scripts/cms/strapi/schema-map.test.js +87 -0
- package/dist/scripts/cms/types.d.ts +76 -0
- package/dist/scripts/cms/types.js +11 -0
- package/dist/scripts/detect-framework.d.ts +39 -0
- package/dist/scripts/detect-framework.js +133 -0
- package/dist/scripts/detect-framework.test.d.ts +1 -0
- package/dist/scripts/detect-framework.test.js +122 -0
- package/dist/scripts/draft-rows.d.ts +19 -0
- package/dist/scripts/draft-rows.js +135 -0
- package/dist/scripts/draft-rows.test.d.ts +1 -0
- package/dist/scripts/draft-rows.test.js +113 -0
- package/dist/scripts/draft-schemas.d.ts +27 -0
- package/dist/scripts/draft-schemas.js +188 -0
- package/dist/scripts/draft-schemas.test.d.ts +1 -0
- package/dist/scripts/draft-schemas.test.js +152 -0
- package/dist/scripts/frameworks/astro/routes.d.ts +3 -0
- package/dist/scripts/frameworks/astro/routes.js +55 -0
- package/dist/scripts/frameworks/astro/template-style.d.ts +7 -0
- package/dist/scripts/frameworks/astro/template-style.js +19 -0
- package/dist/scripts/frameworks/discover.d.ts +70 -0
- package/dist/scripts/frameworks/discover.js +171 -0
- package/dist/scripts/frameworks/next/rewire.d.ts +30 -0
- package/dist/scripts/frameworks/next/rewire.js +258 -0
- package/dist/scripts/frameworks/next/rewire.test.d.ts +1 -0
- package/dist/scripts/frameworks/next/rewire.test.js +134 -0
- package/dist/scripts/frameworks/next/routes.d.ts +17 -0
- package/dist/scripts/frameworks/next/routes.js +134 -0
- package/dist/scripts/frameworks/next/routes.test.d.ts +1 -0
- package/dist/scripts/frameworks/next/routes.test.js +64 -0
- package/dist/scripts/frameworks/next/wiring.d.ts +26 -0
- package/dist/scripts/frameworks/next/wiring.js +163 -0
- package/dist/scripts/frameworks/next/wiring.test.d.ts +1 -0
- package/dist/scripts/frameworks/next/wiring.test.js +146 -0
- package/dist/scripts/frameworks/nuxt/routes.d.ts +3 -0
- package/dist/scripts/frameworks/nuxt/routes.js +54 -0
- package/dist/scripts/frameworks/nuxt/template-style.d.ts +9 -0
- package/dist/scripts/frameworks/nuxt/template-style.js +27 -0
- package/dist/scripts/frameworks/remix/routes.d.ts +3 -0
- package/dist/scripts/frameworks/remix/routes.js +50 -0
- package/dist/scripts/frameworks/sveltekit/routes.d.ts +3 -0
- package/dist/scripts/frameworks/sveltekit/routes.js +50 -0
- package/dist/scripts/frameworks/sveltekit/template-style.d.ts +9 -0
- package/dist/scripts/frameworks/sveltekit/template-style.js +54 -0
- package/dist/scripts/frameworks/vite/routes.d.ts +15 -0
- package/dist/scripts/frameworks/vite/routes.js +93 -0
- package/dist/scripts/frameworks/vite/routes.test.d.ts +1 -0
- package/dist/scripts/frameworks/vite/routes.test.js +73 -0
- package/dist/scripts/frameworks/vite/wiring.d.ts +10 -0
- package/dist/scripts/frameworks/vite/wiring.js +99 -0
- package/dist/scripts/frameworks/vite/wiring.test.d.ts +1 -0
- package/dist/scripts/frameworks/vite/wiring.test.js +88 -0
- package/dist/scripts/generated-types.test.d.ts +1 -0
- package/dist/scripts/generated-types.test.js +212 -0
- package/dist/scripts/lib/validation-report.d.ts +1 -0
- package/dist/scripts/lib/validation-report.js +3 -0
- package/dist/scripts/lint-translation-keys.test.d.ts +1 -0
- package/dist/scripts/lint-translation-keys.test.js +16 -0
- package/dist/scripts/render-parity/capture.d.ts +56 -0
- package/dist/scripts/render-parity/capture.js +366 -0
- package/dist/scripts/render-parity/capture.test.d.ts +1 -0
- package/dist/scripts/render-parity/capture.test.js +306 -0
- package/dist/scripts/render-parity/compare.d.ts +59 -0
- package/dist/scripts/render-parity/compare.js +0 -0
- package/dist/scripts/render-parity/compare.test.d.ts +1 -0
- package/dist/scripts/render-parity/compare.test.js +98 -0
- package/dist/scripts/render-parity/normalize-html.d.ts +13 -0
- package/dist/scripts/render-parity/normalize-html.js +223 -0
- package/dist/scripts/render-parity/normalize-html.test.d.ts +1 -0
- package/dist/scripts/render-parity/normalize-html.test.js +58 -0
- package/dist/scripts/render-parity/types.d.ts +41 -0
- package/dist/scripts/render-parity/types.js +1 -0
- package/dist/scripts/resolve-routes.js +1 -1
- package/dist/scripts/scan-wrappable.d.ts +196 -0
- package/dist/scripts/scan-wrappable.js +1221 -0
- package/dist/scripts/scan-wrappable.test.d.ts +1 -0
- package/dist/scripts/scan-wrappable.test.js +502 -0
- package/dist/scripts/sync-schemas.test.d.ts +1 -0
- package/dist/scripts/sync-schemas.test.js +124 -0
- package/dist/scripts/validate-route-metadata.js +11 -0
- package/dist/scripts/validate-route-metadata.test.d.ts +1 -0
- package/dist/scripts/validate-route-metadata.test.js +116 -0
- package/dist/scripts/validate-schemas.test.d.ts +1 -0
- package/dist/scripts/validate-schemas.test.js +263 -0
- package/package.json +85 -20
- package/scripts/add-ext.mjs +47 -0
- package/scripts/bump-version.mjs +58 -0
- package/scripts/bundle-cli.mjs +123 -0
- package/scripts/install-cli.mjs +36 -0
- package/scripts/lib/channels.mjs +70 -0
- package/scripts/lib/dev-release-state.mjs +44 -0
- package/scripts/lib/dev-release-state.test.ts +36 -0
- package/scripts/lib/postinstall-onboarding.test.ts +82 -0
- package/scripts/lib/release-core.mjs +225 -0
- package/scripts/lib/release-core.test.ts +147 -0
- package/scripts/migration-qa-gate.test.ts +155 -0
- package/scripts/publish-npm.mjs +180 -0
- package/templates/react-router/package.json +7 -10
- package/templates/react-router/src/pages/Index.tsx +1 -1
- package/dist/runtime/content/client/createContentClient.d.ts +0 -5
- package/dist/runtime/content/client/createContentClient.js +0 -300
- package/dist/runtime/content/client/createSingletonClient.d.ts +0 -5
- package/dist/runtime/content/client/createSingletonClient.js +0 -108
- package/dist/runtime/content/client/internal.d.ts +0 -44
- package/dist/runtime/content/client/internal.js +0 -236
- package/dist/runtime/content/client/types.d.ts +0 -136
- package/dist/runtime/content/client/useQueryLocale.d.ts +0 -2
- package/dist/runtime/content/client/useQueryLocale.js +0 -6
- /package/dist/{runtime/content/client/types.js → scripts/apply-wrap-templates.test.d.ts} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { mkdtempSync, rmSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
6
|
+
import { validateRouteMetadata } from './validate-route-metadata';
|
|
7
|
+
describe('validateRouteMetadata i18n checks', () => {
|
|
8
|
+
let scratch = null;
|
|
9
|
+
afterEach(() => {
|
|
10
|
+
if (scratch) {
|
|
11
|
+
rmSync(scratch, { recursive: true, force: true });
|
|
12
|
+
scratch = null;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
it('accepts fimoRoutes() with canonical routes and multi-locale path prefixes', () => {
|
|
16
|
+
const cwd = writeProject({
|
|
17
|
+
config: {
|
|
18
|
+
i18n: {
|
|
19
|
+
defaultLocale: 'en',
|
|
20
|
+
locales: ['en', 'es'],
|
|
21
|
+
routing: { strategy: 'path-prefix' },
|
|
22
|
+
},
|
|
23
|
+
routes: {
|
|
24
|
+
home: { path: '/', label: 'Home' },
|
|
25
|
+
pricing: { path: '/pricing', label: 'Pricing' },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
routesSource: `import type { RouteConfig } from '@react-router/dev/routes';
|
|
29
|
+
import { index, route } from '@react-router/dev/routes';
|
|
30
|
+
import { fimoRoutes } from 'fimo/react-router/routes';
|
|
31
|
+
|
|
32
|
+
const routes = [
|
|
33
|
+
index('./pages/Index.tsx', { id: 'home' }),
|
|
34
|
+
route('pricing', './pages/Pricing.tsx', { id: 'pricing' }),
|
|
35
|
+
] satisfies RouteConfig;
|
|
36
|
+
|
|
37
|
+
export default fimoRoutes(routes) satisfies RouteConfig;
|
|
38
|
+
`,
|
|
39
|
+
files: ['src/pages/Index.tsx', 'src/pages/Pricing.tsx'],
|
|
40
|
+
});
|
|
41
|
+
expect(validateRouteMetadata({ cwd }).errors).toEqual([]);
|
|
42
|
+
});
|
|
43
|
+
it('rejects invalid locale config', () => {
|
|
44
|
+
const cwd = writeProject({
|
|
45
|
+
config: {
|
|
46
|
+
i18n: {
|
|
47
|
+
defaultLocale: 'en--US',
|
|
48
|
+
locales: ['es'],
|
|
49
|
+
routing: { strategy: 'path-prefix' },
|
|
50
|
+
},
|
|
51
|
+
routes: {
|
|
52
|
+
home: { path: '/', label: 'Home' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
routesSource: `import { index } from '@react-router/dev/routes';
|
|
56
|
+
export default [index('./pages/Index.tsx')];
|
|
57
|
+
`,
|
|
58
|
+
files: ['src/pages/Index.tsx'],
|
|
59
|
+
});
|
|
60
|
+
const errors = validateRouteMetadata({ cwd }).errors.join('\n');
|
|
61
|
+
expect(errors).toContain('Invalid i18n.defaultLocale "en--US"');
|
|
62
|
+
expect(errors).toContain('i18n.locales must include i18n.defaultLocale');
|
|
63
|
+
});
|
|
64
|
+
it('rejects canonical routes that claim locale prefixes', () => {
|
|
65
|
+
const cwd = writeProject({
|
|
66
|
+
config: {
|
|
67
|
+
i18n: {
|
|
68
|
+
defaultLocale: 'en',
|
|
69
|
+
locales: ['en', 'es'],
|
|
70
|
+
routing: { strategy: 'path-prefix' },
|
|
71
|
+
},
|
|
72
|
+
routes: {
|
|
73
|
+
spanish: { path: '/es', label: 'Spanish' },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
routesSource: `import { route } from '@react-router/dev/routes';
|
|
77
|
+
export default [route('es', './pages/Spanish.tsx')];
|
|
78
|
+
`,
|
|
79
|
+
files: ['src/pages/Spanish.tsx'],
|
|
80
|
+
});
|
|
81
|
+
const errors = validateRouteMetadata({ cwd }).errors.join('\n');
|
|
82
|
+
expect(errors).toContain('uses reserved locale prefix "es"');
|
|
83
|
+
});
|
|
84
|
+
it('warns as an error when top-level dynamic routes can capture locale URLs without fimoRoutes()', () => {
|
|
85
|
+
const cwd = writeProject({
|
|
86
|
+
config: {
|
|
87
|
+
i18n: {
|
|
88
|
+
defaultLocale: 'en',
|
|
89
|
+
locales: ['en', 'es'],
|
|
90
|
+
routing: { strategy: 'path-prefix' },
|
|
91
|
+
},
|
|
92
|
+
routes: {
|
|
93
|
+
page: { path: '/:slug', label: 'Page', params: { slug: { schema: 'Page', queryField: 'slug' } } },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
routesSource: `import { route } from '@react-router/dev/routes';
|
|
97
|
+
export default [route(':slug', './pages/Page.tsx')];
|
|
98
|
+
`,
|
|
99
|
+
files: ['src/pages/Page.tsx'],
|
|
100
|
+
});
|
|
101
|
+
const errors = validateRouteMetadata({ cwd }).errors.join('\n');
|
|
102
|
+
expect(errors).toContain('top-level dynamic route');
|
|
103
|
+
expect(errors).toContain('fimoRoutes(routes)');
|
|
104
|
+
});
|
|
105
|
+
function writeProject(args) {
|
|
106
|
+
scratch = mkdtempSync(join(tmpdir(), 'fimo-route-metadata-'));
|
|
107
|
+
mkdirSync(join(scratch, 'src'), { recursive: true });
|
|
108
|
+
writeFileSync(join(scratch, 'fimo-config.json'), JSON.stringify(args.config, null, 2));
|
|
109
|
+
writeFileSync(join(scratch, 'src', 'routes.ts'), args.routesSource);
|
|
110
|
+
for (const file of args.files) {
|
|
111
|
+
mkdirSync(join(scratch, file, '..'), { recursive: true });
|
|
112
|
+
writeFileSync(join(scratch, file), 'export default function Page() { return null; }\n');
|
|
113
|
+
}
|
|
114
|
+
return scratch;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
+
import { validateSchemas } from './validate-schemas';
|
|
6
|
+
describe('validateSchemas', () => {
|
|
7
|
+
let scratch = null;
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
if (scratch) {
|
|
10
|
+
rmSync(scratch, { recursive: true, force: true });
|
|
11
|
+
scratch = null;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function writeProject(schemas) {
|
|
15
|
+
scratch = mkdtempSync(join(tmpdir(), 'validate-schemas-'));
|
|
16
|
+
mkdirSync(join(scratch, 'src/schemas'), { recursive: true });
|
|
17
|
+
for (const [fileName, schema] of Object.entries(schemas)) {
|
|
18
|
+
writeFileSync(join(scratch, 'src/schemas', fileName), typeof schema === 'string' ? schema : JSON.stringify(schema, null, 2));
|
|
19
|
+
}
|
|
20
|
+
return scratch;
|
|
21
|
+
}
|
|
22
|
+
it('accepts a valid schema', () => {
|
|
23
|
+
const cwd = writeProject({
|
|
24
|
+
'Author.json': {
|
|
25
|
+
uid: 'Author',
|
|
26
|
+
name: 'Authors',
|
|
27
|
+
fields: {
|
|
28
|
+
name: { type: 'string' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'BlogPost.json': {
|
|
32
|
+
uid: 'BlogPost',
|
|
33
|
+
name: 'Blog Posts',
|
|
34
|
+
fields: {
|
|
35
|
+
title: { type: 'string' },
|
|
36
|
+
body: { type: 'richtext' },
|
|
37
|
+
coverImage: { type: 'media' },
|
|
38
|
+
featured: { type: 'boolean' },
|
|
39
|
+
author: { type: 'reference', target: 'Author' },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
expect(validateSchemas({ cwd })).toEqual({ errors: [], schemasChecked: 2 });
|
|
44
|
+
});
|
|
45
|
+
it('accepts self-referential reference fields', () => {
|
|
46
|
+
const cwd = writeProject({
|
|
47
|
+
'Item.json': {
|
|
48
|
+
uid: 'Item',
|
|
49
|
+
name: 'Items',
|
|
50
|
+
fields: {
|
|
51
|
+
title: { type: 'string' },
|
|
52
|
+
parent: { type: 'reference', target: 'Item' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
expect(validateSchemas({ cwd })).toEqual({ errors: [], schemasChecked: 1 });
|
|
57
|
+
});
|
|
58
|
+
it('accepts a non-localized schema policy', () => {
|
|
59
|
+
const cwd = writeProject({
|
|
60
|
+
'Author.json': {
|
|
61
|
+
uid: 'Author',
|
|
62
|
+
name: 'Authors',
|
|
63
|
+
i18n: { enabled: false },
|
|
64
|
+
fields: { name: { type: 'string' } },
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
expect(validateSchemas({ cwd })).toEqual({ errors: [], schemasChecked: 1 });
|
|
68
|
+
});
|
|
69
|
+
it('rejects a non-boolean singleton policy', () => {
|
|
70
|
+
const cwd = writeProject({
|
|
71
|
+
'Settings.json': {
|
|
72
|
+
uid: 'Settings',
|
|
73
|
+
name: 'Settings',
|
|
74
|
+
isSingleton: 'yes',
|
|
75
|
+
fields: {},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
const { errors } = validateSchemas({ cwd });
|
|
79
|
+
expect(errors).toEqual([expect.objectContaining({ rule: 'schemas/singleton' })]);
|
|
80
|
+
});
|
|
81
|
+
it.each([true, { enabled: 'no' }, { enabled: false, fallback: 'en' }, { fallback: 'en' }])('rejects an invalid schema-level i18n policy %#', (i18n) => {
|
|
82
|
+
const cwd = writeProject({
|
|
83
|
+
'Author.json': {
|
|
84
|
+
uid: 'Author',
|
|
85
|
+
name: 'Authors',
|
|
86
|
+
i18n,
|
|
87
|
+
fields: { name: { type: 'string' } },
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
const { errors } = validateSchemas({ cwd });
|
|
91
|
+
expect(errors).toHaveLength(1);
|
|
92
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/i18n' });
|
|
93
|
+
});
|
|
94
|
+
it('returns no errors when the schemas directory does not exist', () => {
|
|
95
|
+
scratch = mkdtempSync(join(tmpdir(), 'validate-schemas-'));
|
|
96
|
+
expect(validateSchemas({ cwd: scratch })).toEqual({ errors: [], schemasChecked: 0 });
|
|
97
|
+
});
|
|
98
|
+
it('rejects reserved field names like slug', () => {
|
|
99
|
+
const cwd = writeProject({
|
|
100
|
+
'TeamMember.json': {
|
|
101
|
+
uid: 'TeamMember',
|
|
102
|
+
name: 'Team Members',
|
|
103
|
+
fields: {
|
|
104
|
+
name: { type: 'string' },
|
|
105
|
+
slug: { type: 'string' },
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
const { errors } = validateSchemas({ cwd });
|
|
110
|
+
expect(errors).toHaveLength(1);
|
|
111
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/reserved-field', file: 'src/schemas/TeamMember.json' });
|
|
112
|
+
expect(errors[0].message).toContain('"slug" is reserved');
|
|
113
|
+
expect(errors[0].message).toContain('entry data');
|
|
114
|
+
});
|
|
115
|
+
it('rejects every reserved metadata name', () => {
|
|
116
|
+
const cwd = writeProject({
|
|
117
|
+
'Bad.json': {
|
|
118
|
+
uid: 'Bad',
|
|
119
|
+
name: 'Bad',
|
|
120
|
+
fields: Object.fromEntries(['id', 'documentId', 'slug', 'locale', 'createdAt', 'updatedAt', '__fimo'].map((name) => [
|
|
121
|
+
name,
|
|
122
|
+
{ type: 'string' },
|
|
123
|
+
])),
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
const { errors } = validateSchemas({ cwd });
|
|
127
|
+
expect(errors).toHaveLength(7);
|
|
128
|
+
expect(errors.every((err) => err.rule === 'schemas/reserved-field')).toBe(true);
|
|
129
|
+
});
|
|
130
|
+
it('rejects unsupported field types', () => {
|
|
131
|
+
const cwd = writeProject({
|
|
132
|
+
'Product.json': {
|
|
133
|
+
uid: 'Product',
|
|
134
|
+
name: 'Products',
|
|
135
|
+
fields: { price: { type: 'decimal' } },
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
const { errors } = validateSchemas({ cwd });
|
|
139
|
+
expect(errors).toHaveLength(1);
|
|
140
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/field-type' });
|
|
141
|
+
expect(errors[0].message).toContain('"decimal"');
|
|
142
|
+
expect(errors[0].message).toContain('string, richtext, media');
|
|
143
|
+
});
|
|
144
|
+
it('rejects reference fields without a valid target', () => {
|
|
145
|
+
const cwd = writeProject({
|
|
146
|
+
'Post.json': {
|
|
147
|
+
uid: 'Post',
|
|
148
|
+
name: 'Posts',
|
|
149
|
+
fields: { author: { type: 'reference' } },
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
const { errors } = validateSchemas({ cwd });
|
|
153
|
+
expect(errors).toHaveLength(1);
|
|
154
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/reference-target' });
|
|
155
|
+
});
|
|
156
|
+
it('rejects reference fields targeting a missing local schema', () => {
|
|
157
|
+
const cwd = writeProject({
|
|
158
|
+
'Post.json': {
|
|
159
|
+
uid: 'Post',
|
|
160
|
+
name: 'Posts',
|
|
161
|
+
fields: { author: { type: 'reference', target: 'Author' } },
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
const { errors } = validateSchemas({ cwd });
|
|
165
|
+
expect(errors).toHaveLength(1);
|
|
166
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/reference-target' });
|
|
167
|
+
expect(errors[0].message).toContain('unknown schema "Author"');
|
|
168
|
+
});
|
|
169
|
+
it('rejects reference-only properties on scalar fields', () => {
|
|
170
|
+
const cwd = writeProject({
|
|
171
|
+
'Post.json': {
|
|
172
|
+
uid: 'Post',
|
|
173
|
+
name: 'Posts',
|
|
174
|
+
fields: { author: { type: 'string', target: 'Author' } },
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
const { errors } = validateSchemas({ cwd });
|
|
178
|
+
expect(errors).toHaveLength(1);
|
|
179
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/reference-shape' });
|
|
180
|
+
});
|
|
181
|
+
it('rejects schema uid names that cannot be used as content type identifiers', () => {
|
|
182
|
+
const cwd = writeProject({
|
|
183
|
+
'blog-post.json': {
|
|
184
|
+
uid: 'blog-post',
|
|
185
|
+
name: 'Blog Posts',
|
|
186
|
+
fields: { title: { type: 'string' } },
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
const { errors } = validateSchemas({ cwd });
|
|
190
|
+
expect(errors).toHaveLength(1);
|
|
191
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/type-name' });
|
|
192
|
+
});
|
|
193
|
+
it('rejects field names that cannot be used in generated source paths', () => {
|
|
194
|
+
const cwd = writeProject({
|
|
195
|
+
'Page.json': {
|
|
196
|
+
uid: 'Page',
|
|
197
|
+
name: 'Pages',
|
|
198
|
+
fields: { 'hero-title': { type: 'string' } },
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
const { errors } = validateSchemas({ cwd });
|
|
202
|
+
expect(errors).toHaveLength(1);
|
|
203
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/field-name' });
|
|
204
|
+
});
|
|
205
|
+
it('rejects field-level i18n settings', () => {
|
|
206
|
+
const cwd = writeProject({
|
|
207
|
+
'Page.json': {
|
|
208
|
+
uid: 'Page',
|
|
209
|
+
name: 'Pages',
|
|
210
|
+
fields: { title: { type: 'string', i18n: true } },
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
const { errors } = validateSchemas({ cwd });
|
|
214
|
+
expect(errors).toHaveLength(1);
|
|
215
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/field-i18n' });
|
|
216
|
+
});
|
|
217
|
+
it('rejects reference-level locale settings', () => {
|
|
218
|
+
const cwd = writeProject({
|
|
219
|
+
'Page.json': {
|
|
220
|
+
uid: 'Page',
|
|
221
|
+
name: 'Pages',
|
|
222
|
+
fields: { parent: { type: 'reference', target: 'Page', localized: true } },
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
const { errors } = validateSchemas({ cwd });
|
|
226
|
+
expect(errors).toHaveLength(1);
|
|
227
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/field-i18n' });
|
|
228
|
+
expect(errors[0].message).toContain('"localized"');
|
|
229
|
+
});
|
|
230
|
+
it('rejects a uid that does not match the file name', () => {
|
|
231
|
+
const cwd = writeProject({
|
|
232
|
+
'TeamMember.json': {
|
|
233
|
+
uid: 'Member',
|
|
234
|
+
name: 'Team Members',
|
|
235
|
+
fields: { name: { type: 'string' } },
|
|
236
|
+
},
|
|
237
|
+
});
|
|
238
|
+
const { errors } = validateSchemas({ cwd });
|
|
239
|
+
expect(errors).toHaveLength(1);
|
|
240
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/uid' });
|
|
241
|
+
});
|
|
242
|
+
it('rejects missing uid, name, and fields', () => {
|
|
243
|
+
const cwd = writeProject({ 'Empty.json': {} });
|
|
244
|
+
const { errors } = validateSchemas({ cwd });
|
|
245
|
+
expect(errors.map((err) => err.rule)).toEqual(['schemas/uid', 'schemas/name', 'schemas/fields']);
|
|
246
|
+
});
|
|
247
|
+
it('reports invalid JSON', () => {
|
|
248
|
+
const cwd = writeProject({ 'Broken.json': '{ not json' });
|
|
249
|
+
const { errors } = validateSchemas({ cwd });
|
|
250
|
+
expect(errors).toHaveLength(1);
|
|
251
|
+
expect(errors[0]).toMatchObject({ rule: 'schemas/parse' });
|
|
252
|
+
});
|
|
253
|
+
it('validates multiple files and counts them', () => {
|
|
254
|
+
const cwd = writeProject({
|
|
255
|
+
'Good.json': { uid: 'Good', name: 'Good', fields: { title: { type: 'string' } } },
|
|
256
|
+
'Bad.json': { uid: 'Bad', name: 'Bad', fields: { slug: { type: 'string' } } },
|
|
257
|
+
});
|
|
258
|
+
const result = validateSchemas({ cwd });
|
|
259
|
+
expect(result.schemasChecked).toBe(2);
|
|
260
|
+
expect(result.errors).toHaveLength(1);
|
|
261
|
+
expect(result.errors[0].file).toBe('src/schemas/Bad.json');
|
|
262
|
+
});
|
|
263
|
+
});
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fimo",
|
|
3
|
-
"version": "0.7.0-experimental.
|
|
3
|
+
"version": "0.7.0-experimental.4",
|
|
4
4
|
"description": "Fimo CLI - create, deploy, and manage Fimo projects",
|
|
5
5
|
"bin": {
|
|
6
6
|
"fimo": "dist/cli/index.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/",
|
|
10
|
-
"!dist/**/*.d.ts.map",
|
|
11
10
|
"assets/",
|
|
12
|
-
"scripts/
|
|
13
|
-
"scripts/lib/postinstall-onboarding.mjs",
|
|
11
|
+
"scripts/",
|
|
14
12
|
"templates/",
|
|
15
13
|
"README.md",
|
|
16
14
|
"release.json"
|
|
@@ -22,6 +20,18 @@
|
|
|
22
20
|
"types": "./dist/runtime/index.d.ts",
|
|
23
21
|
"import": "./dist/runtime/index.js"
|
|
24
22
|
},
|
|
23
|
+
"./react": {
|
|
24
|
+
"types": "./dist/runtime/react/index.d.ts",
|
|
25
|
+
"import": "./dist/runtime/react/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./next": {
|
|
28
|
+
"types": "./dist/runtime/next/index.d.ts",
|
|
29
|
+
"import": "./dist/runtime/next/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./next/server": {
|
|
32
|
+
"types": "./dist/runtime/next/server.d.ts",
|
|
33
|
+
"import": "./dist/runtime/next/server.js"
|
|
34
|
+
},
|
|
25
35
|
"./react-router": {
|
|
26
36
|
"types": "./dist/runtime/react-router/index.d.ts",
|
|
27
37
|
"import": "./dist/runtime/react-router/index.js"
|
|
@@ -41,6 +51,46 @@
|
|
|
41
51
|
"./templates": {
|
|
42
52
|
"types": "./dist/runtime/templates.d.ts",
|
|
43
53
|
"import": "./dist/runtime/templates.js"
|
|
54
|
+
},
|
|
55
|
+
"./remix": {
|
|
56
|
+
"types": "./dist/runtime/remix/index.d.ts",
|
|
57
|
+
"import": "./dist/runtime/remix/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./remix/server": {
|
|
60
|
+
"types": "./dist/runtime/remix/server.d.ts",
|
|
61
|
+
"import": "./dist/runtime/remix/server.js"
|
|
62
|
+
},
|
|
63
|
+
"./astro": {
|
|
64
|
+
"types": "./dist/runtime/astro/index.d.ts",
|
|
65
|
+
"import": "./dist/runtime/astro/index.js"
|
|
66
|
+
},
|
|
67
|
+
"./astro/server": {
|
|
68
|
+
"types": "./dist/runtime/astro/server.d.ts",
|
|
69
|
+
"import": "./dist/runtime/astro/server.js"
|
|
70
|
+
},
|
|
71
|
+
"./nuxt": {
|
|
72
|
+
"types": "./dist/runtime/nuxt/index.d.ts",
|
|
73
|
+
"import": "./dist/runtime/nuxt/index.js"
|
|
74
|
+
},
|
|
75
|
+
"./nuxt/server": {
|
|
76
|
+
"types": "./dist/runtime/nuxt/server.d.ts",
|
|
77
|
+
"import": "./dist/runtime/nuxt/server.js"
|
|
78
|
+
},
|
|
79
|
+
"./svelte": {
|
|
80
|
+
"types": "./dist/runtime/svelte/index.d.ts",
|
|
81
|
+
"import": "./dist/runtime/svelte/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./svelte/server": {
|
|
84
|
+
"types": "./dist/runtime/svelte/server.d.ts",
|
|
85
|
+
"import": "./dist/runtime/svelte/server.js"
|
|
86
|
+
},
|
|
87
|
+
"./vue": {
|
|
88
|
+
"types": "./dist/runtime/vue/index.d.ts",
|
|
89
|
+
"import": "./dist/runtime/vue/index.js"
|
|
90
|
+
},
|
|
91
|
+
"./vue/server": {
|
|
92
|
+
"types": "./dist/runtime/vue/server.d.ts",
|
|
93
|
+
"import": "./dist/runtime/vue/server.js"
|
|
44
94
|
}
|
|
45
95
|
},
|
|
46
96
|
"publishConfig": {
|
|
@@ -49,7 +99,7 @@
|
|
|
49
99
|
"scripts": {
|
|
50
100
|
"build": "pnpm run clean && tsc -b tsconfig.json && chmod +x dist/cli/index.js",
|
|
51
101
|
"build:bundle": "node scripts/bundle-cli.mjs",
|
|
52
|
-
"check:types": "tsc -b tsconfig.json
|
|
102
|
+
"check:types": "tsc -b tsconfig.json",
|
|
53
103
|
"start": "tsx src/cli/index.ts",
|
|
54
104
|
"install-cli": "pnpm build && node scripts/install-cli.mjs",
|
|
55
105
|
"publish:npm": "node scripts/publish-npm.mjs",
|
|
@@ -62,16 +112,23 @@
|
|
|
62
112
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
63
113
|
},
|
|
64
114
|
"dependencies": {
|
|
115
|
+
"@clack/core": "^1.2.0",
|
|
116
|
+
"@clack/prompts": "^1.2.0",
|
|
65
117
|
"@rollup/pluginutils": "^5.1.0",
|
|
118
|
+
"agent-install": "^0.0.5",
|
|
119
|
+
"better-auth": "1.4.18",
|
|
66
120
|
"change-case": "^5.4.4",
|
|
121
|
+
"cheerio": "^1.0.0",
|
|
122
|
+
"commander": "^13.1.0",
|
|
67
123
|
"eta": "^3.5.0",
|
|
124
|
+
"lucide-react": "^0.577.0",
|
|
125
|
+
"open": "^10.1.2",
|
|
68
126
|
"oxc-parser": "^0.118.0",
|
|
69
127
|
"react-error-boundary": "^6.0.0",
|
|
128
|
+
"yaml": "2.8.2",
|
|
70
129
|
"zod": "4.1.8"
|
|
71
130
|
},
|
|
72
131
|
"devDependencies": {
|
|
73
|
-
"@clack/core": "^1.2.0",
|
|
74
|
-
"@clack/prompts": "^1.2.0",
|
|
75
132
|
"@fimo/agents-bundle": "workspace:*",
|
|
76
133
|
"@fimo/api-contracts": "workspace:*",
|
|
77
134
|
"@fimo/cli-kit": "workspace:*",
|
|
@@ -80,12 +137,7 @@
|
|
|
80
137
|
"@types/node": "^22.15.29",
|
|
81
138
|
"@types/react": "^19.2.14",
|
|
82
139
|
"@types/react-dom": "^19.2.3",
|
|
83
|
-
"agent-install": "^0.0.5",
|
|
84
|
-
"better-auth": "1.4.18",
|
|
85
|
-
"cheerio": "^1.0.0",
|
|
86
|
-
"commander": "^13.1.0",
|
|
87
140
|
"esbuild": "^0.25.10",
|
|
88
|
-
"open": "^10.1.2",
|
|
89
141
|
"react": "^19.2.4",
|
|
90
142
|
"react-dom": "^19.2.4",
|
|
91
143
|
"react-router": "^7.15.1",
|
|
@@ -93,30 +145,43 @@
|
|
|
93
145
|
"typescript": "5.9.2",
|
|
94
146
|
"vite": "^8.0.13",
|
|
95
147
|
"vitest": "^4.1.6",
|
|
96
|
-
"wrangler": "^4.83.0"
|
|
97
|
-
"yaml": "2.8.2"
|
|
148
|
+
"wrangler": "^4.83.0"
|
|
98
149
|
},
|
|
99
150
|
"peerDependencies": {
|
|
151
|
+
"@remix-run/react": ">=2.0.0",
|
|
152
|
+
"@sveltejs/kit": ">=2.0.0",
|
|
100
153
|
"@tanstack/react-query": "^5.80.6",
|
|
154
|
+
"astro": ">=4.0.0",
|
|
155
|
+
"next": ">=14.0.0",
|
|
156
|
+
"nuxt": ">=3.0.0",
|
|
101
157
|
"react": "^19.0.0",
|
|
102
158
|
"react-dom": "^19.0.0",
|
|
103
|
-
"react-router": "^7.0.0
|
|
104
|
-
"
|
|
159
|
+
"react-router": "^7.0.0",
|
|
160
|
+
"vue": ">=3.0.0"
|
|
105
161
|
},
|
|
106
162
|
"peerDependenciesMeta": {
|
|
107
163
|
"@tanstack/react-query": {
|
|
108
164
|
"optional": true
|
|
109
165
|
},
|
|
110
|
-
"
|
|
166
|
+
"next": {
|
|
111
167
|
"optional": true
|
|
112
168
|
},
|
|
113
|
-
"react-
|
|
169
|
+
"react-router": {
|
|
114
170
|
"optional": true
|
|
115
171
|
},
|
|
116
|
-
"react
|
|
172
|
+
"@remix-run/react": {
|
|
173
|
+
"optional": true
|
|
174
|
+
},
|
|
175
|
+
"astro": {
|
|
176
|
+
"optional": true
|
|
177
|
+
},
|
|
178
|
+
"nuxt": {
|
|
179
|
+
"optional": true
|
|
180
|
+
},
|
|
181
|
+
"@sveltejs/kit": {
|
|
117
182
|
"optional": true
|
|
118
183
|
},
|
|
119
|
-
"
|
|
184
|
+
"vue": {
|
|
120
185
|
"optional": true
|
|
121
186
|
}
|
|
122
187
|
},
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Rewrite relative imports to add `.js` extensions (required by Node ESM).
|
|
3
|
+
// Idempotent. Preserves all other code.
|
|
4
|
+
import { existsSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
5
|
+
import { extname, resolve } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
|
|
8
|
+
const HERE = resolve(fileURLToPath(import.meta.url), '..');
|
|
9
|
+
const ROOTS = process.argv.slice(2).map((p) => resolve(p));
|
|
10
|
+
|
|
11
|
+
const IMPORT_RE = /(from\s+|import\s*\(\s*)(['"])(\.\.?\/[^'"\s]+?)\2/g;
|
|
12
|
+
|
|
13
|
+
function walk(dir, out) {
|
|
14
|
+
for (const name of readdirSync(dir)) {
|
|
15
|
+
if (['node_modules', 'dist', '.git'].includes(name)) continue;
|
|
16
|
+
const p = `${dir}/${name}`;
|
|
17
|
+
const st = statSync(p);
|
|
18
|
+
if (st.isDirectory()) walk(p, out);
|
|
19
|
+
else if (/\.(ts|tsx|mts|mjs)$/.test(name) && !name.endsWith('.d.ts')) out.push(p);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function rewriteOne(filePath) {
|
|
24
|
+
const src = readFileSync(filePath, 'utf-8');
|
|
25
|
+
const dir = filePath.split('/').slice(0, -1).join('/');
|
|
26
|
+
let mutated = false;
|
|
27
|
+
const out = src.replace(IMPORT_RE, (match, lead, quote, spec) => {
|
|
28
|
+
const ext = extname(spec);
|
|
29
|
+
if (ext) return match;
|
|
30
|
+
const candidate = resolve(dir, spec);
|
|
31
|
+
if (existsSync(candidate) && statSync(candidate).isDirectory()) {
|
|
32
|
+
mutated = true;
|
|
33
|
+
return `${lead}${quote}${spec}/index.js${quote}`;
|
|
34
|
+
}
|
|
35
|
+
mutated = true;
|
|
36
|
+
return `${lead}${quote}${spec}.js${quote}`;
|
|
37
|
+
});
|
|
38
|
+
if (mutated) {
|
|
39
|
+
writeFileSync(filePath, out);
|
|
40
|
+
console.log(`updated ${filePath.slice(HERE.length - 7)}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const files = [];
|
|
45
|
+
for (const r of ROOTS) walk(r, files);
|
|
46
|
+
for (const f of files) rewriteOne(f);
|
|
47
|
+
console.log(`[add-ext] processed ${files.length} files`);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Bumps the Fimo CLI version in apps/cli/package.json — NO git tag, NO commit.
|
|
3
|
+
//
|
|
4
|
+
// Under the branch-driven release model the version lives in
|
|
5
|
+
// apps/cli/package.json and you bump it in a PR. CI creates the
|
|
6
|
+
// `cli@<version>` git tag when it publishes `@latest` on a `production`
|
|
7
|
+
// merge, so this script must NOT create a tag — that would collide with
|
|
8
|
+
// CI's tag-guard (the publish would skip, thinking the version already
|
|
9
|
+
// shipped).
|
|
10
|
+
//
|
|
11
|
+
// Usage:
|
|
12
|
+
// pnpm -F fimo release:bump patch
|
|
13
|
+
// pnpm -F fimo release:bump minor
|
|
14
|
+
// pnpm -F fimo release:bump major
|
|
15
|
+
// pnpm -F fimo release:bump 1.2.3 # explicit version
|
|
16
|
+
//
|
|
17
|
+
// After bumping, commit the change in your PR. Merging it through to
|
|
18
|
+
// `production` is what publishes `@latest` and creates the tag.
|
|
19
|
+
|
|
20
|
+
import { spawnSync } from 'node:child_process';
|
|
21
|
+
import { dirname, resolve } from 'node:path';
|
|
22
|
+
import { fileURLToPath } from 'node:url';
|
|
23
|
+
|
|
24
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
const CLI_ROOT = resolve(HERE, '..');
|
|
26
|
+
|
|
27
|
+
const VALID_INCREMENTS = new Set(['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease']);
|
|
28
|
+
|
|
29
|
+
const args = process.argv.slice(2);
|
|
30
|
+
if (args.length === 0) {
|
|
31
|
+
console.error(
|
|
32
|
+
'[cli/bump] usage: pnpm -F fimo release:bump <patch|minor|major|premajor|preminor|prepatch|prerelease|X.Y.Z> [--preid <id>]'
|
|
33
|
+
);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const increment = args[0];
|
|
38
|
+
const isExplicitVersion = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/.test(increment);
|
|
39
|
+
if (!VALID_INCREMENTS.has(increment) && !isExplicitVersion) {
|
|
40
|
+
console.error(
|
|
41
|
+
`[cli/bump] invalid increment "${increment}". expected one of ${[...VALID_INCREMENTS].join('|')} or an explicit X.Y.Z.`
|
|
42
|
+
);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Bump package.json ONLY — `--no-git-tag-version` skips both the commit and
|
|
47
|
+
// the tag. CI owns the `cli@<version>` tag (created on the @latest publish).
|
|
48
|
+
// Use pnpm (not npm) — npm chokes on the `workspace:*` devDeps.
|
|
49
|
+
const versionArgs = ['version', '--no-git-tag-version', ...args];
|
|
50
|
+
console.log(`[cli/bump] $ pnpm ${versionArgs.join(' ')}`);
|
|
51
|
+
const result = spawnSync('pnpm', versionArgs, { cwd: CLI_ROOT, stdio: 'inherit' });
|
|
52
|
+
if (result.status !== 0) {
|
|
53
|
+
console.error(`[cli/bump] pnpm version failed (exit ${result.status}).`);
|
|
54
|
+
process.exit(result.status ?? 1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
console.log('[cli/bump] bumped apps/cli/package.json (no tag, no commit).');
|
|
58
|
+
console.log('[cli/bump] commit it in your PR — merging to `production` publishes @latest + tags it.');
|