@nestia/migrate 0.11.1 → 0.11.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiConverter.js","sourceRoot":"","sources":["../../src/utils/OpenApiConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sEAA4C;AAC5C,kDAA0B;AAK1B,gEAA8E;AAE9E,IAAiB,gBAAgB,CAUhC;AAVD,WAAiB,gBAAgB;IAClB,qBAAI,GAAG,CAAO,OAAoB,EAAqB,EAAE;QACpE,MAAM,MAAM,GAAG,MAAM,yBAAa,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAO,eAAK,CAAC,MAAM;kCAAZ,eAAK,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAW,SAAS,CAAC,OAAO,EAAc,EAAE;IACjE,CAAC,CAAC;AACJ,CAAC,EAVgB,gBAAgB,gCAAhB,gBAAgB,QAUhC"}
package/package.json CHANGED
@@ -1,78 +1,75 @@
1
- {
2
- "name": "@nestia/migrate",
3
- "version": "0.11.1",
4
- "description": "Migration program from swagger to NestJS",
5
- "main": "lib/index.js",
6
- "typings": "lib/index.d.ts",
7
- "bin": {
8
- "@nestia/migrate": "lib/executable/migrate.js"
9
- },
10
- "scripts": {
11
- "build": "rimraf lib && tsc",
12
- "bundle": "ts-node src/executable/bundle.ts",
13
- "dev": "npm run build -- --watch",
14
- "package:next": "npm publish --access public --tag next",
15
- "prepare": "ts-patch install && typia patch && npm run bundle",
16
- "test": "node lib/test"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/samchon/nestia"
21
- },
22
- "keywords": [
23
- "migration",
24
- "swagger",
25
- "NestJS",
26
- "nestia",
27
- "SDK",
28
- "Mockup Simulator"
29
- ],
30
- "author": "Jeongho Nam",
31
- "license": "MIT",
32
- "bugs": {
33
- "url": "https://github.com/samchon/nestia/issues"
34
- },
35
- "homepage": "https://nestia.io",
36
- "devDependencies": {
37
- "@nestia/core": "^2.6.0",
38
- "@nestia/e2e": "^0.4.1",
39
- "@nestia/fetcher": "^2.6.0",
40
- "@nestjs/common": "^10.3.5",
41
- "@nestjs/core": "^10.3.5",
42
- "@nestjs/platform-express": "^10.3.5",
43
- "@nestjs/platform-fastify": "^10.3.5",
44
- "@trivago/prettier-plugin-sort-imports": "^4.3.0",
45
- "@types/express": "^4.17.21",
46
- "@types/inquirer": "^9.0.7",
47
- "@types/node": "^20.3.3",
48
- "@types/swagger2openapi": "^7.0.4",
49
- "dotenv": "^16.3.1",
50
- "dotenv-expand": "^10.0.0",
51
- "rimraf": "^5.0.1",
52
- "serialize-error": "^4.1.0",
53
- "source-map-support": "^0.5.21",
54
- "ts-node": "^10.9.1",
55
- "ts-patch": "^3.1.0",
56
- "typescript-transform-paths": "^3.4.6"
57
- },
58
- "dependencies": {
59
- "@apiture/openapi-down-convert": "^0.13.0",
60
- "commander": "10.0.0",
61
- "inquirer": "8.2.5",
62
- "openapi-types": "^12.1.3",
63
- "prettier": "^3.2.5",
64
- "swagger2openapi": "^7.0.8",
65
- "tstl": "^2.5.13",
66
- "typescript": "^5.4.2",
67
- "typia": "^5.5.7"
68
- },
69
- "files": [
70
- "lib",
71
- "src",
72
- "!lib/test",
73
- "!src/test",
74
- "package.json",
75
- "README.md",
76
- "LICENSE"
77
- ]
78
- }
1
+ {
2
+ "name": "@nestia/migrate",
3
+ "version": "0.11.3",
4
+ "description": "Migration program from swagger to NestJS",
5
+ "main": "lib/index.js",
6
+ "typings": "lib/index.d.ts",
7
+ "bin": {
8
+ "@nestia/migrate": "lib/executable/migrate.js"
9
+ },
10
+ "scripts": {
11
+ "build": "rimraf lib && tsc",
12
+ "bundle": "ts-node src/executable/bundle.ts",
13
+ "dev": "npm run build -- --watch",
14
+ "package:next": "npm publish --access public --tag next",
15
+ "prepare": "ts-patch install && typia patch && npm run bundle",
16
+ "test": "node lib/test"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/samchon/nestia"
21
+ },
22
+ "keywords": [
23
+ "migration",
24
+ "swagger",
25
+ "NestJS",
26
+ "nestia",
27
+ "SDK",
28
+ "Mockup Simulator"
29
+ ],
30
+ "author": "Jeongho Nam",
31
+ "license": "MIT",
32
+ "bugs": {
33
+ "url": "https://github.com/samchon/nestia/issues"
34
+ },
35
+ "homepage": "https://nestia.io",
36
+ "devDependencies": {
37
+ "@nestia/core": "^2.6.0",
38
+ "@nestia/e2e": "^0.4.1",
39
+ "@nestia/fetcher": "^2.6.0",
40
+ "@nestjs/common": "^10.3.5",
41
+ "@nestjs/core": "^10.3.5",
42
+ "@nestjs/platform-express": "^10.3.5",
43
+ "@nestjs/platform-fastify": "^10.3.5",
44
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
45
+ "@types/express": "^4.17.21",
46
+ "@types/inquirer": "^9.0.7",
47
+ "@types/node": "^20.3.3",
48
+ "dotenv": "^16.3.1",
49
+ "dotenv-expand": "^10.0.0",
50
+ "rimraf": "^5.0.1",
51
+ "serialize-error": "^4.1.0",
52
+ "source-map-support": "^0.5.21",
53
+ "ts-node": "^10.9.1",
54
+ "ts-patch": "^3.1.0",
55
+ "typescript-transform-paths": "^3.4.6"
56
+ },
57
+ "dependencies": {
58
+ "commander": "10.0.0",
59
+ "inquirer": "8.2.5",
60
+ "openapi-types": "^12.1.3",
61
+ "prettier": "^3.2.5",
62
+ "tstl": "^2.5.13",
63
+ "typescript": "^5.4.2",
64
+ "typia": "^5.5.7"
65
+ },
66
+ "files": [
67
+ "lib",
68
+ "src",
69
+ "!lib/test",
70
+ "!src/test",
71
+ "package.json",
72
+ "README.md",
73
+ "LICENSE"
74
+ ]
75
+ }
@@ -10,7 +10,6 @@ import { MigrateNestProgrammer } from "./programmers/MigrateNestProgrammer";
10
10
  import { IMigrateFile } from "./structures/IMigrateFile";
11
11
  import { IMigrateProgram } from "./structures/IMigrateProgram";
12
12
  import { ISwagger } from "./structures/ISwagger";
13
- import { ISwaggerV20 } from "./structures/ISwaggerV20";
14
13
  import { ISwaggerV31 } from "./structures/ISwaggerV31";
15
14
  import { OpenApiConverter } from "./utils/OpenApiConverter";
16
15
 
@@ -18,13 +17,11 @@ export class MigrateApplication {
18
17
  private constructor(public readonly swagger: ISwagger) {}
19
18
 
20
19
  public static async create(
21
- swagger: ISwagger | ISwaggerV20 | ISwaggerV31,
20
+ swagger: ISwagger | ISwaggerV31,
22
21
  ): Promise<IValidation<MigrateApplication>> {
23
- swagger = typia.is<ISwaggerV20.IVersion>(swagger)
24
- ? await OpenApiConverter.v2_0(swagger)
25
- : typia.is<ISwaggerV31.IVersion>(swagger)
26
- ? OpenApiConverter.v3_1(swagger)
27
- : swagger;
22
+ swagger = typia.is<ISwaggerV31.IVersion>(swagger)
23
+ ? OpenApiConverter.v3_1(swagger)
24
+ : swagger;
28
25
  const result = typia.validate<ISwagger>(swagger);
29
26
  if (result.success === false) return result;
30
27
  return {
@@ -1,16 +1,16 @@
1
- import V2_0Converter from "swagger2openapi";
1
+ // import V2_0Converter from "swagger2openapi";
2
2
  import typia from "typia";
3
3
 
4
4
  import { ISwagger } from "../structures/ISwagger";
5
- import { ISwaggerV20 } from "../structures/ISwaggerV20";
5
+ // import { ISwaggerV20 } from "../structures/ISwaggerV20";
6
6
  import { ISwaggerV31 } from "../structures/ISwaggerV31";
7
7
  import { Converter as V3_1Converter } from "./openapi-down-convert/converter";
8
8
 
9
9
  export namespace OpenApiConverter {
10
- export const v2_0 = async (swagger: ISwaggerV20): Promise<ISwagger> => {
11
- const output = await V2_0Converter.convertObj(swagger, {});
12
- return typia.assert<ISwagger>(output.openapi);
13
- };
10
+ // export const v2_0 = async (swagger: ISwaggerV20): Promise<ISwagger> => {
11
+ // const output = await V2_0Converter.convertObj(swagger, {});
12
+ // return typia.assert<ISwagger>(output.openapi);
13
+ // };
14
14
 
15
15
  export const v3_1 = (swagger: ISwaggerV31): ISwagger => {
16
16
  const converter = new V3_1Converter(swagger);