create-warlock 4.0.122 โ†’ 4.0.124

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-warlock",
3
- "version": "4.0.122",
3
+ "version": "4.0.124",
4
4
  "main": "./esm/index.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -6,21 +6,21 @@ TIMEZONE=UTC
6
6
 
7
7
  # Http Configurations
8
8
  HTTP_PORT=2030
9
- HTTP_HOST=127.0.0.1
9
+ HTTP_HOST=localhost
10
10
  BASE_URL=http://${HTTP_HOST}:${HTTP_PORT}
11
11
 
12
12
  # Database Configurations
13
13
  DB_AUTH=admin
14
14
  DB_PORT=27017
15
- DB_HOST=127.0.0.1
15
+ DB_HOST=localhost
16
16
  DB_NAME=appName
17
- DB_USERNAME=root
18
- DB_PASSWORD=root
17
+ DB_USERNAME=
18
+ DB_PASSWORD=
19
19
 
20
20
  # Cache
21
21
  CACHE_DRIVER=memory
22
22
  ## Redis
23
- REDIS_HOST=127.0.0.1
23
+ REDIS_HOST=localhost
24
24
  REDIS_PORT=6379
25
25
  # or using redis url
26
26
  #REDIS_URL=
@@ -23,13 +23,13 @@
23
23
  "@mongez/reinforcements": "^2.3.17",
24
24
  "@mongez/localization": "^3.2.1",
25
25
  "@mongez/supportive-is": "^2.0.4",
26
- "@warlock.js/auth": "4.0.122",
27
- "@warlock.js/cache": "4.0.122",
28
- "@warlock.js/cascade": "4.0.122",
29
- "@warlock.js/scheduler": "4.0.122",
30
- "@warlock.js/core": "4.0.122",
31
- "@warlock.js/logger": "4.0.122",
32
- "@warlock.js/seal": "4.0.122",
26
+ "@warlock.js/auth": "4.0.124",
27
+ "@warlock.js/cache": "4.0.124",
28
+ "@warlock.js/cascade": "4.0.124",
29
+ "@warlock.js/scheduler": "4.0.124",
30
+ "@warlock.js/core": "4.0.124",
31
+ "@warlock.js/logger": "4.0.124",
32
+ "@warlock.js/seal": "4.0.124",
33
33
  "dayjs": "^1.11.19",
34
34
  "mongodb": "^7.0.0"
35
35
  },
@@ -0,0 +1,6 @@
1
+ import type { Request } from "@warlock.js/core";
2
+ import type { User } from "app/users/models/user";
3
+
4
+ export type GuardedRequest<RequestPayload = unknown> = Request<RequestPayload> & {
5
+ user: User;
6
+ };
@@ -1,4 +1,4 @@
1
- import { groupedTranslations } from "@mongez/localization";
1
+ import { groupedTranslations } from "@warlock.js/core";
2
2
 
3
3
  groupedTranslations("auth", {
4
4
  // App-level translations
@@ -2,7 +2,7 @@ import { Application, publicUrl } from "@warlock.js/core";
2
2
 
3
3
  export function HomePageComponent() {
4
4
  return (
5
- <>
5
+ <html>
6
6
  <head>
7
7
  <meta charSet="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -23,224 +23,224 @@ export function HomePageComponent() {
23
23
  rel="stylesheet"
24
24
  />
25
25
  </head>
26
-
27
- <div className="warlock-home">
28
- <div className="warlock-container">
29
- {/* Header */}
30
- <header className="warlock-header">
31
- <a href="/" className="warlock-logo">
32
- <span className="warlock-logo-icon">โšก</span>
33
- <span>Warlock.js</span>
34
- </a>
35
- <nav className="warlock-nav">
36
- <a
37
- href="https://warlock.js.org"
38
- target="_blank"
39
- rel="noopener noreferrer">
40
- Docs
41
- </a>
42
- <a
43
- href="https://github.com/warlockjs"
44
- target="_blank"
45
- rel="noopener noreferrer">
46
- GitHub
47
- </a>
48
- <a
49
- href="https://discord.gg/x3W9SN2jvx"
50
- target="_blank"
51
- rel="noopener noreferrer">
52
- Discord
53
- </a>
54
- </nav>
55
- </header>
56
-
57
- {/* Hero Section */}
58
- <section className="warlock-hero">
59
- <h1>
60
- Build Modern Web Apps
61
- <br />
62
- with Confidence
63
- </h1>
64
- <p>
65
- A powerful, elegant TypeScript framework designed for developers
66
- who demand excellence. Ship faster, scale better, and enjoy the
67
- journey.
68
- </p>
69
- <div className="warlock-cta">
70
- <a
71
- href="https://warlock.js.org"
72
- className="warlock-btn warlock-btn-primary">
73
- <span>Get Started</span>
74
- <span>โ†’</span>
26
+ <body>
27
+ <div className="warlock-home">
28
+ <div className="warlock-container">
29
+ {/* Header */}
30
+ <header className="warlock-header">
31
+ <a href="/" className="warlock-logo">
32
+ <span className="warlock-logo-icon">โšก</span>
33
+ <span>Warlock.js</span>
75
34
  </a>
76
- <a
77
- href="https://github.com/warlockjs"
78
- className="warlock-btn warlock-btn-secondary">
79
- <span>View on GitHub</span>
80
- </a>
81
- </div>
82
- </section>
35
+ <nav className="warlock-nav">
36
+ <a
37
+ href="https://warlock.js.org"
38
+ target="_blank"
39
+ rel="noopener noreferrer">
40
+ Docs
41
+ </a>
42
+ <a
43
+ href="https://github.com/warlockjs"
44
+ target="_blank"
45
+ rel="noopener noreferrer">
46
+ GitHub
47
+ </a>
48
+ <a
49
+ href="https://discord.gg/x3W9SN2jvx"
50
+ target="_blank"
51
+ rel="noopener noreferrer">
52
+ Discord
53
+ </a>
54
+ </nav>
55
+ </header>
56
+ {/* Hero Section */}
57
+ <section className="warlock-hero">
58
+ <h1>
59
+ Build Modern Web Apps
60
+ <br />
61
+ with Confidence
62
+ </h1>
63
+ <p>
64
+ A powerful, elegant TypeScript framework designed for developers
65
+ who demand excellence. Ship faster, scale better, and enjoy the
66
+ journey.
67
+ </p>
68
+ <div className="warlock-cta">
69
+ <a
70
+ href="https://warlock.js.org"
71
+ className="warlock-btn warlock-btn-primary">
72
+ <span>Get Started</span>
73
+ <span>โ†’</span>
74
+ </a>
75
+ <a
76
+ href="https://github.com/warlockjs"
77
+ className="warlock-btn warlock-btn-secondary">
78
+ <span>View on GitHub</span>
79
+ </a>
80
+ </div>
81
+ </section>
83
82
 
84
- {/* Features Section */}
85
- <section className="warlock-features">
86
- <h2 className="warlock-section-title">Why Warlock.js?</h2>
87
- <p className="warlock-section-subtitle">
88
- Everything you need to build production-ready applications
89
- </p>
83
+ {/* Features Section */}
84
+ <section className="warlock-features">
85
+ <h2 className="warlock-section-title">Why Warlock.js?</h2>
86
+ <p className="warlock-section-subtitle">
87
+ Everything you need to build production-ready applications
88
+ </p>
90
89
 
91
- <div className="warlock-features-grid">
92
- <div className="warlock-feature-card">
93
- <span className="warlock-feature-icon">๐Ÿš€</span>
94
- <h3>Lightning Fast</h3>
95
- <p>
96
- Blazing fast development server with instant hot reload. Build
97
- and deploy optimized production bundles in seconds.
98
- </p>
99
- </div>
90
+ <div className="warlock-features-grid">
91
+ <div className="warlock-feature-card">
92
+ <span className="warlock-feature-icon">๐Ÿš€</span>
93
+ <h3>Lightning Fast</h3>
94
+ <p>
95
+ Blazing fast development server with instant hot reload.
96
+ Build and deploy optimized production bundles in seconds.
97
+ </p>
98
+ </div>
100
99
 
101
- <div className="warlock-feature-card">
102
- <span className="warlock-feature-icon">๐ŸŽฏ</span>
103
- <h3>Type-Safe</h3>
104
- <p>
105
- Built with TypeScript from the ground up. Enjoy full type
106
- safety across your entire application with intelligent
107
- auto-completion.
108
- </p>
109
- </div>
100
+ <div className="warlock-feature-card">
101
+ <span className="warlock-feature-icon">๐ŸŽฏ</span>
102
+ <h3>Type-Safe</h3>
103
+ <p>
104
+ Built with TypeScript from the ground up. Enjoy full type
105
+ safety across your entire application with intelligent
106
+ auto-completion.
107
+ </p>
108
+ </div>
110
109
 
111
- <div className="warlock-feature-card">
112
- <span className="warlock-feature-icon">๐Ÿ—๏ธ</span>
113
- <h3>Battle-Tested Architecture</h3>
114
- <p>
115
- Proven patterns and best practices baked in. From routing to
116
- database management, we've got you covered.
117
- </p>
118
- </div>
110
+ <div className="warlock-feature-card">
111
+ <span className="warlock-feature-icon">๐Ÿ—๏ธ</span>
112
+ <h3>Battle-Tested Architecture</h3>
113
+ <p>
114
+ Proven patterns and best practices baked in. From routing to
115
+ database management, we've got you covered.
116
+ </p>
117
+ </div>
119
118
 
120
- <div className="warlock-feature-card">
121
- <span className="warlock-feature-icon">๐Ÿ”Œ</span>
122
- <h3>Powerful CLI</h3>
123
- <p>
124
- Scaffold components, run migrations, manage seeds, and more
125
- with an intuitive command-line interface that boosts
126
- productivity.
127
- </p>
128
- </div>
119
+ <div className="warlock-feature-card">
120
+ <span className="warlock-feature-icon">๐Ÿ”Œ</span>
121
+ <h3>Powerful CLI</h3>
122
+ <p>
123
+ Scaffold components, run migrations, manage seeds, and more
124
+ with an intuitive command-line interface that boosts
125
+ productivity.
126
+ </p>
127
+ </div>
129
128
 
130
- <div className="warlock-feature-card">
131
- <span className="warlock-feature-icon">๐ŸŽจ</span>
132
- <h3>Flexible & Extensible</h3>
133
- <p>
134
- Plugin architecture allows you to extend core functionality.
135
- Build your own tools or use community packages.
136
- </p>
137
- </div>
129
+ <div className="warlock-feature-card">
130
+ <span className="warlock-feature-icon">๐ŸŽจ</span>
131
+ <h3>Flexible & Extensible</h3>
132
+ <p>
133
+ Plugin architecture allows you to extend core functionality.
134
+ Build your own tools or use community packages.
135
+ </p>
136
+ </div>
138
137
 
139
- <div className="warlock-feature-card">
140
- <span className="warlock-feature-icon">๐ŸŒ</span>
141
- <h3>Multi-Tenant Ready</h3>
142
- <p>
143
- Built-in support for multi-tenancy. Scale from single to
144
- multi-tenant applications without architectural changes.
145
- </p>
138
+ <div className="warlock-feature-card">
139
+ <span className="warlock-feature-icon">๐ŸŒ</span>
140
+ <h3>Multi-Tenant Ready</h3>
141
+ <p>
142
+ Built-in support for multi-tenancy. Scale from single to
143
+ multi-tenant applications without architectural changes.
144
+ </p>
145
+ </div>
146
146
  </div>
147
- </div>
148
- </section>
147
+ </section>
149
148
 
150
- {/* Quick Start Section */}
151
- <section className="warlock-quickstart">
152
- <h2 className="warlock-section-title">Get Started in Seconds</h2>
153
- <p className="warlock-section-subtitle">
154
- One command to rule them all
155
- </p>
149
+ {/* Quick Start Section */}
150
+ <section className="warlock-quickstart">
151
+ <h2 className="warlock-section-title">Get Started in Seconds</h2>
152
+ <p className="warlock-section-subtitle">
153
+ One command to rule them all
154
+ </p>
156
155
 
157
- <div className="warlock-code-block">
158
- <div className="warlock-code-header">
159
- <span className="warlock-code-dot"></span>
160
- <span className="warlock-code-dot"></span>
161
- <span className="warlock-code-dot"></span>
156
+ <div className="warlock-code-block">
157
+ <div className="warlock-code-header">
158
+ <span className="warlock-code-dot"></span>
159
+ <span className="warlock-code-dot"></span>
160
+ <span className="warlock-code-dot"></span>
161
+ </div>
162
+ <div className="warlock-code-content">
163
+ <code className="warlock-code-line">
164
+ <span className="warlock-code-comment">
165
+ # Create a new Warlock.js project
166
+ </span>
167
+ </code>
168
+ <code className="warlock-code-line">
169
+ <span className="warlock-code-command">npx</span>{" "}
170
+ create-warlock@latest{" "}
171
+ </code>
172
+ <code className="warlock-code-line">&nbsp;</code>
173
+ <code className="warlock-code-line">
174
+ <span className="warlock-code-comment">
175
+ # Navigate to your project
176
+ </span>
177
+ </code>
178
+ <code className="warlock-code-line">
179
+ <span className="warlock-code-command">cd</span>{" "}
180
+ <span className="warlock-code-flag">my-app</span>
181
+ </code>
182
+ <code className="warlock-code-line">&nbsp;</code>
183
+ <code className="warlock-code-line">
184
+ <span className="warlock-code-comment">
185
+ # Start the development server
186
+ </span>
187
+ </code>
188
+ <code className="warlock-code-line">
189
+ <span className="warlock-code-command">yarn</span> dev
190
+ </code>
191
+ <code className="warlock-code-line">&nbsp;</code>
192
+ <code className="warlock-code-line">
193
+ <span className="warlock-code-comment">
194
+ # ๐Ÿš€ Server ready at http://localhost:2030
195
+ </span>
196
+ </code>
197
+ </div>
162
198
  </div>
163
- <div className="warlock-code-content">
164
- <code className="warlock-code-line">
165
- <span className="warlock-code-comment">
166
- # Create a new Warlock.js project
167
- </span>
168
- </code>
169
- <code className="warlock-code-line">
170
- <span className="warlock-code-command">npx</span>{" "}
171
- create-warlock@latest{" "}
172
- </code>
173
- <code className="warlock-code-line">&nbsp;</code>
174
- <code className="warlock-code-line">
175
- <span className="warlock-code-comment">
176
- # Navigate to your project
177
- </span>
178
- </code>
179
- <code className="warlock-code-line">
180
- <span className="warlock-code-command">cd</span>{" "}
181
- <span className="warlock-code-flag">my-app</span>
182
- </code>
183
- <code className="warlock-code-line">&nbsp;</code>
184
- <code className="warlock-code-line">
185
- <span className="warlock-code-comment">
186
- # Start the development server
187
- </span>
188
- </code>
189
- <code className="warlock-code-line">
190
- <span className="warlock-code-command">yarn</span> start
191
- </code>
192
- <code className="warlock-code-line">&nbsp;</code>
193
- <code className="warlock-code-line">
194
- <span className="warlock-code-comment">
195
- # ๐Ÿš€ Server ready at http://localhost:2030
196
- </span>
197
- </code>
198
- </div>
199
- </div>
200
- </section>
199
+ </section>
201
200
 
202
- {/* Footer */}
203
- <footer className="warlock-footer">
204
- <div className="warlock-social-links">
205
- <a
206
- href="https://discord.gg/x3W9SN2jvx"
207
- className="warlock-social-link"
208
- target="_blank"
209
- rel="noopener noreferrer">
210
- <span className="warlock-social-icon">๐Ÿ’ฌ</span>
211
- <span>Join Discord</span>
212
- </a>
213
- <a
214
- href="https://github.com/warlockjs"
215
- className="warlock-social-link"
216
- target="_blank"
217
- rel="noopener noreferrer">
218
- <span className="warlock-social-icon">โญ</span>
219
- <span>Star on GitHub</span>
220
- </a>
221
- <a
222
- href="https://warlock.js.org"
223
- className="warlock-social-link"
224
- target="_blank"
225
- rel="noopener noreferrer">
226
- <span className="warlock-social-icon">๐Ÿ“š</span>
227
- <span>Read Docs</span>
228
- </a>
229
- </div>
230
- <p className="warlock-footer-text">
231
- Built with โšก by the{" "}
232
- <a
233
- href="https://github.com/warlockjs"
234
- target="_blank"
235
- rel="noopener noreferrer">
236
- Warlock.js Team
237
- </a>
238
- {" ยท "}
239
- <span>v{Application.version}</span>
240
- </p>
241
- </footer>
201
+ {/* Footer */}
202
+ <footer className="warlock-footer">
203
+ <div className="warlock-social-links">
204
+ <a
205
+ href="https://discord.gg/x3W9SN2jvx"
206
+ className="warlock-social-link"
207
+ target="_blank"
208
+ rel="noopener noreferrer">
209
+ <span className="warlock-social-icon">๐Ÿ’ฌ</span>
210
+ <span>Join Discord</span>
211
+ </a>
212
+ <a
213
+ href="https://github.com/warlockjs"
214
+ className="warlock-social-link"
215
+ target="_blank"
216
+ rel="noopener noreferrer">
217
+ <span className="warlock-social-icon">โญ</span>
218
+ <span>Star on GitHub</span>
219
+ </a>
220
+ <a
221
+ href="https://warlock.js.org"
222
+ className="warlock-social-link"
223
+ target="_blank"
224
+ rel="noopener noreferrer">
225
+ <span className="warlock-social-icon">๐Ÿ“š</span>
226
+ <span>Read Docs</span>
227
+ </a>
228
+ </div>
229
+ <p className="warlock-footer-text">
230
+ Built with โšก by the{" "}
231
+ <a
232
+ href="https://github.com/warlockjs"
233
+ target="_blank"
234
+ rel="noopener noreferrer">
235
+ Warlock.js Team
236
+ </a>
237
+ {" ยท "}
238
+ <span>v{Application.version}</span>
239
+ </p>
240
+ </footer>
241
+ </div>
242
242
  </div>
243
- </div>
244
- </>
243
+ </body>
244
+ </html>
245
245
  );
246
246
  }
@@ -1,4 +1,4 @@
1
- import { groupedTranslations } from "@mongez/localization";
1
+ import { groupedTranslations } from "@warlock.js/core";
2
2
 
3
3
  groupedTranslations("validation", {
4
4
  required: {
@@ -13,13 +13,10 @@
13
13
  "typeRoots": ["./src/typings.d.ts"],
14
14
  "noFallthroughCasesInSwitch": true,
15
15
  "module": "ESNext",
16
- "moduleResolution": "node",
17
16
  "jsx": "react-jsx",
18
- "resolveJsonModule": true,
19
17
  "isolatedModules": true,
20
- "baseUrl": "./",
21
18
  "paths": {
22
- "app/*": ["src/app/*"]
19
+ "app/*": ["./src/app/*"]
23
20
  },
24
21
  "noEmit": true
25
22
  },