create-warlock 5.29.0 → 5.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +66 -15
- package/esm/commands/create-new-app/get-app-path.mjs +1 -1
- package/esm/commands/create-new-app/get-app-path.mjs.map +1 -1
- package/esm/commands/create-new-app/index.mjs +20 -14
- package/esm/commands/create-new-app/index.mjs.map +1 -1
- package/esm/commands/create-new-app/types.d.mts +3 -2
- package/esm/commands/create-warlock-app/index.mjs +2 -1
- package/esm/commands/create-warlock-app/index.mjs.map +1 -1
- package/esm/features/agent-kit-targets.mjs +1 -1
- package/esm/features/agent-kit-targets.mjs.map +1 -1
- package/esm/features/database-drivers.mjs +1 -1
- package/esm/features/database-drivers.mjs.map +1 -1
- package/esm/features/features-map.mjs +13 -13
- package/esm/features/features-map.mjs.map +1 -1
- package/esm/flags/assert-flag-combinations.mjs +1 -1
- package/esm/flags/assert-flag-combinations.mjs.map +1 -1
- package/esm/flags/assert-package-manager.mjs +1 -1
- package/esm/flags/assert-package-manager.mjs.map +1 -1
- package/esm/flags/definitions.mjs +6 -1
- package/esm/flags/definitions.mjs.map +1 -1
- package/esm/flags/seed-from-flags.mjs +2 -1
- package/esm/flags/seed-from-flags.mjs.map +1 -1
- package/esm/helpers/app.mjs +72 -6
- package/esm/helpers/app.mjs.map +1 -1
- package/esm/helpers/exec.mjs +1 -1
- package/esm/helpers/exec.mjs.map +1 -1
- package/esm/helpers/insert-import.mjs +1 -1
- package/esm/helpers/insert-import.mjs.map +1 -1
- package/esm/helpers/package-manager.mjs +22 -2
- package/esm/helpers/package-manager.mjs.map +1 -1
- package/esm/helpers/paths.mjs +1 -1
- package/esm/helpers/paths.mjs.map +1 -1
- package/esm/helpers/pnpm-build-approvals.mjs +58 -3
- package/esm/helpers/pnpm-build-approvals.mjs.map +1 -1
- package/esm/helpers/project-builder-helpers.mjs +1 -1
- package/esm/helpers/project-builder-helpers.mjs.map +1 -1
- package/esm/helpers/tty.mjs +1 -1
- package/esm/helpers/tty.mjs.map +1 -1
- package/esm/helpers/warlock-versions.mjs +1 -1
- package/esm/helpers/warlock-versions.mjs.map +1 -1
- package/esm/index.d.mts +1 -1
- package/esm/index.mjs +6 -2
- package/esm/index.mjs.map +1 -1
- package/esm/prompts/ask-agent-targets.mjs +4 -2
- package/esm/prompts/ask-agent-targets.mjs.map +1 -1
- package/esm/prompts/ask-ai-features.mjs +5 -3
- package/esm/prompts/ask-ai-features.mjs.map +1 -1
- package/esm/prompts/ask-features.mjs +53 -0
- package/esm/prompts/ask-features.mjs.map +1 -0
- package/esm/prompts/ask-lint-toolchain.mjs +21 -0
- package/esm/prompts/ask-lint-toolchain.mjs.map +1 -0
- package/esm/prompts/ask-project-name.mjs +1 -1
- package/esm/prompts/ask-project-name.mjs.map +1 -1
- package/esm/prompts/ask-stack.mjs +1 -1
- package/esm/prompts/ask-stack.mjs.map +1 -1
- package/esm/prompts/fit-to-terminal.mjs +46 -0
- package/esm/prompts/fit-to-terminal.mjs.map +1 -0
- package/esm/summary.mjs +12 -2
- package/esm/summary.mjs.map +1 -1
- package/esm/ui/banner.mjs +115 -47
- package/esm/ui/banner.mjs.map +1 -1
- package/esm/ui/report.mjs +1 -1
- package/esm/ui/report.mjs.map +1 -1
- package/esm/ui/spinner.mjs +1 -1
- package/esm/ui/spinner.mjs.map +1 -1
- package/esm/ui/spinners.mjs +1 -1
- package/esm/ui/spinners.mjs.map +1 -1
- package/esm/ui/wrap-text.mjs +55 -0
- package/esm/ui/wrap-text.mjs.map +1 -0
- package/llms-full.txt +79 -29
- package/package.json +6 -5
- package/skills/create-a-warlock-project/SKILL.md +79 -29
- package/templates/toolchains/oxc/.oxfmtrc.json +12 -0
- package/templates/toolchains/oxc/.oxlintrc.json +24 -0
- package/templates/toolchains/oxc/.vscode/extensions.json +3 -0
- package/templates/toolchains/oxc/.vscode/settings.json +35 -0
- package/templates/warlock/AGENTS.md +22 -2
- package/templates/warlock/README.md +5 -3
- package/templates/warlock/package.json +6 -4
- package/templates/warlock/skills/api-design/SKILL.md +2 -2
- package/templates/warlock/skills/code-standards/SKILL.md +18 -4
- package/templates/warlock/skills/security-baseline/SKILL.md +12 -1
- package/templates/warlock/skills/testing-strategy/SKILL.md +17 -0
- package/templates/warlock/src/app/auth/routes.ts +25 -5
- package/templates/warlock/src/app/auth/utils/types.ts +6 -1
- package/templates/warlock/src/app/contact/routes.ts +1 -1
- package/templates/warlock/src/app/locale/routes.ts +1 -1
- package/templates/warlock/src/app/users/controllers/list-users.controller.ts +10 -2
- package/templates/warlock/src/app/users/schema/list-users.schema.ts +15 -0
- package/templates/warlock/src/config/tests.ts +8 -0
- package/templates/warlock/src/web/404.css +2 -6
- package/templates/warlock/src/web/root.tsx +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask-stack.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"ask-stack.mjs","names":[],"sources":["../../../../../../../packages/create-warlock/src/prompts/ask-stack.ts"],"sourcesContent":["import { cancel, isCancel, select } from \"@clack/prompts\";\nimport type { SetupChoice } from \"../commands/create-new-app/types\";\n\n/**\n * The structural question in the default (non-`--interactive`) interactive\n * path: does the generated app need server-rendered web pages, or is it an\n * API only? The following database prompt is shared by both presets; the\n * remaining choices stay behind flags or the Customize wizard.\n *\n * The third entry is not a third stack: `customize` selects the FLOW, handing\n * the run to the full wizard (`--customize`) so every one of those reversible\n * choices gets asked instead of defaulted. It sits in this menu because a flag\n * nobody is told about is a feature nobody has.\n */\nexport async function askStack(): Promise<SetupChoice> {\n const answer = await select({\n message: \"What are we building?\",\n options: [\n {\n value: \"api\",\n label: \"API only\",\n hint: \"A REST API, no server-rendered pages\",\n },\n {\n value: \"web\",\n label: \"Full-stack web\",\n hint: \"API + server-rendered React pages (SSR)\",\n },\n {\n value: \"customize\",\n label: \"Customize\",\n hint: \"Pick package manager, database, features, AI providers and coding agents one by one\",\n },\n ],\n initialValue: \"api\",\n });\n\n if (isCancel(answer)) {\n cancel(\"Setup cancelled\");\n process.exit(0);\n }\n\n return answer as SetupChoice;\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,eAAsB,WAAiC;CACrD,MAAM,SAAS,MAAM,OAAO;EAC1B,SAAS;EACT,SAAS;GACP;IACE,OAAO;IACP,OAAO;IACP,MAAM;GACR;GACA;IACE,OAAO;IACP,OAAO;IACP,MAAM;GACR;GACA;IACE,OAAO;IACP,OAAO;IACP,MAAM;GACR;EACF;EACA,cAAc;CAChB,CAAC;CAED,IAAI,SAAS,MAAM,GAAG;EACpB,OAAO,iBAAiB;EACxB,QAAQ,KAAK,CAAC;CAChB;CAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region ../../packages/create-warlock/src/prompts/fit-to-terminal.ts
|
|
2
|
+
/** Used when the output is not a terminal (piped, CI) and reports no size. */
|
|
3
|
+
const FALLBACK_COLUMNS = 80;
|
|
4
|
+
const FALLBACK_ROWS = 24;
|
|
5
|
+
/** Lines a multiselect draws besides its options: message, bars, scroll markers, a spare line. */
|
|
6
|
+
const PROMPT_CHROME_LINES = 6;
|
|
7
|
+
/** clack never shows fewer than five options, whatever maxItems says. */
|
|
8
|
+
const MIN_VISIBLE_OPTIONS = 5;
|
|
9
|
+
/** `│ ◻ ` before the label, ` (` and `)` around the hint. */
|
|
10
|
+
const ROW_PREFIX_WIDTH = 5;
|
|
11
|
+
const HINT_BRACKETS_WIDTH = 3;
|
|
12
|
+
/** Below this many characters a hint says nothing useful, so it is dropped. */
|
|
13
|
+
const MIN_HINT_WIDTH = 12;
|
|
14
|
+
/**
|
|
15
|
+
* How many options a multiselect may show at once in a terminal `rows` lines
|
|
16
|
+
* tall. clack scrolls the rest.
|
|
17
|
+
*/
|
|
18
|
+
function multiselectMaxItems(optionCount, rows = process.stdout.rows) {
|
|
19
|
+
const fit = Math.max(MIN_VISIBLE_OPTIONS, (rows && rows > 0 ? rows : FALLBACK_ROWS) - PROMPT_CHROME_LINES);
|
|
20
|
+
return Math.min(optionCount, fit);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Shorten each option's hint so its row (label and hint) fits on one line of a
|
|
24
|
+
* terminal `columns` wide. A hint with too little room left is dropped.
|
|
25
|
+
*/
|
|
26
|
+
function fitOptionsToWidth(options, columns = process.stdout.columns) {
|
|
27
|
+
const width = (columns && columns > 0 ? columns : FALLBACK_COLUMNS) - 1;
|
|
28
|
+
return options.map((option) => {
|
|
29
|
+
if (!option.hint) return option;
|
|
30
|
+
const room = width - ROW_PREFIX_WIDTH - option.label.length - HINT_BRACKETS_WIDTH;
|
|
31
|
+
if (option.hint.length <= room) return option;
|
|
32
|
+
if (room < MIN_HINT_WIDTH) {
|
|
33
|
+
const withoutHint = { ...option };
|
|
34
|
+
delete withoutHint.hint;
|
|
35
|
+
return withoutHint;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
...option,
|
|
39
|
+
hint: `${option.hint.slice(0, room - 1).trimEnd()}…`
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { fitOptionsToWidth, multiselectMaxItems };
|
|
46
|
+
//# sourceMappingURL=fit-to-terminal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-to-terminal.mjs","names":[],"sources":["../../../../../../../packages/create-warlock/src/prompts/fit-to-terminal.ts"],"sourcesContent":["/**\n * Sizing for clack list prompts, so a prompt never draws more lines than the\n * terminal shows.\n *\n * clack redraws a prompt by moving the cursor up as many lines as its last\n * frame had `\\n`s. When the frame is taller than the terminal, or a row is\n * wider than the terminal and wraps, the cursor cannot reach the old lines:\n * every redraw then prints a fresh copy of the list below the last one.\n * Keeping each row on one line and the option list within the terminal's\n * height avoids both.\n */\n\ntype ListOption = { label: string; hint?: string };\n\n/** Used when the output is not a terminal (piped, CI) and reports no size. */\nconst FALLBACK_COLUMNS = 80;\nconst FALLBACK_ROWS = 24;\n\n/** Lines a multiselect draws besides its options: message, bars, scroll markers, a spare line. */\nconst PROMPT_CHROME_LINES = 6;\n\n/** clack never shows fewer than five options, whatever maxItems says. */\nconst MIN_VISIBLE_OPTIONS = 5;\n\n/** `│ ◻ ` before the label, ` (` and `)` around the hint. */\nconst ROW_PREFIX_WIDTH = 5;\nconst HINT_BRACKETS_WIDTH = 3;\n\n/** Below this many characters a hint says nothing useful, so it is dropped. */\nconst MIN_HINT_WIDTH = 12;\n\n/**\n * How many options a multiselect may show at once in a terminal `rows` lines\n * tall. clack scrolls the rest.\n */\nexport function multiselectMaxItems(optionCount: number, rows = process.stdout.rows): number {\n const height = rows && rows > 0 ? rows : FALLBACK_ROWS;\n const fit = Math.max(MIN_VISIBLE_OPTIONS, height - PROMPT_CHROME_LINES);\n\n return Math.min(optionCount, fit);\n}\n\n/**\n * Shorten each option's hint so its row (label and hint) fits on one line of a\n * terminal `columns` wide. A hint with too little room left is dropped.\n */\nexport function fitOptionsToWidth<Option extends ListOption>(\n options: readonly Option[],\n columns = process.stdout.columns,\n): Option[] {\n const width = (columns && columns > 0 ? columns : FALLBACK_COLUMNS) - 1;\n\n return options.map((option) => {\n if (!option.hint) return option;\n\n const room = width - ROW_PREFIX_WIDTH - option.label.length - HINT_BRACKETS_WIDTH;\n\n if (option.hint.length <= room) return option;\n\n if (room < MIN_HINT_WIDTH) {\n const withoutHint = { ...option };\n\n delete withoutHint.hint;\n\n return withoutHint;\n }\n\n return { ...option, hint: `${option.hint.slice(0, room - 1).trimEnd()}…` };\n });\n}\n"],"mappings":";;AAeA,MAAM,mBAAmB;AACzB,MAAM,gBAAgB;;AAGtB,MAAM,sBAAsB;;AAG5B,MAAM,sBAAsB;;AAG5B,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;;AAG5B,MAAM,iBAAiB;;;;;AAMvB,SAAgB,oBAAoB,aAAqB,OAAO,QAAQ,OAAO,MAAc;CAE3F,MAAM,MAAM,KAAK,IAAI,sBADN,QAAQ,OAAO,IAAI,OAAO,iBACU,mBAAmB;CAEtE,OAAO,KAAK,IAAI,aAAa,GAAG;AAClC;;;;;AAMA,SAAgB,kBACd,SACA,UAAU,QAAQ,OAAO,SACf;CACV,MAAM,SAAS,WAAW,UAAU,IAAI,UAAU,oBAAoB;CAEtE,OAAO,QAAQ,KAAK,WAAW;EAC7B,IAAI,CAAC,OAAO,MAAM,OAAO;EAEzB,MAAM,OAAO,QAAQ,mBAAmB,OAAO,MAAM,SAAS;EAE9D,IAAI,OAAO,KAAK,UAAU,MAAM,OAAO;EAEvC,IAAI,OAAO,gBAAgB;GACzB,MAAM,cAAc,EAAE,GAAG,OAAO;GAEhC,OAAO,YAAY;GAEnB,OAAO;EACT;EAEA,OAAO;GAAE,GAAG;GAAQ,MAAM,GAAG,OAAO,KAAK,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;EAAG;CAC3E,CAAC;AACH"}
|
package/esm/summary.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getDatabaseLabel } from "./features/database-drivers.mjs";
|
|
2
2
|
import { colors } from "@mongez/copper";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../packages/create-warlock/src/summary.ts
|
|
5
5
|
/**
|
|
6
6
|
* Print what the scaffolder decided on the user's behalf, and how to change
|
|
7
7
|
* each decision — required because almost every choice is now a default
|
|
@@ -12,13 +12,23 @@ function printDecisionsSummary({ packageManager, options }) {
|
|
|
12
12
|
const headline = [
|
|
13
13
|
`Using ${packageManager}`,
|
|
14
14
|
`database: ${databaseLabel}`,
|
|
15
|
+
`lint: ${options.lint ?? "eslint"}`,
|
|
15
16
|
`agent-kit targets: ${options.agents.join(", ")}`
|
|
16
17
|
].join(" · ");
|
|
17
18
|
console.log();
|
|
18
19
|
console.log(colors.cyan(headline));
|
|
19
|
-
console.log(colors.
|
|
20
|
+
console.log(colors.cyan(summarizeFeatures([...options.features, ...options.aiProviders])));
|
|
21
|
+
console.log(colors.dim(" change these — package manager: --pm, database: --db/--no-db, agents: --agents, features: --features, ai: --ai, lint: --lint, git: --git/--no-git, jwt: --jwt/--no-jwt — or re-run with --interactive for the full wizard. Package-manager-level choices (husky, lint config, etc.) can also be edited directly in the generated project."));
|
|
20
22
|
console.log();
|
|
21
23
|
}
|
|
24
|
+
/** Keep the decision overview short; the final success screen lists every key. */
|
|
25
|
+
function summarizeFeatures(keys) {
|
|
26
|
+
const selected = [...new Set(keys)];
|
|
27
|
+
if (selected.length === 0) return "Features: none";
|
|
28
|
+
const preview = selected.slice(0, 6).join(", ");
|
|
29
|
+
const remaining = selected.length - 6;
|
|
30
|
+
return `Features (${selected.length}): ${preview}${remaining > 0 ? `, +${remaining} more` : ""}`;
|
|
31
|
+
}
|
|
22
32
|
|
|
23
33
|
//#endregion
|
|
24
34
|
export { printDecisionsSummary };
|
package/esm/summary.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"summary.mjs","names":[],"sources":["../../../../../../packages/create-warlock/src/summary.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { AppOptions } from \"./commands/create-new-app/types\";\nimport { getDatabaseLabel } from \"./features/database-drivers\";\n\n/** What decisions.spec.ts / the terminal actually needs to render the summary. */\nexport type Decisions = {\n packageManager: string;\n options: AppOptions;\n};\n\n/**\n * Print what the scaffolder decided on the user's behalf, and how to change\n * each decision — required because almost every choice is now a default\n * rather than a prompt, so this is the only place a user sees them.\n */\nexport function printDecisionsSummary({ packageManager, options }: Decisions): void {\n const databaseLabel = getDatabaseLabel(options.databaseDriver);\n\n const headline = [\n `Using ${packageManager}`,\n `database: ${databaseLabel}`,\n `lint: ${options.lint ?? \"eslint\"}`,\n `agent-kit targets: ${options.agents.join(\", \")}`,\n ].join(\" · \");\n\n console.log();\n console.log(colors.cyan(headline));\n console.log(colors.cyan(summarizeFeatures([...options.features, ...options.aiProviders])));\n console.log(\n colors.dim(\n \" change these — package manager: --pm, database: --db/--no-db, agents: --agents, \" +\n \"features: --features, ai: --ai, lint: --lint, git: --git/--no-git, jwt: --jwt/--no-jwt — \" +\n \"or re-run with --interactive for the full wizard. Package-manager-level choices \" +\n \"(husky, lint config, etc.) can also be edited directly in the generated project.\",\n ),\n );\n console.log();\n}\n\n/** Keep the decision overview short; the final success screen lists every key. */\nexport function summarizeFeatures(keys: readonly string[]): string {\n const selected = [...new Set(keys)];\n if (selected.length === 0) return \"Features: none\";\n const preview = selected.slice(0, 6).join(\", \");\n const remaining = selected.length - 6;\n return `Features (${selected.length}): ${preview}${remaining > 0 ? `, +${remaining} more` : \"\"}`;\n}\n"],"mappings":";;;;;;;;;AAeA,SAAgB,sBAAsB,EAAE,gBAAgB,WAA4B;CAClF,MAAM,gBAAgB,iBAAiB,QAAQ,cAAc;CAE7D,MAAM,WAAW;EACf,SAAS;EACT,aAAa;EACb,SAAS,QAAQ,QAAQ;EACzB,sBAAsB,QAAQ,OAAO,KAAK,IAAI;CAChD,CAAC,CAAC,KAAK,KAAK;CAEZ,QAAQ,IAAI;CACZ,QAAQ,IAAI,OAAO,KAAK,QAAQ,CAAC;CACjC,QAAQ,IAAI,OAAO,KAAK,kBAAkB,CAAC,GAAG,QAAQ,UAAU,GAAG,QAAQ,WAAW,CAAC,CAAC,CAAC;CACzF,QAAQ,IACN,OAAO,IACL,6UAIF,CACF;CACA,QAAQ,IAAI;AACd;;AAGA,SAAgB,kBAAkB,MAAiC;CACjE,MAAM,WAAW,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC;CAClC,IAAI,SAAS,WAAW,GAAG,OAAO;CAClC,MAAM,UAAU,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI;CAC9C,MAAM,YAAY,SAAS,SAAS;CACpC,OAAO,aAAa,SAAS,OAAO,KAAK,UAAU,YAAY,IAAI,MAAM,UAAU,SAAS;AAC9F"}
|
package/esm/ui/banner.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { visibleWidth, wrapStyledText, wrapText } from "./wrap-text.mjs";
|
|
1
2
|
import { colors } from "@mongez/copper";
|
|
2
3
|
|
|
3
|
-
//#region
|
|
4
|
+
//#region ../../packages/create-warlock/src/ui/banner.ts
|
|
4
5
|
const warlockTextAnsi = `
|
|
5
6
|
\x1b[49m
|
|
6
7
|
\x1b[49m \x1b[38;2;252;238;36m██╗ ██╗ █████╗ ██████╗ ██╗ ██████╗ ██████╗██╗ ██╗ \x1b[38;2;252;238;36m ██╗ ███████╗\x1b[m
|
|
@@ -64,55 +65,122 @@ function showIntroBanner(version) {
|
|
|
64
65
|
/**
|
|
65
66
|
* Get the success screen with project summary
|
|
66
67
|
*/
|
|
67
|
-
function getSuccessScreen(options) {
|
|
68
|
+
function getSuccessScreen(options, columns = process.stdout.columns) {
|
|
68
69
|
const { projectName, database, features, packageManager } = options;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
const terminalWidth = columns && columns > 0 ? Math.floor(columns) : 80;
|
|
71
|
+
const narrow = terminalWidth < 50;
|
|
72
|
+
const indent = narrow ? "" : " ";
|
|
73
|
+
const contentWidth = Math.max(2, terminalWidth - (narrow ? 0 : 10));
|
|
74
|
+
const heading = "🎉 YOUR PROJECT IS READY! 🎉";
|
|
75
|
+
const rows = [
|
|
76
|
+
{
|
|
77
|
+
label: "Project:",
|
|
78
|
+
value: projectName
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "Database:",
|
|
82
|
+
value: database
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "Features:",
|
|
86
|
+
value: features.join(", ") || "none"
|
|
87
|
+
}
|
|
88
|
+
].flatMap(({ label, value }) => wrapText(value, Math.max(2, contentWidth - 10)).map((line, index) => colors.dim((index === 0 ? label : "").padEnd(10)) + (label === "Features:" && !features.length ? colors.dim(line) : colors.white(line))));
|
|
89
|
+
let summary;
|
|
90
|
+
if (narrow) summary = [
|
|
91
|
+
...wrapText(heading, contentWidth).map((line) => colors.bold(colors.green(line))),
|
|
92
|
+
"",
|
|
93
|
+
...rows
|
|
94
|
+
];
|
|
95
|
+
else {
|
|
96
|
+
const innerWidth = Math.max(visibleWidth(heading), ...rows.map(visibleWidth)) + 6;
|
|
97
|
+
const border = (left, right) => indent + colors.magentaBright(left + "─".repeat(innerWidth) + right);
|
|
98
|
+
const row = (text, center = false) => {
|
|
99
|
+
const remaining = innerWidth - visibleWidth(text);
|
|
100
|
+
const left = center ? Math.floor(remaining / 2) : 3;
|
|
101
|
+
return indent + colors.magentaBright("│") + " ".repeat(left) + text + " ".repeat(remaining - left) + colors.magentaBright("│");
|
|
82
102
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
103
|
+
summary = [
|
|
104
|
+
border("╭", "╮"),
|
|
105
|
+
row(""),
|
|
106
|
+
row(colors.bold(colors.green(heading)), true),
|
|
107
|
+
row(""),
|
|
108
|
+
...rows.map((text) => row(text)),
|
|
109
|
+
row(""),
|
|
110
|
+
border("╰", "╯")
|
|
111
|
+
];
|
|
112
|
+
}
|
|
93
113
|
const devCommand = packageManager === "npm" ? "npm run dev" : `${packageManager} dev`;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
const nextSteps = [
|
|
115
|
+
{
|
|
116
|
+
indent,
|
|
117
|
+
segments: [{
|
|
118
|
+
text: "🚀 Next steps:",
|
|
119
|
+
style: (text) => colors.bold(colors.cyan(text))
|
|
120
|
+
}]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
indent: narrow ? "" : " ",
|
|
124
|
+
segments: [{
|
|
125
|
+
text: "cd ",
|
|
126
|
+
style: colors.cyan
|
|
127
|
+
}, {
|
|
128
|
+
text: projectName,
|
|
129
|
+
style: colors.white
|
|
130
|
+
}]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
indent: narrow ? "" : " ",
|
|
134
|
+
segments: [{
|
|
135
|
+
text: devCommand,
|
|
136
|
+
style: colors.cyan
|
|
137
|
+
}]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
indent,
|
|
141
|
+
segments: [
|
|
142
|
+
{
|
|
143
|
+
text: "💡 Pro tip: Install the ",
|
|
144
|
+
style: colors.dim
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
text: "Generator Z",
|
|
148
|
+
style: colors.yellow
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
text: " extension in VSCode for helpful code snippets and productivity boosters!",
|
|
152
|
+
style: colors.dim
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
indent,
|
|
158
|
+
segments: [{
|
|
159
|
+
text: "📚 Docs: ",
|
|
160
|
+
style: colors.dim
|
|
161
|
+
}, {
|
|
162
|
+
text: "https://warlock.js.org",
|
|
163
|
+
style: colors.cyan
|
|
164
|
+
}]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
indent,
|
|
168
|
+
segments: [{
|
|
169
|
+
text: "⭐ Star us: ",
|
|
170
|
+
style: colors.dim
|
|
171
|
+
}, {
|
|
172
|
+
text: "https://github.com/warlockjs/framework",
|
|
173
|
+
style: colors.cyan
|
|
174
|
+
}]
|
|
175
|
+
}
|
|
176
|
+
];
|
|
177
|
+
return [
|
|
178
|
+
"",
|
|
179
|
+
...summary,
|
|
180
|
+
"",
|
|
181
|
+
...nextSteps.flatMap(({ indent: lineIndent, segments }, index) => [...index === 1 || index === 3 || index === 4 ? [""] : [], ...wrapStyledText(segments, Math.max(2, terminalWidth - lineIndent.length)).map((line) => lineIndent + line)]),
|
|
182
|
+
""
|
|
183
|
+
].join("\n");
|
|
116
184
|
}
|
|
117
185
|
/**
|
|
118
186
|
* Display the success screen
|
package/esm/ui/banner.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.mjs","names":[],"sources":["../../../../../../create-warlock/src/ui/banner.ts"],"sourcesContent":["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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,gBAAgB,CAAC,EAAE;;OAExC,OAAO,KAAK,IAAI,EAAE,GAAG,YAAY;OACjC,OAAO,KAAK,UAAU,EAAE;;IAE3B,OAAO,IAAI,yBAAyB,EAAE,GAAG,OAAO,OAAO,aAAa,EAAE,GAAG,OAAO,IAAI,qBAAqB,EAAE;OACxG,OAAO,IAAI,sDAAsD,EAAE;;IAEtE,OAAO,IAAI,UAAU,EAAE,GAAG,OAAO,KAAK,wBAAwB,EAAE;IAChE,OAAO,IAAI,YAAY,EAAE,GAAG,OAAO,KAAK,wCAAwC,EAAE;;AAEtF;;;;AAKA,SAAgB,kBAAkB,SAKzB;CACP,QAAQ,IAAI,iBAAiB,OAAO,CAAC;AACvC"}
|
|
1
|
+
{"version":3,"file":"banner.mjs","names":[],"sources":["../../../../../../../packages/create-warlock/src/ui/banner.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { visibleWidth, wrapStyledText, wrapText, type StyledSegment } from \"./wrap-text\";\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(\n options: {\n projectName: string;\n database: string;\n features: string[];\n packageManager: string;\n },\n columns = process.stdout.columns,\n): string {\n const { projectName, database, features, packageManager } = options;\n const terminalWidth = columns && columns > 0 ? Math.floor(columns) : 80;\n const narrow = terminalWidth < 50;\n const indent = narrow ? \"\" : \" \";\n const contentWidth = Math.max(2, terminalWidth - (narrow ? 0 : 10));\n const heading = \"🎉 YOUR PROJECT IS READY! 🎉\";\n const entries = [\n { label: \"Project:\", value: projectName },\n { label: \"Database:\", value: database },\n { label: \"Features:\", value: features.join(\", \") || \"none\" },\n ];\n const rows = entries.flatMap(({ label, value }) =>\n wrapText(value, Math.max(2, contentWidth - 10)).map(\n (line, index) =>\n colors.dim((index === 0 ? label : \"\").padEnd(10)) +\n (label === \"Features:\" && !features.length ? colors.dim(line) : colors.white(line)),\n ),\n );\n let summary: string[];\n if (narrow) {\n summary = [\n ...wrapText(heading, contentWidth).map((line) => colors.bold(colors.green(line))),\n \"\",\n ...rows,\n ];\n } else {\n const innerWidth = Math.max(visibleWidth(heading), ...rows.map(visibleWidth)) + 6;\n const border = (left: string, right: string) =>\n indent + colors.magentaBright(left + \"─\".repeat(innerWidth) + right);\n const row = (text: string, center = false) => {\n const remaining = innerWidth - visibleWidth(text);\n const left = center ? Math.floor(remaining / 2) : 3;\n return (\n indent +\n colors.magentaBright(\"│\") +\n \" \".repeat(left) +\n text +\n \" \".repeat(remaining - left) +\n colors.magentaBright(\"│\")\n );\n };\n summary = [\n border(\"╭\", \"╮\"),\n row(\"\"),\n row(colors.bold(colors.green(heading)), true),\n row(\"\"),\n ...rows.map((text) => row(text)),\n row(\"\"),\n border(\"╰\", \"╯\"),\n ];\n }\n const devCommand = packageManager === \"npm\" ? \"npm run dev\" : `${packageManager} dev`;\n const nextSteps: { indent: string; segments: StyledSegment[] }[] = [\n {\n indent,\n segments: [\n {\n text: \"🚀 Next steps:\",\n style: (text) => colors.bold(colors.cyan(text)),\n },\n ],\n },\n {\n indent: narrow ? \"\" : \" \",\n segments: [\n { text: \"cd \", style: colors.cyan },\n { text: projectName, style: colors.white },\n ],\n },\n {\n indent: narrow ? \"\" : \" \",\n segments: [{ text: devCommand, style: colors.cyan }],\n },\n {\n indent,\n segments: [\n { text: \"💡 Pro tip: Install the \", style: colors.dim },\n { text: \"Generator Z\", style: colors.yellow },\n {\n text: \" extension in VSCode for helpful code snippets and productivity boosters!\",\n style: colors.dim,\n },\n ],\n },\n {\n indent,\n segments: [\n { text: \"📚 Docs: \", style: colors.dim },\n { text: \"https://warlock.js.org\", style: colors.cyan },\n ],\n },\n {\n indent,\n segments: [\n { text: \"⭐ Star us: \", style: colors.dim },\n { text: \"https://github.com/warlockjs/framework\", style: colors.cyan },\n ],\n },\n ];\n return [\n \"\",\n ...summary,\n \"\",\n ...nextSteps.flatMap(({ indent: lineIndent, segments }, index) => [\n ...(index === 1 || index === 3 || index === 4 ? [\"\"] : []),\n ...wrapStyledText(segments, Math.max(2, terminalWidth - lineIndent.length)).map(\n (line) => lineIndent + line,\n ),\n ]),\n \"\",\n ].join(\"\\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"],"mappings":";;;;AAGA,MAAa,kBAAkB;;;;;;;;;;AAW/B,MAAa,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6B/B,SAAgB,eAAe,SAAyB;CACtD,MAAM,cAAc,IAAI;CAExB,MAAM,UAAU,IAAI,OAAO,KAAiB,YAAY,MAAM;CAE9D,OAAO;IACL,OAAO,cAAc,0CAA0C,EAAE;IACjE,OAAO,cAAc,GAAG,EAAE,wCAAwC,OAAO,cAAc,GAAG,EAAE;IAC5F,OAAO,cAAc,GAAG,EAAE,QAAQ,OAAO,KAAK,OAAO,aAAa,YAAY,CAAC,EAAE,wBAAwB,OAAO,cAAc,GAAG,EAAE;IACnI,OAAO,cAAc,GAAG,EAAE,KAAK,OAAO,KAAK,+BAA+B,EAAE,QAAQ,OAAO,cAAc,GAAG,EAAE;IAC9G,OAAO,cAAc,GAAG,EAAE,wCAAwC,OAAO,cAAc,GAAG,EAAE;IAC5F,OAAO,cAAc,GAAG,EAAE,KAAK,OAAO,MAAM,WAAW,IAAI,UAAU,OAAO,cAAc,GAAG,EAAE;IAC/F,OAAO,cAAc,GAAG,EAAE,wCAAwC,OAAO,cAAc,GAAG,EAAE;IAC5F,OAAO,cAAc,0CAA0C,EAAE;;AAErE;;;;AAKA,SAAgB,gBAAgB,SAAuB;CACrD,QAAQ,IAAI,eAAe;CAC3B,QAAQ,IAAI,eAAe;CAC3B,QAAQ,IAAI,eAAe,OAAO,CAAC;AACrC;;;;AAKA,SAAgB,iBACd,SAMA,UAA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AG,eAAe,UAAU,KAAK,IAAI,GAAG,gBAAgB,WAAW,MAAM,CAAC,CAAC,CAAC,KACzE,SAAS,aAAa,IACzB,CACF,CAAC;EACD;CACF,CAAC,CAAC,KAAK,IAAI;AACb;;;;AAKA,SAAgB,kBAAkB,SAKzB;CACP,QAAQ,IAAI,iBAAiB,OAAO,CAAC;AACvC"}
|
package/esm/ui/report.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tail } from "../helpers/exec.mjs";
|
|
2
2
|
import { colors } from "@mongez/copper";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../packages/create-warlock/src/ui/report.ts
|
|
5
5
|
const bullet = colors.red("✖");
|
|
6
6
|
/**
|
|
7
7
|
* The command line, its exit status, and the tail of what it printed.
|
package/esm/ui/report.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.mjs","names":[],"sources":["../../../../../../create-warlock/src/ui/report.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport type { CommandResult } from \"../helpers/exec\";\nimport { tail } from \"../helpers/exec\";\n\n/**\n * Failure reporting for the scaffolder.\n *\n * The house rule this module enforces: a step that did not succeed is never\n * described as if it did, and a failure always carries three things — WHAT ran,\n * HOW it ended (exit code), and ENOUGH of its output to act on. \"Something went\n * wrong, add it later\" is not a report.\n */\n\n/** A step that did not do what the user asked for. */\nexport type Problem = {\n /** The step, e.g. `Dependency install`. */\n step: string;\n /** One-line summary of what is now missing / broken. */\n detail: string;\n /** The command behind the failure, when there was one. */\n result?: CommandResult;\n /** Extra guidance: how to retry, what to check. */\n hints?: string[];\n};\n\nconst bullet = colors.red(\"✖\");\n\n/**\n * The command line, its exit status, and the tail of what it printed.\n */\nfunction describeCommand(result: CommandResult): string[] {\n const lines: string[] = [];\n\n lines.push(`${colors.dim(\"command:\")} ${colors.white(result.command)}`);\n\n if (result.cwd) {\n lines.push(`${colors.dim(\"in:\")} ${colors.white(result.cwd)}`);\n }\n\n if (result.error) {\n lines.push(\n `${colors.dim(\"failed:\")} ${colors.white(result.error.message || String(result.error))}`,\n );\n } else if (result.signal) {\n lines.push(`${colors.dim(\"killed:\")} ${colors.white(result.signal)}`);\n } else {\n lines.push(\n `${colors.dim(\"exited:\")} ${colors.white(`code ${result.code}`)}`,\n );\n }\n\n const output = tail(result.stderr) || tail(result.stdout);\n\n if (output) {\n lines.push(colors.dim(\"output:\"));\n\n for (const line of output.split(\"\\n\")) {\n lines.push(` ${colors.dim(line)}`);\n }\n }\n\n return lines;\n}\n\nfunction printProblem(problem: Problem) {\n console.log(` ${bullet} ${colors.bold(colors.red(problem.step))}`);\n console.log(` ${colors.white(problem.detail)}`);\n\n if (problem.result) {\n for (const line of describeCommand(problem.result)) {\n console.log(` ${line}`);\n }\n }\n\n for (const hint of problem.hints ?? []) {\n console.log(` ${colors.yellow(\"→\")} ${colors.yellow(hint)}`);\n }\n\n console.log();\n}\n\n/**\n * Report a failure the scaffold cannot continue past, and leave the process\n * with a non-zero exit code. Nothing after this point may print a success.\n */\nexport function failFatally(problem: Problem): never {\n console.log();\n console.log(colors.bold(colors.red(\" SCAFFOLD FAILED\")));\n console.log();\n\n printProblem(problem);\n\n console.log(\n colors.dim(\n \" The project directory was left in place so you can inspect it.\",\n ),\n );\n console.log();\n\n process.exit(1);\n}\n\n/**\n * Report the steps that failed on a scaffold that otherwise completed, and say\n * plainly what the project does NOT have as a result.\n */\nexport function showProblems(problems: Problem[]) {\n if (problems.length === 0) return;\n\n console.log();\n console.log(\n colors.bold(\n colors.yellow(\n ` COMPLETED WITH ${problems.length} PROBLEM${problems.length === 1 ? \"\" : \"S\"}`,\n ),\n ),\n );\n console.log();\n\n for (const problem of problems) {\n printProblem(problem);\n }\n}\n\n/** Neutral, non-failing information — e.g. which versions got pinned and why. */\nexport function showNotes(notes: string[]) {\n for (const note of notes) {\n console.log(` ${colors.yellow(\"!\")} ${colors.dim(note)}`);\n }\n\n if (notes.length > 0) console.log();\n}\n\n/**\n * A scaffold that finished with problems still produced a project, so print the\n * same facts the success screen would — minus the celebration, and listing only\n * what is actually installed.\n */\nexport function showPartialScreen(options: {\n projectName: string;\n database: string;\n features: string[];\n missingFeatures: string[];\n packageManager: string;\n}): void {\n const { projectName, database, features, missingFeatures, packageManager } =\n options;\n\n const devCommand =\n packageManager === \"npm\" ? \"npm run dev\" : `${packageManager} dev`;\n\n console.log(\n ` ${colors.bold(colors.yellow(\"⚠ PROJECT CREATED — BUT NOT AS REQUESTED\"))}`,\n );\n console.log();\n console.log(` ${colors.dim(\"Project: \")}${colors.white(projectName)}`);\n console.log(` ${colors.dim(\"Database: \")}${colors.white(database)}`);\n console.log(\n ` ${colors.dim(\"Installed:\")}${colors.white(features.length > 0 ? \" \" + features.join(\", \") : \" none\")}`,\n );\n\n if (missingFeatures.length > 0) {\n console.log(\n ` ${colors.dim(\"Missing: \")}${colors.red(missingFeatures.join(\", \"))}`,\n );\n }\n\n console.log();\n console.log(` ${colors.dim(\"Fix the problems above, then:\")}`);\n console.log();\n console.log(` ${colors.cyan(\"cd\")} ${projectName}`);\n\n if (missingFeatures.length > 0) {\n console.log(\n ` ${colors.cyan(`npx warlock add ${missingFeatures.join(\" \")}`)}`,\n );\n }\n\n console.log(` ${colors.cyan(devCommand)}`);\n console.log();\n}\n\n/**\n * Turn an npm/yarn/pnpm failure into actionable guidance where we can\n * recognise it. `ETARGET` in particular is the signature of a dependency\n * pinned to a version that was never published — the bug this whole reporting\n * path was written for.\n */\nexport function installFailureHints(result: CommandResult | undefined) {\n const output = `${result?.stdout ?? \"\"}${result?.stderr ?? \"\"}`;\n const projectDirectory =\n result?.cwd ?? \"the already-created project directory\";\n const command = result?.command ?? \"the install command\";\n const npmArboristFailure =\n command.startsWith(\"npm \") &&\n /Cannot read properties of null \\(reading 'edgesOut'\\)/i.test(output);\n\n if (npmArboristFailure) {\n return [\n \"Detected npm 10.9.x: its Arborist peer-dependency resolver has a defect (`edgesOut`); this is not a problem with your project.\",\n `To finish from ${projectDirectory}: run \\`cd ${projectDirectory}\\`, then \\`npm install -g npm@11\\` and \\`${command}\\`.`,\n `Or, from ${projectDirectory}, install with \\`pnpm install\\` or \\`yarn install\\`.`,\n ];\n }\n\n const logPath = output.match(\n /A complete log of this run can be found in:\\s*(\\S+)/i,\n )?.[1];\n const hints = [\n `The project remains at ${projectDirectory}; \\`${command}\\` failed there.`,\n logPath\n ? `Review the package manager's log at ${logPath} before retrying.`\n : \"Review the package manager's own log path in the output above before retrying.\",\n ];\n\n if (/ETARGET|No matching version found/i.test(output)) {\n hints.push(\n \"A dependency is pinned to a version that does not exist on the registry — check the @warlock.js/* versions in package.json.\",\n );\n }\n\n if (/ENOTFOUND|ETIMEDOUT|ECONNREFUSED|network/i.test(output)) {\n hints.push(\"The registry was unreachable — check your network or proxy.\");\n }\n\n if (/EACCES|EPERM/i.test(output)) {\n hints.push(\n \"Permission denied — check the directory's ownership before retrying.\",\n );\n }\n\n return hints;\n}\n"],"mappings":";;;;AAyBA,MAAM,SAAS,OAAO,IAAI,GAAG;;;;AAK7B,SAAS,gBAAgB,QAAiC;CACxD,MAAM,QAAkB,CAAC;CAEzB,MAAM,KAAK,GAAG,OAAO,IAAI,UAAU,EAAE,GAAG,OAAO,MAAM,OAAO,OAAO,GAAG;CAEtE,IAAI,OAAO,KACT,MAAM,KAAK,GAAG,OAAO,IAAI,KAAK,EAAE,QAAQ,OAAO,MAAM,OAAO,GAAG,GAAG;CAGpE,IAAI,OAAO,OACT,MAAM,KACJ,GAAG,OAAO,IAAI,SAAS,EAAE,IAAI,OAAO,MAAM,OAAO,MAAM,WAAW,OAAO,OAAO,KAAK,CAAC,GACxF;MACK,IAAI,OAAO,QAChB,MAAM,KAAK,GAAG,OAAO,IAAI,SAAS,EAAE,IAAI,OAAO,MAAM,OAAO,MAAM,GAAG;MAErE,MAAM,KACJ,GAAG,OAAO,IAAI,SAAS,EAAE,IAAI,OAAO,MAAM,QAAQ,OAAO,MAAM,GACjE;CAG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IAHE,QAAQ,WAAW,MAAM,KACzB,yDAAyD,KAAK,MAAM,GAGpE,OAAO;EACL;EACA,kBAAkB,iBAAiB,aAAa,iBAAiB,2CAA2C,QAAQ;EACpH,YAAY,iBAAiB;CAC/B;CAGF,MAAM,UAAU,OAAO,MACrB,sDACF,CAAC,GAAG;CACJ,MAAM,QAAQ,CACZ,0BAA0B,iBAAiB,MAAM,QAAQ,mBACzD,UACI,uCAAuC,QAAQ,qBAC/C,gFACN;CAEA,IAAI,qCAAqC,KAAK,MAAM,GAClD,MAAM,KACJ,6HACF;CAGF,IAAI,4CAA4C,KAAK,MAAM,GACzD,MAAM,KAAK,6DAA6D;CAG1E,IAAI,gBAAgB,KAAK,MAAM,GAC7B,MAAM,KACJ,sEACF;CAGF,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"report.mjs","names":[],"sources":["../../../../../../../packages/create-warlock/src/ui/report.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport type { CommandResult } from \"../helpers/exec\";\nimport { tail } from \"../helpers/exec\";\n\n/**\n * Failure reporting for the scaffolder.\n *\n * The house rule this module enforces: a step that did not succeed is never\n * described as if it did, and a failure always carries three things — WHAT ran,\n * HOW it ended (exit code), and ENOUGH of its output to act on. \"Something went\n * wrong, add it later\" is not a report.\n */\n\n/** A step that did not do what the user asked for. */\nexport type Problem = {\n /** The step, e.g. `Dependency install`. */\n step: string;\n /** One-line summary of what is now missing / broken. */\n detail: string;\n /** The command behind the failure, when there was one. */\n result?: CommandResult;\n /** Extra guidance: how to retry, what to check. */\n hints?: string[];\n};\n\nconst bullet = colors.red(\"✖\");\n\n/**\n * The command line, its exit status, and the tail of what it printed.\n */\nfunction describeCommand(result: CommandResult): string[] {\n const lines: string[] = [];\n\n lines.push(`${colors.dim(\"command:\")} ${colors.white(result.command)}`);\n\n if (result.cwd) {\n lines.push(`${colors.dim(\"in:\")} ${colors.white(result.cwd)}`);\n }\n\n if (result.error) {\n lines.push(\n `${colors.dim(\"failed:\")} ${colors.white(result.error.message || String(result.error))}`,\n );\n } else if (result.signal) {\n lines.push(`${colors.dim(\"killed:\")} ${colors.white(result.signal)}`);\n } else {\n lines.push(`${colors.dim(\"exited:\")} ${colors.white(`code ${result.code}`)}`);\n }\n\n const output = tail(result.stderr) || tail(result.stdout);\n\n if (output) {\n lines.push(colors.dim(\"output:\"));\n\n for (const line of output.split(\"\\n\")) {\n lines.push(` ${colors.dim(line)}`);\n }\n }\n\n return lines;\n}\n\nfunction printProblem(problem: Problem) {\n console.log(` ${bullet} ${colors.bold(colors.red(problem.step))}`);\n console.log(` ${colors.white(problem.detail)}`);\n\n if (problem.result) {\n for (const line of describeCommand(problem.result)) {\n console.log(` ${line}`);\n }\n }\n\n for (const hint of problem.hints ?? []) {\n console.log(` ${colors.yellow(\"→\")} ${colors.yellow(hint)}`);\n }\n\n console.log();\n}\n\n/**\n * Report a failure the scaffold cannot continue past, and leave the process\n * with a non-zero exit code. Nothing after this point may print a success.\n */\nexport function failFatally(problem: Problem): never {\n console.log();\n console.log(colors.bold(colors.red(\" SCAFFOLD FAILED\")));\n console.log();\n\n printProblem(problem);\n\n console.log(colors.dim(\" The project directory was left in place so you can inspect it.\"));\n console.log();\n\n process.exit(1);\n}\n\n/**\n * Report the steps that failed on a scaffold that otherwise completed, and say\n * plainly what the project does NOT have as a result.\n */\nexport function showProblems(problems: Problem[]) {\n if (problems.length === 0) return;\n\n console.log();\n console.log(\n colors.bold(\n colors.yellow(\n ` COMPLETED WITH ${problems.length} PROBLEM${problems.length === 1 ? \"\" : \"S\"}`,\n ),\n ),\n );\n console.log();\n\n for (const problem of problems) {\n printProblem(problem);\n }\n}\n\n/** Neutral, non-failing information — e.g. which versions got pinned and why. */\nexport function showNotes(notes: string[]) {\n for (const note of notes) {\n console.log(` ${colors.yellow(\"!\")} ${colors.dim(note)}`);\n }\n\n if (notes.length > 0) console.log();\n}\n\n/**\n * A scaffold that finished with problems still produced a project, so print the\n * same facts the success screen would — minus the celebration, and listing only\n * what is actually installed.\n */\nexport function showPartialScreen(options: {\n projectName: string;\n database: string;\n features: string[];\n missingFeatures: string[];\n packageManager: string;\n}): void {\n const { projectName, database, features, missingFeatures, packageManager } = options;\n\n const devCommand = packageManager === \"npm\" ? \"npm run dev\" : `${packageManager} dev`;\n\n console.log(` ${colors.bold(colors.yellow(\"⚠ PROJECT CREATED — BUT NOT AS REQUESTED\"))}`);\n console.log();\n console.log(` ${colors.dim(\"Project: \")}${colors.white(projectName)}`);\n console.log(` ${colors.dim(\"Database: \")}${colors.white(database)}`);\n console.log(\n ` ${colors.dim(\"Installed:\")}${colors.white(features.length > 0 ? \" \" + features.join(\", \") : \" none\")}`,\n );\n\n if (missingFeatures.length > 0) {\n console.log(` ${colors.dim(\"Missing: \")}${colors.red(missingFeatures.join(\", \"))}`);\n }\n\n console.log();\n console.log(` ${colors.dim(\"Fix the problems above, then:\")}`);\n console.log();\n console.log(` ${colors.cyan(\"cd\")} ${projectName}`);\n\n if (missingFeatures.length > 0) {\n console.log(` ${colors.cyan(`npx warlock add ${missingFeatures.join(\" \")}`)}`);\n }\n\n console.log(` ${colors.cyan(devCommand)}`);\n console.log();\n}\n\n/**\n * Turn an npm/yarn/pnpm failure into actionable guidance where we can\n * recognise it. `ETARGET` in particular is the signature of a dependency\n * pinned to a version that was never published — the bug this whole reporting\n * path was written for.\n */\nexport function installFailureHints(result: CommandResult | undefined) {\n const output = `${result?.stdout ?? \"\"}${result?.stderr ?? \"\"}`;\n const projectDirectory = result?.cwd ?? \"the already-created project directory\";\n const command = result?.command ?? \"the install command\";\n const npmArboristFailure =\n command.startsWith(\"npm \") &&\n /Cannot read properties of null \\(reading 'edgesOut'\\)/i.test(output);\n\n if (npmArboristFailure) {\n return [\n \"Detected npm 10.9.x: its Arborist peer-dependency resolver has a defect (`edgesOut`); this is not a problem with your project.\",\n `To finish from ${projectDirectory}: run \\`cd ${projectDirectory}\\`, then \\`npm install -g npm@11\\` and \\`${command}\\`.`,\n `Or, from ${projectDirectory}, install with \\`pnpm install\\` or \\`yarn install\\`.`,\n ];\n }\n\n const logPath = output.match(/A complete log of this run can be found in:\\s*(\\S+)/i)?.[1];\n const hints = [\n `The project remains at ${projectDirectory}; \\`${command}\\` failed there.`,\n logPath\n ? `Review the package manager's log at ${logPath} before retrying.`\n : \"Review the package manager's own log path in the output above before retrying.\",\n ];\n\n if (/ETARGET|No matching version found/i.test(output)) {\n hints.push(\n \"A dependency is pinned to a version that does not exist on the registry — check the @warlock.js/* versions in package.json.\",\n );\n }\n\n if (/ENOTFOUND|ETIMEDOUT|ECONNREFUSED|network/i.test(output)) {\n hints.push(\"The registry was unreachable — check your network or proxy.\");\n }\n\n if (/EACCES|EPERM/i.test(output)) {\n hints.push(\"Permission denied — check the directory's ownership before retrying.\");\n }\n\n return hints;\n}\n"],"mappings":";;;;AAyBA,MAAM,SAAS,OAAO,IAAI,GAAG;;;;AAK7B,SAAS,gBAAgB,QAAiC;CACxD,MAAM,QAAkB,CAAC;CAEzB,MAAM,KAAK,GAAG,OAAO,IAAI,UAAU,EAAE,GAAG,OAAO,MAAM,OAAO,OAAO,GAAG;CAEtE,IAAI,OAAO,KACT,MAAM,KAAK,GAAG,OAAO,IAAI,KAAK,EAAE,QAAQ,OAAO,MAAM,OAAO,GAAG,GAAG;CAGpE,IAAI,OAAO,OACT,MAAM,KACJ,GAAG,OAAO,IAAI,SAAS,EAAE,IAAI,OAAO,MAAM,OAAO,MAAM,WAAW,OAAO,OAAO,KAAK,CAAC,GACxF;MACK,IAAI,OAAO,QAChB,MAAM,KAAK,GAAG,OAAO,IAAI,SAAS,EAAE,IAAI,OAAO,MAAM,OAAO,MAAM,GAAG;MAErE,MAAM,KAAK,GAAG,OAAO,IAAI,SAAS,EAAE,IAAI,OAAO,MAAM,QAAQ,OAAO,MAAM,GAAG;CAG/E,MAAM,SAAS,KAAK,OAAO,MAAM,KAAK,KAAK,OAAO,MAAM;CAExD,IAAI,QAAQ;EACV,MAAM,KAAK,OAAO,IAAI,SAA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aAAa,iBAAiB,2CAA2C,QAAQ;EACpH,YAAY,iBAAiB;CAC/B;CAGF,MAAM,UAAU,OAAO,MAAM,sDAAsD,CAAC,GAAG;CACvF,MAAM,QAAQ,CACZ,0BAA0B,iBAAiB,MAAM,QAAQ,mBACzD,UACI,uCAAuC,QAAQ,qBAC/C,gFACN;CAEA,IAAI,qCAAqC,KAAK,MAAM,GAClD,MAAM,KACJ,6HACF;CAGF,IAAI,4CAA4C,KAAK,MAAM,GACzD,MAAM,KAAK,6DAA6D;CAG1E,IAAI,gBAAgB,KAAK,MAAM,GAC7B,MAAM,KAAK,sEAAsE;CAGnF,OAAO;AACT"}
|
package/esm/ui/spinner.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spinner } from "@clack/prompts";
|
|
2
2
|
import { colors } from "@mongez/copper";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../packages/create-warlock/src/ui/spinner.ts
|
|
5
5
|
/**
|
|
6
6
|
* A spinner that animates on a real terminal and stays quiet everywhere else.
|
|
7
7
|
*
|
package/esm/ui/spinner.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.mjs","names":["spinner","clackSpinner"],"sources":["
|
|
1
|
+
{"version":3,"file":"spinner.mjs","names":["spinner","clackSpinner"],"sources":["../../../../../../../packages/create-warlock/src/ui/spinner.ts"],"sourcesContent":["import { spinner as clackSpinner } from \"@clack/prompts\";\nimport { colors } from \"@mongez/copper\";\n\n/**\n * The subset of the spinner surface the scaffolder actually drives: a step is\n * started, optionally re-messaged, and stopped with a success/failure code.\n * Deliberately identical to `@clack/prompts`' spinner so the animated path can\n * be returned as-is on a real terminal.\n */\nexport type Spinner = {\n /** Begin the step (starts the animation on a TTY). */\n start: (message?: string) => void;\n /** End the step. `code` 0 is success; anything else is a failure. */\n stop: (message?: string, code?: number) => void;\n /** Update the in-flight message (animation-only). */\n message: (message?: string) => void;\n};\n\n/**\n * A spinner that animates on a real terminal and stays quiet everywhere else.\n *\n * `@clack/prompts`' spinner drives its animation from a `setInterval` that\n * rewrites the current line several times a second using cursor-move escapes.\n * On a TTY those escapes redraw one line in place. On a NON-TTY (a pipe, CI, an\n * agent harness) `process.stdout.isTTY` is `undefined` and the escapes do\n * nothing, so every frame lands as a fresh chunk of output: a single ~21s\n * install step alone buries the log under hundreds of near-identical lines.\n *\n * The animation is a courtesy for a human watching a live terminal; it has no\n * value in a captured log. So on a non-TTY we skip the frame loop entirely and\n * print exactly one line when the step starts and one when it stops — the\n * progress stays legible without the flood. See `specs/spinner.spec.ts`.\n */\nexport function spinner(): Spinner {\n if (process.stdout.isTTY) {\n return clackSpinner();\n }\n\n // Match @clack's own message hygiene: it strips a trailing \"...\" because the\n // animated dots stand in for it. Our static lines carry no dots, so drop them.\n const clean = (message = \"\"): string => message.replace(/\\.+$/, \"\");\n\n return {\n start(message = \"\") {\n process.stdout.write(`${colors.magenta(\"○\")} ${clean(message)}\\n`);\n },\n stop(message = \"\", code = 0) {\n const symbol = code === 0 ? colors.green(\"✓\") : colors.red(\"✖\");\n\n process.stdout.write(`${symbol} ${clean(message)}\\n`);\n },\n message() {\n // Intermediate messages exist only to animate the live line. On a non-TTY\n // the start and stop lines already tell the whole story, so this is a\n // deliberate no-op — the alternative is one extra line per update, which\n // is exactly the flood this module exists to prevent.\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,SAAgBA,YAAmB;CACjC,IAAI,QAAQ,OAAO,OACjB,OAAOC,QAAa;CAKtB,MAAM,SAAS,UAAU,OAAe,QAAQ,QAAQ,QAAQ,EAAE;CAElE,OAAO;EACL,MAAM,UAAU,IAAI;GAClB,QAAQ,OAAO,MAAM,GAAG,OAAO,QAAQ,GAAG,EAAE,GAAG,MAAM,OAAO,EAAE,GAAG;EACnE;EACA,KAAK,UAAU,IAAI,OAAO,GAAG;GAC3B,MAAM,SAAS,SAAS,IAAI,OAAO,MAAM,GAAG,IAAI,OAAO,IAAI,GAAG;GAE9D,QAAQ,OAAO,MAAM,GAAG,OAAO,GAAG,MAAM,OAAO,EAAE,GAAG;EACtD;EACA,UAAU,CAKV;CACF;AACF"}
|
package/esm/ui/spinners.mjs
CHANGED
package/esm/ui/spinners.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinners.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"spinners.mjs","names":[],"sources":["../../../../../../../packages/create-warlock/src/ui/spinners.ts"],"sourcesContent":["/**\n * Themed spinner messages for the wizard.\n *\n * Every step has BOTH a success and a failure message, and the orchestrator\n * picks between them from the step's actual result. A spinner that can only\n * stop with a cheerful message is a spinner that lies.\n */\nexport const spinnerMessages = {\n installingDeps: \"Summoning dependencies...\",\n depsInstalled: \"Dependencies materialized!\",\n depsFailed: \"Dependencies could not be installed\",\n\n initializingGit: \"Initializing grimoire (git)...\",\n gitInitialized: \"Grimoire initialized!\",\n gitFailed: \"Git repository was not initialized\",\n\n generatingJwt: \"Forging secret keys...\",\n jwtGenerated: \"Secret keys forged!\",\n jwtFailed: \"Secret keys were NOT generated\",\n\n warmingCache: \"Charging magical circuits...\",\n cacheWarmed: \"Circuits charged!\",\n cacheWarmFailed: \"Cache could not be warmed (harmless — it builds on first run)\",\n\n addingFeatures: \"Weaving in your features...\",\n featuresAdded: \"Features woven in!\",\n featuresPartial: \"Some features were not added\",\n featuresFailed: \"No features could be added\",\n\n copyingTemplate: \"Preparing your spellbook...\",\n templateCopied: \"Spellbook ready!\",\n templateFailed: \"The project template could not be copied\",\n} as const;\n"],"mappings":";;;;;;;;AAOA,MAAa,kBAAkB;CAC7B,gBAAgB;CAChB,eAAe;CACf,YAAY;CAEZ,iBAAiB;CACjB,gBAAgB;CAChB,WAAW;CAEX,eAAe;CACf,cAAc;CACd,WAAW;CAEX,cAAc;CACd,aAAa;CACb,iBAAiB;CAEjB,gBAAgB;CAChB,eAAe;CACf,iBAAiB;CACjB,gBAAgB;CAEhB,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;AAClB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { stripVTControlCharacters } from "node:util";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/create-warlock/src/ui/wrap-text.ts
|
|
4
|
+
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
5
|
+
function visibleWidth(text) {
|
|
6
|
+
let width = 0;
|
|
7
|
+
for (const { segment } of segmenter.segment(stripVTControlCharacters(text))) {
|
|
8
|
+
if (/^[\p{Mark}\p{Control}\p{Format}]+$/u.test(segment)) continue;
|
|
9
|
+
const point = segment.codePointAt(0);
|
|
10
|
+
const wide = /[\p{Extended_Pictographic}\p{Regional_Indicator}]/u.test(segment) || point >= 4352 && (point <= 4447 || point === 9001 || point === 9002 || point >= 11904 && point <= 42191 || point >= 44032 && point <= 55203 || point >= 63744 && point <= 64255 || point >= 65040 && point <= 65135 || point >= 65281 && point <= 65376 || point >= 65504 && point <= 65510 || point >= 131072 && point <= 262141);
|
|
11
|
+
width += wide ? 2 : 1;
|
|
12
|
+
}
|
|
13
|
+
return width;
|
|
14
|
+
}
|
|
15
|
+
function wrapText(text, width) {
|
|
16
|
+
const lines = [];
|
|
17
|
+
let line = "";
|
|
18
|
+
for (const word of stripVTControlCharacters(text).split(/\s+/u)) {
|
|
19
|
+
if (line && visibleWidth(`${line} ${word}`) > width) {
|
|
20
|
+
lines.push(line);
|
|
21
|
+
line = "";
|
|
22
|
+
}
|
|
23
|
+
for (const { segment } of segmenter.segment(`${line ? " " : ""}${word}`)) {
|
|
24
|
+
if (visibleWidth(line + segment) > width) {
|
|
25
|
+
lines.push(line);
|
|
26
|
+
line = "";
|
|
27
|
+
}
|
|
28
|
+
line += segment;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (line || !lines.length) lines.push(line);
|
|
32
|
+
return lines;
|
|
33
|
+
}
|
|
34
|
+
function wrapStyledText(segments, width) {
|
|
35
|
+
const text = segments.map((segment) => segment.text).join("");
|
|
36
|
+
let offset = 0;
|
|
37
|
+
return wrapText(text, width).map((line) => {
|
|
38
|
+
while (/\s/u.test(text[offset] ?? "") && offset < text.length) offset++;
|
|
39
|
+
const start = offset;
|
|
40
|
+
offset += line.length;
|
|
41
|
+
let segmentStart = 0;
|
|
42
|
+
return segments.map((segment) => {
|
|
43
|
+
const segmentEnd = segmentStart + segment.text.length;
|
|
44
|
+
const from = Math.max(start, segmentStart);
|
|
45
|
+
const to = Math.min(offset, segmentEnd);
|
|
46
|
+
const result = to > from ? segment.style(segment.text.slice(from - segmentStart, to - segmentStart)) : "";
|
|
47
|
+
segmentStart = segmentEnd;
|
|
48
|
+
return result;
|
|
49
|
+
}).join("");
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { visibleWidth, wrapStyledText, wrapText };
|
|
55
|
+
//# sourceMappingURL=wrap-text.mjs.map
|