@hazeljs/cli 0.2.0-beta.51 → 0.2.0-beta.53
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/@template/package.json +1 -2
- package/README.md +2 -0
- package/dist/commands/add.js +8 -0
- package/dist/commands/generate-app.js +10 -0
- package/package.json +2 -2
package/@template/package.json
CHANGED
package/README.md
CHANGED
|
@@ -104,11 +104,13 @@ hazel add prisma
|
|
|
104
104
|
|
|
105
105
|
**Available packages:**
|
|
106
106
|
- `ai` - AI Integration (@hazeljs/ai)
|
|
107
|
+
- `audit` - Audit Logging (@hazeljs/audit)
|
|
107
108
|
- `auth` - Authentication (@hazeljs/auth)
|
|
108
109
|
- `cache` - Caching (@hazeljs/cache)
|
|
109
110
|
- `config` - Configuration (@hazeljs/config)
|
|
110
111
|
- `cron` - Cron Jobs (@hazeljs/cron)
|
|
111
112
|
- `prisma` - Prisma ORM (@hazeljs/prisma)
|
|
113
|
+
- `typeorm` - TypeORM (@hazeljs/typeorm)
|
|
112
114
|
- `rag` - RAG/Vector Search (@hazeljs/rag)
|
|
113
115
|
- `serverless` - Serverless (@hazeljs/serverless)
|
|
114
116
|
- `swagger` - Swagger/OpenAPI (@hazeljs/swagger)
|
package/dist/commands/add.js
CHANGED
|
@@ -16,6 +16,10 @@ const HAZEL_PACKAGES = {
|
|
|
16
16
|
npm: '@hazeljs/agent',
|
|
17
17
|
hint: 'import { AgentModule } from "@hazeljs/agent";',
|
|
18
18
|
},
|
|
19
|
+
audit: {
|
|
20
|
+
npm: '@hazeljs/audit',
|
|
21
|
+
hint: 'import { AuditModule, ConsoleAuditTransport } from "@hazeljs/audit";\n // AuditModule.forRoot({ transports: [new ConsoleAuditTransport()] })',
|
|
22
|
+
},
|
|
19
23
|
auth: {
|
|
20
24
|
npm: '@hazeljs/auth',
|
|
21
25
|
hint: 'import { JwtModule } from "@hazeljs/auth";\n // JwtModule.forRoot({ secret: "your-secret", expiresIn: "1d" })',
|
|
@@ -80,6 +84,10 @@ const HAZEL_PACKAGES = {
|
|
|
80
84
|
npm: '@hazeljs/prisma',
|
|
81
85
|
hint: 'import { PrismaModule } from "@hazeljs/prisma";',
|
|
82
86
|
},
|
|
87
|
+
typeorm: {
|
|
88
|
+
npm: '@hazeljs/typeorm',
|
|
89
|
+
hint: 'import { TypeOrmModule } from "@hazeljs/typeorm";',
|
|
90
|
+
},
|
|
83
91
|
queue: {
|
|
84
92
|
npm: '@hazeljs/queue',
|
|
85
93
|
hint: 'import { QueueModule } from "@hazeljs/queue";',
|
|
@@ -59,6 +59,14 @@ function scaffoldPackageBoilerplate(destPath, packages) {
|
|
|
59
59
|
imports.push("import { PrismaModule } from '@hazeljs/prisma';");
|
|
60
60
|
moduleImports.push('PrismaModule');
|
|
61
61
|
}
|
|
62
|
+
if (packages.includes('@hazeljs/typeorm')) {
|
|
63
|
+
imports.push("import { TypeOrmModule } from '@hazeljs/typeorm';");
|
|
64
|
+
moduleImports.push('TypeOrmModule');
|
|
65
|
+
}
|
|
66
|
+
if (packages.includes('@hazeljs/audit')) {
|
|
67
|
+
imports.push("import { AuditModule, ConsoleAuditTransport } from '@hazeljs/audit';");
|
|
68
|
+
moduleImports.push("AuditModule.forRoot({ transports: [new ConsoleAuditTransport()] })");
|
|
69
|
+
}
|
|
62
70
|
if (packages.includes('@hazeljs/auth')) {
|
|
63
71
|
imports.push("import { JwtModule } from '@hazeljs/auth';");
|
|
64
72
|
moduleImports.push("JwtModule.forRoot({ secret: process.env.JWT_SECRET || 'change-me', expiresIn: '1d' })");
|
|
@@ -226,6 +234,7 @@ function generateApp(program) {
|
|
|
226
234
|
choices: [
|
|
227
235
|
{ name: 'AI Integration (@hazeljs/ai)', value: '@hazeljs/ai' },
|
|
228
236
|
{ name: 'AI Agents (@hazeljs/agent)', value: '@hazeljs/agent' },
|
|
237
|
+
{ name: 'Audit Logging (@hazeljs/audit)', value: '@hazeljs/audit' },
|
|
229
238
|
{ name: 'Authentication (@hazeljs/auth)', value: '@hazeljs/auth' },
|
|
230
239
|
{ name: 'OAuth - Google/Microsoft/GitHub (@hazeljs/oauth)', value: '@hazeljs/oauth' },
|
|
231
240
|
{ name: 'Caching (@hazeljs/cache)', value: '@hazeljs/cache' },
|
|
@@ -242,6 +251,7 @@ function generateApp(program) {
|
|
|
242
251
|
{ name: 'Machine Learning (@hazeljs/ml)', value: '@hazeljs/ml' },
|
|
243
252
|
{ name: 'PDF to Audio (@hazeljs/pdf-to-audio)', value: '@hazeljs/pdf-to-audio' },
|
|
244
253
|
{ name: 'Prisma ORM (@hazeljs/prisma)', value: '@hazeljs/prisma' },
|
|
254
|
+
{ name: 'TypeORM (@hazeljs/typeorm)', value: '@hazeljs/typeorm' },
|
|
245
255
|
{ name: 'Queue/BullMQ (@hazeljs/queue)', value: '@hazeljs/queue' },
|
|
246
256
|
{ name: 'RAG/Vector Search (@hazeljs/rag)', value: '@hazeljs/rag' },
|
|
247
257
|
{ name: 'Resilience - Circuit Breaker (@hazeljs/resilience)', value: '@hazeljs/resilience' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazeljs/cli",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.53",
|
|
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": "
|
|
72
|
+
"gitHead": "84311f65083627fa53bf2a22f96cd212c196873c"
|
|
73
73
|
}
|