@nextsparkjs/core 0.1.0-beta.1 → 0.1.0-beta.3
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/LICENSE +21 -0
- 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,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Entity Configuration - Starter Theme
|
|
3
|
+
*
|
|
4
|
+
* 5-section structure for entity configuration.
|
|
5
|
+
* All table names, API paths, and metadata are derived automatically from slug.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { CheckSquare } from 'lucide-react'
|
|
9
|
+
import type { EntityConfig } from '@nextsparkjs/core/lib/entities/types'
|
|
10
|
+
import { taskFields } from './tasks.fields'
|
|
11
|
+
|
|
12
|
+
export const taskEntityConfig: EntityConfig = {
|
|
13
|
+
// ==========================================
|
|
14
|
+
// 1. BASIC IDENTIFICATION
|
|
15
|
+
// ==========================================
|
|
16
|
+
slug: 'tasks', // Single source of truth - derives tableName, apiPath, metaTableName, i18nNamespace
|
|
17
|
+
enabled: true,
|
|
18
|
+
names: {
|
|
19
|
+
singular: 'task',
|
|
20
|
+
plural: 'Tasks',
|
|
21
|
+
},
|
|
22
|
+
icon: CheckSquare,
|
|
23
|
+
|
|
24
|
+
// ==========================================
|
|
25
|
+
// 2. ACCESS AND SCOPE CONFIGURATION
|
|
26
|
+
// ==========================================
|
|
27
|
+
access: {
|
|
28
|
+
public: false, // If accessible without authentication, requires RLS (anon can select)
|
|
29
|
+
api: true, // If has external API via API key
|
|
30
|
+
metadata: true, // If supports metadata system
|
|
31
|
+
shared: false, // CASE 2: Any authenticated user can access all records (no userId filter)
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
// ==========================================
|
|
35
|
+
// 3. UI/UX FEATURES
|
|
36
|
+
// ==========================================
|
|
37
|
+
ui: {
|
|
38
|
+
dashboard: {
|
|
39
|
+
showInMenu: true,
|
|
40
|
+
showInTopbar: true,
|
|
41
|
+
},
|
|
42
|
+
public: {
|
|
43
|
+
hasArchivePage: false,
|
|
44
|
+
hasSinglePage: false,
|
|
45
|
+
},
|
|
46
|
+
features: {
|
|
47
|
+
searchable: true,
|
|
48
|
+
sortable: true,
|
|
49
|
+
filterable: true,
|
|
50
|
+
bulkOperations: true,
|
|
51
|
+
importExport: false,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// ==========================================
|
|
56
|
+
// 4. PERMISSIONS SYSTEM
|
|
57
|
+
// ==========================================
|
|
58
|
+
permissions: {
|
|
59
|
+
actions: [
|
|
60
|
+
{
|
|
61
|
+
action: 'create',
|
|
62
|
+
label: 'Create tasks',
|
|
63
|
+
description: 'Can create new tasks',
|
|
64
|
+
roles: ['owner', 'admin', 'member'],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
action: 'read',
|
|
68
|
+
label: 'View tasks',
|
|
69
|
+
description: 'Can view task details',
|
|
70
|
+
roles: ['owner', 'admin', 'member'],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
action: 'list',
|
|
74
|
+
label: 'List tasks',
|
|
75
|
+
description: 'Can see the tasks list',
|
|
76
|
+
roles: ['owner', 'admin', 'member'],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
action: 'update',
|
|
80
|
+
label: 'Edit tasks',
|
|
81
|
+
description: 'Can modify task information',
|
|
82
|
+
roles: ['owner', 'admin', 'member'],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
action: 'delete',
|
|
86
|
+
label: 'Delete tasks',
|
|
87
|
+
description: 'Can delete tasks',
|
|
88
|
+
roles: ['owner', 'admin'],
|
|
89
|
+
dangerous: true,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
customActions: [
|
|
93
|
+
{
|
|
94
|
+
action: 'assign',
|
|
95
|
+
label: 'Assign tasks',
|
|
96
|
+
description: 'Can assign tasks to team members',
|
|
97
|
+
roles: ['owner', 'admin'],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// ==========================================
|
|
103
|
+
// 5. INTERNATIONALIZATION
|
|
104
|
+
// ==========================================
|
|
105
|
+
i18n: {
|
|
106
|
+
fallbackLocale: 'en',
|
|
107
|
+
loaders: {
|
|
108
|
+
en: () => import('./messages/en.json'),
|
|
109
|
+
es: () => import('./messages/es.json'),
|
|
110
|
+
fr: () => import('./messages/fr.json'),
|
|
111
|
+
it: () => import('./messages/it.json'),
|
|
112
|
+
de: () => import('./messages/de.json'),
|
|
113
|
+
pt: () => import('./messages/pt.json'),
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
// ==========================================
|
|
118
|
+
// FIELDS (imported from separate file)
|
|
119
|
+
// ==========================================
|
|
120
|
+
fields: taskFields,
|
|
121
|
+
|
|
122
|
+
// ==========================================
|
|
123
|
+
// AUTOMATIC SYSTEM DERIVATIONS
|
|
124
|
+
// ==========================================
|
|
125
|
+
// The following properties are automatically derived from the slug:
|
|
126
|
+
// - tableName: 'tasks' (slug)
|
|
127
|
+
// - metaTableName: 'tasks_metas' (slug + '_metas')
|
|
128
|
+
// - apiPath: '/api/v1/tasks' (slug API Route)
|
|
129
|
+
// - i18nNamespace: 'tasks' (slug as namespace)
|
|
130
|
+
// - foreignKey in metadata: 'entityId' (generic for all entities)
|
|
131
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Entity Fields Configuration - Starter Theme
|
|
3
|
+
*
|
|
4
|
+
* Contains all field definitions for the tasks entity.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { EntityField } from '@nextsparkjs/core/lib/entities/types'
|
|
8
|
+
|
|
9
|
+
export const taskFields: EntityField[] = [
|
|
10
|
+
{
|
|
11
|
+
name: 'title',
|
|
12
|
+
type: 'text',
|
|
13
|
+
required: true,
|
|
14
|
+
display: {
|
|
15
|
+
label: 'Title',
|
|
16
|
+
description: 'Task title or name',
|
|
17
|
+
placeholder: 'Enter task title...',
|
|
18
|
+
showInList: true,
|
|
19
|
+
showInDetail: true,
|
|
20
|
+
showInForm: true,
|
|
21
|
+
order: 1,
|
|
22
|
+
columnWidth: 12,
|
|
23
|
+
},
|
|
24
|
+
api: {
|
|
25
|
+
readOnly: false,
|
|
26
|
+
searchable: true,
|
|
27
|
+
sortable: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'description',
|
|
32
|
+
type: 'textarea',
|
|
33
|
+
required: false,
|
|
34
|
+
display: {
|
|
35
|
+
label: 'Description',
|
|
36
|
+
description: 'Detailed task description',
|
|
37
|
+
placeholder: 'Enter task description...',
|
|
38
|
+
showInList: false,
|
|
39
|
+
showInDetail: true,
|
|
40
|
+
showInForm: true,
|
|
41
|
+
order: 2,
|
|
42
|
+
columnWidth: 12,
|
|
43
|
+
},
|
|
44
|
+
api: {
|
|
45
|
+
readOnly: false,
|
|
46
|
+
searchable: true,
|
|
47
|
+
sortable: false,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'status',
|
|
52
|
+
type: 'select',
|
|
53
|
+
required: false,
|
|
54
|
+
defaultValue: 'todo',
|
|
55
|
+
options: [
|
|
56
|
+
{ value: 'todo', label: 'To Do' },
|
|
57
|
+
{ value: 'in-progress', label: 'In Progress' },
|
|
58
|
+
{ value: 'review', label: 'In Review' },
|
|
59
|
+
{ value: 'done', label: 'Done' },
|
|
60
|
+
{ value: 'blocked', label: 'Blocked' },
|
|
61
|
+
],
|
|
62
|
+
display: {
|
|
63
|
+
label: 'Status',
|
|
64
|
+
description: 'Current task status',
|
|
65
|
+
placeholder: 'Select status...',
|
|
66
|
+
showInList: true,
|
|
67
|
+
showInDetail: true,
|
|
68
|
+
showInForm: true,
|
|
69
|
+
order: 3,
|
|
70
|
+
columnWidth: 4,
|
|
71
|
+
},
|
|
72
|
+
api: {
|
|
73
|
+
readOnly: false,
|
|
74
|
+
searchable: false,
|
|
75
|
+
sortable: true,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'priority',
|
|
80
|
+
type: 'select',
|
|
81
|
+
required: false,
|
|
82
|
+
defaultValue: 'medium',
|
|
83
|
+
options: [
|
|
84
|
+
{ value: 'low', label: 'Low' },
|
|
85
|
+
{ value: 'medium', label: 'Medium' },
|
|
86
|
+
{ value: 'high', label: 'High' },
|
|
87
|
+
{ value: 'urgent', label: 'Urgent' },
|
|
88
|
+
],
|
|
89
|
+
display: {
|
|
90
|
+
label: 'Priority',
|
|
91
|
+
description: 'Task priority level',
|
|
92
|
+
placeholder: 'Select priority...',
|
|
93
|
+
showInList: true,
|
|
94
|
+
showInDetail: true,
|
|
95
|
+
showInForm: true,
|
|
96
|
+
order: 4,
|
|
97
|
+
columnWidth: 4,
|
|
98
|
+
},
|
|
99
|
+
api: {
|
|
100
|
+
readOnly: false,
|
|
101
|
+
searchable: false,
|
|
102
|
+
sortable: true,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'tags',
|
|
107
|
+
type: 'tags',
|
|
108
|
+
required: false,
|
|
109
|
+
display: {
|
|
110
|
+
label: 'Tags',
|
|
111
|
+
description: 'Task tags for categorization',
|
|
112
|
+
placeholder: 'Add tags...',
|
|
113
|
+
showInList: false,
|
|
114
|
+
showInDetail: true,
|
|
115
|
+
showInForm: true,
|
|
116
|
+
order: 5,
|
|
117
|
+
columnWidth: 6,
|
|
118
|
+
},
|
|
119
|
+
api: {
|
|
120
|
+
readOnly: false,
|
|
121
|
+
searchable: true,
|
|
122
|
+
sortable: false,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'dueDate',
|
|
127
|
+
type: 'date',
|
|
128
|
+
required: false,
|
|
129
|
+
display: {
|
|
130
|
+
label: 'Due Date',
|
|
131
|
+
description: 'Task deadline',
|
|
132
|
+
placeholder: 'Select due date...',
|
|
133
|
+
showInList: true,
|
|
134
|
+
showInDetail: true,
|
|
135
|
+
showInForm: true,
|
|
136
|
+
order: 6,
|
|
137
|
+
columnWidth: 4,
|
|
138
|
+
},
|
|
139
|
+
api: {
|
|
140
|
+
readOnly: false,
|
|
141
|
+
searchable: false,
|
|
142
|
+
sortable: true,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'estimatedHours',
|
|
147
|
+
type: 'number',
|
|
148
|
+
required: false,
|
|
149
|
+
display: {
|
|
150
|
+
label: 'Estimated Hours',
|
|
151
|
+
description: 'Estimated time to complete (in hours)',
|
|
152
|
+
placeholder: '0',
|
|
153
|
+
showInList: false,
|
|
154
|
+
showInDetail: true,
|
|
155
|
+
showInForm: true,
|
|
156
|
+
order: 7,
|
|
157
|
+
columnWidth: 4,
|
|
158
|
+
},
|
|
159
|
+
api: {
|
|
160
|
+
readOnly: false,
|
|
161
|
+
searchable: false,
|
|
162
|
+
sortable: true,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'completed',
|
|
167
|
+
type: 'boolean',
|
|
168
|
+
required: false,
|
|
169
|
+
defaultValue: false,
|
|
170
|
+
display: {
|
|
171
|
+
label: 'Completed',
|
|
172
|
+
description: 'Mark as completed (legacy field, use status instead)',
|
|
173
|
+
showInList: false,
|
|
174
|
+
showInDetail: true,
|
|
175
|
+
showInForm: false,
|
|
176
|
+
order: 8,
|
|
177
|
+
columnWidth: 4,
|
|
178
|
+
},
|
|
179
|
+
api: {
|
|
180
|
+
readOnly: false,
|
|
181
|
+
searchable: false,
|
|
182
|
+
sortable: true,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
// NOTE: createdAt and updatedAt are implicit system fields
|
|
186
|
+
// They are automatically included by the API and frontend components
|
|
187
|
+
// Do NOT declare them here - see core/lib/entities/system-fields.ts
|
|
188
|
+
]
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tasks Service - Starter Theme
|
|
3
|
+
*
|
|
4
|
+
* Provides data access methods for tasks.
|
|
5
|
+
* Tasks is a private entity with shared: false - users only see their own tasks.
|
|
6
|
+
*
|
|
7
|
+
* All methods require authentication (use RLS with userId filter).
|
|
8
|
+
*
|
|
9
|
+
* @module TasksService
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { queryOneWithRLS, queryWithRLS } from '@nextsparkjs/core/lib/db'
|
|
13
|
+
import type {
|
|
14
|
+
Task,
|
|
15
|
+
TaskListOptions,
|
|
16
|
+
TaskListResult,
|
|
17
|
+
TaskStatus,
|
|
18
|
+
} from './tasks.types'
|
|
19
|
+
|
|
20
|
+
// Database row type for task
|
|
21
|
+
interface DbTask {
|
|
22
|
+
id: string
|
|
23
|
+
title: string
|
|
24
|
+
description: string | null
|
|
25
|
+
status: TaskStatus
|
|
26
|
+
priority: string
|
|
27
|
+
tags: string[] | null
|
|
28
|
+
dueDate: string | null
|
|
29
|
+
estimatedHours: number | null
|
|
30
|
+
completed: boolean | null
|
|
31
|
+
createdAt: string
|
|
32
|
+
updatedAt: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class TasksService {
|
|
36
|
+
// ============================================
|
|
37
|
+
// AUTHENTICATED METHODS (with RLS)
|
|
38
|
+
// ============================================
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get a task by ID
|
|
42
|
+
*
|
|
43
|
+
* Respects RLS policies. Since tasks has shared: false,
|
|
44
|
+
* only the task owner can access it.
|
|
45
|
+
*
|
|
46
|
+
* @param id - Task ID
|
|
47
|
+
* @param userId - Current user ID for RLS
|
|
48
|
+
* @returns Task data or null if not found/not authorized
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const task = await TasksService.getById('task-uuid', currentUserId)
|
|
52
|
+
*/
|
|
53
|
+
static async getById(id: string, userId: string): Promise<Task | null> {
|
|
54
|
+
try {
|
|
55
|
+
if (!id || id.trim() === '') {
|
|
56
|
+
throw new Error('Task ID is required')
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!userId || userId.trim() === '') {
|
|
60
|
+
throw new Error('User ID is required for authentication')
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const task = await queryOneWithRLS<DbTask>(
|
|
64
|
+
`
|
|
65
|
+
SELECT
|
|
66
|
+
id,
|
|
67
|
+
title,
|
|
68
|
+
description,
|
|
69
|
+
status,
|
|
70
|
+
priority,
|
|
71
|
+
tags,
|
|
72
|
+
"dueDate",
|
|
73
|
+
"estimatedHours",
|
|
74
|
+
completed,
|
|
75
|
+
"createdAt",
|
|
76
|
+
"updatedAt"
|
|
77
|
+
FROM tasks
|
|
78
|
+
WHERE id = $1
|
|
79
|
+
`,
|
|
80
|
+
[id],
|
|
81
|
+
userId
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
if (!task) {
|
|
85
|
+
return null
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
id: task.id,
|
|
90
|
+
title: task.title,
|
|
91
|
+
description: task.description ?? undefined,
|
|
92
|
+
status: task.status,
|
|
93
|
+
priority: task.priority as Task['priority'],
|
|
94
|
+
tags: task.tags ?? undefined,
|
|
95
|
+
dueDate: task.dueDate ?? undefined,
|
|
96
|
+
estimatedHours: task.estimatedHours ?? undefined,
|
|
97
|
+
completed: task.completed ?? undefined,
|
|
98
|
+
createdAt: task.createdAt,
|
|
99
|
+
updatedAt: task.updatedAt,
|
|
100
|
+
}
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error('TasksService.getById error:', error)
|
|
103
|
+
throw new Error(
|
|
104
|
+
error instanceof Error ? error.message : 'Failed to fetch task'
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* List tasks with pagination and filtering
|
|
111
|
+
*
|
|
112
|
+
* @param userId - Current user ID for RLS
|
|
113
|
+
* @param options - List options (limit, offset, status, priority, orderBy, orderDir)
|
|
114
|
+
* @returns Object with tasks array and total count
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* const { tasks, total } = await TasksService.list(currentUserId, {
|
|
118
|
+
* status: 'todo',
|
|
119
|
+
* limit: 10
|
|
120
|
+
* })
|
|
121
|
+
*/
|
|
122
|
+
static async list(
|
|
123
|
+
userId: string,
|
|
124
|
+
options: TaskListOptions = {}
|
|
125
|
+
): Promise<TaskListResult> {
|
|
126
|
+
try {
|
|
127
|
+
if (!userId || userId.trim() === '') {
|
|
128
|
+
throw new Error('User ID is required for authentication')
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const {
|
|
132
|
+
limit = 10,
|
|
133
|
+
offset = 0,
|
|
134
|
+
status,
|
|
135
|
+
priority,
|
|
136
|
+
orderBy = 'createdAt',
|
|
137
|
+
orderDir = 'desc',
|
|
138
|
+
} = options
|
|
139
|
+
|
|
140
|
+
// Build WHERE clause
|
|
141
|
+
const conditions: string[] = []
|
|
142
|
+
const params: unknown[] = []
|
|
143
|
+
let paramIndex = 1
|
|
144
|
+
|
|
145
|
+
if (status) {
|
|
146
|
+
conditions.push(`status = $${paramIndex}`)
|
|
147
|
+
params.push(status)
|
|
148
|
+
paramIndex++
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (priority) {
|
|
152
|
+
conditions.push(`priority = $${paramIndex}`)
|
|
153
|
+
params.push(priority)
|
|
154
|
+
paramIndex++
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const whereClause =
|
|
158
|
+
conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : ''
|
|
159
|
+
|
|
160
|
+
// Validate orderBy to prevent SQL injection
|
|
161
|
+
const validOrderBy = [
|
|
162
|
+
'title',
|
|
163
|
+
'status',
|
|
164
|
+
'priority',
|
|
165
|
+
'dueDate',
|
|
166
|
+
'createdAt',
|
|
167
|
+
].includes(orderBy)
|
|
168
|
+
? orderBy
|
|
169
|
+
: 'createdAt'
|
|
170
|
+
const validOrderDir = orderDir === 'asc' ? 'ASC' : 'DESC'
|
|
171
|
+
|
|
172
|
+
// Map field names to database columns
|
|
173
|
+
const orderColumnMap: Record<string, string> = {
|
|
174
|
+
title: 'title',
|
|
175
|
+
status: 'status',
|
|
176
|
+
priority: 'priority',
|
|
177
|
+
dueDate: '"dueDate"',
|
|
178
|
+
createdAt: '"createdAt"',
|
|
179
|
+
}
|
|
180
|
+
const orderColumn = orderColumnMap[validOrderBy] || '"createdAt"'
|
|
181
|
+
|
|
182
|
+
// Get total count
|
|
183
|
+
const countResult = await queryWithRLS<{ count: string }>(
|
|
184
|
+
`SELECT COUNT(*)::text as count FROM tasks ${whereClause}`,
|
|
185
|
+
params,
|
|
186
|
+
userId
|
|
187
|
+
)
|
|
188
|
+
const total = parseInt(countResult[0]?.count || '0', 10)
|
|
189
|
+
|
|
190
|
+
// Get tasks
|
|
191
|
+
params.push(limit, offset)
|
|
192
|
+
const tasks = await queryWithRLS<DbTask>(
|
|
193
|
+
`
|
|
194
|
+
SELECT
|
|
195
|
+
id,
|
|
196
|
+
title,
|
|
197
|
+
description,
|
|
198
|
+
status,
|
|
199
|
+
priority,
|
|
200
|
+
tags,
|
|
201
|
+
"dueDate",
|
|
202
|
+
"estimatedHours",
|
|
203
|
+
completed,
|
|
204
|
+
"createdAt",
|
|
205
|
+
"updatedAt"
|
|
206
|
+
FROM tasks
|
|
207
|
+
${whereClause}
|
|
208
|
+
ORDER BY ${orderColumn} ${validOrderDir}
|
|
209
|
+
LIMIT $${paramIndex} OFFSET $${paramIndex + 1}
|
|
210
|
+
`,
|
|
211
|
+
params,
|
|
212
|
+
userId
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
return {
|
|
216
|
+
tasks: tasks.map((task) => ({
|
|
217
|
+
id: task.id,
|
|
218
|
+
title: task.title,
|
|
219
|
+
description: task.description ?? undefined,
|
|
220
|
+
status: task.status,
|
|
221
|
+
priority: task.priority as Task['priority'],
|
|
222
|
+
tags: task.tags ?? undefined,
|
|
223
|
+
dueDate: task.dueDate ?? undefined,
|
|
224
|
+
estimatedHours: task.estimatedHours ?? undefined,
|
|
225
|
+
completed: task.completed ?? undefined,
|
|
226
|
+
createdAt: task.createdAt,
|
|
227
|
+
updatedAt: task.updatedAt,
|
|
228
|
+
})),
|
|
229
|
+
total,
|
|
230
|
+
}
|
|
231
|
+
} catch (error) {
|
|
232
|
+
console.error('TasksService.list error:', error)
|
|
233
|
+
throw new Error(
|
|
234
|
+
error instanceof Error ? error.message : 'Failed to list tasks'
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Get tasks by status
|
|
241
|
+
*
|
|
242
|
+
* Convenience method to fetch all tasks with a specific status.
|
|
243
|
+
*
|
|
244
|
+
* @param userId - Current user ID for RLS
|
|
245
|
+
* @param status - Task status to filter by
|
|
246
|
+
* @returns Array of tasks with the given status
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* const todoTasks = await TasksService.getByStatus(currentUserId, 'todo')
|
|
250
|
+
*/
|
|
251
|
+
static async getByStatus(userId: string, status: TaskStatus): Promise<Task[]> {
|
|
252
|
+
try {
|
|
253
|
+
const { tasks } = await this.list(userId, {
|
|
254
|
+
status,
|
|
255
|
+
limit: 1000, // Large limit to get all matching tasks
|
|
256
|
+
orderBy: 'priority',
|
|
257
|
+
orderDir: 'desc',
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
return tasks
|
|
261
|
+
} catch (error) {
|
|
262
|
+
console.error('TasksService.getByStatus error:', error)
|
|
263
|
+
throw new Error(
|
|
264
|
+
error instanceof Error
|
|
265
|
+
? error.message
|
|
266
|
+
: 'Failed to fetch tasks by status'
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Get overdue tasks
|
|
273
|
+
*
|
|
274
|
+
* Fetches tasks that are past their due date and not completed.
|
|
275
|
+
*
|
|
276
|
+
* @param userId - Current user ID for RLS
|
|
277
|
+
* @returns Array of overdue tasks
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* const overdueTasks = await TasksService.getOverdue(currentUserId)
|
|
281
|
+
*/
|
|
282
|
+
static async getOverdue(userId: string): Promise<Task[]> {
|
|
283
|
+
try {
|
|
284
|
+
if (!userId || userId.trim() === '') {
|
|
285
|
+
throw new Error('User ID is required for authentication')
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const tasks = await queryWithRLS<DbTask>(
|
|
289
|
+
`
|
|
290
|
+
SELECT
|
|
291
|
+
id,
|
|
292
|
+
title,
|
|
293
|
+
description,
|
|
294
|
+
status,
|
|
295
|
+
priority,
|
|
296
|
+
tags,
|
|
297
|
+
"dueDate",
|
|
298
|
+
"estimatedHours",
|
|
299
|
+
completed,
|
|
300
|
+
"createdAt",
|
|
301
|
+
"updatedAt"
|
|
302
|
+
FROM tasks
|
|
303
|
+
WHERE "dueDate" < CURRENT_DATE
|
|
304
|
+
AND status != 'done'
|
|
305
|
+
AND (completed IS NULL OR completed = false)
|
|
306
|
+
ORDER BY "dueDate" ASC
|
|
307
|
+
`,
|
|
308
|
+
[],
|
|
309
|
+
userId
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
return tasks.map((task) => ({
|
|
313
|
+
id: task.id,
|
|
314
|
+
title: task.title,
|
|
315
|
+
description: task.description ?? undefined,
|
|
316
|
+
status: task.status,
|
|
317
|
+
priority: task.priority as Task['priority'],
|
|
318
|
+
tags: task.tags ?? undefined,
|
|
319
|
+
dueDate: task.dueDate ?? undefined,
|
|
320
|
+
estimatedHours: task.estimatedHours ?? undefined,
|
|
321
|
+
completed: task.completed ?? undefined,
|
|
322
|
+
createdAt: task.createdAt,
|
|
323
|
+
updatedAt: task.updatedAt,
|
|
324
|
+
}))
|
|
325
|
+
} catch (error) {
|
|
326
|
+
console.error('TasksService.getOverdue error:', error)
|
|
327
|
+
throw new Error(
|
|
328
|
+
error instanceof Error ? error.message : 'Failed to fetch overdue tasks'
|
|
329
|
+
)
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Get tasks due today
|
|
335
|
+
*
|
|
336
|
+
* @param userId - Current user ID for RLS
|
|
337
|
+
* @returns Array of tasks due today
|
|
338
|
+
*/
|
|
339
|
+
static async getDueToday(userId: string): Promise<Task[]> {
|
|
340
|
+
try {
|
|
341
|
+
if (!userId || userId.trim() === '') {
|
|
342
|
+
throw new Error('User ID is required for authentication')
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const tasks = await queryWithRLS<DbTask>(
|
|
346
|
+
`
|
|
347
|
+
SELECT
|
|
348
|
+
id,
|
|
349
|
+
title,
|
|
350
|
+
description,
|
|
351
|
+
status,
|
|
352
|
+
priority,
|
|
353
|
+
tags,
|
|
354
|
+
"dueDate",
|
|
355
|
+
"estimatedHours",
|
|
356
|
+
completed,
|
|
357
|
+
"createdAt",
|
|
358
|
+
"updatedAt"
|
|
359
|
+
FROM tasks
|
|
360
|
+
WHERE "dueDate" = CURRENT_DATE
|
|
361
|
+
AND status != 'done'
|
|
362
|
+
ORDER BY priority DESC, "createdAt" ASC
|
|
363
|
+
`,
|
|
364
|
+
[],
|
|
365
|
+
userId
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
return tasks.map((task) => ({
|
|
369
|
+
id: task.id,
|
|
370
|
+
title: task.title,
|
|
371
|
+
description: task.description ?? undefined,
|
|
372
|
+
status: task.status,
|
|
373
|
+
priority: task.priority as Task['priority'],
|
|
374
|
+
tags: task.tags ?? undefined,
|
|
375
|
+
dueDate: task.dueDate ?? undefined,
|
|
376
|
+
estimatedHours: task.estimatedHours ?? undefined,
|
|
377
|
+
completed: task.completed ?? undefined,
|
|
378
|
+
createdAt: task.createdAt,
|
|
379
|
+
updatedAt: task.updatedAt,
|
|
380
|
+
}))
|
|
381
|
+
} catch (error) {
|
|
382
|
+
console.error('TasksService.getDueToday error:', error)
|
|
383
|
+
throw new Error(
|
|
384
|
+
error instanceof Error
|
|
385
|
+
? error.message
|
|
386
|
+
: 'Failed to fetch tasks due today'
|
|
387
|
+
)
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|