cloudstructs 0.6.14 → 0.6.15
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/.jsii +4 -4
- package/assets/slack-app/provider.lambda/index.js +1 -0
- package/assets/slack-textract/detect.lambda/index.js +19 -12
- package/assets/ssl-server-test/analyze.lambda/index.js +1 -0
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +1 -1
- package/lib/ssl-server-test/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
- package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +61 -24
- package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +1 -0
- package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +9 -4
- package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +95 -23
- package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +25 -0
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http.d.ts +61 -24
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/https.d.ts +1 -0
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +95 -23
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +96 -20
- package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +96 -20
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +61 -24
- package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +1 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +9 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +95 -23
- package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +25 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http.d.ts +61 -24
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/https.d.ts +1 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +95 -23
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +96 -20
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +96 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +61 -24
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +9 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +95 -23
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +25 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +61 -24
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +95 -23
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +96 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +96 -20
- package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +61 -24
- package/node_modules/@types/is-stream/node_modules/@types/node/https.d.ts +1 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/package.json +9 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +95 -23
- package/node_modules/@types/is-stream/node_modules/@types/node/timers/promises.d.ts +25 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http.d.ts +61 -24
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/https.d.ts +1 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +95 -23
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +96 -20
- package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +96 -20
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +61 -24
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +9 -4
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +95 -23
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +25 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +61 -24
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +95 -23
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +96 -20
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +96 -20
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +61 -24
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +9 -4
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +95 -23
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +25 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +61 -24
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +95 -23
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +96 -20
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +96 -20
- package/node_modules/got/dist/source/as-promise/index.js +1 -0
- package/node_modules/got/package.json +2 -1
- package/package.json +11 -10
|
@@ -2357,7 +2357,7 @@ declare module 'crypto' {
|
|
|
2357
2357
|
/** @deprecated since v10.0.0 */
|
|
2358
2358
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
2359
2359
|
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2360
|
-
type KeyFormat = 'pem' | 'der';
|
|
2360
|
+
type KeyFormat = 'pem' | 'der' | 'jwk';
|
|
2361
2361
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2362
2362
|
format: T;
|
|
2363
2363
|
cipher?: string | undefined;
|
|
@@ -3131,23 +3131,23 @@ declare module 'crypto' {
|
|
|
3131
3131
|
/**
|
|
3132
3132
|
* @default 'always'
|
|
3133
3133
|
*/
|
|
3134
|
-
subject
|
|
3134
|
+
subject?: 'always' | 'default' | 'never';
|
|
3135
3135
|
/**
|
|
3136
3136
|
* @default true
|
|
3137
3137
|
*/
|
|
3138
|
-
wildcards
|
|
3138
|
+
wildcards?: boolean;
|
|
3139
3139
|
/**
|
|
3140
3140
|
* @default true
|
|
3141
3141
|
*/
|
|
3142
|
-
partialWildcards
|
|
3142
|
+
partialWildcards?: boolean;
|
|
3143
3143
|
/**
|
|
3144
3144
|
* @default false
|
|
3145
3145
|
*/
|
|
3146
|
-
multiLabelWildcards
|
|
3146
|
+
multiLabelWildcards?: boolean;
|
|
3147
3147
|
/**
|
|
3148
3148
|
* @default false
|
|
3149
3149
|
*/
|
|
3150
|
-
singleLabelSubdomains
|
|
3150
|
+
singleLabelSubdomains?: boolean;
|
|
3151
3151
|
}
|
|
3152
3152
|
/**
|
|
3153
3153
|
* Encapsulates an X509 certificate and provides read-only access to
|
|
@@ -41,7 +41,7 @@ declare module 'diagnostics_channel' {
|
|
|
41
41
|
* @param name The channel name
|
|
42
42
|
* @return If there are active subscribers
|
|
43
43
|
*/
|
|
44
|
-
function hasSubscribers(name: string): boolean;
|
|
44
|
+
function hasSubscribers(name: string | symbol): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* This is the primary entry-point for anyone wanting to interact with a named
|
|
47
47
|
* channel. It produces a channel object which is optimized to reduce overhead at
|
|
@@ -56,8 +56,8 @@ declare module 'diagnostics_channel' {
|
|
|
56
56
|
* @param name The channel name
|
|
57
57
|
* @return The named channel object
|
|
58
58
|
*/
|
|
59
|
-
function channel(name: string): Channel;
|
|
60
|
-
type ChannelListener = (message: unknown, name: string) => void;
|
|
59
|
+
function channel(name: string | symbol): Channel;
|
|
60
|
+
type ChannelListener = (message: unknown, name: string | symbol) => void;
|
|
61
61
|
/**
|
|
62
62
|
* The class `Channel` represents an individual named channel within the data
|
|
63
63
|
* pipeline. It is use to track subscribers and to publish messages when there
|
|
@@ -68,7 +68,7 @@ declare module 'diagnostics_channel' {
|
|
|
68
68
|
* @since v15.1.0, v14.17.0
|
|
69
69
|
*/
|
|
70
70
|
class Channel {
|
|
71
|
-
readonly name: string;
|
|
71
|
+
readonly name: string | symbol;
|
|
72
72
|
/**
|
|
73
73
|
* Check if there are active subscribers to this channel. This is helpful if
|
|
74
74
|
* the message you want to send might be expensive to prepare.
|
|
@@ -88,7 +88,7 @@ declare module 'diagnostics_channel' {
|
|
|
88
88
|
* @since v15.1.0, v14.17.0
|
|
89
89
|
*/
|
|
90
90
|
readonly hasSubscribers: boolean;
|
|
91
|
-
private constructor(name: string);
|
|
91
|
+
private constructor(name: string | symbol);
|
|
92
92
|
/**
|
|
93
93
|
* Publish a message to any subscribers to the channel. This will
|
|
94
94
|
* trigger message handlers synchronously so they will execute within
|
|
@@ -43,6 +43,7 @@ declare module 'http' {
|
|
|
43
43
|
import * as stream from 'node:stream';
|
|
44
44
|
import { URL } from 'node:url';
|
|
45
45
|
import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
|
|
46
|
+
import { LookupOptions } from 'node:dns';
|
|
46
47
|
// incoming headers will never contain number
|
|
47
48
|
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
|
48
49
|
accept?: string | undefined;
|
|
@@ -113,56 +114,87 @@ declare module 'http' {
|
|
|
113
114
|
type OutgoingHttpHeader = number | string | string[];
|
|
114
115
|
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
|
|
115
116
|
interface ClientRequestArgs {
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
_defaultAgent?: Agent | undefined;
|
|
118
|
+
agent?: Agent | boolean | undefined;
|
|
119
|
+
auth?: string | null | undefined;
|
|
120
|
+
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
|
|
121
|
+
createConnection?:
|
|
122
|
+
| ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
|
|
123
|
+
| undefined;
|
|
124
|
+
defaultPort?: number | string | undefined;
|
|
125
|
+
family?: number | undefined;
|
|
126
|
+
headers?: OutgoingHttpHeaders | undefined;
|
|
127
|
+
hints?: LookupOptions['hints'];
|
|
118
128
|
host?: string | null | undefined;
|
|
119
129
|
hostname?: string | null | undefined;
|
|
120
|
-
|
|
121
|
-
port?: number | string | null | undefined;
|
|
122
|
-
defaultPort?: number | string | undefined;
|
|
130
|
+
insecureHTTPParser?: boolean | undefined;
|
|
123
131
|
localAddress?: string | undefined;
|
|
124
|
-
|
|
132
|
+
localPort?: number | undefined;
|
|
133
|
+
lookup?: LookupFunction | undefined;
|
|
125
134
|
/**
|
|
126
|
-
* @default
|
|
135
|
+
* @default 16384
|
|
127
136
|
*/
|
|
128
137
|
maxHeaderSize?: number | undefined;
|
|
129
138
|
method?: string | undefined;
|
|
130
139
|
path?: string | null | undefined;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
agent?: Agent | boolean | undefined;
|
|
134
|
-
_defaultAgent?: Agent | undefined;
|
|
135
|
-
timeout?: number | undefined;
|
|
140
|
+
port?: number | string | null | undefined;
|
|
141
|
+
protocol?: string | null | undefined;
|
|
136
142
|
setHost?: boolean | undefined;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
lookup?: LookupFunction | undefined;
|
|
143
|
+
signal?: AbortSignal | undefined;
|
|
144
|
+
socketPath?: string | undefined;
|
|
145
|
+
timeout?: number | undefined;
|
|
146
|
+
uniqueHeaders?: Array<string | string[]> | undefined;
|
|
142
147
|
}
|
|
143
148
|
interface ServerOptions<
|
|
144
149
|
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
|
145
150
|
Response extends typeof ServerResponse = typeof ServerResponse,
|
|
146
151
|
> {
|
|
152
|
+
/**
|
|
153
|
+
* Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
|
|
154
|
+
*/
|
|
147
155
|
IncomingMessage?: Request | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
|
|
158
|
+
*/
|
|
148
159
|
ServerResponse?: Response | undefined;
|
|
149
160
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* @
|
|
161
|
+
* Sets the timeout value in milliseconds for receiving the entire request from the client.
|
|
162
|
+
* @see Server.requestTimeout for more information.
|
|
163
|
+
* @default 300000
|
|
164
|
+
* @since v18.0.0
|
|
154
165
|
*/
|
|
155
|
-
|
|
166
|
+
requestTimeout?: number | undefined;
|
|
156
167
|
/**
|
|
157
|
-
*
|
|
168
|
+
* The number of milliseconds of inactivity a server needs to wait for additional incoming data,
|
|
169
|
+
* after it has finished writing the last response, before a socket will be destroyed.
|
|
170
|
+
* @see Server.keepAliveTimeout for more information.
|
|
171
|
+
* @default 5000
|
|
172
|
+
* @since v18.0.0
|
|
173
|
+
*/
|
|
174
|
+
keepAliveTimeout?: number | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
|
|
177
|
+
* @default 30000
|
|
178
|
+
*/
|
|
179
|
+
connectionsCheckingInterval?: number | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
|
|
158
182
|
* Using the insecure parser should be avoided.
|
|
159
183
|
* See --insecure-http-parser for more information.
|
|
160
184
|
* @default false
|
|
161
185
|
*/
|
|
162
186
|
insecureHTTPParser?: boolean | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Optionally overrides the value of
|
|
189
|
+
* `--max-http-header-size` for requests received by this server, i.e.
|
|
190
|
+
* the maximum length of request headers in bytes.
|
|
191
|
+
* @default 16384
|
|
192
|
+
* @since v13.3.0
|
|
193
|
+
*/
|
|
194
|
+
maxHeaderSize?: number | undefined;
|
|
163
195
|
/**
|
|
164
196
|
* If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
|
|
165
|
-
* @default
|
|
197
|
+
* @default true
|
|
166
198
|
* @since v16.5.0
|
|
167
199
|
*/
|
|
168
200
|
noDelay?: boolean | undefined;
|
|
@@ -179,6 +211,11 @@ declare module 'http' {
|
|
|
179
211
|
* @since v16.5.0
|
|
180
212
|
*/
|
|
181
213
|
keepAliveInitialDelay?: number | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* A list of response headers that should be sent only once.
|
|
216
|
+
* If the header's value is an array, the items will be joined using `; `.
|
|
217
|
+
*/
|
|
218
|
+
uniqueHeaders?: Array<string | string[]> | undefined;
|
|
182
219
|
}
|
|
183
220
|
type RequestListener<
|
|
184
221
|
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
|
@@ -14,6 +14,7 @@ declare module 'https' {
|
|
|
14
14
|
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
|
|
15
15
|
type RequestOptions = http.RequestOptions &
|
|
16
16
|
tls.SecureContextOptions & {
|
|
17
|
+
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
|
|
17
18
|
rejectUnauthorized?: boolean | undefined; // Defaults to true
|
|
18
19
|
servername?: string | undefined; // SNI TLS Extension
|
|
19
20
|
};
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
// Linus Unnebäck <https://github.com/LinusU>
|
|
42
42
|
// wafuwafu13 <https://github.com/wafuwafu13>
|
|
43
43
|
// Matteo Collina <https://github.com/mcollina>
|
|
44
|
+
// Dmitry Semigradsky <https://github.com/Semigradsky>
|
|
44
45
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
45
46
|
|
|
46
47
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.11.
|
|
3
|
+
"version": "18.11.17",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -209,12 +209,17 @@
|
|
|
209
209
|
"name": "Matteo Collina",
|
|
210
210
|
"url": "https://github.com/mcollina",
|
|
211
211
|
"githubUsername": "mcollina"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "Dmitry Semigradsky",
|
|
215
|
+
"url": "https://github.com/Semigradsky",
|
|
216
|
+
"githubUsername": "Semigradsky"
|
|
212
217
|
}
|
|
213
218
|
],
|
|
214
219
|
"main": "",
|
|
215
220
|
"types": "index.d.ts",
|
|
216
221
|
"typesVersions": {
|
|
217
|
-
"
|
|
222
|
+
"<=4.8": {
|
|
218
223
|
"*": [
|
|
219
224
|
"ts4.8/*"
|
|
220
225
|
]
|
|
@@ -227,6 +232,6 @@
|
|
|
227
232
|
},
|
|
228
233
|
"scripts": {},
|
|
229
234
|
"dependencies": {},
|
|
230
|
-
"typesPublisherContentHash": "
|
|
231
|
-
"typeScriptVersion": "4.
|
|
235
|
+
"typesPublisherContentHash": "2d88944144b47057ed775becb8763772da81db335f442b6aafc1eb4b61e8d915",
|
|
236
|
+
"typeScriptVersion": "4.2"
|
|
232
237
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `node:test` module provides a standalone testing module.
|
|
3
|
-
* @see [source](https://github.com/nodejs/node/blob/v18.
|
|
3
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js)
|
|
4
4
|
*/
|
|
5
5
|
declare module 'node:test' {
|
|
6
6
|
/**
|
|
@@ -61,6 +61,19 @@ declare module 'node:test' {
|
|
|
61
61
|
function describe(name?: string, fn?: SuiteFn): void;
|
|
62
62
|
function describe(options?: TestOptions, fn?: SuiteFn): void;
|
|
63
63
|
function describe(fn?: SuiteFn): void;
|
|
64
|
+
namespace describe {
|
|
65
|
+
// Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
|
|
66
|
+
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
67
|
+
function skip(name?: string, fn?: SuiteFn): void;
|
|
68
|
+
function skip(options?: TestOptions, fn?: SuiteFn): void;
|
|
69
|
+
function skip(fn?: SuiteFn): void;
|
|
70
|
+
|
|
71
|
+
// Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
|
|
72
|
+
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
73
|
+
function todo(name?: string, fn?: SuiteFn): void;
|
|
74
|
+
function todo(options?: TestOptions, fn?: SuiteFn): void;
|
|
75
|
+
function todo(fn?: SuiteFn): void;
|
|
76
|
+
}
|
|
64
77
|
|
|
65
78
|
/**
|
|
66
79
|
* @since v18.6.0
|
|
@@ -74,6 +87,19 @@ declare module 'node:test' {
|
|
|
74
87
|
function it(name?: string, fn?: ItFn): void;
|
|
75
88
|
function it(options?: TestOptions, fn?: ItFn): void;
|
|
76
89
|
function it(fn?: ItFn): void;
|
|
90
|
+
namespace it {
|
|
91
|
+
// Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
92
|
+
function skip(name?: string, options?: TestOptions, fn?: ItFn): void;
|
|
93
|
+
function skip(name?: string, fn?: ItFn): void;
|
|
94
|
+
function skip(options?: TestOptions, fn?: ItFn): void;
|
|
95
|
+
function skip(fn?: ItFn): void;
|
|
96
|
+
|
|
97
|
+
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
98
|
+
function todo(name?: string, options?: TestOptions, fn?: ItFn): void;
|
|
99
|
+
function todo(name?: string, fn?: ItFn): void;
|
|
100
|
+
function todo(options?: TestOptions, fn?: ItFn): void;
|
|
101
|
+
function todo(fn?: ItFn): void;
|
|
102
|
+
}
|
|
77
103
|
|
|
78
104
|
/**
|
|
79
105
|
* The type of a function under test. The first argument to this function is a
|
|
@@ -96,32 +122,45 @@ declare module 'node:test' {
|
|
|
96
122
|
|
|
97
123
|
interface RunOptions {
|
|
98
124
|
/**
|
|
99
|
-
*
|
|
125
|
+
* If a number is provided, then that many files would run in parallel.
|
|
126
|
+
* If truthy, it would run (number of cpu cores - 1) files in parallel.
|
|
127
|
+
* If falsy, it would only run one file at a time.
|
|
128
|
+
* If unspecified, subtests inherit this value from their parent.
|
|
129
|
+
* @default true
|
|
100
130
|
*/
|
|
101
|
-
concurrency?: number | boolean;
|
|
131
|
+
concurrency?: number | boolean | undefined;
|
|
102
132
|
|
|
103
133
|
/**
|
|
104
|
-
* An array containing the list of files to run.
|
|
134
|
+
* An array containing the list of files to run.
|
|
135
|
+
* If unspecified, the test runner execution model will be used.
|
|
105
136
|
*/
|
|
106
|
-
files?: readonly string[];
|
|
137
|
+
files?: readonly string[] | undefined;
|
|
107
138
|
|
|
108
139
|
/**
|
|
109
|
-
* Allows aborting an in-progress test.
|
|
140
|
+
* Allows aborting an in-progress test execution.
|
|
110
141
|
* @default undefined
|
|
111
142
|
*/
|
|
112
|
-
signal?: AbortSignal;
|
|
143
|
+
signal?: AbortSignal | undefined;
|
|
113
144
|
|
|
114
145
|
/**
|
|
115
|
-
* A number of milliseconds the test will fail after.
|
|
116
|
-
* value from their parent.
|
|
146
|
+
* A number of milliseconds the test will fail after.
|
|
147
|
+
* If unspecified, subtests inherit this value from their parent.
|
|
117
148
|
* @default Infinity
|
|
118
149
|
*/
|
|
119
|
-
timeout?: number;
|
|
150
|
+
timeout?: number | undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Sets inspector port of test child process.
|
|
154
|
+
* If a nullish value is provided, each process gets its own port,
|
|
155
|
+
* incremented from the primary's `process.debugPort`.
|
|
156
|
+
*/
|
|
157
|
+
inspectPort?: number | (() => number) | undefined;
|
|
120
158
|
}
|
|
121
159
|
|
|
122
160
|
/**
|
|
123
|
-
* A successful call of the run() method will return a new TapStream object,
|
|
124
|
-
*
|
|
161
|
+
* A successful call of the `run()` method will return a new `TapStream` object,
|
|
162
|
+
* streaming a [TAP](https://testanything.org/) output.
|
|
163
|
+
* `TapStream` will emit events in the order of the tests' definitions.
|
|
125
164
|
* @since v18.9.0
|
|
126
165
|
*/
|
|
127
166
|
interface TapStream extends NodeJS.ReadableStream {
|
|
@@ -216,6 +255,24 @@ declare module 'node:test' {
|
|
|
216
255
|
* @since v18.0.0
|
|
217
256
|
*/
|
|
218
257
|
interface TestContext {
|
|
258
|
+
/**
|
|
259
|
+
* This function is used to create a hook running before each subtest of the current test.
|
|
260
|
+
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
261
|
+
* the second argument. Default: A no-op function.
|
|
262
|
+
* @param options Configuration options for the hook.
|
|
263
|
+
* @since v18.8.0
|
|
264
|
+
*/
|
|
265
|
+
beforeEach: typeof beforeEach;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* This function is used to create a hook running after each subtest of the current test.
|
|
269
|
+
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
270
|
+
* the second argument. Default: A no-op function.
|
|
271
|
+
* @param options Configuration options for the hook.
|
|
272
|
+
* @since v18.8.0
|
|
273
|
+
*/
|
|
274
|
+
afterEach: typeof afterEach;
|
|
275
|
+
|
|
219
276
|
/**
|
|
220
277
|
* This function is used to write TAP diagnostics to the output. Any diagnostic information is
|
|
221
278
|
* included at the end of the test's results. This function does not return a value.
|
|
@@ -224,6 +281,12 @@ declare module 'node:test' {
|
|
|
224
281
|
*/
|
|
225
282
|
diagnostic(message: string): void;
|
|
226
283
|
|
|
284
|
+
/**
|
|
285
|
+
* The name of the test.
|
|
286
|
+
* @since v18.8.0
|
|
287
|
+
*/
|
|
288
|
+
readonly name: string;
|
|
289
|
+
|
|
227
290
|
/**
|
|
228
291
|
* If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`
|
|
229
292
|
* option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
|
|
@@ -233,6 +296,12 @@ declare module 'node:test' {
|
|
|
233
296
|
*/
|
|
234
297
|
runOnly(shouldRunOnlyTests: boolean): void;
|
|
235
298
|
|
|
299
|
+
/**
|
|
300
|
+
* Can be used to abort test subtasks when the test has been aborted.
|
|
301
|
+
* @since v18.7.0
|
|
302
|
+
*/
|
|
303
|
+
readonly signal: AbortSignal;
|
|
304
|
+
|
|
236
305
|
/**
|
|
237
306
|
* This function causes the test's output to indicate the test as skipped. If `message` is
|
|
238
307
|
* provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
|
|
@@ -268,31 +337,34 @@ declare module 'node:test' {
|
|
|
268
337
|
|
|
269
338
|
interface TestOptions {
|
|
270
339
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
340
|
+
* If a number is provided, then that many tests would run in parallel.
|
|
341
|
+
* If truthy, it would run (number of cpu cores - 1) tests in parallel.
|
|
342
|
+
* For subtests, it will be `Infinity` tests in parallel.
|
|
343
|
+
* If falsy, it would only run one test at a time.
|
|
344
|
+
* If unspecified, subtests inherit this value from their parent.
|
|
345
|
+
* @default false
|
|
274
346
|
*/
|
|
275
|
-
concurrency?: number;
|
|
347
|
+
concurrency?: number | boolean | undefined;
|
|
276
348
|
|
|
277
349
|
/**
|
|
278
350
|
* If truthy, and the test context is configured to run `only` tests, then this test will be
|
|
279
351
|
* run. Otherwise, the test is skipped.
|
|
280
352
|
* @default false
|
|
281
353
|
*/
|
|
282
|
-
only?: boolean;
|
|
354
|
+
only?: boolean | undefined;
|
|
283
355
|
|
|
284
356
|
/**
|
|
285
357
|
* Allows aborting an in-progress test.
|
|
286
358
|
* @since v18.8.0
|
|
287
359
|
*/
|
|
288
|
-
signal?: AbortSignal;
|
|
360
|
+
signal?: AbortSignal | undefined;
|
|
289
361
|
|
|
290
362
|
/**
|
|
291
363
|
* If truthy, the test is skipped. If a string is provided, that string is displayed in the
|
|
292
364
|
* test results as the reason for skipping the test.
|
|
293
365
|
* @default false
|
|
294
366
|
*/
|
|
295
|
-
skip?: boolean | string;
|
|
367
|
+
skip?: boolean | string | undefined;
|
|
296
368
|
|
|
297
369
|
/**
|
|
298
370
|
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
|
|
@@ -300,14 +372,14 @@ declare module 'node:test' {
|
|
|
300
372
|
* @default Infinity
|
|
301
373
|
* @since v18.7.0
|
|
302
374
|
*/
|
|
303
|
-
timeout?: number;
|
|
375
|
+
timeout?: number | undefined;
|
|
304
376
|
|
|
305
377
|
/**
|
|
306
378
|
* If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
|
|
307
379
|
* the test results as the reason why the test is `TODO`.
|
|
308
380
|
* @default false
|
|
309
381
|
*/
|
|
310
|
-
todo?: boolean | string;
|
|
382
|
+
todo?: boolean | string | undefined;
|
|
311
383
|
}
|
|
312
384
|
|
|
313
385
|
/**
|
|
@@ -360,14 +432,14 @@ declare module 'node:test' {
|
|
|
360
432
|
/**
|
|
361
433
|
* Allows aborting an in-progress hook.
|
|
362
434
|
*/
|
|
363
|
-
signal?: AbortSignal;
|
|
435
|
+
signal?: AbortSignal | undefined;
|
|
364
436
|
|
|
365
437
|
/**
|
|
366
438
|
* A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
|
|
367
439
|
* value from their parent.
|
|
368
440
|
* @default Infinity
|
|
369
441
|
*/
|
|
370
|
-
timeout?: number;
|
|
442
|
+
timeout?: number | undefined;
|
|
371
443
|
}
|
|
372
444
|
|
|
373
445
|
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
|
|
@@ -62,6 +62,31 @@ declare module 'timers/promises' {
|
|
|
62
62
|
* @since v15.9.0
|
|
63
63
|
*/
|
|
64
64
|
function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
|
|
65
|
+
|
|
66
|
+
interface Scheduler {
|
|
67
|
+
/**
|
|
68
|
+
* ```js
|
|
69
|
+
* import { scheduler } from 'node:timers/promises';
|
|
70
|
+
*
|
|
71
|
+
* await scheduler.wait(1000); // Wait one second before continuing
|
|
72
|
+
* ```
|
|
73
|
+
* An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
|
|
74
|
+
* Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported.
|
|
75
|
+
* @since v16.14.0
|
|
76
|
+
* @experimental
|
|
77
|
+
* @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
|
|
78
|
+
*/
|
|
79
|
+
wait: (delay?: number, options?: TimerOptions) => Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
|
|
82
|
+
* Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments.
|
|
83
|
+
* @since v16.14.0
|
|
84
|
+
* @experimental
|
|
85
|
+
*/
|
|
86
|
+
yield: () => Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const scheduler: Scheduler;
|
|
65
90
|
}
|
|
66
91
|
declare module 'node:timers/promises' {
|
|
67
92
|
export * from 'timers/promises';
|
|
@@ -2357,7 +2357,7 @@ declare module 'crypto' {
|
|
|
2357
2357
|
/** @deprecated since v10.0.0 */
|
|
2358
2358
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
2359
2359
|
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2360
|
-
type KeyFormat = 'pem' | 'der';
|
|
2360
|
+
type KeyFormat = 'pem' | 'der' | 'jwk';
|
|
2361
2361
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2362
2362
|
format: T;
|
|
2363
2363
|
cipher?: string | undefined;
|
|
@@ -3131,23 +3131,23 @@ declare module 'crypto' {
|
|
|
3131
3131
|
/**
|
|
3132
3132
|
* @default 'always'
|
|
3133
3133
|
*/
|
|
3134
|
-
subject
|
|
3134
|
+
subject?: 'always' | 'default' | 'never';
|
|
3135
3135
|
/**
|
|
3136
3136
|
* @default true
|
|
3137
3137
|
*/
|
|
3138
|
-
wildcards
|
|
3138
|
+
wildcards?: boolean;
|
|
3139
3139
|
/**
|
|
3140
3140
|
* @default true
|
|
3141
3141
|
*/
|
|
3142
|
-
partialWildcards
|
|
3142
|
+
partialWildcards?: boolean;
|
|
3143
3143
|
/**
|
|
3144
3144
|
* @default false
|
|
3145
3145
|
*/
|
|
3146
|
-
multiLabelWildcards
|
|
3146
|
+
multiLabelWildcards?: boolean;
|
|
3147
3147
|
/**
|
|
3148
3148
|
* @default false
|
|
3149
3149
|
*/
|
|
3150
|
-
singleLabelSubdomains
|
|
3150
|
+
singleLabelSubdomains?: boolean;
|
|
3151
3151
|
}
|
|
3152
3152
|
/**
|
|
3153
3153
|
* Encapsulates an X509 certificate and provides read-only access to
|
|
@@ -41,7 +41,7 @@ declare module 'diagnostics_channel' {
|
|
|
41
41
|
* @param name The channel name
|
|
42
42
|
* @return If there are active subscribers
|
|
43
43
|
*/
|
|
44
|
-
function hasSubscribers(name: string): boolean;
|
|
44
|
+
function hasSubscribers(name: string | symbol): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* This is the primary entry-point for anyone wanting to interact with a named
|
|
47
47
|
* channel. It produces a channel object which is optimized to reduce overhead at
|
|
@@ -56,8 +56,8 @@ declare module 'diagnostics_channel' {
|
|
|
56
56
|
* @param name The channel name
|
|
57
57
|
* @return The named channel object
|
|
58
58
|
*/
|
|
59
|
-
function channel(name: string): Channel;
|
|
60
|
-
type ChannelListener = (message: unknown, name: string) => void;
|
|
59
|
+
function channel(name: string | symbol): Channel;
|
|
60
|
+
type ChannelListener = (message: unknown, name: string | symbol) => void;
|
|
61
61
|
/**
|
|
62
62
|
* The class `Channel` represents an individual named channel within the data
|
|
63
63
|
* pipeline. It is use to track subscribers and to publish messages when there
|
|
@@ -68,7 +68,7 @@ declare module 'diagnostics_channel' {
|
|
|
68
68
|
* @since v15.1.0, v14.17.0
|
|
69
69
|
*/
|
|
70
70
|
class Channel {
|
|
71
|
-
readonly name: string;
|
|
71
|
+
readonly name: string | symbol;
|
|
72
72
|
/**
|
|
73
73
|
* Check if there are active subscribers to this channel. This is helpful if
|
|
74
74
|
* the message you want to send might be expensive to prepare.
|
|
@@ -88,7 +88,7 @@ declare module 'diagnostics_channel' {
|
|
|
88
88
|
* @since v15.1.0, v14.17.0
|
|
89
89
|
*/
|
|
90
90
|
readonly hasSubscribers: boolean;
|
|
91
|
-
private constructor(name: string);
|
|
91
|
+
private constructor(name: string | symbol);
|
|
92
92
|
/**
|
|
93
93
|
* Publish a message to any subscribers to the channel. This will
|
|
94
94
|
* trigger message handlers synchronously so they will execute within
|