create-warlock 4.1.2 → 4.1.3
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/bin/create-app.js +5 -0
- package/package.json +5 -8
- package/cjs/index.cjs +0 -780
- package/cjs/index.cjs.map +0 -1
- package/cjs/paths-Bl9Wn7qV.cjs +0 -247
- package/cjs/paths-Bl9Wn7qV.cjs.map +0 -1
- package/cjs/project-builder-helpers-DGcgf60P.cjs +0 -27
- package/cjs/project-builder-helpers-DGcgf60P.cjs.map +0 -1
package/package.json
CHANGED
|
@@ -9,17 +9,18 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@clack/prompts": "^0.7.0",
|
|
11
11
|
"@mongez/copper": "^2.1.2",
|
|
12
|
-
"@warlock.js/fs": "4.1.
|
|
12
|
+
"@warlock.js/fs": "4.1.3",
|
|
13
13
|
"@mongez/reinforcements": "^3.2.0",
|
|
14
14
|
"cross-spawn": "^7.0.3",
|
|
15
15
|
"rimraf": "^6.0.1",
|
|
16
16
|
"which-pm-runs": "^1.1.0"
|
|
17
17
|
},
|
|
18
18
|
"bin": {
|
|
19
|
-
"create-warlock": "create-app.js"
|
|
19
|
+
"create-warlock": "bin/create-app.js"
|
|
20
20
|
},
|
|
21
|
-
"version": "4.1.
|
|
22
|
-
"
|
|
21
|
+
"version": "4.1.3",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./esm/index.mjs",
|
|
23
24
|
"module": "./esm/index.mjs",
|
|
24
25
|
"types": "./esm/index.d.mts",
|
|
25
26
|
"exports": {
|
|
@@ -27,10 +28,6 @@
|
|
|
27
28
|
"import": {
|
|
28
29
|
"types": "./esm/index.d.mts",
|
|
29
30
|
"default": "./esm/index.mjs"
|
|
30
|
-
},
|
|
31
|
-
"require": {
|
|
32
|
-
"types": "./esm/index.d.mts",
|
|
33
|
-
"default": "./cjs/index.cjs"
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
}
|
package/cjs/index.cjs
DELETED
|
@@ -1,780 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_paths = require('./paths-Bl9Wn7qV.cjs');
|
|
3
|
-
let _clack_prompts = require("@clack/prompts");
|
|
4
|
-
let _mongez_copper = require("@mongez/copper");
|
|
5
|
-
let _warlock_js_fs = require("@warlock.js/fs");
|
|
6
|
-
let path = require("path");
|
|
7
|
-
path = require_paths.__toESM(path, 1);
|
|
8
|
-
|
|
9
|
-
//#region ../../@warlock.js/create-warlock/src/features/database-drivers.ts
|
|
10
|
-
const databaseDrivers = [
|
|
11
|
-
{
|
|
12
|
-
value: "mongodb",
|
|
13
|
-
label: "MongoDB",
|
|
14
|
-
package: "mongodb",
|
|
15
|
-
packageVersion: "^7.0.0",
|
|
16
|
-
defaultPort: 27017
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
value: "postgres",
|
|
20
|
-
label: "PostgreSQL",
|
|
21
|
-
package: "pg",
|
|
22
|
-
packageVersion: "^8.11.0",
|
|
23
|
-
defaultPort: 5432
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
value: "mysql",
|
|
27
|
-
label: "MySQL (Coming Soon)",
|
|
28
|
-
package: "mysql2",
|
|
29
|
-
packageVersion: "^3.5.0",
|
|
30
|
-
defaultPort: 3306,
|
|
31
|
-
disabled: true,
|
|
32
|
-
hint: "MySQL support coming in a future release"
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
/**
|
|
36
|
-
* Get database driver options for the select prompt
|
|
37
|
-
*/
|
|
38
|
-
function getDatabaseDriverOptions() {
|
|
39
|
-
return databaseDrivers.map((driver) => ({
|
|
40
|
-
value: driver.value,
|
|
41
|
-
label: driver.label,
|
|
42
|
-
hint: driver.hint,
|
|
43
|
-
disabled: driver.disabled
|
|
44
|
-
}));
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get database driver config by value
|
|
48
|
-
*/
|
|
49
|
-
function getDatabaseDriver(value) {
|
|
50
|
-
return databaseDrivers.find((driver) => driver.value === value);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region ../../@warlock.js/create-warlock/src/features/features-map.ts
|
|
55
|
-
/**
|
|
56
|
-
* Optional features offered in the general multiselect step. The database
|
|
57
|
-
* driver (its own select) and AI providers (their own step) are intentionally
|
|
58
|
-
* NOT here — they have dedicated prompts.
|
|
59
|
-
*/
|
|
60
|
-
const features = [
|
|
61
|
-
{
|
|
62
|
-
key: "react",
|
|
63
|
-
label: "React (rendering & mails)",
|
|
64
|
-
hint: "React + ReactDOM for non-interactive rendering and HTML/email generation",
|
|
65
|
-
group: "Rendering & Mail",
|
|
66
|
-
defaultSelected: true
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
key: "react-email",
|
|
70
|
-
label: "React Email",
|
|
71
|
-
hint: "Build email templates with React + Tailwind (pulls react + mail)",
|
|
72
|
-
group: "Rendering & Mail"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
key: "mail",
|
|
76
|
-
label: "Mail (Nodemailer)",
|
|
77
|
-
hint: "Send emails via SMTP",
|
|
78
|
-
group: "Rendering & Mail"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
key: "ses",
|
|
82
|
-
label: "Amazon SES",
|
|
83
|
-
hint: "Send emails via the AWS SES API",
|
|
84
|
-
group: "Rendering & Mail"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
key: "image",
|
|
88
|
-
label: "Image processing (Sharp)",
|
|
89
|
-
hint: "Resize, convert, and optimize images",
|
|
90
|
-
group: "Media"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
key: "s3",
|
|
94
|
-
label: "S3 storage",
|
|
95
|
-
hint: "AWS S3 for cloud file storage",
|
|
96
|
-
group: "Storage & Cache"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
key: "redis",
|
|
100
|
-
label: "Redis cache",
|
|
101
|
-
hint: "Redis driver for the cache layer",
|
|
102
|
-
group: "Storage & Cache"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
key: "scheduler",
|
|
106
|
-
label: "Scheduler",
|
|
107
|
-
hint: "Background tasks and cron jobs",
|
|
108
|
-
group: "Jobs & Messaging"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
key: "herald",
|
|
112
|
-
label: "Herald (RabbitMQ)",
|
|
113
|
-
hint: "Message broker for event-driven architecture",
|
|
114
|
-
group: "Jobs & Messaging"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
key: "socket",
|
|
118
|
-
label: "Socket.IO",
|
|
119
|
-
hint: "Realtime websocket server",
|
|
120
|
-
group: "Realtime"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
key: "swagger",
|
|
124
|
-
label: "Swagger",
|
|
125
|
-
hint: "OpenAPI documentation for your routes",
|
|
126
|
-
group: "API Docs"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
key: "postman",
|
|
130
|
-
label: "Postman",
|
|
131
|
-
hint: "Generate a Postman collection for your API",
|
|
132
|
-
group: "API Docs"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
key: "test",
|
|
136
|
-
label: "Testing (Vitest)",
|
|
137
|
-
hint: "Vitest + coverage + per-worker DB/cache test setup",
|
|
138
|
-
group: "Tooling"
|
|
139
|
-
}
|
|
140
|
-
];
|
|
141
|
-
/**
|
|
142
|
-
* AI providers offered in the dedicated AI step. Selecting any of these pulls
|
|
143
|
-
* the core `@warlock.js/ai` package automatically via the provider's `requires`
|
|
144
|
-
* in core's feature map — the scaffolder never lists `ai` as a standalone pick.
|
|
145
|
-
*/
|
|
146
|
-
const aiProviders = [
|
|
147
|
-
{
|
|
148
|
-
key: "openai",
|
|
149
|
-
label: "OpenAI",
|
|
150
|
-
hint: "GPT models via the OpenAI API"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
key: "google",
|
|
154
|
-
label: "Google (Gemini)",
|
|
155
|
-
hint: "Gemini models via Google AI"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
key: "anthropic",
|
|
159
|
-
label: "Anthropic (Claude)",
|
|
160
|
-
hint: "Claude models via the Anthropic API"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
key: "bedrock",
|
|
164
|
-
label: "AWS Bedrock",
|
|
165
|
-
hint: "Foundation models via Amazon Bedrock"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
key: "ollama",
|
|
169
|
-
label: "Ollama",
|
|
170
|
-
hint: "Local models via Ollama"
|
|
171
|
-
}
|
|
172
|
-
];
|
|
173
|
-
/**
|
|
174
|
-
* Feature options for the multiselect prompt, ordered by group with the group
|
|
175
|
-
* surfaced in the hint (keeps a flat list scannable without group widgets).
|
|
176
|
-
*/
|
|
177
|
-
function getFeatureOptions() {
|
|
178
|
-
return features.map((feature) => ({
|
|
179
|
-
value: feature.key,
|
|
180
|
-
label: feature.label,
|
|
181
|
-
hint: `${feature.group} — ${feature.hint}`
|
|
182
|
-
}));
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Keys pre-checked in the feature multiselect.
|
|
186
|
-
*/
|
|
187
|
-
function getDefaultFeatureKeys() {
|
|
188
|
-
return features.filter((feature) => feature.defaultSelected).map((feature) => feature.key);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* AI provider options for the dedicated AI multiselect step.
|
|
192
|
-
*/
|
|
193
|
-
function getAiProviderOptions() {
|
|
194
|
-
return aiProviders.map((provider) => ({
|
|
195
|
-
value: provider.key,
|
|
196
|
-
label: provider.label,
|
|
197
|
-
hint: provider.hint
|
|
198
|
-
}));
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Every selectable key the scaffolder knows about (features + AI providers).
|
|
202
|
-
* Used to validate `--features` / `--ai` flags in non-interactive mode.
|
|
203
|
-
*/
|
|
204
|
-
function getAllFeatureKeys() {
|
|
205
|
-
return [...features.map((feature) => feature.key), ...aiProviders.map((provider) => provider.key)];
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region ../../@warlock.js/create-warlock/src/helpers/app.ts
|
|
210
|
-
var App = class {
|
|
211
|
-
constructor(app) {
|
|
212
|
-
this.app = app;
|
|
213
|
-
this.files = {};
|
|
214
|
-
this.jsonFiles = {};
|
|
215
|
-
this.isInstalled = false;
|
|
216
|
-
}
|
|
217
|
-
get options() {
|
|
218
|
-
return this.app.options;
|
|
219
|
-
}
|
|
220
|
-
use(templateName) {
|
|
221
|
-
(0, _warlock_js_fs.copyDirectory)(require_paths.template(templateName), this.path);
|
|
222
|
-
if ((0, _warlock_js_fs.fileExists)(this.path + "/.env.example")) (0, _warlock_js_fs.copyFile)(this.path + "/.env.example", this.path + "/.env");
|
|
223
|
-
(0, _warlock_js_fs.renameFile)(this.path + "/_.gitignore", this.path + "/.gitignore");
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
init() {
|
|
227
|
-
return this;
|
|
228
|
-
}
|
|
229
|
-
terminate() {}
|
|
230
|
-
install() {
|
|
231
|
-
return require_paths.runCommand(require_paths.getPackageManager(), ["install"], this.path);
|
|
232
|
-
}
|
|
233
|
-
async exec(command) {
|
|
234
|
-
const [commandName, ...optionsList] = command.split(" ");
|
|
235
|
-
return await require_paths.executeCommand(commandName, optionsList, this.path);
|
|
236
|
-
}
|
|
237
|
-
async git() {
|
|
238
|
-
const { initializeGitRepository } = await Promise.resolve().then(() => require("./project-builder-helpers-DGcgf60P.cjs"));
|
|
239
|
-
return await initializeGitRepository(this.path);
|
|
240
|
-
}
|
|
241
|
-
updatePackageJson() {
|
|
242
|
-
this.package.replace("name", this.name.replaceAll("/", "-")).replaceAll("yarn", require_paths.getPackageManager()).save();
|
|
243
|
-
return this;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Wire DB_DRIVER and DB_PORT into .env.
|
|
247
|
-
*
|
|
248
|
-
* The driver's npm package is installed via `warlock add` (single source for
|
|
249
|
-
* versions), so this only touches environment configuration — not deps.
|
|
250
|
-
*/
|
|
251
|
-
configureDatabaseEnv(driverValue) {
|
|
252
|
-
const driver = getDatabaseDriver(driverValue);
|
|
253
|
-
if (!driver) return this;
|
|
254
|
-
let envContent = (0, _warlock_js_fs.getFile)(this.path + "/.env");
|
|
255
|
-
envContent = envContent.replace(/DB_PORT=\d+/, `DB_PORT=${driver.defaultPort}`);
|
|
256
|
-
if (envContent.includes("DB_DRIVER=")) envContent = envContent.replace(/DB_DRIVER=\w*/, `DB_DRIVER=${driver.value}`);
|
|
257
|
-
else envContent = envContent.replace(/DB_PORT=\d+/, `DB_PORT=${driver.defaultPort}\nDB_DRIVER=${driver.value}`);
|
|
258
|
-
(0, _warlock_js_fs.putFile)(this.path + "/.env", envContent);
|
|
259
|
-
return this;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Install the selected optional features by delegating to the project's own
|
|
263
|
-
* `warlock add`. `--no-install` records every dependency in package.json and
|
|
264
|
-
* ejects configs / scripts / setup hooks WITHOUT installing — the caller runs
|
|
265
|
-
* one batched install afterwards. Versions come from core's feature map, so
|
|
266
|
-
* the scaffolder never duplicates them.
|
|
267
|
-
*
|
|
268
|
-
* `--no-install` is passed LAST on purpose: the CLI parser treats the
|
|
269
|
-
* positional after a bare flag as that flag's value, so it must follow the
|
|
270
|
-
* feature list, not precede it.
|
|
271
|
-
*/
|
|
272
|
-
async installFeatures(features) {
|
|
273
|
-
if (features.length === 0) return true;
|
|
274
|
-
return this.exec(`npx warlock add ${features.join(" ")} --no-install`);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Get package json file
|
|
278
|
-
*/
|
|
279
|
-
get package() {
|
|
280
|
-
return this.json("package.json");
|
|
281
|
-
}
|
|
282
|
-
updateDotEnv() {
|
|
283
|
-
this.file(".env").replaceAll("appName", this.name).save();
|
|
284
|
-
return this;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Get env file to update
|
|
288
|
-
*/
|
|
289
|
-
get env() {
|
|
290
|
-
return this.file(".env");
|
|
291
|
-
}
|
|
292
|
-
get name() {
|
|
293
|
-
return this.app.appName;
|
|
294
|
-
}
|
|
295
|
-
get path() {
|
|
296
|
-
return this.app.appPath;
|
|
297
|
-
}
|
|
298
|
-
file(relativePath) {
|
|
299
|
-
const fullPath = path.default.resolve(this.path, relativePath);
|
|
300
|
-
if (!this.files[fullPath]) this.files[fullPath] = file(fullPath);
|
|
301
|
-
return this.files[fullPath];
|
|
302
|
-
}
|
|
303
|
-
json(relativePath) {
|
|
304
|
-
const fullPath = path.default.resolve(this.path, relativePath);
|
|
305
|
-
if (!this.jsonFiles[fullPath]) this.jsonFiles[fullPath] = jsonFile(fullPath);
|
|
306
|
-
return this.jsonFiles[fullPath];
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
var FileManager = class {
|
|
310
|
-
constructor(filePath) {
|
|
311
|
-
this.filePath = filePath;
|
|
312
|
-
this.parseContent();
|
|
313
|
-
}
|
|
314
|
-
parseContent() {
|
|
315
|
-
this.content = (0, _warlock_js_fs.getFile)(this.filePath);
|
|
316
|
-
}
|
|
317
|
-
replace(search, replace) {
|
|
318
|
-
this.content = this.content.replace(search, replace);
|
|
319
|
-
return this;
|
|
320
|
-
}
|
|
321
|
-
replaceAll(search, replace) {
|
|
322
|
-
this.content = this.content.replaceAll(search, replace);
|
|
323
|
-
return this;
|
|
324
|
-
}
|
|
325
|
-
save() {
|
|
326
|
-
(0, _warlock_js_fs.putFile)(this.filePath, this.content);
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
var JsonFileManager = class extends FileManager {
|
|
330
|
-
parseContent() {
|
|
331
|
-
this.content = (0, _warlock_js_fs.getJsonFile)(this.filePath);
|
|
332
|
-
}
|
|
333
|
-
save() {
|
|
334
|
-
(0, _warlock_js_fs.putJsonFile)(this.filePath, this.content);
|
|
335
|
-
}
|
|
336
|
-
has(key) {
|
|
337
|
-
return this.content[key] !== void 0;
|
|
338
|
-
}
|
|
339
|
-
replace(key, value) {
|
|
340
|
-
this.content[key] = value;
|
|
341
|
-
return this;
|
|
342
|
-
}
|
|
343
|
-
replaceAll(key, value) {
|
|
344
|
-
const contentAsString = JSON.stringify(this.content);
|
|
345
|
-
this.content = JSON.parse(contentAsString.replaceAll(key, value));
|
|
346
|
-
return this;
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
|
-
function file(path$2) {
|
|
350
|
-
return new FileManager(path$2);
|
|
351
|
-
}
|
|
352
|
-
function jsonFile(path$3) {
|
|
353
|
-
return new JsonFileManager(path$3);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
//#endregion
|
|
357
|
-
//#region ../../@warlock.js/create-warlock/src/ui/banner.ts
|
|
358
|
-
const warlockTextAnsi = `
|
|
359
|
-
\x1b[49m
|
|
360
|
-
\x1b[49m \x1b[38;2;252;238;36m██╗ ██╗ █████╗ ██████╗ ██╗ ██████╗ ██████╗██╗ ██╗ \x1b[38;2;252;238;36m ██╗ ███████╗\x1b[m
|
|
361
|
-
\x1b[49m \x1b[38;2;250;235;34m██║ ██║██╔══██╗██╔══██╗██║ ██╔═══██╗██╔════╝██║ ██╔╝ \x1b[38;2;250;235;34m ██║ ██╔════╝\x1b[m
|
|
362
|
-
\x1b[49m \x1b[38;2;248;233;32m██║ █╗ ██║███████║██████╔╝██║ ██║ ██║██║ █████╔╝ \x1b[38;2;248;233;32m ██║ ███████╗\x1b[m
|
|
363
|
-
\x1b[49m \x1b[38;2;246;231;30m██║███╗██║██╔══██║██╔══██╗██║ ██║ ██║██║ ██╔═██╗ \x1b[38;2;246;231;30m██ ██║ ╚════██║\x1b[m
|
|
364
|
-
\x1b[49m \x1b[38;2;244;229;28m╚███╔███╔╝██║ ██║██║ ██║███████╗╚██████╔╝╚██████╗██║ ██╗ \x1b[38;2;244;229;28m╚█████╔╝ ███████║\x1b[m
|
|
365
|
-
\x1b[49m \x1b[38;2;242;227;26m ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ \x1b[38;2;242;227;26m ╚════╝ ╚══════╝\x1b[m
|
|
366
|
-
\x1b[49m
|
|
367
|
-
`;
|
|
368
|
-
const warlockLogoAnsi = `\x1b[49m \x1b[38;2;247;232;77;49m▄\x1b[38;2;235;228;105;49m▄\x1b[49m \x1b[m
|
|
369
|
-
\x1b[49m \x1b[38;2;247;241;62;49m▄\x1b[38;2;251;243;29;48;2;245;240;69m▄\x1b[38;2;224;224;112;48;2;246;238;52m▄\x1b[49m \x1b[38;2;246;240;65;49m▄\x1b[38;2;252;238;32;48;2;250;237;68m▄\x1b[38;2;246;236;76;48;2;246;237;52m▄\x1b[49m \x1b[m
|
|
370
|
-
\x1b[49m \x1b[38;2;245;234;80;49m▄\x1b[38;2;246;238;58;49m▄\x1b[49m \x1b[49;38;2;240;232;72m▀\x1b[49;38;2;237;237;100m▀\x1b[49m \x1b[38;2;236;236;132;49m▄\x1b[38;2;253;244;30;48;2;255;235;78m▄\x1b[38;2;254;233;21;48;2;247;240;49m▄\x1b[38;2;249;206;52;48;2;253;234;25m▄\x1b[49;38;2;246;212;65m▀\x1b[49m \x1b[m
|
|
371
|
-
\x1b[49m \x1b[38;2;246;233;50;49m▄\x1b[38;2;250;235;26;48;2;237;228;118m▄\x1b[38;2;251;232;21;48;2;249;237;38m▄\x1b[38;2;249;231;20;48;2;251;234;21m▄\x1b[38;2;248;230;21;48;2;252;232;20m▄\x1b[38;2;248;230;21;48;2;248;233;25m▄\x1b[38;2;248;231;22;48;2;245;236;68m▄\x1b[38;2;247;233;32;49m▄\x1b[38;2;242;226;87;49m▄\x1b[49m \x1b[38;2;227;227;99;49m▄\x1b[38;2;250;235;43;49m▄\x1b[38;2;253;235;28;48;2;244;233;69m▄\x1b[38;2;254;226;25;48;2;252;237;25m▄\x1b[38;2;253;199;25;48;2;253;229;24m▄\x1b[38;2;247;205;73;48;2;253;201;27m▄\x1b[49;38;2;235;206;88m▀\x1b[49m \x1b[m
|
|
372
|
-
\x1b[49m \x1b[38;2;239;226;86;49m▄\x1b[38;2;250;235;34;49m▄\x1b[38;2;252;234;19;48;2;243;231;71m▄\x1b[38;2;251;233;19;48;2;251;234;28m▄\x1b[38;2;250;233;19;48;2;251;233;20m▄\x1b[38;2;251;233;20;48;2;250;232;20m▄\x1b[38;2;253;235;25;48;2;251;231;20m▄\x1b[38;2;245;232;53;48;2;251;232;20m▄\x1b[38;2;245;228;57;48;2;250;232;22m▄\x1b[38;2;247;229;39;48;2;248;231;22m▄\x1b[38;2;247;232;22;48;2;248;229;21m▄\x1b[38;2;247;231;21;48;2;248;229;20m▄\x1b[38;2;247;230;20;48;2;247;230;22m▄\x1b[38;2;248;230;20;48;2;246;234;38m▄\x1b[38;2;250;232;28;48;2;239;230;123m▄\x1b[38;2;250;231;49;49m▄\x1b[38;2;235;216;78;49m▄\x1b[49m \x1b[38;2;246;235;53;49m▄\x1b[38;2;251;236;23;48;2;244;232;75m▄\x1b[38;2;252;233;21;48;2;252;236;27m▄\x1b[38;2;253;227;26;48;2;253;233;23m▄\x1b[38;2;253;201;29;48;2;253;228;30m▄\x1b[38;2;253;199;27;48;2;253;201;26m▄\x1b[38;2;232;197;104;48;2;249;201;47m▄\x1b[49m \x1b[m
|
|
373
|
-
\x1b[49m \x1b[38;2;247;232;50;49m▄\x1b[38;2;250;233;28;48;2;245;226;98m▄\x1b[38;2;252;232;20;48;2;249;234;40m▄\x1b[38;2;251;231;20;48;2;253;236;23m▄\x1b[38;2;251;232;20;48;2;252;233;19m▄\x1b[38;2;252;234;22;48;2;250;233;19m▄\x1b[38;2;250;235;38;48;2;251;233;20m▄\x1b[38;2;241;231;68;48;2;252;235;24m▄\x1b[49;38;2;249;234;47m▀\x1b[49;38;2;242;229;78m▀\x1b[49m \x1b[49;38;2;247;229;54m▀\x1b[38;2;241;227;99;48;2;247;231;33m▄\x1b[38;2;248;233;50;48;2;247;232;22m▄\x1b[38;2;250;229;28;48;2;249;230;22m▄\x1b[38;2;254;226;26;48;2;253;224;23m▄\x1b[38;2;235;221;94;48;2;249;221;35m▄\x1b[49m \x1b[38;2;243;237;61;49m▄\x1b[38;2;251;237;28;48;2;243;236;87m▄\x1b[38;2;251;234;20;48;2;250;236;36m▄\x1b[38;2;252;232;21;48;2;252;234;21m▄\x1b[38;2;251;225;23;48;2;251;232;21m▄\x1b[38;2;250;198;26;48;2;251;225;24m▄\x1b[38;2;253;197;26;48;2;251;199;27m▄\x1b[38;2;252;200;38;48;2;255;199;28m▄\x1b[49;38;2;245;202;65m▀\x1b[49m \x1b[m
|
|
374
|
-
\x1b[49m \x1b[38;2;244;235;52;48;2;219;219;128m▄\x1b[38;2;247;234;53;49m▄\x1b[38;2;235;216;118;49m▄\x1b[49m \x1b[38;2;246;236;50;49m▄\x1b[38;2;253;238;21;48;2;249;234;58m▄\x1b[38;2;251;234;20;48;2;250;236;33m▄\x1b[38;2;251;233;19;48;2;252;234;21m▄\x1b[38;2;252;233;21;48;2;251;232;19m▄\x1b[38;2;252;233;26;48;2;251;231;20m▄\x1b[38;2;249;233;43;48;2;253;233;21m▄\x1b[49;38;2;252;236;30m▀\x1b[49;38;2;246;236;57m▀\x1b[49m \x1b[38;2;242;235;87;49m▄\x1b[49m \x1b[49;38;2;246;229;106m▀\x1b[49;38;2;247;227;62m▀\x1b[49m \x1b[49;38;2;248;237;47m▀\x1b[38;2;245;232;62;48;2;247;234;35m▄\x1b[38;2;253;231;26;48;2;252;234;23m▄\x1b[38;2;253;204;27;48;2;253;226;23m▄\x1b[38;2;252;199;34;48;2;252;200;26m▄\x1b[38;2;247;203;52;48;2;253;197;26m▄\x1b[49;38;2;251;199;35m▀\x1b[49;38;2;241;207;96m▀\x1b[49m \x1b[38;2;246;238;65;49m▄\x1b[38;2;250;226;39;49m▄\x1b[38;2;238;221;59;49m▄\x1b[49m \x1b[m
|
|
375
|
-
\x1b[49m \x1b[38;2;242;235;52;48;2;248;235;48m▄\x1b[38;2;251;234;24;48;2;251;234;23m▄\x1b[38;2;251;232;21;48;2;250;237;38m▄\x1b[38;2;248;233;20;48;2;244;236;69m▄\x1b[38;2;246;236;44;49m▄\x1b[38;2;243;238;64;49m▄\x1b[49m \x1b[49;38;2;235;228;87m▀\x1b[49;38;2;247;231;40m▀\x1b[38;2;242;230;96;48;2;248;234;24m▄\x1b[38;2;239;226;78;48;2;252;235;23m▄\x1b[49;38;2;250;234;35m▀\x1b[49;38;2;239;233;98m▀\x1b[49m \x1b[38;2;252;242;36;48;2;246;243;65m▄\x1b[38;2;252;240;31;48;2;251;245;46m▄\x1b[38;2;248;241;106;49m▄\x1b[49m \x1b[38;2;241;241;85;49m▄\x1b[38;2;250;238;34;48;2;244;234;69m▄\x1b[38;2;246;216;49;48;2;253;234;31m▄\x1b[38;2;228;215;121;48;2;252;210;33m▄\x1b[49;38;2;248;205;53m▀\x1b[49m \x1b[38;2;238;238;85;49m▄\x1b[38;2;243;233;63;49m▄\x1b[38;2;251;237;23;48;2;246;237;79m▄\x1b[38;2;253;234;22;48;2;247;234;52m▄\x1b[38;2;253;214;24;48;2;254;233;26m▄\x1b[38;2;249;210;44;48;2;252;212;31m▄\x1b[49m \x1b[m
|
|
376
|
-
\x1b[49m \x1b[49;38;2;228;228;67m▀\x1b[38;2;250;235;32;48;2;252;237;25m▄\x1b[38;2;252;223;25;48;2;250;227;23m▄\x1b[38;2;250;213;27;48;2;248;230;19m▄\x1b[38;2;247;224;25;48;2;247;230;19m▄\x1b[38;2;247;229;19;48;2;246;233;20m▄\x1b[38;2;248;231;22;48;2;243;234;51m▄\x1b[38;2;247;233;22;48;2;236;227;76m▄\x1b[38;2;243;233;67;49m▄\x1b[49m \x1b[38;2;250;238;38;48;2;240;235;82m▄\x1b[38;2;251;235;20;48;2;253;240;20m▄\x1b[38;2;252;232;22;48;2;253;235;23m▄\x1b[38;2;252;237;34;48;2;250;242;52m▄\x1b[49m \x1b[49;38;2;242;234;57m▀\x1b[49;38;2;233;233;78m▀\x1b[49m \x1b[38;2;244;233;98;49m▄\x1b[38;2;251;236;35;49m▄\x1b[38;2;252;236;22;48;2;243;232;72m▄\x1b[38;2;252;235;25;48;2;252;239;28m▄\x1b[38;2;251;233;21;48;2;250;234;20m▄\x1b[38;2;252;220;25;48;2;251;234;21m▄\x1b[38;2;251;203;25;48;2;253;229;23m▄\x1b[38;2;253;205;26;48;2;253;206;25m▄\x1b[38;2;248;209;53;48;2;250;211;51m▄\x1b[49m \x1b[m
|
|
377
|
-
\x1b[49m \x1b[49;38;2;242;230;81m▀\x1b[49;38;2;249;218;33m▀\x1b[38;2;242;212;73;48;2;250;214;26m▄\x1b[38;2;248;210;32;48;2;251;212;26m▄\x1b[38;2;248;213;26;48;2;249;210;26m▄\x1b[38;2;251;214;26;48;2;248;228;27m▄\x1b[38;2;250;214;27;48;2;250;231;20m▄\x1b[38;2;248;226;24;48;2;248;232;19m▄\x1b[38;2;247;231;19;48;2;245;234;26m▄\x1b[38;2;247;232;20;48;2;240;230;78m▄\x1b[38;2;245;236;35;49m▄\x1b[38;2;241;234;86;49m▄\x1b[49m \x1b[38;2;250;237;45;49m▄\x1b[38;2;251;234;20;48;2;251;237;25m▄\x1b[38;2;248;231;21;48;2;249;233;22m▄\x1b[38;2;247;230;20;48;2;248;231;21m▄\x1b[38;2;249;230;21;48;2;252;233;22m▄\x1b[38;2;252;238;35;48;2;249;239;60m▄\x1b[49m \x1b[38;2;223;207;143;49m▄\x1b[38;2;248;232;43;49m▄\x1b[38;2;250;233;21;48;2;237;219;109m▄\x1b[38;2;251;232;20;48;2;249;232;44m▄\x1b[38;2;252;232;21;48;2;251;233;22m▄\x1b[38;2;252;230;21;48;2;252;233;20m▄\x1b[38;2;253;215;26;48;2;253;233;20m▄\x1b[38;2;253;200;29;48;2;253;228;27m▄\x1b[38;2;254;203;28;48;2;252;203;26m▄\x1b[38;2;249;207;48;48;2;252;203;26m▄\x1b[38;2;242;215;74;48;2;253;204;27m▄\x1b[49;38;2;249;209;50m▀\x1b[49;38;2;241;213;99m▀\x1b[49m \x1b[m
|
|
378
|
-
\x1b[49m \x1b[49;38;2;243;213;61m▀\x1b[38;2;231;219;85;48;2;248;216;32m▄\x1b[38;2;245;214;58;48;2;250;215;26m▄\x1b[38;2;248;214;32;48;2;252;212;27m▄\x1b[38;2;250;215;26;48;2;249;217;27m▄\x1b[38;2;250;215;27;48;2;247;227;23m▄\x1b[38;2;247;220;28;48;2;246;231;20m▄\x1b[38;2;246;230;21;48;2;246;234;23m▄\x1b[38;2;251;235;24;48;2;247;237;45m▄\x1b[38;2;242;237;101;49m▄\x1b[49m \x1b[38;2;248;239;63;49m▄\x1b[38;2;252;235;20;48;2;252;237;26m▄\x1b[48;2;249;232;20m \x1b[38;2;250;231;22;48;2;247;230;20m▄\x1b[38;2;248;232;34;48;2;247;230;21m▄\x1b[38;2;248;232;22;48;2;248;231;21m▄\x1b[38;2;249;233;21;48;2;253;235;25m▄\x1b[38;2;251;240;38;48;2;246;241;79m▄\x1b[49m \x1b[38;2;252;237;26;48;2;244;236;59m▄\x1b[38;2;252;233;20;48;2;250;233;23m▄\x1b[48;2;251;232;20m \x1b[38;2;252;230;22;48;2;251;231;20m▄\x1b[38;2;253;214;24;48;2;251;231;20m▄\x1b[38;2;253;200;28;48;2;252;225;22m▄\x1b[38;2;250;203;41;48;2;252;203;26m▄\x1b[38;2;248;205;64;48;2;253;198;28m▄\x1b[49;38;2;249;202;46m▀\x1b[49;38;2;246;207;62m▀\x1b[49m \x1b[m
|
|
379
|
-
\x1b[49m \x1b[49;38;2;245;216;88m▀\x1b[49;38;2;246;216;52m▀\x1b[38;2;242;216;78;48;2;248;216;31m▄\x1b[38;2;249;217;38;48;2;250;215;27m▄\x1b[38;2;250;222;30;48;2;247;227;26m▄\x1b[48;2;248;232;23m \x1b[38;2;252;237;28;48;2;251;241;41m▄\x1b[38;2;238;238;119;49m▄\x1b[49m \x1b[38;2;243;235;85;49m▄\x1b[38;2;252;238;21;48;2;252;240;29m▄\x1b[38;2;252;234;23;48;2;251;234;22m▄\x1b[38;2;254;234;22;48;2;252;233;22m▄\x1b[38;2;248;227;59;48;2;251;232;38m▄\x1b[38;2;244;234;96;48;2;248;235;51m▄\x1b[38;2;251;238;32;48;2;249;235;24m▄\x1b[38;2;250;236;23;48;2;249;234;21m▄\x1b[38;2;252;234;22;48;2;253;236;25m▄\x1b[38;2;251;244;44;48;2;246;246;103m▄\x1b[49m \x1b[38;2;251;240;33;48;2;238;232;81m▄\x1b[38;2;249;233;21;48;2;251;236;19m▄\x1b[38;2;253;227;24;48;2;252;231;21m▄\x1b[38;2;254;204;26;48;2;252;224;23m▄\x1b[38;2;248;206;55;48;2;253;206;27m▄\x1b[49;38;2;250;204;40m▀\x1b[49;38;2;246;207;60m▀\x1b[49m \x1b[m
|
|
380
|
-
\x1b[49m \x1b[38;2;246;215;54;48;2;242;211;53m▄\x1b[38;2;253;217;20;48;2;248;216;35m▄\x1b[38;2;250;221;23;48;2;246;219;57m▄\x1b[38;2;245;232;39;49m▄\x1b[38;2;245;234;65;49m▄\x1b[49m \x1b[38;2;243;219;121;48;2;250;221;50m▄\x1b[38;2;252;221;33;48;2;251;222;30m▄\x1b[38;2;250;228;31;48;2;248;231;26m▄\x1b[38;2;249;232;23;48;2;251;234;23m▄\x1b[38;2;253;238;29;48;2;249;242;63m▄\x1b[49m \x1b[38;2;235;235;112;49m▄\x1b[38;2;251;236;21;48;2;251;240;34m▄\x1b[38;2;250;232;23;48;2;251;234;21m▄\x1b[38;2;253;230;24;48;2;252;233;23m▄\x1b[38;2;250;222;52;48;2;251;227;36m▄\x1b[49m \x1b[38;2;248;241;69;48;2;248;238;48m▄\x1b[38;2;251;239;28;48;2;250;238;25m▄\x1b[38;2;250;236;24;48;2;251;235;23m▄\x1b[38;2;252;234;23;48;2;252;238;26m▄\x1b[38;2;248;240;59;48;2;239;239;128m▄\x1b[49m \x1b[38;2;247;239;52;48;2;244;233;100m▄\x1b[38;2;249;234;20;48;2;252;238;23m▄\x1b[38;2;252;231;22;48;2;250;232;22m▄\x1b[38;2;253;207;25;48;2;253;216;26m▄\x1b[38;2;250;208;54;48;2;252;207;37m▄\x1b[49m \x1b[38;2;241;227;71;49m▄\x1b[38;2;247;213;44;49m▄\x1b[38;2;253;208;29;48;2;237;211;88m▄\x1b[38;2;254;205;28;48;2;248;213;47m▄\x1b[49m \x1b[m
|
|
381
|
-
\x1b[49m \x1b[38;2;245;230;60;48;2;242;224;49m▄\x1b[38;2;249;236;23;48;2;249;233;21m▄\x1b[38;2;252;235;26;48;2;250;231;20m▄\x1b[38;2;249;234;30;48;2;249;233;21m▄\x1b[38;2;254;236;27;48;2;252;236;25m▄\x1b[38;2;249;238;49;48;2;247;241;52m▄\x1b[49m \x1b[38;2;245;216;64;48;2;250;222;59m▄\x1b[38;2;252;220;31;48;2;252;223;33m▄\x1b[38;2;249;229;27;48;2;248;231;24m▄\x1b[38;2;248;230;21;48;2;251;233;22m▄\x1b[38;2;248;235;29;48;2;242;235;85m▄\x1b[38;2;251;235;24;48;2;250;242;49m▄\x1b[38;2;250;231;23;48;2;250;233;22m▄\x1b[38;2;253;225;23;48;2;252;230;24m▄\x1b[38;2;250;215;49;48;2;253;222;28m▄\x1b[49;38;2;244;222;89m▀\x1b[49m \x1b[38;2;247;234;63;48;2;248;238;46m▄\x1b[38;2;251;238;25;48;2;250;237;25m▄\x1b[38;2;250;233;22;48;2;250;234;21m▄\x1b[38;2;251;233;21;48;2;252;237;26m▄\x1b[38;2;244;232;62;49m▄\x1b[38;2;249;232;21;48;2;252;239;24m▄\x1b[38;2;250;231;22;48;2;249;231;22m▄\x1b[38;2;252;212;25;48;2;252;225;23m▄\x1b[38;2;251;209;55;48;2;253;204;27m▄\x1b[49;38;2;239;206;99m▀\x1b[49m \x1b[38;2;250;237;49;48;2;250;242;50m▄\x1b[38;2;251;234;22;48;2;252;231;25m▄\x1b[38;2;253;227;27;48;2;253;212;26m▄\x1b[38;2;254;206;26;48;2;254;204;25m▄\x1b[49m \x1b[m
|
|
382
|
-
\x1b[49m \x1b[38;2;253;239;29;48;2;238;230;84m▄\x1b[38;2;254;234;24;48;2;253;238;23m▄\x1b[38;2;253;209;29;48;2;254;233;26m▄\x1b[38;2;244;216;71;48;2;241;220;99m▄\x1b[49m \x1b[38;2;247;217;53;48;2;250;218;44m▄\x1b[38;2;251;217;31;48;2;250;222;31m▄\x1b[38;2;247;228;24;48;2;245;229;20m▄\x1b[48;2;245;229;19m \x1b[38;2;246;229;19;48;2;247;229;20m▄\x1b[38;2;253;224;24;48;2;251;229;23m▄\x1b[38;2;249;211;52;48;2;253;213;27m▄\x1b[49;38;2;244;210;68m▀\x1b[49m \x1b[38;2;249;234;57;48;2;249;237;39m▄\x1b[38;2;250;235;23;48;2;250;234;24m▄\x1b[38;2;247;231;19;48;2;247;230;19m▄\x1b[38;2;244;229;16;48;2;247;230;18m▄\x1b[38;2;246;229;18;48;2;246;230;19m▄\x1b[38;2;253;223;23;48;2;252;228;21m▄\x1b[38;2;253;206;37;48;2;253;208;26m▄\x1b[49;38;2;251;211;57m▀\x1b[49m \x1b[38;2;250;239;47;48;2;250;239;50m▄\x1b[38;2;250;236;23;48;2;249;235;22m▄\x1b[38;2;254;231;28;48;2;254;229;26m▄\x1b[38;2;255;209;26;48;2;254;209;27m▄\x1b[49m \x1b[m
|
|
383
|
-
\x1b[49m \x1b[38;2;245;239;70;49m▄\x1b[38;2;253;241;21;48;2;250;243;39m▄\x1b[38;2;251;208;32;48;2;254;237;23m▄\x1b[38;2;248;210;82;48;2;252;208;31m▄\x1b[49;38;2;245;213;78m▀\x1b[49m \x1b[38;2;246;218;70;48;2;252;217;33m▄\x1b[38;2;250;220;29;48;2;248;225;27m▄\x1b[38;2;248;229;24;48;2;245;229;20m▄\x1b[38;2;253;223;23;48;2;251;228;21m▄\x1b[38;2;252;209;33;48;2;253;211;26m▄\x1b[49;38;2;242;208;64m▀\x1b[49m \x1b[49;38;2;237;237;91m▀\x1b[38;2;246;235;64;48;2;251;237;29m▄\x1b[38;2;248;237;24;48;2;248;233;23m▄\x1b[38;2;247;233;21;48;2;245;231;18m▄\x1b[38;2;253;230;23;48;2;249;230;19m▄\x1b[38;2;253;206;30;48;2;253;209;24m▄\x1b[38;2;239;223;96;48;2;249;207;58m▄\x1b[49m \x1b[38;2;247;239;50;48;2;247;239;47m▄\x1b[38;2;249;236;23;48;2;250;236;23m▄\x1b[48;2;254;230;27m \x1b[38;2;254;209;27;48;2;254;209;26m▄\x1b[49m \x1b[m
|
|
384
|
-
\x1b[49m \x1b[38;2;235;235;78;49m▄\x1b[38;2;253;240;32;48;2;234;234;90m▄\x1b[38;2;249;224;34;48;2;253;242;25m▄\x1b[38;2;245;214;92;48;2;251;215;32m▄\x1b[49;38;2;240;209;85m▀\x1b[49m \x1b[38;2;245;235;64;49m▄\x1b[38;2;253;239;32;48;2;239;231;112m▄\x1b[38;2;246;239;82;49m▄\x1b[49m \x1b[49;38;2;246;219;73m▀\x1b[38;2;249;221;48;48;2;252;220;29m▄\x1b[38;2;254;222;27;48;2;253;228;27m▄\x1b[38;2;253;208;28;48;2;254;210;24m▄\x1b[38;2;237;219;73;48;2;244;208;63m▄\x1b[49m \x1b[38;2;249;236;42;49m▄\x1b[38;2;250;234;23;49m▄\x1b[38;2;249;231;24;49m▄\x1b[38;2;248;228;34;49m▄\x1b[38;2;243;226;99;49m▄\x1b[49m \x1b[49;38;2;242;242;67m▀\x1b[38;2;248;238;57;48;2;252;238;26m▄\x1b[38;2;253;236;26;48;2;251;235;23m▄\x1b[38;2;253;213;26;48;2;253;227;24m▄\x1b[38;2;247;209;62;48;2;247;209;61m▄\x1b[49m \x1b[38;2;247;239;49;48;2;247;239;47m▄\x1b[38;2;250;234;23;48;2;250;235;22m▄\x1b[38;2;254;228;28;48;2;254;230;28m▄\x1b[38;2;254;207;26;48;2;254;208;26m▄\x1b[49m \x1b[m
|
|
385
|
-
\x1b[49m \x1b[38;2;246;237;59;49m▄\x1b[38;2;249;236;35;48;2;249;240;43m▄\x1b[49;38;2;249;233;39m▀\x1b[49;38;2;237;219;109m▀\x1b[49m \x1b[38;2;239;234;80;49m▄\x1b[38;2;251;241;38;49m▄\x1b[38;2;252;239;32;48;2;252;242;48m▄\x1b[38;2;249;237;37;48;2;253;239;24m▄\x1b[38;2;245;233;57;48;2;254;236;21m▄\x1b[38;2;237;237;128;48;2;251;239;47m▄\x1b[49m \x1b[49;38;2;244;221;68m▀\x1b[38;2;252;216;33;48;2;254;216;24m▄\x1b[38;2;244;211;78;48;2;245;211;57m▄\x1b[49m \x1b[38;2;250;238;31;48;2;250;239;49m▄\x1b[38;2;249;233;20;48;2;251;235;20m▄\x1b[38;2;246;232;19;48;2;249;232;19m▄\x1b[38;2;246;231;19;48;2;248;231;19m▄\x1b[38;2;251;232;21;48;2;251;230;20m▄\x1b[38;2;253;217;25;48;2;250;222;34m▄\x1b[38;2;243;225;103;49m▄\x1b[49m \x1b[49;38;2;238;230;85m▀\x1b[38;2;251;237;40;48;2;253;238;27m▄\x1b[38;2;237;219;83;48;2;250;212;43m▄\x1b[49m \x1b[38;2;248;238;53;49m▄\x1b[38;2;252;234;34;48;2;250;237;49m▄\x1b[38;2;253;220;26;48;2;252;233;23m▄\x1b[38;2;252;202;28;48;2;253;225;29m▄\x1b[38;2;254;204;26;48;2;254;205;26m▄\x1b[49m \x1b[m
|
|
386
|
-
\x1b[49m \x1b[38;2;240;229;56;48;2;247;232;62m▄\x1b[49;38;2;249;238;37m▀\x1b[49m \x1b[49;38;2;231;231;110m▀\x1b[49;38;2;244;241;45m▀\x1b[49;38;2;239;239;63m▀\x1b[49m \x1b[49;38;2;241;217;88m▀\x1b[49m \x1b[38;2;249;236;52;48;2;249;237;33m▄\x1b[38;2;250;237;24;48;2;248;234;22m▄\x1b[38;2;250;234;21;48;2;246;233;19m▄\x1b[38;2;251;230;21;48;2;247;233;19m▄\x1b[38;2;253;210;26;48;2;252;230;22m▄\x1b[38;2;251;207;36;48;2;253;209;27m▄\x1b[49;38;2;243;219;95m▀\x1b[49m \x1b[49;38;2;241;223;96m▀\x1b[49m \x1b[38;2;242;233;67;49m▄\x1b[38;2;249;236;41;49m▄\x1b[38;2;253;237;23;48;2;245;232;63m▄\x1b[38;2;253;226;24;48;2;251;238;38m▄\x1b[38;2;251;201;26;48;2;252;234;23m▄\x1b[38;2;251;198;26;48;2;251;210;25m▄\x1b[38;2;253;202;29;48;2;251;199;25m▄\x1b[38;2;251;203;42;48;2;253;201;28m▄\x1b[38;2;229;211;123;48;2;253;203;32m▄\x1b[49m \x1b[m
|
|
387
|
-
\x1b[38;2;222;222;144;49m▄\x1b[38;2;229;220;123;48;2;234;225;98m▄\x1b[49;38;2;228;215;121m▀\x1b[49m \x1b[38;2;248;236;46;49m▄\x1b[38;2;252;236;21;48;2;243;230;66m▄\x1b[38;2;251;233;20;48;2;249;234;38m▄\x1b[38;2;251;231;20;48;2;248;234;33m▄\x1b[38;2;248;231;20;48;2;244;229;67m▄\x1b[38;2;244;233;47;49m▄\x1b[38;2;236;236;70;49m▄\x1b[49m \x1b[49;38;2;247;212;46m▀\x1b[49;38;2;250;209;30m▀\x1b[38;2;240;225;150;48;2;251;202;30m▄\x1b[49;38;2;252;203;36m▀\x1b[49;38;2;241;212;90m▀\x1b[49m \x1b[38;2;235;235;98;49m▄\x1b[38;2;243;235;63;49m▄\x1b[38;2;251;238;25;48;2;237;228;73m▄\x1b[38;2;253;236;20;48;2;247;234;52m▄\x1b[38;2;254;230;22;48;2;252;238;23m▄\x1b[38;2;252;206;26;48;2;253;233;21m▄\x1b[38;2;253;198;28;48;2;252;217;25m▄\x1b[38;2;252;201;36;48;2;252;196;26m▄\x1b[38;2;240;205;70;48;2;252;199;28m▄\x1b[49;38;2;250;202;38m▀\x1b[49;38;2;241;213;88m▀\x1b[49m \x1b[m
|
|
388
|
-
\x1b[49;38;2;207;207;191m▀\x1b[49m \x1b[38;2;236;232;82;49m▄\x1b[38;2;248;239;48;49m▄\x1b[49m \x1b[49;38;2;244;231;69m▀\x1b[49;38;2;249;233;29m▀\x1b[38;2;244;228;69;48;2;248;234;23m▄\x1b[38;2;249;233;28;48;2;247;231;21m▄\x1b[38;2;247;232;25;48;2;247;230;20m▄\x1b[38;2;248;231;23;48;2;248;231;19m▄\x1b[38;2;249;232;23;48;2;247;233;20m▄\x1b[38;2;249;233;24;48;2;246;237;59m▄\x1b[38;2;248;237;29;48;2;242;242;77m▄\x1b[38;2;244;240;76;49m▄\x1b[49m \x1b[38;2;241;234;99;49m▄\x1b[38;2;250;238;41;49m▄\x1b[38;2;253;237;26;48;2;242;232;79m▄\x1b[38;2;253;236;25;48;2;252;240;27m▄\x1b[38;2;254;233;24;48;2;254;236;20m▄\x1b[38;2;251;210;29;48;2;253;235;21m▄\x1b[38;2;251;197;28;48;2;253;225;23m▄\x1b[38;2;246;202;53;48;2;254;200;27m▄\x1b[49;38;2;253;199;32m▀\x1b[49;38;2;245;207;64m▀\x1b[49m \x1b[m
|
|
389
|
-
\x1b[49m \x1b[49;38;2;231;219;97m▀\x1b[49;38;2;243;229;58m▀\x1b[49m \x1b[49;38;2;237;237;91m▀\x1b[49;38;2;246;231;56m▀\x1b[38;2;246;238;68;48;2;246;233;22m▄\x1b[38;2;245;230;48;48;2;246;233;21m▄\x1b[38;2;247;235;23;48;2;247;232;19m▄\x1b[38;2;246;233;21;48;2;247;232;18m▄\x1b[38;2;247;232;20;48;2;248;232;18m▄\x1b[38;2;247;231;19;48;2;246;234;29m▄\x1b[38;2;247;232;20;48;2;240;230;80m▄\x1b[38;2;246;233;34;49m▄\x1b[38;2;245;231;52;49m▄\x1b[38;2;250;233;23;48;2;225;225;105m▄\x1b[38;2;252;233;19;48;2;248;234;46m▄\x1b[38;2;253;233;20;48;2;253;235;21m▄\x1b[38;2;254;232;21;48;2;253;234;20m▄\x1b[38;2;252;217;24;48;2;254;234;20m▄\x1b[38;2;253;202;35;48;2;254;230;23m▄\x1b[38;2;246;211;84;48;2;253;201;28m▄\x1b[49;38;2;250;203;46m▀\x1b[49;38;2;247;206;82m▀\x1b[49m \x1b[m
|
|
390
|
-
\x1b[49m \x1b[49;38;2;247;226;63m▀\x1b[49;38;2;247;232;36m▀\x1b[38;2;245;229;57;48;2;246;232;22m▄\x1b[38;2;247;230;31;48;2;248;232;21m▄\x1b[38;2;247;232;21;48;2;247;231;19m▄\x1b[38;2;247;233;19;48;2;246;231;18m▄\x1b[38;2;247;232;17;48;2;246;231;17m▄\x1b[38;2;251;232;19;48;2;249;232;17m▄\x1b[38;2;253;221;24;48;2;252;232;20m▄\x1b[38;2;249;207;48;48;2;253;229;22m▄\x1b[38;2;248;209;72;48;2;253;207;28m▄\x1b[49;38;2;245;202;59m▀\x1b[49;38;2;237;200;109m▀\x1b[49m \x1b[m
|
|
391
|
-
\x1b[49m \x1b[49;38;2;242;230;89m▀\x1b[49;38;2;247;232;50m▀\x1b[38;2;244;227;72;48;2;249;233;28m▄\x1b[38;2;244;218;55;48;2;252;231;23m▄\x1b[49;38;2;250;215;37m▀\x1b[49;38;2;244;206;65m▀\x1b[49m \x1b[m
|
|
392
|
-
`;
|
|
393
|
-
/**
|
|
394
|
-
* Get the intro banner with ASCII art
|
|
395
|
-
*/
|
|
396
|
-
function getIntroBanner(version) {
|
|
397
|
-
const versionLine = `v${version}`;
|
|
398
|
-
const padding = " ".repeat(35 - versionLine.length);
|
|
399
|
-
return `
|
|
400
|
-
${_mongez_copper.colors.magentaBright("╭──────────────────────────────────────╮")}
|
|
401
|
-
${_mongez_copper.colors.magentaBright("│")} ${_mongez_copper.colors.magentaBright("│")}
|
|
402
|
-
${_mongez_copper.colors.magentaBright("│")} 🧙 ${_mongez_copper.colors.bold(_mongez_copper.colors.yellowBright("WARLOCK.JS"))} ${_mongez_copper.colors.magentaBright("│")}
|
|
403
|
-
${_mongez_copper.colors.magentaBright("│")} ${_mongez_copper.colors.cyan("The Magical Node.js Framework")} ${_mongez_copper.colors.magentaBright("│")}
|
|
404
|
-
${_mongez_copper.colors.magentaBright("│")} ${_mongez_copper.colors.magentaBright("│")}
|
|
405
|
-
${_mongez_copper.colors.magentaBright("│")} ${_mongez_copper.colors.green(versionLine)}${padding}${_mongez_copper.colors.magentaBright("│")}
|
|
406
|
-
${_mongez_copper.colors.magentaBright("│")} ${_mongez_copper.colors.magentaBright("│")}
|
|
407
|
-
${_mongez_copper.colors.magentaBright("╰──────────────────────────────────────╯")}
|
|
408
|
-
`;
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Display the intro banner
|
|
412
|
-
*/
|
|
413
|
-
function showIntroBanner(version) {
|
|
414
|
-
console.log(warlockLogoAnsi);
|
|
415
|
-
console.log(warlockTextAnsi);
|
|
416
|
-
console.log(getIntroBanner(version));
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Get the success screen with project summary
|
|
420
|
-
*/
|
|
421
|
-
function getSuccessScreen(options) {
|
|
422
|
-
const { projectName, database, features, packageManager } = options;
|
|
423
|
-
let featuresText = features.join(", ");
|
|
424
|
-
if (features.length === 0) featuresText = "none";
|
|
425
|
-
const baseLabelLength = 10;
|
|
426
|
-
const padding = 6;
|
|
427
|
-
const projectLineLen = projectName.length + baseLabelLength;
|
|
428
|
-
const dbLineLen = database.length + baseLabelLength;
|
|
429
|
-
const featuresLineLen = featuresText.length + baseLabelLength;
|
|
430
|
-
const boxWidth = Math.max(projectLineLen, dbLineLen, featuresLineLen, 40) + padding + 2;
|
|
431
|
-
const createBorder = (start, end) => _mongez_copper.colors.magentaBright(start + "─".repeat(boxWidth - 2) + end);
|
|
432
|
-
const padLine = (label, value, isFeature = false) => {
|
|
433
|
-
const valueColor = (text) => {
|
|
434
|
-
if (isFeature && text === "none") return _mongez_copper.colors.dim(text);
|
|
435
|
-
return _mongez_copper.colors.white(text);
|
|
436
|
-
};
|
|
437
|
-
const labelPart = _mongez_copper.colors.dim(label.padEnd(10));
|
|
438
|
-
const valuePart = valueColor(value);
|
|
439
|
-
const contentVisibleLength = 13 + value.length;
|
|
440
|
-
const remaining = boxWidth - 2 - contentVisibleLength;
|
|
441
|
-
return _mongez_copper.colors.magentaBright("│") + " " + labelPart + valuePart + " ".repeat(remaining) + _mongez_copper.colors.magentaBright("│");
|
|
442
|
-
};
|
|
443
|
-
const emptyLine = _mongez_copper.colors.magentaBright("│") + " ".repeat(boxWidth - 2) + _mongez_copper.colors.magentaBright("│");
|
|
444
|
-
const headerText = "🎉 YOUR PROJECT IS READY! 🎉";
|
|
445
|
-
const headerPadding = Math.floor((boxWidth - 2 - 28) / 2);
|
|
446
|
-
const headerLine = _mongez_copper.colors.magentaBright("│") + " ".repeat(headerPadding) + _mongez_copper.colors.bold(_mongez_copper.colors.green(headerText)) + " ".repeat(boxWidth - 2 - headerPadding - 28) + _mongez_copper.colors.magentaBright("│");
|
|
447
|
-
const devCommand = packageManager === "npm" ? "npm run dev" : `${packageManager} dev`;
|
|
448
|
-
return `
|
|
449
|
-
${createBorder("╭", "╮")}
|
|
450
|
-
${emptyLine}
|
|
451
|
-
${headerLine}
|
|
452
|
-
${emptyLine}
|
|
453
|
-
${padLine("Project:", projectName)}
|
|
454
|
-
${padLine("Database:", database)}
|
|
455
|
-
${padLine("Features:", featuresText, true)}
|
|
456
|
-
${emptyLine}
|
|
457
|
-
${createBorder("╰", "╯")}
|
|
458
|
-
|
|
459
|
-
${_mongez_copper.colors.bold(_mongez_copper.colors.cyan("🚀 Next steps:"))}
|
|
460
|
-
|
|
461
|
-
${_mongez_copper.colors.cyan("cd")} ${projectName}
|
|
462
|
-
${_mongez_copper.colors.cyan(devCommand)}
|
|
463
|
-
|
|
464
|
-
${_mongez_copper.colors.dim("💡 Pro tip: Install the")} ${_mongez_copper.colors.yellow("Generator Z")} ${_mongez_copper.colors.dim("extension in VSCode")}
|
|
465
|
-
${_mongez_copper.colors.dim("for helpful code snippets and productivity boosters!")}
|
|
466
|
-
|
|
467
|
-
${_mongez_copper.colors.dim("📚 Docs:")} ${_mongez_copper.colors.cyan("https://warlock.js.org")}
|
|
468
|
-
${_mongez_copper.colors.dim("⭐ Star us:")} ${_mongez_copper.colors.cyan("https://github.com/warlockjs/framework")}
|
|
469
|
-
`;
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Display the success screen
|
|
473
|
-
*/
|
|
474
|
-
function showSuccessScreen(options) {
|
|
475
|
-
console.log(getSuccessScreen(options));
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
//#endregion
|
|
479
|
-
//#region ../../@warlock.js/create-warlock/src/ui/spinners.ts
|
|
480
|
-
/**
|
|
481
|
-
* Themed spinner messages for the wizard
|
|
482
|
-
*/
|
|
483
|
-
const spinnerMessages = {
|
|
484
|
-
installingDeps: "📦 Summoning dependencies...",
|
|
485
|
-
depsInstalled: "📦 Dependencies materialized! ✅",
|
|
486
|
-
initializingGit: "📂 Initializing grimoire (git)...",
|
|
487
|
-
gitInitialized: "📂 Grimoire initialized! ✅",
|
|
488
|
-
generatingJwt: "🔐 Forging secret keys...",
|
|
489
|
-
jwtGenerated: "🔐 Secret keys forged! ✅",
|
|
490
|
-
warmingCache: "⚡ Charging magical circuits...",
|
|
491
|
-
cacheWarmed: "⚡ Circuits charged! ✅",
|
|
492
|
-
addingFeatures: "🪄 Weaving in your features...",
|
|
493
|
-
featuresAdded: "🪄 Features woven in! ✅",
|
|
494
|
-
featuresFailed: "⚠️ Some features could not be added — add them later with `warlock add`",
|
|
495
|
-
copyingTemplate: "📋 Preparing your spellbook...",
|
|
496
|
-
templateCopied: "📋 Spellbook ready! ✅"
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
//#endregion
|
|
500
|
-
//#region ../../@warlock.js/create-warlock/src/commands/create-warlock-app/index.ts
|
|
501
|
-
async function createWarlockApp(application) {
|
|
502
|
-
const { useGit, useJWT, features, aiProviders, databaseDriver } = application.options;
|
|
503
|
-
const templateSpinner = (0, _clack_prompts.spinner)();
|
|
504
|
-
templateSpinner.start(spinnerMessages.copyingTemplate);
|
|
505
|
-
application.init().use("warlock").updatePackageJson().updateDotEnv().configureDatabaseEnv(databaseDriver);
|
|
506
|
-
templateSpinner.stop(spinnerMessages.templateCopied);
|
|
507
|
-
const installSpinner = (0, _clack_prompts.spinner)();
|
|
508
|
-
installSpinner.start(spinnerMessages.installingDeps);
|
|
509
|
-
await application.install().install;
|
|
510
|
-
installSpinner.stop(spinnerMessages.depsInstalled);
|
|
511
|
-
const selectedFeatures = [
|
|
512
|
-
databaseDriver,
|
|
513
|
-
...features,
|
|
514
|
-
...aiProviders
|
|
515
|
-
];
|
|
516
|
-
if (selectedFeatures.length > 0) {
|
|
517
|
-
const featuresSpinner = (0, _clack_prompts.spinner)();
|
|
518
|
-
featuresSpinner.start(spinnerMessages.addingFeatures);
|
|
519
|
-
if (await application.installFeatures(selectedFeatures)) {
|
|
520
|
-
await application.install().install;
|
|
521
|
-
featuresSpinner.stop(spinnerMessages.featuresAdded);
|
|
522
|
-
} else featuresSpinner.stop(spinnerMessages.featuresFailed);
|
|
523
|
-
}
|
|
524
|
-
if (useGit) {
|
|
525
|
-
const gitSpinner = (0, _clack_prompts.spinner)();
|
|
526
|
-
gitSpinner.start(spinnerMessages.initializingGit);
|
|
527
|
-
await application.git();
|
|
528
|
-
gitSpinner.stop(spinnerMessages.gitInitialized);
|
|
529
|
-
}
|
|
530
|
-
if (useJWT) {
|
|
531
|
-
const jwtSpinner = (0, _clack_prompts.spinner)();
|
|
532
|
-
jwtSpinner.start(spinnerMessages.generatingJwt);
|
|
533
|
-
await application.exec(require_paths.runPackageManagerCommand("jwt"));
|
|
534
|
-
jwtSpinner.stop(spinnerMessages.jwtGenerated);
|
|
535
|
-
} else {
|
|
536
|
-
const warmSpinner = (0, _clack_prompts.spinner)();
|
|
537
|
-
warmSpinner.start(spinnerMessages.warmingCache);
|
|
538
|
-
await application.exec("npx warlock --warm-cache");
|
|
539
|
-
warmSpinner.stop(spinnerMessages.cacheWarmed);
|
|
540
|
-
}
|
|
541
|
-
showSuccessScreen({
|
|
542
|
-
projectName: application.name,
|
|
543
|
-
database: databaseDriver === "mongodb" ? "MongoDB" : "PostgreSQL",
|
|
544
|
-
features: [...features, ...aiProviders],
|
|
545
|
-
packageManager: require_paths.getPackageManager()
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
//#endregion
|
|
550
|
-
//#region ../../@warlock.js/create-warlock/src/commands/create-new-app/get-app-path.ts
|
|
551
|
-
function getAppPath(appName) {
|
|
552
|
-
const appPath = path.resolve(process.cwd(), appName);
|
|
553
|
-
if ((0, _warlock_js_fs.directoryExists)(appPath)) {
|
|
554
|
-
console.log(_mongez_copper.colors.redBright(`${process.cwd()} has an existing directory \`${_mongez_copper.colors.cyan(appName)}\`, please choose another app name or another directory to run the command from.`));
|
|
555
|
-
process.exit(1);
|
|
556
|
-
}
|
|
557
|
-
return appPath;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
//#endregion
|
|
561
|
-
//#region ../../@warlock.js/create-warlock/src/commands/create-new-app/index.ts
|
|
562
|
-
async function createNewApp(cli = {}) {
|
|
563
|
-
const pmDetectionPromise = require_paths.detectPackageManagers();
|
|
564
|
-
const createWarlockVersion = (0, _warlock_js_fs.getJsonFile)(require_paths.packageRoot("package.json")).version;
|
|
565
|
-
showIntroBanner(createWarlockVersion);
|
|
566
|
-
console.log(_mongez_copper.colors.cyan("✨ Let's create something magical! ✨\n"));
|
|
567
|
-
const [major] = process.versions.node.split(".").map(Number);
|
|
568
|
-
if (major < 20) {
|
|
569
|
-
(0, _clack_prompts.cancel)("Node.js version must be at least 20.0.0");
|
|
570
|
-
process.exit(0);
|
|
571
|
-
}
|
|
572
|
-
if (cli.yes) {
|
|
573
|
-
await createNonInteractive(cli);
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
const appName = await (0, _clack_prompts.text)({
|
|
577
|
-
message: "What shall we call your project?",
|
|
578
|
-
placeholder: "my-warlock-app"
|
|
579
|
-
});
|
|
580
|
-
if ((0, _clack_prompts.isCancel)(appName) || !appName.trim()) {
|
|
581
|
-
(0, _clack_prompts.cancel)("A project name is required to continue");
|
|
582
|
-
process.exit(0);
|
|
583
|
-
}
|
|
584
|
-
const appPath = getAppPath(appName);
|
|
585
|
-
if (!appPath) return;
|
|
586
|
-
await pmDetectionPromise;
|
|
587
|
-
const packageManager = await (0, _clack_prompts.select)({
|
|
588
|
-
message: "Which package manager do you want to use?",
|
|
589
|
-
options: require_paths.getSystemPackageManagers().map((pm) => ({
|
|
590
|
-
value: pm,
|
|
591
|
-
label: pm
|
|
592
|
-
})),
|
|
593
|
-
initialValue: require_paths.getPreferredPackageManager()
|
|
594
|
-
});
|
|
595
|
-
if ((0, _clack_prompts.isCancel)(packageManager)) {
|
|
596
|
-
(0, _clack_prompts.cancel)("Package manager selection cancelled");
|
|
597
|
-
process.exit(0);
|
|
598
|
-
}
|
|
599
|
-
require_paths.setPackageManager(packageManager);
|
|
600
|
-
const databaseDriver = await (0, _clack_prompts.select)({
|
|
601
|
-
message: "Choose your database driver 🗄ï¸",
|
|
602
|
-
options: getDatabaseDriverOptions()
|
|
603
|
-
});
|
|
604
|
-
if ((0, _clack_prompts.isCancel)(databaseDriver)) {
|
|
605
|
-
(0, _clack_prompts.cancel)("Database selection cancelled");
|
|
606
|
-
process.exit(0);
|
|
607
|
-
}
|
|
608
|
-
const selectedDriver = getDatabaseDriver(databaseDriver);
|
|
609
|
-
const selectedFeatures = await (0, _clack_prompts.multiselect)({
|
|
610
|
-
message: "Select optional features to include ✨",
|
|
611
|
-
options: getFeatureOptions(),
|
|
612
|
-
initialValues: getDefaultFeatureKeys(),
|
|
613
|
-
required: false
|
|
614
|
-
});
|
|
615
|
-
if ((0, _clack_prompts.isCancel)(selectedFeatures)) {
|
|
616
|
-
(0, _clack_prompts.cancel)("Feature selection cancelled");
|
|
617
|
-
process.exit(0);
|
|
618
|
-
}
|
|
619
|
-
const selectedAiProviders = await (0, _clack_prompts.multiselect)({
|
|
620
|
-
message: "Add AI providers? The core AI package is included automatically 🤖",
|
|
621
|
-
options: getAiProviderOptions(),
|
|
622
|
-
required: false
|
|
623
|
-
});
|
|
624
|
-
if ((0, _clack_prompts.isCancel)(selectedAiProviders)) {
|
|
625
|
-
(0, _clack_prompts.cancel)("AI provider selection cancelled");
|
|
626
|
-
process.exit(0);
|
|
627
|
-
}
|
|
628
|
-
const useGit = await (0, _clack_prompts.confirm)({ message: "Initialize a Git repository? 📂" }) === true;
|
|
629
|
-
if ((0, _clack_prompts.isCancel)(useGit)) {
|
|
630
|
-
(0, _clack_prompts.cancel)("Setup cancelled");
|
|
631
|
-
process.exit(0);
|
|
632
|
-
}
|
|
633
|
-
const useJWT = await (0, _clack_prompts.confirm)({ message: "Generate JWT secret keys? ðŸ”" }) === true;
|
|
634
|
-
if ((0, _clack_prompts.isCancel)(useJWT)) {
|
|
635
|
-
(0, _clack_prompts.cancel)("Setup cancelled");
|
|
636
|
-
process.exit(0);
|
|
637
|
-
}
|
|
638
|
-
await createWarlockApp(new App({
|
|
639
|
-
appName,
|
|
640
|
-
appType: "warlock",
|
|
641
|
-
appPath,
|
|
642
|
-
pkgManager: require_paths.getPackageManager(),
|
|
643
|
-
options: {
|
|
644
|
-
databaseDriver,
|
|
645
|
-
databasePort: selectedDriver?.defaultPort || 27017,
|
|
646
|
-
features: selectedFeatures,
|
|
647
|
-
aiProviders: selectedAiProviders,
|
|
648
|
-
useGit,
|
|
649
|
-
useJWT
|
|
650
|
-
}
|
|
651
|
-
}));
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Non-interactive scaffold path for `--yes`. Builds the app from flags with
|
|
655
|
-
* sensible defaults and skips every prompt. Validates the database driver and
|
|
656
|
-
* feature/provider keys up front so a typo fails fast instead of mid-install.
|
|
657
|
-
*/
|
|
658
|
-
async function createNonInteractive(cli) {
|
|
659
|
-
const appName = (cli.name ?? "").trim();
|
|
660
|
-
if (!appName) {
|
|
661
|
-
(0, _clack_prompts.cancel)("--yes requires a project name (first argument or --name=<name>)");
|
|
662
|
-
process.exit(1);
|
|
663
|
-
}
|
|
664
|
-
const appPath = getAppPath(appName);
|
|
665
|
-
if (!appPath) return;
|
|
666
|
-
await require_paths.detectPackageManagers();
|
|
667
|
-
require_paths.setPackageManager(cli.pm ?? require_paths.getPreferredPackageManager());
|
|
668
|
-
const databaseDriver = cli.db ?? "mongodb";
|
|
669
|
-
const driver = getDatabaseDriver(databaseDriver);
|
|
670
|
-
if (!driver) {
|
|
671
|
-
(0, _clack_prompts.cancel)(`Unknown database driver "${databaseDriver}"`);
|
|
672
|
-
process.exit(1);
|
|
673
|
-
}
|
|
674
|
-
const features = cli.features ?? [];
|
|
675
|
-
const aiProviders = cli.ai ?? [];
|
|
676
|
-
const allowedKeys = getAllFeatureKeys();
|
|
677
|
-
const invalidKeys = [...features, ...aiProviders].filter((key) => !allowedKeys.includes(key));
|
|
678
|
-
if (invalidKeys.length > 0) {
|
|
679
|
-
(0, _clack_prompts.cancel)(`Unknown feature(s): ${invalidKeys.join(", ")}`);
|
|
680
|
-
process.exit(1);
|
|
681
|
-
}
|
|
682
|
-
await createWarlockApp(new App({
|
|
683
|
-
appName,
|
|
684
|
-
appType: "warlock",
|
|
685
|
-
appPath,
|
|
686
|
-
pkgManager: require_paths.getPackageManager(),
|
|
687
|
-
options: {
|
|
688
|
-
databaseDriver,
|
|
689
|
-
databasePort: driver.defaultPort,
|
|
690
|
-
features,
|
|
691
|
-
aiProviders,
|
|
692
|
-
useGit: cli.git ?? false,
|
|
693
|
-
useJWT: cli.jwt ?? false
|
|
694
|
-
}
|
|
695
|
-
}));
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
//#endregion
|
|
699
|
-
//#region ../../@warlock.js/create-warlock/src/index.ts
|
|
700
|
-
const valueFlags = [
|
|
701
|
-
"name",
|
|
702
|
-
"db",
|
|
703
|
-
"pm",
|
|
704
|
-
"features",
|
|
705
|
-
"ai"
|
|
706
|
-
];
|
|
707
|
-
/**
|
|
708
|
-
* Parse the scaffolder's own CLI flags for non-interactive mode.
|
|
709
|
-
*
|
|
710
|
-
* @example
|
|
711
|
-
* create-warlock my-app --db=postgres --features=test,herald --ai=openai,anthropic --yes
|
|
712
|
-
*/
|
|
713
|
-
function parseFlags(argv) {
|
|
714
|
-
const flags = {};
|
|
715
|
-
const positionals = [];
|
|
716
|
-
for (let i = 0; i < argv.length; i++) {
|
|
717
|
-
const arg = argv[i];
|
|
718
|
-
if (!arg.startsWith("-")) {
|
|
719
|
-
positionals.push(arg);
|
|
720
|
-
continue;
|
|
721
|
-
}
|
|
722
|
-
const equalIndex = arg.indexOf("=");
|
|
723
|
-
const key = (equalIndex === -1 ? arg : arg.slice(0, equalIndex)).replace(/^-+/, "");
|
|
724
|
-
let value = equalIndex === -1 ? void 0 : arg.slice(equalIndex + 1);
|
|
725
|
-
if (valueFlags.includes(key) && value === void 0) {
|
|
726
|
-
const next = argv[i + 1];
|
|
727
|
-
if (next && !next.startsWith("-")) {
|
|
728
|
-
value = next;
|
|
729
|
-
i++;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
switch (key) {
|
|
733
|
-
case "yes":
|
|
734
|
-
case "y":
|
|
735
|
-
flags.yes = true;
|
|
736
|
-
break;
|
|
737
|
-
case "git":
|
|
738
|
-
flags.git = true;
|
|
739
|
-
break;
|
|
740
|
-
case "no-git":
|
|
741
|
-
flags.git = false;
|
|
742
|
-
break;
|
|
743
|
-
case "jwt":
|
|
744
|
-
flags.jwt = true;
|
|
745
|
-
break;
|
|
746
|
-
case "no-jwt":
|
|
747
|
-
flags.jwt = false;
|
|
748
|
-
break;
|
|
749
|
-
case "name":
|
|
750
|
-
flags.name = value;
|
|
751
|
-
break;
|
|
752
|
-
case "db":
|
|
753
|
-
flags.db = value;
|
|
754
|
-
break;
|
|
755
|
-
case "pm":
|
|
756
|
-
flags.pm = value;
|
|
757
|
-
break;
|
|
758
|
-
case "features":
|
|
759
|
-
flags.features = splitList(value);
|
|
760
|
-
break;
|
|
761
|
-
case "ai":
|
|
762
|
-
flags.ai = splitList(value);
|
|
763
|
-
break;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if (!flags.name && positionals.length > 0) flags.name = positionals[0];
|
|
767
|
-
return flags;
|
|
768
|
-
}
|
|
769
|
-
function splitList(value) {
|
|
770
|
-
if (!value) return [];
|
|
771
|
-
return value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
772
|
-
}
|
|
773
|
-
function createApp() {
|
|
774
|
-
createNewApp(parseFlags(process.argv.slice(2)));
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
//#endregion
|
|
778
|
-
exports.default = createApp;
|
|
779
|
-
exports.parseFlags = parseFlags;
|
|
780
|
-
//# sourceMappingURL=index.cjs.map
|
package/cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["template","runCommand","getPackageManager","executeCommand","path","colors","runPackageManagerCommand","getPackageManager","colors","detectPackageManagers","packageRoot","colors","getSystemPackageManagers","getPreferredPackageManager","getPackageManager"],"sources":["../../../../../@warlock.js/create-warlock/src/features/database-drivers.ts","../../../../../@warlock.js/create-warlock/src/features/features-map.ts","../../../../../@warlock.js/create-warlock/src/helpers/app.ts","../../../../../@warlock.js/create-warlock/src/ui/banner.ts","../../../../../@warlock.js/create-warlock/src/ui/spinners.ts","../../../../../@warlock.js/create-warlock/src/commands/create-warlock-app/index.ts","../../../../../@warlock.js/create-warlock/src/commands/create-new-app/get-app-path.ts","../../../../../@warlock.js/create-warlock/src/commands/create-new-app/index.ts","../../../../../@warlock.js/create-warlock/src/index.ts"],"sourcesContent":["/**\n * Database driver options and configuration\n */\nexport type DatabaseDriver = {\n value: string;\n label: string;\n package: string;\n packageVersion: string;\n defaultPort: number;\n disabled?: boolean;\n hint?: string;\n};\n\nexport const databaseDrivers: DatabaseDriver[] = [\n {\n value: \"mongodb\",\n label: \"MongoDB\",\n package: \"mongodb\",\n packageVersion: \"^7.0.0\",\n defaultPort: 27017,\n },\n {\n value: \"postgres\",\n label: \"PostgreSQL\",\n package: \"pg\",\n packageVersion: \"^8.11.0\",\n defaultPort: 5432,\n },\n {\n value: \"mysql\",\n label: \"MySQL (Coming Soon)\",\n package: \"mysql2\",\n packageVersion: \"^3.5.0\",\n defaultPort: 3306,\n disabled: true,\n hint: \"MySQL support coming in a future release\",\n },\n];\n\n/**\n * Get database driver options for the select prompt\n */\nexport function getDatabaseDriverOptions() {\n return databaseDrivers.map(driver => ({\n value: driver.value,\n label: driver.label,\n hint: driver.hint,\n disabled: driver.disabled,\n }));\n}\n\n/**\n * Get database driver config by value\n */\nexport function getDatabaseDriver(value: string): DatabaseDriver | undefined {\n return databaseDrivers.find(driver => driver.value === value);\n}\n\n/**\n * Get database driver dependency\n */\nexport function getDatabaseDependency(\n driverValue: string,\n): Record<string, string> {\n const driver = getDatabaseDriver(driverValue);\n if (!driver) return {};\n\n return {\n [driver.package]: driver.packageVersion,\n };\n}\n","/**\n * Presentation manifest for the scaffolder's feature prompts.\n *\n * This file is **display metadata only** — keys, labels, hints, grouping, and\n * default selections. It deliberately holds NO dependency names or versions:\n * the single source of truth for what each feature installs is the `add`\n * command's feature map in `@warlock.js/core`\n * (`src/generations/add-command.action.ts`). The scaffolder collects the\n * selections here and delegates the actual install to `warlock add`, so the\n * two never drift on versions again.\n *\n * Every `key` below MUST exist in core's `allowedFeatures`; a CI guard should\n * assert that subset relationship so a typo fails the build instead of shipping.\n */\n\nexport type FeatureGroup =\n | \"Rendering & Mail\"\n | \"Media\"\n | \"Storage & Cache\"\n | \"Jobs & Messaging\"\n | \"Realtime\"\n | \"API Docs\"\n | \"Tooling\";\n\nexport type FeatureOption = {\n /** Must match a key in core's `add` feature map. */\n key: string;\n label: string;\n hint: string;\n group: FeatureGroup;\n defaultSelected?: boolean;\n};\n\n/**\n * Optional features offered in the general multiselect step. The database\n * driver (its own select) and AI providers (their own step) are intentionally\n * NOT here — they have dedicated prompts.\n */\nexport const features: FeatureOption[] = [\n // Rendering & Mail\n {\n key: \"react\",\n label: \"React (rendering & mails)\",\n hint: \"React + ReactDOM for non-interactive rendering and HTML/email generation\",\n group: \"Rendering & Mail\",\n defaultSelected: true,\n },\n {\n key: \"react-email\",\n label: \"React Email\",\n hint: \"Build email templates with React + Tailwind (pulls react + mail)\",\n group: \"Rendering & Mail\",\n },\n {\n key: \"mail\",\n label: \"Mail (Nodemailer)\",\n hint: \"Send emails via SMTP\",\n group: \"Rendering & Mail\",\n },\n {\n key: \"ses\",\n label: \"Amazon SES\",\n hint: \"Send emails via the AWS SES API\",\n group: \"Rendering & Mail\",\n },\n\n // Media\n {\n key: \"image\",\n label: \"Image processing (Sharp)\",\n hint: \"Resize, convert, and optimize images\",\n group: \"Media\",\n },\n\n // Storage & Cache\n {\n key: \"s3\",\n label: \"S3 storage\",\n hint: \"AWS S3 for cloud file storage\",\n group: \"Storage & Cache\",\n },\n {\n key: \"redis\",\n label: \"Redis cache\",\n hint: \"Redis driver for the cache layer\",\n group: \"Storage & Cache\",\n },\n\n // Jobs & Messaging\n {\n key: \"scheduler\",\n label: \"Scheduler\",\n hint: \"Background tasks and cron jobs\",\n group: \"Jobs & Messaging\",\n },\n {\n key: \"herald\",\n label: \"Herald (RabbitMQ)\",\n hint: \"Message broker for event-driven architecture\",\n group: \"Jobs & Messaging\",\n },\n\n // Realtime\n {\n key: \"socket\",\n label: \"Socket.IO\",\n hint: \"Realtime websocket server\",\n group: \"Realtime\",\n },\n\n // API Docs\n {\n key: \"swagger\",\n label: \"Swagger\",\n hint: \"OpenAPI documentation for your routes\",\n group: \"API Docs\",\n },\n {\n key: \"postman\",\n label: \"Postman\",\n hint: \"Generate a Postman collection for your API\",\n group: \"API Docs\",\n },\n\n // Tooling\n {\n key: \"test\",\n label: \"Testing (Vitest)\",\n hint: \"Vitest + coverage + per-worker DB/cache test setup\",\n group: \"Tooling\",\n },\n];\n\nexport type AiProviderOption = {\n /** Must match a provider key in core's `add` feature map. */\n key: string;\n label: string;\n hint: string;\n};\n\n/**\n * AI providers offered in the dedicated AI step. Selecting any of these pulls\n * the core `@warlock.js/ai` package automatically via the provider's `requires`\n * in core's feature map — the scaffolder never lists `ai` as a standalone pick.\n */\nexport const aiProviders: AiProviderOption[] = [\n { key: \"openai\", label: \"OpenAI\", hint: \"GPT models via the OpenAI API\" },\n { key: \"google\", label: \"Google (Gemini)\", hint: \"Gemini models via Google AI\" },\n { key: \"anthropic\", label: \"Anthropic (Claude)\", hint: \"Claude models via the Anthropic API\" },\n { key: \"bedrock\", label: \"AWS Bedrock\", hint: \"Foundation models via Amazon Bedrock\" },\n { key: \"ollama\", label: \"Ollama\", hint: \"Local models via Ollama\" },\n];\n\n/**\n * Feature options for the multiselect prompt, ordered by group with the group\n * surfaced in the hint (keeps a flat list scannable without group widgets).\n */\nexport function getFeatureOptions() {\n return features.map(feature => ({\n value: feature.key,\n label: feature.label,\n hint: `${feature.group} — ${feature.hint}`,\n }));\n}\n\n/**\n * Keys pre-checked in the feature multiselect.\n */\nexport function getDefaultFeatureKeys(): string[] {\n return features.filter(feature => feature.defaultSelected).map(feature => feature.key);\n}\n\n/**\n * AI provider options for the dedicated AI multiselect step.\n */\nexport function getAiProviderOptions() {\n return aiProviders.map(provider => ({\n value: provider.key,\n label: provider.label,\n hint: provider.hint,\n }));\n}\n\n/**\n * Every selectable key the scaffolder knows about (features + AI providers).\n * Used to validate `--features` / `--ai` flags in non-interactive mode.\n */\nexport function getAllFeatureKeys(): string[] {\n return [...features.map(feature => feature.key), ...aiProviders.map(provider => provider.key)];\n}\n","import {\r\n copyDirectory,\r\n copyFile,\r\n fileExists,\r\n getFile,\r\n getJsonFile,\r\n putFile,\r\n putJsonFile,\r\n renameFile,\r\n} from \"@warlock.js/fs\";\r\nimport path from \"path\";\r\nimport { AppOptions, Application } from \"../commands/create-new-app/types\";\r\nimport { getDatabaseDriver } from \"../features/database-drivers\";\r\nimport { executeCommand, runCommand } from \"./exec\";\r\nimport { getPackageManager } from \"./package-manager\";\r\nimport { Template, template } from \"./paths\";\r\n\r\nexport class App {\r\n /**\r\n * Resolved files\r\n */\r\n protected files: Record<string, FileManager> = {};\r\n\r\n /**\r\n * Resolved JSON files\r\n */\r\n protected jsonFiles: Record<string, JsonFileManager> = {};\r\n\r\n public isInstalled = false;\r\n\r\n public constructor(protected app: Application) {}\r\n\r\n public get options(): AppOptions {\r\n return this.app.options;\r\n }\r\n\r\n public use(templateName: Template) {\r\n copyDirectory(template(templateName), this.path);\r\n\r\n if (fileExists(this.path + \"/.env.example\")) {\r\n copyFile(this.path + \"/.env.example\", this.path + \"/.env\");\r\n }\r\n\r\n renameFile(this.path + \"/_.gitignore\", this.path + \"/.gitignore\");\r\n\r\n return this;\r\n }\r\n\r\n public init() {\r\n return this;\r\n }\r\n\r\n public terminate() {\r\n // No longer using outro, using showSuccessScreen instead\r\n }\r\n\r\n public install() {\r\n return runCommand(getPackageManager(), [\"install\"], this.path);\r\n }\r\n\r\n public async exec(command: string) {\r\n const [commandName, ...optionsList] = command.split(\" \");\r\n return await executeCommand(commandName, optionsList, this.path);\r\n }\r\n\r\n public async git() {\r\n const { initializeGitRepository } = await import(\r\n \"./project-builder-helpers\"\r\n );\r\n return await initializeGitRepository(this.path);\r\n }\r\n\r\n public updatePackageJson() {\r\n this.package\r\n .replace(\"name\", this.name.replaceAll(\"/\", \"-\"))\r\n .replaceAll(\"yarn\", getPackageManager())\r\n .save();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Wire DB_DRIVER and DB_PORT into .env.\r\n *\r\n * The driver's npm package is installed via `warlock add` (single source for\r\n * versions), so this only touches environment configuration — not deps.\r\n */\r\n public configureDatabaseEnv(driverValue: string) {\r\n const driver = getDatabaseDriver(driverValue);\r\n\r\n if (!driver) return this;\r\n\r\n let envContent = getFile(this.path + \"/.env\") as string;\r\n\r\n envContent = envContent.replace(/DB_PORT=\\d+/, `DB_PORT=${driver.defaultPort}`);\r\n\r\n if (envContent.includes(\"DB_DRIVER=\")) {\r\n envContent = envContent.replace(/DB_DRIVER=\\w*/, `DB_DRIVER=${driver.value}`);\r\n } else {\r\n envContent = envContent.replace(\r\n /DB_PORT=\\d+/,\r\n `DB_PORT=${driver.defaultPort}\\nDB_DRIVER=${driver.value}`,\r\n );\r\n }\r\n\r\n putFile(this.path + \"/.env\", envContent);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Install the selected optional features by delegating to the project's own\r\n * `warlock add`. `--no-install` records every dependency in package.json and\r\n * ejects configs / scripts / setup hooks WITHOUT installing — the caller runs\r\n * one batched install afterwards. Versions come from core's feature map, so\r\n * the scaffolder never duplicates them.\r\n *\r\n * `--no-install` is passed LAST on purpose: the CLI parser treats the\r\n * positional after a bare flag as that flag's value, so it must follow the\r\n * feature list, not precede it.\r\n */\r\n public async installFeatures(features: string[]) {\r\n if (features.length === 0) return true;\r\n\r\n return this.exec(`npx warlock add ${features.join(\" \")} --no-install`);\r\n }\r\n\r\n /**\r\n * Get package json file\r\n */\r\n public get package() {\r\n return this.json(\"package.json\");\r\n }\r\n\r\n public updateDotEnv() {\r\n this.file(\".env\").replaceAll(\"appName\", this.name).save();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get env file to update\r\n */\r\n public get env() {\r\n return this.file(\".env\");\r\n }\r\n\r\n public get name() {\r\n return this.app.appName;\r\n }\r\n\r\n public get path() {\r\n return this.app.appPath;\r\n }\r\n\r\n public file(relativePath: string) {\r\n const fullPath = path.resolve(this.path, relativePath);\r\n\r\n if (!this.files[fullPath]) {\r\n this.files[fullPath] = file(fullPath);\r\n }\r\n\r\n return this.files[fullPath];\r\n }\r\n\r\n public json(relativePath: string): JsonFileManager {\r\n const fullPath = path.resolve(this.path, relativePath);\r\n\r\n if (!this.jsonFiles[fullPath]) {\r\n this.jsonFiles[fullPath] = jsonFile(fullPath);\r\n }\r\n\r\n return this.jsonFiles[fullPath];\r\n }\r\n}\r\n\r\nexport function app(app: Application) {\r\n return new App(app);\r\n}\r\n\r\nexport class FileManager {\r\n public content!: string;\r\n public constructor(protected filePath: string) {\r\n this.parseContent();\r\n }\r\n\r\n protected parseContent() {\r\n this.content = getFile(this.filePath) as string;\r\n }\r\n\r\n public replace(search: string, replace: string) {\r\n this.content = this.content.replace(search, replace);\r\n\r\n return this;\r\n }\r\n\r\n public replaceAll(search: string, replace: string) {\r\n this.content = this.content.replaceAll(search, replace);\r\n\r\n return this;\r\n }\r\n\r\n public save() {\r\n putFile(this.filePath, this.content);\r\n }\r\n}\r\n\r\nexport class JsonFileManager extends FileManager {\r\n protected parseContent() {\r\n this.content = getJsonFile(this.filePath);\r\n }\r\n\r\n public save() {\r\n putJsonFile(this.filePath, this.content);\r\n }\r\n\r\n public has(key: string) {\r\n return this.content[key] !== undefined;\r\n }\r\n\r\n public replace(key: string, value: any) {\r\n this.content[key] = value;\r\n\r\n return this;\r\n }\r\n\r\n public replaceAll(key: string, value: any) {\r\n const contentAsString = JSON.stringify(this.content);\r\n\r\n this.content = JSON.parse(contentAsString.replaceAll(key, value));\r\n\r\n return this;\r\n }\r\n}\r\n\r\nexport function file(path: string) {\r\n return new FileManager(path);\r\n}\r\n\r\nexport function jsonFile(path: string) {\r\n return new JsonFileManager(path);\r\n}\r\n","import { colors } from \"@mongez/copper\";\n\nexport const warlockTextAnsi = `\n\\x1b[49m\n\\x1b[49m \\x1b[38;2;252;238;36m██╗ ██╗ █████╗ ██████╗ ██╗ ██████╗ ██████╗██╗ ██╗ \\x1b[38;2;252;238;36m ██╗ ███████╗\\x1b[m\n\\x1b[49m \\x1b[38;2;250;235;34m██║ ██║██╔══██╗██╔══██╗██║ ██╔═══██╗██╔════╝██║ ██╔╝ \\x1b[38;2;250;235;34m ██║ ██╔════╝\\x1b[m\n\\x1b[49m \\x1b[38;2;248;233;32m██║ █╗ ██║███████║██████╔╝██║ ██║ ██║██║ █████╔╝ \\x1b[38;2;248;233;32m ██║ ███████╗\\x1b[m\n\\x1b[49m \\x1b[38;2;246;231;30m██║███╗██║██╔══██║██╔══██╗██║ ██║ ██║██║ ██╔═██╗ \\x1b[38;2;246;231;30m██ ██║ ╚════██║\\x1b[m\n\\x1b[49m \\x1b[38;2;244;229;28m╚███╔███╔╝██║ ██║██║ ██║███████╗╚██████╔╝╚██████╗██║ ██╗ \\x1b[38;2;244;229;28m╚█████╔╝ ███████║\\x1b[m\n\\x1b[49m \\x1b[38;2;242;227;26m ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ \\x1b[38;2;242;227;26m ╚════╝ ╚══════╝\\x1b[m\n\\x1b[49m\n`;\n\nexport const warlockLogoAnsi = `\\x1b[49m \\x1b[38;2;247;232;77;49m▄\\x1b[38;2;235;228;105;49m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;247;241;62;49m▄\\x1b[38;2;251;243;29;48;2;245;240;69m▄\\x1b[38;2;224;224;112;48;2;246;238;52m▄\\x1b[49m \\x1b[38;2;246;240;65;49m▄\\x1b[38;2;252;238;32;48;2;250;237;68m▄\\x1b[38;2;246;236;76;48;2;246;237;52m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;245;234;80;49m▄\\x1b[38;2;246;238;58;49m▄\\x1b[49m \\x1b[49;38;2;240;232;72m▀\\x1b[49;38;2;237;237;100m▀\\x1b[49m \\x1b[38;2;236;236;132;49m▄\\x1b[38;2;253;244;30;48;2;255;235;78m▄\\x1b[38;2;254;233;21;48;2;247;240;49m▄\\x1b[38;2;249;206;52;48;2;253;234;25m▄\\x1b[49;38;2;246;212;65m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;246;233;50;49m▄\\x1b[38;2;250;235;26;48;2;237;228;118m▄\\x1b[38;2;251;232;21;48;2;249;237;38m▄\\x1b[38;2;249;231;20;48;2;251;234;21m▄\\x1b[38;2;248;230;21;48;2;252;232;20m▄\\x1b[38;2;248;230;21;48;2;248;233;25m▄\\x1b[38;2;248;231;22;48;2;245;236;68m▄\\x1b[38;2;247;233;32;49m▄\\x1b[38;2;242;226;87;49m▄\\x1b[49m \\x1b[38;2;227;227;99;49m▄\\x1b[38;2;250;235;43;49m▄\\x1b[38;2;253;235;28;48;2;244;233;69m▄\\x1b[38;2;254;226;25;48;2;252;237;25m▄\\x1b[38;2;253;199;25;48;2;253;229;24m▄\\x1b[38;2;247;205;73;48;2;253;201;27m▄\\x1b[49;38;2;235;206;88m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;239;226;86;49m▄\\x1b[38;2;250;235;34;49m▄\\x1b[38;2;252;234;19;48;2;243;231;71m▄\\x1b[38;2;251;233;19;48;2;251;234;28m▄\\x1b[38;2;250;233;19;48;2;251;233;20m▄\\x1b[38;2;251;233;20;48;2;250;232;20m▄\\x1b[38;2;253;235;25;48;2;251;231;20m▄\\x1b[38;2;245;232;53;48;2;251;232;20m▄\\x1b[38;2;245;228;57;48;2;250;232;22m▄\\x1b[38;2;247;229;39;48;2;248;231;22m▄\\x1b[38;2;247;232;22;48;2;248;229;21m▄\\x1b[38;2;247;231;21;48;2;248;229;20m▄\\x1b[38;2;247;230;20;48;2;247;230;22m▄\\x1b[38;2;248;230;20;48;2;246;234;38m▄\\x1b[38;2;250;232;28;48;2;239;230;123m▄\\x1b[38;2;250;231;49;49m▄\\x1b[38;2;235;216;78;49m▄\\x1b[49m \\x1b[38;2;246;235;53;49m▄\\x1b[38;2;251;236;23;48;2;244;232;75m▄\\x1b[38;2;252;233;21;48;2;252;236;27m▄\\x1b[38;2;253;227;26;48;2;253;233;23m▄\\x1b[38;2;253;201;29;48;2;253;228;30m▄\\x1b[38;2;253;199;27;48;2;253;201;26m▄\\x1b[38;2;232;197;104;48;2;249;201;47m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;247;232;50;49m▄\\x1b[38;2;250;233;28;48;2;245;226;98m▄\\x1b[38;2;252;232;20;48;2;249;234;40m▄\\x1b[38;2;251;231;20;48;2;253;236;23m▄\\x1b[38;2;251;232;20;48;2;252;233;19m▄\\x1b[38;2;252;234;22;48;2;250;233;19m▄\\x1b[38;2;250;235;38;48;2;251;233;20m▄\\x1b[38;2;241;231;68;48;2;252;235;24m▄\\x1b[49;38;2;249;234;47m▀\\x1b[49;38;2;242;229;78m▀\\x1b[49m \\x1b[49;38;2;247;229;54m▀\\x1b[38;2;241;227;99;48;2;247;231;33m▄\\x1b[38;2;248;233;50;48;2;247;232;22m▄\\x1b[38;2;250;229;28;48;2;249;230;22m▄\\x1b[38;2;254;226;26;48;2;253;224;23m▄\\x1b[38;2;235;221;94;48;2;249;221;35m▄\\x1b[49m \\x1b[38;2;243;237;61;49m▄\\x1b[38;2;251;237;28;48;2;243;236;87m▄\\x1b[38;2;251;234;20;48;2;250;236;36m▄\\x1b[38;2;252;232;21;48;2;252;234;21m▄\\x1b[38;2;251;225;23;48;2;251;232;21m▄\\x1b[38;2;250;198;26;48;2;251;225;24m▄\\x1b[38;2;253;197;26;48;2;251;199;27m▄\\x1b[38;2;252;200;38;48;2;255;199;28m▄\\x1b[49;38;2;245;202;65m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;244;235;52;48;2;219;219;128m▄\\x1b[38;2;247;234;53;49m▄\\x1b[38;2;235;216;118;49m▄\\x1b[49m \\x1b[38;2;246;236;50;49m▄\\x1b[38;2;253;238;21;48;2;249;234;58m▄\\x1b[38;2;251;234;20;48;2;250;236;33m▄\\x1b[38;2;251;233;19;48;2;252;234;21m▄\\x1b[38;2;252;233;21;48;2;251;232;19m▄\\x1b[38;2;252;233;26;48;2;251;231;20m▄\\x1b[38;2;249;233;43;48;2;253;233;21m▄\\x1b[49;38;2;252;236;30m▀\\x1b[49;38;2;246;236;57m▀\\x1b[49m \\x1b[38;2;242;235;87;49m▄\\x1b[49m \\x1b[49;38;2;246;229;106m▀\\x1b[49;38;2;247;227;62m▀\\x1b[49m \\x1b[49;38;2;248;237;47m▀\\x1b[38;2;245;232;62;48;2;247;234;35m▄\\x1b[38;2;253;231;26;48;2;252;234;23m▄\\x1b[38;2;253;204;27;48;2;253;226;23m▄\\x1b[38;2;252;199;34;48;2;252;200;26m▄\\x1b[38;2;247;203;52;48;2;253;197;26m▄\\x1b[49;38;2;251;199;35m▀\\x1b[49;38;2;241;207;96m▀\\x1b[49m \\x1b[38;2;246;238;65;49m▄\\x1b[38;2;250;226;39;49m▄\\x1b[38;2;238;221;59;49m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;242;235;52;48;2;248;235;48m▄\\x1b[38;2;251;234;24;48;2;251;234;23m▄\\x1b[38;2;251;232;21;48;2;250;237;38m▄\\x1b[38;2;248;233;20;48;2;244;236;69m▄\\x1b[38;2;246;236;44;49m▄\\x1b[38;2;243;238;64;49m▄\\x1b[49m \\x1b[49;38;2;235;228;87m▀\\x1b[49;38;2;247;231;40m▀\\x1b[38;2;242;230;96;48;2;248;234;24m▄\\x1b[38;2;239;226;78;48;2;252;235;23m▄\\x1b[49;38;2;250;234;35m▀\\x1b[49;38;2;239;233;98m▀\\x1b[49m \\x1b[38;2;252;242;36;48;2;246;243;65m▄\\x1b[38;2;252;240;31;48;2;251;245;46m▄\\x1b[38;2;248;241;106;49m▄\\x1b[49m \\x1b[38;2;241;241;85;49m▄\\x1b[38;2;250;238;34;48;2;244;234;69m▄\\x1b[38;2;246;216;49;48;2;253;234;31m▄\\x1b[38;2;228;215;121;48;2;252;210;33m▄\\x1b[49;38;2;248;205;53m▀\\x1b[49m \\x1b[38;2;238;238;85;49m▄\\x1b[38;2;243;233;63;49m▄\\x1b[38;2;251;237;23;48;2;246;237;79m▄\\x1b[38;2;253;234;22;48;2;247;234;52m▄\\x1b[38;2;253;214;24;48;2;254;233;26m▄\\x1b[38;2;249;210;44;48;2;252;212;31m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;228;228;67m▀\\x1b[38;2;250;235;32;48;2;252;237;25m▄\\x1b[38;2;252;223;25;48;2;250;227;23m▄\\x1b[38;2;250;213;27;48;2;248;230;19m▄\\x1b[38;2;247;224;25;48;2;247;230;19m▄\\x1b[38;2;247;229;19;48;2;246;233;20m▄\\x1b[38;2;248;231;22;48;2;243;234;51m▄\\x1b[38;2;247;233;22;48;2;236;227;76m▄\\x1b[38;2;243;233;67;49m▄\\x1b[49m \\x1b[38;2;250;238;38;48;2;240;235;82m▄\\x1b[38;2;251;235;20;48;2;253;240;20m▄\\x1b[38;2;252;232;22;48;2;253;235;23m▄\\x1b[38;2;252;237;34;48;2;250;242;52m▄\\x1b[49m \\x1b[49;38;2;242;234;57m▀\\x1b[49;38;2;233;233;78m▀\\x1b[49m \\x1b[38;2;244;233;98;49m▄\\x1b[38;2;251;236;35;49m▄\\x1b[38;2;252;236;22;48;2;243;232;72m▄\\x1b[38;2;252;235;25;48;2;252;239;28m▄\\x1b[38;2;251;233;21;48;2;250;234;20m▄\\x1b[38;2;252;220;25;48;2;251;234;21m▄\\x1b[38;2;251;203;25;48;2;253;229;23m▄\\x1b[38;2;253;205;26;48;2;253;206;25m▄\\x1b[38;2;248;209;53;48;2;250;211;51m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;242;230;81m▀\\x1b[49;38;2;249;218;33m▀\\x1b[38;2;242;212;73;48;2;250;214;26m▄\\x1b[38;2;248;210;32;48;2;251;212;26m▄\\x1b[38;2;248;213;26;48;2;249;210;26m▄\\x1b[38;2;251;214;26;48;2;248;228;27m▄\\x1b[38;2;250;214;27;48;2;250;231;20m▄\\x1b[38;2;248;226;24;48;2;248;232;19m▄\\x1b[38;2;247;231;19;48;2;245;234;26m▄\\x1b[38;2;247;232;20;48;2;240;230;78m▄\\x1b[38;2;245;236;35;49m▄\\x1b[38;2;241;234;86;49m▄\\x1b[49m \\x1b[38;2;250;237;45;49m▄\\x1b[38;2;251;234;20;48;2;251;237;25m▄\\x1b[38;2;248;231;21;48;2;249;233;22m▄\\x1b[38;2;247;230;20;48;2;248;231;21m▄\\x1b[38;2;249;230;21;48;2;252;233;22m▄\\x1b[38;2;252;238;35;48;2;249;239;60m▄\\x1b[49m \\x1b[38;2;223;207;143;49m▄\\x1b[38;2;248;232;43;49m▄\\x1b[38;2;250;233;21;48;2;237;219;109m▄\\x1b[38;2;251;232;20;48;2;249;232;44m▄\\x1b[38;2;252;232;21;48;2;251;233;22m▄\\x1b[38;2;252;230;21;48;2;252;233;20m▄\\x1b[38;2;253;215;26;48;2;253;233;20m▄\\x1b[38;2;253;200;29;48;2;253;228;27m▄\\x1b[38;2;254;203;28;48;2;252;203;26m▄\\x1b[38;2;249;207;48;48;2;252;203;26m▄\\x1b[38;2;242;215;74;48;2;253;204;27m▄\\x1b[49;38;2;249;209;50m▀\\x1b[49;38;2;241;213;99m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;243;213;61m▀\\x1b[38;2;231;219;85;48;2;248;216;32m▄\\x1b[38;2;245;214;58;48;2;250;215;26m▄\\x1b[38;2;248;214;32;48;2;252;212;27m▄\\x1b[38;2;250;215;26;48;2;249;217;27m▄\\x1b[38;2;250;215;27;48;2;247;227;23m▄\\x1b[38;2;247;220;28;48;2;246;231;20m▄\\x1b[38;2;246;230;21;48;2;246;234;23m▄\\x1b[38;2;251;235;24;48;2;247;237;45m▄\\x1b[38;2;242;237;101;49m▄\\x1b[49m \\x1b[38;2;248;239;63;49m▄\\x1b[38;2;252;235;20;48;2;252;237;26m▄\\x1b[48;2;249;232;20m \\x1b[38;2;250;231;22;48;2;247;230;20m▄\\x1b[38;2;248;232;34;48;2;247;230;21m▄\\x1b[38;2;248;232;22;48;2;248;231;21m▄\\x1b[38;2;249;233;21;48;2;253;235;25m▄\\x1b[38;2;251;240;38;48;2;246;241;79m▄\\x1b[49m \\x1b[38;2;252;237;26;48;2;244;236;59m▄\\x1b[38;2;252;233;20;48;2;250;233;23m▄\\x1b[48;2;251;232;20m \\x1b[38;2;252;230;22;48;2;251;231;20m▄\\x1b[38;2;253;214;24;48;2;251;231;20m▄\\x1b[38;2;253;200;28;48;2;252;225;22m▄\\x1b[38;2;250;203;41;48;2;252;203;26m▄\\x1b[38;2;248;205;64;48;2;253;198;28m▄\\x1b[49;38;2;249;202;46m▀\\x1b[49;38;2;246;207;62m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;245;216;88m▀\\x1b[49;38;2;246;216;52m▀\\x1b[38;2;242;216;78;48;2;248;216;31m▄\\x1b[38;2;249;217;38;48;2;250;215;27m▄\\x1b[38;2;250;222;30;48;2;247;227;26m▄\\x1b[48;2;248;232;23m \\x1b[38;2;252;237;28;48;2;251;241;41m▄\\x1b[38;2;238;238;119;49m▄\\x1b[49m \\x1b[38;2;243;235;85;49m▄\\x1b[38;2;252;238;21;48;2;252;240;29m▄\\x1b[38;2;252;234;23;48;2;251;234;22m▄\\x1b[38;2;254;234;22;48;2;252;233;22m▄\\x1b[38;2;248;227;59;48;2;251;232;38m▄\\x1b[38;2;244;234;96;48;2;248;235;51m▄\\x1b[38;2;251;238;32;48;2;249;235;24m▄\\x1b[38;2;250;236;23;48;2;249;234;21m▄\\x1b[38;2;252;234;22;48;2;253;236;25m▄\\x1b[38;2;251;244;44;48;2;246;246;103m▄\\x1b[49m \\x1b[38;2;251;240;33;48;2;238;232;81m▄\\x1b[38;2;249;233;21;48;2;251;236;19m▄\\x1b[38;2;253;227;24;48;2;252;231;21m▄\\x1b[38;2;254;204;26;48;2;252;224;23m▄\\x1b[38;2;248;206;55;48;2;253;206;27m▄\\x1b[49;38;2;250;204;40m▀\\x1b[49;38;2;246;207;60m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;246;215;54;48;2;242;211;53m▄\\x1b[38;2;253;217;20;48;2;248;216;35m▄\\x1b[38;2;250;221;23;48;2;246;219;57m▄\\x1b[38;2;245;232;39;49m▄\\x1b[38;2;245;234;65;49m▄\\x1b[49m \\x1b[38;2;243;219;121;48;2;250;221;50m▄\\x1b[38;2;252;221;33;48;2;251;222;30m▄\\x1b[38;2;250;228;31;48;2;248;231;26m▄\\x1b[38;2;249;232;23;48;2;251;234;23m▄\\x1b[38;2;253;238;29;48;2;249;242;63m▄\\x1b[49m \\x1b[38;2;235;235;112;49m▄\\x1b[38;2;251;236;21;48;2;251;240;34m▄\\x1b[38;2;250;232;23;48;2;251;234;21m▄\\x1b[38;2;253;230;24;48;2;252;233;23m▄\\x1b[38;2;250;222;52;48;2;251;227;36m▄\\x1b[49m \\x1b[38;2;248;241;69;48;2;248;238;48m▄\\x1b[38;2;251;239;28;48;2;250;238;25m▄\\x1b[38;2;250;236;24;48;2;251;235;23m▄\\x1b[38;2;252;234;23;48;2;252;238;26m▄\\x1b[38;2;248;240;59;48;2;239;239;128m▄\\x1b[49m \\x1b[38;2;247;239;52;48;2;244;233;100m▄\\x1b[38;2;249;234;20;48;2;252;238;23m▄\\x1b[38;2;252;231;22;48;2;250;232;22m▄\\x1b[38;2;253;207;25;48;2;253;216;26m▄\\x1b[38;2;250;208;54;48;2;252;207;37m▄\\x1b[49m \\x1b[38;2;241;227;71;49m▄\\x1b[38;2;247;213;44;49m▄\\x1b[38;2;253;208;29;48;2;237;211;88m▄\\x1b[38;2;254;205;28;48;2;248;213;47m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;245;230;60;48;2;242;224;49m▄\\x1b[38;2;249;236;23;48;2;249;233;21m▄\\x1b[38;2;252;235;26;48;2;250;231;20m▄\\x1b[38;2;249;234;30;48;2;249;233;21m▄\\x1b[38;2;254;236;27;48;2;252;236;25m▄\\x1b[38;2;249;238;49;48;2;247;241;52m▄\\x1b[49m \\x1b[38;2;245;216;64;48;2;250;222;59m▄\\x1b[38;2;252;220;31;48;2;252;223;33m▄\\x1b[38;2;249;229;27;48;2;248;231;24m▄\\x1b[38;2;248;230;21;48;2;251;233;22m▄\\x1b[38;2;248;235;29;48;2;242;235;85m▄\\x1b[38;2;251;235;24;48;2;250;242;49m▄\\x1b[38;2;250;231;23;48;2;250;233;22m▄\\x1b[38;2;253;225;23;48;2;252;230;24m▄\\x1b[38;2;250;215;49;48;2;253;222;28m▄\\x1b[49;38;2;244;222;89m▀\\x1b[49m \\x1b[38;2;247;234;63;48;2;248;238;46m▄\\x1b[38;2;251;238;25;48;2;250;237;25m▄\\x1b[38;2;250;233;22;48;2;250;234;21m▄\\x1b[38;2;251;233;21;48;2;252;237;26m▄\\x1b[38;2;244;232;62;49m▄\\x1b[38;2;249;232;21;48;2;252;239;24m▄\\x1b[38;2;250;231;22;48;2;249;231;22m▄\\x1b[38;2;252;212;25;48;2;252;225;23m▄\\x1b[38;2;251;209;55;48;2;253;204;27m▄\\x1b[49;38;2;239;206;99m▀\\x1b[49m \\x1b[38;2;250;237;49;48;2;250;242;50m▄\\x1b[38;2;251;234;22;48;2;252;231;25m▄\\x1b[38;2;253;227;27;48;2;253;212;26m▄\\x1b[38;2;254;206;26;48;2;254;204;25m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;253;239;29;48;2;238;230;84m▄\\x1b[38;2;254;234;24;48;2;253;238;23m▄\\x1b[38;2;253;209;29;48;2;254;233;26m▄\\x1b[38;2;244;216;71;48;2;241;220;99m▄\\x1b[49m \\x1b[38;2;247;217;53;48;2;250;218;44m▄\\x1b[38;2;251;217;31;48;2;250;222;31m▄\\x1b[38;2;247;228;24;48;2;245;229;20m▄\\x1b[48;2;245;229;19m \\x1b[38;2;246;229;19;48;2;247;229;20m▄\\x1b[38;2;253;224;24;48;2;251;229;23m▄\\x1b[38;2;249;211;52;48;2;253;213;27m▄\\x1b[49;38;2;244;210;68m▀\\x1b[49m \\x1b[38;2;249;234;57;48;2;249;237;39m▄\\x1b[38;2;250;235;23;48;2;250;234;24m▄\\x1b[38;2;247;231;19;48;2;247;230;19m▄\\x1b[38;2;244;229;16;48;2;247;230;18m▄\\x1b[38;2;246;229;18;48;2;246;230;19m▄\\x1b[38;2;253;223;23;48;2;252;228;21m▄\\x1b[38;2;253;206;37;48;2;253;208;26m▄\\x1b[49;38;2;251;211;57m▀\\x1b[49m \\x1b[38;2;250;239;47;48;2;250;239;50m▄\\x1b[38;2;250;236;23;48;2;249;235;22m▄\\x1b[38;2;254;231;28;48;2;254;229;26m▄\\x1b[38;2;255;209;26;48;2;254;209;27m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;245;239;70;49m▄\\x1b[38;2;253;241;21;48;2;250;243;39m▄\\x1b[38;2;251;208;32;48;2;254;237;23m▄\\x1b[38;2;248;210;82;48;2;252;208;31m▄\\x1b[49;38;2;245;213;78m▀\\x1b[49m \\x1b[38;2;246;218;70;48;2;252;217;33m▄\\x1b[38;2;250;220;29;48;2;248;225;27m▄\\x1b[38;2;248;229;24;48;2;245;229;20m▄\\x1b[38;2;253;223;23;48;2;251;228;21m▄\\x1b[38;2;252;209;33;48;2;253;211;26m▄\\x1b[49;38;2;242;208;64m▀\\x1b[49m \\x1b[49;38;2;237;237;91m▀\\x1b[38;2;246;235;64;48;2;251;237;29m▄\\x1b[38;2;248;237;24;48;2;248;233;23m▄\\x1b[38;2;247;233;21;48;2;245;231;18m▄\\x1b[38;2;253;230;23;48;2;249;230;19m▄\\x1b[38;2;253;206;30;48;2;253;209;24m▄\\x1b[38;2;239;223;96;48;2;249;207;58m▄\\x1b[49m \\x1b[38;2;247;239;50;48;2;247;239;47m▄\\x1b[38;2;249;236;23;48;2;250;236;23m▄\\x1b[48;2;254;230;27m \\x1b[38;2;254;209;27;48;2;254;209;26m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;235;235;78;49m▄\\x1b[38;2;253;240;32;48;2;234;234;90m▄\\x1b[38;2;249;224;34;48;2;253;242;25m▄\\x1b[38;2;245;214;92;48;2;251;215;32m▄\\x1b[49;38;2;240;209;85m▀\\x1b[49m \\x1b[38;2;245;235;64;49m▄\\x1b[38;2;253;239;32;48;2;239;231;112m▄\\x1b[38;2;246;239;82;49m▄\\x1b[49m \\x1b[49;38;2;246;219;73m▀\\x1b[38;2;249;221;48;48;2;252;220;29m▄\\x1b[38;2;254;222;27;48;2;253;228;27m▄\\x1b[38;2;253;208;28;48;2;254;210;24m▄\\x1b[38;2;237;219;73;48;2;244;208;63m▄\\x1b[49m \\x1b[38;2;249;236;42;49m▄\\x1b[38;2;250;234;23;49m▄\\x1b[38;2;249;231;24;49m▄\\x1b[38;2;248;228;34;49m▄\\x1b[38;2;243;226;99;49m▄\\x1b[49m \\x1b[49;38;2;242;242;67m▀\\x1b[38;2;248;238;57;48;2;252;238;26m▄\\x1b[38;2;253;236;26;48;2;251;235;23m▄\\x1b[38;2;253;213;26;48;2;253;227;24m▄\\x1b[38;2;247;209;62;48;2;247;209;61m▄\\x1b[49m \\x1b[38;2;247;239;49;48;2;247;239;47m▄\\x1b[38;2;250;234;23;48;2;250;235;22m▄\\x1b[38;2;254;228;28;48;2;254;230;28m▄\\x1b[38;2;254;207;26;48;2;254;208;26m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;246;237;59;49m▄\\x1b[38;2;249;236;35;48;2;249;240;43m▄\\x1b[49;38;2;249;233;39m▀\\x1b[49;38;2;237;219;109m▀\\x1b[49m \\x1b[38;2;239;234;80;49m▄\\x1b[38;2;251;241;38;49m▄\\x1b[38;2;252;239;32;48;2;252;242;48m▄\\x1b[38;2;249;237;37;48;2;253;239;24m▄\\x1b[38;2;245;233;57;48;2;254;236;21m▄\\x1b[38;2;237;237;128;48;2;251;239;47m▄\\x1b[49m \\x1b[49;38;2;244;221;68m▀\\x1b[38;2;252;216;33;48;2;254;216;24m▄\\x1b[38;2;244;211;78;48;2;245;211;57m▄\\x1b[49m \\x1b[38;2;250;238;31;48;2;250;239;49m▄\\x1b[38;2;249;233;20;48;2;251;235;20m▄\\x1b[38;2;246;232;19;48;2;249;232;19m▄\\x1b[38;2;246;231;19;48;2;248;231;19m▄\\x1b[38;2;251;232;21;48;2;251;230;20m▄\\x1b[38;2;253;217;25;48;2;250;222;34m▄\\x1b[38;2;243;225;103;49m▄\\x1b[49m \\x1b[49;38;2;238;230;85m▀\\x1b[38;2;251;237;40;48;2;253;238;27m▄\\x1b[38;2;237;219;83;48;2;250;212;43m▄\\x1b[49m \\x1b[38;2;248;238;53;49m▄\\x1b[38;2;252;234;34;48;2;250;237;49m▄\\x1b[38;2;253;220;26;48;2;252;233;23m▄\\x1b[38;2;252;202;28;48;2;253;225;29m▄\\x1b[38;2;254;204;26;48;2;254;205;26m▄\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[38;2;240;229;56;48;2;247;232;62m▄\\x1b[49;38;2;249;238;37m▀\\x1b[49m \\x1b[49;38;2;231;231;110m▀\\x1b[49;38;2;244;241;45m▀\\x1b[49;38;2;239;239;63m▀\\x1b[49m \\x1b[49;38;2;241;217;88m▀\\x1b[49m \\x1b[38;2;249;236;52;48;2;249;237;33m▄\\x1b[38;2;250;237;24;48;2;248;234;22m▄\\x1b[38;2;250;234;21;48;2;246;233;19m▄\\x1b[38;2;251;230;21;48;2;247;233;19m▄\\x1b[38;2;253;210;26;48;2;252;230;22m▄\\x1b[38;2;251;207;36;48;2;253;209;27m▄\\x1b[49;38;2;243;219;95m▀\\x1b[49m \\x1b[49;38;2;241;223;96m▀\\x1b[49m \\x1b[38;2;242;233;67;49m▄\\x1b[38;2;249;236;41;49m▄\\x1b[38;2;253;237;23;48;2;245;232;63m▄\\x1b[38;2;253;226;24;48;2;251;238;38m▄\\x1b[38;2;251;201;26;48;2;252;234;23m▄\\x1b[38;2;251;198;26;48;2;251;210;25m▄\\x1b[38;2;253;202;29;48;2;251;199;25m▄\\x1b[38;2;251;203;42;48;2;253;201;28m▄\\x1b[38;2;229;211;123;48;2;253;203;32m▄\\x1b[49m \\x1b[m\n\\x1b[38;2;222;222;144;49m▄\\x1b[38;2;229;220;123;48;2;234;225;98m▄\\x1b[49;38;2;228;215;121m▀\\x1b[49m \\x1b[38;2;248;236;46;49m▄\\x1b[38;2;252;236;21;48;2;243;230;66m▄\\x1b[38;2;251;233;20;48;2;249;234;38m▄\\x1b[38;2;251;231;20;48;2;248;234;33m▄\\x1b[38;2;248;231;20;48;2;244;229;67m▄\\x1b[38;2;244;233;47;49m▄\\x1b[38;2;236;236;70;49m▄\\x1b[49m \\x1b[49;38;2;247;212;46m▀\\x1b[49;38;2;250;209;30m▀\\x1b[38;2;240;225;150;48;2;251;202;30m▄\\x1b[49;38;2;252;203;36m▀\\x1b[49;38;2;241;212;90m▀\\x1b[49m \\x1b[38;2;235;235;98;49m▄\\x1b[38;2;243;235;63;49m▄\\x1b[38;2;251;238;25;48;2;237;228;73m▄\\x1b[38;2;253;236;20;48;2;247;234;52m▄\\x1b[38;2;254;230;22;48;2;252;238;23m▄\\x1b[38;2;252;206;26;48;2;253;233;21m▄\\x1b[38;2;253;198;28;48;2;252;217;25m▄\\x1b[38;2;252;201;36;48;2;252;196;26m▄\\x1b[38;2;240;205;70;48;2;252;199;28m▄\\x1b[49;38;2;250;202;38m▀\\x1b[49;38;2;241;213;88m▀\\x1b[49m \\x1b[m\n\\x1b[49;38;2;207;207;191m▀\\x1b[49m \\x1b[38;2;236;232;82;49m▄\\x1b[38;2;248;239;48;49m▄\\x1b[49m \\x1b[49;38;2;244;231;69m▀\\x1b[49;38;2;249;233;29m▀\\x1b[38;2;244;228;69;48;2;248;234;23m▄\\x1b[38;2;249;233;28;48;2;247;231;21m▄\\x1b[38;2;247;232;25;48;2;247;230;20m▄\\x1b[38;2;248;231;23;48;2;248;231;19m▄\\x1b[38;2;249;232;23;48;2;247;233;20m▄\\x1b[38;2;249;233;24;48;2;246;237;59m▄\\x1b[38;2;248;237;29;48;2;242;242;77m▄\\x1b[38;2;244;240;76;49m▄\\x1b[49m \\x1b[38;2;241;234;99;49m▄\\x1b[38;2;250;238;41;49m▄\\x1b[38;2;253;237;26;48;2;242;232;79m▄\\x1b[38;2;253;236;25;48;2;252;240;27m▄\\x1b[38;2;254;233;24;48;2;254;236;20m▄\\x1b[38;2;251;210;29;48;2;253;235;21m▄\\x1b[38;2;251;197;28;48;2;253;225;23m▄\\x1b[38;2;246;202;53;48;2;254;200;27m▄\\x1b[49;38;2;253;199;32m▀\\x1b[49;38;2;245;207;64m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;231;219;97m▀\\x1b[49;38;2;243;229;58m▀\\x1b[49m \\x1b[49;38;2;237;237;91m▀\\x1b[49;38;2;246;231;56m▀\\x1b[38;2;246;238;68;48;2;246;233;22m▄\\x1b[38;2;245;230;48;48;2;246;233;21m▄\\x1b[38;2;247;235;23;48;2;247;232;19m▄\\x1b[38;2;246;233;21;48;2;247;232;18m▄\\x1b[38;2;247;232;20;48;2;248;232;18m▄\\x1b[38;2;247;231;19;48;2;246;234;29m▄\\x1b[38;2;247;232;20;48;2;240;230;80m▄\\x1b[38;2;246;233;34;49m▄\\x1b[38;2;245;231;52;49m▄\\x1b[38;2;250;233;23;48;2;225;225;105m▄\\x1b[38;2;252;233;19;48;2;248;234;46m▄\\x1b[38;2;253;233;20;48;2;253;235;21m▄\\x1b[38;2;254;232;21;48;2;253;234;20m▄\\x1b[38;2;252;217;24;48;2;254;234;20m▄\\x1b[38;2;253;202;35;48;2;254;230;23m▄\\x1b[38;2;246;211;84;48;2;253;201;28m▄\\x1b[49;38;2;250;203;46m▀\\x1b[49;38;2;247;206;82m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;247;226;63m▀\\x1b[49;38;2;247;232;36m▀\\x1b[38;2;245;229;57;48;2;246;232;22m▄\\x1b[38;2;247;230;31;48;2;248;232;21m▄\\x1b[38;2;247;232;21;48;2;247;231;19m▄\\x1b[38;2;247;233;19;48;2;246;231;18m▄\\x1b[38;2;247;232;17;48;2;246;231;17m▄\\x1b[38;2;251;232;19;48;2;249;232;17m▄\\x1b[38;2;253;221;24;48;2;252;232;20m▄\\x1b[38;2;249;207;48;48;2;253;229;22m▄\\x1b[38;2;248;209;72;48;2;253;207;28m▄\\x1b[49;38;2;245;202;59m▀\\x1b[49;38;2;237;200;109m▀\\x1b[49m \\x1b[m\n\\x1b[49m \\x1b[49;38;2;242;230;89m▀\\x1b[49;38;2;247;232;50m▀\\x1b[38;2;244;227;72;48;2;249;233;28m▄\\x1b[38;2;244;218;55;48;2;252;231;23m▄\\x1b[49;38;2;250;215;37m▀\\x1b[49;38;2;244;206;65m▀\\x1b[49m \\x1b[m\n`;\n\n/**\n * Get the intro banner with ASCII art\n */\nexport function getIntroBanner(version: string): string {\n const versionLine = `v${version}`;\n const totalWidth = 38; // Total width inside the box\n const padding = \" \".repeat(totalWidth - 3 - versionLine.length); // 3 is for leading spaces \" \"\n\n return `\n ${colors.magentaBright(\"╭──────────────────────────────────────╮\")}\n ${colors.magentaBright(\"│\")} ${colors.magentaBright(\"│\")}\n ${colors.magentaBright(\"│\")} 🧙 ${colors.bold(colors.yellowBright(\"WARLOCK.JS\"))} ${colors.magentaBright(\"│\")}\n ${colors.magentaBright(\"│\")} ${colors.cyan(\"The Magical Node.js Framework\")} ${colors.magentaBright(\"│\")}\n ${colors.magentaBright(\"│\")} ${colors.magentaBright(\"│\")}\n ${colors.magentaBright(\"│\")} ${colors.green(versionLine)}${padding}${colors.magentaBright(\"│\")}\n ${colors.magentaBright(\"│\")} ${colors.magentaBright(\"│\")}\n ${colors.magentaBright(\"╰──────────────────────────────────────╯\")}\n`;\n}\n\n/**\n * Display the intro banner\n */\nexport function showIntroBanner(version: string): void {\n console.log(warlockLogoAnsi);\n console.log(warlockTextAnsi);\n console.log(getIntroBanner(version));\n}\n\n/**\n * Get the success screen with project summary\n */\nexport function getSuccessScreen(options: {\n projectName: string;\n database: string;\n features: string[];\n packageManager: string;\n}): string {\n const { projectName, database, features, packageManager } = options;\n\n // Format features text\n let featuresText = features.join(\", \");\n if (features.length === 0) {\n featuresText = \"none\";\n }\n\n // Calculate dynamic width\n const baseLabelLength = 10; // \"Project: \".length\n const padding = 6; // 3 spaces left, 3 spaces right padding for text inside box\n\n const projectLineLen = projectName.length + baseLabelLength;\n const dbLineLen = database.length + baseLabelLength;\n const featuresLineLen = featuresText.length + baseLabelLength;\n\n // Find the longest line to determine box width\n // Ensure minimum width of 50 for aesthetics\n const maxContentLength = Math.max(\n projectLineLen,\n dbLineLen,\n featuresLineLen,\n 40,\n );\n const boxWidth = maxContentLength + padding + 2; // +2 for borders │\n\n // Helper to generate borders\n const createBorder = (start: string, end: string) =>\n colors.magentaBright(start + \"─\".repeat(boxWidth - 2) + end);\n\n // Helper to pad content lines\n const padLine = (label: string, value: string, isFeature = false) => {\n const valueColor = (text: string) => {\n if (isFeature && text === \"none\") return colors.dim(text);\n return colors.white(text);\n };\n\n const labelPart = colors.dim(label.padEnd(10)); // \"Project: \"\n const valuePart = valueColor(value);\n\n // Calculate visible length for padding\n const contentVisibleLength = 3 + 10 + value.length;\n const remaining = boxWidth - 2 - contentVisibleLength; // -2 for borders\n\n return (\n colors.magentaBright(\"│\") +\n \" \" +\n labelPart +\n valuePart +\n \" \".repeat(remaining) +\n colors.magentaBright(\"│\")\n );\n };\n\n const emptyLine =\n colors.magentaBright(\"│\") +\n \" \".repeat(boxWidth - 2) +\n colors.magentaBright(\"│\");\n\n const headerText = \"🎉 YOUR PROJECT IS READY! 🎉\";\n const headerPadding = Math.floor((boxWidth - 2 - headerText.length) / 2);\n const headerLine =\n colors.magentaBright(\"│\") +\n \" \".repeat(headerPadding) +\n colors.bold(colors.green(headerText)) +\n \" \".repeat(boxWidth - 2 - headerPadding - headerText.length) +\n colors.magentaBright(\"│\");\n\n const devCommand =\n packageManager === \"npm\" ? \"npm run dev\" : `${packageManager} dev`;\n\n return `\n ${createBorder(\"╭\", \"╮\")}\n ${emptyLine}\n ${headerLine}\n ${emptyLine}\n ${padLine(\"Project:\", projectName)}\n ${padLine(\"Database:\", database)}\n ${padLine(\"Features:\", featuresText, true)}\n ${emptyLine}\n ${createBorder(\"╰\", \"╯\")}\n\n ${colors.bold(colors.cyan(\"🚀 Next steps:\"))}\n\n ${colors.cyan(\"cd\")} ${projectName}\n ${colors.cyan(devCommand)}\n\n ${colors.dim(\"💡 Pro tip: Install the\")} ${colors.yellow(\"Generator Z\")} ${colors.dim(\"extension in VSCode\")}\n ${colors.dim(\"for helpful code snippets and productivity boosters!\")}\n\n ${colors.dim(\"📚 Docs:\")} ${colors.cyan(\"https://warlock.js.org\")}\n ${colors.dim(\"⭐ Star us:\")} ${colors.cyan(\"https://github.com/warlockjs/framework\")}\n`;\n}\n\n/**\n * Display the success screen\n */\nexport function showSuccessScreen(options: {\n projectName: string;\n database: string;\n features: string[];\n packageManager: string;\n}): void {\n console.log(getSuccessScreen(options));\n}\n","/**\n * Themed spinner messages for the wizard\n */\nexport const spinnerMessages = {\n installingDeps: \"📦 Summoning dependencies...\",\n depsInstalled: \"📦 Dependencies materialized! ✅\",\n\n initializingGit: \"📂 Initializing grimoire (git)...\",\n gitInitialized: \"📂 Grimoire initialized! ✅\",\n\n generatingJwt: \"🔐 Forging secret keys...\",\n jwtGenerated: \"🔐 Secret keys forged! ✅\",\n\n warmingCache: \"⚡ Charging magical circuits...\",\n cacheWarmed: \"⚡ Circuits charged! ✅\",\n\n addingFeatures: \"🪄 Weaving in your features...\",\n featuresAdded: \"🪄 Features woven in! ✅\",\n featuresFailed: \"⚠️ Some features could not be added — add them later with `warlock add`\",\n\n copyingTemplate: \"📋 Preparing your spellbook...\",\n templateCopied: \"📋 Spellbook ready! ✅\",\n} as const;\n","import { spinner } from \"@clack/prompts\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n getPackageManager,\r\n runPackageManagerCommand,\r\n} from \"../../helpers/package-manager\";\r\nimport { showSuccessScreen } from \"../../ui/banner\";\r\nimport { spinnerMessages } from \"../../ui/spinners\";\r\n\r\nexport async function createWarlockApp(application: App) {\r\n const options = application.options;\r\n const { useGit, useJWT, features, aiProviders, databaseDriver } = options;\r\n\r\n // Step 1: Initialize and copy template\r\n const templateSpinner = spinner();\r\n templateSpinner.start(spinnerMessages.copyingTemplate);\r\n\r\n application\r\n .init()\r\n .use(\"warlock\")\r\n .updatePackageJson()\r\n .updateDotEnv()\r\n .configureDatabaseEnv(databaseDriver);\r\n\r\n templateSpinner.stop(spinnerMessages.templateCopied);\r\n\r\n // Step 2: Install base dependencies (so the `warlock` binary is available)\r\n const installSpinner = spinner();\r\n installSpinner.start(spinnerMessages.installingDeps);\r\n\r\n await application.install().install;\r\n\r\n installSpinner.stop(spinnerMessages.depsInstalled);\r\n\r\n // Step 3: Add features via `warlock add --no-install`, then one batched install.\r\n // The DB driver, optional features, and AI providers all go through the single\r\n // source of truth (core's feature map) so versions never drift.\r\n const selectedFeatures = [databaseDriver, ...features, ...aiProviders];\r\n\r\n if (selectedFeatures.length > 0) {\r\n const featuresSpinner = spinner();\r\n featuresSpinner.start(spinnerMessages.addingFeatures);\r\n\r\n const added = await application.installFeatures(selectedFeatures);\r\n\r\n if (added) {\r\n await application.install().install;\r\n featuresSpinner.stop(spinnerMessages.featuresAdded);\r\n } else {\r\n featuresSpinner.stop(spinnerMessages.featuresFailed);\r\n }\r\n }\r\n\r\n // Step 4: Initialize Git repository if requested\r\n if (useGit) {\r\n const gitSpinner = spinner();\r\n gitSpinner.start(spinnerMessages.initializingGit);\r\n\r\n await application.git();\r\n\r\n gitSpinner.stop(spinnerMessages.gitInitialized);\r\n }\r\n\r\n // Step 5: Generate JWT or warm cache\r\n if (useJWT) {\r\n const jwtSpinner = spinner();\r\n jwtSpinner.start(spinnerMessages.generatingJwt);\r\n\r\n await application.exec(runPackageManagerCommand(\"jwt\"));\r\n\r\n jwtSpinner.stop(spinnerMessages.jwtGenerated);\r\n } else {\r\n const warmSpinner = spinner();\r\n warmSpinner.start(spinnerMessages.warmingCache);\r\n\r\n await application.exec(\"npx warlock --warm-cache\");\r\n\r\n warmSpinner.stop(spinnerMessages.cacheWarmed);\r\n }\r\n\r\n // Step 6: Show success screen\r\n showSuccessScreen({\r\n projectName: application.name,\r\n database: databaseDriver === \"mongodb\" ? \"MongoDB\" : \"PostgreSQL\",\r\n features: [...features, ...aiProviders],\r\n packageManager: getPackageManager(),\r\n });\r\n}\r\n","import { colors } from \"@mongez/copper\";\r\nimport { directoryExists } from \"@warlock.js/fs\";\r\nimport * as path from \"path\";\r\n\r\nexport default function getAppPath(appName: string) {\r\n const appPath: string = path.resolve(process.cwd(), appName);\r\n\r\n if (directoryExists(appPath)) {\r\n console.log(\r\n colors.redBright(\r\n `${process.cwd()} has an existing directory \\`${colors.cyan(\r\n appName,\r\n )}\\`, please choose another app name or another directory to run the command from.`,\r\n ),\r\n );\r\n\r\n process.exit(1);\r\n }\r\n\r\n return appPath;\r\n}\r\n","import {\r\n cancel,\r\n confirm,\r\n isCancel,\r\n multiselect,\r\n select,\r\n text,\r\n} from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { getJsonFile } from \"@warlock.js/fs\";\r\nimport {\r\n getDatabaseDriver,\r\n getDatabaseDriverOptions,\r\n} from \"../../features/database-drivers\";\r\nimport {\r\n getAiProviderOptions,\r\n getAllFeatureKeys,\r\n getDefaultFeatureKeys,\r\n getFeatureOptions,\r\n} from \"../../features/features-map\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n detectPackageManagers,\r\n getPackageManager,\r\n getPreferredPackageManager,\r\n getSystemPackageManagers,\r\n setPackageManager,\r\n} from \"../../helpers/package-manager\";\r\nimport { packageRoot } from \"../../helpers/paths\";\r\nimport { showIntroBanner } from \"../../ui/banner\";\r\nimport { createWarlockApp } from \"../create-warlock-app\";\r\nimport getAppPath from \"./get-app-path\";\r\nimport { App as AppType, CliFlags } from \"./types\";\r\n\r\nexport default async function createNewApp(cli: CliFlags = {}) {\r\n // Start detecting package managers in the background to avoid delay later\r\n const pmDetectionPromise = detectPackageManagers();\r\n\r\n // Get version from package.json\r\n const packageJson: any = getJsonFile(packageRoot(\"package.json\"));\r\n const createWarlockVersion = packageJson.version;\r\n\r\n // Show the intro banner\r\n showIntroBanner(createWarlockVersion);\r\n\r\n console.log(colors.cyan(\"✨ Let's create something magical! ✨\\n\"));\r\n\r\n // Validate Node.js version (minimum v20)\r\n const [major] = process.versions.node.split(\".\").map(Number);\r\n if (major < 20) {\r\n cancel(\"Node.js version must be at least 20.0.0\");\r\n process.exit(0);\r\n }\r\n\r\n // Non-interactive path: build everything from flags and skip the prompts.\r\n if (cli.yes) {\r\n await createNonInteractive(cli);\r\n return;\r\n }\r\n\r\n // Step 1: Project name\r\n const appName = await text({\r\n message: \"What shall we call your project?\",\r\n placeholder: \"my-warlock-app\",\r\n });\r\n\r\n if (isCancel(appName) || !appName.trim()) {\r\n cancel(\"A project name is required to continue\");\r\n process.exit(0);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n if (!appPath) return;\r\n\r\n // Step 2: Package Manager selection\r\n await pmDetectionPromise; // Ensure detection is complete\r\n\r\n const packageManager = await select({\r\n message: \"Which package manager do you want to use?\",\r\n options: getSystemPackageManagers().map(pm => ({\r\n value: pm,\r\n label: pm,\r\n })),\r\n initialValue: getPreferredPackageManager(),\r\n });\r\n\r\n if (isCancel(packageManager)) {\r\n cancel(\"Package manager selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n setPackageManager(packageManager as string);\r\n\r\n // Step 3: Database driver selection\r\n const databaseDriver = await select({\r\n message: \"Choose your database driver 🗄ï¸\",\r\n options: getDatabaseDriverOptions(),\r\n });\r\n\r\n if (isCancel(databaseDriver)) {\r\n cancel(\"Database selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n const selectedDriver = getDatabaseDriver(databaseDriver as string);\r\n\r\n // Step 4: Features selection\r\n const selectedFeatures = await multiselect({\r\n message: \"Select optional features to include ✨\",\r\n options: getFeatureOptions(),\r\n initialValues: getDefaultFeatureKeys(),\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedFeatures)) {\r\n cancel(\"Feature selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 4b: AI providers — selecting any pulls @warlock.js/ai automatically\r\n const selectedAiProviders = await multiselect({\r\n message: \"Add AI providers? The core AI package is included automatically 🤖\",\r\n options: getAiProviderOptions(),\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedAiProviders)) {\r\n cancel(\"AI provider selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 5: Git initialization\r\n const useGit =\r\n (await confirm({\r\n message: \"Initialize a Git repository? 📂\",\r\n })) === true;\r\n\r\n if (isCancel(useGit)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 6: JWT secret generation\r\n const useJWT =\r\n (await confirm({\r\n message: \"Generate JWT secret keys? ðŸ”\",\r\n })) === true;\r\n\r\n if (isCancel(useJWT)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Build app details\r\n const appDetails: Required<AppType> = {\r\n appName: appName,\r\n appType: \"warlock\",\r\n appPath: appPath,\r\n pkgManager: getPackageManager(),\r\n options: {\r\n databaseDriver: databaseDriver as string,\r\n databasePort: selectedDriver?.defaultPort || 27017,\r\n features: selectedFeatures as string[],\r\n aiProviders: selectedAiProviders as string[],\r\n useGit,\r\n useJWT,\r\n },\r\n };\r\n\r\n // Create the app\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n\r\n/**\r\n * Non-interactive scaffold path for `--yes`. Builds the app from flags with\r\n * sensible defaults and skips every prompt. Validates the database driver and\r\n * feature/provider keys up front so a typo fails fast instead of mid-install.\r\n */\r\nasync function createNonInteractive(cli: CliFlags) {\r\n const appName = (cli.name ?? \"\").trim();\r\n\r\n if (!appName) {\r\n cancel(\"--yes requires a project name (first argument or --name=<name>)\");\r\n process.exit(1);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n\r\n if (!appPath) return;\r\n\r\n await detectPackageManagers();\r\n\r\n const packageManager = cli.pm ?? getPreferredPackageManager();\r\n setPackageManager(packageManager);\r\n\r\n const databaseDriver = cli.db ?? \"mongodb\";\r\n const driver = getDatabaseDriver(databaseDriver);\r\n\r\n if (!driver) {\r\n cancel(`Unknown database driver \"${databaseDriver}\"`);\r\n process.exit(1);\r\n }\r\n\r\n const features = cli.features ?? [];\r\n const aiProviders = cli.ai ?? [];\r\n\r\n const allowedKeys = getAllFeatureKeys();\r\n const invalidKeys = [...features, ...aiProviders].filter(key => !allowedKeys.includes(key));\r\n\r\n if (invalidKeys.length > 0) {\r\n cancel(`Unknown feature(s): ${invalidKeys.join(\", \")}`);\r\n process.exit(1);\r\n }\r\n\r\n const appDetails: Required<AppType> = {\r\n appName,\r\n appType: \"warlock\",\r\n appPath,\r\n pkgManager: getPackageManager(),\r\n options: {\r\n databaseDriver,\r\n databasePort: driver.defaultPort,\r\n features,\r\n aiProviders,\r\n useGit: cli.git ?? false,\r\n useJWT: cli.jwt ?? false,\r\n },\r\n };\r\n\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n","import createNewApp from \"./commands/create-new-app\";\nimport { CliFlags } from \"./commands/create-new-app/types\";\n\nconst valueFlags = [\"name\", \"db\", \"pm\", \"features\", \"ai\"];\n\n/**\n * Parse the scaffolder's own CLI flags for non-interactive mode.\n *\n * @example\n * create-warlock my-app --db=postgres --features=test,herald --ai=openai,anthropic --yes\n */\nexport function parseFlags(argv: string[]): CliFlags {\n const flags: CliFlags = {};\n const positionals: string[] = [];\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n\n if (!arg.startsWith(\"-\")) {\n positionals.push(arg);\n continue;\n }\n\n const equalIndex = arg.indexOf(\"=\");\n const key = (equalIndex === -1 ? arg : arg.slice(0, equalIndex)).replace(/^-+/, \"\");\n let value: string | undefined = equalIndex === -1 ? undefined : arg.slice(equalIndex + 1);\n\n // Value-taking flags may use either `--key=value` or `--key value`.\n if (valueFlags.includes(key) && value === undefined) {\n const next = argv[i + 1];\n\n if (next && !next.startsWith(\"-\")) {\n value = next;\n i++;\n }\n }\n\n switch (key) {\n case \"yes\":\n case \"y\":\n flags.yes = true;\n break;\n case \"git\":\n flags.git = true;\n break;\n case \"no-git\":\n flags.git = false;\n break;\n case \"jwt\":\n flags.jwt = true;\n break;\n case \"no-jwt\":\n flags.jwt = false;\n break;\n case \"name\":\n flags.name = value;\n break;\n case \"db\":\n flags.db = value;\n break;\n case \"pm\":\n flags.pm = value;\n break;\n case \"features\":\n flags.features = splitList(value);\n break;\n case \"ai\":\n flags.ai = splitList(value);\n break;\n }\n }\n\n if (!flags.name && positionals.length > 0) {\n flags.name = positionals[0];\n }\n\n return flags;\n}\n\nfunction splitList(value: string | undefined): string[] {\n if (!value) return [];\n\n return value\n .split(\",\")\n .map(item => item.trim())\n .filter(Boolean);\n}\n\nexport default function createApp() {\n const flags = parseFlags(process.argv.slice(2));\n\n createNewApp(flags);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,kBAAoC;CAC/C;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;CACf;CACA;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;CACf;CACA;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;EACb,UAAU;EACV,MAAM;CACR;AACF;;;;AAKA,SAAgB,2BAA2B;CACzC,OAAO,gBAAgB,KAAI,YAAW;EACpC,OAAO,OAAO;EACd,OAAO,OAAO;EACd,MAAM,OAAO;EACb,UAAU,OAAO;CACnB,EAAE;AACJ;;;;AAKA,SAAgB,kBAAkB,OAA2C;CAC3E,OAAO,gBAAgB,MAAK,WAAU,OAAO,UAAU,KAAK;AAC9D;;;;;;;;;AClBA,MAAa,WAA4B;CAEvC;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;EACP,iBAAiB;CACnB;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;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,SAAY,IAAI,MAAM,aAAa,CAAC;EAGxF,IAAI,WAAW,SAAS,GAAG,KAAK,UAAU,QAAW;GACnD,MAAM,OAAO,KAAK,IAAI;GAEtB,IAAI,QAAQ,CAAC,KAAK,WAAW,GAAG,GAAG;IACjC,QAAQ;IACR;GACF;EACF;EAEA,QAAQ,KAAR;GACE,KAAK;GACL,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,OAAO;IACb;GACF,KAAK;IACH,MAAM,KAAK;IACX;GACF,KAAK;IACH,MAAM,KAAK;IACX;GACF,KAAK;IACH,MAAM,WAAW,UAAU,KAAK;IAChC;GACF,KAAK;IACH,MAAM,KAAK,UAAU,KAAK;IAC1B;EACJ;CACF;CAEA,IAAI,CAAC,MAAM,QAAQ,YAAY,SAAS,GACtC,MAAM,OAAO,YAAY;CAG3B,OAAO;AACT;AAEA,SAAS,UAAU,OAAqC;CACtD,IAAI,CAAC,OAAO,OAAO,CAAC;CAEpB,OAAO,MACJ,MAAM,GAAG,EACT,KAAI,SAAQ,KAAK,KAAK,CAAC,EACvB,OAAO,OAAO;AACnB;AAEA,SAAwB,YAAY;CAGlC,aAFc,WAAW,QAAQ,KAAK,MAAM,CAAC,CAE5B,CAAC;AACpB"}
|
package/cjs/paths-Bl9Wn7qV.cjs
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
let _clack_prompts = require("@clack/prompts");
|
|
29
|
-
let _mongez_copper = require("@mongez/copper");
|
|
30
|
-
let path = require("path");
|
|
31
|
-
path = __toESM(path, 1);
|
|
32
|
-
let cross_spawn = require("cross-spawn");
|
|
33
|
-
cross_spawn = __toESM(cross_spawn, 1);
|
|
34
|
-
let child_process = require("child_process");
|
|
35
|
-
let util = require("util");
|
|
36
|
-
let which_pm_runs = require("which-pm-runs");
|
|
37
|
-
which_pm_runs = __toESM(which_pm_runs, 1);
|
|
38
|
-
let url = require("url");
|
|
39
|
-
|
|
40
|
-
//#region ../../@warlock.js/create-warlock/src/helpers/exec.ts
|
|
41
|
-
/**
|
|
42
|
-
* This function directly executes a command
|
|
43
|
-
*/
|
|
44
|
-
async function executeCommand(cmd, args, cwd) {
|
|
45
|
-
return new Promise((resolve) => {
|
|
46
|
-
const child = (0, cross_spawn.default)(cmd, args, {
|
|
47
|
-
cwd,
|
|
48
|
-
stdio: "ignore"
|
|
49
|
-
});
|
|
50
|
-
child.on("error", (e) => {
|
|
51
|
-
if (e) if (e.message) _clack_prompts.log.error(_mongez_copper.colors.red(String(e.message)) + `\n\n`);
|
|
52
|
-
else _clack_prompts.log.error(_mongez_copper.colors.red(String(e)) + `\n\n`);
|
|
53
|
-
resolve(false);
|
|
54
|
-
});
|
|
55
|
-
child.on("close", (code) => {
|
|
56
|
-
if (code === 0) resolve(true);
|
|
57
|
-
else resolve(false);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function runCommand(cmd, args, cwd) {
|
|
62
|
-
let child;
|
|
63
|
-
const install = new Promise((resolve) => {
|
|
64
|
-
try {
|
|
65
|
-
child = (0, cross_spawn.default)(cmd, args, {
|
|
66
|
-
cwd,
|
|
67
|
-
stdio: "ignore"
|
|
68
|
-
});
|
|
69
|
-
child.on("error", (e) => {
|
|
70
|
-
if (e) if (e.message) _clack_prompts.log.error(_mongez_copper.colors.red(String(e.message)) + `\n\n`);
|
|
71
|
-
else _clack_prompts.log.error(_mongez_copper.colors.red(String(e)) + `\n\n`);
|
|
72
|
-
resolve(false);
|
|
73
|
-
});
|
|
74
|
-
child.on("close", (code) => {
|
|
75
|
-
if (code === 0) resolve(true);
|
|
76
|
-
else resolve(false);
|
|
77
|
-
});
|
|
78
|
-
} catch (e) {
|
|
79
|
-
resolve(false);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
const abort = async () => {
|
|
83
|
-
if (child) child.kill("SIGINT");
|
|
84
|
-
};
|
|
85
|
-
return {
|
|
86
|
-
abort,
|
|
87
|
-
install
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region ../../@warlock.js/create-warlock/src/helpers/package-manager.ts
|
|
93
|
-
const execAsync = (0, util.promisify)(child_process.exec);
|
|
94
|
-
let detectedPackageManager;
|
|
95
|
-
let cachedSystemManagers;
|
|
96
|
-
let cachedPreferredManager;
|
|
97
|
-
function getPackageManager() {
|
|
98
|
-
if (detectedPackageManager) return detectedPackageManager;
|
|
99
|
-
return getPreferredPackageManager();
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Check if a package manager is installed
|
|
103
|
-
*/
|
|
104
|
-
function isInstalled(manager) {
|
|
105
|
-
try {
|
|
106
|
-
(0, child_process.execSync)(`${manager} --version`, { stdio: "ignore" });
|
|
107
|
-
return true;
|
|
108
|
-
} catch {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Check if a package manager is installed (async)
|
|
114
|
-
*/
|
|
115
|
-
async function checkManager(manager) {
|
|
116
|
-
try {
|
|
117
|
-
await execAsync(`${manager} --version`);
|
|
118
|
-
return true;
|
|
119
|
-
} catch {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Detect available package managers asynchronously and cache results
|
|
125
|
-
*/
|
|
126
|
-
async function detectPackageManagers() {
|
|
127
|
-
const managers = ["npm"];
|
|
128
|
-
const checks = [checkManager("yarn"), checkManager("pnpm")];
|
|
129
|
-
const [hasYarn, hasPnpm] = await Promise.all(checks);
|
|
130
|
-
if (hasYarn) managers.push("yarn");
|
|
131
|
-
if (hasPnpm) managers.push("pnpm");
|
|
132
|
-
cachedSystemManagers = managers;
|
|
133
|
-
const runningPm = (0, which_pm_runs.default)()?.name;
|
|
134
|
-
if (runningPm && runningPm !== "npm") cachedPreferredManager = runningPm;
|
|
135
|
-
else if (hasYarn) cachedPreferredManager = "yarn";
|
|
136
|
-
else if (hasPnpm) cachedPreferredManager = "pnpm";
|
|
137
|
-
else cachedPreferredManager = "npm";
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get available package managers on the system
|
|
141
|
-
*/
|
|
142
|
-
function getSystemPackageManagers() {
|
|
143
|
-
if (cachedSystemManagers) return cachedSystemManagers;
|
|
144
|
-
const managers = ["npm"];
|
|
145
|
-
if (isInstalled("yarn")) managers.push("yarn");
|
|
146
|
-
if (isInstalled("pnpm")) managers.push("pnpm");
|
|
147
|
-
return managers;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Get the preferred package manager based on priority
|
|
151
|
-
*/
|
|
152
|
-
function getPreferredPackageManager() {
|
|
153
|
-
if (cachedPreferredManager) return cachedPreferredManager;
|
|
154
|
-
const runningPm = (0, which_pm_runs.default)()?.name;
|
|
155
|
-
if (runningPm && runningPm !== "npm") return runningPm;
|
|
156
|
-
if (isInstalled("yarn")) return "yarn";
|
|
157
|
-
if (isInstalled("pnpm")) return "pnpm";
|
|
158
|
-
return "npm";
|
|
159
|
-
}
|
|
160
|
-
function setPackageManager(packageManager) {
|
|
161
|
-
detectedPackageManager = packageManager;
|
|
162
|
-
}
|
|
163
|
-
function runPackageManagerCommand(command) {
|
|
164
|
-
const packageManager = getPackageManager();
|
|
165
|
-
if (packageManager === "npm") return `npm run ${command}`;
|
|
166
|
-
return `${packageManager} ${command}`;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
//#endregion
|
|
170
|
-
//#region ../../@warlock.js/create-warlock/src/helpers/paths.ts
|
|
171
|
-
const __filename$1 = (0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
|
|
172
|
-
const __dirname$1 = path.default.dirname(__filename$1);
|
|
173
|
-
function template(templateName) {
|
|
174
|
-
return path.default.resolve(__dirname$1, "../", "../", "templates", templateName);
|
|
175
|
-
}
|
|
176
|
-
function packageRoot(...paths) {
|
|
177
|
-
return path.default.resolve(__dirname$1, "../", "../", ...paths);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
//#endregion
|
|
181
|
-
Object.defineProperty(exports, '__toESM', {
|
|
182
|
-
enumerable: true,
|
|
183
|
-
get: function () {
|
|
184
|
-
return __toESM;
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
Object.defineProperty(exports, 'detectPackageManagers', {
|
|
188
|
-
enumerable: true,
|
|
189
|
-
get: function () {
|
|
190
|
-
return detectPackageManagers;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
Object.defineProperty(exports, 'executeCommand', {
|
|
194
|
-
enumerable: true,
|
|
195
|
-
get: function () {
|
|
196
|
-
return executeCommand;
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
Object.defineProperty(exports, 'getPackageManager', {
|
|
200
|
-
enumerable: true,
|
|
201
|
-
get: function () {
|
|
202
|
-
return getPackageManager;
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
Object.defineProperty(exports, 'getPreferredPackageManager', {
|
|
206
|
-
enumerable: true,
|
|
207
|
-
get: function () {
|
|
208
|
-
return getPreferredPackageManager;
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
Object.defineProperty(exports, 'getSystemPackageManagers', {
|
|
212
|
-
enumerable: true,
|
|
213
|
-
get: function () {
|
|
214
|
-
return getSystemPackageManagers;
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
Object.defineProperty(exports, 'packageRoot', {
|
|
218
|
-
enumerable: true,
|
|
219
|
-
get: function () {
|
|
220
|
-
return packageRoot;
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
Object.defineProperty(exports, 'runCommand', {
|
|
224
|
-
enumerable: true,
|
|
225
|
-
get: function () {
|
|
226
|
-
return runCommand;
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
Object.defineProperty(exports, 'runPackageManagerCommand', {
|
|
230
|
-
enumerable: true,
|
|
231
|
-
get: function () {
|
|
232
|
-
return runPackageManagerCommand;
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
Object.defineProperty(exports, 'setPackageManager', {
|
|
236
|
-
enumerable: true,
|
|
237
|
-
get: function () {
|
|
238
|
-
return setPackageManager;
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
Object.defineProperty(exports, 'template', {
|
|
242
|
-
enumerable: true,
|
|
243
|
-
get: function () {
|
|
244
|
-
return template;
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
//# sourceMappingURL=paths-Bl9Wn7qV.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paths-Bl9Wn7qV.cjs","names":["colors","exec","__filename","__dirname"],"sources":["../../../../../@warlock.js/create-warlock/src/helpers/exec.ts","../../../../../@warlock.js/create-warlock/src/helpers/package-manager.ts","../../../../../@warlock.js/create-warlock/src/helpers/paths.ts"],"sourcesContent":["import { log } from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { ChildProcess } from \"child_process\";\r\nimport { default as childProcess, default as spawn } from \"cross-spawn\";\r\n\r\nexport default async function exec(command: string, options: any = {}) {\r\n const [commandName, ...optionsList] = command.split(\" \");\r\n\r\n const commandOutput = childProcess.sync(commandName, optionsList, options);\r\n\r\n // it means command didn't end as expected, then stop the rest of the program\r\n if (commandOutput.error !== null) {\r\n process.exit(1);\r\n }\r\n\r\n return commandOutput;\r\n}\r\n\r\n/**\r\n * This function directly executes a command\r\n */\r\nexport async function executeCommand(cmd: string, args: string[], cwd: string) {\r\n return new Promise<boolean>(resolve => {\r\n const child = spawn(cmd, args, {\r\n cwd,\r\n stdio: \"ignore\",\r\n });\r\n\r\n child.on(\"error\", e => {\r\n if (e) {\r\n if (e.message) {\r\n log.error(colors.red(String(e.message)) + `\\n\\n`);\r\n } else {\r\n log.error(colors.red(String(e)) + `\\n\\n`);\r\n }\r\n }\r\n resolve(false);\r\n });\r\n\r\n child.on(\"close\", code => {\r\n if (code === 0) {\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n });\r\n}\r\n\r\nexport function runCommand(cmd: string, args: string[], cwd: string) {\r\n let child: ChildProcess;\r\n\r\n const install = new Promise<boolean>(resolve => {\r\n try {\r\n child = spawn(cmd, args, {\r\n cwd,\r\n stdio: \"ignore\",\r\n });\r\n\r\n child.on(\"error\", e => {\r\n if (e) {\r\n if (e.message) {\r\n log.error(colors.red(String(e.message)) + `\\n\\n`);\r\n } else {\r\n log.error(colors.red(String(e)) + `\\n\\n`);\r\n }\r\n }\r\n resolve(false);\r\n });\r\n\r\n child.on(\"close\", code => {\r\n if (code === 0) {\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n } catch (e) {\r\n resolve(false);\r\n }\r\n });\r\n\r\n const abort = async () => {\r\n if (child) {\r\n child.kill(\"SIGINT\");\r\n }\r\n };\r\n\r\n return { abort, install };\r\n}\r\n","import { exec, execSync } from \"child_process\";\r\nimport { promisify } from \"util\";\r\nimport detectPackageManager from \"which-pm-runs\";\r\n\r\nconst execAsync = promisify(exec);\r\n\r\nlet detectedPackageManager: string | undefined;\r\nlet cachedSystemManagers: string[] | undefined;\r\nlet cachedPreferredManager: string | undefined;\r\n\r\nexport function getPackageManager() {\r\n if (detectedPackageManager) {\r\n return detectedPackageManager;\r\n }\r\n\r\n return getPreferredPackageManager();\r\n}\r\n\r\n/**\r\n * Check if a package manager is installed\r\n */\r\nfunction isInstalled(manager: string): boolean {\r\n try {\r\n execSync(`${manager} --version`, { stdio: \"ignore\" });\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Check if a package manager is installed (async)\r\n */\r\nasync function checkManager(manager: string): Promise<boolean> {\r\n try {\r\n await execAsync(`${manager} --version`);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Detect available package managers asynchronously and cache results\r\n */\r\nexport async function detectPackageManagers() {\r\n const managers = [\"npm\"];\r\n const checks = [checkManager(\"yarn\"), checkManager(\"pnpm\")];\r\n\r\n const [hasYarn, hasPnpm] = await Promise.all(checks);\r\n\r\n if (hasYarn) managers.push(\"yarn\");\r\n if (hasPnpm) managers.push(\"pnpm\");\r\n\r\n cachedSystemManagers = managers;\r\n\r\n // Determine preference\r\n const runningPm = detectPackageManager()?.name;\r\n if (runningPm && runningPm !== \"npm\") {\r\n cachedPreferredManager = runningPm;\r\n } else if (hasYarn) {\r\n cachedPreferredManager = \"yarn\";\r\n } else if (hasPnpm) {\r\n cachedPreferredManager = \"pnpm\";\r\n } else {\r\n cachedPreferredManager = \"npm\";\r\n }\r\n}\r\n\r\n/**\r\n * Get available package managers on the system\r\n */\r\nexport function getSystemPackageManagers(): string[] {\r\n if (cachedSystemManagers) return cachedSystemManagers;\r\n\r\n const managers = [\"npm\"]; // npm is assumed to be always available\r\n\r\n if (isInstalled(\"yarn\")) {\r\n managers.push(\"yarn\");\r\n }\r\n\r\n if (isInstalled(\"pnpm\")) {\r\n managers.push(\"pnpm\");\r\n }\r\n\r\n return managers;\r\n}\r\n\r\n/**\r\n * Get the preferred package manager based on priority\r\n */\r\nexport function getPreferredPackageManager(): string {\r\n if (cachedPreferredManager) return cachedPreferredManager;\r\n\r\n // Priority 1: The manager currently running the script\r\n const runningPm = detectPackageManager()?.name;\r\n if (runningPm && runningPm !== \"npm\") return runningPm;\r\n\r\n // Priority 2: Yarn (if installed)\r\n if (isInstalled(\"yarn\")) return \"yarn\";\r\n\r\n // Priority 3: pnpm (if installed)\r\n if (isInstalled(\"pnpm\")) return \"pnpm\";\r\n\r\n // Priority 4: npm (default)\r\n return \"npm\";\r\n}\r\n\r\nexport function setPackageManager(packageManager: string) {\r\n detectedPackageManager = packageManager;\r\n}\r\n\r\nexport function installCommand() {\r\n return `${getPackageManager()} install`;\r\n}\r\n\r\nexport function startCommand() {\r\n if (getPackageManager() === \"npm\") return \"npm run dev\";\r\n\r\n return `${getPackageManager()} dev`;\r\n}\r\n\r\nexport function runPackageManagerCommand(command: string) {\r\n const packageManager = getPackageManager();\r\n\r\n if (packageManager === \"npm\") return `npm run ${command}`;\r\n\r\n return `${packageManager} ${command}`;\r\n}\r\n","import path from \"path\";\r\nimport { fileURLToPath } from \"url\";\r\n\r\nconst __filename = fileURLToPath(import.meta.url);\r\n\r\nconst __dirname = path.dirname(__filename);\r\n\r\nexport type Template = \"warlock\";\r\n\r\nexport function template(templateName: Template): string {\r\n return path.resolve(__dirname, \"../\", \"../\", \"templates\", templateName);\r\n}\r\n\r\nexport function packageRoot(...paths: string[]): string {\r\n return path.resolve(__dirname, \"../\", \"../\", ...paths);\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,eAAsB,eAAe,KAAa,MAAgB,KAAa;CAC7E,OAAO,IAAI,SAAiB,YAAW;EACrC,MAAM,iCAAc,KAAK,MAAM;GAC7B;GACA,OAAO;EACT,CAAC;EAED,MAAM,GAAG,UAAS,MAAK;GACrB,IAAI,GACF,IAAI,EAAE,SACJ,mBAAI,MAAMA,sBAAO,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM;QAEhD,mBAAI,MAAMA,sBAAO,IAAI,OAAO,CAAC,CAAC,IAAI,MAAM;GAG5C,QAAQ,KAAK;EACf,CAAC;EAED,MAAM,GAAG,UAAS,SAAQ;GACxB,IAAI,SAAS,GACX,QAAQ,IAAI;QAEZ,QAAQ,KAAK;EAEjB,CAAC;CACH,CAAC;AACH;AAEA,SAAgB,WAAW,KAAa,MAAgB,KAAa;CACnE,IAAI;CAEJ,MAAM,UAAU,IAAI,SAAiB,YAAW;EAC9C,IAAI;GACF,iCAAc,KAAK,MAAM;IACvB;IACA,OAAO;GACT,CAAC;GAED,MAAM,GAAG,UAAS,MAAK;IACrB,IAAI,GACF,IAAI,EAAE,SACJ,mBAAI,MAAMA,sBAAO,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM;SAEhD,mBAAI,MAAMA,sBAAO,IAAI,OAAO,CAAC,CAAC,IAAI,MAAM;IAG5C,QAAQ,KAAK;GACf,CAAC;GAED,MAAM,GAAG,UAAS,SAAQ;IACxB,IAAI,SAAS,GACX,QAAQ,IAAI;SAEZ,QAAQ,KAAK;GAEjB,CAAC;EACH,SAAS,GAAG;GACV,QAAQ,KAAK;EACf;CACF,CAAC;CAED,MAAM,QAAQ,YAAY;EACxB,IAAI,OACF,M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AGhC,IAAI,YAAY,MAAM,GAAG,OAAO;CAGhC,OAAO;AACT;AAEA,SAAgB,kBAAkB,gBAAwB;CACxD,yBAAyB;AAC3B;AAYA,SAAgB,yBAAyB,SAAiB;CACxD,MAAM,iBAAiB,kBAAkB;CAEzC,IAAI,mBAAmB,OAAO,OAAO,WAAW;CAEhD,OAAO,GAAG,eAAe,GAAG;AAC9B;;;;AC7HA,MAAMC,mFAA0C;AAEhD,MAAMC,cAAY,aAAK,QAAQD,YAAU;AAIzC,SAAgB,SAAS,cAAgC;CACvD,OAAO,aAAK,QAAQC,aAAW,OAAO,OAAO,aAAa,YAAY;AACxE;AAEA,SAAgB,YAAY,GAAG,OAAyB;CACtD,OAAO,aAAK,QAAQA,aAAW,OAAO,OAAO,GAAG,KAAK;AACvD"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const require_paths = require('./paths-Bl9Wn7qV.cjs');
|
|
2
|
-
let _clack_prompts = require("@clack/prompts");
|
|
3
|
-
let _mongez_copper = require("@mongez/copper");
|
|
4
|
-
let _warlock_js_fs = require("@warlock.js/fs");
|
|
5
|
-
let path = require("path");
|
|
6
|
-
path = require_paths.__toESM(path, 1);
|
|
7
|
-
|
|
8
|
-
//#region ../../@warlock.js/create-warlock/src/helpers/project-builder-helpers.ts
|
|
9
|
-
async function initializeGitRepository(appPath) {
|
|
10
|
-
await require_paths.executeCommand(`git`, ["init"], appPath);
|
|
11
|
-
await require_paths.executeCommand(`git`, [
|
|
12
|
-
"checkout",
|
|
13
|
-
"-b",
|
|
14
|
-
"main"
|
|
15
|
-
], appPath);
|
|
16
|
-
await require_paths.executeCommand(`git`, ["add", "."], appPath);
|
|
17
|
-
await require_paths.executeCommand(`git`, [
|
|
18
|
-
"commit",
|
|
19
|
-
"-m",
|
|
20
|
-
"Initial commit âš¡ï¸"
|
|
21
|
-
], appPath);
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
exports.initializeGitRepository = initializeGitRepository;
|
|
27
|
-
//# sourceMappingURL=project-builder-helpers-DGcgf60P.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-builder-helpers-DGcgf60P.cjs","names":["executeCommand"],"sources":["../../../../../@warlock.js/create-warlock/src/helpers/project-builder-helpers.ts"],"sourcesContent":["import { outro } from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport {\r\n copyDirectory,\r\n getFile,\r\n getJsonFile,\r\n putFile,\r\n putJsonFile,\r\n renameFile,\r\n} from \"@warlock.js/fs\";\r\nimport path from \"path\";\r\nimport { executeCommand } from \"./exec\";\r\nimport { startCommand } from \"./package-manager\";\r\nimport { Template, template } from \"./paths\";\r\n\r\nexport async function initializeGitRepository(appPath: string) {\r\n // initialize git repository\r\n await executeCommand(`git`, [\"init\"], appPath);\r\n // switching to `main` branch\r\n await executeCommand(`git`, [\"checkout\", \"-b\", \"main\"], appPath);\r\n\r\n // add files\r\n await executeCommand(`git`, [\"add\", \".\"], appPath);\r\n\r\n // commit files\r\n await executeCommand(`git`, [\"commit\", \"-m\", \"Initial commit âš¡ï¸\"], appPath);\r\n\r\n return true;\r\n}\r\n\r\nexport async function updateEnvFile(appPath: string, appName: string) {\r\n // update package.json file\r\n const packageJson: any = getJsonFile(path.resolve(appPath, \"package.json\"));\r\n\r\n packageJson.name = appName;\r\n\r\n putJsonFile(path.resolve(appPath, \"package.json\"), packageJson);\r\n\r\n // update env file\r\n const dotEnv = getFile(path.resolve(appPath, \".env\"))\r\n .replace(\"AppName\", appName)\r\n .replace(\r\n \"AppCodeName\",\r\n appName\r\n .split(/-|_/g)\r\n .map(word => word[0])\r\n .join(\"\"),\r\n );\r\n\r\n putFile(path.resolve(appPath, \".env\"), dotEnv);\r\n\r\n // update .env.production file\r\n let dotEnvProduction = getFile(path.resolve(appPath, \".env.shared\"));\r\n\r\n dotEnvProduction = dotEnvProduction.replace(\"AppName\", appName).replace(\r\n \"AppCodeName\",\r\n appName\r\n .split(/-|_/g)\r\n .map(word => word[0])\r\n .join(\"\"),\r\n );\r\n\r\n putFile(path.resolve(appPath, \".env.shared\"), dotEnvProduction);\r\n}\r\n\r\nexport async function copyTemplateFiles(\r\n templateName: Template,\r\n appPath: string,\r\n _appName: string,\r\n) {\r\n // copy project files\r\n copyDirectory(template(templateName), appPath);\r\n\r\n // replace _.gitignore to\r\n renameFile(\r\n path.resolve(appPath, \"_.gitignore\"),\r\n path.resolve(appPath, \".gitignore\"),\r\n );\r\n}\r\n\r\nexport async function allDone(appName: string) {\r\n outro(\r\n \"🌟 Awesome! Your project is ready to rock! \" +\r\n \"Run the following command to start development:\",\r\n );\r\n\r\n console.log(colors.cyan(`cd ${appName} && ${startCommand()}`));\r\n\r\n console.log();\r\n\r\n console.log(\r\n `💡 Pro tip: Install the ${colors.yellow(\r\n \"Generator Z\",\r\n )} extension in VSCode for helpful code snippets and productivity boosters! 🚀`,\r\n );\r\n}\r\n"],"mappings":";;;;;;;;AAeA,eAAsB,wBAAwB,SAAiB;CAE7D,MAAMA,6BAAe,OAAO,CAAC,MAAM,GAAG,OAAO;CAE7C,MAAMA,6BAAe,OAAO;EAAC;EAAY;EAAM;CAAM,GAAG,OAAO;CAG/D,MAAMA,6BAAe,OAAO,CAAC,OAAO,GAAG,GAAG,OAAO;CAGjD,MAAMA,6BAAe,OAAO;EAAC;EAAU;EAAM;CAAuB,GAAG,OAAO;CAE9E,OAAO;AACT"}
|