@forgerapi/codegen 0.0.1

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 (53) hide show
  1. package/dist/codemod.d.ts +3 -0
  2. package/dist/codemod.js +181 -0
  3. package/dist/generators/action/controller.d.ts +5 -0
  4. package/dist/generators/action/controller.js +51 -0
  5. package/dist/generators/action/dto.d.ts +2 -0
  6. package/dist/generators/action/dto.js +15 -0
  7. package/dist/generators/action/event.d.ts +1 -0
  8. package/dist/generators/action/event.js +10 -0
  9. package/dist/generators/action/impl.d.ts +5 -0
  10. package/dist/generators/action/impl.js +25 -0
  11. package/dist/generators/action/index.d.ts +6 -0
  12. package/dist/generators/action/index.js +15 -0
  13. package/dist/generators/action/module.d.ts +4 -0
  14. package/dist/generators/action/module.js +25 -0
  15. package/dist/generators/action/service.d.ts +2 -0
  16. package/dist/generators/action/service.js +24 -0
  17. package/dist/generators/controller.d.ts +3 -0
  18. package/dist/generators/controller.js +66 -0
  19. package/dist/generators/dto.d.ts +9 -0
  20. package/dist/generators/dto.js +128 -0
  21. package/dist/generators/enum.d.ts +2 -0
  22. package/dist/generators/enum.js +12 -0
  23. package/dist/generators/forger-module/forger-module.d.ts +6 -0
  24. package/dist/generators/forger-module/forger-module.js +49 -0
  25. package/dist/generators/forger-module/index.d.ts +1 -0
  26. package/dist/generators/forger-module/index.js +5 -0
  27. package/dist/generators/forger-modules.d.ts +2 -0
  28. package/dist/generators/forger-modules.js +40 -0
  29. package/dist/generators/guard/guard.d.ts +2 -0
  30. package/dist/generators/guard/guard.js +15 -0
  31. package/dist/generators/guard/index.d.ts +1 -0
  32. package/dist/generators/guard/index.js +5 -0
  33. package/dist/generators/module/index.d.ts +1 -0
  34. package/dist/generators/module/index.js +5 -0
  35. package/dist/generators/module/module-module.d.ts +2 -0
  36. package/dist/generators/module/module-module.js +46 -0
  37. package/dist/generators/module.d.ts +4 -0
  38. package/dist/generators/module.js +25 -0
  39. package/dist/generators/prisma-module.d.ts +1 -0
  40. package/dist/generators/prisma-module.js +15 -0
  41. package/dist/generators/prisma-service.d.ts +1 -0
  42. package/dist/generators/prisma-service.js +22 -0
  43. package/dist/generators/prisma.d.ts +2 -0
  44. package/dist/generators/prisma.js +101 -0
  45. package/dist/generators/service.d.ts +8 -0
  46. package/dist/generators/service.js +71 -0
  47. package/dist/index.d.ts +21 -0
  48. package/dist/index.js +376 -0
  49. package/dist/schema-cache.d.ts +25 -0
  50. package/dist/schema-cache.js +98 -0
  51. package/dist/utils.d.ts +1 -0
  52. package/dist/utils.js +6 -0
  53. package/package.json +29 -0
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateForgerModule = generateForgerModule;
4
+ const utils_1 = require("../../utils");
5
+ function generateForgerModule(mod, options) {
6
+ const kebab = (0, utils_1.toKebab)(mod.name);
7
+ const mBase = options?.modelRelativeBase ?? "..";
8
+ const aBase = options?.actionBase ?? ".";
9
+ const iBase = options?.implBase ?? ".";
10
+ const lines = [];
11
+ lines.push(`import { Module } from "@nestjs/common";`);
12
+ lines.push("");
13
+ const imports = [];
14
+ const moduleImports = [];
15
+ for (const modelName of mod.models) {
16
+ const mk = (0, utils_1.toKebab)(modelName);
17
+ imports.push(`import { ${modelName}Module } from "${mBase}/${mk}/${mk}.module";`);
18
+ moduleImports.push(`${modelName}Module`);
19
+ }
20
+ for (const action of mod.actions) {
21
+ const ak = (0, utils_1.toKebab)(action.name);
22
+ imports.push(`import { ${action.name}ActionAbstractService } from "${aBase}/${ak}/${ak}.action-service";`);
23
+ imports.push(`import { ${action.name}ActionController } from "${aBase}/${ak}/${ak}.action-controller";`);
24
+ imports.push(`import { ${action.name}ActionImplService } from "${iBase}/${ak}.action-impl";`);
25
+ }
26
+ for (const imp of imports) {
27
+ lines.push(imp);
28
+ }
29
+ lines.push("");
30
+ const controllerNames = mod.actions.map((a) => `${a.name}ActionController`);
31
+ const providerEntries = mod.actions.map((a) => ` { provide: ${a.name}ActionAbstractService, useClass: ${a.name}ActionImplService },`);
32
+ lines.push(`@Module({`);
33
+ if (moduleImports.length > 0) {
34
+ lines.push(` imports: [${moduleImports.join(", ")}],`);
35
+ }
36
+ if (controllerNames.length > 0) {
37
+ lines.push(` controllers: [${controllerNames.join(", ")}],`);
38
+ }
39
+ if (providerEntries.length > 0) {
40
+ lines.push(` providers: [`);
41
+ for (const entry of providerEntries) {
42
+ lines.push(entry);
43
+ }
44
+ lines.push(` ],`);
45
+ }
46
+ lines.push("})");
47
+ lines.push(`export class ${mod.name}Module {}`);
48
+ return lines.join("\n");
49
+ }
@@ -0,0 +1 @@
1
+ export { generateForgerModule } from "./forger-module";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateForgerModule = void 0;
4
+ var forger_module_1 = require("./forger-module");
5
+ Object.defineProperty(exports, "generateForgerModule", { enumerable: true, get: function () { return forger_module_1.generateForgerModule; } });
@@ -0,0 +1,2 @@
1
+ import type { ForgerAction, ForgerModel, ForgerModule } from "@forgerapi/ast";
2
+ export declare function generateForgerModules(models: ForgerModel[], actions: ForgerAction[], modules: ForgerModule[]): string;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateForgerModules = generateForgerModules;
4
+ const utils_1 = require("../utils");
5
+ function generateForgerModules(models, actions, modules) {
6
+ const lines = [];
7
+ lines.push(`import { Module } from "@nestjs/common";`);
8
+ lines.push("");
9
+ const imports = [
10
+ `import { PrismaModule } from "./common/prisma/prisma.module";`,
11
+ ];
12
+ for (const model of models) {
13
+ const kebab = (0, utils_1.toKebab)(model.name);
14
+ imports.push(`import { ${model.name}Module } from "./${kebab}/${kebab}.module";`);
15
+ }
16
+ for (const action of actions) {
17
+ const kebab = (0, utils_1.toKebab)(action.name);
18
+ imports.push(`import { ${action.name}ActionModule } from "./${kebab}/${kebab}.action-module";`);
19
+ }
20
+ for (const mod of modules) {
21
+ const kebab = (0, utils_1.toKebab)(mod.name);
22
+ imports.push(`import { ${mod.name}Module } from "./${kebab}/${kebab}.module";`);
23
+ }
24
+ for (const imp of imports) {
25
+ lines.push(imp);
26
+ }
27
+ lines.push("");
28
+ const moduleNames = [
29
+ "PrismaModule",
30
+ ...models.map((m) => `${m.name}Module`),
31
+ ...actions.map((a) => `${a.name}ActionModule`),
32
+ ...modules.map((m) => `${m.name}Module`),
33
+ ];
34
+ lines.push(`@Module({`);
35
+ lines.push(` imports: [${moduleNames.join(", ")}],`);
36
+ lines.push(` exports: [${moduleNames.join(", ")}],`);
37
+ lines.push("})");
38
+ lines.push("export class ForgerModulesModule {}");
39
+ return lines.join("\n");
40
+ }
@@ -0,0 +1,2 @@
1
+ import type { ForgerGuard } from "@forgerapi/ast";
2
+ export declare function generateGuardStub(guard: ForgerGuard): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateGuardStub = generateGuardStub;
4
+ function generateGuardStub(guard) {
5
+ const lines = [];
6
+ lines.push(`import { Injectable, CanActivate, ExecutionContext } from "@nestjs/common";`);
7
+ lines.push("");
8
+ lines.push("@Injectable()");
9
+ lines.push(`export class ${guard.name} implements CanActivate {`);
10
+ lines.push(" canActivate(context: ExecutionContext): boolean | Promise<boolean> {");
11
+ lines.push(" return true;");
12
+ lines.push(" }");
13
+ lines.push("}");
14
+ return lines.join("\n");
15
+ }
@@ -0,0 +1 @@
1
+ export { generateGuardStub } from "./guard";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateGuardStub = void 0;
4
+ var guard_1 = require("./guard");
5
+ Object.defineProperty(exports, "generateGuardStub", { enumerable: true, get: function () { return guard_1.generateGuardStub; } });
@@ -0,0 +1 @@
1
+ export { generateModuleModule } from "./module-module";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateModuleModule = void 0;
4
+ var module_module_1 = require("./module-module");
5
+ Object.defineProperty(exports, "generateModuleModule", { enumerable: true, get: function () { return module_module_1.generateModuleModule; } });
@@ -0,0 +1,2 @@
1
+ import type { ForgerModule } from "@forgerapi/ast";
2
+ export declare function generateModuleModule(mod: ForgerModule): string;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateModuleModule = generateModuleModule;
4
+ const utils_1 = require("../../utils");
5
+ function generateModuleModule(mod) {
6
+ const kebab = (0, utils_1.toKebab)(mod.name);
7
+ const lines = [];
8
+ lines.push(`import { Module } from "@nestjs/common";`);
9
+ lines.push("");
10
+ const imports = [];
11
+ const moduleImports = [];
12
+ for (const modelName of mod.models) {
13
+ const mk = (0, utils_1.toKebab)(modelName);
14
+ imports.push(`import { ${modelName}Module } from "../${mk}/${mk}.module";`);
15
+ moduleImports.push(`${modelName}Module`);
16
+ }
17
+ for (const action of mod.actions) {
18
+ const ak = (0, utils_1.toKebab)(action.name);
19
+ imports.push(`import { ${action.name}ActionAbstractService } from "./${ak}.action-service";`);
20
+ imports.push(`import { ${action.name}ActionController } from "./${ak}.action-controller";`);
21
+ imports.push(`import { ${action.name}ActionImplService } from "./${ak}.action-impl";`);
22
+ }
23
+ for (const imp of imports) {
24
+ lines.push(imp);
25
+ }
26
+ lines.push("");
27
+ const controllerNames = mod.actions.map((a) => `${a.name}ActionController`);
28
+ const providerEntries = mod.actions.map((a) => ` { provide: ${a.name}ActionAbstractService, useClass: ${a.name}ActionImplService },`);
29
+ lines.push(`@Module({`);
30
+ if (moduleImports.length > 0) {
31
+ lines.push(` imports: [${moduleImports.join(", ")}],`);
32
+ }
33
+ if (controllerNames.length > 0) {
34
+ lines.push(` controllers: [${controllerNames.join(", ")}],`);
35
+ }
36
+ if (providerEntries.length > 0) {
37
+ lines.push(` providers: [`);
38
+ for (const entry of providerEntries) {
39
+ lines.push(entry);
40
+ }
41
+ lines.push(` ],`);
42
+ }
43
+ lines.push("})");
44
+ lines.push(`export class ${mod.name}Module {}`);
45
+ return lines.join("\n");
46
+ }
@@ -0,0 +1,4 @@
1
+ import type { ForgerModel } from "@forgerapi/ast";
2
+ export declare function generateModule(model: ForgerModel, options?: {
3
+ implRelative?: string;
4
+ }): string;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateModule = generateModule;
4
+ const utils_1 = require("../utils");
5
+ function generateModule(model, options) {
6
+ const kebab = (0, utils_1.toKebab)(model.name);
7
+ const iRel = options?.implRelative ?? `./${kebab}.impl`;
8
+ const lines = [];
9
+ lines.push(`import { Module } from "@nestjs/common";`);
10
+ lines.push(`import { ${model.name}AbstractService } from "./${kebab}.service";`);
11
+ lines.push(`import { ${model.name}Controller } from "./${kebab}.controller";`);
12
+ lines.push(`import { ${model.name}ImplService } from "${iRel}";`);
13
+ lines.push("");
14
+ lines.push(`@Module({`);
15
+ lines.push(` controllers: [${model.name}Controller],`);
16
+ lines.push(" providers: [");
17
+ lines.push(" {");
18
+ lines.push(` provide: ${model.name}AbstractService,`);
19
+ lines.push(` useClass: ${model.name}ImplService,`);
20
+ lines.push(" },");
21
+ lines.push(" ],");
22
+ lines.push("})");
23
+ lines.push(`export class ${model.name}Module {}`);
24
+ return lines.join("\n");
25
+ }
@@ -0,0 +1 @@
1
+ export declare function generatePrismaModule(): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generatePrismaModule = generatePrismaModule;
4
+ function generatePrismaModule() {
5
+ return `import { Global, Module } from "@nestjs/common";
6
+ import { PrismaService } from "./prisma.service";
7
+
8
+ @Global()
9
+ @Module({
10
+ providers: [PrismaService],
11
+ exports: [PrismaService],
12
+ })
13
+ export class PrismaModule {}
14
+ `;
15
+ }
@@ -0,0 +1 @@
1
+ export declare function generatePrismaService(): string;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generatePrismaService = generatePrismaService;
4
+ function generatePrismaService() {
5
+ return `import { Injectable, OnModuleInit, OnModuleDestroy } from "@nestjs/common";
6
+ import { PrismaClient } from "@prisma/client";
7
+
8
+ @Injectable()
9
+ export class PrismaService
10
+ extends PrismaClient
11
+ implements OnModuleInit, OnModuleDestroy
12
+ {
13
+ async onModuleInit() {
14
+ await this.$connect();
15
+ }
16
+
17
+ async onModuleDestroy() {
18
+ await this.$disconnect();
19
+ }
20
+ }
21
+ `;
22
+ }
@@ -0,0 +1,2 @@
1
+ import type { ForgerSchema } from "@forgerapi/ast";
2
+ export declare function generatePrismaSchema(schema: ForgerSchema): string;
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generatePrismaSchema = generatePrismaSchema;
4
+ function generatePrismaSchema(schema) {
5
+ const lines = [];
6
+ lines.push("datasource db {");
7
+ lines.push(' provider = "postgresql"');
8
+ lines.push(' url = env("DATABASE_URL")');
9
+ lines.push("}");
10
+ lines.push("");
11
+ lines.push("generator client {");
12
+ lines.push(' provider = "prisma-client-js"');
13
+ lines.push("}");
14
+ lines.push("");
15
+ for (const enm of schema.enums) {
16
+ lines.push(`enum ${enm.name} {`);
17
+ for (const value of enm.values) {
18
+ lines.push(` ${value}`);
19
+ }
20
+ lines.push("}");
21
+ lines.push("");
22
+ }
23
+ for (const model of schema.models) {
24
+ lines.push(`model ${model.name} {`);
25
+ for (const field of model.fields) {
26
+ if (field.relation && field.relation.isArray)
27
+ continue;
28
+ const prismaType = toPrismaType(field, schema);
29
+ const annotations = renderAnnotations(field, schema);
30
+ lines.push(` ${field.name} ${prismaType}${annotations}`);
31
+ }
32
+ for (const field of model.fields) {
33
+ if (field.relation && field.relation.isArray) {
34
+ lines.push(` ${field.name} ${field.relation.target}[]`);
35
+ }
36
+ }
37
+ lines.push("}");
38
+ lines.push("");
39
+ }
40
+ return lines.join("\n");
41
+ }
42
+ function toPrismaType(field, schema) {
43
+ if (field.relation && !field.relation.isArray) {
44
+ return field.relation.target;
45
+ }
46
+ const isEnum = schema.enums.some((e) => e.name === field.type);
47
+ if (isEnum) {
48
+ return field.type;
49
+ }
50
+ switch (field.type) {
51
+ case "string":
52
+ return "String";
53
+ case "number":
54
+ return "Int";
55
+ case "boolean":
56
+ return "Boolean";
57
+ case "uuid":
58
+ return "String";
59
+ case "datetime":
60
+ return "DateTime";
61
+ default:
62
+ return "String";
63
+ }
64
+ }
65
+ function renderAnnotations(field, schema) {
66
+ const parts = [];
67
+ let isId = false;
68
+ for (const c of field.constraints) {
69
+ if (c.type === "id") {
70
+ parts.push("@id");
71
+ isId = true;
72
+ }
73
+ if (c.type === "unique") {
74
+ parts.push("@unique");
75
+ }
76
+ if (c.type === "default") {
77
+ if (c.value === "uuid") {
78
+ parts.push("@default(uuid())");
79
+ }
80
+ else if (c.value === "now") {
81
+ parts.push("@default(now())");
82
+ }
83
+ else {
84
+ const isEnum = schema.enums.some((e) => e.values.includes(c.value));
85
+ if (isEnum) {
86
+ parts.push(`@default(${c.value})`);
87
+ }
88
+ else {
89
+ parts.push(`@default(${c.value})`);
90
+ }
91
+ }
92
+ }
93
+ }
94
+ if (!isId && field.type === "uuid" && !field.relation) {
95
+ parts.push("@default(uuid())");
96
+ }
97
+ if (field.relation && !field.relation.isArray && field.relation.field) {
98
+ parts.push(`@relation(fields: [${field.relation.field}], references: [id])`);
99
+ }
100
+ return parts.length > 0 ? ` ${parts.join(" ")}` : "";
101
+ }
@@ -0,0 +1,8 @@
1
+ import type { ForgerModel } from "@forgerapi/ast";
2
+ export declare function generateAbstractService(model: ForgerModel): string;
3
+ export declare function generateModelImpl(model: ForgerModel, options?: {
4
+ serviceRelative?: string;
5
+ createDtoRelative?: string;
6
+ updateDtoRelative?: string;
7
+ prismaRelative?: string;
8
+ }): string;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateAbstractService = generateAbstractService;
4
+ exports.generateModelImpl = generateModelImpl;
5
+ const utils_1 = require("../utils");
6
+ function generateAbstractService(model) {
7
+ const kebab = (0, utils_1.toKebab)(model.name);
8
+ const lines = [];
9
+ lines.push(`import { Create${model.name}Dto } from "./dto/create-${kebab}.dto";`);
10
+ lines.push(`import { Update${model.name}Dto } from "./dto/update-${kebab}.dto";`);
11
+ lines.push("");
12
+ lines.push(`export abstract class ${model.name}AbstractService {`);
13
+ lines.push("");
14
+ lines.push(` abstract create(dto: Create${model.name}Dto): Promise<any>;`);
15
+ lines.push("");
16
+ lines.push(" abstract findAll(): Promise<any>;");
17
+ lines.push("");
18
+ lines.push(" abstract findOne(id: string): Promise<any>;");
19
+ lines.push("");
20
+ lines.push(` abstract update(id: string, dto: Update${model.name}Dto): Promise<any>;`);
21
+ lines.push("");
22
+ lines.push(" abstract remove(id: string): Promise<any>;");
23
+ lines.push("");
24
+ lines.push("}");
25
+ return lines.join("\n");
26
+ }
27
+ function generateModelImpl(model, options) {
28
+ const kebab = (0, utils_1.toKebab)(model.name);
29
+ const sRel = options?.serviceRelative ?? `./${kebab}.service`;
30
+ const cRel = options?.createDtoRelative ?? `./dto/create-${kebab}.dto`;
31
+ const uRel = options?.updateDtoRelative ?? `./dto/update-${kebab}.dto`;
32
+ const pRel = options?.prismaRelative ?? "../common/prisma/prisma.service";
33
+ const lines = [];
34
+ lines.push(`import { Injectable } from "@nestjs/common";`);
35
+ lines.push(`import { PrismaService } from "${pRel}";`);
36
+ lines.push(`import { ${model.name}AbstractService } from "${sRel}";`);
37
+ lines.push(`import { Create${model.name}Dto } from "${cRel}";`);
38
+ lines.push(`import { Update${model.name}Dto } from "${uRel}";`);
39
+ lines.push("");
40
+ lines.push("@Injectable()");
41
+ lines.push(`export class ${model.name}ImplService extends ${model.name}AbstractService {`);
42
+ lines.push(" constructor(private readonly prisma: PrismaService) {");
43
+ lines.push(" super();");
44
+ lines.push(" }");
45
+ lines.push("");
46
+ lines.push(` async create(dto: Create${model.name}Dto): Promise<any> {`);
47
+ lines.push(` return this.prisma.${lowerFirst(model.name)}.create({ data: dto });`);
48
+ lines.push(" }");
49
+ lines.push("");
50
+ lines.push(" async findAll(): Promise<any> {");
51
+ lines.push(` return this.prisma.${lowerFirst(model.name)}.findMany();`);
52
+ lines.push(" }");
53
+ lines.push("");
54
+ lines.push(" async findOne(id: string): Promise<any> {");
55
+ lines.push(` return this.prisma.${lowerFirst(model.name)}.findUnique({ where: { id } });`);
56
+ lines.push(" }");
57
+ lines.push("");
58
+ lines.push(` async update(id: string, dto: Update${model.name}Dto): Promise<any> {`);
59
+ lines.push(` return this.prisma.${lowerFirst(model.name)}.update({ where: { id }, data: dto });`);
60
+ lines.push(" }");
61
+ lines.push("");
62
+ lines.push(" async remove(id: string): Promise<any> {");
63
+ lines.push(` return this.prisma.${lowerFirst(model.name)}.delete({ where: { id } });`);
64
+ lines.push(" }");
65
+ lines.push("");
66
+ lines.push("}");
67
+ return lines.join("\n");
68
+ }
69
+ function lowerFirst(s) {
70
+ return s.charAt(0).toLowerCase() + s.slice(1);
71
+ }
@@ -0,0 +1,21 @@
1
+ import type { ForgerSchema } from "@forgerapi/ast";
2
+ import { generateController } from "./generators/controller";
3
+ import { generateCreateDto, generateResponseDto, generateUpdateDto, type SwaggerConfig } from "./generators/dto";
4
+ import { generateEnum } from "./generators/enum";
5
+ import { generateModule } from "./generators/module";
6
+ import { generatePrismaSchema } from "./generators/prisma";
7
+ import { generatePrismaModule } from "./generators/prisma-module";
8
+ import { generatePrismaService } from "./generators/prisma-service";
9
+ import { generateAbstractService, generateModelImpl } from "./generators/service";
10
+ import { generateForgerModules } from "./generators/forger-modules";
11
+ export type { SwaggerConfig };
12
+ export { generateAbstractService, generateController, generateCreateDto, generateEnum, generateForgerModules, generateModelImpl, generateModule, generatePrismaModule, generatePrismaSchema, generatePrismaService, generateResponseDto, generateUpdateDto, };
13
+ export interface ForgerConfig {
14
+ outDir: string;
15
+ prismaSchema: string;
16
+ swagger?: boolean;
17
+ deleteOrphans?: boolean;
18
+ }
19
+ export declare function generate(schema: ForgerSchema, config: ForgerConfig): Promise<string[]>;
20
+ export declare function runForger(config: ForgerConfig): Promise<string[]>;
21
+ export declare function watchForger(config: ForgerConfig): void;