Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestia/migrate

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestia/migrate - npm Package Compare versions

Comparing version 0.11.2 to 0.11.3

3

lib/MigrateApplication.d.ts

@@ -5,3 +5,2 @@ import { IValidation } from "typia";

import { ISwagger } from "./structures/ISwagger";
import { ISwaggerV20 } from "./structures/ISwaggerV20";
import { ISwaggerV31 } from "./structures/ISwaggerV31";

@@ -11,3 +10,3 @@ export declare class MigrateApplication {

private constructor();
static create(swagger: ISwagger | ISwaggerV20 | ISwaggerV31): Promise<IValidation<MigrateApplication>>;
static create(swagger: ISwagger | ISwaggerV31): Promise<IValidation<MigrateApplication>>;
nest(config: MigrateApplication.IConfig): MigrateApplication.IOutput;

@@ -14,0 +13,0 @@ sdk(config: MigrateApplication.IConfig): MigrateApplication.IOutput;

import { ISwagger } from "../structures/ISwagger";
import { ISwaggerV20 } from "../structures/ISwaggerV20";
import { ISwaggerV31 } from "../structures/ISwaggerV31";
export declare namespace OpenApiConverter {
const v2_0: (swagger: ISwaggerV20) => Promise<ISwagger>;
const v3_1: (swagger: ISwaggerV31) => ISwagger;
}
{
"name": "@nestia/migrate",
"version": "0.11.2",
"version": "0.11.3",
"description": "Migration program from swagger to NestJS",

@@ -48,3 +48,2 @@ "main": "lib/index.js",

"@types/node": "^20.3.3",
"@types/swagger2openapi": "^7.0.4",
"dotenv": "^16.3.1",

@@ -64,3 +63,2 @@ "dotenv-expand": "^10.0.0",

"prettier": "^3.2.5",
"swagger2openapi": "^7.0.8",
"tstl": "^2.5.13",

@@ -67,0 +65,0 @@ "typescript": "^5.4.2",

@@ -13,3 +13,2 @@ import typia, { IValidation } from "typia";

import { ISwagger } from "./structures/ISwagger";
import { ISwaggerV20 } from "./structures/ISwaggerV20";
import { ISwaggerV31 } from "./structures/ISwaggerV31";

@@ -22,9 +21,7 @@ import { OpenApiConverter } from "./utils/OpenApiConverter";

public static async create(
swagger: ISwagger | ISwaggerV20 | ISwaggerV31,
swagger: ISwagger | ISwaggerV31,
): Promise<IValidation<MigrateApplication>> {
swagger = typia.is<ISwaggerV20.IVersion>(swagger)
? await OpenApiConverter.v2_0(swagger)
: typia.is<ISwaggerV31.IVersion>(swagger)
? OpenApiConverter.v3_1(swagger)
: swagger;
swagger = typia.is<ISwaggerV31.IVersion>(swagger)
? OpenApiConverter.v3_1(swagger)
: swagger;
const result = typia.validate<ISwagger>(swagger);

@@ -31,0 +28,0 @@ if (result.success === false) return result;

@@ -1,6 +0,6 @@

import V2_0Converter from "swagger2openapi";
// import V2_0Converter from "swagger2openapi";
import typia from "typia";
import { ISwagger } from "../structures/ISwagger";
import { ISwaggerV20 } from "../structures/ISwaggerV20";
// import { ISwaggerV20 } from "../structures/ISwaggerV20";
import { ISwaggerV31 } from "../structures/ISwaggerV31";

@@ -10,6 +10,6 @@ import { Converter as V3_1Converter } from "./openapi-down-convert/converter";

export namespace OpenApiConverter {
export const v2_0 = async (swagger: ISwaggerV20): Promise<ISwagger> => {
const output = await V2_0Converter.convertObj(swagger, {});
return typia.assert<ISwagger>(output.openapi);
};
// export const v2_0 = async (swagger: ISwaggerV20): Promise<ISwagger> => {
// const output = await V2_0Converter.convertObj(swagger, {});
// return typia.assert<ISwagger>(output.openapi);
// };

@@ -16,0 +16,0 @@ export const v3_1 = (swagger: ISwaggerV31): ISwagger => {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc