create-warlock 4.2.5 → 4.2.7
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/CHANGELOG.md +14 -0
- package/bin/create-app.js +5 -0
- package/package.json +2 -2
- package/templates/warlock/.env.example +36 -0
- package/templates/warlock/.gitattributes +1 -0
- package/templates/warlock/.husky/pre-commit +4 -0
- package/templates/warlock/.prettierignore +4 -0
- package/templates/warlock/.prettierrc.json +10 -0
- package/templates/warlock/.vscode/settings.json +41 -0
- package/templates/warlock/README.md +57 -0
- package/templates/warlock/_.gitignore +6 -0
- package/templates/warlock/docs/new-module.md +551 -0
- package/templates/warlock/eslint.config.js +98 -0
- package/templates/warlock/package.json +74 -0
- package/templates/warlock/public/home.css +523 -0
- package/templates/warlock/skills/api-design/SKILL.md +461 -0
- package/templates/warlock/skills/code-standards/SKILL.md +595 -0
- package/templates/warlock/skills/data-and-persistence/SKILL.md +330 -0
- package/templates/warlock/skills/git-workflow/SKILL.md +282 -0
- package/templates/warlock/skills/module-boundaries/SKILL.md +283 -0
- package/templates/warlock/skills/observability-and-resilience/SKILL.md +306 -0
- package/templates/warlock/skills/security-baseline/SKILL.md +352 -0
- package/templates/warlock/skills/testing-strategy/SKILL.md +323 -0
- package/templates/warlock/src/app/auth/controllers/forgot-password.controller.ts +28 -0
- package/templates/warlock/src/app/auth/controllers/login.controller.ts +22 -0
- package/templates/warlock/src/app/auth/controllers/logout-all.controller.ts +16 -0
- package/templates/warlock/src/app/auth/controllers/logout.controller.ts +16 -0
- package/templates/warlock/src/app/auth/controllers/me.controller.ts +13 -0
- package/templates/warlock/src/app/auth/controllers/refresh-token.controller.ts +29 -0
- package/templates/warlock/src/app/auth/controllers/reset-password.controller.ts +23 -0
- package/templates/warlock/src/app/auth/main.ts +9 -0
- package/templates/warlock/src/app/auth/models/otp/index.ts +1 -0
- package/templates/warlock/src/app/auth/models/otp/migrations/22-12-2025_10-30-20.otp-migration.ts +30 -0
- package/templates/warlock/src/app/auth/models/otp/otp.model.ts +69 -0
- package/templates/warlock/src/app/auth/requests/guarded.request.ts +10 -0
- package/templates/warlock/src/app/auth/routes.ts +22 -0
- package/templates/warlock/src/app/auth/schema/login.schema.ts +8 -0
- package/templates/warlock/src/app/auth/schema/reset-password.schema.ts +9 -0
- package/templates/warlock/src/app/auth/services/auth.service.ts +66 -0
- package/templates/warlock/src/app/auth/services/forgot-password.service.ts +28 -0
- package/templates/warlock/src/app/auth/services/otp.service.ts +173 -0
- package/templates/warlock/src/app/auth/services/reset-password.service.ts +39 -0
- package/templates/warlock/src/app/auth/utils/auth-error-code.ts +6 -0
- package/templates/warlock/src/app/auth/utils/locales.ts +89 -0
- package/templates/warlock/src/app/auth/utils/types.ts +14 -0
- package/templates/warlock/src/app/posts/controllers/create-new-post.controller.ts +21 -0
- package/templates/warlock/src/app/posts/controllers/update-post.controller.ts +30 -0
- package/templates/warlock/src/app/posts/models/post/migrations/09-01-2026_02-07-51-post.migration.ts +15 -0
- package/templates/warlock/src/app/posts/models/post/post.model.ts +23 -0
- package/templates/warlock/src/app/posts/resources/post.resource.ts +14 -0
- package/templates/warlock/src/app/posts/routes.ts +8 -0
- package/templates/warlock/src/app/posts/schema/create-post.schema.ts +9 -0
- package/templates/warlock/src/app/posts/schema/update-post.schema.ts +9 -0
- package/templates/warlock/src/app/shared/components/HomePageComponent.tsx +229 -0
- package/templates/warlock/src/app/shared/controllers/home-page.controller.ts +18 -0
- package/templates/warlock/src/app/shared/controllers/home-page.controller.tsx +8 -0
- package/templates/warlock/src/app/shared/routes.ts +4 -0
- package/templates/warlock/src/app/shared/services/scheduler.service.ts +3 -0
- package/templates/warlock/src/app/shared/tests/infrastructure.test.ts +22 -0
- package/templates/warlock/src/app/shared/utils/global-columns-schema.ts +8 -0
- package/templates/warlock/src/app/shared/utils/locales.ts +766 -0
- package/templates/warlock/src/app/shared/utils/router.ts +30 -0
- package/templates/warlock/src/app/uploads/controllers/fetch-uploaded-file.controller.ts +33 -0
- package/templates/warlock/src/app/uploads/routes.ts +4 -0
- package/templates/warlock/src/app/users/commands/hello-world.command.ts +8 -0
- package/templates/warlock/src/app/users/controllers/create-new-user.controller.ts +27 -0
- package/templates/warlock/src/app/users/controllers/list-users.controller.ts +12 -0
- package/templates/warlock/src/app/users/events/inject-created-by-user.into-model.event.ts +32 -0
- package/templates/warlock/src/app/users/events/sync.ts +5 -0
- package/templates/warlock/src/app/users/main.ts +5 -0
- package/templates/warlock/src/app/users/models/user/index.ts +1 -0
- package/templates/warlock/src/app/users/models/user/migrations/11-12-2025_23-58-03-user.migration.ts +15 -0
- package/templates/warlock/src/app/users/models/user/user.model.ts +64 -0
- package/templates/warlock/src/app/users/repositories/users.repository.ts +23 -0
- package/templates/warlock/src/app/users/resources/user.resource.ts +14 -0
- package/templates/warlock/src/app/users/routes.ts +8 -0
- package/templates/warlock/src/app/users/schema/create-user.schema.ts +11 -0
- package/templates/warlock/src/app/users/seeds/users.seed.ts +21 -0
- package/templates/warlock/src/app/users/services/get-users.service.ts +5 -0
- package/templates/warlock/src/app/users/services/list-users.service.ts +17 -0
- package/templates/warlock/src/app/users/services/login-social.ts +19 -0
- package/templates/warlock/src/config/app.ts +12 -0
- package/templates/warlock/src/config/auth.ts +20 -0
- package/templates/warlock/src/config/cache.ts +59 -0
- package/templates/warlock/src/config/database.ts +65 -0
- package/templates/warlock/src/config/http.ts +23 -0
- package/templates/warlock/src/config/log.ts +22 -0
- package/templates/warlock/src/config/mail.ts +16 -0
- package/templates/warlock/src/config/repository.ts +11 -0
- package/templates/warlock/src/config/storage.ts +34 -0
- package/templates/warlock/src/config/tests.ts +5 -0
- package/templates/warlock/src/config/validation.ts +7 -0
- package/templates/warlock/storage/.gitignore +2 -0
- package/templates/warlock/tsconfig.json +27 -0
- package/templates/warlock/warlock.config.ts +15 -0
- package/templates/warlock/yarn.lock +2332 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## 4.2.7
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- The published package now ships its `templates/` folder, so scaffolding a new project works from the installed package — it was missing from the build, which made the wizard fail with "Something went wrong" at the template-copy step. The rest of the family is re-published at 4.2.7 to keep the lockstep version line; no other functional changes.
|
|
14
|
+
|
|
15
|
+
## 4.2.6
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- The published package now ships its `bin` folder again, so the `create-warlock` CLI works from the installed package — it was omitted from the 4.2.5 build. The rest of the family is re-published at 4.2.6 to keep the lockstep version line; no other functional changes.
|
|
20
|
+
|
|
21
|
+
## 4.2.5
|
|
22
|
+
|
|
9
23
|
- The feature wizard now offers **Notifications** (`@warlock.js/notifications`) under "Jobs & Messaging" — opt-in; selecting it delegates to `warlock add notifications` (ejects config + scaffolds the in-app model/migration).
|
|
10
24
|
|
|
11
25
|
## 4.1.15
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@clack/prompts": "^0.7.0",
|
|
11
11
|
"@mongez/copper": "^2.1.2",
|
|
12
|
-
"@warlock.js/fs": "4.2.
|
|
12
|
+
"@warlock.js/fs": "4.2.7",
|
|
13
13
|
"@mongez/reinforcements": "^3.2.0",
|
|
14
14
|
"cross-spawn": "^7.0.3",
|
|
15
15
|
"rimraf": "^6.0.1",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"bin": {
|
|
19
19
|
"create-warlock": "bin/create-app.js"
|
|
20
20
|
},
|
|
21
|
-
"version": "4.2.
|
|
21
|
+
"version": "4.2.7",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "./esm/index.mjs",
|
|
24
24
|
"module": "./esm/index.mjs",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# App Configurations
|
|
2
|
+
APP_NAME="appName"
|
|
3
|
+
LOCALE_CODE=en
|
|
4
|
+
|
|
5
|
+
TIMEZONE=UTC
|
|
6
|
+
|
|
7
|
+
# Http Configurations
|
|
8
|
+
HTTP_PORT=2030
|
|
9
|
+
HTTP_HOST=localhost
|
|
10
|
+
BASE_URL=http://${HTTP_HOST}:${HTTP_PORT}
|
|
11
|
+
|
|
12
|
+
# Database Configurations
|
|
13
|
+
DB_AUTH=admin
|
|
14
|
+
DB_PORT=27017
|
|
15
|
+
DB_HOST=localhost
|
|
16
|
+
DB_NAME=appName
|
|
17
|
+
DB_USERNAME=
|
|
18
|
+
DB_PASSWORD=
|
|
19
|
+
|
|
20
|
+
# Cache
|
|
21
|
+
CACHE_DRIVER=memory
|
|
22
|
+
## Redis
|
|
23
|
+
REDIS_HOST=localhost
|
|
24
|
+
REDIS_PORT=6379
|
|
25
|
+
# or using redis url
|
|
26
|
+
#REDIS_URL=
|
|
27
|
+
|
|
28
|
+
# Mail
|
|
29
|
+
MAIL_HOST=
|
|
30
|
+
MAIL_PORT=465
|
|
31
|
+
MAIL_ENCRYPTION=ssl
|
|
32
|
+
MAIL_SECURE=true
|
|
33
|
+
MAIL_USERNAME=
|
|
34
|
+
MAIL_PASSWORD=
|
|
35
|
+
MAIL_FROM_NAME=${APP_NAME}
|
|
36
|
+
MAIL_FROM_ADDRESS=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
3
|
+
"editor.formatOnSave": true,
|
|
4
|
+
"editor.codeActionsOnSave": {
|
|
5
|
+
"source.fixAll.eslint": "explicit",
|
|
6
|
+
"source.organizeImports": "never"
|
|
7
|
+
},
|
|
8
|
+
"[typescript]": {
|
|
9
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
10
|
+
"editor.formatOnSave": true
|
|
11
|
+
},
|
|
12
|
+
"[typescriptreact]": {
|
|
13
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
14
|
+
"editor.formatOnSave": true
|
|
15
|
+
},
|
|
16
|
+
"[javascript]": {
|
|
17
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
18
|
+
"editor.formatOnSave": true
|
|
19
|
+
},
|
|
20
|
+
"[javascriptreact]": {
|
|
21
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
22
|
+
"editor.formatOnSave": true
|
|
23
|
+
},
|
|
24
|
+
"[json]": {
|
|
25
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
26
|
+
"editor.formatOnSave": true
|
|
27
|
+
},
|
|
28
|
+
"[css]": {
|
|
29
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
30
|
+
"editor.formatOnSave": true
|
|
31
|
+
},
|
|
32
|
+
"prettier.configPath": ".prettierrc.json",
|
|
33
|
+
"prettier.requireConfig": true,
|
|
34
|
+
"prettier.ignorePath": ".prettierignore",
|
|
35
|
+
"prettier.documentSelectors": ["**/*.{ts,tsx,js,jsx,json,css,md}"],
|
|
36
|
+
"prettier.enable": true,
|
|
37
|
+
"prettier.useEditorConfig": false,
|
|
38
|
+
"prettier.resolveGlobalModules": false,
|
|
39
|
+
"eslint.format.enable": false,
|
|
40
|
+
"eslint.codeActionsOnSave.mode": "all"
|
|
41
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Warlock.js
|
|
2
|
+
|
|
3
|
+
A Blazing fast Nodejs framework to build comprehensive APIs.
|
|
4
|
+
|
|
5
|
+
For more knowledge about Warlock js, please visit Full documentation is in [Official Documentation](https://warlock.js.org).
|
|
6
|
+
|
|
7
|
+
## Start Development Server
|
|
8
|
+
|
|
9
|
+
To start the development server, run the following command
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn start
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
OR
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm start
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Build for Production
|
|
22
|
+
|
|
23
|
+
To build the project for production, run the following command
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
OR
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Start Production Server
|
|
36
|
+
|
|
37
|
+
After building the project, run the following command to start the production server
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
yarn prod
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
To run it in background, run the following command
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
yarn serve
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> Please note that you should have nohup installed on your system to run the server in background
|
|
50
|
+
|
|
51
|
+
## Tests
|
|
52
|
+
|
|
53
|
+
To run tests, run the following command
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
yarn test
|
|
57
|
+
```
|