@configjs/cli 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.fr.md +37 -10
  2. package/README.md +43 -10
  3. package/dist/{check-KHMCB7NK.js → check-PEWUERVP.js} +5 -4
  4. package/dist/{remove-JBICRDXX.js → chunk-2HZGGA67.js} +81 -60
  5. package/dist/{chunk-QBMH2K7B.js → chunk-3WLFBAII.js} +57 -0
  6. package/dist/{chunk-MQV3WNMH.js → chunk-6GV4NKUX.js} +11 -3
  7. package/dist/{chunk-HM2JWJOO.js → chunk-FIB2J36N.js} +4 -81
  8. package/dist/{chunk-YQVYFXOD.js → chunk-O2IJKLMT.js} +7 -5
  9. package/dist/chunk-QPEUT7QG.js +157 -0
  10. package/dist/{chunk-TVZWTKJU.js → chunk-WHV4KF4U.js} +28 -18
  11. package/dist/{chunk-AMBG3TCE.js → chunk-YGVZUNHO.js} +161 -135
  12. package/dist/{chunk-4N3JFZLA.js → chunk-ZAGZRB7Y.js} +1091 -728
  13. package/dist/cli.js +24 -8
  14. package/dist/{installed-WA6I2IFD.js → installed-LZE6LH7A.js} +4 -3
  15. package/dist/{list-ICEIQD7X.js → list-3M2L5RYT.js} +4 -3
  16. package/dist/{nextjs-command-SGU7KCFM.js → nextjs-command-2ORBUDBG.js} +8 -7
  17. package/dist/{nextjs-installer-5C3VBCZE.js → nextjs-installer-TQTRTWTQ.js} +5 -3
  18. package/dist/{nextjs-setup-YYXNONJ6.js → nextjs-setup-I5JJ43KS.js} +1 -1
  19. package/dist/{react-command-AXYWRMBH.js → react-command-O76RU4RP.js} +8 -7
  20. package/dist/remove-JCK32XHZ.js +75 -0
  21. package/dist/svelte-command-VR5P46UM.js +72 -0
  22. package/dist/svelte-installer-HWNNV2YK.js +65 -0
  23. package/dist/svelte-setup-2IJCXART.js +38 -0
  24. package/dist/{vite-installer-OPE53M3C.js → vite-installer-PPES2JQY.js} +5 -3
  25. package/dist/{vite-setup-B5TXMX72.js → vite-setup-GOJ73AYC.js} +1 -1
  26. package/dist/{vue-command-SLT6ILZT.js → vue-command-6LUSYL5X.js} +8 -7
  27. package/dist/{vue-installer-LWQQCYOP.js → vue-installer-XTKXJNTQ.js} +5 -3
  28. package/dist/{vue-setup-JLZVVRSJ.js → vue-setup-3QAOL6JM.js} +1 -1
  29. package/package.json +1 -1
package/README.fr.md CHANGED
@@ -164,10 +164,11 @@ ConfigJS prévient les conflits avant qu'ils ne se produisent :
164
164
  - ✅ **Dépendances Automatiques** : TailwindCSS nécessite PostCSS → installé automatiquement
165
165
  - ✅ **Suivi des Plugins** : Mémorise les plugins installés (`.configjsrc`)
166
166
 
167
- ### 📦 Bibliothèques Supportées (40+ Plugins)
167
+ ### 📦 Bibliothèques Supportées (48+ Plugins)
168
168
 
169
169
  #### 🎨 CSS / Styling
170
170
  - TailwindCSS v4 (avec @tailwindcss/vite)
171
+ - TailwindCSS Next.js
171
172
  - Styled Components
172
173
  - React Bootstrap
173
174
  - Emotion
@@ -176,50 +177,73 @@ ConfigJS prévient les conflits avant qu'ils ne se produisent :
176
177
  #### 🧭 Routing
177
178
  - React Router v7
178
179
  - TanStack Router
180
+ - Vue Router (Vue.js)
181
+ - SvelteKit (Svelte)
179
182
 
180
183
  #### 🗂️ Gestion d'État
181
184
  - Redux Toolkit
182
185
  - Zustand
183
186
  - Jotai
184
- - MobX
187
+ - Pinia (Vue.js)
185
188
 
186
189
  #### 🌐 Client HTTP
187
190
  - Axios
188
191
  - TanStack Query (React Query)
192
+ - TanStack Query Vue
189
193
  - Fetch Wrapper
190
194
 
191
195
  #### 📝 Formulaires
192
196
  - React Hook Form
193
- - Formik
194
197
  - Zod (validation)
195
198
  - Yup (validation)
199
+ - SvelteKit Superforms (Svelte)
196
200
 
197
201
  #### 🎨 Composants UI
198
202
  - Shadcn/ui
203
+ - Shadcn/ui Next.js
199
204
  - Radix UI
200
205
  - React Icons
201
206
  - Lucide Icons
202
207
  - React Hot Toast
208
+ - React Hot Toast Next.js
209
+ - Vuetify (Vue.js)
210
+ - Skeleton UI (Svelte)
203
211
 
204
212
  #### 🧪 Tests
205
213
  - React Testing Library
214
+ - Vue Test Utils
215
+ - Vue Testing Library
216
+ - Svelte Testing Library
206
217
  - Vitest
207
218
  - Jest
208
219
 
209
220
  #### 🛠️ Outillage
210
221
  - ESLint
222
+ - ESLint Vue
211
223
  - Prettier
212
224
  - Husky (Git hooks)
225
+ - commitlint
213
226
  - lint-staged
214
227
  - date-fns
228
+ - Vue TSC
215
229
 
216
230
  #### ✨ Animation
217
231
  - Framer Motion
218
232
  - React Spring
219
233
 
220
234
  #### 🔧 Utilitaires
221
- - Lodash
222
- - clsx / classnames
235
+ - VueUse (Vue.js)
236
+ - unplugin-auto-import (Vue.js)
237
+ - unplugin-vue-components (Vue.js)
238
+
239
+ #### 🌍 Internationalisation
240
+ - Vue i18n (Vue.js)
241
+
242
+ #### 📸 Spécifique à Next.js
243
+ - Image Optimization
244
+ - Font Optimization
245
+ - API Routes
246
+ - Middleware
223
247
 
224
248
  ### 🔄 Rollback Automatique
225
249
 
@@ -389,7 +413,7 @@ npm run build
389
413
 
390
414
  ## 📋 Prérequis
391
415
 
392
- - **Node.js** ≥ 18.0.0
416
+ - **Node.js** ≥ 20.0.0
393
417
  - **npm** / **yarn** / **pnpm** / **bun**
394
418
  - Un projet React existant (Vite, CRA, ou configuration personnalisée)
395
419
 
@@ -402,7 +426,12 @@ npm run build
402
426
  - [x] Détection des plugins (package.json + tracker)
403
427
  - [x] UX console améliorée avec couleurs
404
428
  - [x] Installation séquentielle (prévient la corruption)
405
- - [x] 40+ plugins à travers 10 catégories
429
+ - [x] Support React complet (React 18/19)
430
+ - [x] 48+ plugins à travers 10 catégories
431
+ - [x] Support Next.js complet (13/14/15)
432
+ - [x] Support Vue.js 3 complet
433
+ - [x] Support Svelte complet avec 4 plugins spécialisés
434
+ - [x] Centralisation du logging (Architecture IoC, découplage total)
406
435
 
407
436
  ### v1.2 (T2 2025)
408
437
  - [ ] Presets de configuration (templates de démarrage)
@@ -411,16 +440,14 @@ npm run build
411
440
  - [ ] Assistant de résolution de conflits
412
441
 
413
442
  ### v2.0 (T3 2025)
414
- - [ ] Support Next.js
415
443
  - [ ] Support Remix
416
444
  - [ ] Support Astro
417
445
  - [ ] Interface web pour la configuration
418
446
 
419
447
  ### v2.x (Futur)
420
- - [ ] Support Vue 3
421
- - [ ] Support Svelte
422
448
  - [ ] Support React Native
423
449
  - [ ] Templates de plugins personnalisés
450
+ - [ ] Support mobile (React Native, Flutter)
424
451
 
425
452
  ---
426
453
 
package/README.md CHANGED
@@ -67,6 +67,12 @@ cd your-vue-project
67
67
  npx @configjs/cli vue
68
68
  ```
69
69
 
70
+ ### For Svelte Projects
71
+ ```bash
72
+ cd your-svelte-project
73
+ npx @configjs/cli svelte
74
+ ```
75
+
70
76
  That's it! ConfigJS will:
71
77
  1. 🔍 **Detect** your environment (React/Next.js version, TypeScript, bundler)
72
78
  2. 🎯 **Guide** you through library selection by category
@@ -178,10 +184,11 @@ ConfigJS prevents conflicts before they happen:
178
184
  - ✅ **Auto-Dependencies**: TailwindCSS requires PostCSS → installed automatically
179
185
  - ✅ **Plugin Tracking**: Remembers installed plugins (`.configjsrc`)
180
186
 
181
- ### 📦 Supported Libraries (40+ Plugins)
187
+ ### 📦 Supported Libraries (48+ Plugins)
182
188
 
183
189
  #### 🎨 CSS / Styling
184
190
  - TailwindCSS v4 (with @tailwindcss/vite)
191
+ - TailwindCSS Next.js
185
192
  - Styled Components
186
193
  - React Bootstrap
187
194
  - Emotion
@@ -190,50 +197,73 @@ ConfigJS prevents conflicts before they happen:
190
197
  #### 🧭 Routing
191
198
  - React Router v7
192
199
  - TanStack Router
200
+ - Vue Router (Vue.js)
201
+ - SvelteKit (Svelte)
193
202
 
194
203
  #### 🗂️ State Management
195
204
  - Redux Toolkit
196
205
  - Zustand
197
206
  - Jotai
198
- - MobX
207
+ - Pinia (Vue.js)
199
208
 
200
209
  #### 🌐 HTTP Client
201
210
  - Axios
202
211
  - TanStack Query (React Query)
212
+ - TanStack Query Vue
203
213
  - Fetch Wrapper
204
214
 
205
215
  #### 📝 Forms
206
216
  - React Hook Form
207
- - Formik
208
217
  - Zod (validation)
209
218
  - Yup (validation)
219
+ - SvelteKit Superforms (Svelte)
210
220
 
211
221
  #### 🎨 UI Components
212
222
  - Shadcn/ui
223
+ - Shadcn/ui Next.js
213
224
  - Radix UI
214
225
  - React Icons
215
226
  - Lucide Icons
216
227
  - React Hot Toast
228
+ - React Hot Toast Next.js
229
+ - Vuetify (Vue.js)
230
+ - Skeleton UI (Svelte)
217
231
 
218
232
  #### 🧪 Testing
219
233
  - React Testing Library
234
+ - Vue Test Utils
235
+ - Vue Testing Library
236
+ - Svelte Testing Library
220
237
  - Vitest
221
238
  - Jest
222
239
 
223
240
  #### 🛠️ Tooling
224
241
  - ESLint
242
+ - ESLint Vue
225
243
  - Prettier
226
244
  - Husky (Git hooks)
245
+ - commitlint
227
246
  - lint-staged
228
247
  - date-fns
248
+ - Vue TSC
229
249
 
230
250
  #### ✨ Animation
231
251
  - Framer Motion
232
252
  - React Spring
233
253
 
234
254
  #### 🔧 Utils
235
- - Lodash
236
- - clsx / classnames
255
+ - VueUse (Vue.js)
256
+ - unplugin-auto-import (Vue.js)
257
+ - unplugin-vue-components (Vue.js)
258
+
259
+ #### 🌍 Internationalization
260
+ - Vue i18n (Vue.js)
261
+
262
+ #### 📸 Next.js Specific
263
+ - Image Optimization
264
+ - Font Optimization
265
+ - API Routes
266
+ - Middleware
237
267
 
238
268
  ### 🔄 Automatic Rollback
239
269
 
@@ -423,7 +453,7 @@ npm run build
423
453
 
424
454
  ## 📋 Requirements
425
455
 
426
- - **Node.js** ≥ 18.0.0
456
+ - **Node.js** ≥ 20.0.0
427
457
  - **npm** / **yarn** / **pnpm** / **bun**
428
458
  - An existing React project (Vite, CRA, or custom setup)
429
459
 
@@ -436,7 +466,12 @@ npm run build
436
466
  - [x] Plugin detection (package.json + tracker)
437
467
  - [x] Enhanced console UX with colors
438
468
  - [x] Sequential installation (prevents corruption)
439
- - [x] 40+ plugins across 10 categories
469
+ - [x] Full React support (React 18/19)
470
+ - [x] 48+ plugins across 10 categories
471
+ - [x] Full Next.js support (13/14/15)
472
+ - [x] Full Vue.js 3 support
473
+ - [x] Full Svelte support with 4 specialized plugins
474
+ - [x] Logging centralization (IoC Architecture, full decoupling)
440
475
 
441
476
  ### v1.2 (Q2 2025)
442
477
  - [ ] Configuration presets (starter templates)
@@ -445,16 +480,14 @@ npm run build
445
480
  - [ ] Conflict resolution wizard
446
481
 
447
482
  ### v2.0 (Q3 2025)
448
- - [x] Support Next.js ✅
449
483
  - [ ] Support Remix
450
484
  - [ ] Support Astro
451
485
  - [ ] Web UI for configuration
452
486
 
453
487
  ### v2.x (Future)
454
- - [ ] Support Vue 3
455
- - [ ] Support Svelte
456
488
  - [ ] React Native support
457
489
  - [ ] Custom plugin templates
490
+ - [ ] Mobile support (React Native, Flutter)
458
491
 
459
492
  ---
460
493
 
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  CompatibilityValidator,
3
3
  allCompatibilityRules
4
- } from "./chunk-YQVYFXOD.js";
4
+ } from "./chunk-O2IJKLMT.js";
5
5
  import {
6
6
  pluginRegistry
7
- } from "./chunk-4N3JFZLA.js";
8
- import "./chunk-MQV3WNMH.js";
7
+ } from "./chunk-ZAGZRB7Y.js";
8
+ import "./chunk-6GV4NKUX.js";
9
+ import "./chunk-FIB2J36N.js";
9
10
  import {
10
11
  logger
11
- } from "./chunk-HM2JWJOO.js";
12
+ } from "./chunk-QPEUT7QG.js";
12
13
  import "./chunk-QGM4M3NI.js";
13
14
 
14
15
  // src/cli/commands/check.ts
@@ -1,11 +1,3 @@
1
- import {
2
- PluginTracker,
3
- detectContext
4
- } from "./chunk-TVZWTKJU.js";
5
- import "./chunk-MQV3WNMH.js";
6
- import {
7
- logger
8
- } from "./chunk-HM2JWJOO.js";
9
1
  import {
10
2
  __commonJS,
11
3
  __require,
@@ -179,6 +171,7 @@ var require_lib = __commonJS({
179
171
  });
180
172
 
181
173
  // node_modules/@inquirer/core/dist/lib/key.js
174
+ var isBackspaceKey = (key) => key.name === "backspace";
182
175
  var isTabKey = (key) => key.name === "tab";
183
176
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
184
177
 
@@ -1674,64 +1667,92 @@ var dist_default2 = createPrompt((config, done) => {
1674
1667
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
1675
1668
  });
1676
1669
 
1677
- // src/cli/commands/remove.ts
1678
- async function removeCommand(pluginName) {
1679
- try {
1680
- const ctx = await detectContext(process.cwd());
1681
- const tracker = new PluginTracker(ctx.projectRoot, ctx.fsAdapter);
1682
- await tracker.load();
1683
- if (!pluginName) {
1684
- console.log("\n\u274C Please specify a plugin name to remove.\n");
1685
- console.log("Usage: configjs remove <plugin-name>\n");
1686
- console.log("Example: configjs remove react-router\n");
1687
- process.exit(1);
1670
+ // node_modules/@inquirer/input/dist/index.js
1671
+ var inputTheme = {
1672
+ validationFailureMode: "keep"
1673
+ };
1674
+ var dist_default3 = createPrompt((config, done) => {
1675
+ const { prefill = "tab" } = config;
1676
+ const theme = makeTheme(inputTheme, config.theme);
1677
+ const [status, setStatus] = useState("idle");
1678
+ const [defaultValue = "", setDefaultValue] = useState(config.default);
1679
+ const [errorMsg, setError] = useState();
1680
+ const [value, setValue] = useState("");
1681
+ const prefix = usePrefix({ status, theme });
1682
+ async function validate2(value2) {
1683
+ const { required, pattern, patternError = "Invalid input" } = config;
1684
+ if (required && !value2) {
1685
+ return "You must provide a value";
1688
1686
  }
1689
- const plugin = tracker.getPlugin(pluginName);
1690
- if (!plugin) {
1691
- console.log(`
1692
- \u274C Plugin '${pluginName}' is not installed.
1693
- `);
1694
- console.log("Run `configjs installed` to see installed plugins.\n");
1695
- process.exit(1);
1687
+ if (pattern && !pattern.test(value2)) {
1688
+ return patternError;
1696
1689
  }
1697
- console.log(`
1698
- \u26A0\uFE0F You are about to remove: ${plugin.displayName}
1699
- `);
1700
- console.log(
1701
- "\u26A0\uFE0F WARNING: This will only untrack the plugin from the config."
1702
- );
1703
- console.log(" You will need to manually:");
1704
- console.log(" - Remove the packages (npm uninstall ...)");
1705
- console.log(" - Delete the generated files");
1706
- console.log(" - Clean up the configuration\n");
1707
- const confirmed = await dist_default2({
1708
- message: "Continue?",
1709
- default: false
1710
- });
1711
- if (!confirmed) {
1712
- console.log("\n\u274C Cancelled.\n");
1690
+ if (typeof config.validate === "function") {
1691
+ return await config.validate(value2) || "You must provide a valid value";
1692
+ }
1693
+ return true;
1694
+ }
1695
+ useKeypress(async (key, rl) => {
1696
+ if (status !== "idle") {
1713
1697
  return;
1714
1698
  }
1715
- await tracker.removePlugin(pluginName);
1716
- console.log(`
1717
- \u2705 ${plugin.displayName} has been removed from tracking.
1718
- `);
1719
- console.log("\u{1F4DD} Manual cleanup required:");
1720
- if (plugin.packages.dependencies && plugin.packages.dependencies.length > 0) {
1721
- console.log(` npm uninstall ${plugin.packages.dependencies.join(" ")}`);
1699
+ if (isEnterKey(key)) {
1700
+ const answer = value || defaultValue;
1701
+ setStatus("loading");
1702
+ const isValid = await validate2(answer);
1703
+ if (isValid === true) {
1704
+ setValue(answer);
1705
+ setStatus("done");
1706
+ done(answer);
1707
+ } else {
1708
+ if (theme.validationFailureMode === "clear") {
1709
+ setValue("");
1710
+ } else {
1711
+ rl.write(value);
1712
+ }
1713
+ setError(isValid);
1714
+ setStatus("idle");
1715
+ }
1716
+ } else if (isBackspaceKey(key) && !value) {
1717
+ setDefaultValue(void 0);
1718
+ } else if (isTabKey(key) && !value) {
1719
+ setDefaultValue(void 0);
1720
+ rl.clearLine(0);
1721
+ rl.write(defaultValue);
1722
+ setValue(defaultValue);
1723
+ } else {
1724
+ setValue(rl.line);
1725
+ setError(void 0);
1722
1726
  }
1723
- if (plugin.packages.devDependencies && plugin.packages.devDependencies.length > 0) {
1724
- console.log(
1725
- ` npm uninstall ${plugin.packages.devDependencies.join(" ")}`
1726
- );
1727
+ });
1728
+ useEffect((rl) => {
1729
+ if (prefill === "editable" && defaultValue) {
1730
+ rl.write(defaultValue);
1731
+ setValue(defaultValue);
1727
1732
  }
1728
- console.log();
1729
- } catch (error) {
1730
- const errorMessage = error instanceof Error ? error.message : String(error);
1731
- logger.error(`Failed to remove plugin: ${errorMessage}`);
1732
- process.exit(1);
1733
+ }, []);
1734
+ const message = theme.style.message(config.message, status);
1735
+ let formattedValue = value;
1736
+ if (typeof config.transformer === "function") {
1737
+ formattedValue = config.transformer(value, { isFinal: status === "done" });
1738
+ } else if (status === "done") {
1739
+ formattedValue = theme.style.answer(value);
1733
1740
  }
1734
- }
1741
+ let defaultStr;
1742
+ if (defaultValue && status !== "done" && !value) {
1743
+ defaultStr = theme.style.defaultAnswer(defaultValue);
1744
+ }
1745
+ let error = "";
1746
+ if (errorMsg) {
1747
+ error = theme.style.error(errorMsg);
1748
+ }
1749
+ return [
1750
+ [prefix, message, defaultStr, formattedValue].filter((v) => v !== void 0).join(" "),
1751
+ error
1752
+ ];
1753
+ });
1754
+
1735
1755
  export {
1736
- removeCommand
1756
+ dist_default2 as dist_default,
1757
+ dist_default3 as dist_default2
1737
1758
  };
@@ -118,6 +118,25 @@ var fr = {
118
118
  invalid: "Le nom du projet ne peut contenir que des lettres, chiffres, tirets et underscores"
119
119
  },
120
120
  folderExists: (name) => `Le dossier "${name}" existe d\xE9j\xE0. Veuillez choisir un autre nom.`
121
+ },
122
+ svelte: {
123
+ noSvelteDetected: "\u26A0\uFE0F Aucun projet Svelte d\xE9tect\xE9 dans le r\xE9pertoire actuel.",
124
+ proposeSetup: "Souhaitez-vous cr\xE9er un nouveau projet Svelte avec Vite ?",
125
+ projectName: "Nom du projet",
126
+ projectNamePlaceholder: "mon-projet-svelte",
127
+ useTypeScript: "Utiliser TypeScript ?",
128
+ creatingProject: "Cr\xE9ation du projet Svelte avec Vite...",
129
+ installingDependencies: "Installation des d\xE9pendances...",
130
+ projectCreated: "Projet Svelte cr\xE9\xE9 avec succ\xE8s !",
131
+ creating: "Cr\xE9ation du projet Svelte...",
132
+ success: "\u2705 Projet cr\xE9\xE9 avec succ\xE8s !",
133
+ error: "\u274C Erreur lors de la cr\xE9ation du projet",
134
+ changingDirectory: "Changement vers le r\xE9pertoire du projet...",
135
+ validation: {
136
+ empty: "Le nom du projet ne peut pas \xEAtre vide",
137
+ invalid: "Le nom du projet ne peut contenir que des lettres, chiffres, tirets et underscores"
138
+ },
139
+ folderExists: (name) => `Le dossier "${name}" existe d\xE9j\xE0. Veuillez choisir un autre nom.`
121
140
  }
122
141
  };
123
142
 
@@ -241,6 +260,25 @@ var en = {
241
260
  invalid: "Project name can only contain letters, numbers, dashes and underscores"
242
261
  },
243
262
  folderExists: (name) => `Folder "${name}" already exists. Please choose another name.`
263
+ },
264
+ svelte: {
265
+ noSvelteDetected: "\u26A0\uFE0F No Svelte project detected in the current directory.",
266
+ proposeSetup: "Would you like to create a new Svelte project with Vite?",
267
+ projectName: "Project name",
268
+ projectNamePlaceholder: "my-svelte-project",
269
+ useTypeScript: "Use TypeScript?",
270
+ creatingProject: "Creating Svelte project with Vite...",
271
+ installingDependencies: "Installing dependencies...",
272
+ projectCreated: "Svelte project created successfully!",
273
+ creating: "Creating Svelte project...",
274
+ success: "\u2705 Project created successfully!",
275
+ error: "\u274C Error creating project",
276
+ changingDirectory: "Changing to project directory...",
277
+ validation: {
278
+ empty: "Project name cannot be empty",
279
+ invalid: "Project name can only contain letters, numbers, dashes and underscores"
280
+ },
281
+ folderExists: (name) => `Folder "${name}" already exists. Please choose another name.`
244
282
  }
245
283
  };
246
284
 
@@ -364,6 +402,25 @@ var es = {
364
402
  invalid: "El nombre del proyecto solo puede contener letras, n\xFAmeros, guiones y guiones bajos"
365
403
  },
366
404
  folderExists: (name) => `La carpeta "${name}" ya existe. Por favor, elija otro nombre.`
405
+ },
406
+ svelte: {
407
+ noSvelteDetected: "\u26A0\uFE0F No se detect\xF3 ning\xFAn proyecto Svelte en el directorio actual.",
408
+ proposeSetup: "\xBFDesea crear un nuevo proyecto Svelte con Vite?",
409
+ projectName: "Nombre del proyecto",
410
+ projectNamePlaceholder: "mi-proyecto-svelte",
411
+ useTypeScript: "\xBFUsar TypeScript?",
412
+ creatingProject: "Creando proyecto Svelte con Vite...",
413
+ installingDependencies: "Instalando dependencias...",
414
+ projectCreated: "\xA1Proyecto Svelte creado con \xE9xito!",
415
+ creating: "Creando proyecto Svelte...",
416
+ success: "\u2705 \xA1Proyecto creado con \xE9xito!",
417
+ error: "\u274C Error al crear el proyecto",
418
+ changingDirectory: "Cambiando al directorio del proyecto...",
419
+ validation: {
420
+ empty: "El nombre del proyecto no puede estar vac\xEDo",
421
+ invalid: "El nombre del proyecto solo puede contener letras, n\xFAmeros, guiones y guiones bajos"
422
+ },
423
+ folderExists: (name) => `La carpeta "${name}" ya existe. Por favor, elija otro nombre.`
367
424
  }
368
425
  };
369
426
 
@@ -1,12 +1,13 @@
1
1
  import {
2
- logger
3
- } from "./chunk-HM2JWJOO.js";
2
+ getModuleLogger
3
+ } from "./chunk-QPEUT7QG.js";
4
4
 
5
5
  // src/utils/package-manager.ts
6
6
  import { execa } from "execa";
7
7
  import fs from "fs-extra";
8
8
  import { resolve, join } from "path";
9
- async function detectPackageManager(projectRoot) {
9
+ var logger = getModuleLogger();
10
+ async function detectPackageManager(projectRoot, fsAdapter) {
10
11
  const root = resolve(projectRoot);
11
12
  const lockfiles = [
12
13
  { file: "pnpm-lock.yaml", manager: "pnpm" },
@@ -16,6 +17,13 @@ async function detectPackageManager(projectRoot) {
16
17
  ];
17
18
  for (const { file, manager } of lockfiles) {
18
19
  const lockfilePath = join(root, file);
20
+ if (fsAdapter) {
21
+ if (await fsAdapter.pathExists(lockfilePath)) {
22
+ logger.debug(`Detected package manager: ${manager} (found ${file})`);
23
+ return manager;
24
+ }
25
+ continue;
26
+ }
19
27
  if (await fs.pathExists(lockfilePath)) {
20
28
  logger.debug(`Detected package manager: ${manager} (found ${file})`);
21
29
  return manager;
@@ -1,83 +1,6 @@
1
- // src/utils/logger.ts
2
- import pc from "picocolors";
3
- var Logger = class {
4
- level = 1 /* INFO */;
5
- setLevel(level) {
6
- this.level = level;
7
- }
8
- debug(message, ...args) {
9
- if (this.level <= 0 /* DEBUG */) {
10
- console.log(pc.gray(`[DEBUG] ${message}`), ...args);
11
- }
12
- }
13
- info(message, ...args) {
14
- if (this.level <= 1 /* INFO */) {
15
- console.log(pc.cyan(`\u2139 ${message}`), ...args);
16
- }
17
- }
18
- success(message, ...args) {
19
- if (this.level <= 1 /* INFO */) {
20
- console.log(pc.green(`\u2713 ${message}`), ...args);
21
- }
22
- }
23
- warn(message, ...args) {
24
- if (this.level <= 2 /* WARN */) {
25
- console.warn(pc.yellow(`\u26A0\uFE0F ${message}`), ...args);
26
- }
27
- }
28
- error(message, ...args) {
29
- if (this.level <= 3 /* ERROR */) {
30
- console.error(pc.red(`\u2716 ${message}`), ...args);
31
- }
32
- }
33
- header(message) {
34
- if (this.level <= 1 /* INFO */) {
35
- console.log();
36
- console.log(pc.bold(pc.magenta(`\u25C6 ${message}`)));
37
- console.log();
38
- }
39
- }
40
- section(title) {
41
- if (this.level <= 1 /* INFO */) {
42
- console.log();
43
- console.log(pc.bold(pc.cyan(`\u25B8 ${title}`)));
44
- }
45
- }
46
- item(message, color = "gray") {
47
- if (this.level <= 1 /* INFO */) {
48
- const colorFn = pc[color];
49
- console.log(colorFn(` \u2022 ${message}`));
50
- }
51
- }
52
- dim(message) {
53
- if (this.level <= 1 /* INFO */) {
54
- console.log(pc.gray(` ${message}`));
55
- }
56
- }
57
- step(message) {
58
- if (this.level <= 1 /* INFO */) {
59
- console.log(pc.cyan(`
60
- \u2192 ${message}`));
61
- }
62
- }
63
- box(title, content) {
64
- if (this.level <= 1 /* INFO */) {
65
- const maxLength = Math.max(
66
- title.length,
67
- ...content.map((line) => line.length)
68
- );
69
- const border = "\u2500".repeat(maxLength + 4);
70
- console.log(pc.cyan(`\u250C${border}\u2510`));
71
- console.log(pc.cyan(`\u2502 ${title.padEnd(maxLength)} \u2502`));
72
- console.log(pc.cyan(`\u251C${border}\u2524`));
73
- content.forEach((line) => {
74
- console.log(pc.cyan(`\u2502 ${line.padEnd(maxLength)} \u2502`));
75
- });
76
- console.log(pc.cyan(`\u2514${border}\u2518`));
77
- }
78
- }
79
- };
80
- var logger = new Logger();
1
+ import {
2
+ getModuleLogger
3
+ } from "./chunk-QPEUT7QG.js";
81
4
 
82
5
  // src/utils/fs-helpers.ts
83
6
  import { resolve as resolve2, dirname as dirname2, extname } from "path";
@@ -300,6 +223,7 @@ function createDefaultFsAdapter() {
300
223
  }
301
224
 
302
225
  // src/utils/fs-helpers.ts
226
+ var logger = getModuleLogger();
303
227
  function normalizePath(path) {
304
228
  return path.replace(/\\/g, "/");
305
229
  }
@@ -405,7 +329,6 @@ async function writeFileContent(filePath, content, encoding = "utf-8", fsAdapter
405
329
  }
406
330
 
407
331
  export {
408
- logger,
409
332
  createDefaultFsAdapter,
410
333
  normalizePath,
411
334
  readPackageJson,