@whatwg-node/node-fetch 0.3.3-alpha-20230320124321-e6b82e7 → 0.3.3-rc-20230320121450-923e939

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.
Files changed (73) hide show
  1. package/{typings/AbortController.d.ts → AbortController.d.ts} +1 -1
  2. package/{typings/Body.d.ts → Body.d.ts} +3 -3
  3. package/{typings/File.d.ts → File.d.ts} +1 -1
  4. package/{typings/FormData.d.ts → FormData.d.ts} +2 -2
  5. package/{typings/Request.d.ts → Request.d.ts} +2 -2
  6. package/{typings/Response.d.ts → Response.d.ts} +2 -2
  7. package/{typings/URL.d.ts → URL.d.ts} +1 -1
  8. package/{typings/fetch.d.ts → fetch.d.ts} +2 -2
  9. package/index.d.ts +15 -0
  10. package/index.js +1452 -0
  11. package/index.mjs +1430 -0
  12. package/package.json +12 -19
  13. package/cjs/AbortController.js +0 -14
  14. package/cjs/AbortError.js +0 -20
  15. package/cjs/AbortSignal.js +0 -37
  16. package/cjs/Blob.js +0 -119
  17. package/cjs/Body.js +0 -372
  18. package/cjs/File.js +0 -13
  19. package/cjs/FormData.js +0 -134
  20. package/cjs/Headers.js +0 -127
  21. package/cjs/ReadableStream.js +0 -172
  22. package/cjs/Request.js +0 -69
  23. package/cjs/Response.js +0 -76
  24. package/cjs/TextEncoderDecoder.js +0 -39
  25. package/cjs/URL.js +0 -55
  26. package/cjs/URLSearchParams.js +0 -103
  27. package/cjs/fetch.js +0 -143
  28. package/cjs/index.js +0 -35
  29. package/cjs/package.json +0 -1
  30. package/cjs/utils.js +0 -18
  31. package/esm/AbortController.js +0 -10
  32. package/esm/AbortError.js +0 -16
  33. package/esm/AbortSignal.js +0 -33
  34. package/esm/Blob.js +0 -115
  35. package/esm/Body.js +0 -367
  36. package/esm/File.js +0 -9
  37. package/esm/FormData.js +0 -129
  38. package/esm/Headers.js +0 -123
  39. package/esm/ReadableStream.js +0 -168
  40. package/esm/Request.js +0 -65
  41. package/esm/Response.js +0 -72
  42. package/esm/TextEncoderDecoder.js +0 -33
  43. package/esm/URL.js +0 -50
  44. package/esm/URLSearchParams.js +0 -98
  45. package/esm/fetch.js +0 -139
  46. package/esm/index.js +0 -15
  47. package/esm/utils.js +0 -13
  48. package/typings/AbortController.d.cts +0 -5
  49. package/typings/AbortError.d.cts +0 -4
  50. package/typings/AbortSignal.d.cts +0 -11
  51. package/typings/Blob.d.cts +0 -18
  52. package/typings/Body.d.cts +0 -41
  53. package/typings/File.d.cts +0 -7
  54. package/typings/FormData.d.cts +0 -17
  55. package/typings/Headers.d.cts +0 -21
  56. package/typings/ReadableStream.d.cts +0 -20
  57. package/typings/Request.d.cts +0 -24
  58. package/typings/Response.d.cts +0 -22
  59. package/typings/TextEncoderDecoder.d.cts +0 -15
  60. package/typings/URL.d.cts +0 -14
  61. package/typings/URLSearchParams.d.cts +0 -17
  62. package/typings/fetch.d.cts +0 -3
  63. package/typings/index.d.cts +0 -15
  64. package/typings/index.d.ts +0 -15
  65. package/typings/utils.d.cts +0 -2
  66. /package/{typings/AbortError.d.ts → AbortError.d.ts} +0 -0
  67. /package/{typings/AbortSignal.d.ts → AbortSignal.d.ts} +0 -0
  68. /package/{typings/Blob.d.ts → Blob.d.ts} +0 -0
  69. /package/{typings/Headers.d.ts → Headers.d.ts} +0 -0
  70. /package/{typings/ReadableStream.d.ts → ReadableStream.d.ts} +0 -0
  71. /package/{typings/TextEncoderDecoder.d.ts → TextEncoderDecoder.d.ts} +0 -0
  72. /package/{typings/URLSearchParams.d.ts → URLSearchParams.d.ts} +0 -0
  73. /package/{typings/utils.d.ts → utils.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { PonyfillAbortSignal } from './AbortSignal.js';
1
+ import { PonyfillAbortSignal } from './AbortSignal';
2
2
  export declare class PonyfillAbortController implements AbortController {
3
3
  signal: PonyfillAbortSignal;
4
4
  abort(reason?: any): void;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import { Readable } from 'stream';
4
- import { PonyfillBlob } from './Blob.js';
5
- import { PonyfillFormData } from './FormData.js';
6
- import { PonyfillReadableStream } from './ReadableStream.js';
4
+ import { PonyfillBlob } from './Blob';
5
+ import { PonyfillFormData } from './FormData';
6
+ import { PonyfillReadableStream } from './ReadableStream';
7
7
  export type BodyPonyfillInit = XMLHttpRequestBodyInit | Readable | PonyfillReadableStream<Uint8Array> | AsyncIterable<Uint8Array>;
8
8
  export interface FormDataLimits {
9
9
  fieldNameSize?: number;
@@ -1,4 +1,4 @@
1
- import { PonyfillBlob } from './Blob.js';
1
+ import { PonyfillBlob } from './Blob';
2
2
  export declare class PonyfillFile extends PonyfillBlob implements File {
3
3
  name: string;
4
4
  lastModified: number;
@@ -1,5 +1,5 @@
1
- import { PonyfillBlob } from './Blob.js';
2
- import { PonyfillReadableStream } from './ReadableStream.js';
1
+ import { PonyfillBlob } from './Blob';
2
+ import { PonyfillReadableStream } from './ReadableStream';
3
3
  export declare class PonyfillFormData implements FormData {
4
4
  private map;
5
5
  append(name: string, value: PonyfillBlob | string, fileName?: string): void;
@@ -1,5 +1,5 @@
1
- import { BodyPonyfillInit, PonyfillBody, PonyfillBodyOptions } from './Body.js';
2
- import { PonyfillHeadersInit } from './Headers.js';
1
+ import { BodyPonyfillInit, PonyfillBody, PonyfillBodyOptions } from './Body';
2
+ import { PonyfillHeadersInit } from './Headers';
3
3
  export type RequestPonyfillInit = PonyfillBodyOptions & Omit<RequestInit, 'body' | 'headers'> & {
4
4
  body?: BodyPonyfillInit | null;
5
5
  headers?: PonyfillHeadersInit;
@@ -1,5 +1,5 @@
1
- import { BodyPonyfillInit, PonyfillBody, PonyfillBodyOptions } from './Body.js';
2
- import { PonyfillHeadersInit } from './Headers.js';
1
+ import { BodyPonyfillInit, PonyfillBody, PonyfillBodyOptions } from './Body';
2
+ import { PonyfillHeadersInit } from './Headers';
3
3
  export type ResponsePonyfilInit = PonyfillBodyOptions & Omit<ResponseInit, 'headers'> & {
4
4
  url?: string;
5
5
  redirected?: boolean;
@@ -1,5 +1,5 @@
1
1
  import FastUrl from 'fast-url-parser';
2
- import { PonyfillURLSearchParams } from './URLSearchParams.js';
2
+ import { PonyfillURLSearchParams } from './URLSearchParams';
3
3
  export declare class PonyfillURL extends FastUrl implements URL {
4
4
  constructor(url: string, base?: string | URL);
5
5
  get origin(): string;
@@ -1,3 +1,3 @@
1
- import { PonyfillRequest, RequestPonyfillInit } from './Request.js';
2
- import { PonyfillResponse } from './Response.js';
1
+ import { PonyfillRequest, RequestPonyfillInit } from './Request';
2
+ import { PonyfillResponse } from './Response';
3
3
  export declare function fetchPonyfill<TResponseJSON = any, TRequestJSON = any>(info: string | PonyfillRequest<TRequestJSON> | URL, init?: RequestPonyfillInit): Promise<PonyfillResponse<TResponseJSON>>;
package/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export { fetchPonyfill as fetch } from './fetch';
2
+ export { PonyfillHeaders as Headers } from './Headers';
3
+ export { PonyfillBody as Body } from './Body';
4
+ export { PonyfillRequest as Request, RequestPonyfillInit as RequestInit } from './Request';
5
+ export { PonyfillResponse as Response, ResponsePonyfilInit as ResponseInit } from './Response';
6
+ export { PonyfillReadableStream as ReadableStream } from './ReadableStream';
7
+ export { PonyfillFile as File } from './File';
8
+ export { PonyfillFormData as FormData } from './FormData';
9
+ export { PonyfillAbortController as AbortController } from './AbortController';
10
+ export { PonyfillAbortSignal as AbortSignal } from './AbortSignal';
11
+ export { PonyfillAbortError as AbortError } from './AbortError';
12
+ export { PonyfillBlob as Blob } from './Blob';
13
+ export { PonyfillTextEncoder as TextEncoder, PonyfillTextDecoder as TextDecoder, PonyfillBtoa as btoa, } from './TextEncoderDecoder';
14
+ export { PonyfillURL as URL } from './URL';
15
+ export { PonyfillURLSearchParams as URLSearchParams } from './URLSearchParams';