@autobe/compiler 0.4.3 → 0.5.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/lib/AutoBeInterfaceCompiler.js +8 -11
- package/lib/AutoBeInterfaceCompiler.js.map +1 -1
- package/lib/raw/external.json +260 -52
- package/package.json +4 -4
- package/src/AutoBeInterfaceCompiler.ts +15 -15
- package/src/raw/external.json +260 -52
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/compiler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "AI backend server code generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"url": "https://github.com/wrtnlabs/autobe/issues"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@nestia/core": "
|
|
17
|
-
"@nestia/migrate": "
|
|
16
|
+
"@nestia/core": "7.0.0-dev.20250608",
|
|
17
|
+
"@nestia/migrate": "7.0.0-dev.20250608",
|
|
18
18
|
"@samchon/openapi": "^4.3.3",
|
|
19
19
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
20
20
|
"embed-prisma": "^1.1.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prisma-markdown": "^3.0.0",
|
|
26
26
|
"tstl": "^3.0.0",
|
|
27
27
|
"typia": "^9.3.1",
|
|
28
|
-
"@autobe/interface": "^0.
|
|
28
|
+
"@autobe/interface": "^0.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.15.3",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { AutoBeOpenApi, IAutoBeInterfaceCompiler } from "@autobe/interface";
|
|
2
|
-
import {
|
|
2
|
+
import { NestiaMigrateApplication } from "@nestia/migrate";
|
|
3
3
|
import { OpenApi, OpenApiV3_1 } from "@samchon/openapi";
|
|
4
4
|
import sortImport from "@trivago/prettier-plugin-sort-imports";
|
|
5
5
|
import import2 from "import2";
|
|
6
6
|
import { format } from "prettier";
|
|
7
|
-
import { IValidation } from "typia";
|
|
8
7
|
|
|
9
8
|
import { AutoBeCompilerConstants } from "./raw/AutoBeCompilerConstants";
|
|
10
9
|
import { ArrayUtil } from "./utils/ArrayUtil";
|
|
@@ -14,13 +13,11 @@ export class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
|
14
13
|
document: AutoBeOpenApi.IDocument,
|
|
15
14
|
): Promise<Record<string, string>> {
|
|
16
15
|
const swagger: OpenApi.IDocument = createOpenApiDocument(document);
|
|
17
|
-
const migrate:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
const compiled: MigrateApplication.IOutput = migrate.data.nest({
|
|
16
|
+
const migrate: NestiaMigrateApplication = new NestiaMigrateApplication(
|
|
17
|
+
swagger,
|
|
18
|
+
);
|
|
19
|
+
const files: Record<string, string> = migrate.nest({
|
|
20
|
+
keyword: true,
|
|
24
21
|
simulate: true,
|
|
25
22
|
e2e: true,
|
|
26
23
|
author: {
|
|
@@ -30,12 +27,15 @@ export class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
|
|
|
30
27
|
});
|
|
31
28
|
return {
|
|
32
29
|
...Object.fromEntries(
|
|
33
|
-
await ArrayUtil.asyncMap(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
await ArrayUtil.asyncMap(
|
|
31
|
+
Object.entries(files),
|
|
32
|
+
async ([key, value]) => [
|
|
33
|
+
key,
|
|
34
|
+
key.endsWith(".ts") && key.endsWith(".d.ts") === false
|
|
35
|
+
? await beautify(value)
|
|
36
|
+
: value,
|
|
37
|
+
],
|
|
38
|
+
),
|
|
39
39
|
),
|
|
40
40
|
"packages/api/swagger.json": JSON.stringify(swagger, null, 2),
|
|
41
41
|
"README.md": AutoBeCompilerConstants.README,
|