@hazeljs/cli 0.2.0-beta.45 → 0.2.0-beta.48

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.
@@ -17,13 +17,18 @@
17
17
  "reflect-metadata": "^0.2.2"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "^20.0.0",
21
- "typescript": "^5.3.3",
22
- "ts-node-dev": "^2.0.0",
23
20
  "@types/jest": "^29.5.12",
21
+ "@types/node": "^20.0.0",
22
+ "@typescript-eslint/eslint-plugin": "^8.18.2",
23
+ "@typescript-eslint/parser": "^8.18.2",
24
+ "eslint": "^8.56.0",
25
+ "eslint-config-prettier": "^9.1.0",
26
+ "eslint-plugin-prettier": "^5.1.3",
24
27
  "jest": "^29.7.0",
28
+ "prettier": "^3.2.5",
25
29
  "ts-jest": "^29.1.2",
26
- "prettier": "^3.2.5"
30
+ "ts-node-dev": "^2.0.0",
31
+ "typescript": "^5.3.3"
27
32
  },
28
33
  "author": "",
29
34
  "license": "Apache-2.0"
@@ -1,30 +1,25 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "es2017",
3
+ "target": "ES2020",
4
4
  "module": "commonjs",
5
- "lib": ["ES2020", "DOM"],
5
+ "lib": ["ES2020"],
6
6
  "declaration": true,
7
7
  "outDir": "./dist",
8
- "rootDir": "..",
8
+ "rootDir": "./src",
9
9
  "strict": true,
10
+ "strictNullChecks": true,
10
11
  "esModuleInterop": true,
11
12
  "skipLibCheck": true,
12
- "forceConsistentCasingInFileNames": false,
13
+ "forceConsistentCasingInFileNames": true,
13
14
  "experimentalDecorators": true,
14
15
  "emitDecoratorMetadata": true,
15
16
  "resolveJsonModule": true,
16
- "removeComments": true,
17
17
  "sourceMap": true,
18
18
  "baseUrl": "./",
19
- "incremental": true,
20
- "strictNullChecks": false,
21
- "noImplicitAny": false,
22
- "strictBindCallApply": false,
23
- "noFallthroughCasesInSwitch": false,
24
19
  "paths": {
25
20
  "@/*": ["src/*"]
26
21
  }
27
22
  },
28
23
  "include": ["src/**/*"],
29
24
  "exclude": ["node_modules", "dist"]
30
- }
25
+ }
@@ -32,18 +32,58 @@ const HAZEL_PACKAGES = {
32
32
  npm: '@hazeljs/cron',
33
33
  hint: 'import { CronModule } from "@hazeljs/cron";',
34
34
  },
35
+ data: {
36
+ npm: '@hazeljs/data',
37
+ hint: 'import { DataModule } from "@hazeljs/data";',
38
+ },
35
39
  discovery: {
36
40
  npm: '@hazeljs/discovery',
37
41
  hint: 'import { ServiceRegistry, DiscoveryClient } from "@hazeljs/discovery";',
38
42
  },
43
+ 'event-emitter': {
44
+ npm: '@hazeljs/event-emitter',
45
+ hint: 'import { EventEmitterModule } from "@hazeljs/event-emitter";',
46
+ },
47
+ gateway: {
48
+ npm: '@hazeljs/gateway',
49
+ hint: 'import { GatewayModule } from "@hazeljs/gateway";',
50
+ },
51
+ graphql: {
52
+ npm: '@hazeljs/graphql',
53
+ hint: 'import { GraphQLModule } from "@hazeljs/graphql";',
54
+ },
55
+ grpc: {
56
+ npm: '@hazeljs/grpc',
57
+ hint: 'import { GrpcModule } from "@hazeljs/grpc";',
58
+ },
59
+ kafka: {
60
+ npm: '@hazeljs/kafka',
61
+ hint: 'import { KafkaModule } from "@hazeljs/kafka";',
62
+ },
63
+ messaging: {
64
+ npm: '@hazeljs/messaging',
65
+ hint: 'import { MessagingModule } from "@hazeljs/messaging";',
66
+ },
67
+ ml: {
68
+ npm: '@hazeljs/ml',
69
+ hint: 'import { MLModule } from "@hazeljs/ml";',
70
+ },
39
71
  prisma: {
40
72
  npm: '@hazeljs/prisma',
41
73
  hint: 'import { PrismaModule } from "@hazeljs/prisma";',
42
74
  },
75
+ queue: {
76
+ npm: '@hazeljs/queue',
77
+ hint: 'import { QueueModule } from "@hazeljs/queue";',
78
+ },
43
79
  rag: {
44
80
  npm: '@hazeljs/rag',
45
81
  hint: 'import { RAGPipeline } from "@hazeljs/rag";',
46
82
  },
83
+ resilience: {
84
+ npm: '@hazeljs/resilience',
85
+ hint: 'import { CircuitBreaker, WithRetry, WithTimeout } from "@hazeljs/resilience";',
86
+ },
47
87
  'pdf-to-audio': {
48
88
  npm: '@hazeljs/pdf-to-audio',
49
89
  hint: 'import { PdfToAudioModule } from "@hazeljs/pdf-to-audio";\n // PdfToAudioModule converts PDFs to audio via TTS',
@@ -75,6 +75,65 @@ function scaffoldPackageBoilerplate(destPath, packages) {
75
75
  imports.push("import { WebSocketModule } from '@hazeljs/websocket';");
76
76
  moduleImports.push('WebSocketModule');
77
77
  }
78
+ if (packages.includes('@hazeljs/ai')) {
79
+ imports.push("import { AIModule } from '@hazeljs/ai';");
80
+ moduleImports.push('AIModule');
81
+ }
82
+ if (packages.includes('@hazeljs/agent')) {
83
+ imports.push("import { AgentModule } from '@hazeljs/agent';");
84
+ moduleImports.push('AgentModule');
85
+ }
86
+ if (packages.includes('@hazeljs/rag')) {
87
+ imports.push("import { RAGModule } from '@hazeljs/rag';");
88
+ moduleImports.push('RAGModule');
89
+ }
90
+ if (packages.includes('@hazeljs/discovery')) {
91
+ // Discovery uses ServiceRegistry/DiscoveryClient programmatically - no module import
92
+ }
93
+ if (packages.includes('@hazeljs/pdf-to-audio')) {
94
+ imports.push("import { PdfToAudioModule } from '@hazeljs/pdf-to-audio';");
95
+ moduleImports.push('PdfToAudioModule');
96
+ }
97
+ if (packages.includes('@hazeljs/data')) {
98
+ imports.push("import { DataModule } from '@hazeljs/data';");
99
+ moduleImports.push('DataModule.forRoot()');
100
+ }
101
+ if (packages.includes('@hazeljs/event-emitter')) {
102
+ imports.push("import { EventEmitterModule } from '@hazeljs/event-emitter';");
103
+ moduleImports.push('EventEmitterModule.forRoot()');
104
+ }
105
+ if (packages.includes('@hazeljs/gateway')) {
106
+ imports.push("import { GatewayModule } from '@hazeljs/gateway';");
107
+ moduleImports.push('GatewayModule');
108
+ }
109
+ if (packages.includes('@hazeljs/graphql')) {
110
+ imports.push("import { GraphQLModule } from '@hazeljs/graphql';");
111
+ moduleImports.push('GraphQLModule');
112
+ }
113
+ if (packages.includes('@hazeljs/grpc')) {
114
+ imports.push("import { GrpcModule } from '@hazeljs/grpc';");
115
+ moduleImports.push('GrpcModule');
116
+ }
117
+ if (packages.includes('@hazeljs/kafka')) {
118
+ imports.push("import { KafkaModule } from '@hazeljs/kafka';");
119
+ moduleImports.push('KafkaModule');
120
+ }
121
+ if (packages.includes('@hazeljs/messaging')) {
122
+ imports.push("import { MessagingModule } from '@hazeljs/messaging';");
123
+ moduleImports.push('MessagingModule');
124
+ }
125
+ if (packages.includes('@hazeljs/ml')) {
126
+ imports.push("import { MLModule } from '@hazeljs/ml';");
127
+ moduleImports.push('MLModule.forRoot()');
128
+ }
129
+ if (packages.includes('@hazeljs/queue')) {
130
+ imports.push("import { QueueModule } from '@hazeljs/queue';");
131
+ moduleImports.push('QueueModule');
132
+ }
133
+ if (packages.includes('@hazeljs/resilience')) {
134
+ // Resilience is a library of decorators, not a module - no import needed in app.module
135
+ // User can import { CircuitBreaker, WithRetry } in their services
136
+ }
78
137
  // Generate the enhanced app.module.ts
79
138
  const importsSection = moduleImports.length > 0
80
139
  ? `\n imports: [\n ${moduleImports.join(',\n ')},\n ],`
@@ -161,18 +220,29 @@ function generateApp(program) {
161
220
  name: 'packages',
162
221
  message: 'Select additional HazelJS packages to install:',
163
222
  choices: [
223
+ { name: 'AI Integration (@hazeljs/ai)', value: '@hazeljs/ai' },
224
+ { name: 'AI Agents (@hazeljs/agent)', value: '@hazeljs/agent' },
164
225
  { name: 'Authentication (@hazeljs/auth)', value: '@hazeljs/auth' },
165
- { name: 'Configuration (@hazeljs/config)', value: '@hazeljs/config' },
166
- { name: 'Swagger/OpenAPI (@hazeljs/swagger)', value: '@hazeljs/swagger' },
167
- { name: 'Prisma ORM (@hazeljs/prisma)', value: '@hazeljs/prisma' },
168
226
  { name: 'Caching (@hazeljs/cache)', value: '@hazeljs/cache' },
227
+ { name: 'Configuration (@hazeljs/config)', value: '@hazeljs/config' },
169
228
  { name: 'Cron Jobs (@hazeljs/cron)', value: '@hazeljs/cron' },
170
- { name: 'WebSocket (@hazeljs/websocket)', value: '@hazeljs/websocket' },
171
- { name: 'AI Integration (@hazeljs/ai)', value: '@hazeljs/ai' },
172
- { name: 'AI Agents (@hazeljs/agent)', value: '@hazeljs/agent' },
229
+ { name: 'Data/ETL (@hazeljs/data)', value: '@hazeljs/data' },
230
+ { name: 'Service Discovery (@hazeljs/discovery)', value: '@hazeljs/discovery' },
231
+ { name: 'Event Emitter (@hazeljs/event-emitter)', value: '@hazeljs/event-emitter' },
232
+ { name: 'API Gateway (@hazeljs/gateway)', value: '@hazeljs/gateway' },
233
+ { name: 'GraphQL (@hazeljs/graphql)', value: '@hazeljs/graphql' },
234
+ { name: 'gRPC (@hazeljs/grpc)', value: '@hazeljs/grpc' },
235
+ { name: 'Kafka (@hazeljs/kafka)', value: '@hazeljs/kafka' },
236
+ { name: 'Messaging - WhatsApp/Telegram (@hazeljs/messaging)', value: '@hazeljs/messaging' },
237
+ { name: 'Machine Learning (@hazeljs/ml)', value: '@hazeljs/ml' },
238
+ { name: 'PDF to Audio (@hazeljs/pdf-to-audio)', value: '@hazeljs/pdf-to-audio' },
239
+ { name: 'Prisma ORM (@hazeljs/prisma)', value: '@hazeljs/prisma' },
240
+ { name: 'Queue/BullMQ (@hazeljs/queue)', value: '@hazeljs/queue' },
173
241
  { name: 'RAG/Vector Search (@hazeljs/rag)', value: '@hazeljs/rag' },
242
+ { name: 'Resilience - Circuit Breaker (@hazeljs/resilience)', value: '@hazeljs/resilience' },
174
243
  { name: 'Serverless (@hazeljs/serverless)', value: '@hazeljs/serverless' },
175
- { name: 'Service Discovery (@hazeljs/discovery)', value: '@hazeljs/discovery' },
244
+ { name: 'Swagger/OpenAPI (@hazeljs/swagger)', value: '@hazeljs/swagger' },
245
+ { name: 'WebSocket (@hazeljs/websocket)', value: '@hazeljs/websocket' },
176
246
  ],
177
247
  },
178
248
  ]);
@@ -221,13 +291,18 @@ function generateApp(program) {
221
291
  'reflect-metadata': '^0.2.2',
222
292
  },
223
293
  devDependencies: {
224
- '@types/node': '^20.0.0',
225
- 'typescript': '^5.3.3',
226
- 'ts-node-dev': '^2.0.0',
227
294
  '@types/jest': '^29.5.12',
295
+ '@types/node': '^20.0.0',
296
+ '@typescript-eslint/eslint-plugin': '^8.18.2',
297
+ '@typescript-eslint/parser': '^8.18.2',
298
+ 'eslint': '^8.56.0',
299
+ 'eslint-config-prettier': '^9.1.0',
300
+ 'eslint-plugin-prettier': '^5.1.3',
228
301
  'jest': '^29.7.0',
229
- 'ts-jest': '^29.1.2',
230
302
  'prettier': '^3.2.5',
303
+ 'ts-jest': '^29.1.2',
304
+ 'ts-node-dev': '^2.0.0',
305
+ 'typescript': '^5.3.3',
231
306
  },
232
307
  author: projectConfig.author,
233
308
  license: projectConfig.license,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hazeljs/cli",
3
- "version": "0.2.0-beta.45",
3
+ "version": "0.2.0-beta.48",
4
4
  "description": "Command-line interface for scaffolding and generating HazelJS applications and components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -69,5 +69,5 @@
69
69
  "type": "opencollective",
70
70
  "url": "https://opencollective.com/hazeljs"
71
71
  },
72
- "gitHead": "f6e861eea72985923f3c1acd9ece1560b8c7e847"
72
+ "gitHead": "0790e29cadc8406bad8993053322ee119c4acdc6"
73
73
  }