@configjs/cli 1.1.9 → 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.
- package/README.fr.md +8 -3
- package/README.md +14 -3
- package/dist/{check-IOMRDWLB.js → check-PEWUERVP.js} +2 -2
- package/dist/{remove-XQBB4NC3.js → chunk-2HZGGA67.js} +81 -61
- package/dist/{chunk-QBMH2K7B.js → chunk-3WLFBAII.js} +57 -0
- package/dist/{chunk-ATUTE7PE.js → chunk-O2IJKLMT.js} +1 -1
- package/dist/{chunk-ABHFQM5U.js → chunk-YGVZUNHO.js} +58 -37
- package/dist/{chunk-6WWDHX4E.js → chunk-ZAGZRB7Y.js} +666 -374
- package/dist/cli.js +19 -7
- package/dist/{list-TDMIAZPQ.js → list-3M2L5RYT.js} +1 -1
- package/dist/{nextjs-command-W53FZE7U.js → nextjs-command-2ORBUDBG.js} +4 -4
- package/dist/{nextjs-installer-TJXAUIQK.js → nextjs-installer-TQTRTWTQ.js} +1 -1
- package/dist/{nextjs-setup-YYXNONJ6.js → nextjs-setup-I5JJ43KS.js} +1 -1
- package/dist/{react-command-NHCD2L7R.js → react-command-O76RU4RP.js} +4 -4
- package/dist/remove-JCK32XHZ.js +75 -0
- package/dist/svelte-command-VR5P46UM.js +72 -0
- package/dist/svelte-installer-HWNNV2YK.js +65 -0
- package/dist/svelte-setup-2IJCXART.js +38 -0
- package/dist/{vite-installer-J7BO22KD.js → vite-installer-PPES2JQY.js} +1 -1
- package/dist/{vite-setup-B5TXMX72.js → vite-setup-GOJ73AYC.js} +1 -1
- package/dist/{vue-command-GYKDHJRJ.js → vue-command-6LUSYL5X.js} +4 -4
- package/dist/{vue-installer-3AWLLT53.js → vue-installer-XTKXJNTQ.js} +1 -1
- package/dist/{vue-setup-JLZVVRSJ.js → vue-setup-3QAOL6JM.js} +1 -1
- package/package.json +1 -1
package/README.fr.md
CHANGED
|
@@ -164,7 +164,7 @@ 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 (
|
|
167
|
+
### 📦 Bibliothèques Supportées (48+ Plugins)
|
|
168
168
|
|
|
169
169
|
#### 🎨 CSS / Styling
|
|
170
170
|
- TailwindCSS v4 (avec @tailwindcss/vite)
|
|
@@ -178,6 +178,7 @@ ConfigJS prévient les conflits avant qu'ils ne se produisent :
|
|
|
178
178
|
- React Router v7
|
|
179
179
|
- TanStack Router
|
|
180
180
|
- Vue Router (Vue.js)
|
|
181
|
+
- SvelteKit (Svelte)
|
|
181
182
|
|
|
182
183
|
#### 🗂️ Gestion d'État
|
|
183
184
|
- Redux Toolkit
|
|
@@ -195,6 +196,7 @@ ConfigJS prévient les conflits avant qu'ils ne se produisent :
|
|
|
195
196
|
- React Hook Form
|
|
196
197
|
- Zod (validation)
|
|
197
198
|
- Yup (validation)
|
|
199
|
+
- SvelteKit Superforms (Svelte)
|
|
198
200
|
|
|
199
201
|
#### 🎨 Composants UI
|
|
200
202
|
- Shadcn/ui
|
|
@@ -205,11 +207,13 @@ ConfigJS prévient les conflits avant qu'ils ne se produisent :
|
|
|
205
207
|
- React Hot Toast
|
|
206
208
|
- React Hot Toast Next.js
|
|
207
209
|
- Vuetify (Vue.js)
|
|
210
|
+
- Skeleton UI (Svelte)
|
|
208
211
|
|
|
209
212
|
#### 🧪 Tests
|
|
210
213
|
- React Testing Library
|
|
211
214
|
- Vue Test Utils
|
|
212
215
|
- Vue Testing Library
|
|
216
|
+
- Svelte Testing Library
|
|
213
217
|
- Vitest
|
|
214
218
|
- Jest
|
|
215
219
|
|
|
@@ -423,9 +427,10 @@ npm run build
|
|
|
423
427
|
- [x] UX console améliorée avec couleurs
|
|
424
428
|
- [x] Installation séquentielle (prévient la corruption)
|
|
425
429
|
- [x] Support React complet (React 18/19)
|
|
426
|
-
- [x]
|
|
430
|
+
- [x] 48+ plugins à travers 10 catégories
|
|
427
431
|
- [x] Support Next.js complet (13/14/15)
|
|
428
432
|
- [x] Support Vue.js 3 complet
|
|
433
|
+
- [x] Support Svelte complet avec 4 plugins spécialisés
|
|
429
434
|
- [x] Centralisation du logging (Architecture IoC, découplage total)
|
|
430
435
|
|
|
431
436
|
### v1.2 (T2 2025)
|
|
@@ -440,9 +445,9 @@ npm run build
|
|
|
440
445
|
- [ ] Interface web pour la configuration
|
|
441
446
|
|
|
442
447
|
### v2.x (Futur)
|
|
443
|
-
- [ ] Support Svelte
|
|
444
448
|
- [ ] Support React Native
|
|
445
449
|
- [ ] Templates de plugins personnalisés
|
|
450
|
+
- [ ] Support mobile (React Native, Flutter)
|
|
446
451
|
|
|
447
452
|
---
|
|
448
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,7 +184,7 @@ 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 (
|
|
187
|
+
### 📦 Supported Libraries (48+ Plugins)
|
|
182
188
|
|
|
183
189
|
#### 🎨 CSS / Styling
|
|
184
190
|
- TailwindCSS v4 (with @tailwindcss/vite)
|
|
@@ -192,6 +198,7 @@ ConfigJS prevents conflicts before they happen:
|
|
|
192
198
|
- React Router v7
|
|
193
199
|
- TanStack Router
|
|
194
200
|
- Vue Router (Vue.js)
|
|
201
|
+
- SvelteKit (Svelte)
|
|
195
202
|
|
|
196
203
|
#### 🗂️ State Management
|
|
197
204
|
- Redux Toolkit
|
|
@@ -209,6 +216,7 @@ ConfigJS prevents conflicts before they happen:
|
|
|
209
216
|
- React Hook Form
|
|
210
217
|
- Zod (validation)
|
|
211
218
|
- Yup (validation)
|
|
219
|
+
- SvelteKit Superforms (Svelte)
|
|
212
220
|
|
|
213
221
|
#### 🎨 UI Components
|
|
214
222
|
- Shadcn/ui
|
|
@@ -219,11 +227,13 @@ ConfigJS prevents conflicts before they happen:
|
|
|
219
227
|
- React Hot Toast
|
|
220
228
|
- React Hot Toast Next.js
|
|
221
229
|
- Vuetify (Vue.js)
|
|
230
|
+
- Skeleton UI (Svelte)
|
|
222
231
|
|
|
223
232
|
#### 🧪 Testing
|
|
224
233
|
- React Testing Library
|
|
225
234
|
- Vue Test Utils
|
|
226
235
|
- Vue Testing Library
|
|
236
|
+
- Svelte Testing Library
|
|
227
237
|
- Vitest
|
|
228
238
|
- Jest
|
|
229
239
|
|
|
@@ -457,9 +467,10 @@ npm run build
|
|
|
457
467
|
- [x] Enhanced console UX with colors
|
|
458
468
|
- [x] Sequential installation (prevents corruption)
|
|
459
469
|
- [x] Full React support (React 18/19)
|
|
460
|
-
- [x]
|
|
470
|
+
- [x] 48+ plugins across 10 categories
|
|
461
471
|
- [x] Full Next.js support (13/14/15)
|
|
462
472
|
- [x] Full Vue.js 3 support
|
|
473
|
+
- [x] Full Svelte support with 4 specialized plugins
|
|
463
474
|
- [x] Logging centralization (IoC Architecture, full decoupling)
|
|
464
475
|
|
|
465
476
|
### v1.2 (Q2 2025)
|
|
@@ -474,9 +485,9 @@ npm run build
|
|
|
474
485
|
- [ ] Web UI for configuration
|
|
475
486
|
|
|
476
487
|
### v2.x (Future)
|
|
477
|
-
- [ ] Support Svelte
|
|
478
488
|
- [ ] React Native support
|
|
479
489
|
- [ ] Custom plugin templates
|
|
490
|
+
- [ ] Mobile support (React Native, Flutter)
|
|
480
491
|
|
|
481
492
|
---
|
|
482
493
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompatibilityValidator,
|
|
3
3
|
allCompatibilityRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O2IJKLMT.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginRegistry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZAGZRB7Y.js";
|
|
8
8
|
import "./chunk-6GV4NKUX.js";
|
|
9
9
|
import "./chunk-FIB2J36N.js";
|
|
10
10
|
import {
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PluginTracker,
|
|
3
|
-
detectContext
|
|
4
|
-
} from "./chunk-WHV4KF4U.js";
|
|
5
|
-
import "./chunk-6GV4NKUX.js";
|
|
6
|
-
import "./chunk-FIB2J36N.js";
|
|
7
|
-
import {
|
|
8
|
-
logger
|
|
9
|
-
} from "./chunk-QPEUT7QG.js";
|
|
10
1
|
import {
|
|
11
2
|
__commonJS,
|
|
12
3
|
__require,
|
|
@@ -180,6 +171,7 @@ var require_lib = __commonJS({
|
|
|
180
171
|
});
|
|
181
172
|
|
|
182
173
|
// node_modules/@inquirer/core/dist/lib/key.js
|
|
174
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
|
183
175
|
var isTabKey = (key) => key.name === "tab";
|
|
184
176
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
185
177
|
|
|
@@ -1675,64 +1667,92 @@ var dist_default2 = createPrompt((config, done) => {
|
|
|
1675
1667
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
1676
1668
|
});
|
|
1677
1669
|
|
|
1678
|
-
//
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
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";
|
|
1689
1686
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
console.log(`
|
|
1693
|
-
\u274C Plugin '${pluginName}' is not installed.
|
|
1694
|
-
`);
|
|
1695
|
-
console.log("Run `configjs installed` to see installed plugins.\n");
|
|
1696
|
-
process.exit(1);
|
|
1687
|
+
if (pattern && !pattern.test(value2)) {
|
|
1688
|
+
return patternError;
|
|
1697
1689
|
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
console.log(" - Remove the packages (npm uninstall ...)");
|
|
1706
|
-
console.log(" - Delete the generated files");
|
|
1707
|
-
console.log(" - Clean up the configuration\n");
|
|
1708
|
-
const confirmed = await dist_default2({
|
|
1709
|
-
message: "Continue?",
|
|
1710
|
-
default: false
|
|
1711
|
-
});
|
|
1712
|
-
if (!confirmed) {
|
|
1713
|
-
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") {
|
|
1714
1697
|
return;
|
|
1715
1698
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
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);
|
|
1723
1726
|
}
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
);
|
|
1727
|
+
});
|
|
1728
|
+
useEffect((rl) => {
|
|
1729
|
+
if (prefill === "editable" && defaultValue) {
|
|
1730
|
+
rl.write(defaultValue);
|
|
1731
|
+
setValue(defaultValue);
|
|
1728
1732
|
}
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
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);
|
|
1734
1740
|
}
|
|
1735
|
-
|
|
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
|
+
|
|
1736
1755
|
export {
|
|
1737
|
-
|
|
1756
|
+
dist_default2 as dist_default,
|
|
1757
|
+
dist_default3 as dist_default2
|
|
1738
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,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompatibilityValidator,
|
|
3
3
|
allCompatibilityRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O2IJKLMT.js";
|
|
5
5
|
import {
|
|
6
6
|
BackupManager,
|
|
7
7
|
ConfigWriter,
|
|
8
8
|
getPluginsByCategory,
|
|
9
9
|
getRecommendedPlugins,
|
|
10
10
|
pluginRegistry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZAGZRB7Y.js";
|
|
12
12
|
import {
|
|
13
13
|
PluginTracker
|
|
14
14
|
} from "./chunk-WHV4KF4U.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-QPEUT7QG.js";
|
|
19
19
|
import {
|
|
20
20
|
getTranslations
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3WLFBAII.js";
|
|
22
22
|
|
|
23
23
|
// src/core/framework-registry.ts
|
|
24
24
|
var frameworkRegistry = {
|
|
@@ -33,11 +33,11 @@ var frameworkRegistry = {
|
|
|
33
33
|
ts: "react-ts"
|
|
34
34
|
},
|
|
35
35
|
getSetupPrompt: async (language) => {
|
|
36
|
-
const { promptViteSetup } = await import("./vite-setup-
|
|
36
|
+
const { promptViteSetup } = await import("./vite-setup-GOJ73AYC.js");
|
|
37
37
|
return await promptViteSetup(language);
|
|
38
38
|
},
|
|
39
39
|
createProject: async (options, currentDir, language) => {
|
|
40
|
-
const { createViteProject } = await import("./vite-installer-
|
|
40
|
+
const { createViteProject } = await import("./vite-installer-PPES2JQY.js");
|
|
41
41
|
return await createViteProject(
|
|
42
42
|
options,
|
|
43
43
|
currentDir,
|
|
@@ -57,11 +57,11 @@ var frameworkRegistry = {
|
|
|
57
57
|
defaultBundler: "nextjs",
|
|
58
58
|
createCommand: "npm create next-app@latest",
|
|
59
59
|
getSetupPrompt: async (language) => {
|
|
60
|
-
const { promptNextjsSetup } = await import("./nextjs-setup-
|
|
60
|
+
const { promptNextjsSetup } = await import("./nextjs-setup-I5JJ43KS.js");
|
|
61
61
|
return await promptNextjsSetup(language);
|
|
62
62
|
},
|
|
63
63
|
createProject: async (options, currentDir, language) => {
|
|
64
|
-
const { createNextjsProject } = await import("./nextjs-installer-
|
|
64
|
+
const { createNextjsProject } = await import("./nextjs-installer-TQTRTWTQ.js");
|
|
65
65
|
return await createNextjsProject(
|
|
66
66
|
options,
|
|
67
67
|
currentDir,
|
|
@@ -85,11 +85,11 @@ var frameworkRegistry = {
|
|
|
85
85
|
ts: "vue-ts"
|
|
86
86
|
},
|
|
87
87
|
getSetupPrompt: async (language) => {
|
|
88
|
-
const { promptVueSetup } = await import("./vue-setup-
|
|
88
|
+
const { promptVueSetup } = await import("./vue-setup-3QAOL6JM.js");
|
|
89
89
|
return await promptVueSetup(language);
|
|
90
90
|
},
|
|
91
91
|
createProject: async (options, currentDir, language) => {
|
|
92
|
-
const { createVueProject } = await import("./vue-installer-
|
|
92
|
+
const { createVueProject } = await import("./vue-installer-XTKXJNTQ.js");
|
|
93
93
|
return await createVueProject(
|
|
94
94
|
options,
|
|
95
95
|
currentDir,
|
|
@@ -108,12 +108,16 @@ var frameworkRegistry = {
|
|
|
108
108
|
detectPackages: ["svelte", "@sveltejs/kit"],
|
|
109
109
|
defaultBundler: "vite",
|
|
110
110
|
createCommand: "npm create svelte@latest",
|
|
111
|
-
getSetupPrompt: async (
|
|
112
|
-
|
|
111
|
+
getSetupPrompt: async (language) => {
|
|
112
|
+
const { promptSvelteSetup } = await import("./svelte-setup-2IJCXART.js");
|
|
113
|
+
return await promptSvelteSetup(language);
|
|
113
114
|
},
|
|
114
|
-
createProject: async (
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
createProject: async (options, currentDir, language) => {
|
|
116
|
+
const { createSvelteProject } = await import("./svelte-installer-HWNNV2YK.js");
|
|
117
|
+
return await createSvelteProject(
|
|
118
|
+
options,
|
|
119
|
+
currentDir,
|
|
120
|
+
language
|
|
117
121
|
);
|
|
118
122
|
},
|
|
119
123
|
i18nKeys: {
|
|
@@ -778,8 +782,22 @@ function displayNextSteps(lang) {
|
|
|
778
782
|
console.log();
|
|
779
783
|
}
|
|
780
784
|
|
|
781
|
-
// src/cli/
|
|
785
|
+
// src/cli/ui/logo.ts
|
|
782
786
|
import pc2 from "picocolors";
|
|
787
|
+
var LOGO = `
|
|
788
|
+
___________ __ _ ________
|
|
789
|
+
/ ____/ ____/__ ____ __ _/ // / / ____/
|
|
790
|
+
/ / / /_ / _ \\/ __ \\/ / / / // / / __/
|
|
791
|
+
/ /___/ __ / __/ / / / /_/ /__ / / /___
|
|
792
|
+
\\____/_/ /_/\\___/_/ /_/\\__,_/__/_/ \\____/
|
|
793
|
+
|
|
794
|
+
`;
|
|
795
|
+
function displayLogo() {
|
|
796
|
+
console.log(pc2.cyan(LOGO));
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// src/cli/commands/base-framework-command.ts
|
|
800
|
+
import pc3 from "picocolors";
|
|
783
801
|
var BaseFrameworkCommand = class {
|
|
784
802
|
/**
|
|
785
803
|
* Affiche les informations spécifiques du contexte détecté
|
|
@@ -815,12 +833,12 @@ var BaseFrameworkCommand = class {
|
|
|
815
833
|
const metadata = getFrameworkMetadata(framework);
|
|
816
834
|
console.log();
|
|
817
835
|
console.log(
|
|
818
|
-
|
|
836
|
+
pc3.yellow(
|
|
819
837
|
`\u26A0\uFE0F Framework d\xE9tect\xE9: ${ctx.framework}. Cette commande est destin\xE9e aux projets ${metadata?.displayName || framework}.`
|
|
820
838
|
)
|
|
821
839
|
);
|
|
822
840
|
console.log(
|
|
823
|
-
|
|
841
|
+
pc3.gray(
|
|
824
842
|
`Utilisez "npx @configjs/cli ${ctx.framework}" pour les projets ${ctx.framework}.`
|
|
825
843
|
)
|
|
826
844
|
);
|
|
@@ -837,18 +855,18 @@ var BaseFrameworkCommand = class {
|
|
|
837
855
|
return;
|
|
838
856
|
}
|
|
839
857
|
console.log(
|
|
840
|
-
|
|
858
|
+
pc3.green(` \u2713 ${t.detection.framework}: `) + pc3.bold(`${ctx.framework} ${pc3.gray(ctx.frameworkVersion)}`)
|
|
841
859
|
);
|
|
842
860
|
console.log(
|
|
843
|
-
|
|
861
|
+
pc3.green(` \u2713 ${t.detection.typescript}: `) + pc3.bold(ctx.typescript ? "Oui" : "Non")
|
|
844
862
|
);
|
|
845
863
|
if (ctx.bundler) {
|
|
846
864
|
console.log(
|
|
847
|
-
|
|
865
|
+
pc3.green(` \u2713 ${t.detection.bundler}: `) + pc3.bold(`${ctx.bundler} ${pc3.gray(ctx.bundlerVersion || "")}`)
|
|
848
866
|
);
|
|
849
867
|
}
|
|
850
868
|
console.log(
|
|
851
|
-
|
|
869
|
+
pc3.green(` \u2713 ${t.detection.packageManager}: `) + pc3.bold(ctx.packageManager)
|
|
852
870
|
);
|
|
853
871
|
this.displayFrameworkSpecificInfo(ctx, t);
|
|
854
872
|
console.log();
|
|
@@ -899,29 +917,29 @@ var BaseFrameworkCommand = class {
|
|
|
899
917
|
return true;
|
|
900
918
|
}
|
|
901
919
|
console.log();
|
|
902
|
-
console.log(
|
|
903
|
-
console.log(
|
|
904
|
-
console.log(
|
|
920
|
+
console.log(pc3.bold(pc3.yellow("\u2501".repeat(60))));
|
|
921
|
+
console.log(pc3.bold(pc3.yellow("\u{1F50D} MODE DRY-RUN (simulation uniquement)")));
|
|
922
|
+
console.log(pc3.bold(pc3.yellow("\u2501".repeat(60))));
|
|
905
923
|
console.log();
|
|
906
|
-
console.log(
|
|
924
|
+
console.log(pc3.bold(pc3.cyan("\u{1F4E6} Packages \xE0 installer :")));
|
|
907
925
|
for (const plugin of selectedPlugins) {
|
|
908
926
|
console.log(
|
|
909
|
-
|
|
927
|
+
pc3.blue(` \u2022 ${plugin.displayName}`) + pc3.gray(
|
|
910
928
|
` (${plugin.name}${plugin.version ? `@${plugin.version}` : ""})`
|
|
911
929
|
)
|
|
912
930
|
);
|
|
913
931
|
}
|
|
914
932
|
console.log();
|
|
915
|
-
console.log(
|
|
933
|
+
console.log(pc3.bold(pc3.cyan("\u{1F4DD} Fichiers qui seraient cr\xE9\xE9s/modifi\xE9s :")));
|
|
916
934
|
for (const plugin of selectedPlugins) {
|
|
917
|
-
console.log(
|
|
935
|
+
console.log(pc3.gray(` \u2022 ${plugin.displayName} configuration`));
|
|
918
936
|
}
|
|
919
937
|
console.log();
|
|
920
938
|
console.log(
|
|
921
|
-
|
|
939
|
+
pc3.yellow("\u26A0\uFE0F Aucune modification n'a \xE9t\xE9 effectu\xE9e (dry-run)")
|
|
922
940
|
);
|
|
923
941
|
console.log(
|
|
924
|
-
|
|
942
|
+
pc3.cyan("\u{1F4A1} Ex\xE9cutez sans --dry-run pour appliquer les changements")
|
|
925
943
|
);
|
|
926
944
|
console.log();
|
|
927
945
|
return true;
|
|
@@ -947,8 +965,8 @@ var BaseFrameworkCommand = class {
|
|
|
947
965
|
const installer = new Installer(ctxWithServices, validator, backupManager);
|
|
948
966
|
if (options.install === false) {
|
|
949
967
|
console.log();
|
|
950
|
-
console.log(
|
|
951
|
-
console.log(
|
|
968
|
+
console.log(pc3.yellow("\u2699\uFE0F Mode configuration uniquement (--no-install)"));
|
|
969
|
+
console.log(pc3.gray("Les packages ne seront PAS install\xE9s"));
|
|
952
970
|
console.log();
|
|
953
971
|
}
|
|
954
972
|
const spinner = new SpinnerManager();
|
|
@@ -993,11 +1011,14 @@ ${t.installation.error}`);
|
|
|
993
1011
|
} else {
|
|
994
1012
|
logger.setLevel(1 /* INFO */);
|
|
995
1013
|
}
|
|
1014
|
+
if (!options.silent) {
|
|
1015
|
+
displayLogo();
|
|
1016
|
+
}
|
|
996
1017
|
const language = options.silent ? "en" : await promptLanguage();
|
|
997
1018
|
const t = getTranslations(language);
|
|
998
1019
|
if (!options.silent) {
|
|
999
1020
|
console.log();
|
|
1000
|
-
console.log(
|
|
1021
|
+
console.log(pc3.bold(pc3.cyan(`\u{1F50D} ${t.detection.detecting}`)));
|
|
1001
1022
|
}
|
|
1002
1023
|
const projectRoot = process.cwd();
|
|
1003
1024
|
const ctx = await this.getOrCreateContext(projectRoot, language);
|
|
@@ -1010,15 +1031,15 @@ ${t.installation.error}`);
|
|
|
1010
1031
|
if (selectedPlugins.length === 0) {
|
|
1011
1032
|
if (!options.silent) {
|
|
1012
1033
|
console.log();
|
|
1013
|
-
console.log(
|
|
1014
|
-
console.log(
|
|
1034
|
+
console.log(pc3.yellow(`\u26A0\uFE0F ${t.common.selected(0)}`));
|
|
1035
|
+
console.log(pc3.gray("Exiting..."));
|
|
1015
1036
|
}
|
|
1016
1037
|
return;
|
|
1017
1038
|
}
|
|
1018
1039
|
if (!options.silent) {
|
|
1019
1040
|
console.log();
|
|
1020
1041
|
console.log(
|
|
1021
|
-
|
|
1042
|
+
pc3.bold(pc3.green(`\u2713 ${t.common.selected(selectedPlugins.length)}`))
|
|
1022
1043
|
);
|
|
1023
1044
|
console.log();
|
|
1024
1045
|
}
|
|
@@ -1030,7 +1051,7 @@ ${t.installation.error}`);
|
|
|
1030
1051
|
if (!confirmed) {
|
|
1031
1052
|
if (!options.silent) {
|
|
1032
1053
|
console.log();
|
|
1033
|
-
console.log(
|
|
1054
|
+
console.log(pc3.gray(t.common.cancel));
|
|
1034
1055
|
}
|
|
1035
1056
|
return;
|
|
1036
1057
|
}
|