bsmnt 0.4.0 → 0.4.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.
- package/dist/{helpers/add → application/add-hooks}/index.d.ts +4 -4
- package/dist/application/add-hooks/index.d.ts.map +1 -0
- package/dist/{helpers/add → application/add-hooks}/index.js +22 -35
- package/dist/application/add-hooks/index.js.map +1 -0
- package/dist/{utils → application/add-integration}/format-results.d.ts +1 -6
- package/dist/application/add-integration/format-results.d.ts.map +1 -0
- package/dist/{utils → application/add-integration}/format-results.js +1 -6
- package/dist/application/add-integration/format-results.js.map +1 -0
- package/dist/{helpers/integrate → application/add-integration}/index.d.ts +2 -1
- package/dist/application/add-integration/index.d.ts.map +1 -0
- package/dist/{helpers/integrate → application/add-integration}/index.js +46 -41
- package/dist/application/add-integration/index.js.map +1 -0
- package/dist/application/create-project/build-context.d.ts +9 -0
- package/dist/application/create-project/build-context.d.ts.map +1 -0
- package/dist/application/create-project/build-context.js +13 -0
- package/dist/application/create-project/build-context.js.map +1 -0
- package/dist/application/create-project/index.d.ts +44 -0
- package/dist/application/create-project/index.d.ts.map +1 -0
- package/dist/application/create-project/index.js +70 -0
- package/dist/application/create-project/index.js.map +1 -0
- package/dist/application/create-project/map-selection-to-registry.d.ts +3 -0
- package/dist/application/create-project/map-selection-to-registry.d.ts.map +1 -0
- package/dist/application/create-project/map-selection-to-registry.js +30 -0
- package/dist/application/create-project/map-selection-to-registry.js.map +1 -0
- package/dist/application/create-project/resolve-selection.d.ts +15 -0
- package/dist/application/create-project/resolve-selection.d.ts.map +1 -0
- package/dist/application/create-project/resolve-selection.js +11 -0
- package/dist/application/create-project/resolve-selection.js.map +1 -0
- package/dist/{helpers/skills → application/install-skills}/index.d.ts +1 -1
- package/dist/application/install-skills/index.d.ts.map +1 -0
- package/dist/{helpers/skills → application/install-skills}/index.js +31 -44
- package/dist/application/install-skills/index.js.map +1 -0
- package/dist/{utils/detect-project.d.ts → application/shared/project-detection.d.ts} +8 -15
- package/dist/application/shared/project-detection.d.ts.map +1 -0
- package/dist/{utils/detect-project.js → application/shared/project-detection.js} +8 -24
- package/dist/application/shared/project-detection.js.map +1 -0
- package/dist/core/create/build-plan.d.ts +8 -0
- package/dist/core/create/build-plan.d.ts.map +1 -0
- package/dist/core/create/build-plan.js +89 -0
- package/dist/core/create/build-plan.js.map +1 -0
- package/dist/core/create/execute-plan.d.ts +23 -0
- package/dist/core/create/execute-plan.d.ts.map +1 -0
- package/dist/core/create/execute-plan.js +23 -0
- package/dist/core/create/execute-plan.js.map +1 -0
- package/dist/core/create/internal-ids.d.ts +23 -0
- package/dist/core/create/internal-ids.d.ts.map +1 -0
- package/dist/core/create/internal-ids.js +36 -0
- package/dist/core/create/internal-ids.js.map +1 -0
- package/dist/core/create/registry.d.ts +12 -0
- package/dist/core/create/registry.d.ts.map +1 -0
- package/dist/core/create/registry.js +33 -0
- package/dist/core/create/registry.js.map +1 -0
- package/dist/core/create/types.d.ts +96 -0
- package/dist/core/create/types.d.ts.map +1 -0
- package/dist/core/create/types.js +2 -0
- package/dist/core/create/types.js.map +1 -0
- package/dist/domain/agents.d.ts +61 -0
- package/dist/domain/agents.d.ts.map +1 -0
- package/dist/domain/agents.js +35 -0
- package/dist/domain/agents.js.map +1 -0
- package/dist/domain/animations.d.ts +20 -0
- package/dist/domain/animations.d.ts.map +1 -0
- package/dist/domain/animations.js +13 -0
- package/dist/domain/animations.js.map +1 -0
- package/dist/domain/cms.d.ts +24 -0
- package/dist/domain/cms.d.ts.map +1 -0
- package/dist/domain/cms.js +13 -0
- package/dist/domain/cms.js.map +1 -0
- package/dist/domain/hooks.d.ts +67 -0
- package/dist/domain/hooks.d.ts.map +1 -0
- package/dist/domain/hooks.js +52 -0
- package/dist/domain/hooks.js.map +1 -0
- package/dist/domain/skills.d.ts +70 -0
- package/dist/domain/skills.d.ts.map +1 -0
- package/dist/domain/skills.js +84 -0
- package/dist/domain/skills.js.map +1 -0
- package/dist/domain/templates.d.ts +51 -0
- package/dist/domain/templates.d.ts.map +1 -0
- package/dist/domain/templates.js +27 -0
- package/dist/domain/templates.js.map +1 -0
- package/dist/index.js +124 -115
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agents/register-sanity-mcp.d.ts +12 -0
- package/dist/infrastructure/agents/register-sanity-mcp.d.ts.map +1 -0
- package/dist/infrastructure/agents/register-sanity-mcp.js +153 -0
- package/dist/infrastructure/agents/register-sanity-mcp.js.map +1 -0
- package/dist/infrastructure/create/apply-copy-paths.d.ts +3 -0
- package/dist/infrastructure/create/apply-copy-paths.d.ts.map +1 -0
- package/dist/infrastructure/create/apply-copy-paths.js +12 -0
- package/dist/infrastructure/create/apply-copy-paths.js.map +1 -0
- package/dist/infrastructure/create/apply-merge-paths.d.ts +3 -0
- package/dist/infrastructure/create/apply-merge-paths.d.ts.map +1 -0
- package/dist/infrastructure/create/apply-merge-paths.js +17 -0
- package/dist/infrastructure/create/apply-merge-paths.js.map +1 -0
- package/dist/infrastructure/create/apply-package-json.d.ts +8 -0
- package/dist/infrastructure/create/apply-package-json.d.ts.map +1 -0
- package/dist/infrastructure/create/apply-package-json.js +46 -0
- package/dist/infrastructure/create/apply-package-json.js.map +1 -0
- package/dist/infrastructure/create/copy-template.d.ts +10 -0
- package/dist/infrastructure/create/copy-template.d.ts.map +1 -0
- package/dist/infrastructure/create/copy-template.js.map +1 -0
- package/dist/infrastructure/create/executor.d.ts +3 -0
- package/dist/infrastructure/create/executor.d.ts.map +1 -0
- package/dist/infrastructure/create/executor.js +21 -0
- package/dist/infrastructure/create/executor.js.map +1 -0
- package/dist/{helpers/create/init-git.d.ts → infrastructure/create/init-git-repo.d.ts} +2 -3
- package/dist/infrastructure/create/init-git-repo.d.ts.map +1 -0
- package/dist/{helpers/create/init-git.js → infrastructure/create/init-git-repo.js} +1 -4
- package/dist/infrastructure/create/init-git-repo.js.map +1 -0
- package/dist/{helpers/create/install.d.ts → infrastructure/create/install-dependencies.d.ts} +1 -1
- package/dist/infrastructure/create/install-dependencies.d.ts.map +1 -0
- package/dist/{helpers/create/install.js → infrastructure/create/install-dependencies.js} +1 -1
- package/dist/infrastructure/create/install-dependencies.js.map +1 -0
- package/dist/infrastructure/create/lifecycle-registry.d.ts +3 -0
- package/dist/infrastructure/create/lifecycle-registry.d.ts.map +1 -0
- package/dist/infrastructure/create/lifecycle-registry.js +38 -0
- package/dist/infrastructure/create/lifecycle-registry.js.map +1 -0
- package/dist/infrastructure/create/merge-registry.d.ts +3 -0
- package/dist/infrastructure/create/merge-registry.d.ts.map +1 -0
- package/dist/infrastructure/create/merge-registry.js +27 -0
- package/dist/infrastructure/create/merge-registry.js.map +1 -0
- package/dist/infrastructure/create/rename-files.d.ts.map +1 -0
- package/dist/infrastructure/create/rename-files.js.map +1 -0
- package/dist/{helpers → infrastructure}/create/setup-agent.d.ts +9 -7
- package/dist/infrastructure/create/setup-agent.d.ts.map +1 -0
- package/dist/infrastructure/create/setup-agent.js +77 -0
- package/dist/infrastructure/create/setup-agent.js.map +1 -0
- package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -0
- package/dist/{helpers → infrastructure}/create/setup-sanity.js +1 -19
- package/dist/infrastructure/create/setup-sanity.js.map +1 -0
- package/dist/infrastructure/integrations/inject-integration.d.ts +9 -0
- package/dist/infrastructure/integrations/inject-integration.d.ts.map +1 -0
- package/dist/{helpers/integrate/merge-orchestrator.js → infrastructure/integrations/inject-integration.js} +26 -38
- package/dist/infrastructure/integrations/inject-integration.js.map +1 -0
- package/dist/modules/features/agents/index.d.ts +3 -0
- package/dist/modules/features/agents/index.d.ts.map +1 -0
- package/dist/modules/features/agents/index.js +4 -0
- package/dist/modules/features/agents/index.js.map +1 -0
- package/dist/modules/features/agents/shared.d.ts +4 -0
- package/dist/modules/features/agents/shared.d.ts.map +1 -0
- package/dist/modules/features/agents/shared.js +21 -0
- package/dist/modules/features/agents/shared.js.map +1 -0
- package/dist/{configs/animations.d.ts → modules/features/animation/config.d.ts} +1 -1
- package/dist/modules/features/animation/config.d.ts.map +1 -0
- package/dist/{configs/animations.js → modules/features/animation/config.js} +1 -1
- package/dist/modules/features/animation/config.js.map +1 -0
- package/dist/modules/features/animation/gsap.d.ts +3 -0
- package/dist/modules/features/animation/gsap.d.ts.map +1 -0
- package/dist/modules/features/animation/gsap.js +16 -0
- package/dist/modules/features/animation/gsap.js.map +1 -0
- package/dist/modules/features/animation/index.d.ts +3 -0
- package/dist/modules/features/animation/index.d.ts.map +1 -0
- package/dist/modules/features/animation/index.js +4 -0
- package/dist/modules/features/animation/index.js.map +1 -0
- package/dist/modules/features/animation/motion.d.ts +3 -0
- package/dist/modules/features/animation/motion.d.ts.map +1 -0
- package/dist/modules/features/animation/motion.js +16 -0
- package/dist/modules/features/animation/motion.js.map +1 -0
- package/dist/modules/features/cms/index.d.ts +3 -0
- package/dist/modules/features/cms/index.d.ts.map +1 -0
- package/dist/modules/features/cms/index.js +7 -0
- package/dist/modules/features/cms/index.js.map +1 -0
- package/dist/modules/features/cms/sanity/config.d.ts.map +1 -0
- package/dist/{helpers/integrate → modules/features/cms}/sanity/config.js +3 -2
- package/dist/modules/features/cms/sanity/config.js.map +1 -0
- package/dist/modules/features/cms/sanity/index.d.ts +3 -0
- package/dist/modules/features/cms/sanity/index.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/index.js +61 -0
- package/dist/modules/features/cms/sanity/index.js.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/check-integration-merger.d.ts → modules/features/cms/sanity/mergers/check-integration.d.ts} +1 -1
- package/dist/modules/features/cms/sanity/mergers/check-integration.d.ts.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/check-integration-merger.js → modules/features/cms/sanity/mergers/check-integration.js} +1 -1
- package/dist/modules/features/cms/sanity/mergers/check-integration.js.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/layout-merger.d.ts → modules/features/cms/sanity/mergers/layout.d.ts} +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.d.ts.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/layout-merger.js → modules/features/cms/sanity/mergers/layout.js} +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts +13 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.js +92 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.js.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts +14 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.js +44 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.js.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts +3 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.js +46 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.js.map +1 -0
- package/dist/modules/features/hooks/factory.d.ts +4 -0
- package/dist/modules/features/hooks/factory.d.ts.map +1 -0
- package/dist/modules/features/hooks/factory.js +26 -0
- package/dist/modules/features/hooks/factory.js.map +1 -0
- package/dist/modules/features/hooks/index.d.ts +3 -0
- package/dist/modules/features/hooks/index.d.ts.map +1 -0
- package/dist/modules/features/hooks/index.js +4 -0
- package/dist/modules/features/hooks/index.js.map +1 -0
- package/dist/modules/presets/index.d.ts +3 -0
- package/dist/modules/presets/index.d.ts.map +1 -0
- package/dist/modules/presets/index.js +11 -0
- package/dist/modules/presets/index.js.map +1 -0
- package/dist/modules/presets/next-default.d.ts +3 -0
- package/dist/modules/presets/next-default.d.ts.map +1 -0
- package/dist/modules/presets/next-default.js +9 -0
- package/dist/modules/presets/next-default.js.map +1 -0
- package/dist/modules/presets/next-experiments.d.ts +3 -0
- package/dist/modules/presets/next-experiments.d.ts.map +1 -0
- package/dist/modules/presets/next-experiments.js +9 -0
- package/dist/modules/presets/next-experiments.js.map +1 -0
- package/dist/modules/presets/next-pagebuilder.d.ts +3 -0
- package/dist/modules/presets/next-pagebuilder.d.ts.map +1 -0
- package/dist/modules/presets/next-pagebuilder.js +10 -0
- package/dist/modules/presets/next-pagebuilder.js.map +1 -0
- package/dist/modules/presets/next-webgl.d.ts +3 -0
- package/dist/modules/presets/next-webgl.d.ts.map +1 -0
- package/dist/modules/presets/next-webgl.js +9 -0
- package/dist/modules/presets/next-webgl.js.map +1 -0
- package/dist/paths.d.ts +7 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +8 -2
- package/dist/paths.js.map +1 -1
- package/index.js +2 -2
- package/package.json +11 -4
- package/src/modules/features/cms/sanity/files/.knip.json +8 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/blog/[slug]/route.ts +3 -4
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/revalidate/route.ts +1 -4
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/blog/[slug]/page.tsx +8 -9
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/layout.tsx +2 -2
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/sitemap.md/route.ts +18 -29
- package/src/modules/features/cms/sanity/files/app/sitemap.xml/route.ts +51 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/env.ts +2 -4
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/queries.ts +0 -42
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/index.ts +1 -1
- package/src/modules/features/cms/sanity/files/lib/scripts/copy-sanity-mcp.ts +23 -0
- package/src/modules/features/cms/sanity/files/lib/scripts/generate-page.ts +297 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/json-ld.tsx +1 -6
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/metadata.ts +2 -2
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/url.ts +4 -2
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/proxy.ts +11 -11
- package/src/template-hooks/use-device-perf.ts +27 -17
- package/src/templates/next-default/.env.example +3 -3
- package/src/templates/next-default/.vscode/extensions.json +1 -5
- package/src/templates/next-default/.vscode/settings.json +1 -1
- package/src/templates/next-default/.zed/settings.json +47 -0
- package/src/templates/next-default/README.md +7 -6
- package/src/templates/next-default/_gitignore +1 -3
- package/src/templates/next-default/app/layout.tsx +21 -35
- package/src/templates/next-default/app/robots.ts +3 -4
- package/src/templates/next-default/app/sitemap.xml/route.ts +29 -29
- package/src/templates/next-default/biome.json +9 -2
- package/src/templates/next-default/components/ui/image/index.tsx +2 -1
- package/src/templates/next-default/components/ui/link/index.tsx +35 -35
- package/src/templates/next-default/lefthook.yml +25 -0
- package/src/templates/next-default/lib/README.md +8 -4
- package/src/templates/next-default/lib/hooks/use-media.ts +6 -3
- package/src/templates/next-default/lib/scripts/dev.ts +32 -0
- package/src/templates/next-default/lib/styles/README.md +13 -0
- package/src/templates/next-default/lib/styles/fonts.ts +20 -0
- package/src/templates/next-default/lib/styles/global.css +15 -196
- package/src/templates/next-default/lib/styles/index.css +3 -0
- package/src/templates/next-default/lib/styles/tokens.css +182 -0
- package/src/templates/next-default/lib/utils/README.md +40 -0
- package/src/templates/next-default/lib/utils/easings.ts +240 -0
- package/src/templates/next-default/lib/utils/fetch.ts +84 -0
- package/src/templates/next-default/lib/utils/global-css.d.ts +1 -0
- package/src/templates/next-default/lib/utils/json-ld.tsx +70 -68
- package/src/templates/next-default/lib/utils/math.ts +236 -0
- package/src/templates/next-default/lib/utils/metadata.ts +26 -27
- package/src/templates/next-default/lib/utils/strings.ts +246 -0
- package/src/templates/next-default/lib/utils/types.d.ts +15 -0
- package/src/templates/next-default/lib/utils/url.ts +8 -5
- package/src/templates/next-default/lib/utils/viewport.ts +199 -0
- package/src/templates/next-default/package.json +12 -7
- package/src/templates/next-default/svg.d.ts +1 -0
- package/src/templates/next-experiments/.env.example +3 -3
- package/src/templates/next-experiments/.knip.json +3 -0
- package/src/templates/next-experiments/.vscode/extensions.json +1 -5
- package/src/templates/next-experiments/.vscode/settings.json +1 -1
- package/src/templates/next-experiments/.zed/settings.json +47 -0
- package/src/templates/next-experiments/README.md +7 -6
- package/src/templates/next-experiments/_gitignore +1 -3
- package/src/templates/next-experiments/app/layout.tsx +21 -35
- package/src/templates/next-experiments/app/robots.ts +5 -2
- package/src/templates/next-experiments/app/sitemap.xml/route.ts +51 -0
- package/src/templates/next-experiments/biome.json +4 -2
- package/src/templates/next-experiments/components/layout/navigation-menu.tsx +1 -1
- package/src/templates/next-experiments/components/layout/wrapper/index.tsx +6 -6
- package/src/templates/next-experiments/components/ui/image/index.tsx +33 -33
- package/src/templates/next-experiments/lib/README.md +8 -4
- package/src/templates/next-experiments/lib/hooks/use-media.ts +6 -3
- package/src/templates/next-experiments/lib/scripts/dev.ts +32 -0
- package/src/templates/next-experiments/lib/styles/README.md +13 -0
- package/src/templates/next-experiments/lib/styles/fonts.ts +20 -0
- package/src/templates/next-experiments/lib/styles/global.css +16 -196
- package/src/templates/next-experiments/lib/styles/index.css +3 -0
- package/src/templates/next-experiments/lib/styles/tokens.css +182 -0
- package/src/templates/next-experiments/lib/utils/README.md +40 -0
- package/src/templates/next-experiments/lib/utils/easings.ts +240 -0
- package/src/templates/next-experiments/lib/utils/fetch.ts +84 -0
- package/src/templates/next-experiments/lib/utils/global-css.d.ts +1 -0
- package/src/templates/next-experiments/lib/utils/json-ld.tsx +70 -68
- package/src/templates/next-experiments/lib/utils/math.ts +236 -0
- package/src/templates/next-experiments/lib/utils/metadata.ts +26 -27
- package/src/templates/next-experiments/lib/utils/strings.ts +246 -0
- package/src/templates/next-experiments/lib/utils/types.d.ts +15 -0
- package/src/templates/next-experiments/lib/utils/url.ts +8 -5
- package/src/templates/next-experiments/lib/utils/viewport.ts +199 -0
- package/src/templates/next-experiments/package.json +6 -6
- package/src/templates/next-experiments/svg.d.ts +1 -0
- package/src/templates/next-pagebuilder/.vscode/extensions.json +16 -0
- package/src/templates/next-pagebuilder/.vscode/settings.json +105 -0
- package/src/templates/next-pagebuilder/.zed/settings.json +47 -0
- package/src/templates/next-pagebuilder/_gitignore +1 -3
- package/src/templates/next-pagebuilder/app/(content)/[[...slug]]/page.tsx +17 -8
- package/src/templates/next-pagebuilder/app/(content)/layout.tsx +18 -7
- package/src/templates/next-pagebuilder/app/actions/refresh.ts +5 -0
- package/src/templates/next-pagebuilder/app/robots.ts +3 -4
- package/src/templates/next-pagebuilder/biome.json +17 -0
- package/src/templates/next-pagebuilder/components/layout/footer/index.tsx +17 -22
- package/src/templates/next-pagebuilder/components/layout/header/index.tsx +3 -5
- package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +11 -10
- package/src/templates/next-pagebuilder/components/layout/wrapper/index.tsx +14 -4
- package/src/templates/next-pagebuilder/components/page-builder/components/article-content/index.tsx +4 -9
- package/src/templates/next-pagebuilder/components/page-builder/components/article-content/related-post-item.tsx +4 -4
- package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/content-card.tsx +2 -2
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-filters.tsx +93 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/content-grid.tsx +7 -9
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-pagination-nav.tsx +71 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/index.tsx +219 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/types.ts +7 -4
- package/src/templates/next-pagebuilder/components/page-builder/renderer.tsx +17 -5
- package/src/templates/next-pagebuilder/components/page-builder/types.ts +9 -7
- package/src/templates/next-pagebuilder/components/page-document/index.tsx +19 -4
- package/src/templates/next-pagebuilder/lefthook.yml +25 -0
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.types.ts +208 -0
- package/src/templates/next-pagebuilder/lib/styles/global.css +0 -1
- package/src/templates/next-pagebuilder/next.config.ts +1 -0
- package/src/templates/next-pagebuilder/package.json +13 -26
- package/src/templates/next-pagebuilder/postcss.config.mjs +27 -1
- package/src/templates/next-pagebuilder/svg.d.ts +1 -0
- package/src/templates/next-webgl/.env.example +3 -3
- package/src/templates/next-webgl/.vscode/extensions.json +1 -5
- package/src/templates/next-webgl/.vscode/settings.json +1 -1
- package/src/templates/next-webgl/.zed/settings.json +47 -0
- package/src/templates/next-webgl/README.md +7 -6
- package/src/templates/next-webgl/_gitignore +1 -3
- package/src/templates/next-webgl/app/layout.tsx +21 -35
- package/src/templates/next-webgl/app/robots.ts +3 -4
- package/src/templates/next-webgl/app/sitemap.xml/route.ts +29 -29
- package/src/templates/next-webgl/biome.json +9 -2
- package/src/templates/next-webgl/components/ui/image/index.tsx +2 -1
- package/src/templates/next-webgl/components/webgl/components/scene/index.tsx +0 -2
- package/src/templates/next-webgl/lefthook.yml +25 -0
- package/src/templates/next-webgl/lib/README.md +8 -4
- package/src/templates/next-webgl/lib/hooks/use-media.ts +6 -3
- package/src/templates/next-webgl/lib/scripts/dev.ts +32 -0
- package/src/templates/next-webgl/lib/styles/README.md +13 -0
- package/src/templates/next-webgl/lib/styles/fonts.ts +20 -0
- package/src/templates/next-webgl/lib/styles/global.css +16 -196
- package/src/templates/next-webgl/lib/styles/index.css +3 -0
- package/src/templates/next-webgl/lib/styles/tokens.css +182 -0
- package/src/templates/next-webgl/lib/utils/README.md +40 -0
- package/src/templates/next-webgl/lib/utils/easings.ts +240 -0
- package/src/templates/next-webgl/lib/utils/fetch.ts +84 -0
- package/src/templates/next-webgl/lib/utils/global-css.d.ts +1 -0
- package/src/templates/next-webgl/lib/utils/json-ld.tsx +70 -68
- package/src/templates/next-webgl/lib/utils/math.ts +236 -0
- package/src/templates/next-webgl/lib/utils/metadata.ts +26 -27
- package/src/templates/next-webgl/lib/utils/strings.ts +246 -0
- package/src/templates/next-webgl/lib/utils/types.d.ts +15 -0
- package/src/templates/next-webgl/lib/utils/url.ts +8 -5
- package/src/templates/next-webgl/lib/utils/viewport.ts +199 -0
- package/src/templates/next-webgl/package.json +13 -8
- package/src/templates/next-webgl/svg.d.ts +1 -0
- package/src/templates/next-webgl/tsconfig.tsbuildinfo +1 -1
- package/dist/configs/animations.d.ts.map +0 -1
- package/dist/configs/animations.js.map +0 -1
- package/dist/configs/skills.d.ts +0 -27
- package/dist/configs/skills.d.ts.map +0 -1
- package/dist/configs/skills.js +0 -18
- package/dist/configs/skills.js.map +0 -1
- package/dist/configs/skills.json +0 -26
- package/dist/helpers/add/hooks-config.d.ts +0 -22
- package/dist/helpers/add/hooks-config.d.ts.map +0 -1
- package/dist/helpers/add/hooks-config.js +0 -31
- package/dist/helpers/add/hooks-config.js.map +0 -1
- package/dist/helpers/add/index.d.ts.map +0 -1
- package/dist/helpers/add/index.js.map +0 -1
- package/dist/helpers/create/copy-template.d.ts +0 -11
- package/dist/helpers/create/copy-template.d.ts.map +0 -1
- package/dist/helpers/create/copy-template.js.map +0 -1
- package/dist/helpers/create/index.d.ts +0 -24
- package/dist/helpers/create/index.d.ts.map +0 -1
- package/dist/helpers/create/index.js +0 -99
- package/dist/helpers/create/index.js.map +0 -1
- package/dist/helpers/create/init-git.d.ts.map +0 -1
- package/dist/helpers/create/init-git.js.map +0 -1
- package/dist/helpers/create/install.d.ts.map +0 -1
- package/dist/helpers/create/install.js.map +0 -1
- package/dist/helpers/create/rename-files.d.ts.map +0 -1
- package/dist/helpers/create/rename-files.js.map +0 -1
- package/dist/helpers/create/setup-agent.d.ts.map +0 -1
- package/dist/helpers/create/setup-agent.js +0 -91
- package/dist/helpers/create/setup-agent.js.map +0 -1
- package/dist/helpers/create/setup-sanity.d.ts.map +0 -1
- package/dist/helpers/create/setup-sanity.js.map +0 -1
- package/dist/helpers/create/update-package.d.ts +0 -20
- package/dist/helpers/create/update-package.d.ts.map +0 -1
- package/dist/helpers/create/update-package.js +0 -97
- package/dist/helpers/create/update-package.js.map +0 -1
- package/dist/helpers/integrate/index.d.ts.map +0 -1
- package/dist/helpers/integrate/index.js.map +0 -1
- package/dist/helpers/integrate/merge-config.d.ts +0 -21
- package/dist/helpers/integrate/merge-config.d.ts.map +0 -1
- package/dist/helpers/integrate/merge-config.js +0 -42
- package/dist/helpers/integrate/merge-config.js.map +0 -1
- package/dist/helpers/integrate/merge-orchestrator.d.ts +0 -10
- package/dist/helpers/integrate/merge-orchestrator.d.ts.map +0 -1
- package/dist/helpers/integrate/merge-orchestrator.js.map +0 -1
- package/dist/helpers/integrate/sanity/config.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/config.js.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/check-integration-merger.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/check-integration-merger.js.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/layout-merger.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/layout-merger.js.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.d.ts +0 -11
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.js +0 -133
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.js.map +0 -1
- package/dist/helpers/skills/index.d.ts.map +0 -1
- package/dist/helpers/skills/index.js.map +0 -1
- package/dist/utils/detect-project.d.ts.map +0 -1
- package/dist/utils/detect-project.js.map +0 -1
- package/dist/utils/format-results.d.ts.map +0 -1
- package/dist/utils/format-results.js.map +0 -1
- package/src/helpers/integrate/sanity/files/lib/integrations/sanity/WEBHOOK-SETUP.md +0 -74
- package/src/helpers/integrate/sanity/files/lib/integrations/sanity/sitemap.ts +0 -90
- package/src/template-hooks/config.js +0 -32
- package/src/templates/next-default/css.d.ts +0 -1
- package/src/templates/next-default/lib/utils/portable-text-to-markdown.ts +0 -83
- package/src/templates/next-default/tsconfig.tsbuildinfo +0 -1
- package/src/templates/next-experiments/css.d.ts +0 -1
- package/src/templates/next-experiments/lib/utils/portable-text-to-markdown.ts +0 -83
- package/src/templates/next-pagebuilder/app/api/[[...slug]]/route.ts +0 -100
- package/src/templates/next-pagebuilder/app/api/draft-mode/disable/route.ts +0 -7
- package/src/templates/next-pagebuilder/app/api/draft-mode/enable/route.ts +0 -20
- package/src/templates/next-pagebuilder/app/api/revalidate/route.ts +0 -121
- package/src/templates/next-pagebuilder/app/sitemap.md/route.ts +0 -124
- package/src/templates/next-pagebuilder/app/studio/[[...tool]]/page.tsx +0 -8
- package/src/templates/next-pagebuilder/components/page-builder/components/post-collection/index.tsx +0 -28
- package/src/templates/next-pagebuilder/components/sanity/draft-mode-toggle.tsx +0 -27
- package/src/templates/next-pagebuilder/components/sanity/rich-text.tsx +0 -87
- package/src/templates/next-pagebuilder/components/sanity/visual-editing.tsx +0 -27
- package/src/templates/next-pagebuilder/components/ui/sanity-image/index.tsx +0 -41
- package/src/templates/next-pagebuilder/lib/integrations/check-integration.ts +0 -5
- package/src/templates/next-pagebuilder/lib/integrations/sanity/client.ts +0 -27
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/disable-draft-mode.tsx +0 -23
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/page-builder-input.tsx +0 -36
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/page-category-input.tsx +0 -50
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/rich-text.tsx +0 -84
- package/src/templates/next-pagebuilder/lib/integrations/sanity/confirm-publish-action.ts +0 -40
- package/src/templates/next-pagebuilder/lib/integrations/sanity/env.ts +0 -34
- package/src/templates/next-pagebuilder/lib/integrations/sanity/fetchers/layout.ts +0 -35
- package/src/templates/next-pagebuilder/lib/integrations/sanity/icons.ts +0 -58
- package/src/templates/next-pagebuilder/lib/integrations/sanity/live/index.tsx +0 -61
- package/src/templates/next-pagebuilder/lib/integrations/sanity/markdown-proxy.config.ts +0 -50
- package/src/templates/next-pagebuilder/lib/integrations/sanity/page-builder-config.ts +0 -132
- package/src/templates/next-pagebuilder/lib/integrations/sanity/page-category.ts +0 -28
- package/src/templates/next-pagebuilder/lib/integrations/sanity/queries.ts +0 -281
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.cli.ts +0 -29
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.config.ts +0 -211
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/index.ts +0 -4
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/blog-content.ts +0 -89
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/description.ts +0 -29
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/hero.ts +0 -28
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/singleton/content-collection.ts +0 -45
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/content/author.ts +0 -70
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/content/blog-category.ts +0 -55
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/index.ts +0 -96
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/company-data.ts +0 -62
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/footer.ts +0 -79
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/navbar.ts +0 -74
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/link.ts +0 -125
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/logo-field.ts +0 -9
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/metadata.ts +0 -68
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/nav-objects.ts +0 -192
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page-builder.ts +0 -39
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page-folder.ts +0 -124
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page.ts +0 -232
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/richText.ts +0 -63
- package/src/templates/next-pagebuilder/lib/integrations/sanity/singletons.ts +0 -44
- package/src/templates/next-pagebuilder/lib/integrations/sanity/structure.ts +0 -453
- package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/image.ts +0 -8
- package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/link.ts +0 -137
- package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/page-builder-markdown.ts +0 -81
- package/src/templates/next-pagebuilder/lib/scripts/sanity-typegen.ts +0 -45
- package/src/templates/next-pagebuilder/lib/utils/json-ld.tsx +0 -213
- package/src/templates/next-pagebuilder/lib/utils/metadata.ts +0 -167
- package/src/templates/next-pagebuilder/lib/utils/sitemap.ts +0 -37
- package/src/templates/next-pagebuilder/proxy.ts +0 -81
- package/src/templates/next-webgl/css.d.ts +0 -1
- package/src/templates/next-webgl/lib/utils/portable-text-to-markdown.ts +0 -83
- package/dist/{helpers → infrastructure}/create/copy-template.js +0 -0
- package/dist/{helpers → infrastructure}/create/rename-files.d.ts +0 -0
- package/dist/{helpers → infrastructure}/create/rename-files.js +0 -0
- package/dist/{helpers → infrastructure}/create/setup-sanity.d.ts +0 -0
- package/dist/{helpers/integrate → modules/features/cms}/sanity/config.d.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/draft-mode/disable/route.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/draft-mode/enable/route.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/studio/[[...tool]]/page.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/studio/layout.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/components/ui/sanity-image/index.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/README.md +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/check-integration.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/MARKDOWN-PROXY.md +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/README.md +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/client.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/components/disable-draft-mode.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/components/rich-text.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/confirm-publish-action.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/live/index.tsx +1 -1
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/markdown-proxy.config.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.cli.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.config.ts +1 -1
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.types.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schema.json +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/article.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/example.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/link.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/metadata.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/navigation.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/richText.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/structure.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/utils/image.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/utils/link.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/portable-text-to-markdown.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-selection.js","sourceRoot":"","sources":["../../../src/application/create-project/resolve-selection.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAe,MAAM,uBAAuB,CAAC;AAWzE,MAAM,UAAU,gCAAgC,CAAC,EAChD,QAAQ,EACR,GAAG,EACH,SAAS,EACT,MAAM,EACN,KAAK,GACoC;IACzC,OAAO;QACN,QAAQ;QACR,GAAG;QACH,SAAS;QACT,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC5B,KAAK,EAAE,mBAAmB,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;KAC/C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/application/install-skills/index.ts"],"names":[],"mappings":"AAqDA;;;;;;;GAOG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CA2FnD"}
|
|
@@ -2,7 +2,8 @@ import { execSync } from "node:child_process";
|
|
|
2
2
|
import ora from "ora";
|
|
3
3
|
import pc from "picocolors";
|
|
4
4
|
import prompts from "prompts";
|
|
5
|
-
import {
|
|
5
|
+
import { AGENT_CATALOG } from "../../domain/agents.js";
|
|
6
|
+
import { BASE_SKILL_IDS, buildSkillInstallCommand, getSkillInstallDefinition, SKILLS, } from "../../domain/skills.js";
|
|
6
7
|
// ---------------------------------------------------------------------------
|
|
7
8
|
// Helpers
|
|
8
9
|
// ---------------------------------------------------------------------------
|
|
@@ -22,10 +23,10 @@ function detectInstalledSkills() {
|
|
|
22
23
|
const trimmed = line.trim();
|
|
23
24
|
if (!trimmed)
|
|
24
25
|
continue;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (trimmed.includes(
|
|
28
|
-
installed.add(
|
|
26
|
+
for (const skillId of BASE_SKILL_IDS) {
|
|
27
|
+
const install = getSkillInstallDefinition(skillId);
|
|
28
|
+
if (install.detectNames.some((name) => trimmed.includes(name))) {
|
|
29
|
+
installed.add(skillId);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -36,28 +37,11 @@ function detectInstalledSkills() {
|
|
|
36
37
|
return new Set();
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Group an array of skill definitions by their `source` repository so we
|
|
41
|
-
* can batch-install skills from the same source in a single CLI call.
|
|
42
|
-
*/
|
|
43
|
-
function groupBySource(skills) {
|
|
44
|
-
const groups = new Map();
|
|
45
|
-
for (const skill of skills) {
|
|
46
|
-
const existing = groups.get(skill.source);
|
|
47
|
-
if (existing) {
|
|
48
|
-
existing.push(skill);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
groups.set(skill.source, [skill]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return groups;
|
|
55
|
-
}
|
|
56
40
|
// ---------------------------------------------------------------------------
|
|
57
41
|
// Main
|
|
58
42
|
// ---------------------------------------------------------------------------
|
|
59
43
|
/**
|
|
60
|
-
* Interactive flow to install the
|
|
44
|
+
* Interactive flow to install the basement base skills pack globally.
|
|
61
45
|
*
|
|
62
46
|
* 1. Detects which skills are already installed.
|
|
63
47
|
* 2. Shows a status overview (installed vs missing).
|
|
@@ -70,8 +54,8 @@ export async function installSkills() {
|
|
|
70
54
|
spinner.start("Detecting installed skills...");
|
|
71
55
|
const installed = detectInstalledSkills();
|
|
72
56
|
spinner.stop();
|
|
73
|
-
// 2. Diff against the
|
|
74
|
-
const missing =
|
|
57
|
+
// 2. Diff against the base skills pack
|
|
58
|
+
const missing = BASE_SKILL_IDS.filter((skillId) => !installed.has(skillId));
|
|
75
59
|
// 3. Early exit when everything is already present
|
|
76
60
|
if (missing.length === 0) {
|
|
77
61
|
console.log(`\n ${pc.green("All basement skills are already installed.")} Nothing to do.\n`);
|
|
@@ -79,8 +63,9 @@ export async function installSkills() {
|
|
|
79
63
|
}
|
|
80
64
|
// 4. Show status for each skill
|
|
81
65
|
console.log(`\n ${pc.bold("Basement Skills Pack")}\n`);
|
|
82
|
-
for (const
|
|
83
|
-
const
|
|
66
|
+
for (const skillId of BASE_SKILL_IDS) {
|
|
67
|
+
const skill = SKILLS[skillId];
|
|
68
|
+
const isInstalled = installed.has(skillId);
|
|
84
69
|
const icon = isInstalled ? pc.green(" [ok]") : pc.dim(" [ - ]");
|
|
85
70
|
const name = isInstalled ? pc.dim(skill.name) : skill.name;
|
|
86
71
|
const desc = pc.dim(` - ${skill.description}`);
|
|
@@ -92,9 +77,9 @@ export async function installSkills() {
|
|
|
92
77
|
type: "multiselect",
|
|
93
78
|
name: "agents",
|
|
94
79
|
message: "Which agents should receive these skills?",
|
|
95
|
-
choices:
|
|
96
|
-
title:
|
|
97
|
-
value:
|
|
80
|
+
choices: AGENT_CATALOG.map((agent) => ({
|
|
81
|
+
title: agent.label,
|
|
82
|
+
value: agent.cliArg,
|
|
98
83
|
})),
|
|
99
84
|
min: 1,
|
|
100
85
|
hint: "Space to select, Enter to confirm",
|
|
@@ -103,24 +88,26 @@ export async function installSkills() {
|
|
|
103
88
|
console.log(pc.yellow("\n No agents selected. Operation cancelled.\n"));
|
|
104
89
|
return;
|
|
105
90
|
}
|
|
106
|
-
// 6. Install missing skills
|
|
107
|
-
const groups = groupBySource(missing);
|
|
108
|
-
const agentFlags = agents.map((a) => `-a ${a}`).join(" ");
|
|
91
|
+
// 6. Install missing skills
|
|
109
92
|
let allSucceeded = true;
|
|
110
|
-
for (const
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
const label = skills.map((s) => s.name).join(", ");
|
|
114
|
-
spinner.start(`Installing from ${pc.cyan(source)}: ${label}`);
|
|
93
|
+
for (const skillId of missing) {
|
|
94
|
+
const skill = SKILLS[skillId];
|
|
95
|
+
spinner.start(`Installing ${skill.name}`);
|
|
115
96
|
try {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
97
|
+
for (const agentArg of agents) {
|
|
98
|
+
const command = buildSkillInstallCommand(skillId, {
|
|
99
|
+
agentArg,
|
|
100
|
+
global: true,
|
|
101
|
+
});
|
|
102
|
+
execSync(command, {
|
|
103
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
104
|
+
timeout: 60_000,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
spinner.succeed(`Installed ${skill.name}`);
|
|
121
108
|
}
|
|
122
109
|
catch {
|
|
123
|
-
spinner.fail(`Failed to install
|
|
110
|
+
spinner.fail(`Failed to install ${skill.name}`);
|
|
124
111
|
allSucceeded = false;
|
|
125
112
|
}
|
|
126
113
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/application/install-skills/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,MAAM,GACN,MAAM,wBAAwB,CAAC;AAEhC,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;;GAIG;AACH,SAAS,qBAAqB;IAC7B,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,QAAQ,CAAC,qBAAqB,EAAE;YAC9C,KAAK,EA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GAAG,KAAK,CAAC;QACtB,CAAC;IACF,CAAC;IAED,YAAY;IACZ,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,IAAI,YAAY,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,CACV,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,mCAAmC,CAClE,CAAC;IACH,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,GAAG,CACV,KAAK,EAAE,CAAC,MAAM,CAAC,gCAAgC,CAAC,qBAAqB,CACrE,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CmsId } from "../../domain/cms.js";
|
|
1
2
|
interface PackageJson {
|
|
2
3
|
name?: string;
|
|
3
4
|
dependencies?: Record<string, string>;
|
|
@@ -17,24 +18,16 @@ export type ProjectValidation = ProjectValidationSuccess | ProjectValidationFail
|
|
|
17
18
|
/**
|
|
18
19
|
* Validate that the given directory is a Next.js App Router project.
|
|
19
20
|
*
|
|
20
|
-
* Checks for package.json, Next.js dependency, and
|
|
21
|
-
*
|
|
21
|
+
* Checks for package.json, a Next.js dependency, and either `app/` or
|
|
22
|
+
* `src/app/` so callers can safely narrow on `valid` before mutating files.
|
|
22
23
|
*/
|
|
23
24
|
export declare function validateNextProject(targetDir: string): Promise<ProjectValidation>;
|
|
24
25
|
/**
|
|
25
|
-
* Check whether
|
|
26
|
-
*
|
|
27
|
-
* Looks for the integration's conventional directory (e.g.
|
|
28
|
-
* `lib/integrations/sanity`) under the project root, respecting `src/`
|
|
29
|
-
* prefix when applicable.
|
|
30
|
-
*/
|
|
31
|
-
export declare function checkExistingIntegration(targetDir: string, integration: string, usesSrcPrefix: boolean): Promise<boolean>;
|
|
32
|
-
/**
|
|
33
|
-
* Detect whether the target project places source files under a `src/`
|
|
34
|
-
* directory (i.e. `src/app/` exists).
|
|
35
|
-
*
|
|
36
|
-
* Returns `"src/"` when the prefix is detected, or `""` otherwise.
|
|
26
|
+
* Check whether an integration is already installed in the target project.
|
|
27
|
+
* Respects the project's `src/` layout when resolving the conventional path.
|
|
37
28
|
*/
|
|
29
|
+
export declare function checkExistingIntegration(targetDir: string, integration: CmsId, usesSrcPrefix: boolean): Promise<boolean>;
|
|
30
|
+
/** Return `"src/"` when the project uses `src/app`, otherwise `""`. */
|
|
38
31
|
export declare function detectSrcPrefix(targetDir: string): Promise<string>;
|
|
39
32
|
export {};
|
|
40
|
-
//# sourceMappingURL=
|
|
33
|
+
//# sourceMappingURL=project-detection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-detection.d.ts","sourceRoot":"","sources":["../../../src/application/shared/project-detection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEtD,UAAU,WAAW;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACxC,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,WAAW,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACxC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,iBAAiB,GAC1B,wBAAwB,GACxB,wBAAwB,CAAC;AAE5B;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,CAAC,CAoC5B;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC7C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,OAAO,GACpB,OAAO,CAAC,OAAO,CAAC,CAKlB;AAED,uEAAuE;AACvE,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import fs from "fs-extra";
|
|
3
|
+
import { CMS } from "../../domain/cms.js";
|
|
3
4
|
/**
|
|
4
5
|
* Validate that the given directory is a Next.js App Router project.
|
|
5
6
|
*
|
|
6
|
-
* Checks for package.json, Next.js dependency, and
|
|
7
|
-
*
|
|
7
|
+
* Checks for package.json, a Next.js dependency, and either `app/` or
|
|
8
|
+
* `src/app/` so callers can safely narrow on `valid` before mutating files.
|
|
8
9
|
*/
|
|
9
10
|
export async function validateNextProject(targetDir) {
|
|
10
11
|
const packageJsonPath = path.join(targetDir, "package.json");
|
|
@@ -35,35 +36,18 @@ export async function validateNextProject(targetDir) {
|
|
|
35
36
|
return { valid: true, pkg, usesSrcPrefix };
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
const INTEGRATION_PATHS = {
|
|
41
|
-
sanity: "lib/integrations/sanity",
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Check whether a given integration is already installed in the project.
|
|
45
|
-
*
|
|
46
|
-
* Looks for the integration's conventional directory (e.g.
|
|
47
|
-
* `lib/integrations/sanity`) under the project root, respecting `src/`
|
|
48
|
-
* prefix when applicable.
|
|
39
|
+
* Check whether an integration is already installed in the target project.
|
|
40
|
+
* Respects the project's `src/` layout when resolving the conventional path.
|
|
49
41
|
*/
|
|
50
42
|
export async function checkExistingIntegration(targetDir, integration, usesSrcPrefix) {
|
|
51
|
-
const basePath =
|
|
52
|
-
if (!basePath) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
43
|
+
const basePath = CMS[integration].integrationPath;
|
|
55
44
|
const prefix = usesSrcPrefix ? "src/" : "";
|
|
56
45
|
const integrationPath = path.join(targetDir, prefix + basePath);
|
|
57
46
|
return fs.existsSync(integrationPath);
|
|
58
47
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Detect whether the target project places source files under a `src/`
|
|
61
|
-
* directory (i.e. `src/app/` exists).
|
|
62
|
-
*
|
|
63
|
-
* Returns `"src/"` when the prefix is detected, or `""` otherwise.
|
|
64
|
-
*/
|
|
48
|
+
/** Return `"src/"` when the project uses `src/app`, otherwise `""`. */
|
|
65
49
|
export async function detectSrcPrefix(targetDir) {
|
|
66
50
|
const srcAppExists = await fs.pathExists(path.join(targetDir, "src/app"));
|
|
67
51
|
return srcAppExists ? "src/" : "";
|
|
68
52
|
}
|
|
69
|
-
//# sourceMappingURL=
|
|
53
|
+
//# sourceMappingURL=project-detection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-detection.js","sourceRoot":"","sources":["../../../src/application/shared/project-detection.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAc,MAAM,qBAAqB,CAAC;AAwBtD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,SAAiB;IAEjB,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAE7D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACrC,OAAO;YACN,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,4CAA4C;SACnD,CAAC;IACH,CAAC;IAED,MAAM,GAAG,GAAgB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAgB,CAAC;IAE7E,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,IAAI,IAAI,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC;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,CAAC;IAC1E,OAAO,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CreateRegistry } from "./registry.js";
|
|
2
|
+
import type { CreateContext, CreatePlan, RegistrySelection } from "./types.js";
|
|
3
|
+
export declare function buildCreatePlan({ selection, context, registry, }: {
|
|
4
|
+
selection: RegistrySelection;
|
|
5
|
+
context: CreateContext;
|
|
6
|
+
registry: CreateRegistry;
|
|
7
|
+
}): CreatePlan;
|
|
8
|
+
//# sourceMappingURL=build-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-plan.d.ts","sourceRoot":"","sources":["../../../src/core/create/build-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAEX,aAAa,EACb,UAAU,EAIV,iBAAiB,EACjB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,eAAe,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,QAAQ,GACR,EAAE;IACF,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;CACzB,GAAG,UAAU,CA0Cb"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { getFeatureModules, getPresetModule, } from "./registry.js";
|
|
2
|
+
export function buildCreatePlan({ selection, context, registry, }) {
|
|
3
|
+
const preset = getPresetModule(registry, selection.presetId);
|
|
4
|
+
const featureIds = resolveFeatureIds(selection.featureIds, preset.defaultFeatures ?? []);
|
|
5
|
+
validateAllowedFeatures(featureIds, preset.allowedFeatures);
|
|
6
|
+
const features = getFeatureModules(registry, featureIds);
|
|
7
|
+
validateFeatureGraph(features);
|
|
8
|
+
const contributions = [];
|
|
9
|
+
if (preset.contribute) {
|
|
10
|
+
contributions.push(preset.contribute(context));
|
|
11
|
+
}
|
|
12
|
+
for (const feature of features) {
|
|
13
|
+
contributions.push(feature.contribute(context));
|
|
14
|
+
}
|
|
15
|
+
return contributions.reduce((plan, contribution) => mergeContribution(plan, contribution), {
|
|
16
|
+
preset,
|
|
17
|
+
features,
|
|
18
|
+
template: preset.template,
|
|
19
|
+
packageJson: {
|
|
20
|
+
dependencies: {},
|
|
21
|
+
devDependencies: {},
|
|
22
|
+
scripts: {},
|
|
23
|
+
},
|
|
24
|
+
copyPaths: [],
|
|
25
|
+
mergePaths: [],
|
|
26
|
+
env: [],
|
|
27
|
+
lifecycle: {
|
|
28
|
+
preInstall: [],
|
|
29
|
+
postInstall: [],
|
|
30
|
+
finalize: [],
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function resolveFeatureIds(selectedFeatureIds, defaultFeatureIds) {
|
|
35
|
+
return [...new Set([...defaultFeatureIds, ...selectedFeatureIds])];
|
|
36
|
+
}
|
|
37
|
+
function validateAllowedFeatures(featureIds, allowedFeatureIds) {
|
|
38
|
+
if (!allowedFeatureIds)
|
|
39
|
+
return;
|
|
40
|
+
for (const featureId of featureIds) {
|
|
41
|
+
if (!allowedFeatureIds.includes(featureId)) {
|
|
42
|
+
throw new Error(`Feature ${featureId} is not allowed by the selected preset`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function validateFeatureGraph(features) {
|
|
47
|
+
const featureIds = new Set(features.map((feature) => feature.id));
|
|
48
|
+
for (const feature of features) {
|
|
49
|
+
for (const requiredId of feature.requires ?? []) {
|
|
50
|
+
if (!featureIds.has(requiredId)) {
|
|
51
|
+
throw new Error(`Feature ${feature.id} requires ${requiredId}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
for (const conflictId of feature.conflictsWith ?? []) {
|
|
55
|
+
if (featureIds.has(conflictId)) {
|
|
56
|
+
throw new Error(`Feature ${feature.id} conflicts with ${conflictId}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function mergeContribution(plan, contribution) {
|
|
62
|
+
mergeRecord(plan.packageJson.dependencies, contribution.packageJson?.dependencies);
|
|
63
|
+
mergeRecord(plan.packageJson.devDependencies, contribution.packageJson?.devDependencies);
|
|
64
|
+
mergeRecord(plan.packageJson.scripts, contribution.packageJson?.scripts);
|
|
65
|
+
if (contribution.copyPaths) {
|
|
66
|
+
plan.copyPaths.push(...contribution.copyPaths);
|
|
67
|
+
}
|
|
68
|
+
if (contribution.mergePaths) {
|
|
69
|
+
plan.mergePaths.push(...contribution.mergePaths);
|
|
70
|
+
}
|
|
71
|
+
if (contribution.env) {
|
|
72
|
+
plan.env.push(...contribution.env);
|
|
73
|
+
}
|
|
74
|
+
appendLifecycleSteps(plan.lifecycle.preInstall, contribution.lifecycle?.preInstall);
|
|
75
|
+
appendLifecycleSteps(plan.lifecycle.postInstall, contribution.lifecycle?.postInstall);
|
|
76
|
+
appendLifecycleSteps(plan.lifecycle.finalize, contribution.lifecycle?.finalize);
|
|
77
|
+
return plan;
|
|
78
|
+
}
|
|
79
|
+
function mergeRecord(target, source) {
|
|
80
|
+
if (!source)
|
|
81
|
+
return;
|
|
82
|
+
Object.assign(target, source);
|
|
83
|
+
}
|
|
84
|
+
function appendLifecycleSteps(target, steps) {
|
|
85
|
+
if (!steps)
|
|
86
|
+
return;
|
|
87
|
+
target.push(...steps);
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=build-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-plan.js","sourceRoot":"","sources":["../../../src/core/create/build-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,eAAe,GACf,MAAM,eAAe,CAAC;AAWvB,MAAM,UAAU,eAAe,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,QAAQ,GAKR;IACA,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,EAAE,SAA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emplateId } from "../../domain/templates.js";
|
|
2
|
+
import type { CreateContext, CreatePlan, LifecycleStage, LifecycleStep, MergeOperation } from "./types.js";
|
|
3
|
+
export interface CreatePlanExecutor {
|
|
4
|
+
copyTemplate: (template: TemplateId, targetDir: string) => Promise<void>;
|
|
5
|
+
renameSpecialFiles: (targetDir: string) => Promise<void>;
|
|
6
|
+
applyPackageJson: (plan: CreatePlan, context: CreateContext) => Promise<void>;
|
|
7
|
+
applyCopyPaths: (plan: CreatePlan, context: CreateContext) => Promise<void>;
|
|
8
|
+
applyMergePaths: (mergePaths: MergeOperation[], context: CreateContext) => Promise<void>;
|
|
9
|
+
runLifecycleSteps: (stage: LifecycleStage, steps: LifecycleStep[], context: CreateContext) => Promise<string[]>;
|
|
10
|
+
installDependencies: (targetDir: string) => Promise<void>;
|
|
11
|
+
initGitRepo: (targetDir: string) => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export interface ExecuteCreatePlanResult {
|
|
14
|
+
completedLifecycleStepIds: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Run the scaffold plan in the same order the generated project expects:
|
|
18
|
+
* template first, then package/files, then git initialization (required before
|
|
19
|
+
* install so that prepare scripts like `lefthook install` find a repo), then
|
|
20
|
+
* lifecycle hooks around dependency installation.
|
|
21
|
+
*/
|
|
22
|
+
export declare function executeCreatePlan(plan: CreatePlan, context: CreateContext, executor: CreatePlanExecutor): Promise<ExecuteCreatePlanResult>;
|
|
23
|
+
//# sourceMappingURL=execute-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-plan.d.ts","sourceRoot":"","sources":["../../../src/core/create/execute-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EACX,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,gBAAgB,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,cAAc,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,eAAe,EAAE,CAChB,UAAU,EAAE,cAAc,EAAE,EAC5B,OAAO,EAAE,aAAa,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,iBAAiB,EAAE,CAClB,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,aAAa,EAAE,EACtB,OAAO,EAAE,aAAa,KAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACvB,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,uBAAuB;IACvC,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACpC;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACtC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,kBAAkB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,CAmClC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run the scaffold plan in the same order the generated project expects:
|
|
3
|
+
* template first, then package/files, then git initialization (required before
|
|
4
|
+
* install so that prepare scripts like `lefthook install` find a repo), then
|
|
5
|
+
* lifecycle hooks around dependency installation.
|
|
6
|
+
*/
|
|
7
|
+
export async function executeCreatePlan(plan, context, executor) {
|
|
8
|
+
const completedLifecycleStepIds = [];
|
|
9
|
+
await executor.copyTemplate(plan.template, context.targetDir);
|
|
10
|
+
await executor.renameSpecialFiles(context.targetDir);
|
|
11
|
+
await executor.applyPackageJson(plan, context);
|
|
12
|
+
await executor.applyCopyPaths(plan, context);
|
|
13
|
+
await executor.applyMergePaths(plan.mergePaths, context);
|
|
14
|
+
completedLifecycleStepIds.push(...(await executor.runLifecycleSteps("preInstall", plan.lifecycle.preInstall, context)));
|
|
15
|
+
await executor.initGitRepo(context.targetDir);
|
|
16
|
+
await executor.installDependencies(context.targetDir);
|
|
17
|
+
completedLifecycleStepIds.push(...(await executor.runLifecycleSteps("postInstall", plan.lifecycle.postInstall, context)));
|
|
18
|
+
completedLifecycleStepIds.push(...(await executor.runLifecycleSteps("finalize", plan.lifecycle.finalize, context)));
|
|
19
|
+
return {
|
|
20
|
+
completedLifecycleStepIds,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=execute-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-plan.js","sourceRoot":"","sources":["../../../src/core/create/execute-plan.ts"],"names":[],"mappings":"AA+BA;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,IAAgB,EAChB,OAAsB,EACtB,QAA4B;IAE5B,MAAM,yBAAyB,GAAa,EAAE,CAAC;IAE/C,MAAM,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC9D,MAAM,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACrD,MAAM,QAAQ,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/C,MAAM,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,yBAAyB,CAAC,IAAI,CAC7B,GAAG,CAAC,MAAM,QAAQ,CAAC,iBAAiB,CACnC,YAAY,EACZ,IAAI,CAAC,SAAS,CAAC,UAAU,EACzB,OAAO,CACP,CAAC,CACF,CAAC;IACF,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtD,yBAAyB,CAAC,IAAI,CAC7B,GAAG,CAAC,MAAM,QAAQ,CAAC,iBAAiB,CACnC,aAAa,EACb,IAAI,CAAC,SAAS,CAAC,WAAW,EAC1B,OAAO,CACP,CAAC,CACF,CAAC;IACF,yBAAyB,CAAC,IAAI,CAC7B,GAAG,CAAC,MAAM,QAAQ,CAAC,iBAAiB,CACnC,UAAU,EACV,IAAI,CAAC,SAAS,CAAC,QAAQ,EACvB,OAAO,CACP,CAAC,CACF,CAAC;IAEF,OAAO;QACN,yBAAyB;KACzB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AgentId } from "../../domain/agents.js";
|
|
2
|
+
import type { AnimationId } from "../../domain/animations.js";
|
|
3
|
+
import type { CmsId } from "../../domain/cms.js";
|
|
4
|
+
import type { HookId } from "../../domain/hooks.js";
|
|
5
|
+
import type { TemplateId } from "../../domain/templates.js";
|
|
6
|
+
export declare const CREATE_LIFECYCLE_STEP_IDS: {
|
|
7
|
+
readonly agentSetup: "agent:setup";
|
|
8
|
+
readonly sanitySetupProject: "sanity:setup-project";
|
|
9
|
+
};
|
|
10
|
+
export type CreateLifecycleStepId = (typeof CREATE_LIFECYCLE_STEP_IDS)[keyof typeof CREATE_LIFECYCLE_STEP_IDS];
|
|
11
|
+
export declare const CREATE_MERGER_IDS: {
|
|
12
|
+
readonly sanityLayout: "sanity:layout";
|
|
13
|
+
readonly sanitySitemap: "sanity:sitemap";
|
|
14
|
+
readonly sanityCheckIntegration: "sanity:check-integration";
|
|
15
|
+
};
|
|
16
|
+
export type CreateMergerId = (typeof CREATE_MERGER_IDS)[keyof typeof CREATE_MERGER_IDS];
|
|
17
|
+
export declare const PRESET_MODULE_IDS: Record<TemplateId, string>;
|
|
18
|
+
export declare const CMS_FEATURE_MODULE_IDS: Record<CmsId, string>;
|
|
19
|
+
export declare const SANITY_PAGEBUILDER_FEATURE_MODULE_ID = "feature:cms-sanity-pagebuilder";
|
|
20
|
+
export declare const ANIMATION_FEATURE_MODULE_IDS: Record<AnimationId, string>;
|
|
21
|
+
export declare const AGENT_FEATURE_MODULE_IDS: Record<AgentId, string>;
|
|
22
|
+
export declare const HOOK_FEATURE_MODULE_IDS: Record<HookId, string>;
|
|
23
|
+
//# sourceMappingURL=internal-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-ids.d.ts","sourceRoot":"","sources":["../../../src/core/create/internal-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAChC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,MAAM,MAAM,cAAc,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKxD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAExD,CAAC;AAEF,eAAO,MAAM,oCAAoC,mCAChB,CAAC;AAElC,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAGpE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAM5D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI1D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const CREATE_LIFECYCLE_STEP_IDS = {
|
|
2
|
+
agentSetup: "agent:setup",
|
|
3
|
+
sanitySetupProject: "sanity:setup-project",
|
|
4
|
+
};
|
|
5
|
+
export const CREATE_MERGER_IDS = {
|
|
6
|
+
sanityLayout: "sanity:layout",
|
|
7
|
+
sanitySitemap: "sanity:sitemap",
|
|
8
|
+
sanityCheckIntegration: "sanity:check-integration",
|
|
9
|
+
};
|
|
10
|
+
export const PRESET_MODULE_IDS = {
|
|
11
|
+
"next-default": "preset:next-default",
|
|
12
|
+
"next-pagebuilder": "preset:next-pagebuilder",
|
|
13
|
+
"next-webgl": "preset:next-webgl",
|
|
14
|
+
"next-experiments": "preset:next-experiments",
|
|
15
|
+
};
|
|
16
|
+
export const CMS_FEATURE_MODULE_IDS = {
|
|
17
|
+
sanity: "feature:cms-sanity",
|
|
18
|
+
};
|
|
19
|
+
export const SANITY_PAGEBUILDER_FEATURE_MODULE_ID = "feature:cms-sanity-pagebuilder";
|
|
20
|
+
export const ANIMATION_FEATURE_MODULE_IDS = {
|
|
21
|
+
gsap: "feature:animation-gsap",
|
|
22
|
+
motion: "feature:animation-motion",
|
|
23
|
+
};
|
|
24
|
+
export const AGENT_FEATURE_MODULE_IDS = {
|
|
25
|
+
claude: "feature:agent-claude",
|
|
26
|
+
opencode: "feature:agent-opencode",
|
|
27
|
+
cursor: "feature:agent-cursor",
|
|
28
|
+
codex: "feature:agent-codex",
|
|
29
|
+
gemini: "feature:agent-gemini",
|
|
30
|
+
};
|
|
31
|
+
export const HOOK_FEATURE_MODULE_IDS = {
|
|
32
|
+
"use-battery": "feature:hook-use-battery",
|
|
33
|
+
"use-device-perf": "feature:hook-use-device-perf",
|
|
34
|
+
"use-intersection-observer": "feature:hook-use-intersection-observer",
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=internal-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-ids.js","sourceRoot":"","sources":["../../../src/core/create/internal-ids.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,UAAU,EAAE,aAAa;IACzB,kBAAkB,EAAE,sBAAsB;CACjC,CAAC;AAKX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAC/B,sBAAsB,EAAE,0BAA0B;CACzC,CAAC;AAKX,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC5D,cAAc,EAAE,qBAAqB;IACrC,kBAAkB,EAAE,yBAAyB;IAC7C,YAAY,EAAE,mBAAmB;IACjC,kBAAkB,EAAE,yBAAyB;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC5D,MAAM,EAAE,oBAAoB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAChD,gCAAgC,CAAC;AAElC,MAAM,CAAC,MAAM,4BAA4B,GAAgC;IACxE,IAAI,EAAE,wBAAwB;IAC9B,MAAM,EAAE,0BAA0B;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAChE,MAAM,EAAE,sBAAsB;IAC9B,QAAQ,EAAE,wBAAwB;IAClC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,sBAAsB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC9D,aAAa,EAAE,0BAA0B;IACzC,iBAAiB,EAAE,8BAA8B;IACjD,2BAA2B,EAAE,wCAAwC;CACrE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FeatureModule, FeatureModuleId, PresetModule, PresetModuleId } from "./types.js";
|
|
2
|
+
export interface CreateRegistry {
|
|
3
|
+
presets: Record<PresetModuleId, PresetModule>;
|
|
4
|
+
features: Record<FeatureModuleId, FeatureModule>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createRegistry({ presets, features, }: {
|
|
7
|
+
presets: PresetModule[];
|
|
8
|
+
features: FeatureModule[];
|
|
9
|
+
}): CreateRegistry;
|
|
10
|
+
export declare function getPresetModule(registry: CreateRegistry, presetId: PresetModuleId): PresetModule;
|
|
11
|
+
export declare function getFeatureModules(registry: CreateRegistry, featureIds: FeatureModuleId[]): FeatureModule[];
|
|
12
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/create/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC9B,OAAO,EAAE,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;CACjD;AAED,wBAAgB,cAAc,CAAC,EAC9B,OAAO,EACP,QAAQ,GACR,EAAE;IACF,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC1B,GAAG,cAAc,CAKjB;AAED,wBAAgB,eAAe,CAC9B,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,cAAc,GACtB,YAAY,CAOd;AAED,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,eAAe,EAAE,GAC3B,aAAa,EAAE,CASjB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function createRegistry({ presets, features, }) {
|
|
2
|
+
return {
|
|
3
|
+
presets: indexById(presets),
|
|
4
|
+
features: indexById(features),
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export function getPresetModule(registry, presetId) {
|
|
8
|
+
const preset = registry.presets[presetId];
|
|
9
|
+
if (!preset) {
|
|
10
|
+
throw new Error(`Unknown preset: ${presetId}`);
|
|
11
|
+
}
|
|
12
|
+
return preset;
|
|
13
|
+
}
|
|
14
|
+
export function getFeatureModules(registry, featureIds) {
|
|
15
|
+
return featureIds.map((featureId) => {
|
|
16
|
+
const feature = registry.features[featureId];
|
|
17
|
+
if (!feature) {
|
|
18
|
+
throw new Error(`Unknown feature: ${featureId}`);
|
|
19
|
+
}
|
|
20
|
+
return feature;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function indexById(items) {
|
|
24
|
+
const indexed = {};
|
|
25
|
+
for (const item of items) {
|
|
26
|
+
if (indexed[item.id]) {
|
|
27
|
+
throw new Error(`Duplicate module registration: ${item.id}`);
|
|
28
|
+
}
|
|
29
|
+
indexed[item.id] = item;
|
|
30
|
+
}
|
|
31
|
+
return indexed;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/create/registry.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,cAAc,CAAC,EAC9B,OAAO,EACP,QAAQ,GAIR;IACA,OAAO;QACN,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC;QAC3B,QAAQ,EAAE,SAAS,CAA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