oas-normalize
Advanced tools
Comparing version 11.1.2 to 11.1.3
@@ -9,6 +9,6 @@ import { | ||
stringToJSON | ||
} from "./chunk-5SLQ5SI2.js"; | ||
} from "./chunk-XOS5M44Y.js"; | ||
// src/index.ts | ||
import fs from "fs"; | ||
import fs from "node:fs"; | ||
import openapiParser from "@readme/openapi-parser"; | ||
@@ -36,4 +36,3 @@ import postmanToOpenAPI from "@readme/postman-to-openapi"; | ||
async load() { | ||
if (this.cache.load) | ||
return Promise.resolve(this.cache.load); | ||
if (this.cache.load) return Promise.resolve(this.cache.load); | ||
const resolve = (obj) => { | ||
@@ -80,4 +79,3 @@ const ret = stringToJSON(obj); | ||
async bundle() { | ||
if (this.cache.bundle) | ||
return Promise.resolve(this.cache.bundle); | ||
if (this.cache.bundle) return Promise.resolve(this.cache.bundle); | ||
return this.load().then((schema) => { | ||
@@ -98,4 +96,3 @@ if (isPostman(schema)) { | ||
async deref() { | ||
if (this.cache.deref) | ||
return Promise.resolve(this.cache.deref); | ||
if (this.cache.deref) return Promise.resolve(this.cache.deref); | ||
return this.load().then((schema) => { | ||
@@ -102,0 +99,0 @@ if (isPostman(schema)) { |
@@ -11,3 +11,3 @@ import { | ||
stringToJSON | ||
} from "../chunk-5SLQ5SI2.js"; | ||
} from "../chunk-XOS5M44Y.js"; | ||
export { | ||
@@ -14,0 +14,0 @@ getAPIDefinitionType, |
{ | ||
"name": "oas-normalize", | ||
"version": "11.1.2", | ||
"version": "11.1.3", | ||
"description": "Tooling for converting, validating, and parsing OpenAPI, Swagger, and Postman API definitions", | ||
@@ -62,3 +62,3 @@ "type": "module", | ||
"prepack": "npm run build", | ||
"test": "vitest run --coverage" | ||
"test": "echo 'Please run tests from the root!' && exit 1" | ||
}, | ||
@@ -77,3 +77,2 @@ "license": "MIT", | ||
"@types/swagger2openapi": "^7.0.4", | ||
"@vitest/coverage-v8": "^1.4.0", | ||
"eslint": "^8.57.0", | ||
@@ -83,6 +82,6 @@ "nock": "^14.0.0-beta.12", | ||
"typescript": "^5.1.6", | ||
"vitest": "^1.4.0" | ||
"vitest": "^2.1.3" | ||
}, | ||
"prettier": "@readme/eslint-config/prettier", | ||
"gitHead": "42c2a5d5696a0189c275bb70ce69513a77c53d21" | ||
"gitHead": "f93cd1cb438a034420311a6451b194fa3ae6de4b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
68257
8
1
611