@hazeljs/cli 0.2.0-beta.51 → 0.2.0-beta.52
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 +1 -0
- package/dist/commands/add.js +4 -0
- package/dist/commands/generate-app.js +5 -0
- package/package.json +2 -2
package/@template/package.json
CHANGED
package/README.md
CHANGED
|
@@ -104,6 +104,7 @@ 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)
|
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" })',
|
|
@@ -59,6 +59,10 @@ 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/audit')) {
|
|
63
|
+
imports.push("import { AuditModule, ConsoleAuditTransport } from '@hazeljs/audit';");
|
|
64
|
+
moduleImports.push("AuditModule.forRoot({ transports: [new ConsoleAuditTransport()] })");
|
|
65
|
+
}
|
|
62
66
|
if (packages.includes('@hazeljs/auth')) {
|
|
63
67
|
imports.push("import { JwtModule } from '@hazeljs/auth';");
|
|
64
68
|
moduleImports.push("JwtModule.forRoot({ secret: process.env.JWT_SECRET || 'change-me', expiresIn: '1d' })");
|
|
@@ -226,6 +230,7 @@ function generateApp(program) {
|
|
|
226
230
|
choices: [
|
|
227
231
|
{ name: 'AI Integration (@hazeljs/ai)', value: '@hazeljs/ai' },
|
|
228
232
|
{ name: 'AI Agents (@hazeljs/agent)', value: '@hazeljs/agent' },
|
|
233
|
+
{ name: 'Audit Logging (@hazeljs/audit)', value: '@hazeljs/audit' },
|
|
229
234
|
{ name: 'Authentication (@hazeljs/auth)', value: '@hazeljs/auth' },
|
|
230
235
|
{ name: 'OAuth - Google/Microsoft/GitHub (@hazeljs/oauth)', value: '@hazeljs/oauth' },
|
|
231
236
|
{ name: 'Caching (@hazeljs/cache)', value: '@hazeljs/cache' },
|
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.52",
|
|
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": "416ae971cf8fc45ab53df8cd6f43ad40439ef2f2"
|
|
73
73
|
}
|