@configjs/cli 1.1.16 → 1.1.18

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 (34) hide show
  1. package/dist/{angular-command-XN26G6L3.js → angular-command-EOREU45Q.js} +8 -8
  2. package/dist/{angular-installer-FY43HE72.js → angular-installer-TKZDPFLD.js} +9 -1
  3. package/dist/angular-setup-QDTWXOB4.js +30 -0
  4. package/dist/check-KAPRT4FM.js +168 -0
  5. package/dist/{chunk-JYWGJJ4M.js → chunk-D7IWYKUX.js} +476 -28
  6. package/dist/chunk-EDCNW4UO.js +92 -0
  7. package/dist/{chunk-TN27AX4L.js → chunk-FJLN62L4.js} +797 -18
  8. package/dist/{chunk-FIB2J36N.js → chunk-HI7RYD6W.js} +161 -36
  9. package/dist/{chunk-NYCK4R4K.js → chunk-RIJNUJDC.js} +361 -96
  10. package/dist/chunk-V2IBYLVH.js +932 -0
  11. package/dist/chunk-VN4XTFDK.js +315 -0
  12. package/dist/{chunk-UKEHW2LH.js → chunk-Y4XYC7QV.js} +17 -3
  13. package/dist/cli.js +31 -21
  14. package/dist/{installed-D6CUYQM5.js → installed-QMJZIZNC.js} +4 -4
  15. package/dist/{list-VZDUWV5O.js → list-5T6VDDAO.js} +4 -4
  16. package/dist/{nextjs-command-WKKOAY7I.js → nextjs-command-C6PM7A5C.js} +8 -9
  17. package/dist/{nextjs-installer-2ZC5IWJ6.js → nextjs-installer-OFY5BQC4.js} +9 -2
  18. package/dist/{nextjs-setup-DYOFF72S.js → nextjs-setup-JIKPIJCX.js} +21 -9
  19. package/dist/{react-command-2T6IOTHB.js → react-command-JMK6VM4Q.js} +8 -9
  20. package/dist/{remove-ZY3MLPGN.js → remove-4ZNQR6ZR.js} +4 -4
  21. package/dist/{svelte-command-B2DNNQ5Z.js → svelte-command-YUSD55NO.js} +8 -8
  22. package/dist/svelte-installer-UP3KDZSY.js +105 -0
  23. package/dist/{svelte-setup-FWXLXJAC.js → svelte-setup-33E46IBT.js} +16 -5
  24. package/dist/{vite-installer-Y6VMFHIM.js → vite-installer-EE2LE76G.js} +9 -2
  25. package/dist/{vite-setup-JRELX6K2.js → vite-setup-VO5BOI46.js} +16 -4
  26. package/dist/{vue-command-IOTC32AI.js → vue-command-3CYWLLFQ.js} +8 -9
  27. package/dist/{vue-installer-DGBBVF6F.js → vue-installer-LEGLVD77.js} +9 -2
  28. package/dist/{vue-setup-G44DLT2U.js → vue-setup-FK5QT7AY.js} +16 -4
  29. package/package.json +12 -4
  30. package/dist/angular-setup-Z6TCKNBG.js +0 -18
  31. package/dist/check-KNGZSCMM.js +0 -131
  32. package/dist/chunk-6GV4NKUX.js +0 -122
  33. package/dist/chunk-QPEUT7QG.js +0 -157
  34. package/dist/svelte-installer-EOSC3EP3.js +0 -65
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  BaseFrameworkCommand,
3
3
  getFrameworkMetadata
4
- } from "./chunk-TN27AX4L.js";
5
- import "./chunk-NYCK4R4K.js";
6
- import "./chunk-JYWGJJ4M.js";
4
+ } from "./chunk-FJLN62L4.js";
5
+ import "./chunk-RIJNUJDC.js";
6
+ import "./chunk-D7IWYKUX.js";
7
7
  import {
8
8
  DetectionError,
9
9
  detectContext
10
- } from "./chunk-UKEHW2LH.js";
11
- import "./chunk-6GV4NKUX.js";
10
+ } from "./chunk-Y4XYC7QV.js";
11
+ import "./chunk-V2IBYLVH.js";
12
12
  import "./chunk-KAMPBTFG.js";
13
- import "./chunk-FIB2J36N.js";
14
- import "./chunk-QPEUT7QG.js";
13
+ import "./chunk-HI7RYD6W.js";
14
+ import "./chunk-VN4XTFDK.js";
15
15
  import {
16
16
  getTranslations
17
17
  } from "./chunk-L4GX22RG.js";
18
18
  import "./chunk-QGM4M3NI.js";
19
19
 
20
20
  // src/cli/commands/react-command.ts
21
- import pc from "picocolors";
21
+ import pc from "chalk";
22
22
  var ReactCommand = class extends BaseFrameworkCommand {
23
23
  getFramework() {
24
24
  return "react";
@@ -47,7 +47,6 @@ var ReactCommand = class extends BaseFrameworkCommand {
47
47
  projectRoot,
48
48
  language
49
49
  );
50
- process.chdir(newProjectPath);
51
50
  projectRoot = newProjectPath;
52
51
  console.log();
53
52
  return await detectContext(projectRoot);
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  PluginTracker,
3
3
  detectContext
4
- } from "./chunk-UKEHW2LH.js";
5
- import "./chunk-6GV4NKUX.js";
6
- import "./chunk-FIB2J36N.js";
4
+ } from "./chunk-Y4XYC7QV.js";
5
+ import "./chunk-V2IBYLVH.js";
6
+ import "./chunk-HI7RYD6W.js";
7
7
  import {
8
8
  logger
9
- } from "./chunk-QPEUT7QG.js";
9
+ } from "./chunk-VN4XTFDK.js";
10
10
  import {
11
11
  dist_default
12
12
  } from "./chunk-2HZGGA67.js";
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  BaseFrameworkCommand,
3
3
  getFrameworkMetadata
4
- } from "./chunk-TN27AX4L.js";
5
- import "./chunk-NYCK4R4K.js";
6
- import "./chunk-JYWGJJ4M.js";
4
+ } from "./chunk-FJLN62L4.js";
5
+ import "./chunk-RIJNUJDC.js";
6
+ import "./chunk-D7IWYKUX.js";
7
7
  import {
8
8
  DetectionError,
9
9
  detectContext
10
- } from "./chunk-UKEHW2LH.js";
11
- import "./chunk-6GV4NKUX.js";
10
+ } from "./chunk-Y4XYC7QV.js";
11
+ import "./chunk-V2IBYLVH.js";
12
12
  import "./chunk-KAMPBTFG.js";
13
- import "./chunk-FIB2J36N.js";
14
- import "./chunk-QPEUT7QG.js";
13
+ import "./chunk-HI7RYD6W.js";
14
+ import "./chunk-VN4XTFDK.js";
15
15
  import {
16
16
  getTranslations
17
17
  } from "./chunk-L4GX22RG.js";
18
18
  import "./chunk-QGM4M3NI.js";
19
19
 
20
20
  // src/cli/commands/svelte-command.ts
21
- import pc from "picocolors";
21
+ import pc from "chalk";
22
22
  var SvelteCommand = class extends BaseFrameworkCommand {
23
23
  getFramework() {
24
24
  return "svelte";
@@ -0,0 +1,105 @@
1
+ import {
2
+ checkPathExists
3
+ } from "./chunk-HI7RYD6W.js";
4
+ import "./chunk-VN4XTFDK.js";
5
+ import {
6
+ getTranslations
7
+ } from "./chunk-L4GX22RG.js";
8
+ import "./chunk-QGM4M3NI.js";
9
+
10
+ // src/cli/utils/svelte-installer.ts
11
+ import { spawn } from "child_process";
12
+ import { join } from "path";
13
+ import pc from "chalk";
14
+ function validateProjectName(name) {
15
+ if (!/^[a-zA-Z0-9._-]+$/.test(name)) return false;
16
+ return !name.includes("..") && !name.includes("/") && !name.includes("\\");
17
+ }
18
+ async function createSvelteProject(options, currentDir, language) {
19
+ const t = getTranslations(language);
20
+ const projectPath = join(currentDir, options.projectName);
21
+ if (!validateProjectName(options.projectName)) {
22
+ throw new Error(`Invalid project name: ${options.projectName}`);
23
+ }
24
+ if (await checkPathExists(projectPath)) {
25
+ throw new Error(
26
+ t.vite.folderExists?.(options.projectName) || `Folder ${options.projectName} already exists`
27
+ );
28
+ }
29
+ console.log();
30
+ console.log(
31
+ pc.cyan(`\u2728 ${t.svelte.creatingProject || "Creating Svelte project..."}`)
32
+ );
33
+ console.log();
34
+ try {
35
+ const templateSuffix = options.useTypeScript ? "" : "-js";
36
+ await new Promise((resolve, reject) => {
37
+ const child = spawn(
38
+ "npm",
39
+ [
40
+ "create",
41
+ "svelte@latest",
42
+ options.projectName,
43
+ "--",
44
+ "--template",
45
+ `skeleton${templateSuffix}`,
46
+ "--no-install"
47
+ ],
48
+ {
49
+ cwd: currentDir,
50
+ stdio: "inherit",
51
+ shell: false
52
+ }
53
+ );
54
+ child.on("error", (error) => {
55
+ reject(error instanceof Error ? error : new Error(String(error)));
56
+ });
57
+ child.on("exit", (code) => {
58
+ if (code === 0) {
59
+ resolve();
60
+ } else {
61
+ reject(new Error(`npm create svelte failed with code ${code}`));
62
+ }
63
+ });
64
+ });
65
+ console.log();
66
+ console.log(
67
+ pc.cyan(
68
+ `\u{1F4E6} ${t.svelte.installingDependencies || "Installing dependencies..."}`
69
+ )
70
+ );
71
+ console.log();
72
+ await new Promise((resolve, reject) => {
73
+ const child = spawn("npm", ["install"], {
74
+ cwd: projectPath,
75
+ stdio: "inherit",
76
+ shell: false
77
+ });
78
+ child.on("error", (error) => {
79
+ reject(error instanceof Error ? error : new Error(String(error)));
80
+ });
81
+ child.on("exit", (code) => {
82
+ if (code === 0) {
83
+ resolve();
84
+ } else {
85
+ reject(new Error(`npm install failed with code ${code}`));
86
+ }
87
+ });
88
+ });
89
+ console.log();
90
+ console.log(
91
+ pc.green(
92
+ `\u2705 ${t.svelte.projectCreated || "Svelte project created successfully!"}`
93
+ )
94
+ );
95
+ console.log();
96
+ return projectPath;
97
+ } catch (error) {
98
+ const errorMsg = error instanceof Error ? error.message : String(error);
99
+ console.error(pc.red(`\u274C Failed to create Svelte project: ${errorMsg}`));
100
+ throw error;
101
+ }
102
+ }
103
+ export {
104
+ createSvelteProject
105
+ };
@@ -2,13 +2,18 @@ import {
2
2
  dist_default,
3
3
  dist_default2
4
4
  } from "./chunk-2HZGGA67.js";
5
+ import {
6
+ getValidationErrorMessage,
7
+ svelteSetupSchema,
8
+ validateInput
9
+ } from "./chunk-EDCNW4UO.js";
5
10
  import {
6
11
  getTranslations
7
12
  } from "./chunk-L4GX22RG.js";
8
13
  import "./chunk-QGM4M3NI.js";
9
14
 
10
15
  // src/cli/prompts/svelte-setup.ts
11
- import pc from "picocolors";
16
+ import pc from "chalk";
12
17
  async function promptSvelteSetup(language) {
13
18
  const t = getTranslations(language);
14
19
  console.log();
@@ -28,10 +33,16 @@ async function promptSvelteSetup(language) {
28
33
  message: t.svelte.useTypeScript || "Use TypeScript?",
29
34
  default: true
30
35
  });
31
- return {
32
- projectName: projectName.trim(),
33
- useTypeScript
34
- };
36
+ try {
37
+ const validated = validateInput(svelteSetupSchema, {
38
+ projectName: projectName.trim(),
39
+ useTypeScript
40
+ });
41
+ return validated;
42
+ } catch (error) {
43
+ console.error(pc.red(`\u274C ${getValidationErrorMessage(error)}`));
44
+ throw error;
45
+ }
35
46
  }
36
47
  export {
37
48
  promptSvelteSetup
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  checkPathExists
3
- } from "./chunk-FIB2J36N.js";
3
+ } from "./chunk-HI7RYD6W.js";
4
4
  import {
5
5
  logger
6
- } from "./chunk-QPEUT7QG.js";
6
+ } from "./chunk-VN4XTFDK.js";
7
7
  import {
8
8
  getTranslations
9
9
  } from "./chunk-L4GX22RG.js";
@@ -12,9 +12,16 @@ import "./chunk-QGM4M3NI.js";
12
12
  // src/cli/utils/vite-installer.ts
13
13
  import { resolve } from "path";
14
14
  import { execa } from "execa";
15
+ function validateProjectName(name) {
16
+ if (!/^[a-zA-Z0-9._-]+$/.test(name)) return false;
17
+ return !name.includes("..") && !name.includes("/") && !name.includes("\\");
18
+ }
15
19
  async function createViteProject(options, currentDir, language) {
16
20
  const t = getTranslations(language);
17
21
  const { projectName, template } = options;
22
+ if (!validateProjectName(projectName)) {
23
+ throw new Error(`Invalid project name: ${projectName}`);
24
+ }
18
25
  const projectPath = resolve(currentDir, projectName);
19
26
  if (await checkPathExists(projectPath)) {
20
27
  throw new Error(t.vite.folderExists(projectName));
@@ -1,3 +1,8 @@
1
+ import {
2
+ getValidationErrorMessage,
3
+ validateInput,
4
+ viteSetupSchema
5
+ } from "./chunk-EDCNW4UO.js";
1
6
  import {
2
7
  getTranslations
3
8
  } from "./chunk-L4GX22RG.js";
@@ -5,6 +10,7 @@ import "./chunk-QGM4M3NI.js";
5
10
 
6
11
  // src/cli/prompts/vite-setup.ts
7
12
  import inquirer from "inquirer";
13
+ import pc from "chalk";
8
14
  async function promptViteSetup(language) {
9
15
  const t = getTranslations(language);
10
16
  const answers = await inquirer.prompt([
@@ -41,10 +47,16 @@ async function promptViteSetup(language) {
41
47
  if (!answers.shouldCreate) {
42
48
  return null;
43
49
  }
44
- return {
45
- projectName: answers.projectName.trim(),
46
- template: answers.typescript ? "react-ts" : "react"
47
- };
50
+ try {
51
+ const validated = validateInput(viteSetupSchema, {
52
+ projectName: answers.projectName.trim(),
53
+ template: answers.typescript ? "react-ts" : "react"
54
+ });
55
+ return validated;
56
+ } catch (error) {
57
+ console.error(pc.red(`\u274C ${getValidationErrorMessage(error)}`));
58
+ throw error;
59
+ }
48
60
  }
49
61
  export {
50
62
  promptViteSetup
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  BaseFrameworkCommand,
3
3
  getFrameworkMetadata
4
- } from "./chunk-TN27AX4L.js";
5
- import "./chunk-NYCK4R4K.js";
6
- import "./chunk-JYWGJJ4M.js";
4
+ } from "./chunk-FJLN62L4.js";
5
+ import "./chunk-RIJNUJDC.js";
6
+ import "./chunk-D7IWYKUX.js";
7
7
  import {
8
8
  DetectionError,
9
9
  detectContext
10
- } from "./chunk-UKEHW2LH.js";
11
- import "./chunk-6GV4NKUX.js";
10
+ } from "./chunk-Y4XYC7QV.js";
11
+ import "./chunk-V2IBYLVH.js";
12
12
  import "./chunk-KAMPBTFG.js";
13
- import "./chunk-FIB2J36N.js";
14
- import "./chunk-QPEUT7QG.js";
13
+ import "./chunk-HI7RYD6W.js";
14
+ import "./chunk-VN4XTFDK.js";
15
15
  import {
16
16
  getTranslations
17
17
  } from "./chunk-L4GX22RG.js";
18
18
  import "./chunk-QGM4M3NI.js";
19
19
 
20
20
  // src/cli/commands/vue-command.ts
21
- import pc from "picocolors";
21
+ import pc from "chalk";
22
22
  var VueCommand = class extends BaseFrameworkCommand {
23
23
  getFramework() {
24
24
  return "vue";
@@ -47,7 +47,6 @@ var VueCommand = class extends BaseFrameworkCommand {
47
47
  projectRoot,
48
48
  language
49
49
  );
50
- process.chdir(newProjectPath);
51
50
  projectRoot = newProjectPath;
52
51
  console.log();
53
52
  return await detectContext(projectRoot);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  checkPathExists
3
- } from "./chunk-FIB2J36N.js";
3
+ } from "./chunk-HI7RYD6W.js";
4
4
  import {
5
5
  logger
6
- } from "./chunk-QPEUT7QG.js";
6
+ } from "./chunk-VN4XTFDK.js";
7
7
  import {
8
8
  getTranslations
9
9
  } from "./chunk-L4GX22RG.js";
@@ -12,9 +12,16 @@ import "./chunk-QGM4M3NI.js";
12
12
  // src/cli/utils/vue-installer.ts
13
13
  import { resolve } from "path";
14
14
  import { execa } from "execa";
15
+ function validateProjectName(name) {
16
+ if (!/^[a-zA-Z0-9._-]+$/.test(name)) return false;
17
+ return !name.includes("..") && !name.includes("/") && !name.includes("\\");
18
+ }
15
19
  async function createVueProject(options, currentDir, language) {
16
20
  const t = getTranslations(language);
17
21
  const { projectName, typescript } = options;
22
+ if (!validateProjectName(projectName)) {
23
+ throw new Error(`Invalid project name: ${projectName}`);
24
+ }
18
25
  const projectPath = resolve(currentDir, projectName);
19
26
  if (await checkPathExists(projectPath)) {
20
27
  throw new Error(t.vue.folderExists(projectName));
@@ -1,3 +1,8 @@
1
+ import {
2
+ getValidationErrorMessage,
3
+ validateInput,
4
+ vueSetupSchema
5
+ } from "./chunk-EDCNW4UO.js";
1
6
  import {
2
7
  getTranslations
3
8
  } from "./chunk-L4GX22RG.js";
@@ -5,6 +10,7 @@ import "./chunk-QGM4M3NI.js";
5
10
 
6
11
  // src/cli/prompts/vue-setup.ts
7
12
  import inquirer from "inquirer";
13
+ import pc from "chalk";
8
14
  async function promptVueSetup(language) {
9
15
  const t = getTranslations(language);
10
16
  const answers = await inquirer.prompt([
@@ -41,10 +47,16 @@ async function promptVueSetup(language) {
41
47
  if (!answers.shouldCreate) {
42
48
  return null;
43
49
  }
44
- return {
45
- projectName: answers.projectName.trim(),
46
- typescript: answers.typescript
47
- };
50
+ try {
51
+ const validated = validateInput(vueSetupSchema, {
52
+ projectName: answers.projectName.trim(),
53
+ typescript: answers.typescript
54
+ });
55
+ return validated;
56
+ } catch (error) {
57
+ console.error(pc.red(`\u274C ${getValidationErrorMessage(error)}`));
58
+ throw error;
59
+ }
48
60
  }
49
61
  export {
50
62
  promptVueSetup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configjs/cli",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "type": "module",
5
5
  "description": "Configure your frontend stack, instantly - Utilitaire CLI d'installation modulaire de bibliothèques frontend",
6
6
  "keywords": [
@@ -53,10 +53,18 @@
53
53
  "test:watch": "vitest watch",
54
54
  "test:integration": "vitest run tests/integration",
55
55
  "test:e2e": "vitest run tests/e2e",
56
- "prepublishOnly": "npm run typecheck && npm run lint && npm run test:unit && npm run build",
56
+ "test:security": "vitest run tests/security",
57
+ "test:performance": "vitest run tests/performance",
58
+ "perf:check": "vitest run tests/performance --reporter=json --outputFile=performance-report.json || true",
59
+ "audit": "npm audit --audit-level=moderate",
60
+ "audit:fix": "npm audit fix",
61
+ "outdated": "npm outdated",
62
+ "prepublishOnly": "npm run typecheck && npm run lint && npm run test:unit && npm run test:security && npm run build",
57
63
  "prepare": "husky install"
58
64
  },
59
65
  "dependencies": {
66
+ "@babel/parser": "^7.28.6",
67
+ "@iarna/toml": "^2.2.5",
60
68
  "chalk": "^5.6.2",
61
69
  "commander": "^14.0.2",
62
70
  "conf": "^15.0.2",
@@ -64,9 +72,9 @@
64
72
  "fs-extra": "^11.3.3",
65
73
  "inquirer": "^13.1.0",
66
74
  "ora": "^9.0.0",
67
- "picocolors": "^1.1.1",
68
75
  "type-fest": "^5.3.1",
69
- "zod": "^4.3.2"
76
+ "yaml": "^2.8.2",
77
+ "zod": "^4.3.5"
70
78
  },
71
79
  "devDependencies": {
72
80
  "@eslint/js": "^9.39.2",
@@ -1,18 +0,0 @@
1
- import "./chunk-QGM4M3NI.js";
2
-
3
- // src/cli/prompts/angular-setup.ts
4
- import pc from "picocolors";
5
- function promptAngularSetup() {
6
- console.log();
7
- console.log(pc.cyan("\u2699\uFE0F Angular Project Setup"));
8
- console.log();
9
- return Promise.resolve({
10
- projectName: "my-angular-app",
11
- useTypeScript: true,
12
- useRouting: true,
13
- useStylesheet: "scss"
14
- });
15
- }
16
- export {
17
- promptAngularSetup
18
- };
@@ -1,131 +0,0 @@
1
- import {
2
- CompatibilityValidator,
3
- allCompatibilityRules
4
- } from "./chunk-NYCK4R4K.js";
5
- import {
6
- pluginRegistry
7
- } from "./chunk-JYWGJJ4M.js";
8
- import "./chunk-6GV4NKUX.js";
9
- import "./chunk-FIB2J36N.js";
10
- import {
11
- logger
12
- } from "./chunk-QPEUT7QG.js";
13
- import "./chunk-QGM4M3NI.js";
14
-
15
- // src/cli/commands/check.ts
16
- import { readFile } from "fs/promises";
17
- import { join } from "path";
18
- import { existsSync } from "fs";
19
- async function checkCompatibility(options) {
20
- try {
21
- console.log("\n\u{1F50D} V\xE9rification de la compatibilit\xE9\n");
22
- const configPath = options.config || join(process.cwd(), ".confjs.json");
23
- if (!existsSync(configPath)) {
24
- console.error(`\u274C Fichier de configuration introuvable: ${configPath}`);
25
- console.log("\n\u{1F4A1} Cr\xE9ez un fichier .confjs.json avec le format suivant:");
26
- console.log(
27
- JSON.stringify(
28
- {
29
- plugins: ["react-router-dom", "zustand", "tailwindcss"]
30
- },
31
- null,
32
- 2
33
- )
34
- );
35
- process.exit(1);
36
- }
37
- const configContent = await readFile(configPath, "utf-8");
38
- let config;
39
- try {
40
- const parsed = JSON.parse(configContent);
41
- config = parsed;
42
- } catch {
43
- console.error(
44
- "\u274C Erreur de parsing JSON dans le fichier de configuration"
45
- );
46
- process.exit(1);
47
- }
48
- if (!config.plugins || !Array.isArray(config.plugins)) {
49
- console.error("\u274C Format de configuration invalide");
50
- console.log(
51
- ' Le champ "plugins" doit \xEAtre un tableau de noms de packages'
52
- );
53
- process.exit(1);
54
- }
55
- const selectedPlugins = config.plugins.map((name) => pluginRegistry.find((p) => p.name === name)).filter(Boolean);
56
- if (selectedPlugins.length === 0) {
57
- console.error("\u274C Aucun plugin valide trouv\xE9 dans la configuration");
58
- process.exit(1);
59
- }
60
- const notFound = config.plugins.filter(
61
- (name) => !pluginRegistry.find((p) => p.name === name)
62
- );
63
- if (notFound.length > 0) {
64
- console.warn("\n\u26A0\uFE0F Plugins non trouv\xE9s:");
65
- for (const name of notFound) {
66
- console.warn(` \u2022 ${name}`);
67
- }
68
- }
69
- console.log(`\u{1F4E6} Plugins \xE0 v\xE9rifier: ${selectedPlugins.length}`);
70
- for (const plugin of selectedPlugins) {
71
- if (plugin) {
72
- console.log(` \u2022 ${plugin.displayName} (${plugin.name})`);
73
- }
74
- }
75
- console.log("\n\u{1F50D} Analyse de compatibilit\xE9...\n");
76
- const validator = new CompatibilityValidator(allCompatibilityRules);
77
- const validation = validator.validate(
78
- selectedPlugins
79
- );
80
- if (validation.errors.length === 0) {
81
- console.log("\u2705 Aucun conflit d\xE9tect\xE9\n");
82
- } else {
83
- console.error("\u274C Conflits d\xE9tect\xE9s:\n");
84
- for (const error of validation.errors) {
85
- console.error(` \u2022 ${error.message}`);
86
- if ("plugins" in error && error.plugins) {
87
- console.error(` Plugins: ${error.plugins.join(", ")}`);
88
- }
89
- }
90
- console.log("");
91
- }
92
- if (validation.warnings.length > 0) {
93
- console.warn("\u26A0\uFE0F Avertissements:\n");
94
- for (const warning of validation.warnings) {
95
- console.warn(` \u2022 ${warning.message}`);
96
- if ("plugins" in warning && warning.plugins) {
97
- console.warn(` Plugins: ${warning.plugins.join(", ")}`);
98
- }
99
- }
100
- console.log("");
101
- }
102
- if (validation.suggestions.length > 0) {
103
- console.log("\u{1F4A1} Suggestions:\n");
104
- for (const suggestion of validation.suggestions) {
105
- console.log(` \u2022 ${suggestion}`);
106
- }
107
- console.log("");
108
- }
109
- if (validation.valid) {
110
- console.log(
111
- "\u2728 Configuration valide ! Vous pouvez proc\xE9der \xE0 l'installation.\n"
112
- );
113
- process.exit(0);
114
- } else {
115
- console.error(
116
- "\u274C Configuration invalide. Corrigez les erreurs avant d'installer.\n"
117
- );
118
- process.exit(2);
119
- }
120
- } catch (error) {
121
- logger.error("Erreur lors de la v\xE9rification:", error);
122
- if (error instanceof Error) {
123
- console.error(`
124
- \u274C ${error.message}`);
125
- }
126
- process.exit(1);
127
- }
128
- }
129
- export {
130
- checkCompatibility
131
- };