Socket
Book a DemoInstallSign in
Socket

@redocly/openapi-core

Package Overview
Dependencies
Maintainers
7
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redocly/openapi-core - npm Package Compare versions

Comparing version

to
0.0.0-snapshot.1737627998

8

lib/redocly/registry-api.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegistryApi = void 0;
const node_fetch_1 = require("node-fetch");
const utils_1 = require("../utils");

@@ -32,8 +33,3 @@ const domains_1 = require("./domains");

}
const requestOptions = {
...options,
headers,
agent: (0, utils_1.getProxyAgent)(),
};
const response = await fetch(`${this.getBaseUrl()}${path}`, requestOptions);
const response = await (0, node_fetch_1.default)(`${this.getBaseUrl()}${path}`, Object.assign({}, options, { headers, agent: (0, utils_1.getProxyAgent)() }));
if (response.status === 401) {

@@ -40,0 +36,0 @@ throw new Error('Unauthorized');

@@ -6,2 +6,3 @@ "use strict";

const _2020_1 = require("@redocly/ajv/dist/2020");
const ajv_formats_1 = require("ajv-formats");
const ref_utils_1 = require("../ref-utils");

@@ -23,3 +24,3 @@ let ajvInstance = null;

allowUnionTypes: true,
validateFormats: false, // TODO: fix it
validateFormats: true,
defaultUnevaluatedProperties: allowAdditionalProperties,

@@ -34,2 +35,3 @@ loadSchemaSync(base, $ref, $id) {

});
(0, ajv_formats_1.default)(ajvInstance); // FIXME: type mismatch
}

@@ -36,0 +38,0 @@ return ajvInstance;

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

}
if (isMultiple && typeof example.value === 'undefined') {
if (isMultiple && typeof example?.value === 'undefined') {
return;

@@ -33,0 +33,0 @@ }

@@ -43,2 +43,3 @@ "use strict";

const minimatch = require("minimatch");
const node_fetch_1 = require("node-fetch");
const js_yaml_1 = require("./js-yaml");

@@ -94,3 +95,3 @@ const env_1 = require("./env");

}
const req = await (config.customFetch || fetch)(url, {
const req = await (config.customFetch || node_fetch_1.default)(url, {
headers: headers,

@@ -97,0 +98,0 @@ });

{
"name": "@redocly/openapi-core",
"version": "0.0.0-snapshot.1737556585",
"version": "0.0.0-snapshot.1737627998",
"description": "",
"main": "lib/index.js",
"engines": {
"node": ">=18.17.0",
"npm": ">=10.8.2"
"node": ">=14.19.0",
"npm": ">=7.0.0"
},

@@ -20,2 +20,3 @@ "engineStrict": true,

"os": false,
"node-fetch": false,
"colorette": false,

@@ -40,7 +41,9 @@ "https-proxy-agent": false

"@redocly/config": "^0.20.1",
"ajv-formats": "^3.0.1",
"colorette": "^1.2.0",
"https-proxy-agent": "^7.0.5",
"https-proxy-agent": "^7.0.4",
"js-levenshtein": "^1.1.6",
"js-yaml": "^4.1.0",
"minimatch": "^5.0.1",
"node-fetch": "^2.6.1",
"pluralize": "^8.0.0",

@@ -53,2 +56,4 @@ "yaml-ast-parser": "0.0.43"

"@types/minimatch": "^3.0.5",
"@types/node": "^20.11.5",
"@types/node-fetch": "^2.5.7",
"@types/pluralize": "^0.0.29",

@@ -55,0 +60,0 @@ "json-schema-to-ts": "^3.1.0",

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.