@redocly/openapi-core
Advanced tools
Comparing version 0.0.0-snapshot.1737554067 to 0.0.0-snapshot.1737556585
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RegistryApi = void 0; | ||
const node_fetch_1 = require("node-fetch"); | ||
const utils_1 = require("../utils"); | ||
@@ -33,3 +32,8 @@ const domains_1 = require("./domains"); | ||
} | ||
const response = await (0, node_fetch_1.default)(`${this.getBaseUrl()}${path}`, Object.assign({}, options, { headers, agent: (0, utils_1.getProxyAgent)() })); | ||
const requestOptions = { | ||
...options, | ||
headers, | ||
agent: (0, utils_1.getProxyAgent)(), | ||
}; | ||
const response = await fetch(`${this.getBaseUrl()}${path}`, requestOptions); | ||
if (response.status === 401) { | ||
@@ -36,0 +40,0 @@ throw new Error('Unauthorized'); |
@@ -43,3 +43,2 @@ "use strict"; | ||
const minimatch = require("minimatch"); | ||
const node_fetch_1 = require("node-fetch"); | ||
const js_yaml_1 = require("./js-yaml"); | ||
@@ -95,3 +94,3 @@ const env_1 = require("./env"); | ||
} | ||
const req = await (config.customFetch || node_fetch_1.default)(url, { | ||
const req = await (config.customFetch || fetch)(url, { | ||
headers: headers, | ||
@@ -98,0 +97,0 @@ }); |
{ | ||
"name": "@redocly/openapi-core", | ||
"version": "0.0.0-snapshot.1737554067", | ||
"version": "0.0.0-snapshot.1737556585", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"engines": { | ||
"node": ">=14.19.0", | ||
"npm": ">=7.0.0" | ||
"node": ">=18.17.0", | ||
"npm": ">=10.8.2" | ||
}, | ||
@@ -20,3 +20,2 @@ "engineStrict": true, | ||
"os": false, | ||
"node-fetch": false, | ||
"colorette": false, | ||
@@ -42,7 +41,6 @@ "https-proxy-agent": false | ||
"colorette": "^1.2.0", | ||
"https-proxy-agent": "^7.0.4", | ||
"https-proxy-agent": "^7.0.5", | ||
"js-levenshtein": "^1.1.6", | ||
"js-yaml": "^4.1.0", | ||
"minimatch": "^5.0.1", | ||
"node-fetch": "^2.6.1", | ||
"pluralize": "^8.0.0", | ||
@@ -55,4 +53,2 @@ "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", | ||
@@ -59,0 +55,0 @@ "json-schema-to-ts": "^3.1.0", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
9
6
16261
645597
4
- Removednode-fetch@^2.6.1
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updatedhttps-proxy-agent@^7.0.5