@sundaysf/cli-v2 1.0.1 → 1.0.5

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 (191) hide show
  1. package/README.md +178 -178
  2. package/dist/README.md +178 -178
  3. package/dist/bin/generators/class.js.map +1 -1
  4. package/dist/bin/generators/postman.js.map +1 -1
  5. package/dist/bin/index.js +1 -1
  6. package/dist/bin/index.js.map +1 -1
  7. package/dist/templates/backend/.claude/agents/knex-table-implementer.md +113 -113
  8. package/dist/templates/backend/.claude/agents/sundays-backend-builder.md +70 -70
  9. package/dist/templates/backend/.claude/settings.local.json +13 -13
  10. package/dist/templates/backend/.env.example +13 -13
  11. package/dist/templates/backend/.prettierignore +2 -2
  12. package/dist/templates/backend/.prettierrc +9 -9
  13. package/dist/templates/backend/.sundaysrc +7 -0
  14. package/dist/templates/backend/CLAUDE.md +348 -348
  15. package/dist/templates/backend/Dockerfile +14 -14
  16. package/dist/templates/backend/README.md +18 -18
  17. package/dist/templates/backend/eslint.config.js +20 -20
  18. package/dist/templates/backend/src/app.ts +34 -34
  19. package/dist/templates/backend/src/common/config/origins/origins.config.ts +11 -11
  20. package/dist/templates/backend/src/common/utils/environment.resolver.ts +3 -3
  21. package/dist/templates/backend/src/common/utils/version.resolver.ts +4 -4
  22. package/dist/templates/backend/src/controllers/health/health.controller.ts +23 -23
  23. package/dist/templates/backend/src/middlewares/error/error.middleware.ts +21 -21
  24. package/dist/templates/backend/src/routes/health/health.router.ts +16 -16
  25. package/dist/templates/backend/src/routes/index.ts +57 -57
  26. package/dist/templates/backend/src/server.ts +16 -16
  27. package/dist/templates/backend/src/types.d.ts +10 -10
  28. package/dist/templates/backend/tsconfig.json +16 -16
  29. package/dist/templates/backend-db-sql/.claude/agents/knex-table-implementer.md +114 -114
  30. package/dist/templates/backend-db-sql/.claude/agents/sundays-backend-builder.md +70 -70
  31. package/dist/templates/backend-db-sql/.claude/settings.local.json +19 -19
  32. package/dist/templates/backend-db-sql/.env.example +13 -13
  33. package/dist/templates/backend-db-sql/.prettierignore +2 -2
  34. package/dist/templates/backend-db-sql/.prettierrc +9 -9
  35. package/dist/templates/backend-db-sql/.sundaysrc +7 -0
  36. package/dist/templates/backend-db-sql/CLAUDE.md +374 -374
  37. package/dist/templates/backend-db-sql/Dockerfile +17 -17
  38. package/dist/templates/backend-db-sql/README.md +34 -34
  39. package/dist/templates/backend-db-sql/db/knexfile.ts +33 -33
  40. package/dist/templates/backend-db-sql/db/migrations/001_create_sundays_package_version.ts +12 -12
  41. package/dist/templates/backend-db-sql/db/seeds/001_sundays_package_version_seed.ts +10 -10
  42. package/dist/templates/backend-db-sql/db/src/KnexConnection.ts +74 -74
  43. package/dist/templates/backend-db-sql/db/src/d.types.ts +18 -18
  44. package/dist/templates/backend-db-sql/db/src/dao/sundays-package-version/sundays-package-version.dao.ts +71 -71
  45. package/dist/templates/backend-db-sql/db/src/index.ts +9 -9
  46. package/dist/templates/backend-db-sql/db/src/interfaces/sundays-package-version/sundays-package-version.interfaces.ts +6 -6
  47. package/dist/templates/backend-db-sql/db/tsconfig.json +16 -16
  48. package/dist/templates/backend-db-sql/eslint.config.js +20 -20
  49. package/dist/templates/backend-db-sql/src/app.ts +34 -34
  50. package/dist/templates/backend-db-sql/src/common/config/origins/origins.config.ts +11 -11
  51. package/dist/templates/backend-db-sql/src/common/utils/environment.resolver.ts +3 -3
  52. package/dist/templates/backend-db-sql/src/common/utils/version.resolver.ts +4 -4
  53. package/dist/templates/backend-db-sql/src/controllers/health/health.controller.ts +23 -23
  54. package/dist/templates/backend-db-sql/src/middlewares/error/error.middleware.ts +21 -21
  55. package/dist/templates/backend-db-sql/src/routes/health/health.router.ts +16 -16
  56. package/dist/templates/backend-db-sql/src/routes/index.ts +57 -57
  57. package/dist/templates/backend-db-sql/src/server.ts +18 -18
  58. package/dist/templates/backend-db-sql/src/types.d.ts +10 -10
  59. package/dist/templates/backend-db-sql/tsconfig.json +16 -16
  60. package/dist/templates/backend-embedded-db-sql/.claude/agents/knex-table-implementer.md +116 -0
  61. package/dist/templates/backend-embedded-db-sql/.claude/agents/sundays-backend-builder.md +70 -0
  62. package/dist/templates/backend-embedded-db-sql/.claude/settings.local.json +18 -0
  63. package/dist/templates/backend-embedded-db-sql/.env.example +14 -0
  64. package/dist/templates/backend-embedded-db-sql/.prettierignore +3 -0
  65. package/dist/templates/backend-embedded-db-sql/.prettierrc +9 -0
  66. package/dist/templates/backend-embedded-db-sql/.sundaysrc +7 -0
  67. package/dist/templates/backend-embedded-db-sql/CLAUDE.md +371 -0
  68. package/dist/templates/backend-embedded-db-sql/Dockerfile +14 -0
  69. package/dist/templates/backend-embedded-db-sql/README.md +32 -0
  70. package/dist/templates/backend-embedded-db-sql/eslint.config.js +20 -0
  71. package/dist/templates/backend-embedded-db-sql/knexfile.ts +37 -0
  72. package/dist/templates/backend-embedded-db-sql/migrations/.gitkeep +0 -0
  73. package/dist/templates/backend-embedded-db-sql/migrations/001_create_sundays_package_version.ts +13 -0
  74. package/dist/templates/backend-embedded-db-sql/seeds/001_sundays_package_version_seed.ts +11 -0
  75. package/dist/templates/backend-embedded-db-sql/src/app.ts +35 -0
  76. package/dist/templates/backend-embedded-db-sql/src/common/config/origins/origins.config.ts +11 -0
  77. package/dist/templates/backend-embedded-db-sql/src/common/utils/environment.resolver.ts +4 -0
  78. package/dist/templates/backend-embedded-db-sql/src/common/utils/version.resolver.ts +5 -0
  79. package/dist/templates/backend-embedded-db-sql/src/controllers/health/health.controller.ts +24 -0
  80. package/dist/templates/backend-embedded-db-sql/src/db/KnexConnection.ts +74 -0
  81. package/dist/templates/backend-embedded-db-sql/src/db/d.types.ts +18 -0
  82. package/dist/templates/backend-embedded-db-sql/src/db/dao/sundays-package-version/sundays-package-version.dao.ts +71 -0
  83. package/dist/templates/backend-embedded-db-sql/src/db/index.ts +9 -0
  84. package/dist/templates/backend-embedded-db-sql/src/db/interfaces/sundays-package-version/sundays-package-version.interfaces.ts +6 -0
  85. package/dist/templates/backend-embedded-db-sql/src/middlewares/error/error.middleware.ts +21 -0
  86. package/dist/templates/backend-embedded-db-sql/src/routes/health/health.router.ts +17 -0
  87. package/dist/templates/backend-embedded-db-sql/src/routes/index.ts +57 -0
  88. package/dist/templates/backend-embedded-db-sql/src/server.ts +18 -0
  89. package/dist/templates/backend-embedded-db-sql/src/types.d.ts +10 -0
  90. package/dist/templates/backend-embedded-db-sql/tsconfig.json +16 -0
  91. package/dist/templates/db-sql/.claude/agents/knex-table-implementer.md +113 -113
  92. package/dist/templates/db-sql/.claude/agents/sundays-backend-builder.md +70 -70
  93. package/dist/templates/db-sql/.claude/settings.local.json +10 -10
  94. package/dist/templates/db-sql/.env.example +8 -8
  95. package/dist/templates/db-sql/CLAUDE.md +105 -105
  96. package/dist/templates/db-sql/knexfile.ts +33 -33
  97. package/dist/templates/db-sql/migrations/001_create_sundays_package_version.ts +12 -12
  98. package/dist/templates/db-sql/seeds/001_sundays_package_version_seed.ts +10 -10
  99. package/dist/templates/db-sql/src/KnexConnection.ts +74 -74
  100. package/dist/templates/db-sql/src/d.types.ts +18 -18
  101. package/dist/templates/db-sql/src/dao/sundays-package-version/sundays-package-version.dao.ts +71 -71
  102. package/dist/templates/db-sql/src/index.ts +9 -9
  103. package/dist/templates/db-sql/src/interfaces/sundays-package-version/sundays-package-version.interfaces.ts +6 -6
  104. package/dist/templates/db-sql/tsconfig.json +16 -16
  105. package/dist/templates/frontend-nextjs/.sundaysrc +7 -0
  106. package/dist/templates/frontend-nextjs/app/globals.css +125 -0
  107. package/dist/templates/frontend-nextjs/app/layout.tsx +45 -0
  108. package/dist/templates/frontend-nextjs/app/page.tsx +5 -0
  109. package/dist/templates/frontend-nextjs/components/project-generator.tsx +558 -0
  110. package/dist/templates/frontend-nextjs/components/theme-provider.tsx +11 -0
  111. package/dist/templates/frontend-nextjs/components/ui/accordion.tsx +66 -0
  112. package/dist/templates/frontend-nextjs/components/ui/alert-dialog.tsx +157 -0
  113. package/dist/templates/frontend-nextjs/components/ui/alert.tsx +66 -0
  114. package/dist/templates/frontend-nextjs/components/ui/aspect-ratio.tsx +11 -0
  115. package/dist/templates/frontend-nextjs/components/ui/avatar.tsx +53 -0
  116. package/dist/templates/frontend-nextjs/components/ui/badge.tsx +46 -0
  117. package/dist/templates/frontend-nextjs/components/ui/breadcrumb.tsx +109 -0
  118. package/dist/templates/frontend-nextjs/components/ui/button-group.tsx +83 -0
  119. package/dist/templates/frontend-nextjs/components/ui/button.tsx +60 -0
  120. package/dist/templates/frontend-nextjs/components/ui/calendar.tsx +213 -0
  121. package/dist/templates/frontend-nextjs/components/ui/card.tsx +92 -0
  122. package/dist/templates/frontend-nextjs/components/ui/carousel.tsx +241 -0
  123. package/dist/templates/frontend-nextjs/components/ui/chart.tsx +353 -0
  124. package/dist/templates/frontend-nextjs/components/ui/checkbox.tsx +32 -0
  125. package/dist/templates/frontend-nextjs/components/ui/collapsible.tsx +33 -0
  126. package/dist/templates/frontend-nextjs/components/ui/command.tsx +184 -0
  127. package/dist/templates/frontend-nextjs/components/ui/context-menu.tsx +252 -0
  128. package/dist/templates/frontend-nextjs/components/ui/dialog.tsx +143 -0
  129. package/dist/templates/frontend-nextjs/components/ui/drawer.tsx +135 -0
  130. package/dist/templates/frontend-nextjs/components/ui/dropdown-menu.tsx +257 -0
  131. package/dist/templates/frontend-nextjs/components/ui/empty.tsx +104 -0
  132. package/dist/templates/frontend-nextjs/components/ui/field.tsx +244 -0
  133. package/dist/templates/frontend-nextjs/components/ui/form.tsx +167 -0
  134. package/dist/templates/frontend-nextjs/components/ui/hover-card.tsx +44 -0
  135. package/dist/templates/frontend-nextjs/components/ui/input-group.tsx +169 -0
  136. package/dist/templates/frontend-nextjs/components/ui/input-otp.tsx +77 -0
  137. package/dist/templates/frontend-nextjs/components/ui/input.tsx +21 -0
  138. package/dist/templates/frontend-nextjs/components/ui/item.tsx +193 -0
  139. package/dist/templates/frontend-nextjs/components/ui/kbd.tsx +28 -0
  140. package/dist/templates/frontend-nextjs/components/ui/label.tsx +24 -0
  141. package/dist/templates/frontend-nextjs/components/ui/menubar.tsx +276 -0
  142. package/dist/templates/frontend-nextjs/components/ui/navigation-menu.tsx +166 -0
  143. package/dist/templates/frontend-nextjs/components/ui/pagination.tsx +127 -0
  144. package/dist/templates/frontend-nextjs/components/ui/popover.tsx +48 -0
  145. package/dist/templates/frontend-nextjs/components/ui/progress.tsx +31 -0
  146. package/dist/templates/frontend-nextjs/components/ui/radio-group.tsx +45 -0
  147. package/dist/templates/frontend-nextjs/components/ui/resizable.tsx +56 -0
  148. package/dist/templates/frontend-nextjs/components/ui/scroll-area.tsx +58 -0
  149. package/dist/templates/frontend-nextjs/components/ui/select.tsx +185 -0
  150. package/dist/templates/frontend-nextjs/components/ui/separator.tsx +28 -0
  151. package/dist/templates/frontend-nextjs/components/ui/sheet.tsx +139 -0
  152. package/dist/templates/frontend-nextjs/components/ui/sidebar.tsx +726 -0
  153. package/dist/templates/frontend-nextjs/components/ui/skeleton.tsx +13 -0
  154. package/dist/templates/frontend-nextjs/components/ui/slider.tsx +63 -0
  155. package/dist/templates/frontend-nextjs/components/ui/sonner.tsx +25 -0
  156. package/dist/templates/frontend-nextjs/components/ui/spinner.tsx +16 -0
  157. package/dist/templates/frontend-nextjs/components/ui/switch.tsx +31 -0
  158. package/dist/templates/frontend-nextjs/components/ui/table.tsx +116 -0
  159. package/dist/templates/frontend-nextjs/components/ui/tabs.tsx +66 -0
  160. package/dist/templates/frontend-nextjs/components/ui/textarea.tsx +18 -0
  161. package/dist/templates/frontend-nextjs/components/ui/toast.tsx +129 -0
  162. package/dist/templates/frontend-nextjs/components/ui/toaster.tsx +35 -0
  163. package/dist/templates/frontend-nextjs/components/ui/toggle-group.tsx +73 -0
  164. package/dist/templates/frontend-nextjs/components/ui/toggle.tsx +47 -0
  165. package/dist/templates/frontend-nextjs/components/ui/tooltip.tsx +61 -0
  166. package/dist/templates/frontend-nextjs/components/ui/use-mobile.tsx +19 -0
  167. package/dist/templates/frontend-nextjs/components/ui/use-toast.ts +191 -0
  168. package/dist/templates/frontend-nextjs/components.json +21 -0
  169. package/dist/templates/frontend-nextjs/hooks/use-mobile.ts +19 -0
  170. package/dist/templates/frontend-nextjs/hooks/use-toast.ts +191 -0
  171. package/dist/templates/frontend-nextjs/lib/utils.ts +6 -0
  172. package/dist/templates/frontend-nextjs/next.config.mjs +11 -0
  173. package/dist/templates/frontend-nextjs/postcss.config.mjs +8 -0
  174. package/dist/templates/frontend-nextjs/public/apple-icon.png +0 -0
  175. package/dist/templates/frontend-nextjs/public/icon-dark-32x32.png +0 -0
  176. package/dist/templates/frontend-nextjs/public/icon-light-32x32.png +0 -0
  177. package/dist/templates/frontend-nextjs/public/icon.svg +26 -0
  178. package/dist/templates/frontend-nextjs/public/placeholder-logo.png +0 -0
  179. package/dist/templates/frontend-nextjs/public/placeholder-logo.svg +1 -0
  180. package/dist/templates/frontend-nextjs/public/placeholder-user.jpg +0 -0
  181. package/dist/templates/frontend-nextjs/public/placeholder.jpg +0 -0
  182. package/dist/templates/frontend-nextjs/public/placeholder.svg +1 -0
  183. package/dist/templates/frontend-nextjs/styles/globals.css +125 -0
  184. package/dist/templates/frontend-nextjs/tsconfig.json +27 -0
  185. package/dist/templates/module/.claude/agents/knex-table-implementer.md +113 -113
  186. package/dist/templates/module/.claude/agents/sundays-backend-builder.md +70 -70
  187. package/dist/templates/module/.claude/settings.local.json +10 -10
  188. package/dist/templates/module/CLAUDE.md +158 -158
  189. package/dist/templates/module/src/index.ts +9 -9
  190. package/dist/templates/module/tsconfig.json +19 -19
  191. package/package.json +40 -40
@@ -1,159 +1,159 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- ## Module Template Overview
6
-
7
- This is a basic npm module template created by the Sundays Framework SDK. It provides a minimal starting point for creating reusable Node.js modules.
8
-
9
- ## Commands
10
-
11
- ### Development
12
-
13
- - `npm run build` - Compile TypeScript to JavaScript (output to dist/)
14
- - `npm test` - Run tests (no test framework configured by default)
15
- - `npm run format` - Format code (if Prettier is configured)
16
-
17
- ### Publishing
18
-
19
- - `npm run npm:publish` - Publish the module to npm registry
20
-
21
- ## Project Structure
22
-
23
- ```
24
- module/
25
- ├── src/ # TypeScript source files
26
- │ └── index.ts # Main entry point
27
- ├── dist/ # Compiled JavaScript output (generated)
28
- ├── tsconfig.json # TypeScript configuration
29
- ├── package.json # Module metadata and dependencies
30
- └── .gitignore # Git ignore patterns
31
- ```
32
-
33
- ## Configuration
34
-
35
- ### TypeScript Setup
36
-
37
- The module is configured with TypeScript for type safety:
38
- - Source files in `src/`
39
- - Compiled output to `dist/`
40
- - Strict mode enabled
41
- - ES2020 target with CommonJS modules
42
- - Declaration files generated for TypeScript consumers
43
-
44
- ### Package.json
45
-
46
- Key fields to configure:
47
- - `name`: Your module name (scoped or unscoped)
48
- - `version`: Semantic version (start with 0.1.0)
49
- - `description`: Brief description of the module
50
- - `main`: Entry point (usually `dist/index.js`)
51
- - `types`: TypeScript declarations (usually `dist/index.d.ts`)
52
- - `author`: Your name or organization
53
- - `license`: License type (MIT, ISC, etc.)
54
-
55
- ## Getting Started
56
-
57
- 1. **Initialize the module**:
58
- ```bash
59
- npm install
60
- ```
61
-
62
- 2. **Write your module code** in `src/index.ts`:
63
- ```typescript
64
- export function myFunction() {
65
- return "Hello from my module!";
66
- }
67
-
68
- export class MyClass {
69
- // Your implementation
70
- }
71
- ```
72
-
73
- 3. **Build the module**:
74
- ```bash
75
- npm run build
76
- ```
77
-
78
- 4. **Test locally** before publishing:
79
- ```bash
80
- npm link
81
- # In another project:
82
- npm link your-module-name
83
- ```
84
-
85
- 5. **Publish to npm**:
86
- ```bash
87
- npm run npm:publish
88
- ```
89
-
90
- ## Best Practices
91
-
92
- 1. **Export Strategy**: Use named exports for clarity
93
- ```typescript
94
- export { MyClass, myFunction, MyInterface };
95
- ```
96
-
97
- 2. **Type Definitions**: Always include TypeScript definitions
98
- - Helps consumers with IntelliSense
99
- - Prevents type-related bugs
100
-
101
- 3. **Documentation**: Add JSDoc comments to exported functions/classes
102
- ```typescript
103
- /**
104
- * Calculates the sum of two numbers
105
- * @param a First number
106
- * @param b Second number
107
- * @returns The sum of a and b
108
- */
109
- export function add(a: number, b: number): number {
110
- return a + b;
111
- }
112
- ```
113
-
114
- 4. **Versioning**: Follow semantic versioning (semver)
115
- - MAJOR: Breaking changes
116
- - MINOR: New features (backward compatible)
117
- - PATCH: Bug fixes
118
-
119
- 5. **Testing**: Consider adding a test framework
120
- - Jest for unit testing
121
- - Include test scripts in package.json
122
-
123
- 6. **Dependencies**: Keep dependencies minimal
124
- - Use `dependencies` for runtime requirements
125
- - Use `devDependencies` for build/test tools
126
- - Consider marking some as `peerDependencies`
127
-
128
- ## Common Module Patterns
129
-
130
- ### Singleton Pattern
131
- ```typescript
132
- class MySingleton {
133
- private static instance: MySingleton;
134
-
135
- private constructor() {}
136
-
137
- static getInstance(): MySingleton {
138
- if (!MySingleton.instance) {
139
- MySingleton.instance = new MySingleton();
140
- }
141
- return MySingleton.instance;
142
- }
143
- }
144
- ```
145
-
146
- ### Factory Pattern
147
- ```typescript
148
- export function createInstance(config: Config): MyClass {
149
- return new MyClass(config);
150
- }
151
- ```
152
-
153
- ### Plugin/Extension Pattern
154
- ```typescript
155
- export interface Plugin {
156
- name: string;
157
- install(app: any): void;
158
- }
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Module Template Overview
6
+
7
+ This is a basic npm module template created by the Sundays Framework SDK. It provides a minimal starting point for creating reusable Node.js modules.
8
+
9
+ ## Commands
10
+
11
+ ### Development
12
+
13
+ - `npm run build` - Compile TypeScript to JavaScript (output to dist/)
14
+ - `npm test` - Run tests (no test framework configured by default)
15
+ - `npm run format` - Format code (if Prettier is configured)
16
+
17
+ ### Publishing
18
+
19
+ - `npm run npm:publish` - Publish the module to npm registry
20
+
21
+ ## Project Structure
22
+
23
+ ```
24
+ module/
25
+ ├── src/ # TypeScript source files
26
+ │ └── index.ts # Main entry point
27
+ ├── dist/ # Compiled JavaScript output (generated)
28
+ ├── tsconfig.json # TypeScript configuration
29
+ ├── package.json # Module metadata and dependencies
30
+ └── .gitignore # Git ignore patterns
31
+ ```
32
+
33
+ ## Configuration
34
+
35
+ ### TypeScript Setup
36
+
37
+ The module is configured with TypeScript for type safety:
38
+ - Source files in `src/`
39
+ - Compiled output to `dist/`
40
+ - Strict mode enabled
41
+ - ES2020 target with CommonJS modules
42
+ - Declaration files generated for TypeScript consumers
43
+
44
+ ### Package.json
45
+
46
+ Key fields to configure:
47
+ - `name`: Your module name (scoped or unscoped)
48
+ - `version`: Semantic version (start with 0.1.0)
49
+ - `description`: Brief description of the module
50
+ - `main`: Entry point (usually `dist/index.js`)
51
+ - `types`: TypeScript declarations (usually `dist/index.d.ts`)
52
+ - `author`: Your name or organization
53
+ - `license`: License type (MIT, ISC, etc.)
54
+
55
+ ## Getting Started
56
+
57
+ 1. **Initialize the module**:
58
+ ```bash
59
+ npm install
60
+ ```
61
+
62
+ 2. **Write your module code** in `src/index.ts`:
63
+ ```typescript
64
+ export function myFunction() {
65
+ return "Hello from my module!";
66
+ }
67
+
68
+ export class MyClass {
69
+ // Your implementation
70
+ }
71
+ ```
72
+
73
+ 3. **Build the module**:
74
+ ```bash
75
+ npm run build
76
+ ```
77
+
78
+ 4. **Test locally** before publishing:
79
+ ```bash
80
+ npm link
81
+ # In another project:
82
+ npm link your-module-name
83
+ ```
84
+
85
+ 5. **Publish to npm**:
86
+ ```bash
87
+ npm run npm:publish
88
+ ```
89
+
90
+ ## Best Practices
91
+
92
+ 1. **Export Strategy**: Use named exports for clarity
93
+ ```typescript
94
+ export { MyClass, myFunction, MyInterface };
95
+ ```
96
+
97
+ 2. **Type Definitions**: Always include TypeScript definitions
98
+ - Helps consumers with IntelliSense
99
+ - Prevents type-related bugs
100
+
101
+ 3. **Documentation**: Add JSDoc comments to exported functions/classes
102
+ ```typescript
103
+ /**
104
+ * Calculates the sum of two numbers
105
+ * @param a First number
106
+ * @param b Second number
107
+ * @returns The sum of a and b
108
+ */
109
+ export function add(a: number, b: number): number {
110
+ return a + b;
111
+ }
112
+ ```
113
+
114
+ 4. **Versioning**: Follow semantic versioning (semver)
115
+ - MAJOR: Breaking changes
116
+ - MINOR: New features (backward compatible)
117
+ - PATCH: Bug fixes
118
+
119
+ 5. **Testing**: Consider adding a test framework
120
+ - Jest for unit testing
121
+ - Include test scripts in package.json
122
+
123
+ 6. **Dependencies**: Keep dependencies minimal
124
+ - Use `dependencies` for runtime requirements
125
+ - Use `devDependencies` for build/test tools
126
+ - Consider marking some as `peerDependencies`
127
+
128
+ ## Common Module Patterns
129
+
130
+ ### Singleton Pattern
131
+ ```typescript
132
+ class MySingleton {
133
+ private static instance: MySingleton;
134
+
135
+ private constructor() {}
136
+
137
+ static getInstance(): MySingleton {
138
+ if (!MySingleton.instance) {
139
+ MySingleton.instance = new MySingleton();
140
+ }
141
+ return MySingleton.instance;
142
+ }
143
+ }
144
+ ```
145
+
146
+ ### Factory Pattern
147
+ ```typescript
148
+ export function createInstance(config: Config): MyClass {
149
+ return new MyClass(config);
150
+ }
151
+ ```
152
+
153
+ ### Plugin/Extension Pattern
154
+ ```typescript
155
+ export interface Plugin {
156
+ name: string;
157
+ install(app: any): void;
158
+ }
159
159
  ```
@@ -1,9 +1,9 @@
1
- /**
2
- * Sundays Framework Module
3
- *
4
- * Replace this with your module exports.
5
- */
6
-
7
- export const hello = (): string => {
8
- return 'Hello from Sundays module';
9
- };
1
+ /**
2
+ * Sundays Framework Module
3
+ *
4
+ * Replace this with your module exports.
5
+ */
6
+
7
+ export const hello = (): string => {
8
+ return 'Hello from Sundays module';
9
+ };
@@ -1,19 +1,19 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "commonjs",
5
- "lib": ["ES2022"],
6
- "outDir": "./dist",
7
- "rootDir": "./src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "resolveJsonModule": true,
13
- "declaration": true,
14
- "declarationMap": true,
15
- "sourceMap": true
16
- },
17
- "include": ["src/**/*"],
18
- "exclude": ["node_modules", "dist"]
19
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "commonjs",
5
+ "lib": ["ES2022"],
6
+ "outDir": "./dist",
7
+ "rootDir": "./src",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "sourceMap": true
16
+ },
17
+ "include": ["src/**/*"],
18
+ "exclude": ["node_modules", "dist"]
19
+ }
package/package.json CHANGED
@@ -1,40 +1,40 @@
1
- {
2
- "name": "@sundaysf/cli-v2",
3
- "version": "1.0.1",
4
- "description": "Sundays Framework CLI - Project scaffolding and CRUD code generation",
5
- "main": "./dist/bin/index.js",
6
- "scripts": {
7
- "test": "jest",
8
- "build": "gulp build",
9
- "prepublishOnly": "npm run build"
10
- },
11
- "bin": {
12
- "sundaysf": "./dist/bin/index.js"
13
- },
14
- "type": "module",
15
- "engines": {
16
- "node": ">=18.0.0"
17
- },
18
- "files": [
19
- "dist/",
20
- "README.md",
21
- "LICENSE"
22
- ],
23
- "dependencies": {
24
- "commander": "^11.0.0",
25
- "fs-extra": "^11.1.1",
26
- "inquirer": "^9.2.7",
27
- "ora": "^8.2.0",
28
- "ts-case-convert": "^2.1.0",
29
- "uuid": "^11.1.0"
30
- },
31
- "devDependencies": {
32
- "gulp": "^5.0.0",
33
- "gulp-if": "^3.0.0",
34
- "gulp-sourcemaps": "^3.0.0",
35
- "gulp-terser": "^2.1.0",
36
- "through2": "^4.0.2"
37
- },
38
- "author": "Pablo Dominguez",
39
- "license": "MIT"
40
- }
1
+ {
2
+ "name": "@sundaysf/cli-v2",
3
+ "version": "1.0.5",
4
+ "description": "Sundays Framework CLI - Project scaffolding and CRUD code generation",
5
+ "main": "./dist/bin/index.js",
6
+ "scripts": {
7
+ "test": "jest",
8
+ "build": "gulp build",
9
+ "prepublishOnly": "npm run build"
10
+ },
11
+ "bin": {
12
+ "sundaysf": "./dist/bin/index.js"
13
+ },
14
+ "type": "module",
15
+ "engines": {
16
+ "node": ">=18.0.0"
17
+ },
18
+ "files": [
19
+ "dist/",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "dependencies": {
24
+ "commander": "^11.0.0",
25
+ "fs-extra": "^11.1.1",
26
+ "inquirer": "^9.2.7",
27
+ "ora": "^8.2.0",
28
+ "ts-case-convert": "^2.1.0",
29
+ "uuid": "^11.1.0"
30
+ },
31
+ "devDependencies": {
32
+ "gulp": "^5.0.0",
33
+ "gulp-if": "^3.0.0",
34
+ "gulp-sourcemaps": "^3.0.0",
35
+ "gulp-terser": "^2.1.0",
36
+ "through2": "^4.0.2"
37
+ },
38
+ "author": "Pablo Dominguez",
39
+ "license": "MIT"
40
+ }