@hazeljs/cli 0.2.0-beta.48 → 0.2.0-beta.49
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/README.md +2 -2
- package/dist/commands/add.js +4 -0
- package/dist/commands/generate-app.js +5 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @hazeljs/cli
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**From zero to CRUD in one command.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Generate controllers, services, modules, DTOs — or a full CRUD resource. Interactive project setup, package management, and code that follows best practices. Stop copy-pasting, start shipping.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@hazeljs/cli)
|
|
8
8
|
[](https://www.npmjs.com/package/@hazeljs/cli)
|
package/dist/commands/add.js
CHANGED
|
@@ -20,6 +20,10 @@ const HAZEL_PACKAGES = {
|
|
|
20
20
|
npm: '@hazeljs/auth',
|
|
21
21
|
hint: 'import { JwtModule } from "@hazeljs/auth";\n // JwtModule.forRoot({ secret: "your-secret", expiresIn: "1d" })',
|
|
22
22
|
},
|
|
23
|
+
oauth: {
|
|
24
|
+
npm: '@hazeljs/oauth',
|
|
25
|
+
hint: 'import { OAuthModule } from "@hazeljs/oauth";\n // OAuthModule.forRoot({ providers: { google: {...}, microsoft: {...}, github: {...} } })',
|
|
26
|
+
},
|
|
23
27
|
cache: {
|
|
24
28
|
npm: '@hazeljs/cache',
|
|
25
29
|
hint: 'import { CacheModule } from "@hazeljs/cache";',
|
|
@@ -63,6 +63,10 @@ function scaffoldPackageBoilerplate(destPath, packages) {
|
|
|
63
63
|
imports.push("import { JwtModule } from '@hazeljs/auth';");
|
|
64
64
|
moduleImports.push("JwtModule.forRoot({ secret: process.env.JWT_SECRET || 'change-me', expiresIn: '1d' })");
|
|
65
65
|
}
|
|
66
|
+
if (packages.includes('@hazeljs/oauth')) {
|
|
67
|
+
imports.push("import { OAuthModule } from '@hazeljs/oauth';");
|
|
68
|
+
moduleImports.push("OAuthModule.forRoot({ providers: { google: { clientId: process.env.GOOGLE_CLIENT_ID!, clientSecret: process.env.GOOGLE_CLIENT_SECRET!, redirectUri: process.env.OAUTH_REDIRECT_URI! } } })");
|
|
69
|
+
}
|
|
66
70
|
if (packages.includes('@hazeljs/cache')) {
|
|
67
71
|
imports.push("import { CacheModule } from '@hazeljs/cache';");
|
|
68
72
|
moduleImports.push('CacheModule');
|
|
@@ -223,6 +227,7 @@ function generateApp(program) {
|
|
|
223
227
|
{ name: 'AI Integration (@hazeljs/ai)', value: '@hazeljs/ai' },
|
|
224
228
|
{ name: 'AI Agents (@hazeljs/agent)', value: '@hazeljs/agent' },
|
|
225
229
|
{ name: 'Authentication (@hazeljs/auth)', value: '@hazeljs/auth' },
|
|
230
|
+
{ name: 'OAuth - Google/Microsoft/GitHub (@hazeljs/oauth)', value: '@hazeljs/oauth' },
|
|
226
231
|
{ name: 'Caching (@hazeljs/cache)', value: '@hazeljs/cache' },
|
|
227
232
|
{ name: 'Configuration (@hazeljs/config)', value: '@hazeljs/config' },
|
|
228
233
|
{ name: 'Cron Jobs (@hazeljs/cron)', value: '@hazeljs/cron' },
|
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.49",
|
|
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": "263b1f8c87ad9008ae21b6472860eb1b6cf1a6ce"
|
|
73
73
|
}
|