rahad-all-downloader 2.1.15 → 2.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/.github/workflows/Run.yml +20 -0
  2. package/README.md +0 -1
  3. package/index.js +1 -1
  4. package/package.json +4 -2
  5. package/.cache/nix/binary-cache-v6.sqlite +0 -0
  6. package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
  7. package/.cache/replit/modules/nix.res +0 -1
  8. package/.cache/replit/modules/nodejs-20.res +0 -1
  9. package/.cache/replit/modules/replit.res +0 -1
  10. package/.cache/replit/modules.stamp +0 -0
  11. package/.cache/replit/nix/env.json +0 -1
  12. package/.cache/typescript/5.4/node_modules/.package-lock.json +0 -137
  13. package/.cache/typescript/5.4/node_modules/@types/caseless/LICENSE +0 -21
  14. package/.cache/typescript/5.4/node_modules/@types/caseless/README.md +0 -48
  15. package/.cache/typescript/5.4/node_modules/@types/caseless/index.d.ts +0 -29
  16. package/.cache/typescript/5.4/node_modules/@types/caseless/package.json +0 -35
  17. package/.cache/typescript/5.4/node_modules/@types/node/LICENSE +0 -21
  18. package/.cache/typescript/5.4/node_modules/@types/node/README.md +0 -15
  19. package/.cache/typescript/5.4/node_modules/@types/node/assert/strict.d.ts +0 -8
  20. package/.cache/typescript/5.4/node_modules/@types/node/assert.d.ts +0 -1040
  21. package/.cache/typescript/5.4/node_modules/@types/node/async_hooks.d.ts +0 -541
  22. package/.cache/typescript/5.4/node_modules/@types/node/buffer.d.ts +0 -2363
  23. package/.cache/typescript/5.4/node_modules/@types/node/child_process.d.ts +0 -1544
  24. package/.cache/typescript/5.4/node_modules/@types/node/cluster.d.ts +0 -578
  25. package/.cache/typescript/5.4/node_modules/@types/node/console.d.ts +0 -452
  26. package/.cache/typescript/5.4/node_modules/@types/node/constants.d.ts +0 -19
  27. package/.cache/typescript/5.4/node_modules/@types/node/crypto.d.ts +0 -4523
  28. package/.cache/typescript/5.4/node_modules/@types/node/dgram.d.ts +0 -596
  29. package/.cache/typescript/5.4/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  30. package/.cache/typescript/5.4/node_modules/@types/node/dns/promises.d.ts +0 -474
  31. package/.cache/typescript/5.4/node_modules/@types/node/dns.d.ts +0 -864
  32. package/.cache/typescript/5.4/node_modules/@types/node/dom-events.d.ts +0 -124
  33. package/.cache/typescript/5.4/node_modules/@types/node/domain.d.ts +0 -170
  34. package/.cache/typescript/5.4/node_modules/@types/node/events.d.ts +0 -909
  35. package/.cache/typescript/5.4/node_modules/@types/node/fs/promises.d.ts +0 -1245
  36. package/.cache/typescript/5.4/node_modules/@types/node/fs.d.ts +0 -4317
  37. package/.cache/typescript/5.4/node_modules/@types/node/globals.d.ts +0 -411
  38. package/.cache/typescript/5.4/node_modules/@types/node/globals.global.d.ts +0 -1
  39. package/.cache/typescript/5.4/node_modules/@types/node/http.d.ts +0 -1908
  40. package/.cache/typescript/5.4/node_modules/@types/node/http2.d.ts +0 -2418
  41. package/.cache/typescript/5.4/node_modules/@types/node/https.d.ts +0 -550
  42. package/.cache/typescript/5.4/node_modules/@types/node/index.d.ts +0 -89
  43. package/.cache/typescript/5.4/node_modules/@types/node/inspector.d.ts +0 -2746
  44. package/.cache/typescript/5.4/node_modules/@types/node/module.d.ts +0 -315
  45. package/.cache/typescript/5.4/node_modules/@types/node/net.d.ts +0 -999
  46. package/.cache/typescript/5.4/node_modules/@types/node/os.d.ts +0 -495
  47. package/.cache/typescript/5.4/node_modules/@types/node/package.json +0 -217
  48. package/.cache/typescript/5.4/node_modules/@types/node/path.d.ts +0 -191
  49. package/.cache/typescript/5.4/node_modules/@types/node/perf_hooks.d.ts +0 -905
  50. package/.cache/typescript/5.4/node_modules/@types/node/process.d.ts +0 -1754
  51. package/.cache/typescript/5.4/node_modules/@types/node/punycode.d.ts +0 -117
  52. package/.cache/typescript/5.4/node_modules/@types/node/querystring.d.ts +0 -153
  53. package/.cache/typescript/5.4/node_modules/@types/node/readline/promises.d.ts +0 -150
  54. package/.cache/typescript/5.4/node_modules/@types/node/readline.d.ts +0 -540
  55. package/.cache/typescript/5.4/node_modules/@types/node/repl.d.ts +0 -430
  56. package/.cache/typescript/5.4/node_modules/@types/node/sea.d.ts +0 -153
  57. package/.cache/typescript/5.4/node_modules/@types/node/stream/consumers.d.ts +0 -12
  58. package/.cache/typescript/5.4/node_modules/@types/node/stream/promises.d.ts +0 -83
  59. package/.cache/typescript/5.4/node_modules/@types/node/stream/web.d.ts +0 -367
  60. package/.cache/typescript/5.4/node_modules/@types/node/stream.d.ts +0 -1707
  61. package/.cache/typescript/5.4/node_modules/@types/node/string_decoder.d.ts +0 -67
  62. package/.cache/typescript/5.4/node_modules/@types/node/test.d.ts +0 -1718
  63. package/.cache/typescript/5.4/node_modules/@types/node/timers/promises.d.ts +0 -97
  64. package/.cache/typescript/5.4/node_modules/@types/node/timers.d.ts +0 -240
  65. package/.cache/typescript/5.4/node_modules/@types/node/tls.d.ts +0 -1217
  66. package/.cache/typescript/5.4/node_modules/@types/node/trace_events.d.ts +0 -197
  67. package/.cache/typescript/5.4/node_modules/@types/node/tty.d.ts +0 -208
  68. package/.cache/typescript/5.4/node_modules/@types/node/url.d.ts +0 -952
  69. package/.cache/typescript/5.4/node_modules/@types/node/util.d.ts +0 -2292
  70. package/.cache/typescript/5.4/node_modules/@types/node/v8.d.ts +0 -808
  71. package/.cache/typescript/5.4/node_modules/@types/node/vm.d.ts +0 -924
  72. package/.cache/typescript/5.4/node_modules/@types/node/wasi.d.ts +0 -181
  73. package/.cache/typescript/5.4/node_modules/@types/node/worker_threads.d.ts +0 -691
  74. package/.cache/typescript/5.4/node_modules/@types/node/zlib.d.ts +0 -530
  75. package/.cache/typescript/5.4/node_modules/@types/node-fetch/LICENSE +0 -21
  76. package/.cache/typescript/5.4/node_modules/@types/node-fetch/README.md +0 -15
  77. package/.cache/typescript/5.4/node_modules/@types/node-fetch/externals.d.ts +0 -32
  78. package/.cache/typescript/5.4/node_modules/@types/node-fetch/index.d.ts +0 -238
  79. package/.cache/typescript/5.4/node_modules/@types/node-fetch/package.json +0 -83
  80. package/.cache/typescript/5.4/node_modules/@types/request/LICENSE +0 -21
  81. package/.cache/typescript/5.4/node_modules/@types/request/README.md +0 -15
  82. package/.cache/typescript/5.4/node_modules/@types/request/index.d.ts +0 -395
  83. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/License +0 -19
  84. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/README.md +0 -350
  85. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/README.md.bak +0 -350
  86. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/index.d.ts +0 -51
  87. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/lib/browser.js +0 -2
  88. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/lib/form_data.js +0 -483
  89. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/lib/populate.js +0 -10
  90. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/package.json +0 -68
  91. package/.cache/typescript/5.4/node_modules/@types/request/package.json +0 -70
  92. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/LICENSE +0 -21
  93. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/README.md +0 -15
  94. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/index.d.ts +0 -321
  95. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/package.json +0 -35
  96. package/.cache/typescript/5.4/node_modules/asynckit/LICENSE +0 -21
  97. package/.cache/typescript/5.4/node_modules/asynckit/README.md +0 -233
  98. package/.cache/typescript/5.4/node_modules/asynckit/bench.js +0 -76
  99. package/.cache/typescript/5.4/node_modules/asynckit/index.js +0 -6
  100. package/.cache/typescript/5.4/node_modules/asynckit/lib/abort.js +0 -29
  101. package/.cache/typescript/5.4/node_modules/asynckit/lib/async.js +0 -34
  102. package/.cache/typescript/5.4/node_modules/asynckit/lib/defer.js +0 -26
  103. package/.cache/typescript/5.4/node_modules/asynckit/lib/iterate.js +0 -75
  104. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_asynckit.js +0 -91
  105. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_parallel.js +0 -25
  106. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_serial.js +0 -25
  107. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
  108. package/.cache/typescript/5.4/node_modules/asynckit/lib/state.js +0 -37
  109. package/.cache/typescript/5.4/node_modules/asynckit/lib/streamify.js +0 -141
  110. package/.cache/typescript/5.4/node_modules/asynckit/lib/terminator.js +0 -29
  111. package/.cache/typescript/5.4/node_modules/asynckit/package.json +0 -63
  112. package/.cache/typescript/5.4/node_modules/asynckit/parallel.js +0 -43
  113. package/.cache/typescript/5.4/node_modules/asynckit/serial.js +0 -17
  114. package/.cache/typescript/5.4/node_modules/asynckit/serialOrdered.js +0 -75
  115. package/.cache/typescript/5.4/node_modules/asynckit/stream.js +0 -21
  116. package/.cache/typescript/5.4/node_modules/combined-stream/License +0 -19
  117. package/.cache/typescript/5.4/node_modules/combined-stream/Readme.md +0 -138
  118. package/.cache/typescript/5.4/node_modules/combined-stream/lib/combined_stream.js +0 -208
  119. package/.cache/typescript/5.4/node_modules/combined-stream/package.json +0 -25
  120. package/.cache/typescript/5.4/node_modules/combined-stream/yarn.lock +0 -17
  121. package/.cache/typescript/5.4/node_modules/delayed-stream/License +0 -19
  122. package/.cache/typescript/5.4/node_modules/delayed-stream/Makefile +0 -7
  123. package/.cache/typescript/5.4/node_modules/delayed-stream/Readme.md +0 -141
  124. package/.cache/typescript/5.4/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
  125. package/.cache/typescript/5.4/node_modules/delayed-stream/package.json +0 -27
  126. package/.cache/typescript/5.4/node_modules/form-data/License +0 -19
  127. package/.cache/typescript/5.4/node_modules/form-data/README.md.bak +0 -358
  128. package/.cache/typescript/5.4/node_modules/form-data/Readme.md +0 -358
  129. package/.cache/typescript/5.4/node_modules/form-data/index.d.ts +0 -62
  130. package/.cache/typescript/5.4/node_modules/form-data/lib/browser.js +0 -2
  131. package/.cache/typescript/5.4/node_modules/form-data/lib/form_data.js +0 -501
  132. package/.cache/typescript/5.4/node_modules/form-data/lib/populate.js +0 -10
  133. package/.cache/typescript/5.4/node_modules/form-data/package.json +0 -68
  134. package/.cache/typescript/5.4/node_modules/mime-db/HISTORY.md +0 -507
  135. package/.cache/typescript/5.4/node_modules/mime-db/LICENSE +0 -23
  136. package/.cache/typescript/5.4/node_modules/mime-db/README.md +0 -100
  137. package/.cache/typescript/5.4/node_modules/mime-db/db.json +0 -8519
  138. package/.cache/typescript/5.4/node_modules/mime-db/index.js +0 -12
  139. package/.cache/typescript/5.4/node_modules/mime-db/package.json +0 -60
  140. package/.cache/typescript/5.4/node_modules/mime-types/HISTORY.md +0 -397
  141. package/.cache/typescript/5.4/node_modules/mime-types/LICENSE +0 -23
  142. package/.cache/typescript/5.4/node_modules/mime-types/README.md +0 -113
  143. package/.cache/typescript/5.4/node_modules/mime-types/index.js +0 -188
  144. package/.cache/typescript/5.4/node_modules/mime-types/package.json +0 -44
  145. package/.cache/typescript/5.4/node_modules/types-registry/README.md +0 -2
  146. package/.cache/typescript/5.4/node_modules/types-registry/index.json +0 -1
  147. package/.cache/typescript/5.4/node_modules/types-registry/package.json +0 -20
  148. package/.cache/typescript/5.4/node_modules/undici-types/README.md +0 -6
  149. package/.cache/typescript/5.4/node_modules/undici-types/agent.d.ts +0 -31
  150. package/.cache/typescript/5.4/node_modules/undici-types/api.d.ts +0 -43
  151. package/.cache/typescript/5.4/node_modules/undici-types/balanced-pool.d.ts +0 -18
  152. package/.cache/typescript/5.4/node_modules/undici-types/cache.d.ts +0 -36
  153. package/.cache/typescript/5.4/node_modules/undici-types/client.d.ts +0 -97
  154. package/.cache/typescript/5.4/node_modules/undici-types/connector.d.ts +0 -34
  155. package/.cache/typescript/5.4/node_modules/undici-types/content-type.d.ts +0 -21
  156. package/.cache/typescript/5.4/node_modules/undici-types/cookies.d.ts +0 -28
  157. package/.cache/typescript/5.4/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  158. package/.cache/typescript/5.4/node_modules/undici-types/dispatcher.d.ts +0 -241
  159. package/.cache/typescript/5.4/node_modules/undici-types/errors.d.ts +0 -128
  160. package/.cache/typescript/5.4/node_modules/undici-types/fetch.d.ts +0 -209
  161. package/.cache/typescript/5.4/node_modules/undici-types/file.d.ts +0 -39
  162. package/.cache/typescript/5.4/node_modules/undici-types/filereader.d.ts +0 -54
  163. package/.cache/typescript/5.4/node_modules/undici-types/formdata.d.ts +0 -108
  164. package/.cache/typescript/5.4/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  165. package/.cache/typescript/5.4/node_modules/undici-types/global-origin.d.ts +0 -7
  166. package/.cache/typescript/5.4/node_modules/undici-types/handlers.d.ts +0 -9
  167. package/.cache/typescript/5.4/node_modules/undici-types/header.d.ts +0 -4
  168. package/.cache/typescript/5.4/node_modules/undici-types/index.d.ts +0 -63
  169. package/.cache/typescript/5.4/node_modules/undici-types/interceptors.d.ts +0 -5
  170. package/.cache/typescript/5.4/node_modules/undici-types/mock-agent.d.ts +0 -50
  171. package/.cache/typescript/5.4/node_modules/undici-types/mock-client.d.ts +0 -25
  172. package/.cache/typescript/5.4/node_modules/undici-types/mock-errors.d.ts +0 -12
  173. package/.cache/typescript/5.4/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  174. package/.cache/typescript/5.4/node_modules/undici-types/mock-pool.d.ts +0 -25
  175. package/.cache/typescript/5.4/node_modules/undici-types/package.json +0 -55
  176. package/.cache/typescript/5.4/node_modules/undici-types/patch.d.ts +0 -71
  177. package/.cache/typescript/5.4/node_modules/undici-types/pool-stats.d.ts +0 -19
  178. package/.cache/typescript/5.4/node_modules/undici-types/pool.d.ts +0 -28
  179. package/.cache/typescript/5.4/node_modules/undici-types/proxy-agent.d.ts +0 -30
  180. package/.cache/typescript/5.4/node_modules/undici-types/readable.d.ts +0 -61
  181. package/.cache/typescript/5.4/node_modules/undici-types/webidl.d.ts +0 -220
  182. package/.cache/typescript/5.4/node_modules/undici-types/websocket.d.ts +0 -131
  183. package/.cache/typescript/5.4/package-lock.json +0 -146
  184. package/.cache/typescript/5.4/package.json +0 -1
  185. package/.replit +0 -21
  186. package/replit.nix +0 -3
@@ -1,128 +0,0 @@
1
- import { IncomingHttpHeaders } from "./header";
2
- import Client from './client'
3
-
4
- export default Errors
5
-
6
- declare namespace Errors {
7
- export class UndiciError extends Error {
8
- name: string;
9
- code: string;
10
- }
11
-
12
- /** Connect timeout error. */
13
- export class ConnectTimeoutError extends UndiciError {
14
- name: 'ConnectTimeoutError';
15
- code: 'UND_ERR_CONNECT_TIMEOUT';
16
- }
17
-
18
- /** A header exceeds the `headersTimeout` option. */
19
- export class HeadersTimeoutError extends UndiciError {
20
- name: 'HeadersTimeoutError';
21
- code: 'UND_ERR_HEADERS_TIMEOUT';
22
- }
23
-
24
- /** Headers overflow error. */
25
- export class HeadersOverflowError extends UndiciError {
26
- name: 'HeadersOverflowError'
27
- code: 'UND_ERR_HEADERS_OVERFLOW'
28
- }
29
-
30
- /** A body exceeds the `bodyTimeout` option. */
31
- export class BodyTimeoutError extends UndiciError {
32
- name: 'BodyTimeoutError';
33
- code: 'UND_ERR_BODY_TIMEOUT';
34
- }
35
-
36
- export class ResponseStatusCodeError extends UndiciError {
37
- constructor (
38
- message?: string,
39
- statusCode?: number,
40
- headers?: IncomingHttpHeaders | string[] | null,
41
- body?: null | Record<string, any> | string
42
- );
43
- name: 'ResponseStatusCodeError';
44
- code: 'UND_ERR_RESPONSE_STATUS_CODE';
45
- body: null | Record<string, any> | string
46
- status: number
47
- statusCode: number
48
- headers: IncomingHttpHeaders | string[] | null;
49
- }
50
-
51
- /** Passed an invalid argument. */
52
- export class InvalidArgumentError extends UndiciError {
53
- name: 'InvalidArgumentError';
54
- code: 'UND_ERR_INVALID_ARG';
55
- }
56
-
57
- /** Returned an invalid value. */
58
- export class InvalidReturnValueError extends UndiciError {
59
- name: 'InvalidReturnValueError';
60
- code: 'UND_ERR_INVALID_RETURN_VALUE';
61
- }
62
-
63
- /** The request has been aborted by the user. */
64
- export class RequestAbortedError extends UndiciError {
65
- name: 'AbortError';
66
- code: 'UND_ERR_ABORTED';
67
- }
68
-
69
- /** Expected error with reason. */
70
- export class InformationalError extends UndiciError {
71
- name: 'InformationalError';
72
- code: 'UND_ERR_INFO';
73
- }
74
-
75
- /** Request body length does not match content-length header. */
76
- export class RequestContentLengthMismatchError extends UndiciError {
77
- name: 'RequestContentLengthMismatchError';
78
- code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH';
79
- }
80
-
81
- /** Response body length does not match content-length header. */
82
- export class ResponseContentLengthMismatchError extends UndiciError {
83
- name: 'ResponseContentLengthMismatchError';
84
- code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH';
85
- }
86
-
87
- /** Trying to use a destroyed client. */
88
- export class ClientDestroyedError extends UndiciError {
89
- name: 'ClientDestroyedError';
90
- code: 'UND_ERR_DESTROYED';
91
- }
92
-
93
- /** Trying to use a closed client. */
94
- export class ClientClosedError extends UndiciError {
95
- name: 'ClientClosedError';
96
- code: 'UND_ERR_CLOSED';
97
- }
98
-
99
- /** There is an error with the socket. */
100
- export class SocketError extends UndiciError {
101
- name: 'SocketError';
102
- code: 'UND_ERR_SOCKET';
103
- socket: Client.SocketInfo | null
104
- }
105
-
106
- /** Encountered unsupported functionality. */
107
- export class NotSupportedError extends UndiciError {
108
- name: 'NotSupportedError';
109
- code: 'UND_ERR_NOT_SUPPORTED';
110
- }
111
-
112
- /** No upstream has been added to the BalancedPool. */
113
- export class BalancedPoolMissingUpstreamError extends UndiciError {
114
- name: 'MissingUpstreamError';
115
- code: 'UND_ERR_BPL_MISSING_UPSTREAM';
116
- }
117
-
118
- export class HTTPParserError extends UndiciError {
119
- name: 'HTTPParserError';
120
- code: string;
121
- }
122
-
123
- /** The response exceed the length allowed. */
124
- export class ResponseExceededMaxSizeError extends UndiciError {
125
- name: 'ResponseExceededMaxSizeError';
126
- code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
127
- }
128
- }
@@ -1,209 +0,0 @@
1
- // based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license)
2
- // and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license)
3
- /// <reference types="node" />
4
-
5
- import { Blob } from 'buffer'
6
- import { URL, URLSearchParams } from 'url'
7
- import { ReadableStream } from 'stream/web'
8
- import { FormData } from './formdata'
9
-
10
- import Dispatcher from './dispatcher'
11
-
12
- export type RequestInfo = string | URL | Request
13
-
14
- export declare function fetch (
15
- input: RequestInfo,
16
- init?: RequestInit
17
- ): Promise<Response>
18
-
19
- export type BodyInit =
20
- | ArrayBuffer
21
- | AsyncIterable<Uint8Array>
22
- | Blob
23
- | FormData
24
- | Iterable<Uint8Array>
25
- | NodeJS.ArrayBufferView
26
- | URLSearchParams
27
- | null
28
- | string
29
-
30
- export interface BodyMixin {
31
- readonly body: ReadableStream | null
32
- readonly bodyUsed: boolean
33
-
34
- readonly arrayBuffer: () => Promise<ArrayBuffer>
35
- readonly blob: () => Promise<Blob>
36
- readonly formData: () => Promise<FormData>
37
- readonly json: () => Promise<unknown>
38
- readonly text: () => Promise<string>
39
- }
40
-
41
- export interface SpecIterator<T, TReturn = any, TNext = undefined> {
42
- next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
43
- }
44
-
45
- export interface SpecIterableIterator<T> extends SpecIterator<T> {
46
- [Symbol.iterator](): SpecIterableIterator<T>;
47
- }
48
-
49
- export interface SpecIterable<T> {
50
- [Symbol.iterator](): SpecIterator<T>;
51
- }
52
-
53
- export type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
54
-
55
- export declare class Headers implements SpecIterable<[string, string]> {
56
- constructor (init?: HeadersInit)
57
- readonly append: (name: string, value: string) => void
58
- readonly delete: (name: string) => void
59
- readonly get: (name: string) => string | null
60
- readonly has: (name: string) => boolean
61
- readonly set: (name: string, value: string) => void
62
- readonly getSetCookie: () => string[]
63
- readonly forEach: (
64
- callbackfn: (value: string, key: string, iterable: Headers) => void,
65
- thisArg?: unknown
66
- ) => void
67
-
68
- readonly keys: () => SpecIterableIterator<string>
69
- readonly values: () => SpecIterableIterator<string>
70
- readonly entries: () => SpecIterableIterator<[string, string]>
71
- readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
72
- }
73
-
74
- export type RequestCache =
75
- | 'default'
76
- | 'force-cache'
77
- | 'no-cache'
78
- | 'no-store'
79
- | 'only-if-cached'
80
- | 'reload'
81
-
82
- export type RequestCredentials = 'omit' | 'include' | 'same-origin'
83
-
84
- type RequestDestination =
85
- | ''
86
- | 'audio'
87
- | 'audioworklet'
88
- | 'document'
89
- | 'embed'
90
- | 'font'
91
- | 'image'
92
- | 'manifest'
93
- | 'object'
94
- | 'paintworklet'
95
- | 'report'
96
- | 'script'
97
- | 'sharedworker'
98
- | 'style'
99
- | 'track'
100
- | 'video'
101
- | 'worker'
102
- | 'xslt'
103
-
104
- export interface RequestInit {
105
- method?: string
106
- keepalive?: boolean
107
- headers?: HeadersInit
108
- body?: BodyInit
109
- redirect?: RequestRedirect
110
- integrity?: string
111
- signal?: AbortSignal
112
- credentials?: RequestCredentials
113
- mode?: RequestMode
114
- referrer?: string
115
- referrerPolicy?: ReferrerPolicy
116
- window?: null
117
- dispatcher?: Dispatcher
118
- duplex?: RequestDuplex
119
- }
120
-
121
- export type ReferrerPolicy =
122
- | ''
123
- | 'no-referrer'
124
- | 'no-referrer-when-downgrade'
125
- | 'origin'
126
- | 'origin-when-cross-origin'
127
- | 'same-origin'
128
- | 'strict-origin'
129
- | 'strict-origin-when-cross-origin'
130
- | 'unsafe-url';
131
-
132
- export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
133
-
134
- export type RequestRedirect = 'error' | 'follow' | 'manual'
135
-
136
- export type RequestDuplex = 'half'
137
-
138
- export declare class Request implements BodyMixin {
139
- constructor (input: RequestInfo, init?: RequestInit)
140
-
141
- readonly cache: RequestCache
142
- readonly credentials: RequestCredentials
143
- readonly destination: RequestDestination
144
- readonly headers: Headers
145
- readonly integrity: string
146
- readonly method: string
147
- readonly mode: RequestMode
148
- readonly redirect: RequestRedirect
149
- readonly referrerPolicy: string
150
- readonly url: string
151
-
152
- readonly keepalive: boolean
153
- readonly signal: AbortSignal
154
- readonly duplex: RequestDuplex
155
-
156
- readonly body: ReadableStream | null
157
- readonly bodyUsed: boolean
158
-
159
- readonly arrayBuffer: () => Promise<ArrayBuffer>
160
- readonly blob: () => Promise<Blob>
161
- readonly formData: () => Promise<FormData>
162
- readonly json: () => Promise<unknown>
163
- readonly text: () => Promise<string>
164
-
165
- readonly clone: () => Request
166
- }
167
-
168
- export interface ResponseInit {
169
- readonly status?: number
170
- readonly statusText?: string
171
- readonly headers?: HeadersInit
172
- }
173
-
174
- export type ResponseType =
175
- | 'basic'
176
- | 'cors'
177
- | 'default'
178
- | 'error'
179
- | 'opaque'
180
- | 'opaqueredirect'
181
-
182
- export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308
183
-
184
- export declare class Response implements BodyMixin {
185
- constructor (body?: BodyInit, init?: ResponseInit)
186
-
187
- readonly headers: Headers
188
- readonly ok: boolean
189
- readonly status: number
190
- readonly statusText: string
191
- readonly type: ResponseType
192
- readonly url: string
193
- readonly redirected: boolean
194
-
195
- readonly body: ReadableStream | null
196
- readonly bodyUsed: boolean
197
-
198
- readonly arrayBuffer: () => Promise<ArrayBuffer>
199
- readonly blob: () => Promise<Blob>
200
- readonly formData: () => Promise<FormData>
201
- readonly json: () => Promise<unknown>
202
- readonly text: () => Promise<string>
203
-
204
- readonly clone: () => Response
205
-
206
- static error (): Response
207
- static json(data: any, init?: ResponseInit): Response
208
- static redirect (url: string | URL, status: ResponseRedirectStatus): Response
209
- }
@@ -1,39 +0,0 @@
1
- // Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/File.ts (MIT)
2
- /// <reference types="node" />
3
-
4
- import { Blob } from 'buffer'
5
-
6
- export interface BlobPropertyBag {
7
- type?: string
8
- endings?: 'native' | 'transparent'
9
- }
10
-
11
- export interface FilePropertyBag extends BlobPropertyBag {
12
- /**
13
- * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
14
- */
15
- lastModified?: number
16
- }
17
-
18
- export declare class File extends Blob {
19
- /**
20
- * Creates a new File instance.
21
- *
22
- * @param fileBits An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
23
- * @param fileName The name of the file.
24
- * @param options An options object containing optional attributes for the file.
25
- */
26
- constructor(fileBits: ReadonlyArray<string | NodeJS.ArrayBufferView | Blob>, fileName: string, options?: FilePropertyBag)
27
-
28
- /**
29
- * Name of the file referenced by the File object.
30
- */
31
- readonly name: string
32
-
33
- /**
34
- * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
35
- */
36
- readonly lastModified: number
37
-
38
- readonly [Symbol.toStringTag]: string
39
- }
@@ -1,54 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- import { Blob } from 'buffer'
4
- import { DOMException, Event, EventInit, EventTarget } from './patch'
5
-
6
- export declare class FileReader {
7
- __proto__: EventTarget & FileReader
8
-
9
- constructor ()
10
-
11
- readAsArrayBuffer (blob: Blob): void
12
- readAsBinaryString (blob: Blob): void
13
- readAsText (blob: Blob, encoding?: string): void
14
- readAsDataURL (blob: Blob): void
15
-
16
- abort (): void
17
-
18
- static readonly EMPTY = 0
19
- static readonly LOADING = 1
20
- static readonly DONE = 2
21
-
22
- readonly EMPTY = 0
23
- readonly LOADING = 1
24
- readonly DONE = 2
25
-
26
- readonly readyState: number
27
-
28
- readonly result: string | ArrayBuffer | null
29
-
30
- readonly error: DOMException | null
31
-
32
- onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
33
- onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
34
- onload: null | ((this: FileReader, event: ProgressEvent) => void)
35
- onabort: null | ((this: FileReader, event: ProgressEvent) => void)
36
- onerror: null | ((this: FileReader, event: ProgressEvent) => void)
37
- onloadend: null | ((this: FileReader, event: ProgressEvent) => void)
38
- }
39
-
40
- export interface ProgressEventInit extends EventInit {
41
- lengthComputable?: boolean
42
- loaded?: number
43
- total?: number
44
- }
45
-
46
- export declare class ProgressEvent {
47
- __proto__: Event & ProgressEvent
48
-
49
- constructor (type: string, eventInitDict?: ProgressEventInit)
50
-
51
- readonly lengthComputable: boolean
52
- readonly loaded: number
53
- readonly total: number
54
- }
@@ -1,108 +0,0 @@
1
- // Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT)
2
- /// <reference types="node" />
3
-
4
- import { File } from './file'
5
- import { SpecIterator, SpecIterableIterator } from './fetch'
6
-
7
- /**
8
- * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
9
- */
10
- declare type FormDataEntryValue = string | File
11
-
12
- /**
13
- * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
14
- */
15
- export declare class FormData {
16
- /**
17
- * Appends a new value onto an existing key inside a FormData object,
18
- * or adds the key if it does not already exist.
19
- *
20
- * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
21
- *
22
- * @param name The name of the field whose data is contained in `value`.
23
- * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
24
- or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
25
- * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
26
- */
27
- append(name: string, value: unknown, fileName?: string): void
28
-
29
- /**
30
- * Set a new value for an existing key inside FormData,
31
- * or add the new field if it does not already exist.
32
- *
33
- * @param name The name of the field whose data is contained in `value`.
34
- * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
35
- or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
36
- * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
37
- *
38
- */
39
- set(name: string, value: unknown, fileName?: string): void
40
-
41
- /**
42
- * Returns the first value associated with a given key from within a `FormData` object.
43
- * If you expect multiple values and want all of them, use the `getAll()` method instead.
44
- *
45
- * @param {string} name A name of the value you want to retrieve.
46
- *
47
- * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
48
- */
49
- get(name: string): FormDataEntryValue | null
50
-
51
- /**
52
- * Returns all the values associated with a given key from within a `FormData` object.
53
- *
54
- * @param {string} name A name of the value you want to retrieve.
55
- *
56
- * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
57
- */
58
- getAll(name: string): FormDataEntryValue[]
59
-
60
- /**
61
- * Returns a boolean stating whether a `FormData` object contains a certain key.
62
- *
63
- * @param name A string representing the name of the key you want to test for.
64
- *
65
- * @return A boolean value.
66
- */
67
- has(name: string): boolean
68
-
69
- /**
70
- * Deletes a key and its value(s) from a `FormData` object.
71
- *
72
- * @param name The name of the key you want to delete.
73
- */
74
- delete(name: string): void
75
-
76
- /**
77
- * Executes given callback function for each field of the FormData instance
78
- */
79
- forEach: (
80
- callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void,
81
- thisArg?: unknown
82
- ) => void
83
-
84
- /**
85
- * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object.
86
- * Each key is a `string`.
87
- */
88
- keys: () => SpecIterableIterator<string>
89
-
90
- /**
91
- * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object.
92
- * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
93
- */
94
- values: () => SpecIterableIterator<FormDataEntryValue>
95
-
96
- /**
97
- * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
98
- * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
99
- */
100
- entries: () => SpecIterableIterator<[string, FormDataEntryValue]>
101
-
102
- /**
103
- * An alias for FormData#entries()
104
- */
105
- [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]>
106
-
107
- readonly [Symbol.toStringTag]: string
108
- }
@@ -1,9 +0,0 @@
1
- import Dispatcher from "./dispatcher";
2
-
3
- export {
4
- getGlobalDispatcher,
5
- setGlobalDispatcher
6
- }
7
-
8
- declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
9
- declare function getGlobalDispatcher(): Dispatcher;
@@ -1,7 +0,0 @@
1
- export {
2
- setGlobalOrigin,
3
- getGlobalOrigin
4
- }
5
-
6
- declare function setGlobalOrigin(origin: string | URL | undefined): void;
7
- declare function getGlobalOrigin(): URL | undefined;
@@ -1,9 +0,0 @@
1
- import Dispatcher from "./dispatcher";
2
-
3
- export declare class RedirectHandler implements Dispatcher.DispatchHandlers{
4
- constructor (dispatch: Dispatcher, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers)
5
- }
6
-
7
- export declare class DecoratorHandler implements Dispatcher.DispatchHandlers{
8
- constructor (handler: Dispatcher.DispatchHandlers)
9
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * The header type declaration of `undici`.
3
- */
4
- export type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
@@ -1,63 +0,0 @@
1
- import Dispatcher from'./dispatcher'
2
- import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher'
3
- import { setGlobalOrigin, getGlobalOrigin } from './global-origin'
4
- import Pool from'./pool'
5
- import { RedirectHandler, DecoratorHandler } from './handlers'
6
-
7
- import BalancedPool from './balanced-pool'
8
- import Client from'./client'
9
- import buildConnector from'./connector'
10
- import errors from'./errors'
11
- import Agent from'./agent'
12
- import MockClient from'./mock-client'
13
- import MockPool from'./mock-pool'
14
- import MockAgent from'./mock-agent'
15
- import mockErrors from'./mock-errors'
16
- import ProxyAgent from'./proxy-agent'
17
- import { request, pipeline, stream, connect, upgrade } from './api'
18
-
19
- export * from './cookies'
20
- export * from './fetch'
21
- export * from './file'
22
- export * from './filereader'
23
- export * from './formdata'
24
- export * from './diagnostics-channel'
25
- export * from './websocket'
26
- export * from './content-type'
27
- export * from './cache'
28
- export { Interceptable } from './mock-interceptor'
29
-
30
- export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler }
31
- export default Undici
32
-
33
- declare namespace Undici {
34
- var Dispatcher: typeof import('./dispatcher').default
35
- var Pool: typeof import('./pool').default;
36
- var RedirectHandler: typeof import ('./handlers').RedirectHandler
37
- var DecoratorHandler: typeof import ('./handlers').DecoratorHandler
38
- var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor
39
- var BalancedPool: typeof import('./balanced-pool').default;
40
- var Client: typeof import('./client').default;
41
- var buildConnector: typeof import('./connector').default;
42
- var errors: typeof import('./errors').default;
43
- var Agent: typeof import('./agent').default;
44
- var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher;
45
- var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher;
46
- var request: typeof import('./api').request;
47
- var stream: typeof import('./api').stream;
48
- var pipeline: typeof import('./api').pipeline;
49
- var connect: typeof import('./api').connect;
50
- var upgrade: typeof import('./api').upgrade;
51
- var MockClient: typeof import('./mock-client').default;
52
- var MockPool: typeof import('./mock-pool').default;
53
- var MockAgent: typeof import('./mock-agent').default;
54
- var mockErrors: typeof import('./mock-errors').default;
55
- var fetch: typeof import('./fetch').fetch;
56
- var Headers: typeof import('./fetch').Headers;
57
- var Response: typeof import('./fetch').Response;
58
- var Request: typeof import('./fetch').Request;
59
- var FormData: typeof import('./formdata').FormData;
60
- var File: typeof import('./file').File;
61
- var FileReader: typeof import('./filereader').FileReader;
62
- var caches: typeof import('./cache').caches;
63
- }
@@ -1,5 +0,0 @@
1
- import Dispatcher from "./dispatcher";
2
-
3
- type RedirectInterceptorOpts = { maxRedirections?: number }
4
-
5
- export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor