create-warlock 4.8.2 → 4.9.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.
@@ -2,7 +2,7 @@ import { colors } from "@mongez/copper";
2
2
  import { directoryExists } from "@warlock.js/fs";
3
3
  import * as path$1 from "path";
4
4
 
5
- //#region ../@warlock.js/create-warlock/src/commands/create-new-app/get-app-path.ts
5
+ //#region ../create-warlock/src/commands/create-new-app/get-app-path.ts
6
6
  function getAppPath(appName) {
7
7
  const appPath = path$1.resolve(process.cwd(), appName);
8
8
  if (directoryExists(appPath)) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-app-path.mjs","names":["path"],"sources":["../../../../../../../@warlock.js/create-warlock/src/commands/create-new-app/get-app-path.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\r\nimport { directoryExists } from \"@warlock.js/fs\";\r\nimport * as path from \"path\";\r\n\r\nexport default function getAppPath(appName: string) {\r\n const appPath: string = path.resolve(process.cwd(), appName);\r\n\r\n if (directoryExists(appPath)) {\r\n console.log(\r\n colors.redBright(\r\n `${process.cwd()} has an existing directory \\`${colors.cyan(\r\n appName,\r\n )}\\`, please choose another app name or another directory to run the command from.`,\r\n ),\r\n );\r\n\r\n process.exit(1);\r\n }\r\n\r\n return appPath;\r\n}\r\n"],"mappings":";;;;;AAIA,SAAwB,WAAW,SAAiB;CAClD,MAAM,UAAkBA,OAAK,QAAQ,QAAQ,IAAI,GAAG,OAAO;CAE3D,IAAI,gBAAgB,OAAO,GAAG;EAC5B,QAAQ,IACN,OAAO,UACL,GAAG,QAAQ,IAAI,EAAE,+BAA+B,OAAO,KACrD,OACF,EAAE,iFACJ,CACF;EAEA,QAAQ,KAAK,CAAC;CAChB;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"get-app-path.mjs","names":["path"],"sources":["../../../../../../../create-warlock/src/commands/create-new-app/get-app-path.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\r\nimport { directoryExists } from \"@warlock.js/fs\";\r\nimport * as path from \"path\";\r\n\r\nexport default function getAppPath(appName: string) {\r\n const appPath: string = path.resolve(process.cwd(), appName);\r\n\r\n if (directoryExists(appPath)) {\r\n console.log(\r\n colors.redBright(\r\n `${process.cwd()} has an existing directory \\`${colors.cyan(\r\n appName,\r\n )}\\`, please choose another app name or another directory to run the command from.`,\r\n ),\r\n );\r\n\r\n process.exit(1);\r\n }\r\n\r\n return appPath;\r\n}\r\n"],"mappings":";;;;;AAIA,SAAwB,WAAW,SAAiB;CAClD,MAAM,UAAkBA,OAAK,QAAQ,QAAQ,IAAI,GAAG,OAAO;CAE3D,IAAI,gBAAgB,OAAO,GAAG;EAC5B,QAAQ,IACN,OAAO,UACL,GAAG,QAAQ,IAAI,EAAE,+BAA+B,OAAO,KACrD,OACF,EAAE,iFACJ,CACF;EAEA,QAAQ,KAAK,CAAC;CAChB;CAEA,OAAO;AACT"}
@@ -10,7 +10,7 @@ import { cancel, confirm, isCancel, multiselect, select, text } from "@clack/pro
10
10
  import { colors } from "@mongez/copper";
11
11
  import { getJsonFile } from "@warlock.js/fs";
12
12
 
13
- //#region ../@warlock.js/create-warlock/src/commands/create-new-app/index.ts
13
+ //#region ../create-warlock/src/commands/create-new-app/index.ts
14
14
  async function createNewApp(cli = {}) {
15
15
  const pmDetectionPromise = detectPackageManagers();
16
16
  const createWarlockVersion = getJsonFile(packageRoot("package.json")).version;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../@warlock.js/create-warlock/src/commands/create-new-app/index.ts"],"sourcesContent":["import {\r\n cancel,\r\n confirm,\r\n isCancel,\r\n multiselect,\r\n select,\r\n text,\r\n} from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { getJsonFile } from \"@warlock.js/fs\";\r\nimport {\r\n getDatabaseDriver,\r\n getDatabaseDriverOptions,\r\n isNoDatabase,\r\n} from \"../../features/database-drivers\";\r\nimport {\r\n getAiPackageOptions,\r\n getAiProviderOptions,\r\n getAllFeatureKeys,\r\n getDefaultFeatureKeys,\r\n getFeatureOptions,\r\n} from \"../../features/features-map\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n detectPackageManagers,\r\n getPackageManager,\r\n getPreferredPackageManager,\r\n getSystemPackageManagers,\r\n setPackageManager,\r\n} from \"../../helpers/package-manager\";\r\nimport { packageRoot } from \"../../helpers/paths\";\r\nimport { showIntroBanner } from \"../../ui/banner\";\r\nimport { createWarlockApp } from \"../create-warlock-app\";\r\nimport getAppPath from \"./get-app-path\";\r\nimport { AppOptions, App as AppType, CliFlags } from \"./types\";\r\n\r\nexport default async function createNewApp(cli: CliFlags = {}) {\r\n // Start detecting package managers in the background to avoid delay later\r\n const pmDetectionPromise = detectPackageManagers();\r\n\r\n // Get version from package.json\r\n const packageJson: any = getJsonFile(packageRoot(\"package.json\"));\r\n const createWarlockVersion = packageJson.version;\r\n\r\n // Show the intro banner\r\n showIntroBanner(createWarlockVersion);\r\n\r\n console.log(colors.cyan(\"Let's create something magical! \\n\"));\r\n\r\n // Validate Node.js version (minimum v20)\r\n const [major] = process.versions.node.split(\".\").map(Number);\r\n if (major < 20) {\r\n cancel(\"Node.js version must be at least 20.0.0\");\r\n process.exit(0);\r\n }\r\n\r\n // Non-interactive path: build everything from flags and skip the prompts.\r\n if (cli.yes) {\r\n await createNonInteractive(cli);\r\n return;\r\n }\r\n\r\n // Step 1: Project name\r\n const appName = await text({\r\n message: \"What shall we call your project?\",\r\n placeholder: \"my-warlock-app\",\r\n });\r\n\r\n if (isCancel(appName) || !appName.trim()) {\r\n cancel(\"A project name is required to continue\");\r\n process.exit(0);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n if (!appPath) return;\r\n\r\n // Step 2: Package Manager selection\r\n await pmDetectionPromise; // Ensure detection is complete\r\n\r\n const packageManager = await select({\r\n message: \"Which package manager do you want to use?\",\r\n options: getSystemPackageManagers().map(pm => ({\r\n value: pm,\r\n label: pm,\r\n })),\r\n initialValue: getPreferredPackageManager(),\r\n });\r\n\r\n if (isCancel(packageManager)) {\r\n cancel(\"Package manager selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n setPackageManager(packageManager as string);\r\n\r\n // Step 3: Database driver selection\r\n const databaseDriver = await select({\r\n message: \"Choose your database driver\",\r\n options: getDatabaseDriverOptions(),\r\n });\r\n\r\n if (isCancel(databaseDriver)) {\r\n cancel(\"Database selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n const selectedDriver = getDatabaseDriver(databaseDriver as string);\r\n\r\n // Step 4: Features selection\r\n const selectedFeatures = await multiselect({\r\n message: \"Select optional features to include\",\r\n options: getFeatureOptions(),\r\n initialValues: getDefaultFeatureKeys(),\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedFeatures)) {\r\n cancel(\"Feature selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 4b: AI providers + capability packages — selecting any pulls\r\n // @warlock.js/ai automatically. The result still flows through the\r\n // `selectedAiProviders` → `aiProviders` pipeline, which now also carries the\r\n // capability packages (ai-tools / ai-panoptic / ai-workspace).\r\n const selectedAiProviders = await multiselect({\r\n message:\r\n \"Add AI packages? Providers + capabilities — the core AI package is included automatically\",\r\n options: [...getAiProviderOptions(), ...getAiPackageOptions()],\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedAiProviders)) {\r\n cancel(\"AI provider selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 5: Git initialization\r\n const useGit =\r\n (await confirm({\r\n message: \"Initialize a Git repository?\",\r\n })) === true;\r\n\r\n if (isCancel(useGit)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 6: JWT secret generation\r\n const useJWT =\r\n (await confirm({\r\n message: \"Generate JWT secret keys?\",\r\n })) === true;\r\n\r\n if (isCancel(useJWT)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Build app details\r\n const appDetails: Required<AppType> = {\r\n appName: appName,\r\n appType: \"warlock\",\r\n appPath: appPath,\r\n pkgManager: getPackageManager(),\r\n options: {\r\n databaseDriver: databaseDriver as string,\r\n databasePort: selectedDriver?.defaultPort || 27017,\r\n features: selectedFeatures as string[],\r\n aiProviders: selectedAiProviders as string[],\r\n useGit,\r\n useJWT,\r\n },\r\n };\r\n\r\n // Create the app\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n\r\n/**\r\n * Resolve the full set of `AppOptions` from parsed CLI flags — applying the\r\n * non-interactive defaults, validating the database driver and feature/provider\r\n * keys, and handling the `none` (no database) selection.\r\n *\r\n * Pure and side-effect free (no prompts, no `process.exit`) so the flag → app\r\n * mapping is unit-testable. Throws on an unknown driver or feature key so the\r\n * caller can fail fast before any file is written.\r\n */\r\nexport function resolveNonInteractiveOptions(cli: CliFlags): AppOptions {\r\n const databaseDriver = cli.db ?? \"mongodb\";\r\n const noDatabase = isNoDatabase(databaseDriver);\r\n const driver = noDatabase ? undefined : getDatabaseDriver(databaseDriver);\r\n\r\n if (!noDatabase && !driver) {\r\n throw new Error(`Unknown database driver \"${databaseDriver}\"`);\r\n }\r\n\r\n const features = cli.features ?? [];\r\n const aiProviders = cli.ai ?? [];\r\n\r\n const allowedKeys = getAllFeatureKeys();\r\n const invalidKeys = [...features, ...aiProviders].filter(\r\n key => !allowedKeys.includes(key),\r\n );\r\n\r\n if (invalidKeys.length > 0) {\r\n throw new Error(`Unknown feature(s): ${invalidKeys.join(\",\")}`);\r\n }\r\n\r\n return {\r\n databaseDriver,\r\n databasePort: driver?.defaultPort ?? 27017,\r\n features,\r\n aiProviders,\r\n useGit: cli.git ?? false,\r\n useJWT: cli.jwt ?? false,\r\n };\r\n}\r\n\r\n/**\r\n * Non-interactive scaffold path for `--yes`. Builds the app from flags with\r\n * sensible defaults and skips every prompt — a single command scaffolds the\r\n * entire app. Validation lives in `resolveNonInteractiveOptions`; a typo fails\r\n * fast here instead of mid-install.\r\n */\r\nasync function createNonInteractive(cli: CliFlags) {\r\n const appName = (cli.name ?? \"\").trim();\r\n\r\n if (!appName) {\r\n cancel(\"--yes requires a project name (first argument or --name=<name>)\");\r\n process.exit(1);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n\r\n if (!appPath) return;\r\n\r\n await detectPackageManagers();\r\n\r\n const packageManager = cli.pm ?? getPreferredPackageManager();\r\n setPackageManager(packageManager);\r\n\r\n let options: AppOptions;\r\n\r\n try {\r\n options = resolveNonInteractiveOptions(cli);\r\n } catch (error) {\r\n cancel((error as Error).message);\r\n process.exit(1);\r\n }\r\n\r\n const appDetails: Required<AppType> = {\r\n appName,\r\n appType: \"warlock\",\r\n appPath,\r\n pkgManager: getPackageManager(),\r\n options,\r\n };\r\n\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAoCA,eAA8B,aAAa,MAAgB,CAAC,GAAG;CAE7D,MAAM,qBAAqB,sBAAsB;CAIjD,MAAM,uBADmB,YAAY,YAAY,cAAc,CACxB,CAAC,CAAC;CAGzC,gBAAgB,oBAAoB;CAEpC,QAAQ,IAAI,OAAO,KAAK,oCAAoC,CAAC;CAG7D,MAAM,CAAC,SAAS,QAAQ,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;CAC3D,IAAI,QAAQ,IAAI;EACd,OAAO,yCAAyC;EAChD,QAAQ,KAAK,CAAC;CAChB;CAGA,IAAI,IAAI,KAAK;EACX,MAAM,qBAAqB,GAAG;EAC9B;CACF;CAGA,MAAM,UAAU,MAAM,KAAK;EACzB,SAAS;EACT,aAAa;CACf,CAAC;CAED,IAAI,SAAS,OAAO,KAAK,CAAC,QAAQ,KAAK,GAAG;EACxC,OAAO,wCAAwC;EAC/C,QAAQ,KAAK,CAAC;CAChB;CAEA,MAAM,UAAU,WAAW,OAAO;CAClC,IAAI,CAAC,SAAS;CAGd,MAAM;CAEN,MAAM,iBAAiB,MAAM,OAAO;EAClC,SAAS;EACT,SAAS,yBAAyB,CAAC,CAAC,KAAI,QA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AC;AAC5C;;;;;;;;;;AAWA,SAAgB,6BAA6B,KAA2B;CACtE,MAAM,iBAAiB,IAAI,MAAM;CACjC,MAAM,aAAa,aAAa,cAAc;CAC9C,MAAM,SAAS,aAAa,SAAY,kBAAkB,cAAc;CAExE,IAAI,CAAC,cAAc,CAAC,QAClB,MAAM,IAAI,MAAM,4BAA4B,eAAe,EAAE;CAG/D,MAAM,WAAW,IAAI,YAAY,CAAC;CAClC,MAAM,cAAc,IAAI,MAAM,CAAC;CAE/B,MAAM,cAAc,kBAAkB;CACtC,MAAM,cAAc,CAAC,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC,QAChD,QAAO,CAAC,YAAY,SAAS,GAAG,CAClC;CAEA,IAAI,YAAY,SAAS,GACvB,MAAM,IAAI,MAAM,uBAAuB,YAAY,KAAK,GAAG,GAAG;CAGhE,OAAO;EACL;EACA,cAAc,QAAQ,eAAe;EACrC;EACA;EACA,QAAQ,IAAI,OAAO;EACnB,QAAQ,IAAI,OAAO;CACrB;AACF;;;;;;;AAQA,eAAe,qBAAqB,KAAe;CACjD,MAAM,WAAW,IAAI,QAAQ,GAAE,CAAE,KAAK;CAEtC,IAAI,CAAC,SAAS;EACZ,OAAO,iEAAiE;EACxE,QAAQ,KAAK,CAAC;CAChB;CAEA,MAAM,UAAU,WAAW,OAAO;CAElC,IAAI,CAAC,SAAS;CAEd,MAAM,sBAAsB;CAG5B,kBADuB,IAAI,MAAM,2BAA2B,CAC5B;CAEhC,IAAI;CAEJ,IAAI;EACF,UAAU,6BAA6B,GAAG;CAC5C,SAAS,OAAO;EACd,OAAQ,MAAgB,OAAO;EAC/B,QAAQ,KAAK,CAAC;CAChB;CAUA,MAAM,iBAAiB,IAAI,IAAI;EAP7B;EACA,SAAS;EACT;EACA,YAAY,kBAAkB;EAC9B;CAGsC,CAAC,CAAC;AAC5C"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../create-warlock/src/commands/create-new-app/index.ts"],"sourcesContent":["import {\r\n cancel,\r\n confirm,\r\n isCancel,\r\n multiselect,\r\n select,\r\n text,\r\n} from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { getJsonFile } from \"@warlock.js/fs\";\r\nimport {\r\n getDatabaseDriver,\r\n getDatabaseDriverOptions,\r\n isNoDatabase,\r\n} from \"../../features/database-drivers\";\r\nimport {\r\n getAiPackageOptions,\r\n getAiProviderOptions,\r\n getAllFeatureKeys,\r\n getDefaultFeatureKeys,\r\n getFeatureOptions,\r\n} from \"../../features/features-map\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n detectPackageManagers,\r\n getPackageManager,\r\n getPreferredPackageManager,\r\n getSystemPackageManagers,\r\n setPackageManager,\r\n} from \"../../helpers/package-manager\";\r\nimport { packageRoot } from \"../../helpers/paths\";\r\nimport { showIntroBanner } from \"../../ui/banner\";\r\nimport { createWarlockApp } from \"../create-warlock-app\";\r\nimport getAppPath from \"./get-app-path\";\r\nimport { AppOptions, App as AppType, CliFlags } from \"./types\";\r\n\r\nexport default async function createNewApp(cli: CliFlags = {}) {\r\n // Start detecting package managers in the background to avoid delay later\r\n const pmDetectionPromise = detectPackageManagers();\r\n\r\n // Get version from package.json\r\n const packageJson: any = getJsonFile(packageRoot(\"package.json\"));\r\n const createWarlockVersion = packageJson.version;\r\n\r\n // Show the intro banner\r\n showIntroBanner(createWarlockVersion);\r\n\r\n console.log(colors.cyan(\"Let's create something magical! \\n\"));\r\n\r\n // Validate Node.js version (minimum v20)\r\n const [major] = process.versions.node.split(\".\").map(Number);\r\n if (major < 20) {\r\n cancel(\"Node.js version must be at least 20.0.0\");\r\n process.exit(0);\r\n }\r\n\r\n // Non-interactive path: build everything from flags and skip the prompts.\r\n if (cli.yes) {\r\n await createNonInteractive(cli);\r\n return;\r\n }\r\n\r\n // Step 1: Project name\r\n const appName = await text({\r\n message: \"What shall we call your project?\",\r\n placeholder: \"my-warlock-app\",\r\n });\r\n\r\n if (isCancel(appName) || !appName.trim()) {\r\n cancel(\"A project name is required to continue\");\r\n process.exit(0);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n if (!appPath) return;\r\n\r\n // Step 2: Package Manager selection\r\n await pmDetectionPromise; // Ensure detection is complete\r\n\r\n const packageManager = await select({\r\n message: \"Which package manager do you want to use?\",\r\n options: getSystemPackageManagers().map(pm => ({\r\n value: pm,\r\n label: pm,\r\n })),\r\n initialValue: getPreferredPackageManager(),\r\n });\r\n\r\n if (isCancel(packageManager)) {\r\n cancel(\"Package manager selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n setPackageManager(packageManager as string);\r\n\r\n // Step 3: Database driver selection\r\n const databaseDriver = await select({\r\n message: \"Choose your database driver\",\r\n options: getDatabaseDriverOptions(),\r\n });\r\n\r\n if (isCancel(databaseDriver)) {\r\n cancel(\"Database selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n const selectedDriver = getDatabaseDriver(databaseDriver as string);\r\n\r\n // Step 4: Features selection\r\n const selectedFeatures = await multiselect({\r\n message: \"Select optional features to include\",\r\n options: getFeatureOptions(),\r\n initialValues: getDefaultFeatureKeys(),\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedFeatures)) {\r\n cancel(\"Feature selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 4b: AI providers + capability packages — selecting any pulls\r\n // @warlock.js/ai automatically. The result still flows through the\r\n // `selectedAiProviders` → `aiProviders` pipeline, which now also carries the\r\n // capability packages (ai-tools / ai-panoptic / ai-workspace).\r\n const selectedAiProviders = await multiselect({\r\n message:\r\n \"Add AI packages? Providers + capabilities — the core AI package is included automatically\",\r\n options: [...getAiProviderOptions(), ...getAiPackageOptions()],\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedAiProviders)) {\r\n cancel(\"AI provider selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 5: Git initialization\r\n const useGit =\r\n (await confirm({\r\n message: \"Initialize a Git repository?\",\r\n })) === true;\r\n\r\n if (isCancel(useGit)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 6: JWT secret generation\r\n const useJWT =\r\n (await confirm({\r\n message: \"Generate JWT secret keys?\",\r\n })) === true;\r\n\r\n if (isCancel(useJWT)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Build app details\r\n const appDetails: Required<AppType> = {\r\n appName: appName,\r\n appType: \"warlock\",\r\n appPath: appPath,\r\n pkgManager: getPackageManager(),\r\n options: {\r\n databaseDriver: databaseDriver as string,\r\n databasePort: selectedDriver?.defaultPort || 27017,\r\n features: selectedFeatures as string[],\r\n aiProviders: selectedAiProviders as string[],\r\n useGit,\r\n useJWT,\r\n },\r\n };\r\n\r\n // Create the app\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n\r\n/**\r\n * Resolve the full set of `AppOptions` from parsed CLI flags — applying the\r\n * non-interactive defaults, validating the database driver and feature/provider\r\n * keys, and handling the `none` (no database) selection.\r\n *\r\n * Pure and side-effect free (no prompts, no `process.exit`) so the flag → app\r\n * mapping is unit-testable. Throws on an unknown driver or feature key so the\r\n * caller can fail fast before any file is written.\r\n */\r\nexport function resolveNonInteractiveOptions(cli: CliFlags): AppOptions {\r\n const databaseDriver = cli.db ?? \"mongodb\";\r\n const noDatabase = isNoDatabase(databaseDriver);\r\n const driver = noDatabase ? undefined : getDatabaseDriver(databaseDriver);\r\n\r\n if (!noDatabase && !driver) {\r\n throw new Error(`Unknown database driver \"${databaseDriver}\"`);\r\n }\r\n\r\n const features = cli.features ?? [];\r\n const aiProviders = cli.ai ?? [];\r\n\r\n const allowedKeys = getAllFeatureKeys();\r\n const invalidKeys = [...features, ...aiProviders].filter(\r\n key => !allowedKeys.includes(key),\r\n );\r\n\r\n if (invalidKeys.length > 0) {\r\n throw new Error(`Unknown feature(s): ${invalidKeys.join(\",\")}`);\r\n }\r\n\r\n return {\r\n databaseDriver,\r\n databasePort: driver?.defaultPort ?? 27017,\r\n features,\r\n aiProviders,\r\n useGit: cli.git ?? false,\r\n useJWT: cli.jwt ?? false,\r\n };\r\n}\r\n\r\n/**\r\n * Non-interactive scaffold path for `--yes`. Builds the app from flags with\r\n * sensible defaults and skips every prompt — a single command scaffolds the\r\n * entire app. Validation lives in `resolveNonInteractiveOptions`; a typo fails\r\n * fast here instead of mid-install.\r\n */\r\nasync function createNonInteractive(cli: CliFlags) {\r\n const appName = (cli.name ?? \"\").trim();\r\n\r\n if (!appName) {\r\n cancel(\"--yes requires a project name (first argument or --name=<name>)\");\r\n process.exit(1);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n\r\n if (!appPath) return;\r\n\r\n await detectPackageManagers();\r\n\r\n const packageManager = cli.pm ?? getPreferredPackageManager();\r\n setPackageManager(packageManager);\r\n\r\n let options: AppOptions;\r\n\r\n try {\r\n options = resolveNonInteractiveOptions(cli);\r\n } catch (error) {\r\n cancel((error as Error).message);\r\n process.exit(1);\r\n }\r\n\r\n const appDetails: Required<AppType> = {\r\n appName,\r\n appType: \"warlock\",\r\n appPath,\r\n pkgManager: getPackageManager(),\r\n options,\r\n };\r\n\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAoCA,eAA8B,aAAa,MAAgB,CAAC,GAAG;CAE7D,MAAM,qBAAqB,sBAAsB;CAIjD,MAAM,uBADmB,YAAY,YAAY,cAAc,CACxB,CAAC,CAAC;CAGzC,gBAAgB,oBAAoB;CAEpC,QAAQ,IAAI,OAAO,KAAK,oCAAoC,CAAC;CAG7D,MAAM,CAAC,SAAS,QAAQ,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;CAC3D,IAAI,QAAQ,IAAI;EACd,OAAO,yCAAyC;EAChD,QAAQ,KAAK,CAAC;CAChB;CAGA,IAAI,IAAI,KAAK;EACX,MAAM,qBAAqB,GAAG;EAC9B;CACF;CAGA,MAAM,UAAU,MAAM,KAAK;EACzB,SAAS;EACT,aAAa;CACf,CAAC;CAED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EACd,OAAQ,MAAgB,OAAO;EAC/B,QAAQ,KAAK,CAAC;CAChB;CAUA,MAAM,iBAAiB,IAAI,IAAI;EAP7B;EACA,SAAS;EACT;EACA,YAAY,kBAAkB;EAC9B;CAGsC,CAAC,CAAC;AAC5C"}
@@ -1,4 +1,4 @@
1
- //#region ../@warlock.js/create-warlock/src/commands/create-new-app/types.d.ts
1
+ //#region ../create-warlock/src/commands/create-new-app/types.d.ts
2
2
  /**
3
3
  * Flags parsed from the command line for non-interactive scaffolding
4
4
  * (`create-warlock my-app --db=postgres --features=test,herald --ai=openai --yes`).
@@ -4,7 +4,7 @@ import { showSuccessScreen } from "../../ui/banner.mjs";
4
4
  import { spinnerMessages } from "../../ui/spinners.mjs";
5
5
  import { spinner } from "@clack/prompts";
6
6
 
7
- //#region ../@warlock.js/create-warlock/src/commands/create-warlock-app/index.ts
7
+ //#region ../create-warlock/src/commands/create-warlock-app/index.ts
8
8
  async function createWarlockApp(application) {
9
9
  const { useGit, useJWT, features, aiProviders, databaseDriver } = application.options;
10
10
  const noDatabase = isNoDatabase(databaseDriver);
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../@warlock.js/create-warlock/src/commands/create-warlock-app/index.ts"],"sourcesContent":["import { spinner } from \"@clack/prompts\";\r\nimport {\r\n getDatabaseLabel,\r\n isNoDatabase,\r\n} from \"../../features/database-drivers\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n getPackageManager,\r\n runPackageManagerCommand,\r\n} from \"../../helpers/package-manager\";\r\nimport { showSuccessScreen } from \"../../ui/banner\";\r\nimport { spinnerMessages } from \"../../ui/spinners\";\r\n\r\nexport async function createWarlockApp(application: App) {\r\n const options = application.options;\r\n const { useGit, useJWT, features, aiProviders, databaseDriver } = options;\r\n const noDatabase = isNoDatabase(databaseDriver);\r\n\r\n // Step 1: Initialize and copy template\r\n const templateSpinner = spinner();\r\n templateSpinner.start(spinnerMessages.copyingTemplate);\r\n\r\n application\r\n .init()\r\n .use(\"warlock\")\r\n .updatePackageJson()\r\n .updateDotEnv();\r\n\r\n // Wire the chosen database driver into .env — or, when the user opted out,\r\n // strip the database config entirely so the app boots with no database.\r\n if (noDatabase) {\r\n application.removeDatabaseConfig();\r\n } else {\r\n application.configureDatabaseEnv(databaseDriver);\r\n }\r\n\r\n application.configureHomePage(features.includes(\"react\"));\r\n\r\n templateSpinner.stop(spinnerMessages.templateCopied);\r\n\r\n // Step 2: Install base dependencies (so the `warlock` binary is available)\r\n const installSpinner = spinner();\r\n installSpinner.start(spinnerMessages.installingDeps);\r\n\r\n await application.install().install;\r\n\r\n installSpinner.stop(spinnerMessages.depsInstalled);\r\n\r\n // Step 3: Add features via `warlock add --no-install`, then one batched install.\r\n // The DB driver, optional features, and AI providers all go through the single\r\n // source of truth (core's feature map) so versions never drift. When no\r\n // database was chosen, the driver is omitted (there is no `none` feature).\r\n const selectedFeatures = [\r\n ...(noDatabase ? [] : [databaseDriver]),\r\n ...features,\r\n ...aiProviders,\r\n ];\r\n\r\n if (selectedFeatures.length > 0) {\r\n const featuresSpinner = spinner();\r\n featuresSpinner.start(spinnerMessages.addingFeatures);\r\n\r\n const added = await application.installFeatures(selectedFeatures);\r\n\r\n if (added) {\r\n await application.install().install;\r\n featuresSpinner.stop(spinnerMessages.featuresAdded);\r\n } else {\r\n featuresSpinner.stop(spinnerMessages.featuresFailed);\r\n }\r\n }\r\n\r\n // Step 4: Initialize Git repository if requested\r\n if (useGit) {\r\n const gitSpinner = spinner();\r\n gitSpinner.start(spinnerMessages.initializingGit);\r\n\r\n await application.git();\r\n\r\n gitSpinner.stop(spinnerMessages.gitInitialized);\r\n }\r\n\r\n // Step 5: Generate JWT or warm cache\r\n if (useJWT) {\r\n const jwtSpinner = spinner();\r\n jwtSpinner.start(spinnerMessages.generatingJwt);\r\n\r\n await application.exec(runPackageManagerCommand(\"jwt\"));\r\n\r\n jwtSpinner.stop(spinnerMessages.jwtGenerated);\r\n } else {\r\n const warmSpinner = spinner();\r\n warmSpinner.start(spinnerMessages.warmingCache);\r\n\r\n await application.exec(\"npx warlock --warm-cache\");\r\n\r\n warmSpinner.stop(spinnerMessages.cacheWarmed);\r\n }\r\n\r\n // Step 6: Show success screen\r\n showSuccessScreen({\r\n projectName: application.name,\r\n database: getDatabaseLabel(databaseDriver),\r\n features: [...features, ...aiProviders],\r\n packageManager: getPackageManager(),\r\n });\r\n}\r\n"],"mappings":";;;;;;;AAaA,eAAsB,iBAAiB,aAAkB;CAEvD,MAAM,EAAE,QAAQ,QAAQ,UAAU,aAAa,mBAD/B,YAAY;CAE5B,MAAM,aAAa,aAAa,cAAc;CAG9C,MAAM,kBAAkB,QAAQ;CAChC,gBAAgB,MAAM,gBAAgB,eAAe;CAErD,YACG,KAAK,CAAC,CACN,IAAI,SAAS,CAAC,CACd,kBAAkB,CAAC,CACnB,aAAa;CAIhB,IAAI,YACF,YAAY,qBAAqB;MAEjC,YAAY,qBAAqB,cAAc;CAGjD,YAAY,kBAAkB,SAAS,SAAS,OAAO,CAAC;CAExD,gBAAgB,KAAK,gBAAgB,cAAc;CAGnD,MAAM,iBAAiB,QAAQ;CAC/B,eAAe,MAAM,gBAAgB,cAAc;CAEnD,MAAM,YAAY,QAAQ,CAAC,CAAC;CAE5B,eAAe,KAAK,gBAAgB,aAAa;CAMjD,MAAM,mBAAmB;EACvB,GAAI,aAAa,CAAC,IAAI,CAAC,cAAc;EACrC,GAAG;EACH,GAAG;CACL;CAEA,IAAI,iBAAiB,SAAS,GAAG;EAC/B,MAAM,kBAAkB,QAAQ;EAChC,gBAAgB,MAAM,gBAAgB,cAAc;EAIpD,IAAI,MAFgB,YAAY,gBAAgB,gBAAgB,GAErD;GACT,MAAM,YAAY,QAAQ,CAAC,CAAC;GAC5B,gBAAgB,KAAK,gBAAgB,aAAa;EACpD,OACE,gBAAgB,KAAK,gBAAgB,cAAc;CAEvD;CAGA,IAAI,QAAQ;EACV,MAAM,aAAa,QAAQ;EAC3B,WAAW,MAAM,gBAAgB,eAAe;EAEhD,MAAM,YAAY,IAAI;EAEtB,WAAW,KAAK,gBAAgB,cAAc;CAChD;CAGA,IAAI,QAAQ;EACV,MAAM,aAAa,QAAQ;EAC3B,WAAW,MAAM,gBAAgB,aAAa;EAE9C,MAAM,YAAY,KAAK,yBAAyB,KAAK,CAAC;EAEtD,WAAW,KAAK,gBAAgB,YAAY;CAC9C,OAAO;EACL,MAAM,cAAc,QAAQ;EAC5B,YAAY,MAAM,gBAAgB,YAAY;EAE9C,MAAM,YAAY,KAAK,0BAA0B;EAEjD,YAAY,KAAK,gBAAgB,WAAW;CAC9C;CAGA,kBAAkB;EAChB,aAAa,YAAY;EACzB,UAAU,iBAAiB,cAAc;EACzC,UAAU,CAAC,GAAG,UAAU,GAAG,WAAW;EACtC,gBAAgB,kBAAkB;CACpC,CAAC;AACH"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../create-warlock/src/commands/create-warlock-app/index.ts"],"sourcesContent":["import { spinner } from \"@clack/prompts\";\r\nimport {\r\n getDatabaseLabel,\r\n isNoDatabase,\r\n} from \"../../features/database-drivers\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n getPackageManager,\r\n runPackageManagerCommand,\r\n} from \"../../helpers/package-manager\";\r\nimport { showSuccessScreen } from \"../../ui/banner\";\r\nimport { spinnerMessages } from \"../../ui/spinners\";\r\n\r\nexport async function createWarlockApp(application: App) {\r\n const options = application.options;\r\n const { useGit, useJWT, features, aiProviders, databaseDriver } = options;\r\n const noDatabase = isNoDatabase(databaseDriver);\r\n\r\n // Step 1: Initialize and copy template\r\n const templateSpinner = spinner();\r\n templateSpinner.start(spinnerMessages.copyingTemplate);\r\n\r\n application\r\n .init()\r\n .use(\"warlock\")\r\n .updatePackageJson()\r\n .updateDotEnv();\r\n\r\n // Wire the chosen database driver into .env — or, when the user opted out,\r\n // strip the database config entirely so the app boots with no database.\r\n if (noDatabase) {\r\n application.removeDatabaseConfig();\r\n } else {\r\n application.configureDatabaseEnv(databaseDriver);\r\n }\r\n\r\n application.configureHomePage(features.includes(\"react\"));\r\n\r\n templateSpinner.stop(spinnerMessages.templateCopied);\r\n\r\n // Step 2: Install base dependencies (so the `warlock` binary is available)\r\n const installSpinner = spinner();\r\n installSpinner.start(spinnerMessages.installingDeps);\r\n\r\n await application.install().install;\r\n\r\n installSpinner.stop(spinnerMessages.depsInstalled);\r\n\r\n // Step 3: Add features via `warlock add --no-install`, then one batched install.\r\n // The DB driver, optional features, and AI providers all go through the single\r\n // source of truth (core's feature map) so versions never drift. When no\r\n // database was chosen, the driver is omitted (there is no `none` feature).\r\n const selectedFeatures = [\r\n ...(noDatabase ? [] : [databaseDriver]),\r\n ...features,\r\n ...aiProviders,\r\n ];\r\n\r\n if (selectedFeatures.length > 0) {\r\n const featuresSpinner = spinner();\r\n featuresSpinner.start(spinnerMessages.addingFeatures);\r\n\r\n const added = await application.installFeatures(selectedFeatures);\r\n\r\n if (added) {\r\n await application.install().install;\r\n featuresSpinner.stop(spinnerMessages.featuresAdded);\r\n } else {\r\n featuresSpinner.stop(spinnerMessages.featuresFailed);\r\n }\r\n }\r\n\r\n // Step 4: Initialize Git repository if requested\r\n if (useGit) {\r\n const gitSpinner = spinner();\r\n gitSpinner.start(spinnerMessages.initializingGit);\r\n\r\n await application.git();\r\n\r\n gitSpinner.stop(spinnerMessages.gitInitialized);\r\n }\r\n\r\n // Step 5: Generate JWT or warm cache\r\n if (useJWT) {\r\n const jwtSpinner = spinner();\r\n jwtSpinner.start(spinnerMessages.generatingJwt);\r\n\r\n await application.exec(runPackageManagerCommand(\"jwt\"));\r\n\r\n jwtSpinner.stop(spinnerMessages.jwtGenerated);\r\n } else {\r\n const warmSpinner = spinner();\r\n warmSpinner.start(spinnerMessages.warmingCache);\r\n\r\n await application.exec(\"npx warlock --warm-cache\");\r\n\r\n warmSpinner.stop(spinnerMessages.cacheWarmed);\r\n }\r\n\r\n // Step 6: Show success screen\r\n showSuccessScreen({\r\n projectName: application.name,\r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KAAK,yBAAyB,KAAK,CAAC;EAEtD,WAAW,KAAK,gBAAgB,YAAY;CAC9C,OAAO;EACL,MAAM,cAAc,QAAQ;EAC5B,YAAY,MAAM,gBAAgB,YAAY;EAE9C,MAAM,YAAY,KAAK,0BAA0B;EAEjD,YAAY,KAAK,gBAAgB,WAAW;CAC9C;CAGA,kBAAkB;EAChB,aAAa,YAAY;EACzB,UAAU,iBAAiB,cAAc;EACzC,UAAU,CAAC,GAAG,UAAU,GAAG,WAAW;EACtC,gBAAgB,kBAAkB;CACpC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- //#region ../@warlock.js/create-warlock/src/features/database-drivers.ts
1
+ //#region ../create-warlock/src/features/database-drivers.ts
2
2
  /**
3
3
  * Sentinel `--db` value / select option that means "no database at all".
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"database-drivers.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/features/database-drivers.ts"],"sourcesContent":["/**\n * Database driver options and configuration\n */\nexport type DatabaseDriver = {\n value: string;\n label: string;\n package: string;\n packageVersion: string;\n defaultPort: number;\n disabled?: boolean;\n hint?: string;\n};\n\n/**\n * Sentinel `--db` value / select option that means \"no database at all\".\n *\n * Picking it wires no driver, pulls no driver package, and deletes the\n * template's `src/config/database.ts` — the framework's database connector is\n * config-gated on that file, so with it gone the app boots with no database.\n */\nexport const NO_DATABASE = \"none\";\n\nexport const databaseDrivers: DatabaseDriver[] = [\n {\n value: \"mongodb\",\n label: \"MongoDB\",\n package: \"mongodb\",\n packageVersion: \"^7.0.0\",\n defaultPort: 27017,\n },\n {\n value: \"postgres\",\n label: \"PostgreSQL\",\n package: \"pg\",\n packageVersion: \"^8.11.0\",\n defaultPort: 5432,\n },\n {\n value: \"mysql\",\n label: \"MySQL (Coming Soon)\",\n package: \"mysql2\",\n packageVersion: \"^3.5.0\",\n defaultPort: 3306,\n disabled: true,\n hint: \"MySQL support coming in a future release\",\n },\n];\n\n/**\n * Get database driver options for the select prompt.\n *\n * The real drivers come first, followed by a \"None\" opt-out so the user can\n * scaffold an app with no database.\n */\nexport function getDatabaseDriverOptions() {\n return [\n ...databaseDrivers.map(driver => ({\n value: driver.value,\n label: driver.label,\n hint: driver.hint,\n disabled: driver.disabled,\n })),\n {\n value: NO_DATABASE,\n label: \"None\",\n hint: \"No database — skips the driver and removes src/config/database.ts\",\n disabled: undefined,\n },\n ];\n}\n\n/**\n * Get database driver config by value\n */\nexport function getDatabaseDriver(value: string): DatabaseDriver | undefined {\n return databaseDrivers.find(driver => driver.value === value);\n}\n\n/**\n * Whether a `--db` value / selection means \"no database\".\n */\nexport function isNoDatabase(value: string | undefined): boolean {\n return value === NO_DATABASE;\n}\n\n/**\n * Human-readable database label for the success screen: `\"None\"` when no\n * database was chosen, otherwise the driver's own label (falling back to the\n * raw value for an unrecognized driver).\n */\nexport function getDatabaseLabel(value: string): string {\n if (isNoDatabase(value)) return \"None\";\n\n return getDatabaseDriver(value)?.label ?? value;\n}\n\n/**\n * Get database driver dependency\n */\nexport function getDatabaseDependency(\n driverValue: string,\n): Record<string, string> {\n const driver = getDatabaseDriver(driverValue);\n if (!driver) return {};\n\n return {\n [driver.package]: driver.packageVersion,\n };\n}\n"],"mappings":";;;;;;;;AAoBA,MAAa,cAAc;AAE3B,MAAa,kBAAoC;CAC/C;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;CACf;CACA;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;CACf;CACA;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;EACb,UAAU;EACV,MAAM;CACR;AACF;;;;;;;AAQA,SAAgB,2BAA2B;CACzC,OAAO,CACL,GAAG,gBAAgB,KAAI,YAAW;EAChC,OAAO,OAAO;EACd,OAAO,OAAO;EACd,MAAM,OAAO;EACb,UAAU,OAAO;CACnB,EAAE,GACF;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,UAAU;CACZ,CACF;AACF;;;;AAKA,SAAgB,kBAAkB,OAA2C;CAC3E,OAAO,gBAAgB,MAAK,WAAU,OAAO,UAAU,KAAK;AAC9D;;;;AAKA,SAAgB,aAAa,OAAoC;CAC/D,OAAO,UAAU;AACnB;;;;;;AAOA,SAAgB,iBAAiB,OAAuB;CACtD,IAAI,aAAa,KAAK,GAAG,OAAO;CAEhC,OAAO,kBAAkB,KAAK,CAAC,EAAE,SAAS;AAC5C"}
1
+ {"version":3,"file":"database-drivers.mjs","names":[],"sources":["../../../../../../create-warlock/src/features/database-drivers.ts"],"sourcesContent":["/**\n * Database driver options and configuration\n */\nexport type DatabaseDriver = {\n value: string;\n label: string;\n package: string;\n packageVersion: string;\n defaultPort: number;\n disabled?: boolean;\n hint?: string;\n};\n\n/**\n * Sentinel `--db` value / select option that means \"no database at all\".\n *\n * Picking it wires no driver, pulls no driver package, and deletes the\n * template's `src/config/database.ts` — the framework's database connector is\n * config-gated on that file, so with it gone the app boots with no database.\n */\nexport const NO_DATABASE = \"none\";\n\nexport const databaseDrivers: DatabaseDriver[] = [\n {\n value: \"mongodb\",\n label: \"MongoDB\",\n package: \"mongodb\",\n packageVersion: \"^7.0.0\",\n defaultPort: 27017,\n },\n {\n value: \"postgres\",\n label: \"PostgreSQL\",\n package: \"pg\",\n packageVersion: \"^8.11.0\",\n defaultPort: 5432,\n },\n {\n value: \"mysql\",\n label: \"MySQL (Coming Soon)\",\n package: \"mysql2\",\n packageVersion: \"^3.5.0\",\n defaultPort: 3306,\n disabled: true,\n hint: \"MySQL support coming in a future release\",\n },\n];\n\n/**\n * Get database driver options for the select prompt.\n *\n * The real drivers come first, followed by a \"None\" opt-out so the user can\n * scaffold an app with no database.\n */\nexport function getDatabaseDriverOptions() {\n return [\n ...databaseDrivers.map(driver => ({\n value: driver.value,\n label: driver.label,\n hint: driver.hint,\n disabled: driver.disabled,\n })),\n {\n value: NO_DATABASE,\n label: \"None\",\n hint: \"No database — skips the driver and removes src/config/database.ts\",\n disabled: undefined,\n },\n ];\n}\n\n/**\n * Get database driver config by value\n */\nexport function getDatabaseDriver(value: string): DatabaseDriver | undefined {\n return databaseDrivers.find(driver => driver.value === value);\n}\n\n/**\n * Whether a `--db` value / selection means \"no database\".\n */\nexport function isNoDatabase(value: string | undefined): boolean {\n return value === NO_DATABASE;\n}\n\n/**\n * Human-readable database label for the success screen: `\"None\"` when no\n * database was chosen, otherwise the driver's own label (falling back to the\n * raw value for an unrecognized driver).\n */\nexport function getDatabaseLabel(value: string): string {\n if (isNoDatabase(value)) return \"None\";\n\n return getDatabaseDriver(value)?.label ?? value;\n}\n\n/**\n * Get database driver dependency\n */\nexport function getDatabaseDependency(\n driverValue: string,\n): Record<string, string> {\n const driver = getDatabaseDriver(driverValue);\n if (!driver) return {};\n\n return {\n [driver.package]: driver.packageVersion,\n };\n}\n"],"mappings":";;;;;;;;AAoBA,MAAa,cAAc;AAE3B,MAAa,kBAAoC;CAC/C;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;CACf;CACA;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;CACf;CACA;EACE,OAAO;EACP,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,aAAa;EACb,UAAU;EACV,MAAM;CACR;AACF;;;;;;;AAQA,SAAgB,2BAA2B;CACzC,OAAO,CACL,GAAG,gBAAgB,KAAI,YAAW;EAChC,OAAO,OAAO;EACd,OAAO,OAAO;EACd,MAAM,OAAO;EACb,UAAU,OAAO;CACnB,EAAE,GACF;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,UAAU;CACZ,CACF;AACF;;;;AAKA,SAAgB,kBAAkB,OAA2C;CAC3E,OAAO,gBAAgB,MAAK,WAAU,OAAO,UAAU,KAAK;AAC9D;;;;AAKA,SAAgB,aAAa,OAAoC;CAC/D,OAAO,UAAU;AACnB;;;;;;AAOA,SAAgB,iBAAiB,OAAuB;CACtD,IAAI,aAAa,KAAK,GAAG,OAAO;CAEhC,OAAO,kBAAkB,KAAK,CAAC,EAAE,SAAS;AAC5C"}
@@ -1,4 +1,4 @@
1
- //#region ../@warlock.js/create-warlock/src/features/features-map.ts
1
+ //#region ../create-warlock/src/features/features-map.ts
2
2
  /**
3
3
  * Optional features offered in the general multiselect step. The database
4
4
  * driver (its own select) and AI providers + capability packages (their own
@@ -1 +1 @@
1
- {"version":3,"file":"features-map.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/features/features-map.ts"],"sourcesContent":["/**\r\n * Presentation manifest for the scaffolder's feature prompts.\r\n *\r\n * This file is **display metadata only** — keys, labels, hints, grouping, and\r\n * default selections. It deliberately holds NO dependency names or versions:\r\n * the single source of truth for what each feature installs is the `add`\r\n * command's feature map in `@warlock.js/core`\r\n * (`src/generations/add-command.action.ts`). The scaffolder collects the\r\n * selections here and delegates the actual install to `warlock add`, so the\r\n * two never drift on versions again.\r\n *\r\n * Every `key` below MUST exist in core's `allowedFeatures`; a CI guard should\r\n * assert that subset relationship so a typo fails the build instead of shipping.\r\n */\r\n\r\nexport type FeatureGroup =\r\n | \"Auth & Access\"\r\n | \"Rendering & Mail\"\r\n | \"Media\"\r\n | \"Storage & Cache\"\r\n | \"Jobs & Messaging\"\r\n | \"Realtime\"\r\n | \"API Docs\"\r\n | \"Tooling\";\r\n\r\nexport type FeatureOption = {\r\n /** Must match a key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n group: FeatureGroup;\r\n defaultSelected?: boolean;\r\n};\r\n\r\n/**\r\n * Optional features offered in the general multiselect step. The database\r\n * driver (its own select) and AI providers + capability packages (their own\r\n * step) are intentionally NOT here — they have dedicated prompts.\r\n */\r\nexport const features: FeatureOption[] = [\r\n // Auth & Access\r\n {\r\n key: \"access\",\r\n label: \"Access (authorization)\",\r\n hint: \"RBAC permission checks, ABAC policies, and roles — pairs with auth\",\r\n group: \"Auth & Access\",\r\n },\r\n\r\n // Rendering & Mail\r\n {\r\n key: \"react\",\r\n label: \"React (rendering & mails)\",\r\n hint: \"React + ReactDOM for non-interactive rendering and HTML/email generation\",\r\n group: \"Rendering & Mail\",\r\n defaultSelected: true,\r\n },\r\n {\r\n key: \"react-email\",\r\n label: \"React Email\",\r\n hint: \"Build email templates with React + Tailwind (pulls react + mail)\",\r\n group: \"Rendering & Mail\",\r\n },\r\n {\r\n key: \"mail\",\r\n label: \"Mail (Nodemailer)\",\r\n hint: \"Send emails via SMTP\",\r\n group: \"Rendering & Mail\",\r\n },\r\n {\r\n key: \"ses\",\r\n label: \"Amazon SES\",\r\n hint: \"Send emails via the AWS SES API\",\r\n group: \"Rendering & Mail\",\r\n },\r\n\r\n // Media\r\n {\r\n key: \"image\",\r\n label: \"Image processing (Sharp)\",\r\n hint: \"Resize, convert, and optimize images\",\r\n group: \"Media\",\r\n },\r\n\r\n // Storage & Cache\r\n {\r\n key: \"s3\",\r\n label: \"S3 storage\",\r\n hint: \"AWS S3 for cloud file storage\",\r\n group: \"Storage & Cache\",\r\n },\r\n {\r\n key: \"redis\",\r\n label: \"Redis cache\",\r\n hint: \"Redis driver for the cache layer\",\r\n group: \"Storage & Cache\",\r\n },\r\n\r\n // Jobs & Messaging\r\n {\r\n key: \"scheduler\",\r\n label: \"Scheduler\",\r\n hint: \"Background tasks and cron jobs\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n {\r\n key: \"herald\",\r\n label: \"Herald (RabbitMQ)\",\r\n hint: \"Message broker for event-driven architecture\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n {\r\n key: \"notifications\",\r\n label: \"Notifications\",\r\n hint: \"Multi-channel notifications — mail + in-app database, preferences, idempotency\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n\r\n // Realtime\r\n {\r\n key: \"socket\",\r\n label: \"Socket.IO\",\r\n hint: \"Realtime websocket server\",\r\n group: \"Realtime\",\r\n },\r\n\r\n // API Docs (swagger / postman / openapi) — not shipped yet; they will arrive\r\n // together in the unified @warlock.js/api-docs package. Re-add the selection\r\n // once that package exists. (Removed so the wizard can't offer unbuilt features.)\r\n\r\n // Tooling\r\n {\r\n key: \"test\",\r\n label: \"Testing (Vitest)\",\r\n hint: \"Vitest + coverage + per-worker DB/cache test setup\",\r\n group: \"Tooling\",\r\n },\r\n];\r\n\r\nexport type AiProviderOption = {\r\n /** Must match a provider/package key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n};\r\n\r\n/**\r\n * AI providers offered in the dedicated AI step. Selecting any of these pulls\r\n * the core `@warlock.js/ai` package automatically via the provider's `requires`\r\n * in core's feature map — the scaffolder never lists `ai` as a standalone pick.\r\n *\r\n * Keys are `ai-`prefixed to mirror core's renamed provider feature keys\r\n * (`ai-openai` → `@warlock.js/ai-openai`, etc.).\r\n */\r\nexport const aiProviders: AiProviderOption[] = [\r\n { key: \"ai-openai\", label: \"OpenAI\", hint: \"GPT models via the OpenAI API\" },\r\n { key: \"ai-google\", label: \"Google (Gemini)\", hint: \"Gemini models via Google AI\" },\r\n { key: \"ai-anthropic\", label: \"Anthropic (Claude)\", hint: \"Claude models via the Anthropic API\" },\r\n { key: \"ai-bedrock\", label: \"AWS Bedrock\", hint: \"Foundation models via Amazon Bedrock\" },\r\n { key: \"ai-ollama\", label: \"Ollama\", hint: \"Local models via Ollama\" },\r\n];\r\n\r\n/**\r\n * AI capability packages offered alongside the providers in the dedicated AI\r\n * step. These are the satellite packages that sit on top of the core\r\n * `@warlock.js/ai` toolkit (each pulls the core `ai` package via its `requires`\r\n * in core's feature map, same as the providers).\r\n */\r\nexport const aiPackages: AiProviderOption[] = [\r\n {\r\n key: \"ai-tools\",\r\n label: \"AI Tools\",\r\n hint: \"Ready-made agent tools (web search, fetch, HTTP, calculator, date-time) + MCP client/server\",\r\n },\r\n {\r\n key: \"ai-panoptic\",\r\n label: \"AI Observability (Panoptic)\",\r\n hint: \"Tracing + exporters + a zero-setup local dashboard\",\r\n },\r\n {\r\n key: \"ai-workspace\",\r\n label: \"AI Workspace\",\r\n hint: \"Policy-jailed filesystem + shell for coding agents\",\r\n },\r\n];\r\n\r\n/**\r\n * Feature options for the multiselect prompt, ordered by group with the group\r\n * surfaced in the hint (keeps a flat list scannable without group widgets).\r\n */\r\nexport function getFeatureOptions() {\r\n return features.map(feature => ({\r\n value: feature.key,\r\n label: feature.label,\r\n hint: `${feature.group} — ${feature.hint}`,\r\n }));\r\n}\r\n\r\n/**\r\n * Keys pre-checked in the feature multiselect.\r\n */\r\nexport function getDefaultFeatureKeys(): string[] {\r\n return features.filter(feature => feature.defaultSelected).map(feature => feature.key);\r\n}\r\n\r\n/**\r\n * AI provider options for the dedicated AI multiselect step.\r\n */\r\nexport function getAiProviderOptions() {\r\n return aiProviders.map(provider => ({\r\n value: provider.key,\r\n label: provider.label,\r\n hint: provider.hint,\r\n }));\r\n}\r\n\r\n/**\r\n * AI capability package options for the dedicated AI multiselect step. Offered\r\n * together with the providers (see `getAiProviderOptions`).\r\n */\r\nexport function getAiPackageOptions() {\r\n return aiPackages.map(pkg => ({\r\n value: pkg.key,\r\n label: pkg.label,\r\n hint: pkg.hint,\r\n }));\r\n}\r\n\r\n/**\r\n * Every selectable key the scaffolder knows about (features + AI providers +\r\n * AI capability packages). Used to validate `--features` / `--ai` flags in\r\n * non-interactive mode.\r\n */\r\nexport function getAllFeatureKeys(): string[] {\r\n return [\r\n ...features.map(feature => feature.key),\r\n ...aiProviders.map(provider => provider.key),\r\n ...aiPackages.map(pkg => pkg.key),\r\n ];\r\n}\r\n"],"mappings":";;;;;;AAuCA,MAAa,WAA4B;CAEvC;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;EACP,iBAAiB;CACnB;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;EACP,MA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OAAO,SAAS;EAChB,OAAO,SAAS;EAChB,MAAM,SAAS;CACjB,EAAE;AACJ;;;;;AAMA,SAAgB,sBAAsB;CACpC,OAAO,WAAW,KAAI,SAAQ;EAC5B,OAAO,IAAI;EACX,OAAO,IAAI;EACX,MAAM,IAAI;CACZ,EAAE;AACJ;;;;;;AAOA,SAAgB,oBAA8B;CAC5C,OAAO;EACL,GAAG,SAAS,KAAI,YAAW,QAAQ,GAAG;EACtC,GAAG,YAAY,KAAI,aAAY,SAAS,GAAG;EAC3C,GAAG,WAAW,KAAI,QAAO,IAAI,GAAG;CAClC;AACF"}
1
+ {"version":3,"file":"features-map.mjs","names":[],"sources":["../../../../../../create-warlock/src/features/features-map.ts"],"sourcesContent":["/**\r\n * Presentation manifest for the scaffolder's feature prompts.\r\n *\r\n * This file is **display metadata only** — keys, labels, hints, grouping, and\r\n * default selections. It deliberately holds NO dependency names or versions:\r\n * the single source of truth for what each feature installs is the `add`\r\n * command's feature map in `@warlock.js/core`\r\n * (`src/generations/add-command.action.ts`). The scaffolder collects the\r\n * selections here and delegates the actual install to `warlock add`, so the\r\n * two never drift on versions again.\r\n *\r\n * Every `key` below MUST exist in core's `allowedFeatures`; a CI guard should\r\n * assert that subset relationship so a typo fails the build instead of shipping.\r\n */\r\n\r\nexport type FeatureGroup =\r\n | \"Auth & Access\"\r\n | \"Rendering & Mail\"\r\n | \"Media\"\r\n | \"Storage & Cache\"\r\n | \"Jobs & Messaging\"\r\n | \"Realtime\"\r\n | \"API Docs\"\r\n | \"Tooling\";\r\n\r\nexport type FeatureOption = {\r\n /** Must match a key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n group: FeatureGroup;\r\n defaultSelected?: boolean;\r\n};\r\n\r\n/**\r\n * Optional features offered in the general multiselect step. The database\r\n * driver (its own select) and AI providers + capability packages (their own\r\n * step) are intentionally NOT here — they have dedicated prompts.\r\n */\r\nexport const features: FeatureOption[] = [\r\n // Auth & Access\r\n {\r\n key: \"access\",\r\n label: \"Access (authorization)\",\r\n hint: \"RBAC permission checks, ABAC policies, and roles — pairs with auth\",\r\n group: \"Auth & Access\",\r\n },\r\n\r\n // Rendering & Mail\r\n {\r\n key: \"react\",\r\n label: \"React (rendering & mails)\",\r\n hint: \"React + ReactDOM for non-interactive rendering and HTML/email generation\",\r\n group: \"Rendering & Mail\",\r\n defaultSelected: true,\r\n },\r\n {\r\n key: \"react-email\",\r\n label: \"React Email\",\r\n hint: \"Build email templates with React + Tailwind (pulls react + mail)\",\r\n group: \"Rendering & Mail\",\r\n },\r\n {\r\n key: \"mail\",\r\n label: \"Mail (Nodemailer)\",\r\n hint: \"Send emails via SMTP\",\r\n group: \"Rendering & Mail\",\r\n },\r\n {\r\n key: \"ses\",\r\n label: \"Amazon SES\",\r\n hint: \"Send emails via the AWS SES API\",\r\n group: \"Rendering & Mail\",\r\n },\r\n\r\n // Media\r\n {\r\n key: \"image\",\r\n label: \"Image processing (Sharp)\",\r\n hint: \"Resize, convert, and optimize images\",\r\n group: \"Media\",\r\n },\r\n\r\n // Storage & Cache\r\n {\r\n key: \"s3\",\r\n label: \"S3 storage\",\r\n hint: \"AWS S3 for cloud file storage\",\r\n group: \"Storage & Cache\",\r\n },\r\n {\r\n key: \"redis\",\r\n label: \"Redis cache\",\r\n hint: \"Redis driver for the cache layer\",\r\n group: \"Storage & Cache\",\r\n },\r\n\r\n // Jobs & Messaging\r\n {\r\n key: \"scheduler\",\r\n label: \"Scheduler\",\r\n hint: \"Background tasks and cron jobs\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n {\r\n key: \"herald\",\r\n label: \"Herald (RabbitMQ)\",\r\n hint: \"Message broker for event-driven architecture\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n {\r\n key: \"notifications\",\r\n label: \"Notifications\",\r\n hint: \"Multi-channel notifications — mail + in-app database, preferences, idempotency\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n\r\n // Realtime\r\n {\r\n key: \"socket\",\r\n label: \"Socket.IO\",\r\n hint: \"Realtime websocket server\",\r\n group: \"Realtime\",\r\n },\r\n\r\n // API Docs (swagger / postman / openapi) — not shipped yet; they will arrive\r\n // together in the unified @warlock.js/api-docs package. Re-add the selection\r\n // once that package exists. (Removed so the wizard can't offer unbuilt features.)\r\n\r\n // Tooling\r\n {\r\n key: \"test\",\r\n label: \"Testing (Vitest)\",\r\n hint: \"Vitest + coverage + per-worker DB/cache test setup\",\r\n group: \"Tooling\",\r\n },\r\n];\r\n\r\nexport type AiProviderOption = {\r\n /** Must match a provider/package key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n};\r\n\r\n/**\r\n * AI providers offered in the dedicated AI step. Selecting any of these pulls\r\n * the core `@warlock.js/ai` package automatically via the provider's `requires`\r\n * in core's feature map — the scaffolder never lists `ai` as a standalone pick.\r\n *\r\n * Keys are `ai-`prefixed to mirror core's renamed provider feature keys\r\n * (`ai-openai` → `@warlock.js/ai-openai`, etc.).\r\n */\r\nexport const aiProviders: AiProviderOption[] = [\r\n { key: \"ai-openai\", label: \"OpenAI\", hint: \"GPT models via the OpenAI API\" },\r\n { key: \"ai-google\", label: \"Google (Gemini)\", hint: \"Gemini models via Google AI\" },\r\n { key: \"ai-anthropic\", label: \"Anthropic (Claude)\", hint: \"Claude models via the Anthropic API\" },\r\n { key: \"ai-bedrock\", label: \"AWS Bedrock\", hint: \"Foundation models via Amazon Bedrock\" },\r\n { key: \"ai-ollama\", label: \"Ollama\", hint: \"Local models via Ollama\" },\r\n];\r\n\r\n/**\r\n * AI capability packages offered alongside the providers in the dedicated AI\r\n * step. These are the satellite packages that sit on top of the core\r\n * `@warlock.js/ai` toolkit (each pulls the core `ai` package via its `requires`\r\n * in core's feature map, same as the providers).\r\n */\r\nexport const aiPackages: AiProviderOption[] = [\r\n {\r\n key: \"ai-tools\",\r\n label: \"AI Tools\",\r\n hint: \"Ready-made agent tools (web search, fetch, HTTP, calculator, date-time) + MCP client/server\",\r\n },\r\n {\r\n key: \"ai-panoptic\",\r\n label: \"AI Observability (Panoptic)\",\r\n hint: \"Tracing + exporters + a zero-setup local dashboard\",\r\n },\r\n {\r\n key: \"ai-workspace\",\r\n label: \"AI Workspace\",\r\n hint: \"Policy-jailed filesystem + shell for coding agents\",\r\n },\r\n];\r\n\r\n/**\r\n * Feature options for the multiselect prompt, ordered by group with the group\r\n * surfaced in the hint (keeps a flat list scannable without group widgets).\r\n */\r\nexport function getFeatureOptions() {\r\n return features.map(feature => ({\r\n value: feature.key,\r\n label: feature.label,\r\n hint: `${feature.group} — ${feature.hint}`,\r\n }));\r\n}\r\n\r\n/**\r\n * Keys pre-checked in the feature multiselect.\r\n */\r\nexport function getDefaultFeatureKeys(): string[] {\r\n return features.filter(feature => feature.defaultSelected).map(feature => feature.key);\r\n}\r\n\r\n/**\r\n * AI provider options for the dedicated AI multiselect step.\r\n */\r\nexport function getAiProviderOptions() {\r\n return aiProviders.map(provider => ({\r\n value: provider.key,\r\n label: provider.label,\r\n hint: provider.hint,\r\n }));\r\n}\r\n\r\n/**\r\n * AI capability package options for the dedicated AI multiselect step. Offered\r\n * together with the providers (see `getAiProviderOptions`).\r\n */\r\nexport function getAiPackageOptions() {\r\n return aiPackages.map(pkg => ({\r\n value: pkg.key,\r\n label: pkg.label,\r\n hint: pkg.hint,\r\n }));\r\n}\r\n\r\n/**\r\n * Every selectable key the scaffolder knows about (features + AI providers +\r\n * AI capability packages). Used to validate `--features` / `--ai` flags in\r\n * non-interactive mode.\r\n */\r\nexport function getAllFeatureKeys(): string[] {\r\n return [\r\n ...features.map(feature => feature.key),\r\n ...aiProviders.map(provider => provider.key),\r\n ...aiPackages.map(pkg => pkg.key),\r\n ];\r\n}\r\n"],"mappings":";;;;;;AAuCA,MAAa,WAA4B;CAEvC;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;EACP,iBAAiB;CACnB;CACA;EACE,KAAK;EACL,OA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AAQ,eAAe,CAAC,CAAC,KAAI,YAAW,QAAQ,GAAG;AACvF;;;;AAKA,SAAgB,uBAAuB;CACrC,OAAO,YAAY,KAAI,cAAa;EAClC,OAAO,SAAS;EAChB,OAAO,SAAS;EAChB,MAAM,SAAS;CACjB,EAAE;AACJ;;;;;AAMA,SAAgB,sBAAsB;CACpC,OAAO,WAAW,KAAI,SAAQ;EAC5B,OAAO,IAAI;EACX,OAAO,IAAI;EACX,MAAM,IAAI;CACZ,EAAE;AACJ;;;;;;AAOA,SAAgB,oBAA8B;CAC5C,OAAO;EACL,GAAG,SAAS,KAAI,YAAW,QAAQ,GAAG;EACtC,GAAG,YAAY,KAAI,aAAY,SAAS,GAAG;EAC3C,GAAG,WAAW,KAAI,QAAO,IAAI,GAAG;CAClC;AACF"}
@@ -6,7 +6,7 @@ import { copyDirectory, copyFile, fileExists, getFile, getJsonFile, putFile, put
6
6
  import { unlinkSync } from "node:fs";
7
7
  import path from "path";
8
8
 
9
- //#region ../@warlock.js/create-warlock/src/helpers/app.ts
9
+ //#region ../create-warlock/src/helpers/app.ts
10
10
  var App = class {
11
11
  constructor(app) {
12
12
  this.app = app;
@@ -1 +1 @@
1
- {"version":3,"file":"app.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/helpers/app.ts"],"sourcesContent":["import {\r\n copyDirectory,\r\n copyFile,\r\n fileExists,\r\n getFile,\r\n getJsonFile,\r\n putFile,\r\n putJsonFile,\r\n renameFile,\r\n} from \"@warlock.js/fs\";\r\nimport { unlinkSync } from \"node:fs\";\r\nimport path from \"path\";\r\nimport { AppOptions, Application } from \"../commands/create-new-app/types\";\r\nimport { getDatabaseDriver } from \"../features/database-drivers\";\r\nimport { executeCommand, runCommand } from \"./exec\";\r\nimport { getPackageManager } from \"./package-manager\";\r\nimport { packageRoot, Template, template } from \"./paths\";\r\n\r\nexport class App {\r\n /**\r\n * Resolved files\r\n */\r\n protected files: Record<string, FileManager> = {};\r\n\r\n /**\r\n * Resolved JSON files\r\n */\r\n protected jsonFiles: Record<string, JsonFileManager> = {};\r\n\r\n public isInstalled = false;\r\n\r\n public constructor(protected app: Application) {}\r\n\r\n public get options(): AppOptions {\r\n return this.app.options;\r\n }\r\n\r\n public use(templateName: Template) {\r\n copyDirectory(template(templateName), this.path);\r\n\r\n if (fileExists(this.path + \"/.env.example\")) {\r\n copyFile(this.path + \"/.env.example\", this.path + \"/.env\");\r\n }\r\n\r\n renameFile(this.path + \"/_.gitignore\", this.path + \"/.gitignore\");\r\n\r\n return this;\r\n }\r\n\r\n public init() {\r\n return this;\r\n }\r\n\r\n public terminate() {\r\n // No longer using outro, using showSuccessScreen instead\r\n }\r\n\r\n public install() {\r\n return runCommand(getPackageManager(), [\"install\"], this.path);\r\n }\r\n\r\n public async exec(command: string) {\r\n const [commandName, ...optionsList] = command.split(\" \");\r\n return await executeCommand(commandName, optionsList, this.path);\r\n }\r\n\r\n public async git() {\r\n const { initializeGitRepository } = await import(\r\n \"./project-builder-helpers\"\r\n );\r\n return await initializeGitRepository(this.path);\r\n }\r\n\r\n public updatePackageJson() {\r\n const pkg = this.package\r\n .replace(\"name\", this.name.replaceAll(\"/\", \"-\"))\r\n .replaceAll(\"yarn\", getPackageManager());\r\n\r\n // Pin every @warlock.js/* dependency to THIS create-warlock release version\r\n // so a scaffolded project always matches the framework version it was created\r\n // with. create-warlock and the framework ship in lockstep, so the scaffolder's\r\n // own version is the single source of truth (the template's hardcoded versions\r\n // are irrelevant — they get overwritten here).\r\n const warlockVersion: string = (\r\n getJsonFile(packageRoot(\"package.json\")) as { version: string }\r\n ).version;\r\n const content: any = pkg.content;\r\n\r\n for (const field of [\"dependencies\", \"devDependencies\"] as const) {\r\n const deps = content[field] as Record<string, string> | undefined;\r\n if (!deps) continue;\r\n\r\n for (const dependency of Object.keys(deps)) {\r\n if (dependency.startsWith(\"@warlock.js/\")) {\r\n deps[dependency] = warlockVersion;\r\n }\r\n }\r\n }\r\n\r\n pkg.save();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Configure the chosen database driver: wire `DB_DRIVER` / `DB_PORT` into\r\n * `.env`, AND pin the driver's npm package (`mongodb` / `pg`) into the\r\n * project's `package.json` dependencies.\r\n *\r\n * The dependency is written HERE — before the base `yarn install` — so the\r\n * driver is pulled deterministically by the very first install. We do NOT\r\n * rely on the post-copy `warlock add <driver> --no-install` + separate\r\n * batched install, which can be skipped or fail and leave the driver\r\n * missing (the \"mongodb package is not installed\" runtime error).\r\n */\r\n public configureDatabaseEnv(driverValue: string) {\r\n const driver = getDatabaseDriver(driverValue);\r\n\r\n if (!driver) return this;\r\n\r\n // Pin the driver package into dependencies (idempotent — never downgrade).\r\n const packageJsonPath = path.resolve(this.path, \"package.json\");\r\n const packageJson = getJsonFile(packageJsonPath) as {\r\n dependencies?: Record<string, string>;\r\n };\r\n packageJson.dependencies = packageJson.dependencies ?? {};\r\n if (!packageJson.dependencies[driver.package]) {\r\n packageJson.dependencies[driver.package] = driver.packageVersion;\r\n putJsonFile(packageJsonPath, packageJson);\r\n }\r\n\r\n let envContent = getFile(this.path + \"/.env\") as string;\r\n\r\n envContent = envContent.replace(/DB_PORT=\\d+/, `DB_PORT=${driver.defaultPort}`);\r\n\r\n if (envContent.includes(\"DB_DRIVER=\")) {\r\n envContent = envContent.replace(/DB_DRIVER=\\w*/, `DB_DRIVER=${driver.value}`);\r\n } else {\r\n envContent = envContent.replace(\r\n /DB_PORT=\\d+/,\r\n `DB_PORT=${driver.defaultPort}\\nDB_DRIVER=${driver.value}`,\r\n );\r\n }\r\n\r\n putFile(this.path + \"/.env\", envContent);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove the database layer for a \"no database\" scaffold.\r\n *\r\n * Deletes `src/config/database.ts` (and a `.tsx` variant if present) from the\r\n * freshly-copied template. The framework's database connector is config-gated\r\n * on that file — with it gone, `config.get(\"database\")` is undefined and the\r\n * connector no-ops, so the app boots with no database wired and no driver\r\n * package pulled. The `DB_*` lines in `.env` are left in place (harmless: no\r\n * config reads them) as a ready template for adding a database back later.\r\n */\r\n public removeDatabaseConfig() {\r\n const configDir = path.resolve(this.path, \"src/config\");\r\n\r\n for (const fileName of [\"database.ts\", \"database.tsx\"]) {\r\n const filePath = path.resolve(configDir, fileName);\r\n\r\n if (fileExists(filePath)) {\r\n unlinkSync(filePath);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Pick the home page implementation based on whether React was selected.\r\n *\r\n * The template ships BOTH a plain JSON controller (`home-page.controller.ts`)\r\n * and a React-rendered page (`home-page.controller.tsx` + `HomePageComponent.tsx`).\r\n * Exactly one survives the scaffold: React projects keep the `.tsx` page (its\r\n * `react`/`react-dom` deps come from the `react` feature), every other project\r\n * keeps the dependency-free JSON controller — so a fresh project never imports\r\n * `react` unless it asked for it.\r\n */\r\n public configureHomePage(useReact: boolean) {\r\n const controllers = this.path + \"/src/app/shared/controllers\";\r\n const components = this.path + \"/src/app/shared/components\";\r\n\r\n const remove = (file: string) => {\r\n if (fileExists(file)) unlinkSync(file);\r\n };\r\n\r\n if (useReact) {\r\n remove(controllers + \"/home-page.controller.ts\");\r\n } else {\r\n remove(controllers + \"/home-page.controller.tsx\");\r\n remove(components + \"/HomePageComponent.tsx\");\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Install the selected optional features by delegating to the project's own\r\n * `warlock add`. `--no-install` records every dependency in package.json and\r\n * ejects configs / scripts / setup hooks WITHOUT installing — the caller runs\r\n * one batched install afterwards. Versions come from core's feature map, so\r\n * the scaffolder never duplicates them.\r\n *\r\n * `--no-install` is passed LAST on purpose: the CLI parser treats the\r\n * positional after a bare flag as that flag's value, so it must follow the\r\n * feature list, not precede it.\r\n */\r\n public async installFeatures(features: string[]) {\r\n if (features.length === 0) return true;\r\n\r\n return this.exec(`npx warlock add ${features.join(\" \")} --no-install`);\r\n }\r\n\r\n /**\r\n * Get package json file\r\n */\r\n public get package() {\r\n return this.json(\"package.json\");\r\n }\r\n\r\n public updateDotEnv() {\r\n this.file(\".env\").replaceAll(\"appName\", this.name).save();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get env file to update\r\n */\r\n public get env() {\r\n return this.file(\".env\");\r\n }\r\n\r\n public get name() {\r\n return this.app.appName;\r\n }\r\n\r\n public get path() {\r\n return this.app.appPath;\r\n }\r\n\r\n public file(relativePath: string) {\r\n const fullPath = path.resolve(this.path, relativePath);\r\n\r\n if (!this.files[fullPath]) {\r\n this.files[fullPath] = file(fullPath);\r\n }\r\n\r\n return this.files[fullPath];\r\n }\r\n\r\n public json(relativePath: string): JsonFileManager {\r\n const fullPath = path.resolve(this.path, relativePath);\r\n\r\n if (!this.jsonFiles[fullPath]) {\r\n this.jsonFiles[fullPath] = jsonFile(fullPath);\r\n }\r\n\r\n return this.jsonFiles[fullPath];\r\n }\r\n}\r\n\r\nexport function app(app: Application) {\r\n return new App(app);\r\n}\r\n\r\nexport class FileManager {\r\n public content!: string;\r\n public constructor(protected filePath: string) {\r\n this.parseContent();\r\n }\r\n\r\n protected parseContent() {\r\n this.content = getFile(this.filePath) as string;\r\n }\r\n\r\n public replace(search: string, replace: string) {\r\n this.content = this.content.replace(search, replace);\r\n\r\n return this;\r\n }\r\n\r\n public replaceAll(search: string, replace: string) {\r\n this.content = this.content.replaceAll(search, replace);\r\n\r\n return this;\r\n }\r\n\r\n public save() {\r\n putFile(this.filePath, this.content);\r\n }\r\n}\r\n\r\nexport class JsonFileManager extends FileManager {\r\n protected parseContent() {\r\n this.content = getJsonFile(this.filePath);\r\n }\r\n\r\n public save() {\r\n putJsonFile(this.filePath, this.content);\r\n }\r\n\r\n public has(key: string) {\r\n return this.content[key] !== undefined;\r\n }\r\n\r\n public replace(key: string, value: any) {\r\n this.content[key] = value;\r\n\r\n return this;\r\n }\r\n\r\n public replaceAll(key: string, value: any) {\r\n const contentAsString = JSON.stringify(this.content);\r\n\r\n this.content = JSON.parse(contentAsString.replaceAll(key, value));\r\n\r\n return this;\r\n }\r\n}\r\n\r\nexport function file(path: string) {\r\n return new FileManager(path);\r\n}\r\n\r\nexport function jsonFile(path: string) {\r\n return new JsonFileManager(path);\r\n}\r\n"],"mappings":";;;;;;;;;AAkBA,IAAa,MAAb,MAAiB;CAaf,AAAO,YAAY,AAAU,KAAkB;EAAlB;eATkB,CAAC;mBAKO,CAAC;qBAEnC;CAE2B;CAEhD,IAAW,UAAsB;EAC/B,OAAO,KAAK,IAAI;CAClB;CAEA,AAAO,IAAI,cAAwB;EACjC,cAAc,SAAS,YAAY,GAAG,KAAK,IAAI;EAE/C,IAAI,WAAW,KAAK,OAAO,eAAe,GACxC,SAAS,KAAK,OAAO,iBAAiB,KAAK,OAAO,OAAO;EAG3D,WAAW,KAAK,OAAO,gBAAgB,KAAK,OAAO,aAAa;EAEhE,OAAO;CACT;CAEA,AAAO,OAAO;EACZ,OAAO;CACT;CAEA,AAAO,YAAY,CAEnB;CAEA,AAAO,UAAU;EACf,OAAO,WAAW,kBAAkB,GAAG,CAAC,SAAS,GAAG,KAAK,IAAI;CAC/D;CAEA,MAAa,KAAK,SAAiB;EACjC,MAAM,CAAC,aAAa,GAAG,eAAe,QAAQ,MAAM,GAAG;EACvD,OAAO,MAAM,eAAe,aAAa,aAAa,KAAK,IAAI;CACjE;CAEA,MAAa,MAAM;EACjB,MAAM,EAAE,4BAA4B,MAAM,OACxC;EAEF,OAAO,MAAM,wBAAwB,KAAK,IAAI;CAChD;CAEA,AAAO,oBAAoB;EACzB,MAAM,MAAM,KAAK,QACd,QAAQ,QAAQ,KAAK,KAAK,WAAW,KAAK,GAAG,CAAC,CAAC,CAC/C,WAAW,QAAQ,kBAAkB,CAAC;EAOzC,MAAM,iBACJ,YAAY,YAAY,cAAc,CAAC,CAAC,CACxC;EACF,MAAM,UAAe,IAAI;EAEzB,KAAK,MAAM,SAAS,CAAC,gBAAgB,iBAAiB,GAAY;GAChE,MAAM,OAAO,QAAQ;GACrB,IAAI,CAAC,MAAM;GAEX,KAAK,MAAM,cAAc,OAAO,KAAK,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A,AAAO,OAAO;EACZ,QAAQ,KAAK,UAAU,KAAK,OAAO;CACrC;AACF;AAEA,IAAa,kBAAb,cAAqC,YAAY;CAC/C,AAAU,eAAe;EACvB,KAAK,UAAU,YAAY,KAAK,QAAQ;CAC1C;CAEA,AAAO,OAAO;EACZ,YAAY,KAAK,UAAU,KAAK,OAAO;CACzC;CAEA,AAAO,IAAI,KAAa;EACtB,OAAO,KAAK,QAAQ,SAAS;CAC/B;CAEA,AAAO,QAAQ,KAAa,OAAY;EACtC,KAAK,QAAQ,OAAO;EAEpB,OAAO;CACT;CAEA,AAAO,WAAW,KAAa,OAAY;EACzC,MAAM,kBAAkB,KAAK,UAAU,KAAK,OAAO;EAEnD,KAAK,UAAU,KAAK,MAAM,gBAAgB,WAAW,KAAK,KAAK,CAAC;EAEhE,OAAO;CACT;AACF;AAEA,SAAgB,KAAK,MAAc;CACjC,OAAO,IAAI,YAAY,IAAI;AAC7B;AAEA,SAAgB,SAAS,MAAc;CACrC,OAAO,IAAI,gBAAgB,IAAI;AACjC"}
1
+ {"version":3,"file":"app.mjs","names":[],"sources":["../../../../../../create-warlock/src/helpers/app.ts"],"sourcesContent":["import {\r\n copyDirectory,\r\n copyFile,\r\n fileExists,\r\n getFile,\r\n getJsonFile,\r\n putFile,\r\n putJsonFile,\r\n renameFile,\r\n} from \"@warlock.js/fs\";\r\nimport { unlinkSync } from \"node:fs\";\r\nimport path from \"path\";\r\nimport { AppOptions, Application } from \"../commands/create-new-app/types\";\r\nimport { getDatabaseDriver } from \"../features/database-drivers\";\r\nimport { executeCommand, runCommand } from \"./exec\";\r\nimport { getPackageManager } from \"./package-manager\";\r\nimport { packageRoot, Template, template } from \"./paths\";\r\n\r\nexport class App {\r\n /**\r\n * Resolved files\r\n */\r\n protected files: Record<string, FileManager> = {};\r\n\r\n /**\r\n * Resolved JSON files\r\n */\r\n protected jsonFiles: Record<string, JsonFileManager> = {};\r\n\r\n public isInstalled = false;\r\n\r\n public constructor(protected app: Application) {}\r\n\r\n public get options(): AppOptions {\r\n return this.app.options;\r\n }\r\n\r\n public use(templateName: Template) {\r\n copyDirectory(template(templateName), this.path);\r\n\r\n if (fileExists(this.path + \"/.env.example\")) {\r\n copyFile(this.path + \"/.env.example\", this.path + \"/.env\");\r\n }\r\n\r\n renameFile(this.path + \"/_.gitignore\", this.path + \"/.gitignore\");\r\n\r\n return this;\r\n }\r\n\r\n public init() {\r\n return this;\r\n }\r\n\r\n public terminate() {\r\n // No longer using outro, using showSuccessScreen instead\r\n }\r\n\r\n public install() {\r\n return runCommand(getPackageManager(), [\"install\"], this.path);\r\n }\r\n\r\n public async exec(command: string) {\r\n const [commandName, ...optionsList] = command.split(\" \");\r\n return await executeCommand(commandName, optionsList, this.path);\r\n }\r\n\r\n public async git() {\r\n const { initializeGitRepository } = await import(\r\n \"./project-builder-helpers\"\r\n );\r\n return await initializeGitRepository(this.path);\r\n }\r\n\r\n public updatePackageJson() {\r\n const pkg = this.package\r\n .replace(\"name\", this.name.replaceAll(\"/\", \"-\"))\r\n .replaceAll(\"yarn\", getPackageManager());\r\n\r\n // Pin every @warlock.js/* dependency to THIS create-warlock release version\r\n // so a scaffolded project always matches the framework version it was created\r\n // with. create-warlock and the framework ship in lockstep, so the scaffolder's\r\n // own version is the single source of truth (the template's hardcoded versions\r\n // are irrelevant — they get overwritten here).\r\n const warlockVersion: string = (\r\n getJsonFile(packageRoot(\"package.json\")) as { version: string }\r\n ).version;\r\n const content: any = pkg.content;\r\n\r\n for (const field of [\"dependencies\", \"devDependencies\"] as const) {\r\n const deps = content[field] as Record<string, string> | undefined;\r\n if (!deps) continue;\r\n\r\n for (const dependency of Object.keys(deps)) {\r\n if (dependency.startsWith(\"@warlock.js/\")) {\r\n deps[dependency] = warlockVersion;\r\n }\r\n }\r\n }\r\n\r\n pkg.save();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Configure the chosen database driver: wire `DB_DRIVER` / `DB_PORT` into\r\n * `.env`, AND pin the driver's npm package (`mongodb` / `pg`) into the\r\n * project's `package.json` dependencies.\r\n *\r\n * The dependency is written HERE — before the base `yarn install` — so the\r\n * driver is pulled deterministically by the very first install. We do NOT\r\n * rely on the post-copy `warlock add <driver> --no-install` + separate\r\n * batched install, which can be skipped or fail and leave the driver\r\n * missing (the \"mongodb package is not installed\" runtime error).\r\n */\r\n public configureDatabaseEnv(driverValue: string) {\r\n const driver = getDatabaseDriver(driverValue);\r\n\r\n if (!driver) return this;\r\n\r\n // Pin the driver package into dependencies (idempotent — never downgrade).\r\n const packageJsonPath = path.resolve(this.path, \"package.json\");\r\n const packageJson = getJsonFile(packageJsonPath) as {\r\n dependencies?: Record<string, string>;\r\n };\r\n packageJson.dependencies = packageJson.dependencies ?? {};\r\n if (!packageJson.dependencies[driver.package]) {\r\n packageJson.dependencies[driver.package] = driver.packageVersion;\r\n putJsonFile(packageJsonPath, packageJson);\r\n }\r\n\r\n let envContent = getFile(this.path + \"/.env\") as string;\r\n\r\n envContent = envContent.replace(/DB_PORT=\\d+/, `DB_PORT=${driver.defaultPort}`);\r\n\r\n if (envContent.includes(\"DB_DRIVER=\")) {\r\n envContent = envContent.replace(/DB_DRIVER=\\w*/, `DB_DRIVER=${driver.value}`);\r\n } else {\r\n envContent = envContent.replace(\r\n /DB_PORT=\\d+/,\r\n `DB_PORT=${driver.defaultPort}\\nDB_DRIVER=${driver.value}`,\r\n );\r\n }\r\n\r\n putFile(this.path + \"/.env\", envContent);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove the database layer for a \"no database\" scaffold.\r\n *\r\n * Deletes `src/config/database.ts` (and a `.tsx` variant if present) from the\r\n * freshly-copied template. The framework's database connector is config-gated\r\n * on that file — with it gone, `config.get(\"database\")` is undefined and the\r\n * connector no-ops, so the app boots with no database wired and no driver\r\n * package pulled. The `DB_*` lines in `.env` are left in place (harmless: no\r\n * config reads them) as a ready template for adding a database back later.\r\n */\r\n public removeDatabaseConfig() {\r\n const configDir = path.resolve(this.path, \"src/config\");\r\n\r\n for (const fileName of [\"database.ts\", \"database.tsx\"]) {\r\n const filePath = path.resolve(configDir, fileName);\r\n\r\n if (fileExists(filePath)) {\r\n unlinkSync(filePath);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Pick the home page implementation based on whether React was selected.\r\n *\r\n * The template ships BOTH a plain JSON controller (`home-page.controller.ts`)\r\n * and a React-rendered page (`home-page.controller.tsx` + `HomePageComponent.tsx`).\r\n * Exactly one survives the scaffold: React projects keep the `.tsx` page (its\r\n * `react`/`react-dom` deps come from the `react` feature), every other project\r\n * keeps the dependency-free JSON controller — so a fresh project never imports\r\n * `react` unless it asked for it.\r\n */\r\n public configureHomePage(useReact: boolean) {\r\n const controllers = this.path + \"/src/app/shared/controllers\";\r\n const components = this.path + \"/src/app/shared/components\";\r\n\r\n const remove = (file: string) => {\r\n if (fileExists(file)) unlinkSync(file);\r\n };\r\n\r\n if (useReact) {\r\n remove(controllers + \"/home-page.controller.ts\");\r\n } else {\r\n remove(controllers + \"/home-page.controller.tsx\");\r\n remove(components + \"/HomePageComponent.tsx\");\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Install the selected optional features by delegating to the project's own\r\n * `warlock add`. `--no-install` records every dependency in package.json and\r\n * ejects configs / scripts / setup hooks WITHOUT installing — the caller runs\r\n * one batched install afterwards. Versions come from core's feature map, so\r\n * the scaffolder never duplicates them.\r\n *\r\n * `--no-install` is passed LAST on purpose: the CLI parser treats the\r\n * positional after a bare flag as that flag's value, so it must follow the\r\n * feature list, not precede it.\r\n */\r\n public async installFeatures(features: string[]) {\r\n if (features.length === 0) return true;\r\n\r\n return this.exec(`npx warlock add ${features.join(\" \")} --no-install`);\r\n }\r\n\r\n /**\r\n * Get package json file\r\n */\r\n public get package() {\r\n return this.json(\"package.json\");\r\n }\r\n\r\n public updateDotEnv() {\r\n this.file(\".env\").replaceAll(\"appName\", this.name).save();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get env file to update\r\n */\r\n public get env() {\r\n return this.file(\".env\");\r\n }\r\n\r\n public get name() {\r\n return this.app.appName;\r\n }\r\n\r\n public get path() {\r\n return this.app.appPath;\r\n }\r\n\r\n public file(relativePath: string) {\r\n const fullPath = path.resolve(this.path, relativePath);\r\n\r\n if (!this.files[fullPath]) {\r\n this.files[fullPath] = file(fullPath);\r\n }\r\n\r\n return this.files[fullPath];\r\n }\r\n\r\n public json(relativePath: string): JsonFileManager {\r\n const fullPath = path.resolve(this.path, relativePath);\r\n\r\n if (!this.jsonFiles[fullPath]) {\r\n this.jsonFiles[fullPath] = jsonFile(fullPath);\r\n }\r\n\r\n return this.jsonFiles[fullPath];\r\n }\r\n}\r\n\r\nexport function app(app: Application) {\r\n return new App(app);\r\n}\r\n\r\nexport class FileManager {\r\n public content!: string;\r\n public constructor(protected filePath: string) {\r\n this.parseContent();\r\n }\r\n\r\n protected parseContent() {\r\n this.content = getFile(this.filePath) as string;\r\n }\r\n\r\n public replace(search: string, replace: string) {\r\n this.content = this.content.replace(search, replace);\r\n\r\n return this;\r\n }\r\n\r\n public replaceAll(search: string, replace: string) {\r\n this.content = this.content.replaceAll(search, replace);\r\n\r\n return this;\r\n }\r\n\r\n public save() {\r\n putFile(this.filePath, this.content);\r\n }\r\n}\r\n\r\nexport class JsonFileManager extends FileManager {\r\n protected parseContent() {\r\n this.content = getJsonFile(this.filePath);\r\n }\r\n\r\n public save() {\r\n putJsonFile(this.filePath, this.content);\r\n }\r\n\r\n public has(key: string) {\r\n return this.content[key] !== undefined;\r\n }\r\n\r\n public replace(key: string, value: any) {\r\n this.content[key] = value;\r\n\r\n return this;\r\n }\r\n\r\n public replaceAll(key: string, value: any) {\r\n const contentAsString = JSON.stringify(this.content);\r\n\r\n this.content = JSON.parse(contentAsString.replaceAll(key, value));\r\n\r\n return this;\r\n }\r\n}\r\n\r\nexport function file(path: string) {\r\n return new FileManager(path);\r\n}\r\n\r\nexport function jsonFile(path: string) {\r\n return new JsonFileManager(path);\r\n}\r\n"],"m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Y;CAC/C,AAAU,eAAe;EACvB,KAAK,UAAU,YAAY,KAAK,QAAQ;CAC1C;CAEA,AAAO,OAAO;EACZ,YAAY,KAAK,UAAU,KAAK,OAAO;CACzC;CAEA,AAAO,IAAI,KAAa;EACtB,OAAO,KAAK,QAAQ,SAAS;CAC/B;CAEA,AAAO,QAAQ,KAAa,OAAY;EACtC,KAAK,QAAQ,OAAO;EAEpB,OAAO;CACT;CAEA,AAAO,WAAW,KAAa,OAAY;EACzC,MAAM,kBAAkB,KAAK,UAAU,KAAK,OAAO;EAEnD,KAAK,UAAU,KAAK,MAAM,gBAAgB,WAAW,KAAK,KAAK,CAAC;EAEhE,OAAO;CACT;AACF;AAEA,SAAgB,KAAK,MAAc;CACjC,OAAO,IAAI,YAAY,IAAI;AAC7B;AAEA,SAAgB,SAAS,MAAc;CACrC,OAAO,IAAI,gBAAgB,IAAI;AACjC"}
@@ -2,7 +2,7 @@ import { log } from "@clack/prompts";
2
2
  import { colors } from "@mongez/copper";
3
3
  import childProcess from "cross-spawn";
4
4
 
5
- //#region ../@warlock.js/create-warlock/src/helpers/exec.ts
5
+ //#region ../create-warlock/src/helpers/exec.ts
6
6
  /**
7
7
  * This function directly executes a command
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"exec.mjs","names":["spawn"],"sources":["../../../../../../@warlock.js/create-warlock/src/helpers/exec.ts"],"sourcesContent":["import { log } from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { ChildProcess } from \"child_process\";\r\nimport { default as childProcess, default as spawn } from \"cross-spawn\";\r\n\r\nexport default async function exec(command: string, options: any = {}) {\r\n const [commandName, ...optionsList] = command.split(\" \");\r\n\r\n const commandOutput = childProcess.sync(commandName, optionsList, options);\r\n\r\n // it means command didn't end as expected, then stop the rest of the program\r\n if (commandOutput.error !== null) {\r\n process.exit(1);\r\n }\r\n\r\n return commandOutput;\r\n}\r\n\r\n/**\r\n * This function directly executes a command\r\n */\r\nexport async function executeCommand(cmd: string, args: string[], cwd: string) {\r\n return new Promise<boolean>(resolve => {\r\n const child = spawn(cmd, args, {\r\n cwd,\r\n stdio: \"ignore\",\r\n });\r\n\r\n child.on(\"error\", e => {\r\n if (e) {\r\n if (e.message) {\r\n log.error(colors.red(String(e.message)) + `\\n\\n`);\r\n } else {\r\n log.error(colors.red(String(e)) + `\\n\\n`);\r\n }\r\n }\r\n resolve(false);\r\n });\r\n\r\n child.on(\"close\", code => {\r\n if (code === 0) {\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n });\r\n}\r\n\r\nexport function runCommand(cmd: string, args: string[], cwd: string) {\r\n let child: ChildProcess;\r\n\r\n const install = new Promise<boolean>(resolve => {\r\n try {\r\n child = spawn(cmd, args, {\r\n cwd,\r\n stdio: \"ignore\",\r\n });\r\n\r\n child.on(\"error\", e => {\r\n if (e) {\r\n if (e.message) {\r\n log.error(colors.red(String(e.message)) + `\\n\\n`);\r\n } else {\r\n log.error(colors.red(String(e)) + `\\n\\n`);\r\n }\r\n }\r\n resolve(false);\r\n });\r\n\r\n child.on(\"close\", code => {\r\n if (code === 0) {\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n } catch (e) {\r\n resolve(false);\r\n }\r\n });\r\n\r\n const abort = async () => {\r\n if (child) {\r\n child.kill(\"SIGINT\");\r\n }\r\n };\r\n\r\n return { abort, install };\r\n}\r\n"],"mappings":";;;;;;;;AAqBA,eAAsB,eAAe,KAAa,MAAgB,KAAa;CAC7E,OAAO,IAAI,SAAiB,YAAW;EACrC,MAAM,QAAQA,aAAM,KAAK,MAAM;GAC7B;GACA,OAAO;EACT,CAAC;EAED,MAAM,GAAG,UAAS,MAAK;GACrB,IAAI,GACF,IAAI,EAAE,SACJ,IAAI,MAAM,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM;QAEhD,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,IAAI,MAAM;GAG5C,QAAQ,KAAK;EACf,CAAC;EAED,MAAM,GAAG,UAAS,SAAQ;GACxB,IAAI,SAAS,GACX,QAAQ,IAAI;QAEZ,QAAQ,KAAK;EAEjB,CAAC;CACH,CAAC;AACH;AAEA,SAAgB,WAAW,KAAa,MAAgB,KAAa;CACnE,IAAI;CAEJ,MAAM,UAAU,IAAI,SAAiB,YAAW;EAC9C,IAAI;GACF,QAAQA,aAAM,KAAK,MAAM;IACvB;IACA,OAAO;GACT,CAAC;GAED,MAAM,GAAG,UAAS,MAAK;IACrB,IAAI,GACF,IAAI,EAAE,SACJ,IAAI,MAAM,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM;SAEhD,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,IAAI,MAAM;IAG5C,QAAQ,KAAK;GACf,CAAC;GAED,MAAM,GAAG,UAAS,SAAQ;IACxB,IAAI,SAAS,GACX,QAAQ,IAAI;SAEZ,QAAQ,KAAK;GAEjB,CAAC;EACH,SAAS,GAAG;GACV,QAAQ,KAAK;EACf;CACF,CAAC;CAED,MAAM,QAAQ,YAAY;EACxB,IAAI,OACF,MAAM,KAAK,QAAQ;CAEvB;CAEA,OAAO;EAAE;EAAO;CAAQ;AAC1B"}
1
+ {"version":3,"file":"exec.mjs","names":["spawn"],"sources":["../../../../../../create-warlock/src/helpers/exec.ts"],"sourcesContent":["import { log } from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { ChildProcess } from \"child_process\";\r\nimport { default as childProcess, default as spawn } from \"cross-spawn\";\r\n\r\nexport default async function exec(command: string, options: any = {}) {\r\n const [commandName, ...optionsList] = command.split(\" \");\r\n\r\n const commandOutput = childProcess.sync(commandName, optionsList, options);\r\n\r\n // it means command didn't end as expected, then stop the rest of the program\r\n if (commandOutput.error !== null) {\r\n process.exit(1);\r\n }\r\n\r\n return commandOutput;\r\n}\r\n\r\n/**\r\n * This function directly executes a command\r\n */\r\nexport async function executeCommand(cmd: string, args: string[], cwd: string) {\r\n return new Promise<boolean>(resolve => {\r\n const child = spawn(cmd, args, {\r\n cwd,\r\n stdio: \"ignore\",\r\n });\r\n\r\n child.on(\"error\", e => {\r\n if (e) {\r\n if (e.message) {\r\n log.error(colors.red(String(e.message)) + `\\n\\n`);\r\n } else {\r\n log.error(colors.red(String(e)) + `\\n\\n`);\r\n }\r\n }\r\n resolve(false);\r\n });\r\n\r\n child.on(\"close\", code => {\r\n if (code === 0) {\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n });\r\n}\r\n\r\nexport function runCommand(cmd: string, args: string[], cwd: string) {\r\n let child: ChildProcess;\r\n\r\n const install = new Promise<boolean>(resolve => {\r\n try {\r\n child = spawn(cmd, args, {\r\n cwd,\r\n stdio: \"ignore\",\r\n });\r\n\r\n child.on(\"error\", e => {\r\n if (e) {\r\n if (e.message) {\r\n log.error(colors.red(String(e.message)) + `\\n\\n`);\r\n } else {\r\n log.error(colors.red(String(e)) + `\\n\\n`);\r\n }\r\n }\r\n resolve(false);\r\n });\r\n\r\n child.on(\"close\", code => {\r\n if (code === 0) {\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n } catch (e) {\r\n resolve(false);\r\n }\r\n });\r\n\r\n const abort = async () => {\r\n if (child) {\r\n child.kill(\"SIGINT\");\r\n }\r\n };\r\n\r\n return { abort, install };\r\n}\r\n"],"mappings":";;;;;;;;AAqBA,eAAsB,eAAe,KAAa,MAAgB,KAAa;CAC7E,OAAO,IAAI,SAAiB,YAAW;EACrC,MAAM,QAAQA,aAAM,KAAK,MAAM;GAC7B;GACA,OAAO;EACT,CAAC;EAED,MAAM,GAAG,UAAS,MAAK;GACrB,IAAI,GACF,IAAI,EAAE,SACJ,IAAI,MAAM,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM;QAEhD,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,IAAI,MAAM;GAG5C,QAAQ,KAAK;EACf,CAAC;EAED,MAAM,GAAG,UAAS,SAAQ;GACxB,IAAI,SAAS,GACX,QAAQ,IAAI;QAEZ,QAAQ,KAAK;EAEjB,CAAC;CACH,CAAC;AACH;AAEA,SAAgB,WAAW,KAAa,MAAgB,KAAa;CACnE,IAAI;CAEJ,MAAM,UAAU,IAAI,SAAiB,YAAW;EAC9C,IAAI;GACF,QAAQA,aAAM,KAAK,MAAM;IACvB;IACA,OAAO;GACT,CAAC;GAED,MAAM,GAAG,UAAS,MAAK;IACrB,IAAI,GACF,IAAI,EAAE,SACJ,IAAI,MAAM,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM;SAEhD,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,IAAI,MAAM;IAG5C,QAAQ,KAAK;GACf,CAAC;GAED,MAAM,GAAG,UAAS,SAAQ;IACxB,IAAI,SAAS,GACX,QAAQ,IAAI;SAEZ,QAAQ,KAAK;GAEjB,CAAC;EACH,SAAS,GAAG;GACV,QAAQ,KAAK;EACf;CACF,CAAC;CAED,MAAM,QAAQ,YAAY;EACxB,IAAI,OACF,MAAM,KAAK,QAAQ;CAEvB;CAEA,OAAO;EAAE;EAAO;CAAQ;AAC1B"}
@@ -2,7 +2,7 @@ import { exec, execSync } from "child_process";
2
2
  import { promisify } from "util";
3
3
  import detectPackageManager from "which-pm-runs";
4
4
 
5
- //#region ../@warlock.js/create-warlock/src/helpers/package-manager.ts
5
+ //#region ../create-warlock/src/helpers/package-manager.ts
6
6
  const execAsync = promisify(exec);
7
7
  let detectedPackageManager;
8
8
  let cachedSystemManagers;
@@ -1 +1 @@
1
- {"version":3,"file":"package-manager.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/helpers/package-manager.ts"],"sourcesContent":["import { exec, execSync } from \"child_process\";\r\nimport { promisify } from \"util\";\r\nimport detectPackageManager from \"which-pm-runs\";\r\n\r\nconst execAsync = promisify(exec);\r\n\r\nlet detectedPackageManager: string | undefined;\r\nlet cachedSystemManagers: string[] | undefined;\r\nlet cachedPreferredManager: string | undefined;\r\n\r\nexport function getPackageManager() {\r\n if (detectedPackageManager) {\r\n return detectedPackageManager;\r\n }\r\n\r\n return getPreferredPackageManager();\r\n}\r\n\r\n/**\r\n * Check if a package manager is installed\r\n */\r\nfunction isInstalled(manager: string): boolean {\r\n try {\r\n execSync(`${manager} --version`, { stdio: \"ignore\" });\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Check if a package manager is installed (async)\r\n */\r\nasync function checkManager(manager: string): Promise<boolean> {\r\n try {\r\n await execAsync(`${manager} --version`);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Detect available package managers asynchronously and cache results\r\n */\r\nexport async function detectPackageManagers() {\r\n const managers = [\"npm\"];\r\n const checks = [checkManager(\"yarn\"), checkManager(\"pnpm\")];\r\n\r\n const [hasYarn, hasPnpm] = await Promise.all(checks);\r\n\r\n if (hasYarn) managers.push(\"yarn\");\r\n if (hasPnpm) managers.push(\"pnpm\");\r\n\r\n cachedSystemManagers = managers;\r\n\r\n // Determine preference\r\n const runningPm = detectPackageManager()?.name;\r\n if (runningPm && runningPm !== \"npm\") {\r\n cachedPreferredManager = runningPm;\r\n } else if (hasYarn) {\r\n cachedPreferredManager = \"yarn\";\r\n } else if (hasPnpm) {\r\n cachedPreferredManager = \"pnpm\";\r\n } else {\r\n cachedPreferredManager = \"npm\";\r\n }\r\n}\r\n\r\n/**\r\n * Get available package managers on the system\r\n */\r\nexport function getSystemPackageManagers(): string[] {\r\n if (cachedSystemManagers) return cachedSystemManagers;\r\n\r\n const managers = [\"npm\"]; // npm is assumed to be always available\r\n\r\n if (isInstalled(\"yarn\")) {\r\n managers.push(\"yarn\");\r\n }\r\n\r\n if (isInstalled(\"pnpm\")) {\r\n managers.push(\"pnpm\");\r\n }\r\n\r\n return managers;\r\n}\r\n\r\n/**\r\n * Get the preferred package manager based on priority\r\n */\r\nexport function getPreferredPackageManager(): string {\r\n if (cachedPreferredManager) return cachedPreferredManager;\r\n\r\n // Priority 1: The manager currently running the script\r\n const runningPm = detectPackageManager()?.name;\r\n if (runningPm && runningPm !== \"npm\") return runningPm;\r\n\r\n // Priority 2: Yarn (if installed)\r\n if (isInstalled(\"yarn\")) return \"yarn\";\r\n\r\n // Priority 3: pnpm (if installed)\r\n if (isInstalled(\"pnpm\")) return \"pnpm\";\r\n\r\n // Priority 4: npm (default)\r\n return \"npm\";\r\n}\r\n\r\nexport function setPackageManager(packageManager: string) {\r\n detectedPackageManager = packageManager;\r\n}\r\n\r\nexport function installCommand() {\r\n return `${getPackageManager()} install`;\r\n}\r\n\r\nexport function startCommand() {\r\n if (getPackageManager() === \"npm\") return \"npm run dev\";\r\n\r\n return `${getPackageManager()} dev`;\r\n}\r\n\r\nexport function runPackageManagerCommand(command: string) {\r\n const packageManager = getPackageManager();\r\n\r\n if (packageManager === \"npm\") return `npm run ${command}`;\r\n\r\n return `${packageManager} ${command}`;\r\n}\r\n"],"mappings":";;;;;AAIA,MAAM,YAAY,UAAU,IAAI;AAEhC,IAAI;AACJ,IAAI;AACJ,IAAI;AAEJ,SAAgB,oBAAoB;CAClC,IAAI,wBACF,OAAO;CAGT,OAAO,2BAA2B;AACpC;;;;AAKA,SAAS,YAAY,SAA0B;CAC7C,IAAI;EACF,SAAS,GAAG,QAAQ,aAAa,EAAE,OAAO,SAAS,CAAC;EACpD,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;;;;AAKA,eAAe,aAAa,SAAmC;CAC7D,IAAI;EACF,MAAM,UAAU,GAAG,QAAQ,WAAW;EACtC,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;;;;AAKA,eAAsB,wBAAwB;CAC5C,MAAM,WAAW,CAAC,KAAK;CACvB,MAAM,SAAS,CAAC,aAAa,MAAM,GAAG,aAAa,MAAM,CAAC;CAE1D,MAAM,CAAC,SAAS,WAAW,MAAM,QAAQ,IAAI,MAAM;CAEnD,IAAI,SAAS,SAAS,KAAK,MAAM;CACjC,IAAI,SAAS,SAAS,KAAK,MAAM;CAEjC,uBAAuB;CAGvB,MAAM,YAAY,qBAAqB,CAAC,EAAE;CAC1C,IAAI,aAAa,cAAc,OAC7B,yBAAyB;MACpB,IAAI,SACT,yBAAyB;MACpB,IAAI,SACT,yBAAyB;MAEzB,yBAAyB;AAE7B;;;;AAKA,SAAgB,2BAAqC;CACnD,IAAI,sBAAsB,OAAO;CAEjC,MAAM,WAAW,CAAC,KAAK;CAEvB,IAAI,YAAY,MAAM,GACpB,SAAS,KAAK,MAAM;CAGtB,IAAI,YAAY,MAAM,GACpB,SAAS,KAAK,MAAM;CAGtB,OAAO;AACT;;;;AAKA,SAAgB,6BAAqC;CACnD,IAAI,wBAAwB,OAAO;CAGnC,MAAM,YAAY,qBAAqB,CAAC,EAAE;CAC1C,IAAI,aAAa,cAAc,OAAO,OAAO;CAG7C,IAAI,YAAY,MAAM,GAAG,OAAO;CAGhC,IAAI,YAAY,MAAM,GAAG,OAAO;CAGhC,OAAO;AACT;AAEA,SAAgB,kBAAkB,gBAAwB;CACxD,yBAAyB;AAC3B;AAYA,SAAgB,yBAAyB,SAAiB;CACxD,MAAM,iBAAiB,kBAAkB;CAEzC,IAAI,mBAAmB,OAAO,OAAO,WAAW;CAEhD,OAAO,GAAG,eAAe,GAAG;AAC9B"}
1
+ {"version":3,"file":"package-manager.mjs","names":[],"sources":["../../../../../../create-warlock/src/helpers/package-manager.ts"],"sourcesContent":["import { exec, execSync } from \"child_process\";\r\nimport { promisify } from \"util\";\r\nimport detectPackageManager from \"which-pm-runs\";\r\n\r\nconst execAsync = promisify(exec);\r\n\r\nlet detectedPackageManager: string | undefined;\r\nlet cachedSystemManagers: string[] | undefined;\r\nlet cachedPreferredManager: string | undefined;\r\n\r\nexport function getPackageManager() {\r\n if (detectedPackageManager) {\r\n return detectedPackageManager;\r\n }\r\n\r\n return getPreferredPackageManager();\r\n}\r\n\r\n/**\r\n * Check if a package manager is installed\r\n */\r\nfunction isInstalled(manager: string): boolean {\r\n try {\r\n execSync(`${manager} --version`, { stdio: \"ignore\" });\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Check if a package manager is installed (async)\r\n */\r\nasync function checkManager(manager: string): Promise<boolean> {\r\n try {\r\n await execAsync(`${manager} --version`);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Detect available package managers asynchronously and cache results\r\n */\r\nexport async function detectPackageManagers() {\r\n const managers = [\"npm\"];\r\n const checks = [checkManager(\"yarn\"), checkManager(\"pnpm\")];\r\n\r\n const [hasYarn, hasPnpm] = await Promise.all(checks);\r\n\r\n if (hasYarn) managers.push(\"yarn\");\r\n if (hasPnpm) managers.push(\"pnpm\");\r\n\r\n cachedSystemManagers = managers;\r\n\r\n // Determine preference\r\n const runningPm = detectPackageManager()?.name;\r\n if (runningPm && runningPm !== \"npm\") {\r\n cachedPreferredManager = runningPm;\r\n } else if (hasYarn) {\r\n cachedPreferredManager = \"yarn\";\r\n } else if (hasPnpm) {\r\n cachedPreferredManager = \"pnpm\";\r\n } else {\r\n cachedPreferredManager = \"npm\";\r\n }\r\n}\r\n\r\n/**\r\n * Get available package managers on the system\r\n */\r\nexport function getSystemPackageManagers(): string[] {\r\n if (cachedSystemManagers) return cachedSystemManagers;\r\n\r\n const managers = [\"npm\"]; // npm is assumed to be always available\r\n\r\n if (isInstalled(\"yarn\")) {\r\n managers.push(\"yarn\");\r\n }\r\n\r\n if (isInstalled(\"pnpm\")) {\r\n managers.push(\"pnpm\");\r\n }\r\n\r\n return managers;\r\n}\r\n\r\n/**\r\n * Get the preferred package manager based on priority\r\n */\r\nexport function getPreferredPackageManager(): string {\r\n if (cachedPreferredManager) return cachedPreferredManager;\r\n\r\n // Priority 1: The manager currently running the script\r\n const runningPm = detectPackageManager()?.name;\r\n if (runningPm && runningPm !== \"npm\") return runningPm;\r\n\r\n // Priority 2: Yarn (if installed)\r\n if (isInstalled(\"yarn\")) return \"yarn\";\r\n\r\n // Priority 3: pnpm (if installed)\r\n if (isInstalled(\"pnpm\")) return \"pnpm\";\r\n\r\n // Priority 4: npm (default)\r\n return \"npm\";\r\n}\r\n\r\nexport function setPackageManager(packageManager: string) {\r\n detectedPackageManager = packageManager;\r\n}\r\n\r\nexport function installCommand() {\r\n return `${getPackageManager()} install`;\r\n}\r\n\r\nexport function startCommand() {\r\n if (getPackageManager() === \"npm\") return \"npm run dev\";\r\n\r\n return `${getPackageManager()} dev`;\r\n}\r\n\r\nexport function runPackageManagerCommand(command: string) {\r\n const packageManager = getPackageManager();\r\n\r\n if (packageManager === \"npm\") return `npm run ${command}`;\r\n\r\n return `${packageManager} ${command}`;\r\n}\r\n"],"mappings":";;;;;AAIA,MAAM,YAAY,UAAU,IAAI;AAEhC,IAAI;AACJ,IAAI;AACJ,IAAI;AAEJ,SAAgB,oBAAoB;CAClC,IAAI,wBACF,OAAO;CAGT,OAAO,2BAA2B;AACpC;;;;AAKA,SAAS,YAAY,SAA0B;CAC7C,IAAI;EACF,SAAS,GAAG,QAAQ,aAAa,EAAE,OAAO,SAAS,CAAC;EACpD,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;;;;AAKA,eAAe,aAAa,SAAmC;CAC7D,IAAI;EACF,MAAM,UAAU,GAAG,QAAQ,WAAW;EACtC,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;;;;AAKA,eAAsB,wBAAwB;CAC5C,MAAM,WAAW,CAAC,KAAK;CACvB,MAAM,SAAS,CAAC,aAAa,MAAM,GAAG,aAAa,MAAM,CAAC;CAE1D,MAAM,CAAC,SAAS,WAAW,MAAM,QAAQ,IAAI,MAAM;CAEnD,IAAI,SAAS,SAAS,KAAK,MAAM;CACjC,IAAI,SAAS,SAAS,KAAK,MAAM;CAEjC,uBAAuB;CAGvB,MAAM,YAAY,qBAAqB,CAAC,EAAE;CAC1C,IAAI,aAAa,cAAc,OAC7B,yBAAyB;MACpB,IAAI,SACT,yBAAyB;MACpB,IAAI,SACT,yBAAyB;MAEzB,yBAAyB;AAE7B;;;;AAKA,SAAgB,2BAAqC;CACnD,IAAI,sBAAsB,OAAO;CAEjC,MAAM,WAAW,CAAC,KAAK;CAEvB,IAAI,YAAY,MAAM,GACpB,SAAS,KAAK,MAAM;CAGtB,IAAI,YAAY,MAAM,GACpB,SAAS,KAAK,MAAM;CAGtB,OAAO;AACT;;;;AAKA,SAAgB,6BAAqC;CACnD,IAAI,wBAAwB,OAAO;CAGnC,MAAM,YAAY,qBAAqB,CAAC,EAAE;CAC1C,IAAI,aAAa,cAAc,OAAO,OAAO;CAG7C,IAAI,YAAY,MAAM,GAAG,OAAO;CAGhC,IAAI,YAAY,MAAM,GAAG,OAAO;CAGhC,OAAO;AACT;AAEA,SAAgB,kBAAkB,gBAAwB;CACxD,yBAAyB;AAC3B;AAYA,SAAgB,yBAAyB,SAAiB;CACxD,MAAM,iBAAiB,kBAAkB;CAEzC,IAAI,mBAAmB,OAAO,OAAO,WAAW;CAEhD,OAAO,GAAG,eAAe,GAAG;AAC9B"}
@@ -1,7 +1,7 @@
1
1
  import path from "path";
2
2
  import { fileURLToPath } from "url";
3
3
 
4
- //#region ../@warlock.js/create-warlock/src/helpers/paths.ts
4
+ //#region ../create-warlock/src/helpers/paths.ts
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = path.dirname(__filename);
7
7
  function template(templateName) {
@@ -1 +1 @@
1
- {"version":3,"file":"paths.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/helpers/paths.ts"],"sourcesContent":["import path from \"path\";\r\nimport { fileURLToPath } from \"url\";\r\n\r\nconst __filename = fileURLToPath(import.meta.url);\r\n\r\nconst __dirname = path.dirname(__filename);\r\n\r\nexport type Template = \"warlock\";\r\n\r\nexport function template(templateName: Template): string {\r\n return path.resolve(__dirname, \"../\", \"../\", \"templates\", templateName);\r\n}\r\n\r\nexport function packageRoot(...paths: string[]): string {\r\n return path.resolve(__dirname, \"../\", \"../\", ...paths);\r\n}\r\n"],"mappings":";;;;AAGA,MAAM,aAAa,cAAc,OAAO,KAAK,GAAG;AAEhD,MAAM,YAAY,KAAK,QAAQ,UAAU;AAIzC,SAAgB,SAAS,cAAgC;CACvD,OAAO,KAAK,QAAQ,WAAW,OAAO,OAAO,aAAa,YAAY;AACxE;AAEA,SAAgB,YAAY,GAAG,OAAyB;CACtD,OAAO,KAAK,QAAQ,WAAW,OAAO,OAAO,GAAG,KAAK;AACvD"}
1
+ {"version":3,"file":"paths.mjs","names":[],"sources":["../../../../../../create-warlock/src/helpers/paths.ts"],"sourcesContent":["import path from \"path\";\r\nimport { fileURLToPath } from \"url\";\r\n\r\nconst __filename = fileURLToPath(import.meta.url);\r\n\r\nconst __dirname = path.dirname(__filename);\r\n\r\nexport type Template = \"warlock\";\r\n\r\nexport function template(templateName: Template): string {\r\n return path.resolve(__dirname, \"../\", \"../\", \"templates\", templateName);\r\n}\r\n\r\nexport function packageRoot(...paths: string[]): string {\r\n return path.resolve(__dirname, \"../\", \"../\", ...paths);\r\n}\r\n"],"mappings":";;;;AAGA,MAAM,aAAa,cAAc,OAAO,KAAK,GAAG;AAEhD,MAAM,YAAY,KAAK,QAAQ,UAAU;AAIzC,SAAgB,SAAS,cAAgC;CACvD,OAAO,KAAK,QAAQ,WAAW,OAAO,OAAO,aAAa,YAAY;AACxE;AAEA,SAAgB,YAAY,GAAG,OAAyB;CACtD,OAAO,KAAK,QAAQ,WAAW,OAAO,OAAO,GAAG,KAAK;AACvD"}
@@ -6,7 +6,7 @@ import { colors } from "@mongez/copper";
6
6
  import { copyDirectory, getFile, getJsonFile, putFile, putJsonFile, renameFile } from "@warlock.js/fs";
7
7
  import path from "path";
8
8
 
9
- //#region ../@warlock.js/create-warlock/src/helpers/project-builder-helpers.ts
9
+ //#region ../create-warlock/src/helpers/project-builder-helpers.ts
10
10
  async function initializeGitRepository(appPath) {
11
11
  await executeCommand(`git`, ["init"], appPath);
12
12
  await executeCommand(`git`, [
@@ -1 +1 @@
1
- {"version":3,"file":"project-builder-helpers.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/helpers/project-builder-helpers.ts"],"sourcesContent":["import { outro } from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport {\r\n copyDirectory,\r\n getFile,\r\n getJsonFile,\r\n putFile,\r\n putJsonFile,\r\n renameFile,\r\n} from \"@warlock.js/fs\";\r\nimport path from \"path\";\r\nimport { executeCommand } from \"./exec\";\r\nimport { startCommand } from \"./package-manager\";\r\nimport { Template, template } from \"./paths\";\r\n\r\nexport async function initializeGitRepository(appPath: string) {\r\n // initialize git repository\r\n await executeCommand(`git`, [\"init\"], appPath);\r\n // switching to`main`branch\r\n await executeCommand(`git`, [\"checkout\", \"-b\", \"main\"], appPath);\r\n\r\n // add files\r\n await executeCommand(`git`, [\"add\", \".\"], appPath);\r\n\r\n // commit files\r\n await executeCommand(`git`, [\"commit\", \"-m\", \"Initial commit\"], appPath);\r\n\r\n return true;\r\n}\r\n\r\nexport async function updateEnvFile(appPath: string, appName: string) {\r\n // update package.json file\r\n const packageJson: any = getJsonFile(path.resolve(appPath, \"package.json\"));\r\n\r\n packageJson.name = appName;\r\n\r\n putJsonFile(path.resolve(appPath, \"package.json\"), packageJson);\r\n\r\n // update env file\r\n const dotEnv = getFile(path.resolve(appPath, \".env\"))\r\n .replace(\"AppName\", appName)\r\n .replace(\r\n \"AppCodeName\",\r\n appName\r\n .split(/-|_/g)\r\n .map(word => word[0])\r\n .join(\"\"),\r\n );\r\n\r\n putFile(path.resolve(appPath, \".env\"), dotEnv);\r\n\r\n // update .env.production file\r\n let dotEnvProduction = getFile(path.resolve(appPath, \".env.shared\"));\r\n\r\n dotEnvProduction = dotEnvProduction.replace(\"AppName\", appName).replace(\r\n \"AppCodeName\",\r\n appName\r\n .split(/-|_/g)\r\n .map(word => word[0])\r\n .join(\"\"),\r\n );\r\n\r\n putFile(path.resolve(appPath, \".env.shared\"), dotEnvProduction);\r\n}\r\n\r\nexport async function copyTemplateFiles(\r\n templateName: Template,\r\n appPath: string,\r\n _appName: string,\r\n) {\r\n // copy project files\r\n copyDirectory(template(templateName), appPath);\r\n\r\n // replace _.gitignore to\r\n renameFile(\r\n path.resolve(appPath, \"_.gitignore\"),\r\n path.resolve(appPath, \".gitignore\"),\r\n );\r\n}\r\n\r\nexport async function allDone(appName: string) {\r\n outro(\r\n \"Awesome! Your project is ready to rock! \" +\r\n \"Run the following command to start development:\",\r\n );\r\n\r\n console.log(colors.cyan(`cd ${appName} && ${startCommand()}`));\r\n\r\n console.log();\r\n\r\n console.log(\r\n `Pro tip: Install the ${colors.yellow(\r\n \"Generator Z\",\r\n )} extension in VSCode for helpful code snippets and productivity boosters!`,\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;AAeA,eAAsB,wBAAwB,SAAiB;CAE7D,MAAM,eAAe,OAAO,CAAC,MAAM,GAAG,OAAO;CAE7C,MAAM,eAAe,OAAO;EAAC;EAAY;EAAM;CAAM,GAAG,OAAO;CAG/D,MAAM,eAAe,OAAO,CAAC,OAAO,GAAG,GAAG,OAAO;CAGjD,MAAM,eAAe,OAAO;EAAC;EAAU;EAAM;CAAgB,GAAG,OAAO;CAEvE,OAAO;AACT"}
1
+ {"version":3,"file":"project-builder-helpers.mjs","names":[],"sources":["../../../../../../create-warlock/src/helpers/project-builder-helpers.ts"],"sourcesContent":["import { outro } from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport {\r\n copyDirectory,\r\n getFile,\r\n getJsonFile,\r\n putFile,\r\n putJsonFile,\r\n renameFile,\r\n} from \"@warlock.js/fs\";\r\nimport path from \"path\";\r\nimport { executeCommand } from \"./exec\";\r\nimport { startCommand } from \"./package-manager\";\r\nimport { Template, template } from \"./paths\";\r\n\r\nexport async function initializeGitRepository(appPath: string) {\r\n // initialize git repository\r\n await executeCommand(`git`, [\"init\"], appPath);\r\n // switching to`main`branch\r\n await executeCommand(`git`, [\"checkout\", \"-b\", \"main\"], appPath);\r\n\r\n // add files\r\n await executeCommand(`git`, [\"add\", \".\"], appPath);\r\n\r\n // commit files\r\n await executeCommand(`git`, [\"commit\", \"-m\", \"Initial commit\"], appPath);\r\n\r\n return true;\r\n}\r\n\r\nexport async function updateEnvFile(appPath: string, appName: string) {\r\n // update package.json file\r\n const packageJson: any = getJsonFile(path.resolve(appPath, \"package.json\"));\r\n\r\n packageJson.name = appName;\r\n\r\n putJsonFile(path.resolve(appPath, \"package.json\"), packageJson);\r\n\r\n // update env file\r\n const dotEnv = getFile(path.resolve(appPath, \".env\"))\r\n .replace(\"AppName\", appName)\r\n .replace(\r\n \"AppCodeName\",\r\n appName\r\n .split(/-|_/g)\r\n .map(word => word[0])\r\n .join(\"\"),\r\n );\r\n\r\n putFile(path.resolve(appPath, \".env\"), dotEnv);\r\n\r\n // update .env.production file\r\n let dotEnvProduction = getFile(path.resolve(appPath, \".env.shared\"));\r\n\r\n dotEnvProduction = dotEnvProduction.replace(\"AppName\", appName).replace(\r\n \"AppCodeName\",\r\n appName\r\n .split(/-|_/g)\r\n .map(word => word[0])\r\n .join(\"\"),\r\n );\r\n\r\n putFile(path.resolve(appPath, \".env.shared\"), dotEnvProduction);\r\n}\r\n\r\nexport async function copyTemplateFiles(\r\n templateName: Template,\r\n appPath: string,\r\n _appName: string,\r\n) {\r\n // copy project files\r\n copyDirectory(template(templateName), appPath);\r\n\r\n // replace _.gitignore to\r\n renameFile(\r\n path.resolve(appPath, \"_.gitignore\"),\r\n path.resolve(appPath, \".gitignore\"),\r\n );\r\n}\r\n\r\nexport async function allDone(appName: string) {\r\n outro(\r\n \"Awesome! Your project is ready to rock! \" +\r\n \"Run the following command to start development:\",\r\n );\r\n\r\n console.log(colors.cyan(`cd ${appName} && ${startCommand()}`));\r\n\r\n console.log();\r\n\r\n console.log(\r\n `Pro tip: Install the ${colors.yellow(\r\n \"Generator Z\",\r\n )} extension in VSCode for helpful code snippets and productivity boosters!`,\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;AAeA,eAAsB,wBAAwB,SAAiB;CAE7D,MAAM,eAAe,OAAO,CAAC,MAAM,GAAG,OAAO;CAE7C,MAAM,eAAe,OAAO;EAAC;EAAY;EAAM;CAAM,GAAG,OAAO;CAG/D,MAAM,eAAe,OAAO,CAAC,OAAO,GAAG,GAAG,OAAO;CAGjD,MAAM,eAAe,OAAO;EAAC;EAAU;EAAM;CAAgB,GAAG,OAAO;CAEvE,OAAO;AACT"}
package/esm/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CliFlags } from "./commands/create-new-app/types.mjs";
2
2
 
3
- //#region ../@warlock.js/create-warlock/src/index.d.ts
3
+ //#region ../create-warlock/src/index.d.ts
4
4
  /**
5
5
  * Parse the scaffolder's own CLI flags for non-interactive mode.
6
6
  *
package/esm/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { NO_DATABASE } from "./features/database-drivers.mjs";
2
2
  import createNewApp from "./commands/create-new-app/index.mjs";
3
3
 
4
- //#region ../@warlock.js/create-warlock/src/index.ts
4
+ //#region ../create-warlock/src/index.ts
5
5
  const valueFlags = [
6
6
  "name",
7
7
  "db",
package/esm/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../@warlock.js/create-warlock/src/index.ts"],"sourcesContent":["import createNewApp from \"./commands/create-new-app\";\nimport { CliFlags } from \"./commands/create-new-app/types\";\nimport { NO_DATABASE } from \"./features/database-drivers\";\n\nconst valueFlags = [\"name\", \"db\", \"pm\", \"features\", \"ai\"];\n\n/**\n * Parse the scaffolder's own CLI flags for non-interactive mode.\n *\n * @example\n * create-warlock my-app --db=postgres --features=test,herald --ai=openai,anthropic --yes\n */\nexport function parseFlags(argv: string[]): CliFlags {\n const flags: CliFlags = {};\n const positionals: string[] = [];\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n\n if (!arg.startsWith(\"-\")) {\n positionals.push(arg);\n continue;\n }\n\n const equalIndex = arg.indexOf(\"=\");\n const key = (equalIndex === -1 ? arg : arg.slice(0, equalIndex)).replace(/^-+/, \"\");\n let value: string | undefined = equalIndex === -1 ? undefined : arg.slice(equalIndex + 1);\n\n // Value-taking flags may use either `--key=value` or `--key value`.\n if (valueFlags.includes(key) && value === undefined) {\n const next = argv[i + 1];\n\n if (next && !next.startsWith(\"-\")) {\n value = next;\n i++;\n }\n }\n\n switch (key) {\n case \"yes\":\n case \"y\":\n flags.yes = true;\n break;\n case \"git\":\n flags.git = true;\n break;\n case \"no-git\":\n flags.git = false;\n break;\n case \"jwt\":\n flags.jwt = true;\n break;\n case \"no-jwt\":\n flags.jwt = false;\n break;\n case \"name\":\n flags.name = value;\n break;\n case \"db\":\n flags.db = value;\n break;\n case \"no-db\":\n // Opt out of a database entirely — equivalent to `--db=none`.\n flags.db = NO_DATABASE;\n break;\n case \"pm\":\n flags.pm = value;\n break;\n case \"features\":\n flags.features = splitList(value);\n break;\n case \"ai\":\n flags.ai = splitList(value);\n break;\n }\n }\n\n if (!flags.name && positionals.length > 0) {\n flags.name = positionals[0];\n }\n\n return flags;\n}\n\nfunction splitList(value: string | undefined): string[] {\n if (!value) return [];\n\n return value\n .split(\",\")\n .map(item => item.trim())\n .filter(Boolean);\n}\n\nexport default function createApp() {\n const flags = parseFlags(process.argv.slice(2));\n\n createNewApp(flags);\n}\n"],"mappings":";;;;AAIA,MAAM,aAAa;CAAC;CAAQ;CAAM;CAAM;CAAY;AAAI;;;;;;;AAQxD,SAAgB,WAAW,MAA0B;CACnD,MAAM,QAAkB,CAAC;CACzB,MAAM,cAAwB,CAAC;CAE/B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,KAAK;EAEjB,IAAI,CAAC,IAAI,WAAW,GAAG,GAAG;GACxB,YAAY,KAAK,GAAG;GACpB;EACF;EAEA,MAAM,aAAa,IAAI,QAAQ,GAAG;EAClC,MAAM,OAAO,eAAe,KAAK,MAAM,IAAI,MAAM,GAAG,UAAU,EAAC,CAAE,QAAQ,OAAO,EAAE;EAClF,IAAI,QAA4B,eAAe,KAAK,SAAY,IAAI,MAAM,aAAa,CAAC;EAGxF,IAAI,WAAW,SAAS,GAAG,KAAK,UAAU,QAAW;GACnD,MAAM,OAAO,KAAK,IAAI;GAEtB,IAAI,QAAQ,CAAC,KAAK,WAAW,GAAG,GAAG;IACjC,QAAQ;IACR;GACF;EACF;EAEA,QAAQ,KAAR;GACE,KAAK;GACL,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,MAAM;IACZ;GACF,KAAK;IACH,MAAM,OAAO;IACb;GACF,KAAK;IACH,MAAM,KAAK;IACX;GACF,KAAK;IAEH,MAAM,KAAK;IACX;GACF,KAAK;IACH,MAAM,KAAK;IACX;GACF,KAAK;IACH,MAAM,WAAW,UAAU,KAAK;IAChC;GACF,KAAK;IACH,MAAM,KAAK,UAAU,KAAK;IAC1B;EACJ;CACF;CAEA,IAAI,CAAC,MAAM,QAAQ,YAAY,SAAS,GACtC,MAAM,OAAO,YAAY;CAG3B,OAAO;AACT;AAEA,SAAS,UAAU,OAAqC;CACtD,IAAI,CAAC,OAAO,OAAO,CAAC;CAEpB,OAAO,MACJ,MAAM,GAAG,CAAC,CACV,KAAI,SAAQ,KAAK,KAAK,CAAC,CAAC,CACxB,OAAO,OAAO;AACnB;AAEA,SAAwB,YAAY;CAGlC,aAFc,WAAW,QAAQ,KAAK,MAAM,CAAC,CAE5B,CAAC;AACpB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../create-warlock/src/index.ts"],"sourcesContent":["import createNewApp from \"./commands/create-new-app\";\nimport { CliFlags } from \"./commands/create-new-app/types\";\nimport { NO_DATABASE } from \"./features/database-drivers\";\n\nconst valueFlags = [\"name\", \"db\", \"pm\", \"features\", \"ai\"];\n\n/**\n * Parse the scaffolder's own CLI flags for non-interactive mode.\n *\n * @example\n * create-warlock my-app --db=postgres --features=test,herald --ai=openai,anthropic --yes\n */\nexport function parseFlags(argv: string[]): CliFlags {\n const flags: CliFlags = {};\n const positionals: string[] = [];\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n\n if (!arg.startsWith(\"-\")) {\n positionals.push(arg);\n continue;\n }\n\n const equalIndex = arg.indexOf(\"=\");\n const key = (equalIndex === -1 ? arg : arg.slice(0, equalIndex)).replace(/^-+/, \"\");\n let value: string | undefined = equalIndex === -1 ? undefined : arg.slice(equalIndex + 1);\n\n // Value-taking flags may use either `--key=value` or `--key value`.\n if (valueFlags.includes(key) && value === undefined) {\n const next = argv[i + 1];\n\n if (next && !next.startsWith(\"-\")) {\n value = next;\n i++;\n }\n }\n\n switch (key) {\n case \"yes\":\n case \"y\":\n flags.yes = true;\n break;\n case \"git\":\n flags.git = true;\n break;\n case \"no-git\":\n flags.git = false;\n break;\n case \"jwt\":\n flags.jwt = true;\n break;\n case \"no-jwt\":\n flags.jwt = false;\n break;\n case \"name\":\n flags.name = value;\n break;\n case \"db\":\n flags.db = value;\n break;\n case \"no-db\":\n // Opt out of a database entirely — equivalent to `--db=none`.\n flags.db = NO_DATABASE;\n break;\n case \"pm\":\n flags.pm = value;\n break;\n case \"features\":\n flags.features = splitList(value);\n break;\n case \"ai\":\n flags.ai = splitList(value);\n break;\n }\n }\n\n if (!flags.name && positionals.length > 0) {\n flags.name = positionals[0];\n }\n\n return flags;\n}\n\nfunction splitList(value: string | undefined): string[] {\n if (!value) return [];\n\n return value\n .split(\",\")\n .map(item => item.trim())\n .filter(Boolean);\n}\n\nexport default function createApp() {\n const flags = parseFlags(process.argv.slice(2));\n\n createNewApp(flags);\n}\n"],"mappings":";;;;AAIA,MAAM,aAAa;CAAC;CAAQ;CAAM;CAAM;CAAY;AAAI;;;;;;;AAQxD,SAAgB,WAAW,MAA0B;CACnD,MAAM,QAAkB,CAAC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AY;CAGlC,aAFc,WAAW,QAAQ,KAAK,MAAM,CAAC,CAE5B,CAAC;AACpB"}
package/esm/ui/banner.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { colors } from "@mongez/copper";
2
2
 
3
- //#region ../@warlock.js/create-warlock/src/ui/banner.ts
3
+ //#region ../create-warlock/src/ui/banner.ts
4
4
  const warlockTextAnsi = `
5
5
  \x1b[49m
6
6
  \x1b[49m \x1b[38;2;252;238;36m██╗ ██╗ █████╗ ██████╗ ██╗ ██████╗ ██████╗██╗ ██╗ \x1b[38;2;252;238;36m ██╗ ███████╗\x1b[m
@@ -1 +1 @@
1
- {"version":3,"file":"banner.mjs","names":[],"sources":["../../../../../../@warlock.js/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;\n database: string;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,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":["../../../../../../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;\n database: string;\n features: string[];\n packageManager: string;\n}): void {\n console.log(getSuccessScreen(options));\n}\n"],"mappings":";;;AAEA,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,iBAAiB,SAKtB;CACT,MAAM,EAAE,aAAa,UAAU,UAAU,mBAAmB;CAG5D,IAAI,eAAe,SAAS,KAAK,IAAI;CACrC,IAAI,SAAS,WAAW,GACtB,eAAe;CAIjB,MAAM,kBAAkB;CACxB,MAAM,UAAU;CAEhB,MAAM,iBAAiB,YAAY,SAAS;CAC5C,MAAM,YAAY,SA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,OAAO,KAAK,OAAO,KAAK,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,4 +1,4 @@
1
- //#region ../@warlock.js/create-warlock/src/ui/spinners.ts
1
+ //#region ../create-warlock/src/ui/spinners.ts
2
2
  /**
3
3
  * Themed spinner messages for the wizard
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"spinners.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/ui/spinners.ts"],"sourcesContent":["/**\n * Themed spinner messages for the wizard\n */\nexport const spinnerMessages = {\n installingDeps: \"Summoning dependencies...\",\n depsInstalled: \"Dependencies materialized!\",\n\n initializingGit: \"Initializing grimoire (git)...\",\n gitInitialized: \"Grimoire initialized!\",\n\n generatingJwt: \"Forging secret keys...\",\n jwtGenerated: \"Secret keys forged!\",\n\n warmingCache: \"Charging magical circuits...\",\n cacheWarmed: \"Circuits charged!\",\n\n addingFeatures: \"Weaving in your features...\",\n featuresAdded: \"Features woven in!\",\n featuresFailed:\n \"Some features could not be added add them later with`warlock add`\",\n\n copyingTemplate: \"Preparing your spellbook...\",\n templateCopied: \"Spellbook ready!\",\n} as const;\n"],"mappings":";;;;AAGA,MAAa,kBAAkB;CAC7B,gBAAgB;CAChB,eAAe;CAEf,iBAAiB;CACjB,gBAAgB;CAEhB,eAAe;CACf,cAAc;CAEd,cAAc;CACd,aAAa;CAEb,gBAAgB;CAChB,eAAe;CACf,gBACE;CAEF,iBAAiB;CACjB,gBAAgB;AAClB"}
1
+ {"version":3,"file":"spinners.mjs","names":[],"sources":["../../../../../../create-warlock/src/ui/spinners.ts"],"sourcesContent":["/**\n * Themed spinner messages for the wizard\n */\nexport const spinnerMessages = {\n installingDeps: \"Summoning dependencies...\",\n depsInstalled: \"Dependencies materialized!\",\n\n initializingGit: \"Initializing grimoire (git)...\",\n gitInitialized: \"Grimoire initialized!\",\n\n generatingJwt: \"Forging secret keys...\",\n jwtGenerated: \"Secret keys forged!\",\n\n warmingCache: \"Charging magical circuits...\",\n cacheWarmed: \"Circuits charged!\",\n\n addingFeatures: \"Weaving in your features...\",\n featuresAdded: \"Features woven in!\",\n featuresFailed:\n \"Some features could not be added add them later with`warlock add`\",\n\n copyingTemplate: \"Preparing your spellbook...\",\n templateCopied: \"Spellbook ready!\",\n} as const;\n"],"mappings":";;;;AAGA,MAAa,kBAAkB;CAC7B,gBAAgB;CAChB,eAAe;CAEf,iBAAiB;CACjB,gBAAgB;CAEhB,eAAe;CACf,cAAc;CAEd,cAAc;CACd,aAAa;CAEb,gBAAgB;CAChB,eAAe;CACf,gBACE;CAEF,iBAAiB;CACjB,gBAAgB;AAClB"}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@clack/prompts": "^0.7.0",
11
11
  "@mongez/copper": "^2.1.2",
12
- "@warlock.js/fs": "4.8.2",
12
+ "@warlock.js/fs": "4.9.0",
13
13
  "@mongez/reinforcements": "^3.3.0",
14
14
  "cross-spawn": "^7.0.3",
15
15
  "rimraf": "^6.0.1",
@@ -18,7 +18,7 @@
18
18
  "bin": {
19
19
  "create-warlock": "bin/create-app.js"
20
20
  },
21
- "version": "4.8.2",
21
+ "version": "4.9.0",
22
22
  "type": "module",
23
23
  "main": "./esm/index.mjs",
24
24
  "module": "./esm/index.mjs",