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

@bpinternal/opapi

Package Overview
Dependencies
Maintainers
6
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpinternal/opapi - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

0

dist/index.d.ts

@@ -0,0 +0,0 @@ import { OpenApiZodAny, extendApi } from '@anatine/zod-openapi';

24

dist/index.js

@@ -49,3 +49,3 @@ "use strict";

var defaultResponseStatus = 200;
var tsFileHeader = "// This file was generated by the Opapi Generator\n/* eslint-disable */\n// @ts-nocheck";
var tsFileHeader = "// This file was generated by the Opapi Generator\n/* eslint-disable */\n";
var invalidLine = "import { URL, URLSearchParams } from 'url';";

@@ -444,4 +444,3 @@

useSingleRequestParameter: true,
withNodeImports: false,
withInterfaces: true
withNodeImports: false
});

@@ -463,6 +462,3 @@ const buffer = await client.downloadClient(id);

// src/generators/errors.ts
function generateErrors(errors) {
const types = errors.map((error) => error.type);
return `
const codes = {
var codes = {
HTTP_STATUS_BAD_REQUEST: 400,

@@ -474,6 +470,18 @@ HTTP_STATUS_UNAUTHORIZED: 401,

HTTP_STATUS_METHOD_NOT_ALLOWED: 405,
HTTP_STATUS_REQUEST_TIMEOUT: 408,
HTTP_STATUS_CONFLICT: 409,
HTTP_STATUS_PAYLOAD_TOO_LARGE: 413,
HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: 415,
HTTP_STATUS_TOO_MANY_REQUESTS: 429,
HTTP_STATUS_INTERNAL_SERVER_ERROR: 500,
HTTP_STATUS_NOT_IMPLEMENTED: 501,
HTTP_STATUS_BAD_GATEWAY: 502,
HTTP_STATUS_SERVICE_UNAVAILABLE: 503,
HTTP_STATUS_GATEWAY_TIMEOUT: 504
};
function generateErrors(errors) {
const types = errors.map((error) => error.type);
return `
const codes = {
${Object.entries(codes).map(([name, code]) => ` ${name}: ${code},`).join("\n")}
} as const

@@ -508,3 +516,3 @@

export const isApiError = (thrown: unknown): thrown is ApiError => {
return thrown instanceof BaseApiError || isObject(thrown) && thrown.isApiError === true
return thrown instanceof BaseApiError || isObject(thrown) && (thrown as ApiError).isApiError === true
}

@@ -511,0 +519,0 @@

{
"name": "@bpinternal/opapi",
"version": "0.1.2",
"version": "0.1.3",
"description": "",

@@ -15,2 +15,7 @@ "main": "./dist/index.js",

},
"scripts": {
"test:e2e": "vitest",
"build": "tsup src/index.ts --dts --format cjs,esm --clean",
"type-check": "tsc --noEmit"
},
"devDependencies": {

@@ -47,8 +52,3 @@ "tsup": "^6.7.0",

"author": "",
"license": "ISC",
"scripts": {
"test:e2e": "vitest",
"build": "tsup src/index.ts --dts --format cjs,esm --clean",
"type-check": "tsc --noEmit"
}
}
"license": "ISC"
}

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