@qlover/create-app 0.7.12 → 0.7.14

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/index.cjs +7 -7
  3. package/dist/index.js +8 -8
  4. package/dist/templates/next-app/config/IOCIdentifier.ts +14 -1
  5. package/dist/templates/next-app/config/Identifier/index.ts +1 -0
  6. package/dist/templates/next-app/config/Identifier/page.admin.ts +48 -0
  7. package/dist/templates/next-app/config/i18n/admin18n.ts +33 -0
  8. package/dist/templates/next-app/config/i18n/index.ts +3 -1
  9. package/dist/templates/next-app/migrations/schema/UserSchema.ts +2 -2
  10. package/dist/templates/next-app/next.config.ts +1 -1
  11. package/dist/templates/next-app/package.json +3 -1
  12. package/dist/templates/next-app/public/locales/en.json +8 -1
  13. package/dist/templates/next-app/public/locales/zh.json +8 -1
  14. package/dist/templates/next-app/src/app/[locale]/admin/layout.tsx +1 -1
  15. package/dist/templates/next-app/src/app/[locale]/admin/page.tsx +14 -16
  16. package/dist/templates/next-app/src/app/[locale]/admin/users/page.tsx +10 -3
  17. package/dist/templates/next-app/src/app/[locale]/layout.tsx +1 -1
  18. package/dist/templates/next-app/src/app/[locale]/login/page.tsx +1 -1
  19. package/dist/templates/next-app/src/app/[locale]/page.tsx +2 -3
  20. package/dist/templates/next-app/src/app/[locale]/register/page.tsx +1 -1
  21. package/dist/templates/next-app/src/app/api/ai/completions/route.ts +32 -0
  22. package/dist/templates/next-app/src/base/cases/AppConfig.ts +3 -0
  23. package/dist/templates/next-app/src/base/cases/ChatAction.ts +21 -0
  24. package/dist/templates/next-app/src/base/cases/FocusBarAction.ts +36 -0
  25. package/dist/templates/next-app/src/base/port/AdminPageInterface.ts +1 -3
  26. package/dist/templates/next-app/src/base/services/AdminUserService.ts +1 -1
  27. package/dist/templates/next-app/src/base/services/adminApi/AdminUserApi.ts +1 -1
  28. package/dist/templates/next-app/src/base/services/appApi/AppApiPlugin.ts +23 -1
  29. package/dist/templates/next-app/src/base/services/appApi/AppUserApiBootstrap.ts +2 -2
  30. package/dist/templates/next-app/src/base/types/PageProps.ts +1 -1
  31. package/dist/templates/next-app/src/core/bootstraps/BootstrapClient.ts +1 -0
  32. package/dist/templates/next-app/src/core/bootstraps/BootstrapServer.ts +1 -0
  33. package/dist/templates/next-app/src/core/globals.ts +2 -0
  34. package/dist/templates/next-app/src/core/serverIoc/ServerIOCRegister.ts +4 -1
  35. package/dist/templates/next-app/src/{base/cases → server}/PageParams.ts +1 -1
  36. package/dist/templates/next-app/src/server/port/DBBridgeInterface.ts +31 -0
  37. package/dist/templates/next-app/src/server/port/DBTableInterface.ts +1 -1
  38. package/dist/templates/next-app/src/server/repositorys/UserRepository.ts +6 -4
  39. package/dist/templates/next-app/src/server/services/AIService.ts +43 -0
  40. package/dist/templates/next-app/src/server/services/ApiUserService.ts +1 -1
  41. package/dist/templates/next-app/src/server/{SupabaseBridge.ts → sqlBridges/SupabaseBridge.ts} +16 -11
  42. package/dist/templates/next-app/src/server/validators/LoginValidator.ts +4 -4
  43. package/dist/templates/next-app/src/server/validators/PaginationValidator.ts +1 -1
  44. package/dist/templates/next-app/src/uikit/components/AdminLayout.tsx +32 -25
  45. package/dist/templates/next-app/src/uikit/components/BaseHeader.tsx +12 -26
  46. package/dist/templates/next-app/src/uikit/components/BaseLayout.tsx +37 -5
  47. package/dist/templates/next-app/src/uikit/components/ChatRoot.tsx +17 -0
  48. package/dist/templates/next-app/src/uikit/components/ClientSeo.tsx +36 -0
  49. package/dist/templates/next-app/src/uikit/components/LanguageSwitcher.tsx +5 -6
  50. package/dist/templates/next-app/src/uikit/components/LogoutButton.tsx +2 -0
  51. package/dist/templates/next-app/src/uikit/components/With.tsx +17 -0
  52. package/dist/templates/next-app/src/uikit/components/chat/ChatActionInterface.ts +30 -0
  53. package/dist/templates/next-app/src/uikit/components/chat/ChatFocusBar.tsx +65 -0
  54. package/dist/templates/next-app/src/uikit/components/chat/ChatMessages.tsx +59 -0
  55. package/dist/templates/next-app/src/uikit/components/chat/ChatWrap.tsx +28 -0
  56. package/dist/templates/next-app/src/uikit/components/chat/FocusBarActionInterface.ts +19 -0
  57. package/package.json +1 -1
  58. package/dist/templates/next-app/src/base/port/DBBridgeInterface.ts +0 -21
  59. package/dist/templates/next-app/src/base/port/DBMigrationInterface.ts +0 -92
  60. package/dist/templates/next-app/src/base/port/MigrationApiInterface.ts +0 -3
  61. package/dist/templates/next-app/src/base/port/ServerApiResponseInterface.ts +0 -6
  62. package/dist/templates/next-app/src/base/services/migrations/MigrationsApi.ts +0 -43
  63. package/dist/templates/next-app/config/i18n/{HomeI18n .ts → HomeI18n.ts} +0 -0
  64. package/dist/templates/next-app/{build → make}/generateLocales.ts +2 -2
  65. /package/dist/templates/next-app/src/{base → server}/port/PaginationInterface.ts +0 -0
  66. /package/dist/templates/next-app/src/{base → server}/port/ParamsHandlerInterface.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,82 @@
1
1
  # @qlover/create-app
2
2
 
3
+ ## 0.7.14
4
+
5
+ ### Patch Changes
6
+
7
+ #### ✨ Features
8
+
9
+ - **next-app:** integrate SupabaseBridge and update database handling ([5d84568](https://github.com/qlover/fe-base/commit/5d84568849170c998c81b663f0eb5f5f144d8da3)) ([#518](https://github.com/qlover/fe-base/pull/518))
10
+ - Added SupabaseBridge for managing database interactions, implementing the DBBridgeInterface for standardized operations.
11
+ - Updated UserRepository to utilize the new DBBridgeInterface for database operations.
12
+ - Enhanced AppConfig to switch OpenAI configuration to Cerebras.
13
+ - Refactored UserSchema validation to improve type safety with Zod.
14
+ - Introduced new pagination handling in DBBridgeInterface for better data management.
15
+
16
+ These changes aim to enhance database management capabilities and improve the overall structure of data handling within the application.
17
+
18
+ - **next-app:** add HomeI18n for localization and enhance layout components ([390a637](https://github.com/qlover/fe-base/commit/390a6375b458c57ca69517d3e4cf1b938f7b4aea)) ([#518](https://github.com/qlover/fe-base/pull/518))
19
+ - Introduced HomeI18n interface and constants for home page localization, improving internationalization support.
20
+ - Updated index.ts to export HomeI18n for easier access across the application.
21
+ - Refactored page.tsx to integrate homeI18n, enhancing metadata handling for the home page.
22
+ - Improved AdminLayout and BaseHeader components by adding right action buttons for language switching, theme toggling, and logout functionality.
23
+ - Enhanced BaseLayout to conditionally render admin navigation elements, improving user experience in the admin section.
24
+
25
+ These changes aim to provide better localization support and enhance the overall structure and usability of the application.
26
+
27
+ - **next-app:** add admin page localization and SEO components ([d8ca688](https://github.com/qlover/fe-base/commit/d8ca68861c5b2dc80763622b2f37de6ea0cfb437)) ([#518](https://github.com/qlover/fe-base/pull/518))
28
+ - Introduced new localization constants for the admin page, enhancing internationalization support.
29
+ - Created admin18n interface for managing admin page metadata and content.
30
+ - Added ClientSeo component for improved SEO handling on the admin page.
31
+ - Updated admin page structure to utilize new localization and SEO features, enhancing user experience.
32
+ - Refactored localization files to include new keys for admin page content in both English and Chinese.
33
+
34
+ These changes aim to improve the admin page's usability and visibility through better localization and SEO practices.
35
+
36
+ #### 🐞 Bug Fixes
37
+
38
+ - **create-app:** change build to make ([ea48d14](https://github.com/qlover/fe-base/commit/ea48d140e6f7684efc2e3097046bce82b6448d14)) ([#518](https://github.com/qlover/fe-base/pull/518))
39
+
40
+ #### ♻️ Refactors
41
+
42
+ - **next-app:** remove i18nService dependency from layout components ([c4647fa](https://github.com/qlover/fe-base/commit/c4647fa3a51a72354a70e200dd92439d64548fa2)) ([#520](https://github.com/qlover/fe-base/pull/520))
43
+ - Eliminated the i18nService dependency from AdminLayout and BaseLayout components to simplify the code structure.
44
+ - Updated LanguageSwitcher to directly use the i18nService via IOC, enhancing encapsulation and reducing prop drilling.
45
+ - Adjusted memoization dependencies in right action buttons to reflect the removal of i18nService.
46
+
47
+ These changes aim to streamline the layout components and improve maintainability by reducing unnecessary dependencies.
48
+
49
+ - **next-app:** reorganize imports and migrate PageParams to server ([fb6a47b](https://github.com/qlover/fe-base/commit/fb6a47b5b3a293b7d3e8488690e13b1509e9cfde)) ([#518](https://github.com/qlover/fe-base/pull/518))
50
+ - Updated import paths for PageParams and DBBridgeInterface to reflect new server structure.
51
+ - Removed obsolete migration-related interfaces and classes to streamline the codebase.
52
+ - Introduced new PageParams class in the server directory to handle localization and parameter management.
53
+
54
+ These changes aim to enhance code organization and improve the clarity of parameter handling within the application.
55
+
56
+ - **next-app:** update PaginationInterface imports and add new file ([dfd9866](https://github.com/qlover/fe-base/commit/dfd98660ea51989e604cb7d78d935590473bc05b)) ([#518](https://github.com/qlover/fe-base/pull/518))
57
+ - Changed import paths for PaginationInterface across multiple files to reflect its new location in the server directory.
58
+ - Introduced a new PaginationInterface file in the server port directory, defining the structure for pagination handling.
59
+
60
+ These changes aim to improve code organization and maintainability by centralizing pagination-related definitions.
61
+
62
+ - **next-app:** reorganize imports and update dependencies ([a1049f4](https://github.com/qlover/fe-base/commit/a1049f4bd61b012ca1938c803bdc3a4c43ef0c9a)) ([#518](https://github.com/qlover/fe-base/pull/518))
63
+ - Removed duplicate import statements in generateLocales.ts for cleaner code.
64
+ - Updated useEffect dependency array in UsersPage to include adminUserService, ensuring proper initialization.
65
+ - Cleaned up globals.ts by removing unnecessary comments, enhancing readability.
66
+
67
+ These changes aim to improve code organization and maintainability across the application.
68
+
69
+ ## 0.7.13
70
+
71
+ ### Patch Changes
72
+
73
+ #### 🐞 Bug Fixes
74
+
75
+ - **generator:** update config path handling in Generator class ([63528b5](https://github.com/qlover/fe-base/commit/63528b52cfca15ccc1db2020369c3ea402da3163)) ([#516](https://github.com/qlover/fe-base/pull/516))
76
+ - Modified the sourcePath in the copyPaths method to use a validated configPath, ensuring that the configuration file exists before proceeding with the copy operation. This change improves error handling and logging for missing configuration files.
77
+
78
+ These updates aim to enhance the reliability of the Generator class by preventing operations on non-existent paths.
79
+
3
80
  ## 0.7.12
4
81
 
5
82
  ### Patch Changes