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

@stepzen/fetch

Package Overview
Dependencies
Maintainers
0
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stepzen/fetch - npm Package Compare versions

Comparing version 0.45.0-experimental.8333304 to 0.45.0-experimental.199b9ab

4

lib/index.d.ts

@@ -1,4 +0,4 @@

import type { RequestInfo, RequestInit, Response } from 'node-fetch';
declare const fetch: (url: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
import { RequestInfo, RequestInit, Response } from 'node-fetch';
declare const fetch: (url: RequestInfo, init?: RequestInit) => Promise<Response>;
export default fetch;
//# sourceMappingURL=index.d.ts.map
// Copyright IBM Corp. 2020, 2024
import { Agent as HttpAgent } from 'node:http';
import { Agent as HttpsAgent } from 'node:https';
import fetch0 from 'node-fetch';
import fetchCJSModule from 'node-fetch';
// workaround for https://github.com/steprz/stepzen-cli/issues/934

@@ -27,3 +27,3 @@ const httpAgent = new HttpAgent({

}
return fetch0(url, {
return fetchCJSModule.default(url, {
agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent,

@@ -30,0 +30,0 @@ ...init,

{
"name": "@stepzen/fetch",
"description": "StepZen implementation of the fetch() API for NodeJS",
"version": "0.45.0-experimental.8333304",
"version": "0.45.0-experimental.199b9ab",
"author": "StepZen Ltd",

@@ -26,3 +26,3 @@ "license": "MIT",

"debug": "^4.3.4",
"node-fetch": "^3.3.2"
"node-fetch": "^2.6.9"
},

@@ -34,2 +34,3 @@ "devDependencies": {

"@types/mocha": "^10.0.9",
"@types/node-fetch": "^2.6.2",
"chai": "^4.3.10",

@@ -50,3 +51,3 @@ "fancy-test": "^1.4.10",

},
"gitHead": "83333044828d7a82d7dd0ad61a462be8eee23522"
"gitHead": "199b9abe643fdf9b00776cd13d02cec593f3f5ea"
}
// Copyright IBM Corp. 2020, 2024
import type {RequestInfo, RequestInit, Response} from 'node-fetch'
import {Agent as HttpAgent} from 'node:http'
import {Agent as HttpsAgent} from 'node:https'
import fetch0 from 'node-fetch'
import fetchCJSModule from 'node-fetch'
import {RequestInfo, RequestInit, Response} from 'node-fetch'

@@ -23,3 +22,3 @@ // workaround for https://github.com/steprz/stepzen-cli/issues/934

const fetch = async (
url: RequestInfo | URL,
url: RequestInfo,
init?: RequestInit,

@@ -36,3 +35,3 @@ ): Promise<Response> => {

return fetch0(url, {
return fetchCJSModule.default(url, {
agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent,

@@ -39,0 +38,0 @@ ...init,

Sorry, the diff of this file is not supported yet

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