@configjs/cli 1.1.11 → 1.1.13
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/dist/angular-command-KX7WHQV4.js +56 -0
- package/dist/angular-installer-FY43HE72.js +53 -0
- package/dist/angular-setup-Z6TCKNBG.js +18 -0
- package/dist/{check-PEWUERVP.js → check-XXBOQU2U.js} +2 -2
- package/dist/{chunk-AP23JQSL.js → chunk-5ZZ56QH7.js} +45 -109
- package/dist/{chunk-O2IJKLMT.js → chunk-HSLMPJN4.js} +1 -1
- package/dist/chunk-KAMPBTFG.js +94 -0
- package/dist/{chunk-3WLFBAII.js → chunk-L4GX22RG.js} +57 -0
- package/dist/{chunk-WHV4KF4U.js → chunk-UKEHW2LH.js} +20 -1
- package/dist/{chunk-ZAGZRB7Y.js → chunk-XJN5434Q.js} +277 -8
- package/dist/cli.js +21 -9
- package/dist/{installed-LZE6LH7A.js → installed-D6CUYQM5.js} +1 -1
- package/dist/{list-3M2L5RYT.js → list-AWADTBUA.js} +1 -1
- package/dist/{nextjs-command-CANKBSNF.js → nextjs-command-6PIQOGKC.js} +6 -5
- package/dist/{nextjs-installer-TQTRTWTQ.js → nextjs-installer-2ZC5IWJ6.js} +1 -1
- package/dist/{nextjs-setup-I5JJ43KS.js → nextjs-setup-DYOFF72S.js} +1 -1
- package/dist/{react-command-BFJWFYWC.js → react-command-XF7Q4GB6.js} +6 -5
- package/dist/{remove-JCK32XHZ.js → remove-ZY3MLPGN.js} +1 -1
- package/dist/{svelte-command-DHI62P2P.js → svelte-command-AJPAGQES.js} +6 -5
- package/dist/{svelte-installer-HWNNV2YK.js → svelte-installer-EOSC3EP3.js} +1 -1
- package/dist/{svelte-setup-2IJCXART.js → svelte-setup-FWXLXJAC.js} +1 -1
- package/dist/{vite-installer-PPES2JQY.js → vite-installer-Y6VMFHIM.js} +1 -1
- package/dist/{vite-setup-GOJ73AYC.js → vite-setup-JRELX6K2.js} +1 -1
- package/dist/{vue-command-R7ZY5GED.js → vue-command-UGN3RDDJ.js} +6 -5
- package/dist/{vue-installer-XTKXJNTQ.js → vue-installer-DGBBVF6F.js} +1 -1
- package/dist/{vue-setup-3QAOL6JM.js → vue-setup-G44DLT2U.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseFrameworkCommand,
|
|
3
|
+
getFrameworkMetadata
|
|
4
|
+
} from "./chunk-5ZZ56QH7.js";
|
|
5
|
+
import "./chunk-HSLMPJN4.js";
|
|
6
|
+
import "./chunk-XJN5434Q.js";
|
|
7
|
+
import {
|
|
8
|
+
DetectionError,
|
|
9
|
+
detectContext
|
|
10
|
+
} from "./chunk-UKEHW2LH.js";
|
|
11
|
+
import "./chunk-6GV4NKUX.js";
|
|
12
|
+
import "./chunk-KAMPBTFG.js";
|
|
13
|
+
import "./chunk-FIB2J36N.js";
|
|
14
|
+
import "./chunk-QPEUT7QG.js";
|
|
15
|
+
import {
|
|
16
|
+
getTranslations
|
|
17
|
+
} from "./chunk-L4GX22RG.js";
|
|
18
|
+
import "./chunk-QGM4M3NI.js";
|
|
19
|
+
|
|
20
|
+
// src/cli/commands/angular-command.ts
|
|
21
|
+
import pc from "picocolors";
|
|
22
|
+
var AngularCommand = class extends BaseFrameworkCommand {
|
|
23
|
+
getFramework() {
|
|
24
|
+
return "angular";
|
|
25
|
+
}
|
|
26
|
+
async getOrCreateContext(projectRoot, language) {
|
|
27
|
+
const t = getTranslations(language);
|
|
28
|
+
const metadata = getFrameworkMetadata("angular");
|
|
29
|
+
if (!metadata) {
|
|
30
|
+
throw new Error("Angular framework metadata not found");
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
return await detectContext(projectRoot);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
if (error instanceof DetectionError) {
|
|
36
|
+
console.log();
|
|
37
|
+
console.log(pc.yellow(t.angular.noAngularDetected));
|
|
38
|
+
console.log();
|
|
39
|
+
const setupOptions = await metadata.getSetupPrompt(language);
|
|
40
|
+
const projectPath = await metadata.createProject(
|
|
41
|
+
setupOptions,
|
|
42
|
+
projectRoot,
|
|
43
|
+
language
|
|
44
|
+
);
|
|
45
|
+
console.log();
|
|
46
|
+
console.log(pc.green(t.angular.projectCreated));
|
|
47
|
+
console.log();
|
|
48
|
+
return await detectContext(projectPath);
|
|
49
|
+
}
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
AngularCommand
|
|
56
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerManager
|
|
3
|
+
} from "./chunk-KAMPBTFG.js";
|
|
4
|
+
import {
|
|
5
|
+
getTranslations
|
|
6
|
+
} from "./chunk-L4GX22RG.js";
|
|
7
|
+
import "./chunk-QGM4M3NI.js";
|
|
8
|
+
|
|
9
|
+
// src/cli/utils/angular-installer.ts
|
|
10
|
+
import { spawn } from "child_process";
|
|
11
|
+
import { resolve } from "path";
|
|
12
|
+
async function createAngularProject(options, currentDir, language) {
|
|
13
|
+
const t = getTranslations(language);
|
|
14
|
+
const spinner = new SpinnerManager();
|
|
15
|
+
const projectPath = resolve(currentDir, options.projectName);
|
|
16
|
+
try {
|
|
17
|
+
spinner.start(t.angular.creatingProject);
|
|
18
|
+
const args = [
|
|
19
|
+
"@angular/cli@latest",
|
|
20
|
+
"new",
|
|
21
|
+
options.projectName,
|
|
22
|
+
"--skip-git=true",
|
|
23
|
+
"--skip-install=true",
|
|
24
|
+
"--style=" + options.useStylesheet,
|
|
25
|
+
"--routing=" + (options.useRouting ? "true" : "false")
|
|
26
|
+
];
|
|
27
|
+
if (options.useTypeScript) {
|
|
28
|
+
args.push("--create-application=true");
|
|
29
|
+
}
|
|
30
|
+
await new Promise((resolve2, reject) => {
|
|
31
|
+
const child = spawn("npx", args, {
|
|
32
|
+
cwd: currentDir,
|
|
33
|
+
stdio: "pipe"
|
|
34
|
+
});
|
|
35
|
+
child.on("error", reject);
|
|
36
|
+
child.on("close", (code) => {
|
|
37
|
+
if (code === 0) {
|
|
38
|
+
resolve2();
|
|
39
|
+
} else {
|
|
40
|
+
reject(new Error(`Angular CLI failed with code ${code}`));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
spinner.succeed(t.angular.projectCreated);
|
|
45
|
+
return projectPath;
|
|
46
|
+
} catch (error) {
|
|
47
|
+
spinner.fail(t.angular.error);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
createAngularProject
|
|
53
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompatibilityValidator,
|
|
3
3
|
allCompatibilityRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HSLMPJN4.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginRegistry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XJN5434Q.js";
|
|
8
8
|
import "./chunk-6GV4NKUX.js";
|
|
9
9
|
import "./chunk-FIB2J36N.js";
|
|
10
10
|
import {
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompatibilityValidator,
|
|
3
3
|
allCompatibilityRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HSLMPJN4.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-XJN5434Q.js";
|
|
12
12
|
import {
|
|
13
13
|
PluginTracker
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UKEHW2LH.js";
|
|
15
|
+
import {
|
|
16
|
+
SpinnerManager
|
|
17
|
+
} from "./chunk-KAMPBTFG.js";
|
|
15
18
|
import {
|
|
16
19
|
getModuleLogger,
|
|
17
20
|
logger
|
|
18
21
|
} from "./chunk-QPEUT7QG.js";
|
|
19
22
|
import {
|
|
20
23
|
getTranslations
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-L4GX22RG.js";
|
|
22
25
|
|
|
23
26
|
// src/core/framework-registry.ts
|
|
24
27
|
var frameworkRegistry = {
|
|
@@ -33,11 +36,11 @@ var frameworkRegistry = {
|
|
|
33
36
|
ts: "react-ts"
|
|
34
37
|
},
|
|
35
38
|
getSetupPrompt: async (language) => {
|
|
36
|
-
const { promptViteSetup } = await import("./vite-setup-
|
|
39
|
+
const { promptViteSetup } = await import("./vite-setup-JRELX6K2.js");
|
|
37
40
|
return await promptViteSetup(language);
|
|
38
41
|
},
|
|
39
42
|
createProject: async (options, currentDir, language) => {
|
|
40
|
-
const { createViteProject } = await import("./vite-installer-
|
|
43
|
+
const { createViteProject } = await import("./vite-installer-Y6VMFHIM.js");
|
|
41
44
|
return await createViteProject(
|
|
42
45
|
options,
|
|
43
46
|
currentDir,
|
|
@@ -57,11 +60,11 @@ var frameworkRegistry = {
|
|
|
57
60
|
defaultBundler: "nextjs",
|
|
58
61
|
createCommand: "npm create next-app@latest",
|
|
59
62
|
getSetupPrompt: async (language) => {
|
|
60
|
-
const { promptNextjsSetup } = await import("./nextjs-setup-
|
|
63
|
+
const { promptNextjsSetup } = await import("./nextjs-setup-DYOFF72S.js");
|
|
61
64
|
return await promptNextjsSetup(language);
|
|
62
65
|
},
|
|
63
66
|
createProject: async (options, currentDir, language) => {
|
|
64
|
-
const { createNextjsProject } = await import("./nextjs-installer-
|
|
67
|
+
const { createNextjsProject } = await import("./nextjs-installer-2ZC5IWJ6.js");
|
|
65
68
|
return await createNextjsProject(
|
|
66
69
|
options,
|
|
67
70
|
currentDir,
|
|
@@ -85,11 +88,11 @@ var frameworkRegistry = {
|
|
|
85
88
|
ts: "vue-ts"
|
|
86
89
|
},
|
|
87
90
|
getSetupPrompt: async (language) => {
|
|
88
|
-
const { promptVueSetup } = await import("./vue-setup-
|
|
91
|
+
const { promptVueSetup } = await import("./vue-setup-G44DLT2U.js");
|
|
89
92
|
return await promptVueSetup(language);
|
|
90
93
|
},
|
|
91
94
|
createProject: async (options, currentDir, language) => {
|
|
92
|
-
const { createVueProject } = await import("./vue-installer-
|
|
95
|
+
const { createVueProject } = await import("./vue-installer-DGBBVF6F.js");
|
|
93
96
|
return await createVueProject(
|
|
94
97
|
options,
|
|
95
98
|
currentDir,
|
|
@@ -109,11 +112,11 @@ var frameworkRegistry = {
|
|
|
109
112
|
defaultBundler: "vite",
|
|
110
113
|
createCommand: "npm create svelte@latest",
|
|
111
114
|
getSetupPrompt: async (language) => {
|
|
112
|
-
const { promptSvelteSetup } = await import("./svelte-setup-
|
|
115
|
+
const { promptSvelteSetup } = await import("./svelte-setup-FWXLXJAC.js");
|
|
113
116
|
return await promptSvelteSetup(language);
|
|
114
117
|
},
|
|
115
118
|
createProject: async (options, currentDir, language) => {
|
|
116
|
-
const { createSvelteProject } = await import("./svelte-installer-
|
|
119
|
+
const { createSvelteProject } = await import("./svelte-installer-EOSC3EP3.js");
|
|
117
120
|
return await createSvelteProject(
|
|
118
121
|
options,
|
|
119
122
|
currentDir,
|
|
@@ -125,6 +128,30 @@ var frameworkRegistry = {
|
|
|
125
128
|
creating: "svelte.creating",
|
|
126
129
|
folderExists: (name) => `svelte.folderExists(${name})`
|
|
127
130
|
}
|
|
131
|
+
},
|
|
132
|
+
angular: {
|
|
133
|
+
id: "angular",
|
|
134
|
+
displayName: "Angular",
|
|
135
|
+
detectPackages: ["@angular/core"],
|
|
136
|
+
defaultBundler: "webpack",
|
|
137
|
+
createCommand: "npx @angular/cli@latest new",
|
|
138
|
+
getSetupPrompt: async () => {
|
|
139
|
+
const { promptAngularSetup } = await import("./angular-setup-Z6TCKNBG.js");
|
|
140
|
+
return await promptAngularSetup();
|
|
141
|
+
},
|
|
142
|
+
createProject: async (options, currentDir, language) => {
|
|
143
|
+
const { createAngularProject } = await import("./angular-installer-FY43HE72.js");
|
|
144
|
+
return await createAngularProject(
|
|
145
|
+
options,
|
|
146
|
+
currentDir,
|
|
147
|
+
language
|
|
148
|
+
);
|
|
149
|
+
},
|
|
150
|
+
i18nKeys: {
|
|
151
|
+
noFrameworkDetected: "angular.noAngularDetected",
|
|
152
|
+
creating: "angular.creating",
|
|
153
|
+
folderExists: (name) => `angular.folderExists(${name})`
|
|
154
|
+
}
|
|
128
155
|
}
|
|
129
156
|
};
|
|
130
157
|
function getFrameworkMetadata(framework) {
|
|
@@ -626,97 +653,6 @@ var Installer = class {
|
|
|
626
653
|
}
|
|
627
654
|
};
|
|
628
655
|
|
|
629
|
-
// src/cli/ui/spinner.ts
|
|
630
|
-
import ora from "ora";
|
|
631
|
-
var SpinnerManager = class {
|
|
632
|
-
spinner = null;
|
|
633
|
-
constructor() {
|
|
634
|
-
}
|
|
635
|
-
/**
|
|
636
|
-
* Démarre un spinner avec un message
|
|
637
|
-
*
|
|
638
|
-
* @param message - Message à afficher (peut être une clé de traduction)
|
|
639
|
-
* @param text - Texte personnalisé (optionnel, remplace le message traduit)
|
|
640
|
-
*/
|
|
641
|
-
start(message, text) {
|
|
642
|
-
this.stop();
|
|
643
|
-
const displayText = text || message;
|
|
644
|
-
this.spinner = ora({
|
|
645
|
-
text: displayText,
|
|
646
|
-
spinner: "dots"
|
|
647
|
-
}).start();
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* Met à jour le message du spinner
|
|
651
|
-
*
|
|
652
|
-
* @param message - Nouveau message
|
|
653
|
-
*/
|
|
654
|
-
update(message) {
|
|
655
|
-
if (this.spinner) {
|
|
656
|
-
this.spinner.text = message;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* Arrête le spinner avec succès
|
|
661
|
-
*
|
|
662
|
-
* @param message - Message de succès (optionnel)
|
|
663
|
-
*/
|
|
664
|
-
succeed(message) {
|
|
665
|
-
if (this.spinner) {
|
|
666
|
-
this.spinner.succeed(message);
|
|
667
|
-
this.spinner = null;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* Arrête le spinner avec une erreur
|
|
672
|
-
*
|
|
673
|
-
* @param message - Message d'erreur (optionnel)
|
|
674
|
-
*/
|
|
675
|
-
fail(message) {
|
|
676
|
-
if (this.spinner) {
|
|
677
|
-
this.spinner.fail(message);
|
|
678
|
-
this.spinner = null;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* Arrête le spinner avec un avertissement
|
|
683
|
-
*
|
|
684
|
-
* @param message - Message d'avertissement (optionnel)
|
|
685
|
-
*/
|
|
686
|
-
warn(message) {
|
|
687
|
-
if (this.spinner) {
|
|
688
|
-
this.spinner.warn(message);
|
|
689
|
-
this.spinner = null;
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Arrête le spinner avec un message d'information
|
|
694
|
-
*
|
|
695
|
-
* @param message - Message d'information (optionnel)
|
|
696
|
-
*/
|
|
697
|
-
info(message) {
|
|
698
|
-
if (this.spinner) {
|
|
699
|
-
this.spinner.info(message);
|
|
700
|
-
this.spinner = null;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
/**
|
|
704
|
-
* Arrête le spinner sans message
|
|
705
|
-
*/
|
|
706
|
-
stop() {
|
|
707
|
-
if (this.spinner) {
|
|
708
|
-
this.spinner.stop();
|
|
709
|
-
this.spinner = null;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Vérifie si un spinner est actif
|
|
714
|
-
*/
|
|
715
|
-
isSpinning() {
|
|
716
|
-
return this.spinner !== null && this.spinner.isSpinning;
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
|
|
720
656
|
// src/cli/ui/report.ts
|
|
721
657
|
import pc from "picocolors";
|
|
722
658
|
function displayInstallationReport(report, plugins, lang) {
|
|
@@ -785,12 +721,12 @@ function displayNextSteps(lang) {
|
|
|
785
721
|
// src/cli/ui/logo.ts
|
|
786
722
|
import pc2 from "picocolors";
|
|
787
723
|
var LOGO = `
|
|
788
|
-
${pc2.cyan("\u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${pc2.cyan("\u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${pc2.cyan("\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\
|
|
789
|
-
${pc2.cyan("\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D")} ${pc2.cyan("\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557")} ${pc2.cyan("\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\
|
|
790
|
-
${pc2.cyan("\u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2551 \u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\
|
|
791
|
-
${pc2.cyan("\u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2551 \u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\
|
|
792
|
-
${pc2.cyan("\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${pc2.cyan("\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D")} ${pc2.cyan("\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\
|
|
793
|
-
${pc2.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u255D")} ${pc2.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u255D")} ${pc2.cyan("\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\
|
|
724
|
+
${pc2.cyan("\u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${pc2.cyan("\u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${pc2.cyan("\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2557")}
|
|
725
|
+
${pc2.cyan("\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D")} ${pc2.cyan("\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557")} ${pc2.cyan("\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2551 \u255A\u2588\u2588\u2551")}
|
|
726
|
+
${pc2.cyan("\u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2551 \u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551")}
|
|
727
|
+
${pc2.cyan("\u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2551 \u2588\u2588\u2551")} ${pc2.cyan("\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551")}
|
|
728
|
+
${pc2.cyan("\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${pc2.cyan("\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D")} ${pc2.cyan("\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D")}
|
|
729
|
+
${pc2.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u255D")} ${pc2.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u255D")} ${pc2.cyan("\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D")}
|
|
794
730
|
|
|
795
731
|
`;
|
|
796
732
|
function displayLogo() {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// src/cli/ui/spinner.ts
|
|
2
|
+
import ora from "ora";
|
|
3
|
+
var SpinnerManager = class {
|
|
4
|
+
spinner = null;
|
|
5
|
+
constructor() {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Démarre un spinner avec un message
|
|
9
|
+
*
|
|
10
|
+
* @param message - Message à afficher (peut être une clé de traduction)
|
|
11
|
+
* @param text - Texte personnalisé (optionnel, remplace le message traduit)
|
|
12
|
+
*/
|
|
13
|
+
start(message, text) {
|
|
14
|
+
this.stop();
|
|
15
|
+
const displayText = text || message;
|
|
16
|
+
this.spinner = ora({
|
|
17
|
+
text: displayText,
|
|
18
|
+
spinner: "dots"
|
|
19
|
+
}).start();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Met à jour le message du spinner
|
|
23
|
+
*
|
|
24
|
+
* @param message - Nouveau message
|
|
25
|
+
*/
|
|
26
|
+
update(message) {
|
|
27
|
+
if (this.spinner) {
|
|
28
|
+
this.spinner.text = message;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Arrête le spinner avec succès
|
|
33
|
+
*
|
|
34
|
+
* @param message - Message de succès (optionnel)
|
|
35
|
+
*/
|
|
36
|
+
succeed(message) {
|
|
37
|
+
if (this.spinner) {
|
|
38
|
+
this.spinner.succeed(message);
|
|
39
|
+
this.spinner = null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Arrête le spinner avec une erreur
|
|
44
|
+
*
|
|
45
|
+
* @param message - Message d'erreur (optionnel)
|
|
46
|
+
*/
|
|
47
|
+
fail(message) {
|
|
48
|
+
if (this.spinner) {
|
|
49
|
+
this.spinner.fail(message);
|
|
50
|
+
this.spinner = null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Arrête le spinner avec un avertissement
|
|
55
|
+
*
|
|
56
|
+
* @param message - Message d'avertissement (optionnel)
|
|
57
|
+
*/
|
|
58
|
+
warn(message) {
|
|
59
|
+
if (this.spinner) {
|
|
60
|
+
this.spinner.warn(message);
|
|
61
|
+
this.spinner = null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Arrête le spinner avec un message d'information
|
|
66
|
+
*
|
|
67
|
+
* @param message - Message d'information (optionnel)
|
|
68
|
+
*/
|
|
69
|
+
info(message) {
|
|
70
|
+
if (this.spinner) {
|
|
71
|
+
this.spinner.info(message);
|
|
72
|
+
this.spinner = null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Arrête le spinner sans message
|
|
77
|
+
*/
|
|
78
|
+
stop() {
|
|
79
|
+
if (this.spinner) {
|
|
80
|
+
this.spinner.stop();
|
|
81
|
+
this.spinner = null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Vérifie si un spinner est actif
|
|
86
|
+
*/
|
|
87
|
+
isSpinning() {
|
|
88
|
+
return this.spinner !== null && this.spinner.isSpinning;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
SpinnerManager
|
|
94
|
+
};
|
|
@@ -137,6 +137,25 @@ var fr = {
|
|
|
137
137
|
invalid: "Le nom du projet ne peut contenir que des lettres, chiffres, tirets et underscores"
|
|
138
138
|
},
|
|
139
139
|
folderExists: (name) => `Le dossier "${name}" existe d\xE9j\xE0. Veuillez choisir un autre nom.`
|
|
140
|
+
},
|
|
141
|
+
angular: {
|
|
142
|
+
noAngularDetected: "\u26A0\uFE0F Aucun projet Angular d\xE9tect\xE9 dans le r\xE9pertoire actuel.",
|
|
143
|
+
proposeSetup: "Souhaitez-vous cr\xE9er un nouveau projet Angular ?",
|
|
144
|
+
projectName: "Nom du projet",
|
|
145
|
+
projectNamePlaceholder: "mon-projet-angular",
|
|
146
|
+
useTypeScript: "Utiliser TypeScript ? (recommand\xE9)",
|
|
147
|
+
creatingProject: "Cr\xE9ation du projet Angular...",
|
|
148
|
+
installingDependencies: "Installation des d\xE9pendances...",
|
|
149
|
+
projectCreated: "Projet Angular cr\xE9\xE9 avec succ\xE8s !",
|
|
150
|
+
creating: "Cr\xE9ation du projet Angular...",
|
|
151
|
+
success: "\u2705 Projet cr\xE9\xE9 avec succ\xE8s !",
|
|
152
|
+
error: "\u274C Erreur lors de la cr\xE9ation du projet",
|
|
153
|
+
changingDirectory: "Changement vers le r\xE9pertoire du projet...",
|
|
154
|
+
validation: {
|
|
155
|
+
empty: "Le nom du projet ne peut pas \xEAtre vide",
|
|
156
|
+
invalid: "Le nom du projet ne peut contenir que des lettres, chiffres, tirets et underscores"
|
|
157
|
+
},
|
|
158
|
+
folderExists: (name) => `Le dossier "${name}" existe d\xE9j\xE0. Veuillez choisir un autre nom.`
|
|
140
159
|
}
|
|
141
160
|
};
|
|
142
161
|
|
|
@@ -279,6 +298,25 @@ var en = {
|
|
|
279
298
|
invalid: "Project name can only contain letters, numbers, dashes and underscores"
|
|
280
299
|
},
|
|
281
300
|
folderExists: (name) => `Folder "${name}" already exists. Please choose another name.`
|
|
301
|
+
},
|
|
302
|
+
angular: {
|
|
303
|
+
noAngularDetected: "\u26A0\uFE0F No Angular project detected in the current directory.",
|
|
304
|
+
proposeSetup: "Would you like to create a new Angular project?",
|
|
305
|
+
projectName: "Project name",
|
|
306
|
+
projectNamePlaceholder: "my-angular-project",
|
|
307
|
+
useTypeScript: "Use TypeScript? (recommended)",
|
|
308
|
+
creatingProject: "Creating Angular project...",
|
|
309
|
+
installingDependencies: "Installing dependencies...",
|
|
310
|
+
projectCreated: "Angular project created successfully!",
|
|
311
|
+
creating: "Creating Angular project...",
|
|
312
|
+
success: "\u2705 Project created successfully!",
|
|
313
|
+
error: "\u274C Error creating project",
|
|
314
|
+
changingDirectory: "Changing to project directory...",
|
|
315
|
+
validation: {
|
|
316
|
+
empty: "Project name cannot be empty",
|
|
317
|
+
invalid: "Project name can only contain letters, numbers, dashes and underscores"
|
|
318
|
+
},
|
|
319
|
+
folderExists: (name) => `Folder "${name}" already exists. Please choose another name.`
|
|
282
320
|
}
|
|
283
321
|
};
|
|
284
322
|
|
|
@@ -421,6 +459,25 @@ var es = {
|
|
|
421
459
|
invalid: "El nombre del proyecto solo puede contener letras, n\xFAmeros, guiones y guiones bajos"
|
|
422
460
|
},
|
|
423
461
|
folderExists: (name) => `La carpeta "${name}" ya existe. Por favor, elija otro nombre.`
|
|
462
|
+
},
|
|
463
|
+
angular: {
|
|
464
|
+
noAngularDetected: "\u26A0\uFE0F No se detect\xF3 ning\xFAn proyecto Angular en el directorio actual.",
|
|
465
|
+
proposeSetup: "\xBFDesea crear un nuevo proyecto Angular?",
|
|
466
|
+
projectName: "Nombre del proyecto",
|
|
467
|
+
projectNamePlaceholder: "mi-proyecto-angular",
|
|
468
|
+
useTypeScript: "\xBFUsar TypeScript? (recomendado)",
|
|
469
|
+
creatingProject: "Creando proyecto Angular...",
|
|
470
|
+
installingDependencies: "Instalando dependencias...",
|
|
471
|
+
projectCreated: "\xA1Proyecto Angular creado con \xE9xito!",
|
|
472
|
+
creating: "Creando proyecto Angular...",
|
|
473
|
+
success: "\u2705 \xA1Proyecto creado con \xE9xito!",
|
|
474
|
+
error: "\u274C Error al crear el proyecto",
|
|
475
|
+
changingDirectory: "Cambiando al directorio del proyecto...",
|
|
476
|
+
validation: {
|
|
477
|
+
empty: "El nombre del proyecto no puede estar vac\xEDo",
|
|
478
|
+
invalid: "El nombre del proyecto solo puede contener letras, n\xFAmeros, guiones y guiones bajos"
|
|
479
|
+
},
|
|
480
|
+
folderExists: (name) => `La carpeta "${name}" ya existe. Por favor, elija otro nombre.`
|
|
424
481
|
}
|
|
425
482
|
};
|
|
426
483
|
|
|
@@ -218,6 +218,12 @@ function detectFramework(pkg) {
|
|
|
218
218
|
version: deps["next"].replace(/[\^~]/, "")
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
+
if (deps["@angular/core"]) {
|
|
222
|
+
return {
|
|
223
|
+
framework: "angular",
|
|
224
|
+
version: deps["@angular/core"].replace(/[\^~]/, "")
|
|
225
|
+
};
|
|
226
|
+
}
|
|
221
227
|
if (deps["react"]) {
|
|
222
228
|
return {
|
|
223
229
|
framework: "react",
|
|
@@ -245,7 +251,7 @@ function detectFramework(pkg) {
|
|
|
245
251
|
};
|
|
246
252
|
}
|
|
247
253
|
throw new DetectionError(
|
|
248
|
-
"No supported framework detected. Supported frameworks: Next.js, React, Vue, Svelte",
|
|
254
|
+
"No supported framework detected. Supported frameworks: Angular, Next.js, React, Vue, Svelte",
|
|
249
255
|
{ dependencies: Object.keys(deps) }
|
|
250
256
|
);
|
|
251
257
|
}
|
|
@@ -266,6 +272,19 @@ async function detectBundler(projectRoot, pkg, fsAdapter) {
|
|
|
266
272
|
};
|
|
267
273
|
}
|
|
268
274
|
}
|
|
275
|
+
if (deps["@angular/core"]) {
|
|
276
|
+
const angularJsonExists = await checkPathExists(
|
|
277
|
+
join2(projectRoot, "angular.json"),
|
|
278
|
+
fsAdapter
|
|
279
|
+
);
|
|
280
|
+
if (angularJsonExists) {
|
|
281
|
+
return {
|
|
282
|
+
bundler: "webpack",
|
|
283
|
+
// Angular CLI utilise Webpack par défaut
|
|
284
|
+
version: deps["@angular/core"].replace(/[\^~]/, "")
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}
|
|
269
288
|
if (deps["vite"]) {
|
|
270
289
|
const viteConfigExists = await checkPathExists(join2(projectRoot, "vite.config.js"), fsAdapter) || await checkPathExists(join2(projectRoot, "vite.config.ts"), fsAdapter) || await checkPathExists(
|
|
271
290
|
join2(projectRoot, "vite.config.mjs"),
|
|
@@ -13324,8 +13324,272 @@ export function useExample() {
|
|
|
13324
13324
|
`;
|
|
13325
13325
|
}
|
|
13326
13326
|
|
|
13327
|
-
// src/plugins/
|
|
13327
|
+
// src/plugins/routing/angular-router.ts
|
|
13328
13328
|
var logger49 = getModuleLogger();
|
|
13329
|
+
var angularRouterPlugin = {
|
|
13330
|
+
name: "@angular/router",
|
|
13331
|
+
displayName: "Angular Router",
|
|
13332
|
+
description: "Routing d\xE9claratif pour Angular",
|
|
13333
|
+
category: "routing" /* ROUTING */,
|
|
13334
|
+
version: "^18.0.0",
|
|
13335
|
+
frameworks: ["angular"],
|
|
13336
|
+
requiresTypeScript: true,
|
|
13337
|
+
detect: (ctx) => {
|
|
13338
|
+
return ctx.dependencies["@angular/router"] !== void 0;
|
|
13339
|
+
},
|
|
13340
|
+
async install(ctx) {
|
|
13341
|
+
if (this.detect?.(ctx)) {
|
|
13342
|
+
logger49.info("Angular Router is already installed");
|
|
13343
|
+
return {
|
|
13344
|
+
packages: {},
|
|
13345
|
+
success: true,
|
|
13346
|
+
message: "Angular Router already installed"
|
|
13347
|
+
};
|
|
13348
|
+
}
|
|
13349
|
+
const packages = ["@angular/router@^18.0.0"];
|
|
13350
|
+
try {
|
|
13351
|
+
await installPackages(packages, {
|
|
13352
|
+
dev: false,
|
|
13353
|
+
packageManager: ctx.packageManager,
|
|
13354
|
+
projectRoot: ctx.projectRoot
|
|
13355
|
+
});
|
|
13356
|
+
return {
|
|
13357
|
+
packages: { dependencies: packages },
|
|
13358
|
+
success: true
|
|
13359
|
+
};
|
|
13360
|
+
} catch (error) {
|
|
13361
|
+
logger49.error("Failed to install Angular Router", error);
|
|
13362
|
+
return {
|
|
13363
|
+
packages: {},
|
|
13364
|
+
success: false,
|
|
13365
|
+
message: `Error installing Angular Router: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
13366
|
+
};
|
|
13367
|
+
}
|
|
13368
|
+
},
|
|
13369
|
+
configure() {
|
|
13370
|
+
return Promise.resolve({
|
|
13371
|
+
files: [],
|
|
13372
|
+
success: true
|
|
13373
|
+
});
|
|
13374
|
+
}
|
|
13375
|
+
};
|
|
13376
|
+
|
|
13377
|
+
// src/plugins/state/ngrx.ts
|
|
13378
|
+
var logger50 = getModuleLogger();
|
|
13379
|
+
var ngrxPlugin = {
|
|
13380
|
+
name: "@ngrx/store",
|
|
13381
|
+
displayName: "NgRx",
|
|
13382
|
+
description: "State management (Redux-like) pour Angular",
|
|
13383
|
+
category: "state" /* STATE */,
|
|
13384
|
+
version: "^17.0.0",
|
|
13385
|
+
frameworks: ["angular"],
|
|
13386
|
+
incompatibleWith: ["akita"],
|
|
13387
|
+
requiresTypeScript: true,
|
|
13388
|
+
detect: (ctx) => {
|
|
13389
|
+
return ctx.dependencies["@ngrx/store"] !== void 0;
|
|
13390
|
+
},
|
|
13391
|
+
async install(ctx) {
|
|
13392
|
+
if (this.detect?.(ctx)) {
|
|
13393
|
+
logger50.info("NgRx is already installed");
|
|
13394
|
+
return {
|
|
13395
|
+
packages: {},
|
|
13396
|
+
success: true,
|
|
13397
|
+
message: "NgRx already installed"
|
|
13398
|
+
};
|
|
13399
|
+
}
|
|
13400
|
+
const packages = [
|
|
13401
|
+
"@ngrx/store@^17.0.0",
|
|
13402
|
+
"@ngrx/effects@^17.0.0",
|
|
13403
|
+
"@ngrx/store-devtools@^17.0.0"
|
|
13404
|
+
];
|
|
13405
|
+
try {
|
|
13406
|
+
await installPackages(packages, {
|
|
13407
|
+
dev: false,
|
|
13408
|
+
packageManager: ctx.packageManager,
|
|
13409
|
+
projectRoot: ctx.projectRoot
|
|
13410
|
+
});
|
|
13411
|
+
return {
|
|
13412
|
+
packages: { dependencies: packages },
|
|
13413
|
+
success: true
|
|
13414
|
+
};
|
|
13415
|
+
} catch (error) {
|
|
13416
|
+
logger50.error("Failed to install NgRx", error);
|
|
13417
|
+
return {
|
|
13418
|
+
packages: {},
|
|
13419
|
+
success: false,
|
|
13420
|
+
message: `Error installing NgRx: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
13421
|
+
};
|
|
13422
|
+
}
|
|
13423
|
+
},
|
|
13424
|
+
configure() {
|
|
13425
|
+
return Promise.resolve({
|
|
13426
|
+
files: [],
|
|
13427
|
+
success: true
|
|
13428
|
+
});
|
|
13429
|
+
}
|
|
13430
|
+
};
|
|
13431
|
+
|
|
13432
|
+
// src/plugins/ui/angular-material.ts
|
|
13433
|
+
var logger51 = getModuleLogger();
|
|
13434
|
+
var angularMaterialPlugin = {
|
|
13435
|
+
name: "@angular/material",
|
|
13436
|
+
displayName: "Angular Material",
|
|
13437
|
+
description: "Composants UI Material Design pour Angular",
|
|
13438
|
+
category: "ui" /* UI */,
|
|
13439
|
+
version: "^18.0.0",
|
|
13440
|
+
frameworks: ["angular"],
|
|
13441
|
+
requiresTypeScript: true,
|
|
13442
|
+
detect: (ctx) => {
|
|
13443
|
+
return ctx.dependencies["@angular/material"] !== void 0;
|
|
13444
|
+
},
|
|
13445
|
+
async install(ctx) {
|
|
13446
|
+
if (this.detect?.(ctx)) {
|
|
13447
|
+
logger51.info("Angular Material is already installed");
|
|
13448
|
+
return {
|
|
13449
|
+
packages: {},
|
|
13450
|
+
success: true,
|
|
13451
|
+
message: "Angular Material already installed"
|
|
13452
|
+
};
|
|
13453
|
+
}
|
|
13454
|
+
const packages = [
|
|
13455
|
+
"@angular/material@^18.0.0",
|
|
13456
|
+
"@angular/cdk@^18.0.0"
|
|
13457
|
+
];
|
|
13458
|
+
try {
|
|
13459
|
+
await installPackages(packages, {
|
|
13460
|
+
dev: false,
|
|
13461
|
+
packageManager: ctx.packageManager,
|
|
13462
|
+
projectRoot: ctx.projectRoot
|
|
13463
|
+
});
|
|
13464
|
+
return {
|
|
13465
|
+
packages: { dependencies: packages },
|
|
13466
|
+
success: true
|
|
13467
|
+
};
|
|
13468
|
+
} catch (error) {
|
|
13469
|
+
logger51.error("Failed to install Angular Material", error);
|
|
13470
|
+
return {
|
|
13471
|
+
packages: {},
|
|
13472
|
+
success: false,
|
|
13473
|
+
message: `Error installing Angular Material: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
13474
|
+
};
|
|
13475
|
+
}
|
|
13476
|
+
},
|
|
13477
|
+
configure() {
|
|
13478
|
+
return Promise.resolve({
|
|
13479
|
+
files: [],
|
|
13480
|
+
success: true
|
|
13481
|
+
});
|
|
13482
|
+
}
|
|
13483
|
+
};
|
|
13484
|
+
|
|
13485
|
+
// src/plugins/testing/jasmine-karma.ts
|
|
13486
|
+
var logger52 = getModuleLogger();
|
|
13487
|
+
var jasmineKarmaPlugin = {
|
|
13488
|
+
name: "@angular/core:testing",
|
|
13489
|
+
displayName: "Jasmine & Karma",
|
|
13490
|
+
description: "Framework de test pour Angular",
|
|
13491
|
+
category: "testing" /* TESTING */,
|
|
13492
|
+
version: "^18.0.0",
|
|
13493
|
+
frameworks: ["angular"],
|
|
13494
|
+
requiresTypeScript: true,
|
|
13495
|
+
detect: (ctx) => {
|
|
13496
|
+
return ctx.devDependencies["jasmine-core"] !== void 0 && ctx.devDependencies["karma"] !== void 0;
|
|
13497
|
+
},
|
|
13498
|
+
async install(ctx) {
|
|
13499
|
+
if (this.detect?.(ctx)) {
|
|
13500
|
+
logger52.info("Jasmine & Karma are already installed");
|
|
13501
|
+
return {
|
|
13502
|
+
packages: {},
|
|
13503
|
+
success: true,
|
|
13504
|
+
message: "Jasmine & Karma already installed"
|
|
13505
|
+
};
|
|
13506
|
+
}
|
|
13507
|
+
const packages = [
|
|
13508
|
+
"jasmine-core@^5.0.0",
|
|
13509
|
+
"karma@^6.4.0",
|
|
13510
|
+
"karma-jasmine@^5.1.0",
|
|
13511
|
+
"karma-chrome-launcher@^3.2.0",
|
|
13512
|
+
"@angular/platform-browser-dynamic@^18.0.0"
|
|
13513
|
+
];
|
|
13514
|
+
try {
|
|
13515
|
+
await installPackages(packages, {
|
|
13516
|
+
dev: true,
|
|
13517
|
+
packageManager: ctx.packageManager,
|
|
13518
|
+
projectRoot: ctx.projectRoot
|
|
13519
|
+
});
|
|
13520
|
+
return {
|
|
13521
|
+
packages: { devDependencies: packages },
|
|
13522
|
+
success: true
|
|
13523
|
+
};
|
|
13524
|
+
} catch (error) {
|
|
13525
|
+
logger52.error("Failed to install Jasmine & Karma", error);
|
|
13526
|
+
return {
|
|
13527
|
+
packages: {},
|
|
13528
|
+
success: false,
|
|
13529
|
+
message: `Error installing Jasmine & Karma: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
13530
|
+
};
|
|
13531
|
+
}
|
|
13532
|
+
},
|
|
13533
|
+
configure() {
|
|
13534
|
+
return Promise.resolve({
|
|
13535
|
+
files: [],
|
|
13536
|
+
success: true
|
|
13537
|
+
});
|
|
13538
|
+
}
|
|
13539
|
+
};
|
|
13540
|
+
|
|
13541
|
+
// src/plugins/utils/rxjs.ts
|
|
13542
|
+
var logger53 = getModuleLogger();
|
|
13543
|
+
var rxjsPlugin = {
|
|
13544
|
+
name: "rxjs",
|
|
13545
|
+
displayName: "RxJS",
|
|
13546
|
+
description: "Reactive Extensions pour JavaScript/Angular",
|
|
13547
|
+
category: "utils" /* UTILS */,
|
|
13548
|
+
version: "^7.8.0",
|
|
13549
|
+
frameworks: ["angular"],
|
|
13550
|
+
requiresTypeScript: false,
|
|
13551
|
+
detect: (ctx) => {
|
|
13552
|
+
return ctx.dependencies["rxjs"] !== void 0;
|
|
13553
|
+
},
|
|
13554
|
+
async install(ctx) {
|
|
13555
|
+
if (this.detect?.(ctx)) {
|
|
13556
|
+
logger53.info("RxJS is already installed");
|
|
13557
|
+
return {
|
|
13558
|
+
packages: {},
|
|
13559
|
+
success: true,
|
|
13560
|
+
message: "RxJS already installed"
|
|
13561
|
+
};
|
|
13562
|
+
}
|
|
13563
|
+
const packages = ["rxjs@^7.8.0"];
|
|
13564
|
+
try {
|
|
13565
|
+
await installPackages(packages, {
|
|
13566
|
+
dev: false,
|
|
13567
|
+
packageManager: ctx.packageManager,
|
|
13568
|
+
projectRoot: ctx.projectRoot
|
|
13569
|
+
});
|
|
13570
|
+
return {
|
|
13571
|
+
packages: { dependencies: packages },
|
|
13572
|
+
success: true
|
|
13573
|
+
};
|
|
13574
|
+
} catch (error) {
|
|
13575
|
+
logger53.error("Failed to install RxJS", error);
|
|
13576
|
+
return {
|
|
13577
|
+
packages: {},
|
|
13578
|
+
success: false,
|
|
13579
|
+
message: `Error installing RxJS: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
13580
|
+
};
|
|
13581
|
+
}
|
|
13582
|
+
},
|
|
13583
|
+
configure() {
|
|
13584
|
+
return Promise.resolve({
|
|
13585
|
+
files: [],
|
|
13586
|
+
success: true
|
|
13587
|
+
});
|
|
13588
|
+
}
|
|
13589
|
+
};
|
|
13590
|
+
|
|
13591
|
+
// src/plugins/registry.ts
|
|
13592
|
+
var logger54 = getModuleLogger();
|
|
13329
13593
|
var pluginRegistry = [
|
|
13330
13594
|
// ANIMATION
|
|
13331
13595
|
framerMotionPlugin,
|
|
@@ -13355,16 +13619,19 @@ var pluginRegistry = [
|
|
|
13355
13619
|
tanstackRouterPlugin,
|
|
13356
13620
|
vueRouterPlugin,
|
|
13357
13621
|
svelteKitPlugin,
|
|
13622
|
+
angularRouterPlugin,
|
|
13358
13623
|
// STATE
|
|
13359
13624
|
jotaiPlugin,
|
|
13360
13625
|
piniaPlugin,
|
|
13361
13626
|
reduxToolkitPlugin,
|
|
13362
13627
|
zustandPlugin,
|
|
13628
|
+
ngrxPlugin,
|
|
13363
13629
|
// TESTING
|
|
13364
13630
|
reactTestingLibraryPlugin,
|
|
13365
13631
|
vueTestingLibraryPlugin,
|
|
13366
13632
|
vueTestUtilsPlugin,
|
|
13367
13633
|
svelteTestingLibraryPlugin,
|
|
13634
|
+
jasmineKarmaPlugin,
|
|
13368
13635
|
// TOOLING
|
|
13369
13636
|
eslintPlugin,
|
|
13370
13637
|
eslintVuePlugin,
|
|
@@ -13384,9 +13651,11 @@ var pluginRegistry = [
|
|
|
13384
13651
|
shadcnUiNextjsPlugin,
|
|
13385
13652
|
vuetifyPlugin,
|
|
13386
13653
|
skeletonUiPlugin,
|
|
13654
|
+
angularMaterialPlugin,
|
|
13387
13655
|
// UTILS
|
|
13388
13656
|
dateFnsPlugin,
|
|
13389
|
-
vueusePlugin
|
|
13657
|
+
vueusePlugin,
|
|
13658
|
+
rxjsPlugin
|
|
13390
13659
|
];
|
|
13391
13660
|
function validatePlugin(plugin) {
|
|
13392
13661
|
const requiredFields = [
|
|
@@ -13399,14 +13668,14 @@ function validatePlugin(plugin) {
|
|
|
13399
13668
|
];
|
|
13400
13669
|
for (const field of requiredFields) {
|
|
13401
13670
|
if (!(field in plugin) || plugin[field] === void 0) {
|
|
13402
|
-
|
|
13671
|
+
logger54.error(`Plugin validation failed: missing field '${field}'`, {
|
|
13403
13672
|
plugin: plugin.name
|
|
13404
13673
|
});
|
|
13405
13674
|
return false;
|
|
13406
13675
|
}
|
|
13407
13676
|
}
|
|
13408
13677
|
if (!Object.values(Category).includes(plugin.category)) {
|
|
13409
|
-
|
|
13678
|
+
logger54.error(
|
|
13410
13679
|
`Plugin validation failed: invalid category '${plugin.category}'`,
|
|
13411
13680
|
{
|
|
13412
13681
|
plugin: plugin.name
|
|
@@ -13415,7 +13684,7 @@ function validatePlugin(plugin) {
|
|
|
13415
13684
|
return false;
|
|
13416
13685
|
}
|
|
13417
13686
|
if (!Array.isArray(plugin.frameworks) || plugin.frameworks.length === 0) {
|
|
13418
|
-
|
|
13687
|
+
logger54.error(
|
|
13419
13688
|
`Plugin validation failed: 'frameworks' must be a non-empty array`,
|
|
13420
13689
|
{
|
|
13421
13690
|
plugin: plugin.name
|
|
@@ -13424,13 +13693,13 @@ function validatePlugin(plugin) {
|
|
|
13424
13693
|
return false;
|
|
13425
13694
|
}
|
|
13426
13695
|
if (typeof plugin.install !== "function") {
|
|
13427
|
-
|
|
13696
|
+
logger54.error(`Plugin validation failed: 'install' must be a function`, {
|
|
13428
13697
|
plugin: plugin.name
|
|
13429
13698
|
});
|
|
13430
13699
|
return false;
|
|
13431
13700
|
}
|
|
13432
13701
|
if (typeof plugin.configure !== "function") {
|
|
13433
|
-
|
|
13702
|
+
logger54.error(`Plugin validation failed: 'configure' must be a function`, {
|
|
13434
13703
|
plugin: plugin.name
|
|
13435
13704
|
});
|
|
13436
13705
|
return false;
|
|
@@ -13448,7 +13717,7 @@ function validateRegistry(plugins) {
|
|
|
13448
13717
|
}
|
|
13449
13718
|
}
|
|
13450
13719
|
if (invalidPlugins.length > 0) {
|
|
13451
|
-
|
|
13720
|
+
logger54.warn(`Some plugins failed validation and were excluded:`, {
|
|
13452
13721
|
invalidPlugins,
|
|
13453
13722
|
total: plugins.length,
|
|
13454
13723
|
valid: validPlugins.length
|
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import "./chunk-QGM4M3NI.js";
|
|
|
8
8
|
import { Command } from "commander";
|
|
9
9
|
|
|
10
10
|
// package.json
|
|
11
|
-
var version = "1.1.
|
|
11
|
+
var version = "1.1.13";
|
|
12
12
|
|
|
13
13
|
// src/cli.ts
|
|
14
14
|
initializeCLILogging();
|
|
@@ -17,7 +17,7 @@ program.name("confjs").description("Configure your frontend stack, instantly").v
|
|
|
17
17
|
program.command("react").description("Configure a React project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
18
18
|
async (options) => {
|
|
19
19
|
try {
|
|
20
|
-
const { ReactCommand } = await import("./react-command-
|
|
20
|
+
const { ReactCommand } = await import("./react-command-XF7Q4GB6.js");
|
|
21
21
|
const command = new ReactCommand();
|
|
22
22
|
await command.execute(options);
|
|
23
23
|
} catch (error) {
|
|
@@ -29,7 +29,7 @@ program.command("react").description("Configure a React project").option("-y, --
|
|
|
29
29
|
program.command("nextjs").description("Configure a Next.js project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
30
30
|
async (options) => {
|
|
31
31
|
try {
|
|
32
|
-
const { NextjsCommand } = await import("./nextjs-command-
|
|
32
|
+
const { NextjsCommand } = await import("./nextjs-command-6PIQOGKC.js");
|
|
33
33
|
const command = new NextjsCommand();
|
|
34
34
|
await command.execute(options);
|
|
35
35
|
} catch (error) {
|
|
@@ -41,7 +41,7 @@ program.command("nextjs").description("Configure a Next.js project").option("-y,
|
|
|
41
41
|
program.command("vue").description("Configure a Vue.js project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
42
42
|
async (options) => {
|
|
43
43
|
try {
|
|
44
|
-
const { VueCommand } = await import("./vue-command-
|
|
44
|
+
const { VueCommand } = await import("./vue-command-UGN3RDDJ.js");
|
|
45
45
|
const command = new VueCommand();
|
|
46
46
|
await command.execute(options);
|
|
47
47
|
} catch (error) {
|
|
@@ -53,7 +53,7 @@ program.command("vue").description("Configure a Vue.js project").option("-y, --y
|
|
|
53
53
|
program.command("svelte").description("Configure a Svelte project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
54
54
|
async (options) => {
|
|
55
55
|
try {
|
|
56
|
-
const { SvelteCommand } = await import("./svelte-command-
|
|
56
|
+
const { SvelteCommand } = await import("./svelte-command-AJPAGQES.js");
|
|
57
57
|
const command = new SvelteCommand();
|
|
58
58
|
await command.execute(options);
|
|
59
59
|
} catch (error) {
|
|
@@ -62,9 +62,21 @@ program.command("svelte").description("Configure a Svelte project").option("-y,
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
+
program.command("angular").description("Configure an Angular project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
66
|
+
async (options) => {
|
|
67
|
+
try {
|
|
68
|
+
const { AngularCommand } = await import("./angular-command-KX7WHQV4.js");
|
|
69
|
+
const command = new AngularCommand();
|
|
70
|
+
await command.execute(options);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.error("Error:", error);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
);
|
|
65
77
|
program.command("list").description("List available libraries").option("-c, --category <category>", "Filter by category").action(async (options) => {
|
|
66
78
|
try {
|
|
67
|
-
const { listLibraries } = await import("./list-
|
|
79
|
+
const { listLibraries } = await import("./list-AWADTBUA.js");
|
|
68
80
|
listLibraries(options);
|
|
69
81
|
} catch (error) {
|
|
70
82
|
console.error("Error:", error);
|
|
@@ -73,7 +85,7 @@ program.command("list").description("List available libraries").option("-c, --ca
|
|
|
73
85
|
});
|
|
74
86
|
program.command("check").description("Check compatibility without installing").option("-c, --config <file>", "Configuration file to check").action(async (options) => {
|
|
75
87
|
try {
|
|
76
|
-
const { checkCompatibility } = await import("./check-
|
|
88
|
+
const { checkCompatibility } = await import("./check-XXBOQU2U.js");
|
|
77
89
|
await checkCompatibility(options);
|
|
78
90
|
} catch (error) {
|
|
79
91
|
console.error("Error:", error);
|
|
@@ -82,7 +94,7 @@ program.command("check").description("Check compatibility without installing").o
|
|
|
82
94
|
});
|
|
83
95
|
program.command("installed").description("List installed plugins").action(async () => {
|
|
84
96
|
try {
|
|
85
|
-
const { installedCommand } = await import("./installed-
|
|
97
|
+
const { installedCommand } = await import("./installed-D6CUYQM5.js");
|
|
86
98
|
await installedCommand();
|
|
87
99
|
} catch (error) {
|
|
88
100
|
console.error("Error:", error);
|
|
@@ -91,7 +103,7 @@ program.command("installed").description("List installed plugins").action(async
|
|
|
91
103
|
});
|
|
92
104
|
program.command("remove <plugin>").description("Remove an installed plugin").action(async (plugin) => {
|
|
93
105
|
try {
|
|
94
|
-
const { removeCommand } = await import("./remove-
|
|
106
|
+
const { removeCommand } = await import("./remove-ZY3MLPGN.js");
|
|
95
107
|
await removeCommand(plugin);
|
|
96
108
|
} catch (error) {
|
|
97
109
|
console.error("Error:", error);
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseFrameworkCommand,
|
|
3
3
|
getFrameworkMetadata
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5ZZ56QH7.js";
|
|
5
|
+
import "./chunk-HSLMPJN4.js";
|
|
6
|
+
import "./chunk-XJN5434Q.js";
|
|
7
7
|
import {
|
|
8
8
|
DetectionError,
|
|
9
9
|
detectContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UKEHW2LH.js";
|
|
11
11
|
import "./chunk-6GV4NKUX.js";
|
|
12
|
+
import "./chunk-KAMPBTFG.js";
|
|
12
13
|
import "./chunk-FIB2J36N.js";
|
|
13
14
|
import "./chunk-QPEUT7QG.js";
|
|
14
15
|
import {
|
|
15
16
|
getTranslations
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L4GX22RG.js";
|
|
17
18
|
import "./chunk-QGM4M3NI.js";
|
|
18
19
|
|
|
19
20
|
// src/cli/commands/nextjs-command.ts
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseFrameworkCommand,
|
|
3
3
|
getFrameworkMetadata
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5ZZ56QH7.js";
|
|
5
|
+
import "./chunk-HSLMPJN4.js";
|
|
6
|
+
import "./chunk-XJN5434Q.js";
|
|
7
7
|
import {
|
|
8
8
|
DetectionError,
|
|
9
9
|
detectContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UKEHW2LH.js";
|
|
11
11
|
import "./chunk-6GV4NKUX.js";
|
|
12
|
+
import "./chunk-KAMPBTFG.js";
|
|
12
13
|
import "./chunk-FIB2J36N.js";
|
|
13
14
|
import "./chunk-QPEUT7QG.js";
|
|
14
15
|
import {
|
|
15
16
|
getTranslations
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L4GX22RG.js";
|
|
17
18
|
import "./chunk-QGM4M3NI.js";
|
|
18
19
|
|
|
19
20
|
// src/cli/commands/react-command.ts
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseFrameworkCommand,
|
|
3
3
|
getFrameworkMetadata
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5ZZ56QH7.js";
|
|
5
|
+
import "./chunk-HSLMPJN4.js";
|
|
6
|
+
import "./chunk-XJN5434Q.js";
|
|
7
7
|
import {
|
|
8
8
|
DetectionError,
|
|
9
9
|
detectContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UKEHW2LH.js";
|
|
11
11
|
import "./chunk-6GV4NKUX.js";
|
|
12
|
+
import "./chunk-KAMPBTFG.js";
|
|
12
13
|
import "./chunk-FIB2J36N.js";
|
|
13
14
|
import "./chunk-QPEUT7QG.js";
|
|
14
15
|
import {
|
|
15
16
|
getTranslations
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L4GX22RG.js";
|
|
17
18
|
import "./chunk-QGM4M3NI.js";
|
|
18
19
|
|
|
19
20
|
// src/cli/commands/svelte-command.ts
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseFrameworkCommand,
|
|
3
3
|
getFrameworkMetadata
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5ZZ56QH7.js";
|
|
5
|
+
import "./chunk-HSLMPJN4.js";
|
|
6
|
+
import "./chunk-XJN5434Q.js";
|
|
7
7
|
import {
|
|
8
8
|
DetectionError,
|
|
9
9
|
detectContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UKEHW2LH.js";
|
|
11
11
|
import "./chunk-6GV4NKUX.js";
|
|
12
|
+
import "./chunk-KAMPBTFG.js";
|
|
12
13
|
import "./chunk-FIB2J36N.js";
|
|
13
14
|
import "./chunk-QPEUT7QG.js";
|
|
14
15
|
import {
|
|
15
16
|
getTranslations
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L4GX22RG.js";
|
|
17
18
|
import "./chunk-QGM4M3NI.js";
|
|
18
19
|
|
|
19
20
|
// src/cli/commands/vue-command.ts
|
package/package.json
CHANGED