@iconsulting-dev/forgekit 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +203 -0
- package/dist/commands/new.d.ts +3 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +120 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -0
- package/dist/generators/backend/index.d.ts +4 -0
- package/dist/generators/backend/index.d.ts.map +1 -0
- package/dist/generators/backend/index.js +69 -0
- package/dist/generators/backend/index.js.map +1 -0
- package/dist/generators/base-generator.d.ts +9 -0
- package/dist/generators/base-generator.d.ts.map +1 -0
- package/dist/generators/base-generator.js +13 -0
- package/dist/generators/base-generator.js.map +1 -0
- package/dist/generators/ci/index.d.ts +3 -0
- package/dist/generators/ci/index.d.ts.map +1 -0
- package/dist/generators/ci/index.js +18 -0
- package/dist/generators/ci/index.js.map +1 -0
- package/dist/generators/claude-code/index.d.ts +4 -0
- package/dist/generators/claude-code/index.d.ts.map +1 -0
- package/dist/generators/claude-code/index.js +47 -0
- package/dist/generators/claude-code/index.js.map +1 -0
- package/dist/generators/docker/index.d.ts +3 -0
- package/dist/generators/docker/index.d.ts.map +1 -0
- package/dist/generators/docker/index.js +14 -0
- package/dist/generators/docker/index.js.map +1 -0
- package/dist/generators/frontend/index.d.ts +4 -0
- package/dist/generators/frontend/index.d.ts.map +1 -0
- package/dist/generators/frontend/index.js +60 -0
- package/dist/generators/frontend/index.js.map +1 -0
- package/dist/generators/git.d.ts +2 -0
- package/dist/generators/git.d.ts.map +1 -0
- package/dist/generators/git.js +16 -0
- package/dist/generators/git.js.map +1 -0
- package/dist/generators/root/index.d.ts +4 -0
- package/dist/generators/root/index.d.ts.map +1 -0
- package/dist/generators/root/index.js +29 -0
- package/dist/generators/root/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/project.d.ts +3 -0
- package/dist/prompts/project.d.ts.map +1 -0
- package/dist/prompts/project.js +70 -0
- package/dist/prompts/project.js.map +1 -0
- package/dist/templates/backend/ApiError.java.hbs +4 -0
- package/dist/templates/backend/Application.java.hbs +12 -0
- package/dist/templates/backend/ApplicationTests.java.hbs +12 -0
- package/dist/templates/backend/GlobalExceptionHandler.java.hbs +27 -0
- package/dist/templates/backend/OpenApiConfig.java.hbs +19 -0
- package/dist/templates/backend/PageResponse.java.hbs +12 -0
- package/dist/templates/backend/SecurityConfig.java.hbs +43 -0
- package/dist/templates/backend/application-dev.yml.hbs +7 -0
- package/dist/templates/backend/application.yml.hbs +37 -0
- package/dist/templates/backend/gitignore.hbs +16 -0
- package/dist/templates/backend/maven-wrapper.properties.hbs +2 -0
- package/dist/templates/backend/mvnw.cmd.hbs +4 -0
- package/dist/templates/backend/mvnw.hbs +17 -0
- package/dist/templates/backend/pom.xml.hbs +136 -0
- package/dist/templates/ci/ci.yml.hbs +87 -0
- package/dist/templates/claude-code/CLAUDE.md.hbs +79 -0
- package/dist/templates/claude-code/settings.json.hbs +9 -0
- package/dist/templates/docker/docker-compose.yml.hbs +34 -0
- package/dist/templates/frontend/angular.json.hbs +71 -0
- package/dist/templates/frontend/app.component.ts.hbs +11 -0
- package/dist/templates/frontend/app.config.ts.hbs +16 -0
- package/dist/templates/frontend/app.routes.ts.hbs +14 -0
- package/dist/templates/frontend/auth.guard.ts.hbs +14 -0
- package/dist/templates/frontend/auth.interceptor.ts.hbs +13 -0
- package/dist/templates/frontend/auth.service.ts.hbs +18 -0
- package/dist/templates/frontend/environment.development.ts.hbs +4 -0
- package/dist/templates/frontend/environment.ts.hbs +4 -0
- package/dist/templates/frontend/error.interceptor.ts.hbs +14 -0
- package/dist/templates/frontend/gitignore.hbs +4 -0
- package/dist/templates/frontend/index.html.hbs +13 -0
- package/dist/templates/frontend/layout.component.ts.hbs +42 -0
- package/dist/templates/frontend/main.ts.hbs +6 -0
- package/dist/templates/frontend/package.json.hbs +35 -0
- package/dist/templates/frontend/sidebar.component.ts.hbs +58 -0
- package/dist/templates/frontend/styles.scss.hbs +8 -0
- package/dist/templates/frontend/topbar.component.ts.hbs +59 -0
- package/dist/templates/frontend/tsconfig.app.json.hbs +13 -0
- package/dist/templates/frontend/tsconfig.json.hbs +24 -0
- package/dist/templates/root/README.md.hbs +37 -0
- package/dist/templates/root/gitignore.hbs +12 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/__tests__/validation.test.d.ts +2 -0
- package/dist/utils/__tests__/validation.test.d.ts.map +1 -0
- package/dist/utils/__tests__/validation.test.js +59 -0
- package/dist/utils/__tests__/validation.test.js.map +1 -0
- package/dist/utils/template-engine.d.ts +5 -0
- package/dist/utils/template-engine.d.ts.map +1 -0
- package/dist/utils/template-engine.js +23 -0
- package/dist/utils/template-engine.js.map +1 -0
- package/dist/utils/validation.d.ts +3 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +19 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/versions.d.ts +18 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +91 -0
- package/dist/versions.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { renderAndWrite } from "../../utils/template-engine.js";
|
|
3
|
+
import { BaseGenerator } from "../base-generator.js";
|
|
4
|
+
class FrontendGenerator extends BaseGenerator {
|
|
5
|
+
versions;
|
|
6
|
+
projectName;
|
|
7
|
+
constructor(projectDir, config, versions) {
|
|
8
|
+
super(projectDir, config);
|
|
9
|
+
this.versions = versions;
|
|
10
|
+
this.projectName = config.name.toLowerCase().replace(/[^a-z0-9]/g, "-");
|
|
11
|
+
}
|
|
12
|
+
async generate() {
|
|
13
|
+
const frontendDir = path.join(this.projectDir, "frontend");
|
|
14
|
+
const srcDir = path.join(frontendDir, "src");
|
|
15
|
+
const appDir = path.join(srcDir, "app");
|
|
16
|
+
await this.ensureDirs([
|
|
17
|
+
path.join(appDir, "layout/sidebar"),
|
|
18
|
+
path.join(appDir, "layout/topbar"),
|
|
19
|
+
path.join(appDir, "core/interceptors"),
|
|
20
|
+
path.join(appDir, "core/guards"),
|
|
21
|
+
path.join(appDir, "core/services"),
|
|
22
|
+
path.join(appDir, "shared/components"),
|
|
23
|
+
path.join(appDir, "shared/pipes"),
|
|
24
|
+
path.join(appDir, "features"),
|
|
25
|
+
path.join(srcDir, "environments"),
|
|
26
|
+
]);
|
|
27
|
+
const data = {
|
|
28
|
+
projectName: this.projectName,
|
|
29
|
+
name: this.config.name,
|
|
30
|
+
versions: this.versions,
|
|
31
|
+
};
|
|
32
|
+
await Promise.all([
|
|
33
|
+
renderAndWrite("frontend/package.json.hbs", path.join(frontendDir, "package.json"), data),
|
|
34
|
+
renderAndWrite("frontend/angular.json.hbs", path.join(frontendDir, "angular.json"), data),
|
|
35
|
+
renderAndWrite("frontend/tsconfig.json.hbs", path.join(frontendDir, "tsconfig.json"), data),
|
|
36
|
+
renderAndWrite("frontend/tsconfig.app.json.hbs", path.join(frontendDir, "tsconfig.app.json"), data),
|
|
37
|
+
renderAndWrite("frontend/gitignore.hbs", path.join(frontendDir, ".gitignore"), data),
|
|
38
|
+
renderAndWrite("frontend/main.ts.hbs", path.join(srcDir, "main.ts"), data),
|
|
39
|
+
renderAndWrite("frontend/index.html.hbs", path.join(srcDir, "index.html"), data),
|
|
40
|
+
renderAndWrite("frontend/styles.scss.hbs", path.join(srcDir, "styles.scss"), data),
|
|
41
|
+
renderAndWrite("frontend/environment.ts.hbs", path.join(srcDir, "environments/environment.ts"), data),
|
|
42
|
+
renderAndWrite("frontend/environment.development.ts.hbs", path.join(srcDir, "environments/environment.development.ts"), data),
|
|
43
|
+
renderAndWrite("frontend/app.component.ts.hbs", path.join(appDir, "app.component.ts"), data),
|
|
44
|
+
renderAndWrite("frontend/app.routes.ts.hbs", path.join(appDir, "app.routes.ts"), data),
|
|
45
|
+
renderAndWrite("frontend/app.config.ts.hbs", path.join(appDir, "app.config.ts"), data),
|
|
46
|
+
renderAndWrite("frontend/layout.component.ts.hbs", path.join(appDir, "layout/layout.component.ts"), data),
|
|
47
|
+
renderAndWrite("frontend/sidebar.component.ts.hbs", path.join(appDir, "layout/sidebar/sidebar.component.ts"), data),
|
|
48
|
+
renderAndWrite("frontend/topbar.component.ts.hbs", path.join(appDir, "layout/topbar/topbar.component.ts"), data),
|
|
49
|
+
renderAndWrite("frontend/auth.interceptor.ts.hbs", path.join(appDir, "core/interceptors/auth.interceptor.ts"), data),
|
|
50
|
+
renderAndWrite("frontend/error.interceptor.ts.hbs", path.join(appDir, "core/interceptors/error.interceptor.ts"), data),
|
|
51
|
+
renderAndWrite("frontend/auth.guard.ts.hbs", path.join(appDir, "core/guards/auth.guard.ts"), data),
|
|
52
|
+
renderAndWrite("frontend/auth.service.ts.hbs", path.join(appDir, "core/services/auth.service.ts"), data),
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export async function generateFrontend(projectDir, config, versions) {
|
|
57
|
+
const generator = new FrontendGenerator(projectDir, config, versions);
|
|
58
|
+
await generator.generate();
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/frontend/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,iBAAkB,SAAQ,aAAa;IAC1B,QAAQ,CAAmB;IAC3B,WAAW,CAAS;IAErC,YACE,UAAkB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0,0 +1,16 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
export async function initGit(projectDir) {
|
|
3
|
+
try {
|
|
4
|
+
execFileSync("git", ["--version"], { stdio: "ignore" });
|
|
5
|
+
}
|
|
6
|
+
catch {
|
|
7
|
+
throw new Error("Git n'est pas installé. Installez Git et réessayez.");
|
|
8
|
+
}
|
|
9
|
+
execFileSync("git", ["init"], { cwd: projectDir, stdio: "ignore" });
|
|
10
|
+
execFileSync("git", ["add", "-A"], { cwd: projectDir, stdio: "ignore" });
|
|
11
|
+
execFileSync("git", ["commit", "-m", "chore: initial project setup with ForgeKit"], {
|
|
12
|
+
cwd: projectDir,
|
|
13
|
+
stdio: "ignore",
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=git.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/generators/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,UAAkB;IAC9C,IAAI,CAAC;QACH,YAAY,CAAC,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,YAAY,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpE,YAAY,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACzE,YAAY,CACV,KAAK,EACL,CAAC,QAAQ,EAAE,IAAI,EAAE,4CAA4C,CAAC,EAC9D;QACE,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,QAAQ;KAChB,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProjectConfig } from "../../types.js";
|
|
2
|
+
import type { ResolvedVersions } from "../../versions.js";
|
|
3
|
+
export declare function generateRoot(projectDir: string, config: ProjectConfig, versions: ResolvedVersions): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/root/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAuC1D,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { renderAndWrite } from "../../utils/template-engine.js";
|
|
3
|
+
import { BaseGenerator } from "../base-generator.js";
|
|
4
|
+
class RootGenerator extends BaseGenerator {
|
|
5
|
+
versions;
|
|
6
|
+
constructor(projectDir, config, versions) {
|
|
7
|
+
super(projectDir, config);
|
|
8
|
+
this.versions = versions;
|
|
9
|
+
}
|
|
10
|
+
async generate() {
|
|
11
|
+
const data = {
|
|
12
|
+
name: this.config.name,
|
|
13
|
+
description: this.config.description,
|
|
14
|
+
backend: this.config.backend,
|
|
15
|
+
frontend: this.config.frontend,
|
|
16
|
+
docker: this.config.docker,
|
|
17
|
+
versions: this.versions,
|
|
18
|
+
};
|
|
19
|
+
await Promise.all([
|
|
20
|
+
renderAndWrite("root/README.md.hbs", path.join(this.projectDir, "README.md"), data),
|
|
21
|
+
renderAndWrite("root/gitignore.hbs", path.join(this.projectDir, ".gitignore"), data),
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export async function generateRoot(projectDir, config, versions) {
|
|
26
|
+
const generator = new RootGenerator(projectDir, config, versions);
|
|
27
|
+
await generator.generate();
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/root/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,aAAc,SAAQ,aAAa;IACtB,QAAQ,CAAmB;IAE5C,YACE,UAAkB,EAClB,MAAqB,EACrB,QAA0B;QAE1B,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;YACtB,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW;YACpC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;YAC5B,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;YAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QAEF,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,cAAc,CACZ,oBAAoB,EACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,EACvC,IAAI,CACL;YACD,cAAc,CACZ,oBAAoB,EACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EACxC,IAAI,CACL;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,UAAkB,EAClB,MAAqB,EACrB,QAA0B;IAE1B,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClE,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC7B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { newCommand } from "./commands/new.js";
|
|
4
|
+
const program = new Command();
|
|
5
|
+
program
|
|
6
|
+
.name("forgekit")
|
|
7
|
+
.description("CLI de scaffolding full-stack pour projets Spring Boot + Angular")
|
|
8
|
+
.version("1.0.0");
|
|
9
|
+
program.addCommand(newCommand);
|
|
10
|
+
program.parse();
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CACV,kEAAkE,CACnE;KACA,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAE/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/prompts/project.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAsB,mBAAmB,CACvC,QAAQ,GAAE,OAAO,CAAC,aAAa,CAAM,GACpC,OAAO,CAAC,aAAa,CAAC,CAiFxB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { input, confirm, checkbox } from "@inquirer/prompts";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { validateProjectName, validateGroupId } from "../utils/validation.js";
|
|
5
|
+
export async function promptProjectConfig(defaults = {}) {
|
|
6
|
+
const saved = await loadConfig();
|
|
7
|
+
const currentDir = path.basename(process.cwd());
|
|
8
|
+
const name = defaults.name ??
|
|
9
|
+
(await input({
|
|
10
|
+
message: "Nom du projet",
|
|
11
|
+
default: currentDir,
|
|
12
|
+
validate: validateProjectName,
|
|
13
|
+
}));
|
|
14
|
+
const description = defaults.description ??
|
|
15
|
+
(await input({
|
|
16
|
+
message: "Description",
|
|
17
|
+
default: "Mon application",
|
|
18
|
+
}));
|
|
19
|
+
const stacks = defaults.backend !== undefined && defaults.frontend !== undefined
|
|
20
|
+
? []
|
|
21
|
+
: await checkbox({
|
|
22
|
+
message: "Que voulez-vous générer ?",
|
|
23
|
+
choices: [
|
|
24
|
+
{ name: "Backend (Spring Boot)", value: "backend", checked: true },
|
|
25
|
+
{ name: "Frontend (Angular)", value: "frontend", checked: true },
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
const backend = defaults.backend ?? stacks.includes("backend");
|
|
29
|
+
const frontend = defaults.frontend ?? stacks.includes("frontend");
|
|
30
|
+
const groupId = backend
|
|
31
|
+
? (defaults.groupId ??
|
|
32
|
+
(await input({
|
|
33
|
+
message: "Group ID",
|
|
34
|
+
default: saved.groupId ?? "com.example",
|
|
35
|
+
validate: validateGroupId,
|
|
36
|
+
})))
|
|
37
|
+
: "com.example";
|
|
38
|
+
const ci = defaults.ci ??
|
|
39
|
+
(await confirm({
|
|
40
|
+
message: "Configurer GitHub Actions CI ?",
|
|
41
|
+
default: true,
|
|
42
|
+
}));
|
|
43
|
+
const docker = defaults.docker ??
|
|
44
|
+
(await confirm({
|
|
45
|
+
message: "Configurer Docker Compose ?",
|
|
46
|
+
default: true,
|
|
47
|
+
}));
|
|
48
|
+
const claudeCode = defaults.claudeCode ??
|
|
49
|
+
(await confirm({
|
|
50
|
+
message: "Configurer Claude Code ?",
|
|
51
|
+
default: true,
|
|
52
|
+
}));
|
|
53
|
+
const gitInit = defaults.gitInit ??
|
|
54
|
+
(await confirm({
|
|
55
|
+
message: "Initialiser Git ?",
|
|
56
|
+
default: true,
|
|
57
|
+
}));
|
|
58
|
+
return {
|
|
59
|
+
name,
|
|
60
|
+
groupId,
|
|
61
|
+
description,
|
|
62
|
+
backend,
|
|
63
|
+
frontend,
|
|
64
|
+
ci,
|
|
65
|
+
docker,
|
|
66
|
+
claudeCode,
|
|
67
|
+
gitInit,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/prompts/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,WAAmC,EAAE;IAErC,MAAM,KAAK,GAAG,MAAM,UAAU,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC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CAAC;YACb,OAAO,EAAE,gCAAgC;YACzC,OAAO,EAAE,IAAI;SACd,CAAC,CAAC,CAAC;IAEN,MAAM,MAAM,GACV,QAAQ,CAAC,MAAM;QACf,CAAC,MAAM,OAAO,CAAC;YACb,OAAO,EAAE,6BAA6B;YACtC,OAAO,EAAE,IAAI;SACd,CAAC,CAAC,CAAC;IAEN,MAAM,UAAU,GACd,QAAQ,CAAC,UAAU;QACnB,CAAC,MAAM,OAAO,CAAC;YACb,OAAO,EAAE,0BAA0B;YACnC,OAAO,EAAE,IAAI;SACd,CAAC,CAAC,CAAC;IAEN,MAAM,OAAO,GACX,QAAQ,CAAC,OAAO;QAChB,CAAC,MAAM,OAAO,CAAC;YACb,OAAO,EAAE,mBAAmB;YAC5B,OAAO,EAAE,IAAI;SACd,CAAC,CAAC,CAAC;IAEN,OAAO;QACL,IAAI;QACJ,OAAO;QACP,WAAW;QACX,OAAO;QACP,QAAQ;QACR,EAAE;QACF,MAAM;QACN,UAAU;QACV,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
package {{packageName}};
|
|
2
|
+
|
|
3
|
+
import org.springframework.boot.SpringApplication;
|
|
4
|
+
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
5
|
+
|
|
6
|
+
@SpringBootApplication
|
|
7
|
+
public class Application {
|
|
8
|
+
|
|
9
|
+
public static void main(String[] args) {
|
|
10
|
+
SpringApplication.run(Application.class, args);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
package {{packageName}}.shared.exception;
|
|
2
|
+
|
|
3
|
+
import org.springframework.http.HttpStatus;
|
|
4
|
+
import org.springframework.http.ResponseEntity;
|
|
5
|
+
import org.springframework.web.bind.MethodArgumentNotValidException;
|
|
6
|
+
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
7
|
+
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
|
8
|
+
|
|
9
|
+
import java.util.stream.Collectors;
|
|
10
|
+
|
|
11
|
+
@RestControllerAdvice
|
|
12
|
+
public class GlobalExceptionHandler {
|
|
13
|
+
|
|
14
|
+
@ExceptionHandler(MethodArgumentNotValidException.class)
|
|
15
|
+
public ResponseEntity<ApiError> handleValidation(MethodArgumentNotValidException ex) {
|
|
16
|
+
String message = ex.getBindingResult().getFieldErrors().stream()
|
|
17
|
+
.map(e -> e.getField() + ": " + e.getDefaultMessage())
|
|
18
|
+
.collect(Collectors.joining(", "));
|
|
19
|
+
return ResponseEntity.badRequest().body(new ApiError(HttpStatus.BAD_REQUEST.value(), message));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@ExceptionHandler(RuntimeException.class)
|
|
23
|
+
public ResponseEntity<ApiError> handleRuntime(RuntimeException ex) {
|
|
24
|
+
return ResponseEntity.internalServerError()
|
|
25
|
+
.body(new ApiError(HttpStatus.INTERNAL_SERVER_ERROR.value(), ex.getMessage()));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
package {{packageName}}.config;
|
|
2
|
+
|
|
3
|
+
import io.swagger.v3.oas.models.OpenAPI;
|
|
4
|
+
import io.swagger.v3.oas.models.info.Info;
|
|
5
|
+
import org.springframework.context.annotation.Bean;
|
|
6
|
+
import org.springframework.context.annotation.Configuration;
|
|
7
|
+
|
|
8
|
+
@Configuration
|
|
9
|
+
public class OpenApiConfig {
|
|
10
|
+
|
|
11
|
+
@Bean
|
|
12
|
+
public OpenAPI customOpenAPI() {
|
|
13
|
+
return new OpenAPI()
|
|
14
|
+
.info(new Info()
|
|
15
|
+
.title("{{name}} API")
|
|
16
|
+
.description("{{description}}")
|
|
17
|
+
.version("0.0.1"));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
package {{packageName}}.config;
|
|
2
|
+
|
|
3
|
+
import org.springframework.context.annotation.Bean;
|
|
4
|
+
import org.springframework.context.annotation.Configuration;
|
|
5
|
+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
6
|
+
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
7
|
+
import org.springframework.security.config.http.SessionCreationPolicy;
|
|
8
|
+
import org.springframework.security.web.SecurityFilterChain;
|
|
9
|
+
import org.springframework.web.cors.CorsConfiguration;
|
|
10
|
+
import org.springframework.web.cors.CorsConfigurationSource;
|
|
11
|
+
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
|
12
|
+
|
|
13
|
+
import java.util.List;
|
|
14
|
+
|
|
15
|
+
@Configuration
|
|
16
|
+
@EnableWebSecurity
|
|
17
|
+
public class SecurityConfig {
|
|
18
|
+
|
|
19
|
+
@Bean
|
|
20
|
+
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
|
21
|
+
return http
|
|
22
|
+
.cors(cors -> cors.configurationSource(corsConfigurationSource()))
|
|
23
|
+
.csrf(csrf -> csrf.disable())
|
|
24
|
+
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
|
25
|
+
.authorizeHttpRequests(auth -> auth
|
|
26
|
+
.requestMatchers("/api/public/**", "/actuator/health", "/swagger-ui/**", "/v3/api-docs/**").permitAll()
|
|
27
|
+
.anyRequest().authenticated()
|
|
28
|
+
)
|
|
29
|
+
.build();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Bean
|
|
33
|
+
public CorsConfigurationSource corsConfigurationSource() {
|
|
34
|
+
var config = new CorsConfiguration();
|
|
35
|
+
config.setAllowedOrigins(List.of("http://localhost:4200"));
|
|
36
|
+
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
|
|
37
|
+
config.setAllowedHeaders(List.of("*"));
|
|
38
|
+
config.setAllowCredentials(true);
|
|
39
|
+
var source = new UrlBasedCorsConfigurationSource();
|
|
40
|
+
source.registerCorsConfiguration("/**", config);
|
|
41
|
+
return source;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
spring:
|
|
2
|
+
application:
|
|
3
|
+
name: {{name}}
|
|
4
|
+
profiles:
|
|
5
|
+
active: dev
|
|
6
|
+
|
|
7
|
+
datasource:
|
|
8
|
+
url: {{datasourceUrl}}
|
|
9
|
+
username: ${DB_USERNAME:postgres}
|
|
10
|
+
password: ${DB_PASSWORD:postgres}
|
|
11
|
+
|
|
12
|
+
jpa:
|
|
13
|
+
hibernate:
|
|
14
|
+
ddl-auto: validate
|
|
15
|
+
open-in-view: false
|
|
16
|
+
properties:
|
|
17
|
+
hibernate:
|
|
18
|
+
format_sql: true
|
|
19
|
+
|
|
20
|
+
flyway:
|
|
21
|
+
enabled: true
|
|
22
|
+
locations: classpath:db/migration
|
|
23
|
+
|
|
24
|
+
server:
|
|
25
|
+
port: 8080
|
|
26
|
+
|
|
27
|
+
management:
|
|
28
|
+
endpoints:
|
|
29
|
+
web:
|
|
30
|
+
exposure:
|
|
31
|
+
include: health,info,metrics
|
|
32
|
+
|
|
33
|
+
springdoc:
|
|
34
|
+
api-docs:
|
|
35
|
+
path: /v3/api-docs
|
|
36
|
+
swagger-ui:
|
|
37
|
+
path: /swagger-ui.html
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Maven Wrapper script
|
|
3
|
+
# Auto-generated by ForgeKit
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
MAVEN_HOME="${HOME}/.m2/wrapper/dists/apache-maven-3.9.9"
|
|
8
|
+
|
|
9
|
+
if [ ! -d "${MAVEN_HOME}" ]; then
|
|
10
|
+
echo "Downloading Maven..."
|
|
11
|
+
mkdir -p "${MAVEN_HOME}"
|
|
12
|
+
curl -fsSL "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip" -o /tmp/maven.zip
|
|
13
|
+
unzip -q /tmp/maven.zip -d "${HOME}/.m2/wrapper/dists/"
|
|
14
|
+
rm /tmp/maven.zip
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
exec "${MAVEN_HOME}/bin/mvn" "$@"
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
|
6
|
+
|
|
7
|
+
<parent>
|
|
8
|
+
<groupId>org.springframework.boot</groupId>
|
|
9
|
+
<artifactId>spring-boot-starter-parent</artifactId>
|
|
10
|
+
<version>{{versions.springBoot}}</version>
|
|
11
|
+
<relativePath/>
|
|
12
|
+
</parent>
|
|
13
|
+
|
|
14
|
+
<groupId>{{groupId}}</groupId>
|
|
15
|
+
<artifactId>{{artifactId}}</artifactId>
|
|
16
|
+
<version>0.0.1-SNAPSHOT</version>
|
|
17
|
+
<name>{{name}}</name>
|
|
18
|
+
<description>{{description}}</description>
|
|
19
|
+
|
|
20
|
+
<properties>
|
|
21
|
+
<java.version>21</java.version>
|
|
22
|
+
<mapstruct.version>{{versions.mapstruct}}</mapstruct.version>
|
|
23
|
+
<springdoc.version>{{versions.springDoc}}</springdoc.version>
|
|
24
|
+
</properties>
|
|
25
|
+
|
|
26
|
+
<dependencies>
|
|
27
|
+
<!-- Spring Boot Starters -->
|
|
28
|
+
<dependency>
|
|
29
|
+
<groupId>org.springframework.boot</groupId>
|
|
30
|
+
<artifactId>spring-boot-starter-web</artifactId>
|
|
31
|
+
</dependency>
|
|
32
|
+
<dependency>
|
|
33
|
+
<groupId>org.springframework.boot</groupId>
|
|
34
|
+
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
35
|
+
</dependency>
|
|
36
|
+
<dependency>
|
|
37
|
+
<groupId>org.springframework.boot</groupId>
|
|
38
|
+
<artifactId>spring-boot-starter-security</artifactId>
|
|
39
|
+
</dependency>
|
|
40
|
+
<dependency>
|
|
41
|
+
<groupId>org.springframework.boot</groupId>
|
|
42
|
+
<artifactId>spring-boot-starter-validation</artifactId>
|
|
43
|
+
</dependency>
|
|
44
|
+
<dependency>
|
|
45
|
+
<groupId>org.springframework.boot</groupId>
|
|
46
|
+
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
47
|
+
</dependency>
|
|
48
|
+
|
|
49
|
+
<!-- Database -->
|
|
50
|
+
<dependency>
|
|
51
|
+
<groupId>org.postgresql</groupId>
|
|
52
|
+
<artifactId>postgresql</artifactId>
|
|
53
|
+
<scope>runtime</scope>
|
|
54
|
+
</dependency>
|
|
55
|
+
<dependency>
|
|
56
|
+
<groupId>org.flywaydb</groupId>
|
|
57
|
+
<artifactId>flyway-core</artifactId>
|
|
58
|
+
</dependency>
|
|
59
|
+
<dependency>
|
|
60
|
+
<groupId>org.flywaydb</groupId>
|
|
61
|
+
<artifactId>flyway-database-postgresql</artifactId>
|
|
62
|
+
</dependency>
|
|
63
|
+
|
|
64
|
+
<!-- OpenAPI -->
|
|
65
|
+
<dependency>
|
|
66
|
+
<groupId>org.springdoc</groupId>
|
|
67
|
+
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
|
68
|
+
<version>${springdoc.version}</version>
|
|
69
|
+
</dependency>
|
|
70
|
+
|
|
71
|
+
<!-- Lombok -->
|
|
72
|
+
<dependency>
|
|
73
|
+
<groupId>org.projectlombok</groupId>
|
|
74
|
+
<artifactId>lombok</artifactId>
|
|
75
|
+
<optional>true</optional>
|
|
76
|
+
</dependency>
|
|
77
|
+
|
|
78
|
+
<!-- MapStruct -->
|
|
79
|
+
<dependency>
|
|
80
|
+
<groupId>org.mapstruct</groupId>
|
|
81
|
+
<artifactId>mapstruct</artifactId>
|
|
82
|
+
<version>${mapstruct.version}</version>
|
|
83
|
+
</dependency>
|
|
84
|
+
|
|
85
|
+
<!-- Test -->
|
|
86
|
+
<dependency>
|
|
87
|
+
<groupId>org.springframework.boot</groupId>
|
|
88
|
+
<artifactId>spring-boot-starter-test</artifactId>
|
|
89
|
+
<scope>test</scope>
|
|
90
|
+
</dependency>
|
|
91
|
+
<dependency>
|
|
92
|
+
<groupId>org.springframework.security</groupId>
|
|
93
|
+
<artifactId>spring-security-test</artifactId>
|
|
94
|
+
<scope>test</scope>
|
|
95
|
+
</dependency>
|
|
96
|
+
</dependencies>
|
|
97
|
+
|
|
98
|
+
<build>
|
|
99
|
+
<plugins>
|
|
100
|
+
<plugin>
|
|
101
|
+
<groupId>org.springframework.boot</groupId>
|
|
102
|
+
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
103
|
+
<configuration>
|
|
104
|
+
<excludes>
|
|
105
|
+
<exclude>
|
|
106
|
+
<groupId>org.projectlombok</groupId>
|
|
107
|
+
<artifactId>lombok</artifactId>
|
|
108
|
+
</exclude>
|
|
109
|
+
</excludes>
|
|
110
|
+
</configuration>
|
|
111
|
+
</plugin>
|
|
112
|
+
<plugin>
|
|
113
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
114
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
115
|
+
<configuration>
|
|
116
|
+
<annotationProcessorPaths>
|
|
117
|
+
<path>
|
|
118
|
+
<groupId>org.projectlombok</groupId>
|
|
119
|
+
<artifactId>lombok</artifactId>
|
|
120
|
+
</path>
|
|
121
|
+
<path>
|
|
122
|
+
<groupId>org.mapstruct</groupId>
|
|
123
|
+
<artifactId>mapstruct-processor</artifactId>
|
|
124
|
+
<version>${mapstruct.version}</version>
|
|
125
|
+
</path>
|
|
126
|
+
<path>
|
|
127
|
+
<groupId>org.projectlombok</groupId>
|
|
128
|
+
<artifactId>lombok-mapstruct-binding</artifactId>
|
|
129
|
+
<version>0.2.0</version>
|
|
130
|
+
</path>
|
|
131
|
+
</annotationProcessorPaths>
|
|
132
|
+
</configuration>
|
|
133
|
+
</plugin>
|
|
134
|
+
</plugins>
|
|
135
|
+
</build>
|
|
136
|
+
</project>
|