@stepzen/fetch 0.58.0-experimental.a42e35b → 0.58.0-experimental.a56f2f6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stepzen/fetch",
3
3
  "description": "StepZen implementation of the fetch() API for NodeJS",
4
- "version": "0.58.0-experimental.a42e35b",
4
+ "version": "0.58.0-experimental.a56f2f6",
5
5
  "author": "StepZen Ltd",
6
6
  "license": "MIT",
7
7
  "files": [
@@ -50,5 +50,5 @@
50
50
  "brace-expansion": "^2.0.2"
51
51
  }
52
52
  },
53
- "gitHead": "a42e35b7d67edd2bbf60570e53e68259ef046f1b"
53
+ "gitHead": "a56f2f692c1576d6f207c905c780989bb5ea8545"
54
54
  }
package/lib/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { RequestInfo, RequestInit, Response } from 'node-fetch';
2
- declare const fetch: (url: RequestInfo, init?: RequestInit) => Promise<Response>;
3
- export default fetch;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAA;AAe7D,QAAA,MAAM,KAAK,GACT,KAAK,WAAW,EAChB,OAAO,WAAW,KACjB,OAAO,CAAC,QAAQ,CAclB,CAAA;AAED,eAAe,KAAK,CAAA"}
package/lib/index.js DELETED
@@ -1,33 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import { Agent as HttpAgent } from 'node:http';
3
- import { Agent as HttpsAgent } from 'node:https';
4
- import fetchCJSModule from 'node-fetch';
5
- // workaround for https://github.com/steprz/stepzen-cli/issues/934
6
- const httpAgent = new HttpAgent({
7
- keepAlive: true,
8
- scheduling: 'lifo',
9
- timeout: 5000,
10
- });
11
- const httpsAgent = new HttpsAgent({
12
- keepAlive: true,
13
- scheduling: 'lifo',
14
- timeout: 5000,
15
- });
16
- const fetch = async (url, init) => {
17
- let urlstr;
18
- if (typeof url === 'string') {
19
- urlstr = url;
20
- }
21
- else if ('href' in url) {
22
- urlstr = url.href;
23
- }
24
- else {
25
- urlstr = url.url;
26
- }
27
- return fetchCJSModule.default(url, {
28
- agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent,
29
- ...init,
30
- });
31
- };
32
- export default fetch;
33
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,EAAC,KAAK,IAAI,SAAS,EAAC,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAC,KAAK,IAAI,UAAU,EAAC,MAAM,YAAY,CAAA;AAC9C,OAAO,cAAc,MAAM,YAAY,CAAA;AAGvC,kEAAkE;AAClE,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;IAC9B,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC;IAChC,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEF,MAAM,KAAK,GAAG,KAAK,EACjB,GAAgB,EAChB,IAAkB,EACC,EAAE;IACrB,IAAI,MAAM,CAAA;IACV,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,CAAA;IACd,CAAC;SAAM,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,CAAC,IAAI,CAAA;IACnB,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,GAAG,CAAC,GAAG,CAAA;IAClB,CAAC;IAED,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE;QACjC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;QAC3D,GAAG,IAAI;KACR,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}