cdk-ecr-deployment 0.0.79 → 0.0.83
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/.gitattributes +20 -21
- package/.jsii +18 -13
- package/lambda/go.mod +1 -1
- package/lambda/go.sum +230 -66
- package/lib/index.js +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +8 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +11 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +11 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +88 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +55 -19
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +5 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +7 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +8 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +5 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +385 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +24 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +31 -0
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +8 -8
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +11 -0
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +11 -0
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +88 -1
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +55 -19
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +5 -4
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +7 -0
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +8 -8
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +5 -1
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +385 -0
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +24 -1
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +31 -0
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +8 -8
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +11 -0
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +11 -0
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +88 -1
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +55 -19
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +5 -4
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +7 -0
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +8 -8
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +5 -1
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +385 -0
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +24 -1
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +31 -0
- package/node_modules/got/dist/source/as-promise/parse-body.d.ts +1 -1
- package/node_modules/got/dist/source/as-promise/types.js +2 -0
- package/node_modules/got/dist/source/core/index.d.ts +1 -1
- package/node_modules/got/dist/source/core/index.js +9 -3
- package/node_modules/got/dist/source/types.d.ts +14 -12
- package/node_modules/got/package.json +2 -2
- package/node_modules/got/readme.md +11 -10
- package/node_modules/keyv/LICENSE +1 -1
- package/node_modules/keyv/README.md +12 -10
- package/node_modules/keyv/package.json +17 -12
- package/node_modules/keyv/src/index.js +14 -16
- package/package.json +38 -38
|
@@ -1,5 +1,390 @@
|
|
|
1
1
|
declare module 'stream/web' {
|
|
2
2
|
// stub module, pending copy&paste from .d.ts or manual impl
|
|
3
|
+
// copy from lib.dom.d.ts
|
|
4
|
+
|
|
5
|
+
interface ReadableWritablePair<R = any, W = any> {
|
|
6
|
+
readable: ReadableStream<R>;
|
|
7
|
+
/**
|
|
8
|
+
* Provides a convenient, chainable way of piping this readable stream
|
|
9
|
+
* through a transform stream (or any other { writable, readable }
|
|
10
|
+
* pair). It simply pipes the stream into the writable side of the
|
|
11
|
+
* supplied pair, and returns the readable side for further use.
|
|
12
|
+
*
|
|
13
|
+
* Piping a stream will lock it for the duration of the pipe, preventing
|
|
14
|
+
* any other consumer from acquiring a reader.
|
|
15
|
+
*/
|
|
16
|
+
writable: WritableStream<W>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface StreamPipeOptions {
|
|
20
|
+
preventAbort?: boolean;
|
|
21
|
+
preventCancel?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Pipes this readable stream to a given writable stream destination.
|
|
24
|
+
* The way in which the piping process behaves under various error
|
|
25
|
+
* conditions can be customized with a number of passed options. It
|
|
26
|
+
* returns a promise that fulfills when the piping process completes
|
|
27
|
+
* successfully, or rejects if any errors were encountered.
|
|
28
|
+
*
|
|
29
|
+
* Piping a stream will lock it for the duration of the pipe, preventing
|
|
30
|
+
* any other consumer from acquiring a reader.
|
|
31
|
+
*
|
|
32
|
+
* Errors and closures of the source and destination streams propagate
|
|
33
|
+
* as follows:
|
|
34
|
+
*
|
|
35
|
+
* An error in this source readable stream will abort destination,
|
|
36
|
+
* unless preventAbort is truthy. The returned promise will be rejected
|
|
37
|
+
* with the source's error, or with any error that occurs during
|
|
38
|
+
* aborting the destination.
|
|
39
|
+
*
|
|
40
|
+
* An error in destination will cancel this source readable stream,
|
|
41
|
+
* unless preventCancel is truthy. The returned promise will be rejected
|
|
42
|
+
* with the destination's error, or with any error that occurs during
|
|
43
|
+
* canceling the source.
|
|
44
|
+
*
|
|
45
|
+
* When this source readable stream closes, destination will be closed,
|
|
46
|
+
* unless preventClose is truthy. The returned promise will be fulfilled
|
|
47
|
+
* once this process completes, unless an error is encountered while
|
|
48
|
+
* closing the destination, in which case it will be rejected with that
|
|
49
|
+
* error.
|
|
50
|
+
*
|
|
51
|
+
* If destination starts out closed or closing, this source readable
|
|
52
|
+
* stream will be canceled, unless preventCancel is true. The returned
|
|
53
|
+
* promise will be rejected with an error indicating piping to a closed
|
|
54
|
+
* stream failed, or with any error that occurs during canceling the
|
|
55
|
+
* source.
|
|
56
|
+
*
|
|
57
|
+
* The signal option can be set to an AbortSignal to allow aborting an
|
|
58
|
+
* ongoing pipe operation via the corresponding AbortController. In this
|
|
59
|
+
* case, this source readable stream will be canceled, and destination
|
|
60
|
+
* aborted, unless the respective options preventCancel or preventAbort
|
|
61
|
+
* are set.
|
|
62
|
+
*/
|
|
63
|
+
preventClose?: boolean;
|
|
64
|
+
signal?: AbortSignal;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface ReadableStreamGenericReader {
|
|
68
|
+
readonly closed: Promise<undefined>;
|
|
69
|
+
cancel(reason?: any): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface ReadableStreamDefaultReadValueResult<T> {
|
|
73
|
+
done: false;
|
|
74
|
+
value: T;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface ReadableStreamDefaultReadDoneResult {
|
|
78
|
+
done: true;
|
|
79
|
+
value?: undefined;
|
|
80
|
+
}
|
|
81
|
+
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
|
82
|
+
type ReadableStreamDefaultReadResult<T> =
|
|
83
|
+
| ReadableStreamDefaultReadValueResult<T>
|
|
84
|
+
| ReadableStreamDefaultReadDoneResult;
|
|
85
|
+
|
|
86
|
+
interface ReadableByteStreamControllerCallback {
|
|
87
|
+
(controller: ReadableByteStreamController): void | PromiseLike<void>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface UnderlyingSinkAbortCallback {
|
|
91
|
+
(reason?: any): void | PromiseLike<void>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface UnderlyingSinkCloseCallback {
|
|
95
|
+
(): void | PromiseLike<void>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface UnderlyingSinkStartCallback {
|
|
99
|
+
(controller: WritableStreamDefaultController): any;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface UnderlyingSinkWriteCallback<W> {
|
|
103
|
+
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface UnderlyingSourceCancelCallback {
|
|
107
|
+
(reason?: any): void | PromiseLike<void>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface UnderlyingSourcePullCallback<R> {
|
|
111
|
+
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface UnderlyingSourceStartCallback<R> {
|
|
115
|
+
(controller: ReadableStreamController<R>): any;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface TransformerFlushCallback<O> {
|
|
119
|
+
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface TransformerStartCallback<O> {
|
|
123
|
+
(controller: TransformStreamDefaultController<O>): any;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface TransformerTransformCallback<I, O> {
|
|
127
|
+
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface UnderlyingByteSource {
|
|
131
|
+
autoAllocateChunkSize?: number;
|
|
132
|
+
cancel?: ReadableStreamErrorCallback;
|
|
133
|
+
pull?: ReadableByteStreamControllerCallback;
|
|
134
|
+
start?: ReadableByteStreamControllerCallback;
|
|
135
|
+
type: 'bytes';
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface UnderlyingSource<R = any> {
|
|
139
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
140
|
+
pull?: UnderlyingSourcePullCallback<R>;
|
|
141
|
+
start?: UnderlyingSourceStartCallback<R>;
|
|
142
|
+
type?: undefined;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface UnderlyingSink<W = any> {
|
|
146
|
+
abort?: UnderlyingSinkAbortCallback;
|
|
147
|
+
close?: UnderlyingSinkCloseCallback;
|
|
148
|
+
start?: UnderlyingSinkStartCallback;
|
|
149
|
+
type?: undefined;
|
|
150
|
+
write?: UnderlyingSinkWriteCallback<W>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface ReadableStreamErrorCallback {
|
|
154
|
+
(reason: any): void | PromiseLike<void>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** This Streams API interface represents a readable stream of byte data. */
|
|
158
|
+
interface ReadableStream<R = any> {
|
|
159
|
+
readonly locked: boolean;
|
|
160
|
+
cancel(reason?: any): Promise<void>;
|
|
161
|
+
getReader(): ReadableStreamDefaultReader<R>;
|
|
162
|
+
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
163
|
+
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
164
|
+
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
165
|
+
[Symbol.asyncIterator](options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const ReadableStream: {
|
|
169
|
+
prototype: ReadableStream;
|
|
170
|
+
new (
|
|
171
|
+
underlyingSource: UnderlyingByteSource,
|
|
172
|
+
strategy?: QueuingStrategy<Uint8Array>,
|
|
173
|
+
): ReadableStream<Uint8Array>;
|
|
174
|
+
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
|
178
|
+
read(): Promise<ReadableStreamDefaultReadResult<R>>;
|
|
179
|
+
releaseLock(): void;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const ReadableStreamDefaultReader: {
|
|
183
|
+
prototype: ReadableStreamDefaultReader;
|
|
184
|
+
new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const ReadableStreamBYOBReader: any;
|
|
188
|
+
const ReadableStreamBYOBRequest: any;
|
|
189
|
+
|
|
190
|
+
interface ReadableByteStreamController {
|
|
191
|
+
readonly byobRequest: undefined;
|
|
192
|
+
readonly desiredSize: number | null;
|
|
193
|
+
close(): void;
|
|
194
|
+
enqueue(chunk: ArrayBufferView): void;
|
|
195
|
+
error(error?: any): void;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const ReadableByteStreamController: {
|
|
199
|
+
prototype: ReadableByteStreamController;
|
|
200
|
+
new (): ReadableByteStreamController;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
interface ReadableStreamDefaultController<R = any> {
|
|
204
|
+
readonly desiredSize: number | null;
|
|
205
|
+
close(): void;
|
|
206
|
+
enqueue(chunk?: R): void;
|
|
207
|
+
error(e?: any): void;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const ReadableStreamDefaultController: {
|
|
211
|
+
prototype: ReadableStreamDefaultController;
|
|
212
|
+
new (): ReadableStreamDefaultController;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
interface Transformer<I = any, O = any> {
|
|
216
|
+
flush?: TransformerFlushCallback<O>;
|
|
217
|
+
readableType?: undefined;
|
|
218
|
+
start?: TransformerStartCallback<O>;
|
|
219
|
+
transform?: TransformerTransformCallback<I, O>;
|
|
220
|
+
writableType?: undefined;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
interface TransformStream<I = any, O = any> {
|
|
224
|
+
readonly readable: ReadableStream<O>;
|
|
225
|
+
readonly writable: WritableStream<I>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const TransformStream: {
|
|
229
|
+
prototype: TransformStream;
|
|
230
|
+
new <I = any, O = any>(
|
|
231
|
+
transformer?: Transformer<I, O>,
|
|
232
|
+
writableStrategy?: QueuingStrategy<I>,
|
|
233
|
+
readableStrategy?: QueuingStrategy<O>,
|
|
234
|
+
): TransformStream<I, O>;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
interface TransformStreamDefaultController<O = any> {
|
|
238
|
+
readonly desiredSize: number | null;
|
|
239
|
+
enqueue(chunk?: O): void;
|
|
240
|
+
error(reason?: any): void;
|
|
241
|
+
terminate(): void;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const TransformStreamDefaultController: {
|
|
245
|
+
prototype: TransformStreamDefaultController;
|
|
246
|
+
new (): TransformStreamDefaultController;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* This Streams API interface provides a standard abstraction for writing
|
|
251
|
+
* streaming data to a destination, known as a sink. This object comes with
|
|
252
|
+
* built-in back pressure and queuing.
|
|
253
|
+
*/
|
|
254
|
+
interface WritableStream<W = any> {
|
|
255
|
+
readonly locked: boolean;
|
|
256
|
+
abort(reason?: any): Promise<void>;
|
|
257
|
+
close(): Promise<void>;
|
|
258
|
+
getWriter(): WritableStreamDefaultWriter<W>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const WritableStream: {
|
|
262
|
+
prototype: WritableStream;
|
|
263
|
+
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* This Streams API interface is the object returned by
|
|
268
|
+
* WritableStream.getWriter() and once created locks the < writer to the
|
|
269
|
+
* WritableStream ensuring that no other streams can write to the underlying
|
|
270
|
+
* sink.
|
|
271
|
+
*/
|
|
272
|
+
interface WritableStreamDefaultWriter<W = any> {
|
|
273
|
+
readonly closed: Promise<undefined>;
|
|
274
|
+
readonly desiredSize: number | null;
|
|
275
|
+
readonly ready: Promise<undefined>;
|
|
276
|
+
abort(reason?: any): Promise<void>;
|
|
277
|
+
close(): Promise<void>;
|
|
278
|
+
releaseLock(): void;
|
|
279
|
+
write(chunk?: W): Promise<void>;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const WritableStreamDefaultWriter: {
|
|
283
|
+
prototype: WritableStreamDefaultWriter;
|
|
284
|
+
new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* This Streams API interface represents a controller allowing control of a
|
|
289
|
+
* WritableStream's state. When constructing a WritableStream, the
|
|
290
|
+
* underlying sink is given a corresponding WritableStreamDefaultController
|
|
291
|
+
* instance to manipulate.
|
|
292
|
+
*/
|
|
293
|
+
interface WritableStreamDefaultController {
|
|
294
|
+
error(e?: any): void;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
const WritableStreamDefaultController: {
|
|
298
|
+
prototype: WritableStreamDefaultController;
|
|
299
|
+
new (): WritableStreamDefaultController;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
interface QueuingStrategy<T = any> {
|
|
303
|
+
highWaterMark?: number;
|
|
304
|
+
size?: QueuingStrategySize<T>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
interface QueuingStrategySize<T = any> {
|
|
308
|
+
(chunk?: T): number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
interface QueuingStrategyInit {
|
|
312
|
+
/**
|
|
313
|
+
* Creates a new ByteLengthQueuingStrategy with the provided high water
|
|
314
|
+
* mark.
|
|
315
|
+
*
|
|
316
|
+
* Note that the provided high water mark will not be validated ahead of
|
|
317
|
+
* time. Instead, if it is negative, NaN, or not a number, the resulting
|
|
318
|
+
* ByteLengthQueuingStrategy will cause the corresponding stream
|
|
319
|
+
* constructor to throw.
|
|
320
|
+
*/
|
|
321
|
+
highWaterMark: number;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* This Streams API interface provides a built-in byte length queuing
|
|
326
|
+
* strategy that can be used when constructing streams.
|
|
327
|
+
*/
|
|
328
|
+
interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
|
|
329
|
+
readonly highWaterMark: number;
|
|
330
|
+
readonly size: QueuingStrategySize<ArrayBufferView>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const ByteLengthQueuingStrategy: {
|
|
334
|
+
prototype: ByteLengthQueuingStrategy;
|
|
335
|
+
new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* This Streams API interface provides a built-in byte length queuing
|
|
340
|
+
* strategy that can be used when constructing streams.
|
|
341
|
+
*/
|
|
342
|
+
interface CountQueuingStrategy extends QueuingStrategy {
|
|
343
|
+
readonly highWaterMark: number;
|
|
344
|
+
readonly size: QueuingStrategySize;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const CountQueuingStrategy: {
|
|
348
|
+
prototype: CountQueuingStrategy;
|
|
349
|
+
new (init: QueuingStrategyInit): CountQueuingStrategy;
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
interface TextEncoderStream {
|
|
353
|
+
/** Returns "utf-8". */
|
|
354
|
+
readonly encoding: 'utf-8';
|
|
355
|
+
readonly readable: ReadableStream<Uint8Array>;
|
|
356
|
+
readonly writable: WritableStream<string>;
|
|
357
|
+
readonly [Symbol.toStringTag]: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const TextEncoderStream: {
|
|
361
|
+
prototype: TextEncoderStream;
|
|
362
|
+
new (): TextEncoderStream;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
interface TextDecoderOptions {
|
|
366
|
+
fatal?: boolean;
|
|
367
|
+
ignoreBOM?: boolean;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
371
|
+
|
|
372
|
+
interface TextDecoderStream {
|
|
373
|
+
/** Returns encoding's name, lower cased. */
|
|
374
|
+
readonly encoding: string;
|
|
375
|
+
/** Returns `true` if error mode is "fatal", and `false` otherwise. */
|
|
376
|
+
readonly fatal: boolean;
|
|
377
|
+
/** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
|
|
378
|
+
readonly ignoreBOM: boolean;
|
|
379
|
+
readonly readable: ReadableStream<string>;
|
|
380
|
+
readonly writable: WritableStream<BufferSource>;
|
|
381
|
+
readonly [Symbol.toStringTag]: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
const TextDecoderStream: {
|
|
385
|
+
prototype: TextDecoderStream;
|
|
386
|
+
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
|
|
387
|
+
};
|
|
3
388
|
}
|
|
4
389
|
declare module 'node:stream/web' {
|
|
5
390
|
export * from 'stream/web';
|
|
@@ -71,6 +71,30 @@ declare module 'url' {
|
|
|
71
71
|
function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
|
|
72
72
|
function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|
|
73
73
|
function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
|
|
74
|
+
/**
|
|
75
|
+
* The URL object has both a `toString()` method and `href` property that return string serializations of the URL.
|
|
76
|
+
* These are not, however, customizable in any way. The `url.format(URL[, options])` method allows for basic
|
|
77
|
+
* customization of the output.
|
|
78
|
+
* Returns a customizable serialization of a URL `String` representation of a `WHATWG URL` object.
|
|
79
|
+
*
|
|
80
|
+
* ```js
|
|
81
|
+
* import url from 'url';
|
|
82
|
+
* const myURL = new URL('https://a:b@測試?abc#foo');
|
|
83
|
+
*
|
|
84
|
+
* console.log(myURL.href);
|
|
85
|
+
* // Prints https://a:b@xn--g6w251d/?abc#foo
|
|
86
|
+
*
|
|
87
|
+
* console.log(myURL.toString());
|
|
88
|
+
* // Prints https://a:b@xn--g6w251d/?abc#foo
|
|
89
|
+
*
|
|
90
|
+
* console.log(url.format(myURL, { fragment: false, unicode: true, auth: false }));
|
|
91
|
+
* // Prints 'https://測試/?abc'
|
|
92
|
+
* ```
|
|
93
|
+
* @since v7.6.0
|
|
94
|
+
* @param urlObject A `WHATWG URL` object
|
|
95
|
+
* @param options
|
|
96
|
+
*/
|
|
97
|
+
function format(urlObject: URL, options?: URLFormatOptions): string;
|
|
74
98
|
/**
|
|
75
99
|
* The `url.format()` method returns a formatted URL string derived from`urlObject`.
|
|
76
100
|
*
|
|
@@ -134,7 +158,6 @@ declare module 'url' {
|
|
|
134
158
|
* @deprecated Legacy: Use the WHATWG URL API instead.
|
|
135
159
|
* @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
|
|
136
160
|
*/
|
|
137
|
-
function format(urlObject: URL, options?: URLFormatOptions): string;
|
|
138
161
|
function format(urlObject: UrlObject | string): string;
|
|
139
162
|
/**
|
|
140
163
|
* The `url.resolve()` method resolves a target URL relative to a base URL in a
|
|
@@ -113,6 +113,20 @@ declare module 'util' {
|
|
|
113
113
|
* @since v10.0.0
|
|
114
114
|
*/
|
|
115
115
|
export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
|
116
|
+
/**
|
|
117
|
+
* Returns the string name for a numeric error code that comes from a Node.js API.
|
|
118
|
+
* The mapping between error codes and error names is platform-dependent.
|
|
119
|
+
* See `Common System Errors` for the names of common errors.
|
|
120
|
+
*
|
|
121
|
+
* ```js
|
|
122
|
+
* fs.access('file/that/does/not/exist', (err) => {
|
|
123
|
+
* const name = util.getSystemErrorName(err.errno);
|
|
124
|
+
* console.error(name); // ENOENT
|
|
125
|
+
* });
|
|
126
|
+
* ```
|
|
127
|
+
* @since v9.7.0
|
|
128
|
+
*/
|
|
129
|
+
export function getSystemErrorName(err: number): string;
|
|
116
130
|
/**
|
|
117
131
|
* Returns a Map of all system error codes available from the Node.js API.
|
|
118
132
|
* The mapping between error codes and error names is platform-dependent.
|
|
@@ -314,6 +328,9 @@ declare module 'util' {
|
|
|
314
328
|
* Allows changing inspect settings from the repl.
|
|
315
329
|
*/
|
|
316
330
|
let replDefaults: InspectOptions;
|
|
331
|
+
/**
|
|
332
|
+
* That can be used to declare custom inspect functions.
|
|
333
|
+
*/
|
|
317
334
|
const custom: unique symbol;
|
|
318
335
|
}
|
|
319
336
|
/**
|
|
@@ -520,6 +537,7 @@ declare module 'util' {
|
|
|
520
537
|
* @return The logging function
|
|
521
538
|
*/
|
|
522
539
|
export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
|
|
540
|
+
export const debug: typeof debuglog;
|
|
523
541
|
/**
|
|
524
542
|
* Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
|
|
525
543
|
*
|
|
@@ -789,6 +807,16 @@ declare module 'util' {
|
|
|
789
807
|
* @since v9.0.0
|
|
790
808
|
*/
|
|
791
809
|
export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
|
|
810
|
+
/**
|
|
811
|
+
* Returns `str` with any ANSI escape codes removed.
|
|
812
|
+
*
|
|
813
|
+
* ```js
|
|
814
|
+
* console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
|
|
815
|
+
* // Prints "value"
|
|
816
|
+
* ```
|
|
817
|
+
* @since v16.11.0
|
|
818
|
+
*/
|
|
819
|
+
export function stripVTControlCharacters(str: string): string;
|
|
792
820
|
/**
|
|
793
821
|
* Takes an `async` function (or a function that returns a `Promise`) and returns a
|
|
794
822
|
* function following the error-first callback style, i.e. taking
|
|
@@ -961,6 +989,9 @@ declare module 'util' {
|
|
|
961
989
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
|
962
990
|
export function promisify(fn: Function): Function;
|
|
963
991
|
export namespace promisify {
|
|
992
|
+
/**
|
|
993
|
+
* That can be used to declare custom promisified variants of functions.
|
|
994
|
+
*/
|
|
964
995
|
const custom: unique symbol;
|
|
965
996
|
}
|
|
966
997
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ResponseType, Response, ParseJsonFunction } from './types';
|
|
2
|
-
declare const parseBody: (response: Response, responseType: ResponseType, parseJson: ParseJsonFunction, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | undefined) => unknown;
|
|
2
|
+
declare const parseBody: (response: Response, responseType: ResponseType, parseJson: ParseJsonFunction, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex" | undefined) => unknown;
|
|
3
3
|
export default parseBody;
|
|
@@ -21,6 +21,7 @@ class ParseError extends core_1.RequestError {
|
|
|
21
21
|
const { options } = response.request;
|
|
22
22
|
super(`${error.message} in "${options.url.toString()}"`, error, response.request);
|
|
23
23
|
this.name = 'ParseError';
|
|
24
|
+
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_BODY_PARSE_FAILURE' : this.code;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
exports.ParseError = ParseError;
|
|
@@ -31,6 +32,7 @@ class CancelError extends core_1.RequestError {
|
|
|
31
32
|
constructor(request) {
|
|
32
33
|
super('Promise was canceled', {}, request);
|
|
33
34
|
this.name = 'CancelError';
|
|
35
|
+
this.code = 'ERR_CANCELED';
|
|
34
36
|
}
|
|
35
37
|
get isCanceled() {
|
|
36
38
|
return true;
|
|
@@ -952,7 +952,7 @@ An error to be thrown when a request fails.
|
|
|
952
952
|
Contains a `code` property with error class code, like `ECONNREFUSED`.
|
|
953
953
|
*/
|
|
954
954
|
export declare class RequestError extends Error {
|
|
955
|
-
code
|
|
955
|
+
code: string;
|
|
956
956
|
stack: string;
|
|
957
957
|
readonly options: NormalizedOptions;
|
|
958
958
|
readonly response?: Response;
|
|
@@ -121,11 +121,11 @@ Contains a `code` property with error class code, like `ECONNREFUSED`.
|
|
|
121
121
|
*/
|
|
122
122
|
class RequestError extends Error {
|
|
123
123
|
constructor(message, error, self) {
|
|
124
|
-
var _a;
|
|
124
|
+
var _a, _b;
|
|
125
125
|
super(message);
|
|
126
126
|
Error.captureStackTrace(this, this.constructor);
|
|
127
127
|
this.name = 'RequestError';
|
|
128
|
-
this.code = error.code;
|
|
128
|
+
this.code = (_a = error.code) !== null && _a !== void 0 ? _a : 'ERR_GOT_REQUEST_ERROR';
|
|
129
129
|
if (self instanceof Request) {
|
|
130
130
|
Object.defineProperty(this, 'request', {
|
|
131
131
|
enumerable: false,
|
|
@@ -150,7 +150,7 @@ class RequestError extends Error {
|
|
|
150
150
|
value: self
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
this.timings = (
|
|
153
|
+
this.timings = (_b = this.request) === null || _b === void 0 ? void 0 : _b.timings;
|
|
154
154
|
// Recover the original stacktrace
|
|
155
155
|
if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) {
|
|
156
156
|
const indexOfMessage = this.stack.indexOf(this.message) + this.message.length;
|
|
@@ -173,6 +173,7 @@ class MaxRedirectsError extends RequestError {
|
|
|
173
173
|
constructor(request) {
|
|
174
174
|
super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request);
|
|
175
175
|
this.name = 'MaxRedirectsError';
|
|
176
|
+
this.code = 'ERR_TOO_MANY_REDIRECTS';
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
exports.MaxRedirectsError = MaxRedirectsError;
|
|
@@ -184,6 +185,7 @@ class HTTPError extends RequestError {
|
|
|
184
185
|
constructor(response) {
|
|
185
186
|
super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request);
|
|
186
187
|
this.name = 'HTTPError';
|
|
188
|
+
this.code = 'ERR_NON_2XX_3XX_RESPONSE';
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
exports.HTTPError = HTTPError;
|
|
@@ -195,6 +197,7 @@ class CacheError extends RequestError {
|
|
|
195
197
|
constructor(error, request) {
|
|
196
198
|
super(error.message, error, request);
|
|
197
199
|
this.name = 'CacheError';
|
|
200
|
+
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code;
|
|
198
201
|
}
|
|
199
202
|
}
|
|
200
203
|
exports.CacheError = CacheError;
|
|
@@ -205,6 +208,7 @@ class UploadError extends RequestError {
|
|
|
205
208
|
constructor(error, request) {
|
|
206
209
|
super(error.message, error, request);
|
|
207
210
|
this.name = 'UploadError';
|
|
211
|
+
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code;
|
|
208
212
|
}
|
|
209
213
|
}
|
|
210
214
|
exports.UploadError = UploadError;
|
|
@@ -228,6 +232,7 @@ class ReadError extends RequestError {
|
|
|
228
232
|
constructor(error, request) {
|
|
229
233
|
super(error.message, error, request);
|
|
230
234
|
this.name = 'ReadError';
|
|
235
|
+
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code;
|
|
231
236
|
}
|
|
232
237
|
}
|
|
233
238
|
exports.ReadError = ReadError;
|
|
@@ -238,6 +243,7 @@ class UnsupportedProtocolError extends RequestError {
|
|
|
238
243
|
constructor(options) {
|
|
239
244
|
super(`Unsupported protocol "${options.url.protocol}"`, {}, options);
|
|
240
245
|
this.name = 'UnsupportedProtocolError';
|
|
246
|
+
this.code = 'ERR_UNSUPPORTED_PROTOCOL';
|
|
241
247
|
}
|
|
242
248
|
}
|
|
243
249
|
exports.UnsupportedProtocolError = UnsupportedProtocolError;
|
|
@@ -226,49 +226,51 @@ export interface Got extends Record<HTTPAlias, GotRequestFunction>, GotRequestFu
|
|
|
226
226
|
*/
|
|
227
227
|
defaults: InstanceDefaults;
|
|
228
228
|
/**
|
|
229
|
-
An error to be thrown when a cache method fails.
|
|
230
|
-
|
|
229
|
+
An error to be thrown when a cache method fails. For example, if the database goes down or there's a filesystem error.
|
|
230
|
+
Contains a `code` property with `ERR_CACHE_ACCESS` or a more specific failure code.
|
|
231
231
|
*/
|
|
232
232
|
CacheError: typeof CacheError;
|
|
233
233
|
/**
|
|
234
|
-
An error to be thrown when a request fails.
|
|
235
|
-
|
|
234
|
+
An error to be thrown when a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`.
|
|
235
|
+
If there is no specific code supplied, `code` defaults to `ERR_GOT_REQUEST_ERROR`.
|
|
236
236
|
*/
|
|
237
237
|
RequestError: typeof RequestError;
|
|
238
238
|
/**
|
|
239
|
-
An error to be thrown when reading from response stream fails.
|
|
239
|
+
An error to be thrown when reading from response stream fails. Contains a `code` property with
|
|
240
|
+
`ERR_READING_RESPONSE_STREAM` or a more specific failure code.
|
|
240
241
|
*/
|
|
241
242
|
ReadError: typeof ReadError;
|
|
242
243
|
/**
|
|
243
|
-
An error to be thrown when server response code is 2xx, and parsing body fails.
|
|
244
|
-
|
|
244
|
+
An error to be thrown when server response code is 2xx, and parsing body fails. Includes a
|
|
245
|
+
`response` property. Contains a `code` property with `ERR_BODY_PARSE_FAILURE` or a more specific failure code.
|
|
245
246
|
*/
|
|
246
247
|
ParseError: typeof ParseError;
|
|
247
248
|
/**
|
|
248
249
|
An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
|
|
249
|
-
Includes a `response` property.
|
|
250
|
+
Includes a `response` property. Contains a `code` property with `ERR_NON_2XX_3XX_RESPONSE` or a more specific failure code.
|
|
250
251
|
*/
|
|
251
252
|
HTTPError: typeof HTTPError;
|
|
252
253
|
/**
|
|
253
254
|
An error to be thrown when the server redirects you more than ten times.
|
|
254
|
-
Includes a `response` property.
|
|
255
|
+
Includes a `response` property. Contains a `code` property with `ERR_TOO_MANY_REDIRECTS`.
|
|
255
256
|
*/
|
|
256
257
|
MaxRedirectsError: typeof MaxRedirectsError;
|
|
257
258
|
/**
|
|
258
|
-
An error to be thrown when given an unsupported protocol.
|
|
259
|
+
An error to be thrown when given an unsupported protocol. Contains a `code` property with `ERR_UNSUPPORTED_PROTOCOL`.
|
|
259
260
|
*/
|
|
260
261
|
UnsupportedProtocolError: typeof UnsupportedProtocolError;
|
|
261
262
|
/**
|
|
262
263
|
An error to be thrown when the request is aborted due to a timeout.
|
|
263
|
-
Includes an `event` and `timings` property.
|
|
264
|
+
Includes an `event` and `timings` property. Contains a `code` property with `ETIMEDOUT`.
|
|
264
265
|
*/
|
|
265
266
|
TimeoutError: typeof TimeoutError;
|
|
266
267
|
/**
|
|
267
268
|
An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
|
|
269
|
+
Contains a `code` property with `ERR_UPLOAD` or a more specific failure code.
|
|
268
270
|
*/
|
|
269
271
|
UploadError: typeof UploadError;
|
|
270
272
|
/**
|
|
271
|
-
An error to be thrown when the request is aborted with `.cancel()`.
|
|
273
|
+
An error to be thrown when the request is aborted with `.cancel()`. Contains a `code` property with `ERR_CANCELED`.
|
|
272
274
|
*/
|
|
273
275
|
CancelError: typeof CancelError;
|
|
274
276
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "got",
|
|
3
|
-
"version": "11.8.
|
|
3
|
+
"version": "11.8.3",
|
|
4
4
|
"description": "Human-friendly and powerful HTTP request library for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/got",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@types/cacheable-request": "^6.0.1",
|
|
49
49
|
"@types/responselike": "^1.0.0",
|
|
50
50
|
"cacheable-lookup": "^5.0.3",
|
|
51
|
-
"cacheable-request": "^7.0.
|
|
51
|
+
"cacheable-request": "^7.0.2",
|
|
52
52
|
"decompress-response": "^6.0.0",
|
|
53
53
|
"http2-wrapper": "^1.0.0-beta.5.2",
|
|
54
54
|
"lowercase-keys": "^2.0.0",
|