@nextsparkjs/core 0.1.0-beta.1 → 0.1.0-beta.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/README.md +8 -2
- package/bin/dist/doctor/checks/config.d.ts +11 -0
- package/bin/dist/doctor/checks/config.d.ts.map +1 -0
- package/bin/dist/doctor/checks/config.js +111 -0
- package/bin/dist/doctor/checks/config.js.map +1 -0
- package/bin/dist/doctor/checks/database.d.ts +11 -0
- package/bin/dist/doctor/checks/database.d.ts.map +1 -0
- package/bin/dist/doctor/checks/database.js +115 -0
- package/bin/dist/doctor/checks/database.js.map +1 -0
- package/bin/dist/doctor/checks/dependencies.d.ts +11 -0
- package/bin/dist/doctor/checks/dependencies.d.ts.map +1 -0
- package/bin/dist/doctor/checks/dependencies.js +88 -0
- package/bin/dist/doctor/checks/dependencies.js.map +1 -0
- package/bin/dist/doctor/checks/imports.d.ts +11 -0
- package/bin/dist/doctor/checks/imports.d.ts.map +1 -0
- package/bin/dist/doctor/checks/imports.js +176 -0
- package/bin/dist/doctor/checks/imports.js.map +1 -0
- package/bin/dist/doctor/index.d.ts +32 -0
- package/bin/dist/doctor/index.d.ts.map +1 -0
- package/bin/dist/doctor/index.js +117 -0
- package/bin/dist/doctor/index.js.map +1 -0
- package/bin/dist/init.d.ts +19 -0
- package/bin/dist/init.d.ts.map +1 -0
- package/bin/dist/init.js +95 -308
- package/bin/dist/init.js.map +1 -0
- package/bin/dist/test-wizard.d.ts +18 -0
- package/bin/dist/test-wizard.d.ts.map +1 -0
- package/bin/dist/test-wizard.js +724 -0
- package/bin/dist/test-wizard.js.map +1 -0
- package/bin/dist/tsup.config.d.ts +3 -0
- package/bin/dist/tsup.config.d.ts.map +1 -0
- package/bin/dist/tsup.config.js +13 -0
- package/bin/dist/tsup.config.js.map +1 -0
- package/bin/dist/wizard/banner.d.ts +30 -0
- package/bin/dist/wizard/banner.d.ts.map +1 -0
- package/bin/dist/wizard/banner.js +60 -0
- package/bin/dist/wizard/banner.js.map +1 -0
- package/bin/dist/wizard/generators/config-generator.d.ts +36 -0
- package/bin/dist/wizard/generators/config-generator.d.ts.map +1 -0
- package/bin/dist/wizard/generators/config-generator.js +210 -0
- package/bin/dist/wizard/generators/config-generator.js.map +1 -0
- package/bin/dist/wizard/generators/content-features-generator.d.ts +19 -0
- package/bin/dist/wizard/generators/content-features-generator.d.ts.map +1 -0
- package/bin/dist/wizard/generators/content-features-generator.js +96 -0
- package/bin/dist/wizard/generators/content-features-generator.js.map +1 -0
- package/bin/dist/wizard/generators/demo-installer.d.ts +13 -0
- package/bin/dist/wizard/generators/demo-installer.d.ts.map +1 -0
- package/bin/dist/wizard/generators/demo-installer.js +164 -0
- package/bin/dist/wizard/generators/demo-installer.js.map +1 -0
- package/bin/dist/wizard/generators/env-setup.d.ts +16 -0
- package/bin/dist/wizard/generators/env-setup.d.ts.map +1 -0
- package/bin/dist/wizard/generators/env-setup.js +163 -0
- package/bin/dist/wizard/generators/env-setup.js.map +1 -0
- package/bin/dist/wizard/generators/git-init.d.ts +16 -0
- package/bin/dist/wizard/generators/git-init.d.ts.map +1 -0
- package/bin/dist/wizard/generators/git-init.js +174 -0
- package/bin/dist/wizard/generators/git-init.js.map +1 -0
- package/bin/dist/wizard/generators/index.d.ts +19 -0
- package/bin/dist/wizard/generators/index.d.ts.map +1 -0
- package/bin/dist/wizard/generators/index.js +203 -0
- package/bin/dist/wizard/generators/index.js.map +1 -0
- package/bin/dist/wizard/generators/messages-generator.d.ts +28 -0
- package/bin/dist/wizard/generators/messages-generator.d.ts.map +1 -0
- package/bin/dist/wizard/generators/messages-generator.js +131 -0
- package/bin/dist/wizard/generators/messages-generator.js.map +1 -0
- package/bin/dist/wizard/generators/theme-renamer.d.ts +35 -0
- package/bin/dist/wizard/generators/theme-renamer.d.ts.map +1 -0
- package/bin/dist/wizard/generators/theme-renamer.js +323 -0
- package/bin/dist/wizard/generators/theme-renamer.js.map +1 -0
- package/bin/dist/wizard/index.d.ts +12 -0
- package/bin/dist/wizard/index.d.ts.map +1 -0
- package/bin/dist/wizard/index.js +254 -0
- package/bin/dist/wizard/index.js.map +1 -0
- package/bin/dist/wizard/presets.d.ts +55 -0
- package/bin/dist/wizard/presets.d.ts.map +1 -0
- package/bin/dist/wizard/presets.js +232 -0
- package/bin/dist/wizard/presets.js.map +1 -0
- package/bin/dist/wizard/preview.d.ts +15 -0
- package/bin/dist/wizard/preview.d.ts.map +1 -0
- package/bin/dist/wizard/preview.js +192 -0
- package/bin/dist/wizard/preview.js.map +1 -0
- package/bin/dist/wizard/prompts/auth-config.d.ts +16 -0
- package/bin/dist/wizard/prompts/auth-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/auth-config.js +78 -0
- package/bin/dist/wizard/prompts/auth-config.js.map +1 -0
- package/bin/dist/wizard/prompts/billing-config.d.ts +11 -0
- package/bin/dist/wizard/prompts/billing-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/billing-config.js +66 -0
- package/bin/dist/wizard/prompts/billing-config.js.map +1 -0
- package/bin/dist/wizard/prompts/content-features-config.d.ts +15 -0
- package/bin/dist/wizard/prompts/content-features-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/content-features-config.js +58 -0
- package/bin/dist/wizard/prompts/content-features-config.js.map +1 -0
- package/bin/dist/wizard/prompts/dashboard-config.d.ts +15 -0
- package/bin/dist/wizard/prompts/dashboard-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/dashboard-config.js +104 -0
- package/bin/dist/wizard/prompts/dashboard-config.js.map +1 -0
- package/bin/dist/wizard/prompts/demo-install.d.ts +14 -0
- package/bin/dist/wizard/prompts/demo-install.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/demo-install.js +42 -0
- package/bin/dist/wizard/prompts/demo-install.js.map +1 -0
- package/bin/dist/wizard/prompts/dev-config.d.ts +15 -0
- package/bin/dist/wizard/prompts/dev-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/dev-config.js +66 -0
- package/bin/dist/wizard/prompts/dev-config.js.map +1 -0
- package/bin/dist/wizard/prompts/env-config.d.ts +22 -0
- package/bin/dist/wizard/prompts/env-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/env-config.js +65 -0
- package/bin/dist/wizard/prompts/env-config.js.map +1 -0
- package/bin/dist/wizard/prompts/features-config.d.ts +11 -0
- package/bin/dist/wizard/prompts/features-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/features-config.js +68 -0
- package/bin/dist/wizard/prompts/features-config.js.map +1 -0
- package/bin/dist/wizard/prompts/git-config.d.ts +22 -0
- package/bin/dist/wizard/prompts/git-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/git-config.js +72 -0
- package/bin/dist/wizard/prompts/git-config.js.map +1 -0
- package/bin/dist/wizard/prompts/i18n-config.d.ts +11 -0
- package/bin/dist/wizard/prompts/i18n-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/i18n-config.js +55 -0
- package/bin/dist/wizard/prompts/i18n-config.js.map +1 -0
- package/bin/dist/wizard/prompts/index.d.ts +34 -0
- package/bin/dist/wizard/prompts/index.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/index.js +126 -0
- package/bin/dist/wizard/prompts/index.js.map +1 -0
- package/bin/dist/wizard/prompts/project-info.d.ts +11 -0
- package/bin/dist/wizard/prompts/project-info.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/project-info.js +80 -0
- package/bin/dist/wizard/prompts/project-info.js.map +1 -0
- package/bin/dist/wizard/prompts/team-config.d.ts +11 -0
- package/bin/dist/wizard/prompts/team-config.d.ts.map +1 -0
- package/bin/dist/wizard/prompts/team-config.js +77 -0
- package/bin/dist/wizard/prompts/team-config.js.map +1 -0
- package/bin/dist/wizard/types.d.ts +110 -0
- package/bin/dist/wizard/types.d.ts.map +1 -0
- package/bin/dist/wizard/types.js +31 -0
- package/bin/dist/wizard/types.js.map +1 -0
- package/bin/dist/wizard/validators/files.d.ts +26 -0
- package/bin/dist/wizard/validators/files.d.ts.map +1 -0
- package/bin/dist/wizard/validators/files.js +202 -0
- package/bin/dist/wizard/validators/files.js.map +1 -0
- package/bin/dist/wizard/validators/i18n.d.ts +24 -0
- package/bin/dist/wizard/validators/i18n.d.ts.map +1 -0
- package/bin/dist/wizard/validators/i18n.js +318 -0
- package/bin/dist/wizard/validators/i18n.js.map +1 -0
- package/bin/dist/wizard/validators/index.d.ts +67 -0
- package/bin/dist/wizard/validators/index.d.ts.map +1 -0
- package/bin/dist/wizard/validators/index.js +64 -0
- package/bin/dist/wizard/validators/index.js.map +1 -0
- package/bin/dist/wizard/validators/typescript.d.ts +19 -0
- package/bin/dist/wizard/validators/typescript.d.ts.map +1 -0
- package/bin/dist/wizard/validators/typescript.js +120 -0
- package/bin/dist/wizard/validators/typescript.js.map +1 -0
- package/dist/bin/dist/doctor/checks/config.d.ts +11 -0
- package/dist/bin/dist/doctor/checks/config.d.ts.map +1 -0
- package/dist/bin/dist/doctor/checks/config.js +111 -0
- package/dist/bin/dist/doctor/checks/config.js.map +1 -0
- package/dist/bin/dist/doctor/checks/database.d.ts +11 -0
- package/dist/bin/dist/doctor/checks/database.d.ts.map +1 -0
- package/dist/bin/dist/doctor/checks/database.js +115 -0
- package/dist/bin/dist/doctor/checks/database.js.map +1 -0
- package/dist/bin/dist/doctor/checks/dependencies.d.ts +11 -0
- package/dist/bin/dist/doctor/checks/dependencies.d.ts.map +1 -0
- package/dist/bin/dist/doctor/checks/dependencies.js +88 -0
- package/dist/bin/dist/doctor/checks/dependencies.js.map +1 -0
- package/dist/bin/dist/doctor/checks/imports.d.ts +11 -0
- package/dist/bin/dist/doctor/checks/imports.d.ts.map +1 -0
- package/dist/bin/dist/doctor/checks/imports.js +176 -0
- package/dist/bin/dist/doctor/checks/imports.js.map +1 -0
- package/dist/bin/dist/doctor/index.d.ts +32 -0
- package/dist/bin/dist/doctor/index.d.ts.map +1 -0
- package/dist/bin/dist/doctor/index.js +117 -0
- package/dist/bin/dist/doctor/index.js.map +1 -0
- package/dist/bin/dist/init.d.ts +19 -0
- package/dist/bin/dist/init.d.ts.map +1 -0
- package/dist/bin/dist/init.js +95 -308
- package/dist/bin/dist/init.js.map +1 -0
- package/dist/bin/dist/test-wizard.d.ts +18 -0
- package/dist/bin/dist/test-wizard.d.ts.map +1 -0
- package/dist/bin/dist/test-wizard.js +724 -0
- package/dist/bin/dist/test-wizard.js.map +1 -0
- package/dist/bin/dist/tsup.config.d.ts +3 -0
- package/dist/bin/dist/tsup.config.d.ts.map +1 -0
- package/dist/bin/dist/tsup.config.js +13 -0
- package/dist/bin/dist/tsup.config.js.map +1 -0
- package/dist/bin/dist/wizard/banner.d.ts +30 -0
- package/dist/bin/dist/wizard/banner.d.ts.map +1 -0
- package/dist/bin/dist/wizard/banner.js +60 -0
- package/dist/bin/dist/wizard/banner.js.map +1 -0
- package/dist/bin/dist/wizard/generators/config-generator.d.ts +36 -0
- package/dist/bin/dist/wizard/generators/config-generator.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/config-generator.js +210 -0
- package/dist/bin/dist/wizard/generators/config-generator.js.map +1 -0
- package/dist/bin/dist/wizard/generators/content-features-generator.d.ts +19 -0
- package/dist/bin/dist/wizard/generators/content-features-generator.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/content-features-generator.js +96 -0
- package/dist/bin/dist/wizard/generators/content-features-generator.js.map +1 -0
- package/dist/bin/dist/wizard/generators/demo-installer.d.ts +13 -0
- package/dist/bin/dist/wizard/generators/demo-installer.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/demo-installer.js +128 -0
- package/dist/bin/dist/wizard/generators/demo-installer.js.map +1 -0
- package/dist/bin/dist/wizard/generators/env-setup.d.ts +16 -0
- package/dist/bin/dist/wizard/generators/env-setup.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/env-setup.js +163 -0
- package/dist/bin/dist/wizard/generators/env-setup.js.map +1 -0
- package/dist/bin/dist/wizard/generators/git-init.d.ts +16 -0
- package/dist/bin/dist/wizard/generators/git-init.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/git-init.js +174 -0
- package/dist/bin/dist/wizard/generators/git-init.js.map +1 -0
- package/dist/bin/dist/wizard/generators/index.d.ts +19 -0
- package/dist/bin/dist/wizard/generators/index.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/index.js +199 -0
- package/dist/bin/dist/wizard/generators/index.js.map +1 -0
- package/dist/bin/dist/wizard/generators/messages-generator.d.ts +28 -0
- package/dist/bin/dist/wizard/generators/messages-generator.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/messages-generator.js +131 -0
- package/dist/bin/dist/wizard/generators/messages-generator.js.map +1 -0
- package/dist/bin/dist/wizard/generators/theme-renamer.d.ts +35 -0
- package/dist/bin/dist/wizard/generators/theme-renamer.d.ts.map +1 -0
- package/dist/bin/dist/wizard/generators/theme-renamer.js +323 -0
- package/dist/bin/dist/wizard/generators/theme-renamer.js.map +1 -0
- package/dist/bin/dist/wizard/index.d.ts +12 -0
- package/dist/bin/dist/wizard/index.d.ts.map +1 -0
- package/dist/bin/dist/wizard/index.js +254 -0
- package/dist/bin/dist/wizard/index.js.map +1 -0
- package/dist/bin/dist/wizard/presets.d.ts +55 -0
- package/dist/bin/dist/wizard/presets.d.ts.map +1 -0
- package/dist/bin/dist/wizard/presets.js +232 -0
- package/dist/bin/dist/wizard/presets.js.map +1 -0
- package/dist/bin/dist/wizard/preview.d.ts +15 -0
- package/dist/bin/dist/wizard/preview.d.ts.map +1 -0
- package/dist/bin/dist/wizard/preview.js +192 -0
- package/dist/bin/dist/wizard/preview.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/auth-config.d.ts +16 -0
- package/dist/bin/dist/wizard/prompts/auth-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/auth-config.js +78 -0
- package/dist/bin/dist/wizard/prompts/auth-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/billing-config.d.ts +11 -0
- package/dist/bin/dist/wizard/prompts/billing-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/billing-config.js +66 -0
- package/dist/bin/dist/wizard/prompts/billing-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/content-features-config.d.ts +15 -0
- package/dist/bin/dist/wizard/prompts/content-features-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/content-features-config.js +58 -0
- package/dist/bin/dist/wizard/prompts/content-features-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/dashboard-config.d.ts +15 -0
- package/dist/bin/dist/wizard/prompts/dashboard-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/dashboard-config.js +104 -0
- package/dist/bin/dist/wizard/prompts/dashboard-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/demo-install.d.ts +14 -0
- package/dist/bin/dist/wizard/prompts/demo-install.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/demo-install.js +42 -0
- package/dist/bin/dist/wizard/prompts/demo-install.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/dev-config.d.ts +15 -0
- package/dist/bin/dist/wizard/prompts/dev-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/dev-config.js +66 -0
- package/dist/bin/dist/wizard/prompts/dev-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/env-config.d.ts +22 -0
- package/dist/bin/dist/wizard/prompts/env-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/env-config.js +65 -0
- package/dist/bin/dist/wizard/prompts/env-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/features-config.d.ts +11 -0
- package/dist/bin/dist/wizard/prompts/features-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/features-config.js +68 -0
- package/dist/bin/dist/wizard/prompts/features-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/git-config.d.ts +22 -0
- package/dist/bin/dist/wizard/prompts/git-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/git-config.js +72 -0
- package/dist/bin/dist/wizard/prompts/git-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/i18n-config.d.ts +11 -0
- package/dist/bin/dist/wizard/prompts/i18n-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/i18n-config.js +55 -0
- package/dist/bin/dist/wizard/prompts/i18n-config.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/index.d.ts +34 -0
- package/dist/bin/dist/wizard/prompts/index.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/index.js +126 -0
- package/dist/bin/dist/wizard/prompts/index.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/project-info.d.ts +11 -0
- package/dist/bin/dist/wizard/prompts/project-info.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/project-info.js +80 -0
- package/dist/bin/dist/wizard/prompts/project-info.js.map +1 -0
- package/dist/bin/dist/wizard/prompts/team-config.d.ts +11 -0
- package/dist/bin/dist/wizard/prompts/team-config.d.ts.map +1 -0
- package/dist/bin/dist/wizard/prompts/team-config.js +77 -0
- package/dist/bin/dist/wizard/prompts/team-config.js.map +1 -0
- package/dist/bin/dist/wizard/types.d.ts +110 -0
- package/dist/bin/dist/wizard/types.d.ts.map +1 -0
- package/dist/bin/dist/wizard/types.js +31 -0
- package/dist/bin/dist/wizard/types.js.map +1 -0
- package/dist/bin/dist/wizard/validators/files.d.ts +26 -0
- package/dist/bin/dist/wizard/validators/files.d.ts.map +1 -0
- package/dist/bin/dist/wizard/validators/files.js +202 -0
- package/dist/bin/dist/wizard/validators/files.js.map +1 -0
- package/dist/bin/dist/wizard/validators/i18n.d.ts +24 -0
- package/dist/bin/dist/wizard/validators/i18n.d.ts.map +1 -0
- package/dist/bin/dist/wizard/validators/i18n.js +318 -0
- package/dist/bin/dist/wizard/validators/i18n.js.map +1 -0
- package/dist/bin/dist/wizard/validators/index.d.ts +67 -0
- package/dist/bin/dist/wizard/validators/index.d.ts.map +1 -0
- package/dist/bin/dist/wizard/validators/index.js +64 -0
- package/dist/bin/dist/wizard/validators/index.js.map +1 -0
- package/dist/bin/dist/wizard/validators/typescript.d.ts +19 -0
- package/dist/bin/dist/wizard/validators/typescript.d.ts.map +1 -0
- package/dist/bin/dist/wizard/validators/typescript.js +120 -0
- package/dist/bin/dist/wizard/validators/typescript.js.map +1 -0
- package/dist/bin/doctor/checks/config.ts +123 -0
- package/dist/bin/doctor/checks/database.ts +133 -0
- package/dist/bin/doctor/checks/dependencies.ts +99 -0
- package/dist/bin/doctor/checks/imports.ts +203 -0
- package/dist/bin/doctor/index.ts +151 -0
- package/dist/bin/init.ts +99 -406
- package/dist/bin/test-local.sh +3 -1
- package/dist/bin/test-wizard.ts +879 -0
- package/dist/bin/tsconfig.json +26 -0
- package/dist/bin/wizard/banner.ts +67 -0
- package/dist/bin/wizard/generators/config-generator.ts +341 -0
- package/dist/bin/wizard/generators/content-features-generator.ts +111 -0
- package/dist/bin/wizard/generators/demo-installer.ts +200 -0
- package/dist/bin/wizard/generators/env-setup.ts +208 -0
- package/dist/bin/wizard/generators/git-init.ts +187 -0
- package/dist/bin/wizard/generators/index.ts +271 -0
- package/dist/bin/wizard/generators/messages-generator.ts +159 -0
- package/dist/bin/wizard/generators/theme-renamer.ts +419 -0
- package/dist/bin/wizard/index.ts +288 -0
- package/dist/bin/wizard/presets.ts +274 -0
- package/dist/bin/wizard/preview.ts +220 -0
- package/dist/bin/wizard/prompts/auth-config.ts +93 -0
- package/dist/bin/wizard/prompts/billing-config.ts +75 -0
- package/dist/bin/wizard/prompts/content-features-config.ts +70 -0
- package/dist/bin/wizard/prompts/dashboard-config.ts +117 -0
- package/dist/bin/wizard/prompts/demo-install.ts +45 -0
- package/dist/bin/wizard/prompts/dev-config.ts +78 -0
- package/dist/bin/wizard/prompts/env-config.ts +83 -0
- package/dist/bin/wizard/prompts/features-config.ts +75 -0
- package/dist/bin/wizard/prompts/git-config.ts +90 -0
- package/dist/bin/wizard/prompts/i18n-config.ts +62 -0
- package/dist/bin/wizard/prompts/index.ts +173 -0
- package/dist/bin/wizard/prompts/project-info.ts +89 -0
- package/dist/bin/wizard/prompts/team-config.ts +88 -0
- package/dist/bin/wizard/types.ts +150 -0
- package/dist/bin/wizard/validators/files.ts +227 -0
- package/dist/bin/wizard/validators/i18n.ts +394 -0
- package/dist/bin/wizard/validators/index.ts +111 -0
- package/dist/bin/wizard/validators/typescript.ts +133 -0
- package/dist/components/devtools/scheduled-actions/actions-table.js +1 -1
- package/dist/components/devtools/scheduled-actions/filters.js +1 -1
- package/dist/hooks/useContentTranslation.d.ts.map +1 -1
- package/dist/hooks/useContentTranslation.js +1 -5
- package/dist/hooks/useEnsureUserMetadata.d.ts.map +1 -1
- package/dist/hooks/useEnsureUserMetadata.js +0 -1
- package/dist/hooks/useEntityTranslations.d.ts.map +1 -1
- package/dist/hooks/useEntityTranslations.js +10 -12
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +7 -37
- package/dist/lib/config/app.config.js +1 -1
- package/dist/lib/config/dashboard.config.d.ts +0 -1
- package/dist/lib/config/dashboard.config.d.ts.map +1 -1
- package/dist/lib/config/dashboard.config.js +0 -1
- package/dist/lib/config/nextspark-types.d.ts +1 -1
- package/dist/lib/config/nextspark-types.d.ts.map +1 -1
- package/dist/lib/i18n-utils.d.ts +1 -5
- package/dist/lib/i18n-utils.d.ts.map +1 -1
- package/dist/lib/i18n-utils.js +0 -19
- package/dist/lib/namespace-loader.d.ts +1 -0
- package/dist/lib/namespace-loader.d.ts.map +1 -1
- package/dist/lib/namespace-loader.js +14 -18
- package/dist/lib/services/translation.service.d.ts +92 -0
- package/dist/lib/services/translation.service.d.ts.map +1 -1
- package/dist/lib/services/translation.service.js +135 -1
- package/dist/lib/test/index.d.ts +4 -4
- package/dist/lib/test/index.d.ts.map +1 -1
- package/dist/lib/test/index.js +4 -4
- package/dist/lib/test/selectors.d.ts +12 -12
- package/dist/lib/test/selectors.d.ts.map +1 -1
- package/dist/lib/test/selectors.js +2 -2
- package/dist/lib/translations/i18n-integration.d.ts +3 -1
- package/dist/lib/translations/i18n-integration.d.ts.map +1 -1
- package/dist/lib/translations/i18n-integration.js +19 -38
- package/dist/lib/translations/registry.d.ts +7 -61
- package/dist/lib/translations/registry.d.ts.map +1 -1
- package/dist/lib/translations/registry.js +21 -163
- package/dist/messages/de/admin.json +219 -0
- package/dist/messages/de/auth.json +103 -0
- package/dist/messages/de/billing.json +167 -0
- package/dist/messages/de/buttons.json +19 -0
- package/dist/messages/de/common.json +172 -0
- package/dist/messages/de/dashboard.json +41 -0
- package/dist/messages/de/devtools.json +285 -0
- package/dist/messages/de/docs.json +24 -0
- package/dist/messages/de/entities.json +52 -0
- package/dist/messages/de/footer.json +23 -0
- package/dist/messages/de/home.json +13 -0
- package/dist/messages/de/index.d.ts +1934 -0
- package/dist/messages/de/index.d.ts.map +1 -0
- package/dist/messages/de/index.js +41 -0
- package/dist/messages/de/index.ts +39 -0
- package/dist/messages/de/navigation.json +11 -0
- package/dist/messages/de/permissions.json +27 -0
- package/dist/messages/de/public.json +14 -0
- package/dist/messages/de/settings.json +404 -0
- package/dist/messages/de/superadmin.json +194 -0
- package/dist/messages/de/teams.json +140 -0
- package/dist/messages/de/validation.json +48 -0
- package/dist/messages/en/admin.json +219 -0
- package/dist/messages/en/buttons.json +19 -0
- package/dist/messages/en/devtools.json +35 -0
- package/dist/messages/en/entities.json +52 -0
- package/dist/messages/en/index.d.ts +1292 -954
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/en/index.js +22 -16
- package/dist/messages/en/index.ts +22 -16
- package/dist/messages/en/public.json +14 -1
- package/dist/messages/es/admin.json +219 -0
- package/dist/messages/es/buttons.json +19 -0
- package/dist/messages/es/devtools.json +35 -0
- package/dist/messages/es/entities.json +52 -0
- package/dist/messages/es/index.d.ts +1292 -954
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/es/index.js +22 -16
- package/dist/messages/es/index.ts +22 -16
- package/dist/messages/es/public.json +14 -1
- package/dist/messages/fr/admin.json +219 -0
- package/dist/messages/fr/auth.json +103 -0
- package/dist/messages/fr/billing.json +167 -0
- package/dist/messages/fr/buttons.json +19 -0
- package/dist/messages/fr/common.json +172 -0
- package/dist/messages/fr/dashboard.json +41 -0
- package/dist/messages/fr/devtools.json +285 -0
- package/dist/messages/fr/docs.json +24 -0
- package/dist/messages/fr/entities.json +52 -0
- package/dist/messages/fr/footer.json +23 -0
- package/dist/messages/fr/home.json +13 -0
- package/dist/messages/fr/index.d.ts +1934 -0
- package/dist/messages/fr/index.d.ts.map +1 -0
- package/dist/messages/fr/index.js +41 -0
- package/dist/messages/fr/index.ts +39 -0
- package/dist/messages/fr/navigation.json +11 -0
- package/dist/messages/fr/permissions.json +27 -0
- package/dist/messages/fr/public.json +14 -0
- package/dist/messages/fr/settings.json +404 -0
- package/dist/messages/fr/superadmin.json +194 -0
- package/dist/messages/fr/teams.json +140 -0
- package/dist/messages/fr/validation.json +48 -0
- package/dist/messages/index.d.ts +4 -0
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/index.js +9 -1
- package/dist/messages/index.ts +4 -0
- package/dist/messages/it/admin.json +219 -0
- package/dist/messages/it/auth.json +103 -0
- package/dist/messages/it/billing.json +167 -0
- package/dist/messages/it/buttons.json +19 -0
- package/dist/messages/it/common.json +172 -0
- package/dist/messages/it/dashboard.json +41 -0
- package/dist/messages/it/devtools.json +285 -0
- package/dist/messages/it/docs.json +24 -0
- package/dist/messages/it/entities.json +52 -0
- package/dist/messages/it/footer.json +23 -0
- package/dist/messages/it/home.json +13 -0
- package/dist/messages/it/index.d.ts +1934 -0
- package/dist/messages/it/index.d.ts.map +1 -0
- package/dist/messages/it/index.js +41 -0
- package/dist/messages/it/index.ts +39 -0
- package/dist/messages/it/navigation.json +11 -0
- package/dist/messages/it/permissions.json +27 -0
- package/dist/messages/it/public.json +14 -0
- package/dist/messages/it/settings.json +404 -0
- package/dist/messages/it/superadmin.json +194 -0
- package/dist/messages/it/teams.json +140 -0
- package/dist/messages/it/validation.json +48 -0
- package/dist/messages/pt/admin.json +219 -0
- package/dist/messages/pt/auth.json +103 -0
- package/dist/messages/pt/billing.json +167 -0
- package/dist/messages/pt/buttons.json +19 -0
- package/dist/messages/pt/common.json +172 -0
- package/dist/messages/pt/dashboard.json +41 -0
- package/dist/messages/pt/devtools.json +285 -0
- package/dist/messages/pt/docs.json +24 -0
- package/dist/messages/pt/entities.json +52 -0
- package/dist/messages/pt/footer.json +23 -0
- package/dist/messages/pt/home.json +13 -0
- package/dist/messages/pt/index.d.ts +1934 -0
- package/dist/messages/pt/index.d.ts.map +1 -0
- package/dist/messages/pt/index.js +41 -0
- package/dist/messages/pt/index.ts +39 -0
- package/dist/messages/pt/navigation.json +11 -0
- package/dist/messages/pt/permissions.json +27 -0
- package/dist/messages/pt/public.json +14 -0
- package/dist/messages/pt/settings.json +404 -0
- package/dist/messages/pt/superadmin.json +194 -0
- package/dist/messages/pt/teams.json +140 -0
- package/dist/messages/pt/validation.json +48 -0
- package/dist/presets/plugin/messages/de.json +20 -0
- package/dist/presets/plugin/messages/fr.json +20 -0
- package/dist/presets/plugin/messages/it.json +20 -0
- package/dist/presets/plugin/messages/pt.json +20 -0
- package/dist/presets/theme/entities/tasks/messages/de.json +204 -0
- package/dist/presets/theme/entities/tasks/messages/fr.json +204 -0
- package/dist/presets/theme/entities/tasks/messages/it.json +204 -0
- package/dist/presets/theme/entities/tasks/messages/pt.json +204 -0
- package/dist/presets/theme/messages/de.json +96 -0
- package/dist/presets/theme/messages/fr.json +96 -0
- package/dist/presets/theme/messages/it.json +96 -0
- package/dist/presets/theme/messages/pt.json +96 -0
- package/dist/styles/classes.json +1 -1
- package/dist/styles/ui.css +1 -1
- package/dist/templates/contents/themes/default/entities/customers/messages/de.json +66 -0
- package/dist/templates/contents/themes/default/entities/customers/messages/fr.json +66 -0
- package/dist/templates/contents/themes/default/entities/customers/messages/it.json +66 -0
- package/dist/templates/contents/themes/default/entities/customers/messages/pt.json +66 -0
- package/dist/templates/contents/themes/default/entities/pages/messages/de.json +41 -0
- package/dist/templates/contents/themes/default/entities/pages/messages/fr.json +41 -0
- package/dist/templates/contents/themes/default/entities/pages/messages/it.json +41 -0
- package/dist/templates/contents/themes/default/entities/pages/messages/pt.json +41 -0
- package/dist/templates/contents/themes/default/entities/posts/messages/de.json +55 -0
- package/dist/templates/contents/themes/default/entities/posts/messages/fr.json +55 -0
- package/dist/templates/contents/themes/default/entities/posts/messages/it.json +55 -0
- package/dist/templates/contents/themes/default/entities/posts/messages/pt.json +55 -0
- package/dist/templates/contents/themes/default/entities/tasks/messages/de.json +204 -0
- package/dist/templates/contents/themes/default/entities/tasks/messages/fr.json +204 -0
- package/dist/templates/contents/themes/default/entities/tasks/messages/it.json +204 -0
- package/dist/templates/contents/themes/default/entities/tasks/messages/pt.json +204 -0
- package/dist/templates/contents/themes/default/messages/de/admin.json +219 -0
- package/dist/templates/contents/themes/default/messages/de/aiUsage.json +36 -0
- package/dist/templates/contents/themes/default/messages/de/buttons.json +19 -0
- package/dist/templates/contents/themes/default/messages/de/categories.json +35 -0
- package/dist/templates/contents/themes/default/messages/de/common.json +16 -0
- package/dist/templates/contents/themes/default/messages/de/dev.json +106 -0
- package/dist/templates/contents/themes/default/messages/de/docs.json +27 -0
- package/dist/templates/contents/themes/default/messages/de/entities.json +7 -0
- package/dist/templates/contents/themes/default/messages/de/features.json +119 -0
- package/dist/templates/contents/themes/default/messages/de/footer.json +22 -0
- package/dist/templates/contents/themes/default/messages/de/home.json +57 -0
- package/dist/templates/contents/themes/default/messages/de/index.ts +39 -0
- package/dist/templates/contents/themes/default/messages/de/mobileNav.json +13 -0
- package/dist/templates/contents/themes/default/messages/de/navigation.json +8 -0
- package/dist/templates/contents/themes/default/messages/de/observability.json +74 -0
- package/dist/templates/contents/themes/default/messages/de/posts.json +54 -0
- package/dist/templates/contents/themes/default/messages/de/pricing.json +102 -0
- package/dist/templates/contents/themes/default/messages/de/support.json +9 -0
- package/dist/templates/contents/themes/default/messages/de/teams.json +8 -0
- package/dist/templates/contents/themes/default/messages/es/admin.json +219 -0
- package/dist/templates/contents/themes/default/messages/es/aiUsage.json +36 -0
- package/dist/templates/contents/themes/default/messages/es/buttons.json +19 -0
- package/dist/templates/contents/themes/default/messages/es/categories.json +35 -0
- package/dist/templates/contents/themes/default/messages/es/common.json +16 -0
- package/dist/templates/contents/themes/default/messages/es/dev.json +101 -0
- package/dist/templates/contents/themes/default/messages/es/docs.json +27 -0
- package/dist/templates/contents/themes/default/messages/es/entities.json +7 -0
- package/dist/templates/contents/themes/default/messages/es/features.json +119 -0
- package/dist/templates/contents/themes/default/messages/es/footer.json +22 -0
- package/dist/templates/contents/themes/default/messages/es/home.json +57 -0
- package/dist/templates/contents/themes/default/messages/es/index.ts +39 -0
- package/dist/templates/contents/themes/default/messages/es/mobileNav.json +13 -0
- package/dist/templates/contents/themes/default/messages/es/navigation.json +8 -0
- package/dist/templates/contents/themes/default/messages/es/observability.json +74 -0
- package/dist/templates/contents/themes/default/messages/es/posts.json +54 -0
- package/dist/templates/contents/themes/default/messages/es/pricing.json +102 -0
- package/dist/templates/contents/themes/default/messages/es/support.json +9 -0
- package/dist/templates/contents/themes/default/messages/es/teams.json +8 -0
- package/dist/templates/contents/themes/default/messages/fr/admin.json +219 -0
- package/dist/templates/contents/themes/default/messages/fr/aiUsage.json +36 -0
- package/dist/templates/contents/themes/default/messages/fr/buttons.json +19 -0
- package/dist/templates/contents/themes/default/messages/fr/categories.json +35 -0
- package/dist/templates/contents/themes/default/messages/fr/common.json +16 -0
- package/dist/templates/contents/themes/default/messages/fr/dev.json +106 -0
- package/dist/templates/contents/themes/default/messages/fr/docs.json +27 -0
- package/dist/templates/contents/themes/default/messages/fr/entities.json +7 -0
- package/dist/templates/contents/themes/default/messages/fr/features.json +119 -0
- package/dist/templates/contents/themes/default/messages/fr/footer.json +22 -0
- package/dist/templates/contents/themes/default/messages/fr/home.json +57 -0
- package/dist/templates/contents/themes/default/messages/fr/index.ts +39 -0
- package/dist/templates/contents/themes/default/messages/fr/mobileNav.json +13 -0
- package/dist/templates/contents/themes/default/messages/fr/navigation.json +8 -0
- package/dist/templates/contents/themes/default/messages/fr/observability.json +74 -0
- package/dist/templates/contents/themes/default/messages/fr/posts.json +54 -0
- package/dist/templates/contents/themes/default/messages/fr/pricing.json +102 -0
- package/dist/templates/contents/themes/default/messages/fr/support.json +9 -0
- package/dist/templates/contents/themes/default/messages/fr/teams.json +8 -0
- package/dist/templates/contents/themes/default/messages/it/admin.json +219 -0
- package/dist/templates/contents/themes/default/messages/it/aiUsage.json +36 -0
- package/dist/templates/contents/themes/default/messages/it/buttons.json +19 -0
- package/dist/templates/contents/themes/default/messages/it/categories.json +35 -0
- package/dist/templates/contents/themes/default/messages/it/common.json +16 -0
- package/dist/templates/contents/themes/default/messages/it/dev.json +106 -0
- package/dist/templates/contents/themes/default/messages/it/docs.json +27 -0
- package/dist/templates/contents/themes/default/messages/it/entities.json +7 -0
- package/dist/templates/contents/themes/default/messages/it/features.json +119 -0
- package/dist/templates/contents/themes/default/messages/it/footer.json +22 -0
- package/dist/templates/contents/themes/default/messages/it/home.json +57 -0
- package/dist/templates/contents/themes/default/messages/it/index.ts +39 -0
- package/dist/templates/contents/themes/default/messages/it/mobileNav.json +13 -0
- package/dist/templates/contents/themes/default/messages/it/navigation.json +8 -0
- package/dist/templates/contents/themes/default/messages/it/observability.json +74 -0
- package/dist/templates/contents/themes/default/messages/it/posts.json +54 -0
- package/dist/templates/contents/themes/default/messages/it/pricing.json +102 -0
- package/dist/templates/contents/themes/default/messages/it/support.json +9 -0
- package/dist/templates/contents/themes/default/messages/it/teams.json +8 -0
- package/dist/templates/contents/themes/default/messages/pt/admin.json +219 -0
- package/dist/templates/contents/themes/default/messages/pt/aiUsage.json +36 -0
- package/dist/templates/contents/themes/default/messages/pt/buttons.json +19 -0
- package/dist/templates/contents/themes/default/messages/pt/categories.json +35 -0
- package/dist/templates/contents/themes/default/messages/pt/common.json +16 -0
- package/dist/templates/contents/themes/default/messages/pt/dev.json +106 -0
- package/dist/templates/contents/themes/default/messages/pt/docs.json +27 -0
- package/dist/templates/contents/themes/default/messages/pt/entities.json +7 -0
- package/dist/templates/contents/themes/default/messages/pt/features.json +119 -0
- package/dist/templates/contents/themes/default/messages/pt/footer.json +22 -0
- package/dist/templates/contents/themes/default/messages/pt/home.json +57 -0
- package/dist/templates/contents/themes/default/messages/pt/index.ts +39 -0
- package/dist/templates/contents/themes/default/messages/pt/mobileNav.json +13 -0
- package/dist/templates/contents/themes/default/messages/pt/navigation.json +8 -0
- package/dist/templates/contents/themes/default/messages/pt/observability.json +74 -0
- package/dist/templates/contents/themes/default/messages/pt/posts.json +54 -0
- package/dist/templates/contents/themes/default/messages/pt/pricing.json +102 -0
- package/dist/templates/contents/themes/default/messages/pt/support.json +9 -0
- package/dist/templates/contents/themes/default/messages/pt/teams.json +8 -0
- package/dist/templates/contents/themes/starter/README.md +35 -0
- package/dist/templates/contents/themes/starter/about/business.md +16 -0
- package/dist/templates/contents/themes/starter/about/features.json +28 -0
- package/dist/templates/contents/themes/starter/blocks/hero/component.tsx +112 -0
- package/dist/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
- package/dist/templates/contents/themes/starter/blocks/hero/fields.ts +74 -0
- package/dist/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
- package/dist/templates/contents/themes/starter/blocks/hero/schema.ts +34 -0
- package/dist/templates/contents/themes/starter/config/app.config.ts +193 -0
- package/dist/templates/contents/themes/starter/config/billing.config.ts +93 -0
- package/dist/templates/contents/themes/starter/config/dashboard.config.ts +419 -0
- package/dist/templates/contents/themes/starter/config/dev.config.ts +74 -0
- package/dist/templates/contents/themes/starter/config/permissions.config.ts +64 -0
- package/dist/templates/contents/themes/starter/config/theme.config.ts +83 -0
- package/dist/templates/contents/themes/starter/docs/01-overview/01-introduction.md +33 -0
- package/dist/templates/contents/themes/starter/docs/01-overview/02-customization.md +46 -0
- package/dist/templates/contents/themes/starter/entities/tasks/messages/de.json +263 -0
- package/dist/templates/contents/themes/starter/entities/tasks/messages/en.json +263 -0
- package/dist/templates/contents/themes/starter/entities/tasks/messages/es.json +263 -0
- package/dist/templates/contents/themes/starter/entities/tasks/messages/fr.json +263 -0
- package/dist/templates/contents/themes/starter/entities/tasks/messages/it.json +263 -0
- package/dist/templates/contents/themes/starter/entities/tasks/messages/pt.json +263 -0
- package/dist/templates/contents/themes/starter/entities/tasks/migrations/001_tasks_table.sql +104 -0
- package/dist/templates/contents/themes/starter/entities/tasks/migrations/002_task_metas.sql +84 -0
- package/dist/templates/contents/themes/starter/entities/tasks/migrations/003_tasks_sample_data.sql +172 -0
- package/dist/templates/contents/themes/starter/entities/tasks/tasks.config.ts +131 -0
- package/dist/templates/contents/themes/starter/entities/tasks/tasks.fields.ts +188 -0
- package/dist/templates/contents/themes/starter/entities/tasks/tasks.service.ts +390 -0
- package/dist/templates/contents/themes/starter/entities/tasks/tasks.types.ts +82 -0
- package/dist/templates/contents/themes/starter/lib/hooks/index.ts +1 -0
- package/dist/templates/contents/themes/starter/lib/hooks/useTaskStats.ts +57 -0
- package/dist/templates/contents/themes/starter/lib/index.ts +8 -0
- package/dist/templates/contents/themes/starter/lib/selectors.ts +94 -0
- package/dist/templates/contents/themes/starter/lib/utils.ts +154 -0
- package/dist/templates/contents/themes/starter/messages/de/analytics.json +39 -0
- package/dist/templates/contents/themes/starter/messages/de/common.json +33 -0
- package/dist/templates/contents/themes/starter/messages/de/home.json +30 -0
- package/dist/templates/contents/themes/starter/messages/de/navigation.json +16 -0
- package/dist/templates/contents/themes/starter/messages/en/analytics.json +39 -0
- package/dist/templates/contents/themes/starter/messages/en/common.json +33 -0
- package/dist/templates/contents/themes/starter/messages/en/home.json +30 -0
- package/dist/templates/contents/themes/starter/messages/en/navigation.json +16 -0
- package/dist/templates/contents/themes/starter/messages/es/analytics.json +39 -0
- package/dist/templates/contents/themes/starter/messages/es/common.json +33 -0
- package/dist/templates/contents/themes/starter/messages/es/home.json +30 -0
- package/dist/templates/contents/themes/starter/messages/es/navigation.json +16 -0
- package/dist/templates/contents/themes/starter/messages/fr/analytics.json +39 -0
- package/dist/templates/contents/themes/starter/messages/fr/common.json +33 -0
- package/dist/templates/contents/themes/starter/messages/fr/home.json +30 -0
- package/dist/templates/contents/themes/starter/messages/fr/navigation.json +16 -0
- package/dist/templates/contents/themes/starter/messages/it/analytics.json +39 -0
- package/dist/templates/contents/themes/starter/messages/it/common.json +33 -0
- package/dist/templates/contents/themes/starter/messages/it/home.json +30 -0
- package/dist/templates/contents/themes/starter/messages/it/navigation.json +16 -0
- package/dist/templates/contents/themes/starter/messages/pt/analytics.json +39 -0
- package/dist/templates/contents/themes/starter/messages/pt/common.json +33 -0
- package/dist/templates/contents/themes/starter/messages/pt/home.json +30 -0
- package/dist/templates/contents/themes/starter/messages/pt/navigation.json +16 -0
- package/dist/templates/contents/themes/starter/migrations/001_starter_users.sql +17 -0
- package/dist/templates/contents/themes/starter/migrations/README.md +19 -0
- package/dist/templates/contents/themes/starter/public/brand/.gitkeep +0 -0
- package/dist/templates/contents/themes/starter/public/theme/blocks/hero/thumbnail.png +1 -0
- package/dist/templates/contents/themes/starter/styles/components.css +16 -0
- package/dist/templates/contents/themes/starter/styles/globals.css +20 -0
- package/dist/templates/contents/themes/starter/templates/(dashboard)/analytics/_hooks/useAnalyticsData.ts +41 -0
- package/dist/templates/contents/themes/starter/templates/(dashboard)/analytics/components/RecentActivity.tsx +78 -0
- package/dist/templates/contents/themes/starter/templates/(dashboard)/analytics/components/StatsCard.tsx +58 -0
- package/dist/templates/contents/themes/starter/templates/(dashboard)/analytics/components/TasksChart.tsx +80 -0
- package/dist/templates/contents/themes/starter/templates/(dashboard)/analytics/page.tsx +45 -0
- package/dist/templates/contents/themes/starter/templates/(public)/layout.tsx +15 -0
- package/dist/templates/contents/themes/starter/templates/(public)/page.tsx +37 -0
- package/dist/templates/contents/themes/starter/templates/(public)/support/page.tsx +14 -0
- package/dist/templates/contents/themes/starter/tests/cypress/e2e/tasks/TaskAPIController.js +240 -0
- package/dist/templates/contents/themes/starter/tests/cypress/e2e/tasks/TasksPOM.ts +246 -0
- package/dist/templates/contents/themes/starter/tests/cypress/e2e/tasks/tasks-crud.cy.ts +423 -0
- package/dist/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +63 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/controllers/BaseAPIController.js +317 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/controllers/index.js +12 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/core/AuthPOM.ts +464 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/core/BasePOM.ts +130 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/core/DashboardEntityPOM.ts +761 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/core/index.ts +12 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/helpers/ApiInterceptor.ts +170 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/selectors.ts +155 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +255 -0
- package/dist/templates/contents/themes/starter/tests/cypress/support/commands.ts +192 -0
- package/dist/templates/contents/themes/starter/tests/cypress/support/doc-commands.ts +260 -0
- package/dist/templates/contents/themes/starter/tests/cypress/support/e2e.ts +21 -0
- package/dist/templates/contents/themes/starter/tests/cypress.config.ts +155 -0
- package/dist/templates/contents/themes/starter/tests/tsconfig.json +15 -0
- package/dist/templates/eslint.config.mjs +16 -0
- package/dist/templates/features/blog/blocks/post-content/component.tsx +197 -0
- package/dist/templates/features/blog/blocks/post-content/config.ts +11 -0
- package/dist/templates/features/blog/blocks/post-content/examples.ts +33 -0
- package/dist/templates/features/blog/blocks/post-content/fields.ts +165 -0
- package/dist/templates/features/blog/blocks/post-content/index.ts +4 -0
- package/dist/templates/features/blog/blocks/post-content/schema.ts +46 -0
- package/dist/templates/features/blog/entities/posts/components/post-header.tsx +97 -0
- package/dist/templates/features/blog/entities/posts/messages/en.json +55 -0
- package/dist/templates/features/blog/entities/posts/messages/es.json +55 -0
- package/dist/templates/features/blog/entities/posts/migrations/001_posts_table.sql +115 -0
- package/dist/templates/features/blog/entities/posts/migrations/003_add_status.sql +44 -0
- package/dist/templates/features/blog/entities/posts/migrations/004_entity_taxonomy_relations.sql +129 -0
- package/dist/templates/features/blog/entities/posts/migrations/006_posts_metas.sql +56 -0
- package/dist/templates/features/blog/entities/posts/posts.config.ts +112 -0
- package/dist/templates/features/blog/entities/posts/posts.fields.ts +116 -0
- package/dist/templates/features/blog/entities/posts/posts.service.ts +376 -0
- package/dist/templates/features/blog/entities/posts/posts.types.ts +74 -0
- package/dist/templates/features/pages/entities/pages/messages/en.json +41 -0
- package/dist/templates/features/pages/entities/pages/messages/es.json +41 -0
- package/dist/templates/features/pages/entities/pages/migrations/001_pages_table.sql +112 -0
- package/dist/templates/features/pages/entities/pages/migrations/002_pages_metas.sql +56 -0
- package/dist/templates/features/pages/entities/pages/migrations/003_add_status.sql +50 -0
- package/dist/templates/features/pages/entities/pages/pages-management.service.ts +610 -0
- package/dist/templates/features/pages/entities/pages/pages.config.ts +105 -0
- package/dist/templates/features/pages/entities/pages/pages.fields.ts +101 -0
- package/dist/templates/features/pages/entities/pages/pages.service.ts +290 -0
- package/dist/templates/features/pages/entities/pages/pages.types.ts +124 -0
- package/package.json +33 -2
- package/scripts/build/registry/generators/translation-registry.mjs +135 -18
- package/templates/contents/themes/default/entities/customers/messages/de.json +66 -0
- package/templates/contents/themes/default/entities/customers/messages/fr.json +66 -0
- package/templates/contents/themes/default/entities/customers/messages/it.json +66 -0
- package/templates/contents/themes/default/entities/customers/messages/pt.json +66 -0
- package/templates/contents/themes/default/entities/pages/messages/de.json +41 -0
- package/templates/contents/themes/default/entities/pages/messages/fr.json +41 -0
- package/templates/contents/themes/default/entities/pages/messages/it.json +41 -0
- package/templates/contents/themes/default/entities/pages/messages/pt.json +41 -0
- package/templates/contents/themes/default/entities/posts/messages/de.json +55 -0
- package/templates/contents/themes/default/entities/posts/messages/fr.json +55 -0
- package/templates/contents/themes/default/entities/posts/messages/it.json +55 -0
- package/templates/contents/themes/default/entities/posts/messages/pt.json +55 -0
- package/templates/contents/themes/default/entities/tasks/messages/de.json +204 -0
- package/templates/contents/themes/default/entities/tasks/messages/fr.json +204 -0
- package/templates/contents/themes/default/entities/tasks/messages/it.json +204 -0
- package/templates/contents/themes/default/entities/tasks/messages/pt.json +204 -0
- package/templates/contents/themes/default/messages/de/admin.json +219 -0
- package/templates/contents/themes/default/messages/de/aiUsage.json +36 -0
- package/templates/contents/themes/default/messages/de/buttons.json +19 -0
- package/templates/contents/themes/default/messages/de/categories.json +35 -0
- package/templates/contents/themes/default/messages/de/common.json +16 -0
- package/templates/contents/themes/default/messages/de/dev.json +106 -0
- package/templates/contents/themes/default/messages/de/docs.json +27 -0
- package/templates/contents/themes/default/messages/de/entities.json +7 -0
- package/templates/contents/themes/default/messages/de/features.json +119 -0
- package/templates/contents/themes/default/messages/de/footer.json +22 -0
- package/templates/contents/themes/default/messages/de/home.json +57 -0
- package/templates/contents/themes/default/messages/de/index.ts +39 -0
- package/templates/contents/themes/default/messages/de/mobileNav.json +13 -0
- package/templates/contents/themes/default/messages/de/navigation.json +8 -0
- package/templates/contents/themes/default/messages/de/observability.json +74 -0
- package/templates/contents/themes/default/messages/de/posts.json +54 -0
- package/templates/contents/themes/default/messages/de/pricing.json +102 -0
- package/templates/contents/themes/default/messages/de/support.json +9 -0
- package/templates/contents/themes/default/messages/de/teams.json +8 -0
- package/templates/contents/themes/default/messages/es/admin.json +219 -0
- package/templates/contents/themes/default/messages/es/aiUsage.json +36 -0
- package/templates/contents/themes/default/messages/es/buttons.json +19 -0
- package/templates/contents/themes/default/messages/es/categories.json +35 -0
- package/templates/contents/themes/default/messages/es/common.json +16 -0
- package/templates/contents/themes/default/messages/es/dev.json +101 -0
- package/templates/contents/themes/default/messages/es/docs.json +27 -0
- package/templates/contents/themes/default/messages/es/entities.json +7 -0
- package/templates/contents/themes/default/messages/es/features.json +119 -0
- package/templates/contents/themes/default/messages/es/footer.json +22 -0
- package/templates/contents/themes/default/messages/es/home.json +57 -0
- package/templates/contents/themes/default/messages/es/index.ts +39 -0
- package/templates/contents/themes/default/messages/es/mobileNav.json +13 -0
- package/templates/contents/themes/default/messages/es/navigation.json +8 -0
- package/templates/contents/themes/default/messages/es/observability.json +74 -0
- package/templates/contents/themes/default/messages/es/posts.json +54 -0
- package/templates/contents/themes/default/messages/es/pricing.json +102 -0
- package/templates/contents/themes/default/messages/es/support.json +9 -0
- package/templates/contents/themes/default/messages/es/teams.json +8 -0
- package/templates/contents/themes/default/messages/fr/admin.json +219 -0
- package/templates/contents/themes/default/messages/fr/aiUsage.json +36 -0
- package/templates/contents/themes/default/messages/fr/buttons.json +19 -0
- package/templates/contents/themes/default/messages/fr/categories.json +35 -0
- package/templates/contents/themes/default/messages/fr/common.json +16 -0
- package/templates/contents/themes/default/messages/fr/dev.json +106 -0
- package/templates/contents/themes/default/messages/fr/docs.json +27 -0
- package/templates/contents/themes/default/messages/fr/entities.json +7 -0
- package/templates/contents/themes/default/messages/fr/features.json +119 -0
- package/templates/contents/themes/default/messages/fr/footer.json +22 -0
- package/templates/contents/themes/default/messages/fr/home.json +57 -0
- package/templates/contents/themes/default/messages/fr/index.ts +39 -0
- package/templates/contents/themes/default/messages/fr/mobileNav.json +13 -0
- package/templates/contents/themes/default/messages/fr/navigation.json +8 -0
- package/templates/contents/themes/default/messages/fr/observability.json +74 -0
- package/templates/contents/themes/default/messages/fr/posts.json +54 -0
- package/templates/contents/themes/default/messages/fr/pricing.json +102 -0
- package/templates/contents/themes/default/messages/fr/support.json +9 -0
- package/templates/contents/themes/default/messages/fr/teams.json +8 -0
- package/templates/contents/themes/default/messages/it/admin.json +219 -0
- package/templates/contents/themes/default/messages/it/aiUsage.json +36 -0
- package/templates/contents/themes/default/messages/it/buttons.json +19 -0
- package/templates/contents/themes/default/messages/it/categories.json +35 -0
- package/templates/contents/themes/default/messages/it/common.json +16 -0
- package/templates/contents/themes/default/messages/it/dev.json +106 -0
- package/templates/contents/themes/default/messages/it/docs.json +27 -0
- package/templates/contents/themes/default/messages/it/entities.json +7 -0
- package/templates/contents/themes/default/messages/it/features.json +119 -0
- package/templates/contents/themes/default/messages/it/footer.json +22 -0
- package/templates/contents/themes/default/messages/it/home.json +57 -0
- package/templates/contents/themes/default/messages/it/index.ts +39 -0
- package/templates/contents/themes/default/messages/it/mobileNav.json +13 -0
- package/templates/contents/themes/default/messages/it/navigation.json +8 -0
- package/templates/contents/themes/default/messages/it/observability.json +74 -0
- package/templates/contents/themes/default/messages/it/posts.json +54 -0
- package/templates/contents/themes/default/messages/it/pricing.json +102 -0
- package/templates/contents/themes/default/messages/it/support.json +9 -0
- package/templates/contents/themes/default/messages/it/teams.json +8 -0
- package/templates/contents/themes/default/messages/pt/admin.json +219 -0
- package/templates/contents/themes/default/messages/pt/aiUsage.json +36 -0
- package/templates/contents/themes/default/messages/pt/buttons.json +19 -0
- package/templates/contents/themes/default/messages/pt/categories.json +35 -0
- package/templates/contents/themes/default/messages/pt/common.json +16 -0
- package/templates/contents/themes/default/messages/pt/dev.json +106 -0
- package/templates/contents/themes/default/messages/pt/docs.json +27 -0
- package/templates/contents/themes/default/messages/pt/entities.json +7 -0
- package/templates/contents/themes/default/messages/pt/features.json +119 -0
- package/templates/contents/themes/default/messages/pt/footer.json +22 -0
- package/templates/contents/themes/default/messages/pt/home.json +57 -0
- package/templates/contents/themes/default/messages/pt/index.ts +39 -0
- package/templates/contents/themes/default/messages/pt/mobileNav.json +13 -0
- package/templates/contents/themes/default/messages/pt/navigation.json +8 -0
- package/templates/contents/themes/default/messages/pt/observability.json +74 -0
- package/templates/contents/themes/default/messages/pt/posts.json +54 -0
- package/templates/contents/themes/default/messages/pt/pricing.json +102 -0
- package/templates/contents/themes/default/messages/pt/support.json +9 -0
- package/templates/contents/themes/default/messages/pt/teams.json +8 -0
- package/templates/contents/themes/starter/README.md +35 -0
- package/templates/contents/themes/starter/about/business.md +16 -0
- package/templates/contents/themes/starter/about/features.json +28 -0
- package/templates/contents/themes/starter/blocks/hero/component.tsx +112 -0
- package/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
- package/templates/contents/themes/starter/blocks/hero/fields.ts +74 -0
- package/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
- package/templates/contents/themes/starter/blocks/hero/schema.ts +34 -0
- package/templates/contents/themes/starter/config/app.config.ts +193 -0
- package/templates/contents/themes/starter/config/billing.config.ts +93 -0
- package/templates/contents/themes/starter/config/dashboard.config.ts +419 -0
- package/templates/contents/themes/starter/config/dev.config.ts +74 -0
- package/templates/contents/themes/starter/config/permissions.config.ts +64 -0
- package/templates/contents/themes/starter/config/theme.config.ts +83 -0
- package/templates/contents/themes/starter/docs/01-overview/01-introduction.md +33 -0
- package/templates/contents/themes/starter/docs/01-overview/02-customization.md +46 -0
- package/templates/contents/themes/starter/entities/tasks/messages/de.json +263 -0
- package/templates/contents/themes/starter/entities/tasks/messages/en.json +263 -0
- package/templates/contents/themes/starter/entities/tasks/messages/es.json +263 -0
- package/templates/contents/themes/starter/entities/tasks/messages/fr.json +263 -0
- package/templates/contents/themes/starter/entities/tasks/messages/it.json +263 -0
- package/templates/contents/themes/starter/entities/tasks/messages/pt.json +263 -0
- package/templates/contents/themes/starter/entities/tasks/migrations/001_tasks_table.sql +104 -0
- package/templates/contents/themes/starter/entities/tasks/migrations/002_task_metas.sql +84 -0
- package/templates/contents/themes/starter/entities/tasks/migrations/003_tasks_sample_data.sql +172 -0
- package/templates/contents/themes/starter/entities/tasks/tasks.config.ts +131 -0
- package/templates/contents/themes/starter/entities/tasks/tasks.fields.ts +188 -0
- package/templates/contents/themes/starter/entities/tasks/tasks.service.ts +390 -0
- package/templates/contents/themes/starter/entities/tasks/tasks.types.ts +82 -0
- package/templates/contents/themes/starter/lib/hooks/index.ts +1 -0
- package/templates/contents/themes/starter/lib/hooks/useTaskStats.ts +57 -0
- package/templates/contents/themes/starter/lib/index.ts +8 -0
- package/templates/contents/themes/starter/lib/selectors.ts +94 -0
- package/templates/contents/themes/starter/lib/utils.ts +154 -0
- package/templates/contents/themes/starter/messages/de/analytics.json +39 -0
- package/templates/contents/themes/starter/messages/de/common.json +33 -0
- package/templates/contents/themes/starter/messages/de/home.json +30 -0
- package/templates/contents/themes/starter/messages/de/navigation.json +16 -0
- package/templates/contents/themes/starter/messages/en/analytics.json +39 -0
- package/templates/contents/themes/starter/messages/en/common.json +33 -0
- package/templates/contents/themes/starter/messages/en/home.json +30 -0
- package/templates/contents/themes/starter/messages/en/navigation.json +16 -0
- package/templates/contents/themes/starter/messages/es/analytics.json +39 -0
- package/templates/contents/themes/starter/messages/es/common.json +33 -0
- package/templates/contents/themes/starter/messages/es/home.json +30 -0
- package/templates/contents/themes/starter/messages/es/navigation.json +16 -0
- package/templates/contents/themes/starter/messages/fr/analytics.json +39 -0
- package/templates/contents/themes/starter/messages/fr/common.json +33 -0
- package/templates/contents/themes/starter/messages/fr/home.json +30 -0
- package/templates/contents/themes/starter/messages/fr/navigation.json +16 -0
- package/templates/contents/themes/starter/messages/it/analytics.json +39 -0
- package/templates/contents/themes/starter/messages/it/common.json +33 -0
- package/templates/contents/themes/starter/messages/it/home.json +30 -0
- package/templates/contents/themes/starter/messages/it/navigation.json +16 -0
- package/templates/contents/themes/starter/messages/pt/analytics.json +39 -0
- package/templates/contents/themes/starter/messages/pt/common.json +33 -0
- package/templates/contents/themes/starter/messages/pt/home.json +30 -0
- package/templates/contents/themes/starter/messages/pt/navigation.json +16 -0
- package/templates/contents/themes/starter/migrations/001_starter_users.sql +17 -0
- package/templates/contents/themes/starter/migrations/README.md +19 -0
- package/templates/contents/themes/starter/public/brand/.gitkeep +0 -0
- package/templates/contents/themes/starter/public/theme/blocks/hero/thumbnail.png +1 -0
- package/templates/contents/themes/starter/styles/components.css +16 -0
- package/templates/contents/themes/starter/styles/globals.css +20 -0
- package/templates/contents/themes/starter/templates/(dashboard)/analytics/_hooks/useAnalyticsData.ts +41 -0
- package/templates/contents/themes/starter/templates/(dashboard)/analytics/components/RecentActivity.tsx +78 -0
- package/templates/contents/themes/starter/templates/(dashboard)/analytics/components/StatsCard.tsx +58 -0
- package/templates/contents/themes/starter/templates/(dashboard)/analytics/components/TasksChart.tsx +80 -0
- package/templates/contents/themes/starter/templates/(dashboard)/analytics/page.tsx +45 -0
- package/templates/contents/themes/starter/templates/(public)/layout.tsx +15 -0
- package/templates/contents/themes/starter/templates/(public)/page.tsx +37 -0
- package/templates/contents/themes/starter/templates/(public)/support/page.tsx +14 -0
- package/templates/contents/themes/starter/tests/cypress/e2e/tasks/TaskAPIController.js +240 -0
- package/templates/contents/themes/starter/tests/cypress/e2e/tasks/TasksPOM.ts +246 -0
- package/templates/contents/themes/starter/tests/cypress/e2e/tasks/tasks-crud.cy.ts +423 -0
- package/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +63 -0
- package/templates/contents/themes/starter/tests/cypress/src/controllers/BaseAPIController.js +317 -0
- package/templates/contents/themes/starter/tests/cypress/src/controllers/index.js +12 -0
- package/templates/contents/themes/starter/tests/cypress/src/core/AuthPOM.ts +464 -0
- package/templates/contents/themes/starter/tests/cypress/src/core/BasePOM.ts +130 -0
- package/templates/contents/themes/starter/tests/cypress/src/core/DashboardEntityPOM.ts +761 -0
- package/templates/contents/themes/starter/tests/cypress/src/core/index.ts +12 -0
- package/templates/contents/themes/starter/tests/cypress/src/helpers/ApiInterceptor.ts +170 -0
- package/templates/contents/themes/starter/tests/cypress/src/selectors.ts +155 -0
- package/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +255 -0
- package/templates/contents/themes/starter/tests/cypress/support/commands.ts +192 -0
- package/templates/contents/themes/starter/tests/cypress/support/doc-commands.ts +260 -0
- package/templates/contents/themes/starter/tests/cypress/support/e2e.ts +21 -0
- package/templates/contents/themes/starter/tests/cypress.config.ts +155 -0
- package/templates/contents/themes/starter/tests/tsconfig.json +15 -0
- package/templates/eslint.config.mjs +16 -0
- package/templates/features/blog/blocks/post-content/component.tsx +197 -0
- package/templates/features/blog/blocks/post-content/config.ts +11 -0
- package/templates/features/blog/blocks/post-content/examples.ts +33 -0
- package/templates/features/blog/blocks/post-content/fields.ts +165 -0
- package/templates/features/blog/blocks/post-content/index.ts +4 -0
- package/templates/features/blog/blocks/post-content/schema.ts +46 -0
- package/templates/features/blog/entities/posts/components/post-header.tsx +97 -0
- package/templates/features/blog/entities/posts/messages/en.json +55 -0
- package/templates/features/blog/entities/posts/messages/es.json +55 -0
- package/templates/features/blog/entities/posts/migrations/001_posts_table.sql +115 -0
- package/templates/features/blog/entities/posts/migrations/003_add_status.sql +44 -0
- package/templates/features/blog/entities/posts/migrations/004_entity_taxonomy_relations.sql +129 -0
- package/templates/features/blog/entities/posts/migrations/006_posts_metas.sql +56 -0
- package/templates/features/blog/entities/posts/posts.config.ts +112 -0
- package/templates/features/blog/entities/posts/posts.fields.ts +116 -0
- package/templates/features/blog/entities/posts/posts.service.ts +376 -0
- package/templates/features/blog/entities/posts/posts.types.ts +74 -0
- package/templates/features/pages/entities/pages/messages/en.json +41 -0
- package/templates/features/pages/entities/pages/messages/es.json +41 -0
- package/templates/features/pages/entities/pages/migrations/001_pages_table.sql +112 -0
- package/templates/features/pages/entities/pages/migrations/002_pages_metas.sql +56 -0
- package/templates/features/pages/entities/pages/migrations/003_add_status.sql +50 -0
- package/templates/features/pages/entities/pages/pages-management.service.ts +610 -0
- package/templates/features/pages/entities/pages/pages.config.ts +105 -0
- package/templates/features/pages/entities/pages/pages.fields.ts +101 -0
- package/templates/features/pages/entities/pages/pages.service.ts +290 -0
- package/templates/features/pages/entities/pages/pages.types.ts +124 -0
- package/dist/templates/contents/themes/default/messages/en.json +0 -934
- package/dist/templates/contents/themes/default/messages/en.json.backup +0 -934
- package/dist/templates/contents/themes/default/messages/es.json +0 -929
- package/templates/contents/themes/default/messages/en.json +0 -934
- package/templates/contents/themes/default/messages/en.json.backup +0 -934
- package/templates/contents/themes/default/messages/es.json +0 -929
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Demo Theme Installer
|
|
3
|
+
*
|
|
4
|
+
* Installs the default demo theme to allow users to explore NextSpark features.
|
|
5
|
+
* Searches for the theme in multiple locations and copies it to the project.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import fs from 'fs-extra'
|
|
9
|
+
import path from 'path'
|
|
10
|
+
import { fileURLToPath } from 'url'
|
|
11
|
+
import chalk from 'chalk'
|
|
12
|
+
import ora from 'ora'
|
|
13
|
+
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
15
|
+
const __dirname = path.dirname(__filename)
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Possible locations for the default demo theme
|
|
19
|
+
*/
|
|
20
|
+
const DEMO_THEME_PATHS = [
|
|
21
|
+
// Relative to compiled location: bin/dist/wizard/generators/demo-installer.js
|
|
22
|
+
path.resolve(__dirname, '../../../../templates/contents/themes/default'),
|
|
23
|
+
// Alternative location in contents
|
|
24
|
+
path.resolve(__dirname, '../../../../contents/themes/default'),
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get the target themes directory in the user's project
|
|
29
|
+
*/
|
|
30
|
+
function getTargetThemesDir(): string {
|
|
31
|
+
return path.resolve(process.cwd(), 'contents', 'themes')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Find the demo theme source directory
|
|
36
|
+
*/
|
|
37
|
+
async function findDemoTheme(): Promise<string | null> {
|
|
38
|
+
for (const themePath of DEMO_THEME_PATHS) {
|
|
39
|
+
if (await fs.pathExists(themePath)) {
|
|
40
|
+
return themePath
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return null
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Possible locations for the langchain plugin
|
|
48
|
+
*/
|
|
49
|
+
const LANGCHAIN_PLUGIN_PATHS = [
|
|
50
|
+
// Relative to compiled location: bin/dist/wizard/generators/demo-installer.js
|
|
51
|
+
path.resolve(__dirname, '../../../../templates/contents/plugins/langchain'),
|
|
52
|
+
// Alternative location in contents
|
|
53
|
+
path.resolve(__dirname, '../../../../contents/plugins/langchain'),
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Copy langchain plugin files to user's project
|
|
58
|
+
*/
|
|
59
|
+
async function copyLangchainPlugin(): Promise<void> {
|
|
60
|
+
// Find the plugin source
|
|
61
|
+
let pluginSource: string | null = null
|
|
62
|
+
for (const pluginPath of LANGCHAIN_PLUGIN_PATHS) {
|
|
63
|
+
if (await fs.pathExists(pluginPath)) {
|
|
64
|
+
pluginSource = pluginPath
|
|
65
|
+
break
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!pluginSource) {
|
|
70
|
+
// Plugin not found, skip silently
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const pluginTarget = path.resolve(process.cwd(), 'contents', 'plugins', 'langchain')
|
|
75
|
+
|
|
76
|
+
// Skip if already exists
|
|
77
|
+
if (await fs.pathExists(pluginTarget)) {
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Ensure parent directory exists and copy
|
|
82
|
+
await fs.ensureDir(path.dirname(pluginTarget))
|
|
83
|
+
await fs.copy(pluginSource, pluginTarget)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Update theme.config.ts to enable the langchain plugin
|
|
88
|
+
*/
|
|
89
|
+
async function enableLangchainPlugin(themePath: string): Promise<void> {
|
|
90
|
+
const themeConfigPath = path.join(themePath, 'config', 'theme.config.ts')
|
|
91
|
+
|
|
92
|
+
if (!await fs.pathExists(themeConfigPath)) {
|
|
93
|
+
// Config file doesn't exist, skip modification
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let content = await fs.readFile(themeConfigPath, 'utf-8')
|
|
98
|
+
|
|
99
|
+
// Check if plugins array exists
|
|
100
|
+
if (content.includes('plugins:')) {
|
|
101
|
+
// Check if langchain is already in plugins
|
|
102
|
+
if (!content.includes("'langchain'") && !content.includes('"langchain"')) {
|
|
103
|
+
// Add langchain to existing plugins array
|
|
104
|
+
content = content.replace(
|
|
105
|
+
/plugins:\s*\[(.*?)\]/s,
|
|
106
|
+
(match, plugins) => {
|
|
107
|
+
const existingPlugins = plugins.trim()
|
|
108
|
+
if (existingPlugins) {
|
|
109
|
+
return `plugins: [${existingPlugins}, 'langchain']`
|
|
110
|
+
}
|
|
111
|
+
return `plugins: ['langchain']`
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
// No plugins array exists, add it after description
|
|
117
|
+
content = content.replace(
|
|
118
|
+
/(description:\s*['"].*?['"],?\n)/,
|
|
119
|
+
"$1\n plugins: ['langchain'],\n"
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
await fs.writeFile(themeConfigPath, content, 'utf-8')
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Install the demo theme to the user's project
|
|
128
|
+
*
|
|
129
|
+
* @returns true if installation was successful, false otherwise
|
|
130
|
+
*/
|
|
131
|
+
export async function installDemoTheme(): Promise<boolean> {
|
|
132
|
+
const spinner = ora({
|
|
133
|
+
text: 'Searching for demo theme...',
|
|
134
|
+
prefixText: ' ',
|
|
135
|
+
}).start()
|
|
136
|
+
|
|
137
|
+
try {
|
|
138
|
+
// Find the demo theme source
|
|
139
|
+
const demoThemePath = await findDemoTheme()
|
|
140
|
+
|
|
141
|
+
if (!demoThemePath) {
|
|
142
|
+
spinner.fail(chalk.red('Demo theme not found'))
|
|
143
|
+
console.log(chalk.gray(' Searched locations:'))
|
|
144
|
+
for (const searchPath of DEMO_THEME_PATHS) {
|
|
145
|
+
console.log(chalk.gray(` - ${searchPath}`))
|
|
146
|
+
}
|
|
147
|
+
return false
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
spinner.text = 'Preparing installation directory...'
|
|
151
|
+
|
|
152
|
+
// Prepare target directory
|
|
153
|
+
const targetThemesDir = getTargetThemesDir()
|
|
154
|
+
const targetDemoPath = path.join(targetThemesDir, 'default')
|
|
155
|
+
|
|
156
|
+
// Check if demo theme already exists
|
|
157
|
+
if (await fs.pathExists(targetDemoPath)) {
|
|
158
|
+
spinner.warn(chalk.yellow('Demo theme already exists at: contents/themes/default'))
|
|
159
|
+
console.log(chalk.gray(' Skipping installation to avoid overwriting existing files.'))
|
|
160
|
+
return true
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Ensure themes directory exists
|
|
164
|
+
await fs.ensureDir(targetThemesDir)
|
|
165
|
+
|
|
166
|
+
spinner.text = 'Copying demo theme files...'
|
|
167
|
+
|
|
168
|
+
// Copy the entire demo theme
|
|
169
|
+
await fs.copy(demoThemePath, targetDemoPath)
|
|
170
|
+
|
|
171
|
+
spinner.text = 'Configuring demo theme...'
|
|
172
|
+
|
|
173
|
+
// Enable langchain plugin in theme config
|
|
174
|
+
await enableLangchainPlugin(targetDemoPath)
|
|
175
|
+
|
|
176
|
+
// Copy langchain plugin files
|
|
177
|
+
await copyLangchainPlugin()
|
|
178
|
+
|
|
179
|
+
spinner.succeed(chalk.green('Demo theme installed successfully!'))
|
|
180
|
+
|
|
181
|
+
// Show installation details
|
|
182
|
+
console.log('')
|
|
183
|
+
console.log(chalk.gray(' Demo theme location: ') + chalk.cyan('contents/themes/default/'))
|
|
184
|
+
console.log(chalk.gray(' Enabled plugin: ') + chalk.cyan('langchain'))
|
|
185
|
+
console.log('')
|
|
186
|
+
console.log(chalk.yellow(' Remember: This is a demo for exploration only.'))
|
|
187
|
+
console.log(chalk.yellow(' Complete the wizard to create your customized project.'))
|
|
188
|
+
console.log('')
|
|
189
|
+
|
|
190
|
+
return true
|
|
191
|
+
} catch (error) {
|
|
192
|
+
spinner.fail(chalk.red('Failed to install demo theme'))
|
|
193
|
+
|
|
194
|
+
if (error instanceof Error) {
|
|
195
|
+
console.log(chalk.red(` Error: ${error.message}`))
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return false
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Setup Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates and configures the .env file based on wizard responses.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import crypto from 'crypto'
|
|
8
|
+
import fs from 'fs-extra'
|
|
9
|
+
import path from 'path'
|
|
10
|
+
import type { WizardConfig } from '../types.js'
|
|
11
|
+
import type { EnvSetupAnswers } from '../prompts/env-config.js'
|
|
12
|
+
import { showSuccess, showInfo, showWarning } from '../banner.js'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Generate a secure random secret
|
|
16
|
+
*/
|
|
17
|
+
function generateSecret(): string {
|
|
18
|
+
return crypto.randomBytes(32).toString('hex')
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Setup environment configuration for the project
|
|
23
|
+
*
|
|
24
|
+
* @param projectPath - Path to the project directory
|
|
25
|
+
* @param answers - Environment setup answers from prompts
|
|
26
|
+
* @param config - Full wizard configuration
|
|
27
|
+
*/
|
|
28
|
+
export async function setupEnvironment(
|
|
29
|
+
projectPath: string,
|
|
30
|
+
answers: EnvSetupAnswers,
|
|
31
|
+
config: WizardConfig
|
|
32
|
+
): Promise<void> {
|
|
33
|
+
if (!answers.setupEnv) {
|
|
34
|
+
showInfo('Skipping .env setup')
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const envExamplePath = path.join(projectPath, '.env.example')
|
|
39
|
+
const envPath = path.join(projectPath, '.env')
|
|
40
|
+
|
|
41
|
+
// Check if .env.example exists
|
|
42
|
+
if (!await fs.pathExists(envExamplePath)) {
|
|
43
|
+
showWarning('.env.example not found, creating default .env file')
|
|
44
|
+
await createDefaultEnv(envPath, answers, config)
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Check if .env already exists
|
|
49
|
+
if (await fs.pathExists(envPath)) {
|
|
50
|
+
showWarning('.env already exists, updating existing file')
|
|
51
|
+
await updateExistingEnv(envPath, answers, config)
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Copy .env.example to .env
|
|
56
|
+
await fs.copy(envExamplePath, envPath)
|
|
57
|
+
showSuccess('Copied .env.example to .env')
|
|
58
|
+
|
|
59
|
+
// Update the .env file with wizard values
|
|
60
|
+
await updateEnvFile(envPath, answers, config)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Update an existing .env file with new values
|
|
65
|
+
*/
|
|
66
|
+
async function updateExistingEnv(
|
|
67
|
+
envPath: string,
|
|
68
|
+
answers: EnvSetupAnswers,
|
|
69
|
+
config: WizardConfig
|
|
70
|
+
): Promise<void> {
|
|
71
|
+
let content = await fs.readFile(envPath, 'utf-8')
|
|
72
|
+
|
|
73
|
+
// Update NEXT_PUBLIC_ACTIVE_THEME
|
|
74
|
+
content = updateEnvVar(content, 'NEXT_PUBLIC_ACTIVE_THEME', config.projectSlug)
|
|
75
|
+
showSuccess(`Set NEXT_PUBLIC_ACTIVE_THEME=${config.projectSlug}`)
|
|
76
|
+
|
|
77
|
+
// Generate and set secrets if requested
|
|
78
|
+
if (answers.generateSecrets) {
|
|
79
|
+
const authSecret = generateSecret()
|
|
80
|
+
const encryptionKey = generateSecret()
|
|
81
|
+
|
|
82
|
+
content = updateEnvVar(content, 'AUTH_SECRET', authSecret)
|
|
83
|
+
content = updateEnvVar(content, 'BETTER_AUTH_SECRET', authSecret)
|
|
84
|
+
content = updateEnvVar(content, 'ENCRYPTION_KEY', encryptionKey)
|
|
85
|
+
|
|
86
|
+
showSuccess('Generated secure AUTH_SECRET')
|
|
87
|
+
showSuccess('Generated secure ENCRYPTION_KEY')
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Set DATABASE_URL if provided
|
|
91
|
+
if (answers.databaseUrl) {
|
|
92
|
+
content = updateEnvVar(content, 'DATABASE_URL', answers.databaseUrl)
|
|
93
|
+
showSuccess('Set DATABASE_URL')
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
await fs.writeFile(envPath, content, 'utf-8')
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Update the .env file with wizard configuration values
|
|
101
|
+
*/
|
|
102
|
+
async function updateEnvFile(
|
|
103
|
+
envPath: string,
|
|
104
|
+
answers: EnvSetupAnswers,
|
|
105
|
+
config: WizardConfig
|
|
106
|
+
): Promise<void> {
|
|
107
|
+
let content = await fs.readFile(envPath, 'utf-8')
|
|
108
|
+
|
|
109
|
+
// Update NEXT_PUBLIC_ACTIVE_THEME with project slug
|
|
110
|
+
content = updateEnvVar(content, 'NEXT_PUBLIC_ACTIVE_THEME', config.projectSlug)
|
|
111
|
+
showSuccess(`Set NEXT_PUBLIC_ACTIVE_THEME=${config.projectSlug}`)
|
|
112
|
+
|
|
113
|
+
// Generate and set secrets if requested
|
|
114
|
+
if (answers.generateSecrets) {
|
|
115
|
+
const authSecret = generateSecret()
|
|
116
|
+
const encryptionKey = generateSecret()
|
|
117
|
+
|
|
118
|
+
// Try to update AUTH_SECRET or BETTER_AUTH_SECRET (depending on what's in the file)
|
|
119
|
+
content = updateEnvVar(content, 'AUTH_SECRET', authSecret)
|
|
120
|
+
content = updateEnvVar(content, 'BETTER_AUTH_SECRET', authSecret)
|
|
121
|
+
content = updateEnvVar(content, 'ENCRYPTION_KEY', encryptionKey)
|
|
122
|
+
|
|
123
|
+
showSuccess('Generated secure AUTH_SECRET')
|
|
124
|
+
showSuccess('Generated secure ENCRYPTION_KEY')
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Set DATABASE_URL if provided
|
|
128
|
+
if (answers.databaseUrl) {
|
|
129
|
+
content = updateEnvVar(content, 'DATABASE_URL', answers.databaseUrl)
|
|
130
|
+
showSuccess('Set DATABASE_URL')
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
await fs.writeFile(envPath, content, 'utf-8')
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Update or add an environment variable in content
|
|
138
|
+
*/
|
|
139
|
+
function updateEnvVar(content: string, key: string, value: string): string {
|
|
140
|
+
// Pattern to match the env var (with or without quotes, commented or not)
|
|
141
|
+
const pattern = new RegExp(`^(#?\\s*${key}\\s*=).*$`, 'm')
|
|
142
|
+
|
|
143
|
+
if (pattern.test(content)) {
|
|
144
|
+
// Update existing variable
|
|
145
|
+
return content.replace(pattern, `${key}=${value}`)
|
|
146
|
+
} else {
|
|
147
|
+
// Add new variable at the end
|
|
148
|
+
return content.trimEnd() + `\n${key}=${value}\n`
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Create a default .env file when .env.example doesn't exist
|
|
154
|
+
*/
|
|
155
|
+
async function createDefaultEnv(
|
|
156
|
+
envPath: string,
|
|
157
|
+
answers: EnvSetupAnswers,
|
|
158
|
+
config: WizardConfig
|
|
159
|
+
): Promise<void> {
|
|
160
|
+
const authSecret = answers.generateSecrets ? generateSecret() : 'your-secret-key-min-32-chars'
|
|
161
|
+
const encryptionKey = answers.generateSecrets ? generateSecret() : 'your-encryption-key-min-32-chars'
|
|
162
|
+
const databaseUrl = answers.databaseUrl || 'postgresql://user:password@localhost:5432/nextspark'
|
|
163
|
+
|
|
164
|
+
const content = `# NextSpark Environment Configuration
|
|
165
|
+
# Generated by NextSpark Wizard for: ${config.projectName}
|
|
166
|
+
|
|
167
|
+
# Database
|
|
168
|
+
DATABASE_URL=${databaseUrl}
|
|
169
|
+
|
|
170
|
+
# Authentication (Better Auth)
|
|
171
|
+
AUTH_SECRET=${authSecret}
|
|
172
|
+
BETTER_AUTH_SECRET=${authSecret}
|
|
173
|
+
|
|
174
|
+
# Encryption
|
|
175
|
+
ENCRYPTION_KEY=${encryptionKey}
|
|
176
|
+
|
|
177
|
+
# App URL
|
|
178
|
+
NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|
179
|
+
|
|
180
|
+
# Active Theme
|
|
181
|
+
NEXT_PUBLIC_ACTIVE_THEME=${config.projectSlug}
|
|
182
|
+
|
|
183
|
+
# Email (Resend) - Optional
|
|
184
|
+
RESEND_API_KEY=
|
|
185
|
+
RESEND_FROM_EMAIL=
|
|
186
|
+
|
|
187
|
+
# Google OAuth - Optional
|
|
188
|
+
GOOGLE_CLIENT_ID=
|
|
189
|
+
GOOGLE_CLIENT_SECRET=
|
|
190
|
+
|
|
191
|
+
# Stripe - Optional
|
|
192
|
+
STRIPE_SECRET_KEY=
|
|
193
|
+
STRIPE_WEBHOOK_SECRET=
|
|
194
|
+
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
|
|
195
|
+
`
|
|
196
|
+
|
|
197
|
+
await fs.writeFile(envPath, content, 'utf-8')
|
|
198
|
+
showSuccess('Created .env file with default configuration')
|
|
199
|
+
|
|
200
|
+
if (answers.generateSecrets) {
|
|
201
|
+
showSuccess('Generated secure AUTH_SECRET')
|
|
202
|
+
showSuccess('Generated secure ENCRYPTION_KEY')
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (answers.databaseUrl) {
|
|
206
|
+
showSuccess('Set DATABASE_URL')
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Initialization Generator
|
|
3
|
+
*
|
|
4
|
+
* Handles Git repository initialization, .gitignore creation, and initial commit.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { execSync } from 'child_process'
|
|
8
|
+
import fs from 'fs-extra'
|
|
9
|
+
import path from 'path'
|
|
10
|
+
import type { GitSetupAnswers } from '../prompts/git-config.js'
|
|
11
|
+
import type { WizardConfig } from '../types.js'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* NextSpark .gitignore content
|
|
15
|
+
*/
|
|
16
|
+
const GITIGNORE_CONTENT = `# Dependencies
|
|
17
|
+
node_modules/
|
|
18
|
+
|
|
19
|
+
# Next.js
|
|
20
|
+
.next/
|
|
21
|
+
out/
|
|
22
|
+
|
|
23
|
+
# Environment
|
|
24
|
+
.env
|
|
25
|
+
.env.local
|
|
26
|
+
.env.*.local
|
|
27
|
+
|
|
28
|
+
# Logs
|
|
29
|
+
*.log
|
|
30
|
+
npm-debug.log*
|
|
31
|
+
yarn-debug.log*
|
|
32
|
+
yarn-error.log*
|
|
33
|
+
|
|
34
|
+
# OS
|
|
35
|
+
.DS_Store
|
|
36
|
+
Thumbs.db
|
|
37
|
+
|
|
38
|
+
# Build
|
|
39
|
+
dist/
|
|
40
|
+
build/
|
|
41
|
+
|
|
42
|
+
# Turbo
|
|
43
|
+
.turbo/
|
|
44
|
+
|
|
45
|
+
# IDE
|
|
46
|
+
.idea/
|
|
47
|
+
.vscode/
|
|
48
|
+
*.swp
|
|
49
|
+
*.swo
|
|
50
|
+
|
|
51
|
+
# Testing
|
|
52
|
+
coverage/
|
|
53
|
+
.nyc_output/
|
|
54
|
+
|
|
55
|
+
# NextSpark
|
|
56
|
+
.nextspark/
|
|
57
|
+
`
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if Git is installed and available
|
|
61
|
+
*/
|
|
62
|
+
function isGitAvailable(): boolean {
|
|
63
|
+
try {
|
|
64
|
+
execSync('git --version', { stdio: 'ignore' })
|
|
65
|
+
return true
|
|
66
|
+
} catch {
|
|
67
|
+
return false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check if the directory is already a Git repository
|
|
73
|
+
*/
|
|
74
|
+
async function isGitRepository(projectPath: string): Promise<boolean> {
|
|
75
|
+
const gitDir = path.join(projectPath, '.git')
|
|
76
|
+
return fs.pathExists(gitDir)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Initialize a new Git repository
|
|
81
|
+
*/
|
|
82
|
+
function initGitRepository(projectPath: string): void {
|
|
83
|
+
execSync('git init', {
|
|
84
|
+
cwd: projectPath,
|
|
85
|
+
stdio: 'pipe',
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Create or update .gitignore file
|
|
91
|
+
*/
|
|
92
|
+
async function createGitignore(projectPath: string): Promise<void> {
|
|
93
|
+
const gitignorePath = path.join(projectPath, '.gitignore')
|
|
94
|
+
|
|
95
|
+
if (await fs.pathExists(gitignorePath)) {
|
|
96
|
+
// Append NextSpark entries if not already present
|
|
97
|
+
const currentContent = await fs.readFile(gitignorePath, 'utf-8')
|
|
98
|
+
if (!currentContent.includes('.nextspark/')) {
|
|
99
|
+
const separator = currentContent.endsWith('\n') ? '' : '\n'
|
|
100
|
+
await fs.appendFile(gitignorePath, `${separator}\n# NextSpark additions\n.nextspark/\n`)
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
// Create new .gitignore
|
|
104
|
+
await fs.writeFile(gitignorePath, GITIGNORE_CONTENT)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Stage all files and create initial commit
|
|
110
|
+
*/
|
|
111
|
+
function createInitialCommit(projectPath: string, message: string): void {
|
|
112
|
+
execSync('git add .', {
|
|
113
|
+
cwd: projectPath,
|
|
114
|
+
stdio: 'pipe',
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
execSync(`git commit -m "${message.replace(/"/g, '\\"')}"`, {
|
|
118
|
+
cwd: projectPath,
|
|
119
|
+
stdio: 'pipe',
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Setup Git repository based on user preferences
|
|
125
|
+
*
|
|
126
|
+
* @param projectPath - Path to the project directory
|
|
127
|
+
* @param answers - User's git setup preferences
|
|
128
|
+
* @param config - Wizard configuration (for future extensibility)
|
|
129
|
+
*/
|
|
130
|
+
export async function setupGit(
|
|
131
|
+
projectPath: string,
|
|
132
|
+
answers: GitSetupAnswers,
|
|
133
|
+
config: WizardConfig
|
|
134
|
+
): Promise<void> {
|
|
135
|
+
// If user doesn't want git, skip everything
|
|
136
|
+
if (!answers.initGit) {
|
|
137
|
+
return
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Check if Git is available
|
|
141
|
+
if (!isGitAvailable()) {
|
|
142
|
+
console.warn('\n Warning: Git is not installed or not available in PATH.')
|
|
143
|
+
console.warn(' Skipping Git initialization.\n')
|
|
144
|
+
return
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
// Check if already a Git repository
|
|
149
|
+
const isExistingRepo = await isGitRepository(projectPath)
|
|
150
|
+
|
|
151
|
+
if (!isExistingRepo) {
|
|
152
|
+
// Initialize new Git repository
|
|
153
|
+
initGitRepository(projectPath)
|
|
154
|
+
console.log(' Initialized Git repository.')
|
|
155
|
+
} else {
|
|
156
|
+
console.log(' Git repository already exists, skipping init.')
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Create or update .gitignore
|
|
160
|
+
await createGitignore(projectPath)
|
|
161
|
+
console.log(' Created .gitignore file.')
|
|
162
|
+
|
|
163
|
+
// Create initial commit if requested
|
|
164
|
+
if (answers.createCommit && answers.commitMessage) {
|
|
165
|
+
try {
|
|
166
|
+
createInitialCommit(projectPath, answers.commitMessage)
|
|
167
|
+
console.log(` Created initial commit: "${answers.commitMessage}"`)
|
|
168
|
+
} catch (commitError) {
|
|
169
|
+
// Commit might fail if there's nothing to commit or git user not configured
|
|
170
|
+
const errorMessage = commitError instanceof Error ? commitError.message : String(commitError)
|
|
171
|
+
if (errorMessage.includes('nothing to commit')) {
|
|
172
|
+
console.log(' No changes to commit.')
|
|
173
|
+
} else if (errorMessage.includes('user.email') || errorMessage.includes('user.name')) {
|
|
174
|
+
console.warn('\n Warning: Git user not configured.')
|
|
175
|
+
console.warn(' Run: git config --global user.name "Your Name"')
|
|
176
|
+
console.warn(' Run: git config --global user.email "your@email.com"\n')
|
|
177
|
+
} else {
|
|
178
|
+
console.warn(`\n Warning: Could not create commit: ${errorMessage}\n`)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
} catch (error) {
|
|
183
|
+
const errorMessage = error instanceof Error ? error.message : String(error)
|
|
184
|
+
console.warn(`\n Warning: Git setup failed: ${errorMessage}`)
|
|
185
|
+
console.warn(' You can initialize Git manually later.\n')
|
|
186
|
+
}
|
|
187
|
+
}
|