@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
|
@@ -23,12 +23,9 @@ class AutoBeInterfaceCompiler {
|
|
|
23
23
|
compile(document) {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const swagger = createOpenApiDocument(document);
|
|
26
|
-
const migrate = migrate_1.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
throw new Error("Failed to pass validation.");
|
|
30
|
-
}
|
|
31
|
-
const compiled = migrate.data.nest({
|
|
26
|
+
const migrate = new migrate_1.NestiaMigrateApplication(swagger);
|
|
27
|
+
const files = migrate.nest({
|
|
28
|
+
keyword: true,
|
|
32
29
|
simulate: true,
|
|
33
30
|
e2e: true,
|
|
34
31
|
author: {
|
|
@@ -36,12 +33,12 @@ class AutoBeInterfaceCompiler {
|
|
|
36
33
|
value: "Generated by AutoBE - https://github.com/wrtnlabs/autobe",
|
|
37
34
|
},
|
|
38
35
|
});
|
|
39
|
-
return Object.assign(Object.assign({}, Object.fromEntries(yield ArrayUtil_1.ArrayUtil.asyncMap(
|
|
36
|
+
return Object.assign(Object.assign({}, Object.fromEntries(yield ArrayUtil_1.ArrayUtil.asyncMap(Object.entries(files), (_a) => __awaiter(this, [_a], void 0, function* ([key, value]) {
|
|
40
37
|
return [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
? yield beautify(
|
|
44
|
-
:
|
|
38
|
+
key,
|
|
39
|
+
key.endsWith(".ts") && key.endsWith(".d.ts") === false
|
|
40
|
+
? yield beautify(value)
|
|
41
|
+
: value,
|
|
45
42
|
];
|
|
46
43
|
})))), { "packages/api/swagger.json": JSON.stringify(swagger, null, 2), "README.md": "# AutoBE Generated Backend Server\n\n\n\nA backend repository generated by [`@autobe`](https://github.com/wrtnlabs/autobe).\n\nThis backend program was automatically generated using [`@autobe`](https://github.com/wrtnlabs/autobe), the AI vibe coding agent for backend servers of below stack.\n\n- TypeScript\n- NestJS / Nestia\n- Prisma\n- Postgres\n\n## Project Structure\n\nThis template project has categorized directories like below.\n\nAs you can see from the below, all of the Backend source files are placed into the [src](src/) directory. When you build the TypeScript source files, compiled files would be placed into the `lib` directory following the [tsconfig.json](tsconfig.json) configuration. Otherwise you build client [SDK](#32-sdk) library for npm publishing and their compiled files would be placed into the [packages](packages) directory.\n\n - [packages/api/](packages/api): SDK module built by `npm run build:api`\n - [src/](src): Backend source directory\n - [src/api/](src/api/): Client SDK that would be published to the `@ORGANIZATION/PROJECT-api`\n - [**src/api/functional/**](src/api/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [**src/api/structures/**](src/api/structures/): DTO structures\n - [src/controllers/](src/controllers/): Controller classes of the Main Program\n - [**test/**](test): Test Automation Program\n - [test/features](test/features): List of test functions\n - [nestia.config.ts](nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [package.json](package.json): NPM configuration\n - [tsconfig.json](tsconfig.json): TypeScript configuration for the main program\n\n## NPM Run Commands\n\nList of the run commands defined in the [package.json](package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything\n - `build:main`: Build main program (`src` directory)\n - `build:test` Build test automation program (`test` directory)\n - `build:sdk`: Build SDK into main program only\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental build for development (test program)\n - Deploy\n - `package:api`: Build and deploy the SDK library to the NPM\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\n## Specialization\n\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|--------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL" /* AutoBeCompilerConstants.README */ });
|
|
47
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeInterfaceCompiler.js","sourceRoot":"","sources":["../src/AutoBeInterfaceCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"AutoBeInterfaceCompiler.js","sourceRoot":"","sources":["../src/AutoBeInterfaceCompiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6CAA2D;AAC3D,8CAAwD;AACxD,yGAA+D;AAC/D,sDAA8B;AAC9B,uCAAkC;AAGlC,iDAA8C;AAE9C,MAAa,uBAAuB;IACrB,OAAO,CAClB,QAAiC;;YAEjC,MAAM,OAAO,GAAsB,qBAAqB,CAAC,QAAQ,CAAC,CAAC;YACnE,MAAM,OAAO,GAA6B,IAAI,kCAAwB,CACpE,OAAO,CACR,CAAC;YACF,MAAM,KAAK,GAA2B,OAAO,CAAC,IAAI,CAAC;gBACjD,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,GAAG,EAAE,IAAI;gBACT,MAAM,EAAE;oBACN,GAAG,EAAE,QAAQ;oBACb,KAAK,EAAE,0DAA0D;iBAClE;aACF,CAAC,CAAC;YACH,uCACK,MAAM,CAAC,WAAW,CACnB,MAAM,qBAAS,CAAC,QAAQ,CACtB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EACrB,KAAqB,EAAE,0CAAhB,CAAC,GAAG,EAAE,KAAK,CAAC;gBAAK,OAAA;oBACtB,GAAG;oBACH,GAAG,CAAC,QAAQ,CAAC,KAAK,CA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