aws-delivlib 15.4.0 → 15.4.2
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/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
- package/lib/package-integrity/handler/validate.bundle.js +11361 -9248
- package/lib/publishing/github/node_modules/.yarn-integrity +5 -5
- package/lib/publishing/github/node_modules/@types/aws-lambda/README.md +1 -1
- package/lib/publishing/github/node_modules/@types/aws-lambda/package.json +2 -2
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +3 -3
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert/strict.d.ts +13 -56
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +189 -190
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.buffer.d.ts +12 -13
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +103 -237
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +40 -155
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +238 -384
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +45 -404
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/constants.d.ts +3 -10
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +1019 -1600
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +133 -81
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +9 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +136 -183
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +12 -32
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +872 -840
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ffi.d.ts +500 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +256 -85
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +865 -525
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +12 -34
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +433 -312
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +548 -893
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +64 -243
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +25 -7
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +70 -58
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +54 -219
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +224 -226
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +41 -49
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +13 -18
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/posix.d.ts +8 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/win32.d.ts +8 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +119 -141
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +339 -690
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +390 -205
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +3 -31
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +3 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/quic.d.ts +2191 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +66 -152
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +101 -109
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +1 -116
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +486 -68
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/iter.d.ts +449 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/web.d.ts +197 -454
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +603 -491
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test/reporters.d.ts +60 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +585 -292
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +3 -141
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +180 -267
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +3 -97
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +26 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +118 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +61 -43
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +156 -584
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util/types.d.ts +558 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +173 -1099
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +175 -36
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vfs.d.ts +211 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +293 -209
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +24 -74
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/streams.d.ts +97 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +260 -407
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +782 -165
- package/lib/publishing/github/node_modules/semver/classes/range.js +2 -2
- package/lib/publishing/github/node_modules/semver/internal/constants.js +30 -0
- package/lib/publishing/github/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/lib/publishing/github/node_modules/semver/package.json +1 -1
- package/lib/publishing/github/node_modules/undici-types/agent.d.ts +12 -13
- package/lib/publishing/github/node_modules/undici-types/api.d.ts +26 -26
- package/lib/publishing/github/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/lib/publishing/github/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/lib/publishing/github/node_modules/undici-types/client-stats.d.ts +15 -0
- package/lib/publishing/github/node_modules/undici-types/client.d.ts +63 -37
- package/lib/publishing/github/node_modules/undici-types/connector.d.ts +5 -2
- package/lib/publishing/github/node_modules/undici-types/cookies.d.ts +3 -1
- package/lib/publishing/github/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/lib/publishing/github/node_modules/undici-types/dispatcher.d.ts +136 -139
- package/lib/publishing/github/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/lib/publishing/github/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/lib/publishing/github/node_modules/undici-types/errors.d.ts +92 -54
- package/lib/publishing/github/node_modules/undici-types/eventsource.d.ts +9 -4
- package/lib/publishing/github/node_modules/undici-types/fetch.d.ts +51 -25
- package/lib/publishing/github/node_modules/undici-types/formdata.d.ts +7 -7
- package/lib/publishing/github/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/lib/publishing/github/node_modules/undici-types/global-origin.d.ts +5 -5
- package/lib/publishing/github/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/lib/publishing/github/node_modules/undici-types/handlers.d.ts +10 -9
- package/lib/publishing/github/node_modules/undici-types/header.d.ts +162 -1
- package/lib/publishing/github/node_modules/undici-types/index.d.ts +69 -47
- package/lib/publishing/github/node_modules/undici-types/interceptors.d.ts +72 -9
- package/lib/publishing/github/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/lib/publishing/github/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/lib/publishing/github/node_modules/undici-types/mock-client.d.ts +6 -4
- package/lib/publishing/github/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/lib/publishing/github/node_modules/undici-types/mock-interceptor.d.ts +26 -21
- package/lib/publishing/github/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/lib/publishing/github/node_modules/undici-types/package.json +1 -1
- package/lib/publishing/github/node_modules/undici-types/patch.d.ts +0 -4
- package/lib/publishing/github/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/lib/publishing/github/node_modules/undici-types/pool.d.ts +14 -14
- package/lib/publishing/github/node_modules/undici-types/proxy-agent.d.ts +14 -6
- package/lib/publishing/github/node_modules/undici-types/readable.d.ts +19 -16
- package/lib/publishing/github/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/lib/publishing/github/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/lib/publishing/github/node_modules/undici-types/round-robin-pool.d.ts +39 -0
- package/lib/publishing/github/node_modules/undici-types/snapshot-agent.d.ts +113 -0
- package/lib/publishing/github/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/lib/publishing/github/node_modules/undici-types/util.d.ts +3 -3
- package/lib/publishing/github/node_modules/undici-types/utility.d.ts +7 -0
- package/lib/publishing/github/node_modules/undici-types/webidl.d.ts +148 -30
- package/lib/publishing/github/node_modules/undici-types/websocket.d.ts +48 -10
- package/lib/shellable.d.ts +7 -3
- package/lib/shellable.js +44 -30
- package/package.json +11 -11
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/lib/publishing/github/node_modules/undici-types/file.d.ts +0 -39
- package/lib/publishing/github/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare module "stream/promises" {
|
|
1
|
+
declare module "node:stream/promises" {
|
|
2
|
+
import { Abortable } from "node:events";
|
|
2
3
|
import {
|
|
3
4
|
FinishedOptions as _FinishedOptions,
|
|
4
5
|
PipelineDestination,
|
|
5
|
-
PipelineOptions,
|
|
6
|
-
PipelinePromise,
|
|
7
6
|
PipelineSource,
|
|
8
7
|
PipelineTransform,
|
|
9
8
|
} from "node:stream";
|
|
9
|
+
import { ReadableStream, WritableStream } from "node:stream/web";
|
|
10
10
|
interface FinishedOptions extends _FinishedOptions {
|
|
11
11
|
/**
|
|
12
12
|
* If true, removes the listeners registered by this function before the promise is fulfilled.
|
|
@@ -14,15 +14,130 @@ declare module "stream/promises" {
|
|
|
14
14
|
*/
|
|
15
15
|
cleanup?: boolean | undefined;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* ```js
|
|
19
|
+
* import { finished } from 'node:stream/promises';
|
|
20
|
+
* import { createReadStream } from 'node:fs';
|
|
21
|
+
*
|
|
22
|
+
* const rs = createReadStream('archive.tar');
|
|
23
|
+
*
|
|
24
|
+
* async function run() {
|
|
25
|
+
* await finished(rs);
|
|
26
|
+
* console.log('Stream is done reading.');
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* run().catch(console.error);
|
|
30
|
+
* rs.resume(); // Drain the stream.
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options-callback).
|
|
34
|
+
*
|
|
35
|
+
* `stream.finished()` leaves dangling event listeners (in particular
|
|
36
|
+
* `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is
|
|
37
|
+
* resolved or rejected. The reason for this is so that unexpected `'error'`
|
|
38
|
+
* events (due to incorrect stream implementations) do not cause unexpected
|
|
39
|
+
* crashes. If this is unwanted behavior then `options.cleanup` should be set to
|
|
40
|
+
* `true`:
|
|
41
|
+
*
|
|
42
|
+
* ```js
|
|
43
|
+
* await finished(rs, { cleanup: true });
|
|
44
|
+
* ```
|
|
45
|
+
* @since v15.0.0
|
|
46
|
+
* @returns Fulfills when the stream is no longer readable or writable.
|
|
47
|
+
*/
|
|
17
48
|
function finished(
|
|
18
|
-
stream: NodeJS.ReadableStream | NodeJS.WritableStream |
|
|
49
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream,
|
|
19
50
|
options?: FinishedOptions,
|
|
20
51
|
): Promise<void>;
|
|
52
|
+
interface PipelineOptions extends Abortable {
|
|
53
|
+
end?: boolean | undefined;
|
|
54
|
+
}
|
|
55
|
+
type PipelineResult<S extends PipelineDestination<any, any>> = S extends (...args: any[]) => PromiseLike<infer R>
|
|
56
|
+
? Promise<R>
|
|
57
|
+
: Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* ```js
|
|
60
|
+
* import { pipeline } from 'node:stream/promises';
|
|
61
|
+
* import { createReadStream, createWriteStream } from 'node:fs';
|
|
62
|
+
* import { createGzip } from 'node:zlib';
|
|
63
|
+
*
|
|
64
|
+
* await pipeline(
|
|
65
|
+
* createReadStream('archive.tar'),
|
|
66
|
+
* createGzip(),
|
|
67
|
+
* createWriteStream('archive.tar.gz'),
|
|
68
|
+
* );
|
|
69
|
+
* console.log('Pipeline succeeded.');
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* To use an `AbortSignal`, pass it inside an options object, as the last argument.
|
|
73
|
+
* When the signal is aborted, `destroy` will be called on the underlying pipeline,
|
|
74
|
+
* with an `AbortError`.
|
|
75
|
+
*
|
|
76
|
+
* ```js
|
|
77
|
+
* import { pipeline } from 'node:stream/promises';
|
|
78
|
+
* import { createReadStream, createWriteStream } from 'node:fs';
|
|
79
|
+
* import { createGzip } from 'node:zlib';
|
|
80
|
+
*
|
|
81
|
+
* const ac = new AbortController();
|
|
82
|
+
* const { signal } = ac;
|
|
83
|
+
* setImmediate(() => ac.abort());
|
|
84
|
+
* try {
|
|
85
|
+
* await pipeline(
|
|
86
|
+
* createReadStream('archive.tar'),
|
|
87
|
+
* createGzip(),
|
|
88
|
+
* createWriteStream('archive.tar.gz'),
|
|
89
|
+
* { signal },
|
|
90
|
+
* );
|
|
91
|
+
* } catch (err) {
|
|
92
|
+
* console.error(err); // AbortError
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* The `pipeline` API also supports async generators:
|
|
97
|
+
*
|
|
98
|
+
* ```js
|
|
99
|
+
* import { pipeline } from 'node:stream/promises';
|
|
100
|
+
* import { createReadStream, createWriteStream } from 'node:fs';
|
|
101
|
+
*
|
|
102
|
+
* await pipeline(
|
|
103
|
+
* createReadStream('lowercase.txt'),
|
|
104
|
+
* async function* (source, { signal }) {
|
|
105
|
+
* source.setEncoding('utf8'); // Work with strings rather than `Buffer`s.
|
|
106
|
+
* for await (const chunk of source) {
|
|
107
|
+
* yield await processChunk(chunk, { signal });
|
|
108
|
+
* }
|
|
109
|
+
* },
|
|
110
|
+
* createWriteStream('uppercase.txt'),
|
|
111
|
+
* );
|
|
112
|
+
* console.log('Pipeline succeeded.');
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* Remember to handle the `signal` argument passed into the async generator.
|
|
116
|
+
* Especially in the case where the async generator is the source for the
|
|
117
|
+
* pipeline (i.e. first argument) or the pipeline will never complete.
|
|
118
|
+
*
|
|
119
|
+
* ```js
|
|
120
|
+
* import { pipeline } from 'node:stream/promises';
|
|
121
|
+
* import fs from 'node:fs';
|
|
122
|
+
* await pipeline(
|
|
123
|
+
* async function* ({ signal }) {
|
|
124
|
+
* await someLongRunningfn({ signal });
|
|
125
|
+
* yield 'asd';
|
|
126
|
+
* },
|
|
127
|
+
* fs.createWriteStream('uppercase.txt'),
|
|
128
|
+
* );
|
|
129
|
+
* console.log('Pipeline succeeded.');
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-callback):
|
|
133
|
+
* @since v15.0.0
|
|
134
|
+
* @returns Fulfills when the pipeline is complete.
|
|
135
|
+
*/
|
|
21
136
|
function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
|
|
22
137
|
source: A,
|
|
23
138
|
destination: B,
|
|
24
139
|
options?: PipelineOptions,
|
|
25
|
-
):
|
|
140
|
+
): PipelineResult<B>;
|
|
26
141
|
function pipeline<
|
|
27
142
|
A extends PipelineSource<any>,
|
|
28
143
|
T1 extends PipelineTransform<A, any>,
|
|
@@ -32,7 +147,7 @@ declare module "stream/promises" {
|
|
|
32
147
|
transform1: T1,
|
|
33
148
|
destination: B,
|
|
34
149
|
options?: PipelineOptions,
|
|
35
|
-
):
|
|
150
|
+
): PipelineResult<B>;
|
|
36
151
|
function pipeline<
|
|
37
152
|
A extends PipelineSource<any>,
|
|
38
153
|
T1 extends PipelineTransform<A, any>,
|
|
@@ -44,7 +159,7 @@ declare module "stream/promises" {
|
|
|
44
159
|
transform2: T2,
|
|
45
160
|
destination: B,
|
|
46
161
|
options?: PipelineOptions,
|
|
47
|
-
):
|
|
162
|
+
): PipelineResult<B>;
|
|
48
163
|
function pipeline<
|
|
49
164
|
A extends PipelineSource<any>,
|
|
50
165
|
T1 extends PipelineTransform<A, any>,
|
|
@@ -58,7 +173,7 @@ declare module "stream/promises" {
|
|
|
58
173
|
transform3: T3,
|
|
59
174
|
destination: B,
|
|
60
175
|
options?: PipelineOptions,
|
|
61
|
-
):
|
|
176
|
+
): PipelineResult<B>;
|
|
62
177
|
function pipeline<
|
|
63
178
|
A extends PipelineSource<any>,
|
|
64
179
|
T1 extends PipelineTransform<A, any>,
|
|
@@ -74,17 +189,23 @@ declare module "stream/promises" {
|
|
|
74
189
|
transform4: T4,
|
|
75
190
|
destination: B,
|
|
76
191
|
options?: PipelineOptions,
|
|
77
|
-
):
|
|
192
|
+
): PipelineResult<B>;
|
|
78
193
|
function pipeline(
|
|
79
|
-
streams:
|
|
194
|
+
streams: readonly [PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>],
|
|
80
195
|
options?: PipelineOptions,
|
|
81
196
|
): Promise<void>;
|
|
82
197
|
function pipeline(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
198
|
+
...streams: [PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>]
|
|
199
|
+
): Promise<void>;
|
|
200
|
+
function pipeline(
|
|
201
|
+
...streams: [
|
|
202
|
+
PipelineSource<any>,
|
|
203
|
+
...PipelineTransform<any, any>[],
|
|
204
|
+
PipelineDestination<any, any>,
|
|
205
|
+
options: PipelineOptions,
|
|
206
|
+
]
|
|
86
207
|
): Promise<void>;
|
|
87
208
|
}
|
|
88
|
-
declare module "
|
|
89
|
-
export * from "stream/promises";
|
|
209
|
+
declare module "stream/promises" {
|
|
210
|
+
export * from "node:stream/promises";
|
|
90
211
|
}
|