create-warlock 5.2.3 → 5.3.0

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.
Files changed (46) hide show
  1. package/esm/commands/create-new-app/index.mjs.map +1 -1
  2. package/esm/commands/create-warlock-app/index.mjs +1 -1
  3. package/esm/commands/create-warlock-app/index.mjs.map +1 -1
  4. package/esm/features/database-drivers.mjs.map +1 -1
  5. package/esm/features/features-map.mjs.map +1 -1
  6. package/esm/helpers/app.mjs +44 -17
  7. package/esm/helpers/app.mjs.map +1 -1
  8. package/esm/helpers/exec.mjs.map +1 -1
  9. package/esm/helpers/package-manager.mjs.map +1 -1
  10. package/esm/helpers/warlock-versions.mjs.map +1 -1
  11. package/esm/index.mjs.map +1 -1
  12. package/package.json +2 -2
  13. package/templates/warlock/eslint.config.js +98 -98
  14. package/templates/warlock/postcss.config.mjs +6 -0
  15. package/templates/warlock/src/app/contact/controllers/contact.controller.ts +21 -0
  16. package/templates/warlock/src/app/contact/routes.ts +4 -0
  17. package/templates/warlock/src/app/{shared → home}/controllers/home-page.controller.ts +1 -7
  18. package/templates/warlock/src/app/home/services/home.service.ts +86 -0
  19. package/templates/warlock/src/app/locale/controllers/locale.controller.ts +16 -0
  20. package/templates/warlock/src/app/locale/routes.ts +4 -0
  21. package/templates/warlock/src/shared/contact.schema.ts +7 -0
  22. package/templates/warlock/src/shared/locale.schema.ts +11 -0
  23. package/templates/warlock/src/shared/locales.ts +7 -0
  24. package/templates/warlock/src/web/404.css +113 -0
  25. package/templates/warlock/src/web/404.page.tsx +23 -0
  26. package/templates/warlock/src/web/app.css +3 -0
  27. package/templates/warlock/src/web/home/components/contact-form-controls.tsx +42 -0
  28. package/templates/warlock/src/web/home/components/contact-section.tsx +108 -0
  29. package/templates/warlock/src/web/home/components/content-sections.tsx +61 -0
  30. package/templates/warlock/src/web/home/components/hero-section.tsx +68 -0
  31. package/templates/warlock/src/web/home/components/home-footer.tsx +35 -0
  32. package/templates/warlock/src/web/home/components/home-header.tsx +26 -0
  33. package/templates/warlock/src/web/home/components/logo.tsx +19 -0
  34. package/templates/warlock/src/web/home/components/runtime-preview.tsx +75 -0
  35. package/templates/warlock/src/web/home/hooks/use-contact-form.ts +57 -0
  36. package/templates/warlock/src/web/home/hooks/use-locale-switcher.ts +35 -0
  37. package/templates/warlock/src/web/home/index.page.tsx +44 -0
  38. package/templates/warlock/src/web/home/register.ts +30 -0
  39. package/templates/warlock/src/web/home/styles/home.css +1185 -0
  40. package/templates/warlock/src/web/root.tsx +49 -0
  41. package/templates/warlock/src/web/shared/utils/set-form-errors.ts +60 -0
  42. package/templates/warlock/tsconfig.json +3 -1
  43. package/templates/warlock/public/home.css +0 -523
  44. package/templates/warlock/src/app/shared/components/HomePageComponent.tsx +0 -229
  45. package/templates/warlock/src/app/shared/controllers/home-page.controller.tsx +0 -17
  46. /package/templates/warlock/src/app/{shared → home}/routes.ts +0 -0
@@ -1,229 +0,0 @@
1
- import { Application, publicUrl } from "@warlock.js/core";
2
-
3
- export function HomePageComponent() {
4
- return (
5
- <html>
6
- <head>
7
- <meta charSet="UTF-8" />
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <title>Warlock.js - Modern Backend TypeScript Framework</title>
10
- <meta
11
- name="description"
12
- content="A powerful, elegant TypeScript framework for building modern web applications with ease."
13
- />
14
- <link rel="stylesheet" href={publicUrl("home.css")} />
15
- <link rel="preconnect" href="https://fonts.googleapis.com" />
16
- <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
17
- <link
18
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap"
19
- rel="stylesheet"
20
- />
21
- </head>
22
- <body>
23
- <div className="warlock-home">
24
- <div className="warlock-container">
25
- {/* Header */}
26
- <header className="warlock-header">
27
- <a href="/" className="warlock-logo">
28
- <span className="warlock-logo-icon">⚡</span>
29
- <span>Warlock.js</span>
30
- </a>
31
- <nav className="warlock-nav">
32
- <a href="https://warlock.js.org" target="_blank" rel="noopener noreferrer">
33
- Docs
34
- </a>
35
- <a href="https://github.com/warlockjs" target="_blank" rel="noopener noreferrer">
36
- GitHub
37
- </a>
38
- <a href="https://discord.gg/x3W9SN2jvx" target="_blank" rel="noopener noreferrer">
39
- Discord
40
- </a>
41
- </nav>
42
- </header>
43
- {/* Hero Section */}
44
- <section className="warlock-hero">
45
- <h1>
46
- Build Modern Web Apps
47
- <br />
48
- with Confidence
49
- </h1>
50
- <p>
51
- A powerful, elegant TypeScript framework designed for developers who demand
52
- excellence. Ship faster, scale better, and enjoy the journey.
53
- </p>
54
- <div className="warlock-cta">
55
- <a href="https://warlock.js.org" className="warlock-btn warlock-btn-primary">
56
- <span>Get Started</span>
57
- <span>→</span>
58
- </a>
59
- <a
60
- href="https://github.com/warlockjs"
61
- className="warlock-btn warlock-btn-secondary"
62
- >
63
- <span>View on GitHub</span>
64
- </a>
65
- </div>
66
- </section>
67
-
68
- {/* Features Section */}
69
- <section className="warlock-features">
70
- <h2 className="warlock-section-title">Why Warlock.js?</h2>
71
- <p className="warlock-section-subtitle">
72
- Everything you need to build production-ready applications
73
- </p>
74
-
75
- <div className="warlock-features-grid">
76
- <div className="warlock-feature-card">
77
- <span className="warlock-feature-icon">🚀</span>
78
- <h3>Lightning Fast</h3>
79
- <p>
80
- Blazing fast development server with instant hot reload. Build and deploy
81
- optimized production bundles in seconds.
82
- </p>
83
- </div>
84
-
85
- <div className="warlock-feature-card">
86
- <span className="warlock-feature-icon">🎯</span>
87
- <h3>Type-Safe</h3>
88
- <p>
89
- Built with TypeScript from the ground up. Enjoy full type safety across your
90
- entire application with intelligent auto-completion.
91
- </p>
92
- </div>
93
-
94
- <div className="warlock-feature-card">
95
- <span className="warlock-feature-icon">🏗️</span>
96
- <h3>Battle-Tested Architecture</h3>
97
- <p>
98
- Proven patterns and best practices baked in. From routing to database
99
- management, we've got you covered.
100
- </p>
101
- </div>
102
-
103
- <div className="warlock-feature-card">
104
- <span className="warlock-feature-icon">🔌</span>
105
- <h3>Powerful CLI</h3>
106
- <p>
107
- Scaffold components, run migrations, manage seeds, and more with an intuitive
108
- command-line interface that boosts productivity.
109
- </p>
110
- </div>
111
-
112
- <div className="warlock-feature-card">
113
- <span className="warlock-feature-icon">🎨</span>
114
- <h3>Flexible & Extensible</h3>
115
- <p>
116
- Plugin architecture allows you to extend core functionality. Build your own
117
- tools or use community packages.
118
- </p>
119
- </div>
120
-
121
- <div className="warlock-feature-card">
122
- <span className="warlock-feature-icon">🌍</span>
123
- <h3>Multi-Tenant Ready</h3>
124
- <p>
125
- Built-in support for multi-tenancy. Scale from single to multi-tenant
126
- applications without architectural changes.
127
- </p>
128
- </div>
129
- </div>
130
- </section>
131
-
132
- {/* Quick Start Section */}
133
- <section className="warlock-quickstart">
134
- <h2 className="warlock-section-title">Extend with Features</h2>
135
- <p className="warlock-section-subtitle">
136
- Add powerful features to your project instantly
137
- </p>
138
-
139
- <div className="warlock-code-block">
140
- <div className="warlock-code-header">
141
- <span className="warlock-code-dot"></span>
142
- <span className="warlock-code-dot"></span>
143
- <span className="warlock-code-dot"></span>
144
- </div>
145
- <div className="warlock-code-content">
146
- <code className="warlock-code-line">
147
- <span className="warlock-code-comment">
148
- # Add React for rendering & email templates
149
- </span>
150
- </code>
151
- <code className="warlock-code-line">
152
- <span className="warlock-code-command">npx</span> warlock add{" "}
153
- <span className="warlock-code-flag">react</span>
154
- </code>
155
- <code className="warlock-code-line">&nbsp;</code>
156
- <code className="warlock-code-line">
157
- <span className="warlock-code-comment">
158
- # Add MongoDB, Redis & testing support
159
- </span>
160
- </code>
161
- <code className="warlock-code-line">
162
- <span className="warlock-code-command">npx</span> warlock add{" "}
163
- <span className="warlock-code-flag">mongodb redis test</span>
164
- </code>
165
- <code className="warlock-code-line">&nbsp;</code>
166
- <code className="warlock-code-line">
167
- <span className="warlock-code-comment"># List all available features</span>
168
- </code>
169
- <code className="warlock-code-line">
170
- <span className="warlock-code-command">npx</span> warlock add{" "}
171
- <span className="warlock-code-flag">--list</span>
172
- </code>
173
- <code className="warlock-code-line">&nbsp;</code>
174
- <code className="warlock-code-line">
175
- <span className="warlock-code-comment">
176
- # ✨ Features: react, mongodb, postgres, mysql, redis, s3, mail, image, test,
177
- swagger, scheduler & more
178
- </span>
179
- </code>
180
- </div>
181
- </div>
182
- </section>
183
-
184
- {/* Footer */}
185
- <footer className="warlock-footer">
186
- <div className="warlock-social-links">
187
- <a
188
- href="https://discord.gg/x3W9SN2jvx"
189
- className="warlock-social-link"
190
- target="_blank"
191
- rel="noopener noreferrer"
192
- >
193
- <span className="warlock-social-icon">💬</span>
194
- <span>Join Discord</span>
195
- </a>
196
- <a
197
- href="https://github.com/warlockjs"
198
- className="warlock-social-link"
199
- target="_blank"
200
- rel="noopener noreferrer"
201
- >
202
- <span className="warlock-social-icon">⭐</span>
203
- <span>Star on GitHub</span>
204
- </a>
205
- <a
206
- href="https://warlock.js.org"
207
- className="warlock-social-link"
208
- target="_blank"
209
- rel="noopener noreferrer"
210
- >
211
- <span className="warlock-social-icon">📚</span>
212
- <span>Read Docs</span>
213
- </a>
214
- </div>
215
- <p className="warlock-footer-text">
216
- Built with ⚡ by the{" "}
217
- <a href="https://github.com/warlockjs" target="_blank" rel="noopener noreferrer">
218
- Warlock.js Team
219
- </a>
220
- {" · "}
221
- <span>v{Application.version}</span>
222
- </p>
223
- </footer>
224
- </div>
225
- </div>
226
- </body>
227
- </html>
228
- );
229
- }
@@ -1,17 +0,0 @@
1
- import { type RequestHandler } from "@warlock.js/core";
2
- import { HomePageComponent } from "../components/HomePageComponent";
3
-
4
- /**
5
- * React-rendered welcome page — kept only when the `react` feature is selected.
6
- *
7
- * This file and its plain-JSON sibling (`home-page.controller.ts`) are a
8
- * mutually exclusive PAIR: both export `homePageController`, and the scaffolder
9
- * (`configureHomePage`) deletes exactly one at generation time, so a real
10
- * project never contains both. They coexist here in the template on purpose —
11
- * this is not resolver-order ambiguity, and neither file is dead code.
12
- */
13
- export const homePageController: RequestHandler = async ({ response }) => {
14
- return response.render(<HomePageComponent />);
15
- };
16
-
17
- homePageController.description = "Welcome Home Page";