cloudstructs 0.1.41 → 0.2.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/.gitattributes +19 -19
- package/.jsii +2754 -1559
- package/API.md +77 -77
- package/README.md +2 -3
- package/lib/codecommit-mirror/index.d.ts +6 -6
- package/lib/codecommit-mirror/index.js +13 -12
- package/lib/ecs-service-roller/index.d.ts +5 -5
- package/lib/ecs-service-roller/index.js +10 -9
- package/lib/email-receiver/receiver.d.ts +5 -5
- package/lib/email-receiver/receiver.js +15 -14
- package/lib/saml-identity-provider/index.d.ts +18 -18
- package/lib/saml-identity-provider/index.js +16 -15
- package/lib/slack-events/index.d.ts +5 -4
- package/lib/slack-events/index.js +13 -14
- package/lib/slack-textract/index.d.ts +6 -5
- package/lib/slack-textract/index.js +12 -11
- package/lib/state-machine-cr-provider/index.d.ts +2 -1
- package/lib/state-machine-cr-provider/index.js +14 -13
- package/lib/static-website/index.d.ts +6 -6
- package/lib/static-website/index.js +16 -15
- package/lib/url-shortener/index.d.ts +8 -7
- package/lib/url-shortener/index.js +19 -18
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +19 -16
- package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +5 -0
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +51 -3
- package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +8 -8
- package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
- package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +11 -0
- package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +11 -0
- package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +90 -3
- package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +92 -39
- package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +17 -6
- package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +2 -3
- package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +7 -0
- package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +8 -13
- package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +5 -1
- package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +1 -0
- package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +385 -0
- package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +26 -6
- package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +1 -3
- package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +24 -1
- package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +31 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +19 -16
- package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +5 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +51 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +8 -8
- package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +11 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +11 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +90 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +92 -39
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +17 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +2 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +7 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +8 -13
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +5 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +1 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +385 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +26 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +1 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +24 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +31 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +19 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +51 -3
- 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 +90 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +92 -39
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +17 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +2 -3
- 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 -13
- 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/stream.d.ts +26 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +1 -3
- 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/is-stream/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +19 -16
- package/node_modules/@types/is-stream/node_modules/@types/node/console.d.ts +5 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +51 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +8 -8
- package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/dns/promises.d.ts +11 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +11 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +90 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +92 -39
- package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +17 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +2 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/inspector.d.ts +7 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/package.json +8 -13
- package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +5 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +1 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/stream/web.d.ts +385 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +26 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/tty.d.ts +1 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +24 -1
- package/node_modules/@types/is-stream/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/buffer.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +19 -16
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -0
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +51 -3
- 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 +90 -3
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +92 -39
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +17 -6
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +2 -3
- 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 -13
- 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/stream.d.ts +26 -6
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +1 -3
- 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/buffer.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +19 -16
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -0
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +51 -3
- 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 +90 -3
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +92 -39
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +17 -6
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +2 -3
- 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 -13
- 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/stream.d.ts +26 -6
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +1 -3
- 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/follow-redirects/index.js +45 -14
- package/node_modules/follow-redirects/package.json +1 -1
- 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/node_modules/mime-db/HISTORY.md +13 -0
- package/node_modules/mime-db/db.json +54 -0
- package/node_modules/mime-db/package.json +7 -7
- package/node_modules/mime-types/HISTORY.md +13 -3
- package/node_modules/mime-types/package.json +7 -7
- package/package.json +29 -80
|
@@ -394,6 +394,11 @@ declare module 'node:console' {
|
|
|
394
394
|
ignoreErrors?: boolean | undefined;
|
|
395
395
|
colorMode?: boolean | 'auto' | undefined;
|
|
396
396
|
inspectOptions?: InspectOptions | undefined;
|
|
397
|
+
/**
|
|
398
|
+
* Set group indentation
|
|
399
|
+
* @default 2
|
|
400
|
+
*/
|
|
401
|
+
groupIndentation?: number | undefined;
|
|
397
402
|
}
|
|
398
403
|
interface ConsoleConstructor {
|
|
399
404
|
prototype: Console;
|
|
@@ -250,7 +250,7 @@ declare module 'crypto' {
|
|
|
250
250
|
*/
|
|
251
251
|
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
|
252
252
|
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
|
253
|
-
type BinaryToTextEncoding = 'base64' | 'hex';
|
|
253
|
+
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
|
|
254
254
|
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
|
|
255
255
|
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
|
|
256
256
|
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
|
@@ -1167,6 +1167,26 @@ declare module 'crypto' {
|
|
|
1167
1167
|
},
|
|
1168
1168
|
callback: (err: Error | null, key: KeyObject) => void
|
|
1169
1169
|
): void;
|
|
1170
|
+
/**
|
|
1171
|
+
* Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
|
1172
|
+
*
|
|
1173
|
+
* ```js
|
|
1174
|
+
* const {
|
|
1175
|
+
* generateKeySync
|
|
1176
|
+
* } = await import('crypto');
|
|
1177
|
+
*
|
|
1178
|
+
* const key = generateKeySync('hmac', { length: 64 });
|
|
1179
|
+
* console.log(key.export().toString('hex')); // e89..........41e
|
|
1180
|
+
* ```
|
|
1181
|
+
* @since v15.0.0
|
|
1182
|
+
* @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
|
|
1183
|
+
*/
|
|
1184
|
+
function generateKeySync(
|
|
1185
|
+
type: 'hmac' | 'aes',
|
|
1186
|
+
options: {
|
|
1187
|
+
length: number;
|
|
1188
|
+
}
|
|
1189
|
+
): KeyObject;
|
|
1170
1190
|
interface JsonWebKeyInput {
|
|
1171
1191
|
key: JsonWebKey;
|
|
1172
1192
|
format: 'jwk';
|
|
@@ -2140,7 +2160,7 @@ declare module 'crypto' {
|
|
|
2140
2160
|
key: BinaryLike,
|
|
2141
2161
|
curve: string,
|
|
2142
2162
|
inputEncoding?: BinaryToTextEncoding,
|
|
2143
|
-
outputEncoding?: 'latin1' | 'hex' | 'base64',
|
|
2163
|
+
outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
|
|
2144
2164
|
format?: 'uncompressed' | 'compressed' | 'hybrid'
|
|
2145
2165
|
): Buffer | string;
|
|
2146
2166
|
/**
|
|
@@ -2259,7 +2279,7 @@ declare module 'crypto' {
|
|
|
2259
2279
|
interface X448KeyPairKeyObjectOptions {}
|
|
2260
2280
|
interface ECKeyPairKeyObjectOptions {
|
|
2261
2281
|
/**
|
|
2262
|
-
* Name of the curve to use
|
|
2282
|
+
* Name of the curve to use
|
|
2263
2283
|
*/
|
|
2264
2284
|
namedCurve: string;
|
|
2265
2285
|
}
|
|
@@ -2269,6 +2289,7 @@ declare module 'crypto' {
|
|
|
2269
2289
|
*/
|
|
2270
2290
|
modulusLength: number;
|
|
2271
2291
|
/**
|
|
2292
|
+
* Public exponent
|
|
2272
2293
|
* @default 0x10001
|
|
2273
2294
|
*/
|
|
2274
2295
|
publicExponent?: number | undefined;
|
|
@@ -2279,9 +2300,22 @@ declare module 'crypto' {
|
|
|
2279
2300
|
*/
|
|
2280
2301
|
modulusLength: number;
|
|
2281
2302
|
/**
|
|
2303
|
+
* Public exponent
|
|
2282
2304
|
* @default 0x10001
|
|
2283
2305
|
*/
|
|
2284
2306
|
publicExponent?: number | undefined;
|
|
2307
|
+
/**
|
|
2308
|
+
* Name of the message digest
|
|
2309
|
+
*/
|
|
2310
|
+
hashAlgorithm?: string;
|
|
2311
|
+
/**
|
|
2312
|
+
* Name of the message digest used by MGF1
|
|
2313
|
+
*/
|
|
2314
|
+
mgf1HashAlgorithm?: string;
|
|
2315
|
+
/**
|
|
2316
|
+
* Minimal salt length in bytes
|
|
2317
|
+
*/
|
|
2318
|
+
saltLength?: string;
|
|
2285
2319
|
}
|
|
2286
2320
|
interface DSAKeyPairKeyObjectOptions {
|
|
2287
2321
|
/**
|
|
@@ -2299,6 +2333,7 @@ declare module 'crypto' {
|
|
|
2299
2333
|
*/
|
|
2300
2334
|
modulusLength: number;
|
|
2301
2335
|
/**
|
|
2336
|
+
* Public exponent
|
|
2302
2337
|
* @default 0x10001
|
|
2303
2338
|
*/
|
|
2304
2339
|
publicExponent?: number | undefined;
|
|
@@ -2316,9 +2351,22 @@ declare module 'crypto' {
|
|
|
2316
2351
|
*/
|
|
2317
2352
|
modulusLength: number;
|
|
2318
2353
|
/**
|
|
2354
|
+
* Public exponent
|
|
2319
2355
|
* @default 0x10001
|
|
2320
2356
|
*/
|
|
2321
2357
|
publicExponent?: number | undefined;
|
|
2358
|
+
/**
|
|
2359
|
+
* Name of the message digest
|
|
2360
|
+
*/
|
|
2361
|
+
hashAlgorithm?: string;
|
|
2362
|
+
/**
|
|
2363
|
+
* Name of the message digest used by MGF1
|
|
2364
|
+
*/
|
|
2365
|
+
mgf1HashAlgorithm?: string;
|
|
2366
|
+
/**
|
|
2367
|
+
* Minimal salt length in bytes
|
|
2368
|
+
*/
|
|
2369
|
+
saltLength?: string;
|
|
2322
2370
|
publicKeyEncoding: {
|
|
2323
2371
|
type: 'spki';
|
|
2324
2372
|
format: PubF;
|
|
@@ -166,17 +166,17 @@ declare module 'dgram' {
|
|
|
166
166
|
* @since v0.1.99
|
|
167
167
|
* @param callback with no parameters. Called when binding is complete.
|
|
168
168
|
*/
|
|
169
|
-
bind(port?: number, address?: string, callback?: () => void):
|
|
170
|
-
bind(port?: number, callback?: () => void):
|
|
171
|
-
bind(callback?: () => void):
|
|
172
|
-
bind(options: BindOptions, callback?: () => void):
|
|
169
|
+
bind(port?: number, address?: string, callback?: () => void): this;
|
|
170
|
+
bind(port?: number, callback?: () => void): this;
|
|
171
|
+
bind(callback?: () => void): this;
|
|
172
|
+
bind(options: BindOptions, callback?: () => void): this;
|
|
173
173
|
/**
|
|
174
174
|
* Close the underlying socket and stop listening for data on it. If a callback is
|
|
175
175
|
* provided, it is added as a listener for the `'close'` event.
|
|
176
176
|
* @since v0.1.99
|
|
177
177
|
* @param callback Called when the socket has been closed.
|
|
178
178
|
*/
|
|
179
|
-
close(callback?: () => void):
|
|
179
|
+
close(callback?: () => void): this;
|
|
180
180
|
/**
|
|
181
181
|
* Associates the `dgram.Socket` to a remote address and port. Every
|
|
182
182
|
* message sent by this handle is automatically sent to that destination. Also,
|
|
@@ -414,7 +414,7 @@ declare module 'dgram' {
|
|
|
414
414
|
* This method throws `EBADF` if called on an unbound socket.
|
|
415
415
|
* @since v0.3.8
|
|
416
416
|
*/
|
|
417
|
-
setMulticastLoopback(flag: boolean):
|
|
417
|
+
setMulticastLoopback(flag: boolean): boolean;
|
|
418
418
|
/**
|
|
419
419
|
* Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
|
|
420
420
|
* "Time to Live", in this context it specifies the number of IP hops that a
|
|
@@ -427,7 +427,7 @@ declare module 'dgram' {
|
|
|
427
427
|
* This method throws `EBADF` if called on an unbound socket.
|
|
428
428
|
* @since v0.3.8
|
|
429
429
|
*/
|
|
430
|
-
setMulticastTTL(ttl: number):
|
|
430
|
+
setMulticastTTL(ttl: number): number;
|
|
431
431
|
/**
|
|
432
432
|
* Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
|
|
433
433
|
* in bytes.
|
|
@@ -457,7 +457,7 @@ declare module 'dgram' {
|
|
|
457
457
|
* This method throws `EBADF` if called on an unbound socket.
|
|
458
458
|
* @since v0.1.101
|
|
459
459
|
*/
|
|
460
|
-
setTTL(ttl: number):
|
|
460
|
+
setTTL(ttl: number): number;
|
|
461
461
|
/**
|
|
462
462
|
* By default, binding a socket will cause it to block the Node.js process from
|
|
463
463
|
* exiting as long as the socket is open. The `socket.unref()` method can be used
|
|
@@ -37,6 +37,7 @@ declare module 'diagnostics_channel' {
|
|
|
37
37
|
* // There are subscribers, prepare and publish message
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
40
|
+
* @since v15.1.0, v14.17.0
|
|
40
41
|
* @param name The channel name
|
|
41
42
|
* @return If there are active subscribers
|
|
42
43
|
*/
|
|
@@ -51,6 +52,7 @@ declare module 'diagnostics_channel' {
|
|
|
51
52
|
*
|
|
52
53
|
* const channel = diagnostics_channel.channel('my-channel');
|
|
53
54
|
* ```
|
|
55
|
+
* @since v15.1.0, v14.17.0
|
|
54
56
|
* @param name The channel name
|
|
55
57
|
* @return The named channel object
|
|
56
58
|
*/
|
|
@@ -63,6 +65,7 @@ declare module 'diagnostics_channel' {
|
|
|
63
65
|
* lookups at publish time, enabling very fast publish speeds and allowing
|
|
64
66
|
* for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
|
|
65
67
|
* with `new Channel(name)` is not supported.
|
|
68
|
+
* @since v15.1.0, v14.17.0
|
|
66
69
|
*/
|
|
67
70
|
class Channel {
|
|
68
71
|
readonly name: string;
|
|
@@ -82,6 +85,7 @@ declare module 'diagnostics_channel' {
|
|
|
82
85
|
* // There are subscribers, prepare and publish message
|
|
83
86
|
* }
|
|
84
87
|
* ```
|
|
88
|
+
* @since v15.1.0, v14.17.0
|
|
85
89
|
*/
|
|
86
90
|
readonly hasSubscribers: boolean;
|
|
87
91
|
private constructor(name: string);
|
|
@@ -99,6 +103,7 @@ declare module 'diagnostics_channel' {
|
|
|
99
103
|
* // Received data
|
|
100
104
|
* });
|
|
101
105
|
* ```
|
|
106
|
+
* @since v15.1.0, v14.17.0
|
|
102
107
|
* @param onMessage The handler to receive channel messages
|
|
103
108
|
*/
|
|
104
109
|
subscribe(onMessage: ChannelListener): void;
|
|
@@ -118,6 +123,7 @@ declare module 'diagnostics_channel' {
|
|
|
118
123
|
*
|
|
119
124
|
* channel.unsubscribe(onMessage);
|
|
120
125
|
* ```
|
|
126
|
+
* @since v15.1.0, v14.17.0
|
|
121
127
|
* @param onMessage The previous subscribed handler to remove
|
|
122
128
|
*/
|
|
123
129
|
unsubscribe(onMessage: ChannelListener): void;
|
|
@@ -331,6 +331,17 @@ declare module 'dns/promises' {
|
|
|
331
331
|
* @param servers array of `RFC 5952` formatted addresses
|
|
332
332
|
*/
|
|
333
333
|
function setServers(servers: ReadonlyArray<string>): void;
|
|
334
|
+
/**
|
|
335
|
+
* Set the default value of `verbatim` in {@link lookup}. The value could be:
|
|
336
|
+
* - `ipv4first`: sets default `verbatim` `false`.
|
|
337
|
+
* - `verbatim`: sets default `verbatim` `true`.
|
|
338
|
+
*
|
|
339
|
+
* The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`.
|
|
340
|
+
* When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.
|
|
341
|
+
* @since v14.18.0
|
|
342
|
+
* @param order must be 'ipv4first' or 'verbatim'.
|
|
343
|
+
*/
|
|
344
|
+
function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
|
334
345
|
class Resolver {
|
|
335
346
|
constructor(options?: ResolverOptions);
|
|
336
347
|
cancel(): void;
|
|
@@ -526,6 +526,17 @@ declare module 'dns' {
|
|
|
526
526
|
* @since v0.11.3
|
|
527
527
|
*/
|
|
528
528
|
export function getServers(): string[];
|
|
529
|
+
/**
|
|
530
|
+
* Set the default value of `verbatim` in {@link lookup}. The value could be:
|
|
531
|
+
* - `ipv4first`: sets default `verbatim` `false`.
|
|
532
|
+
* - `verbatim`: sets default `verbatim` `true`.
|
|
533
|
+
*
|
|
534
|
+
* The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`.
|
|
535
|
+
* When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.
|
|
536
|
+
* @since v14.18.0
|
|
537
|
+
* @param order must be 'ipv4first' or 'verbatim'.
|
|
538
|
+
*/
|
|
539
|
+
export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
|
529
540
|
// Error codes
|
|
530
541
|
export const NODATA: string;
|
|
531
542
|
export const FORMERR: string;
|
|
@@ -31,6 +31,8 @@ declare module 'fs/promises' {
|
|
|
31
31
|
WatchOptions,
|
|
32
32
|
WatchEventType,
|
|
33
33
|
CopyOptions,
|
|
34
|
+
ReadStream,
|
|
35
|
+
WriteStream,
|
|
34
36
|
} from 'node:fs';
|
|
35
37
|
interface FileChangeInfo<T extends string | Buffer> {
|
|
36
38
|
eventType: WatchEventType;
|
|
@@ -59,6 +61,20 @@ declare module 'fs/promises' {
|
|
|
59
61
|
length?: number | null;
|
|
60
62
|
position?: number | null;
|
|
61
63
|
}
|
|
64
|
+
interface CreateReadStreamOptions {
|
|
65
|
+
encoding?: BufferEncoding | null | undefined;
|
|
66
|
+
autoClose?: boolean | undefined;
|
|
67
|
+
emitClose?: boolean | undefined;
|
|
68
|
+
start?: number | undefined;
|
|
69
|
+
end?: number | undefined;
|
|
70
|
+
highWaterMark?: number | undefined;
|
|
71
|
+
}
|
|
72
|
+
interface CreateWriteStreamOptions {
|
|
73
|
+
encoding?: BufferEncoding | null | undefined;
|
|
74
|
+
autoClose?: boolean | undefined;
|
|
75
|
+
emitClose?: boolean | undefined;
|
|
76
|
+
start?: number | undefined;
|
|
77
|
+
}
|
|
62
78
|
// TODO: Add `EventEmitter` close
|
|
63
79
|
interface FileHandle {
|
|
64
80
|
/**
|
|
@@ -90,6 +106,77 @@ declare module 'fs/promises' {
|
|
|
90
106
|
* @return Fulfills with `undefined` upon success.
|
|
91
107
|
*/
|
|
92
108
|
chmod(mode: Mode): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
|
|
111
|
+
* returned by this method has a default `highWaterMark` of 64 kb.
|
|
112
|
+
*
|
|
113
|
+
* `options` can include `start` and `end` values to read a range of bytes from
|
|
114
|
+
* the file instead of the entire file. Both `start` and `end` are inclusive and
|
|
115
|
+
* start counting at 0, allowed values are in the
|
|
116
|
+
* \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
|
|
117
|
+
* omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
|
|
118
|
+
* the current file position. The `encoding` can be any one of those accepted by `Buffer`.
|
|
119
|
+
*
|
|
120
|
+
* If the `FileHandle` points to a character device that only supports blocking
|
|
121
|
+
* reads (such as keyboard or sound card), read operations do not finish until data
|
|
122
|
+
* is available. This can prevent the process from exiting and the stream from
|
|
123
|
+
* closing naturally.
|
|
124
|
+
*
|
|
125
|
+
* By default, the stream will emit a `'close'` event after it has been
|
|
126
|
+
* destroyed. Set the `emitClose` option to `false` to change this behavior.
|
|
127
|
+
*
|
|
128
|
+
* ```js
|
|
129
|
+
* import { open } from 'fs/promises';
|
|
130
|
+
*
|
|
131
|
+
* const fd = await open('/dev/input/event0');
|
|
132
|
+
* // Create a stream from some character device.
|
|
133
|
+
* const stream = fd.createReadStream();
|
|
134
|
+
* setTimeout(() => {
|
|
135
|
+
* stream.close(); // This may not close the stream.
|
|
136
|
+
* // Artificially marking end-of-stream, as if the underlying resource had
|
|
137
|
+
* // indicated end-of-file by itself, allows the stream to close.
|
|
138
|
+
* // This does not cancel pending read operations, and if there is such an
|
|
139
|
+
* // operation, the process may still not be able to exit successfully
|
|
140
|
+
* // until it finishes.
|
|
141
|
+
* stream.push(null);
|
|
142
|
+
* stream.read(0);
|
|
143
|
+
* }, 100);
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* If `autoClose` is false, then the file descriptor won't be closed, even if
|
|
147
|
+
* there's an error. It is the application's responsibility to close it and make
|
|
148
|
+
* sure there's no file descriptor leak. If `autoClose` is set to true (default
|
|
149
|
+
* behavior), on `'error'` or `'end'` the file descriptor will be closed
|
|
150
|
+
* automatically.
|
|
151
|
+
*
|
|
152
|
+
* An example to read the last 10 bytes of a file which is 100 bytes long:
|
|
153
|
+
*
|
|
154
|
+
* ```js
|
|
155
|
+
* import { open } from 'fs/promises';
|
|
156
|
+
*
|
|
157
|
+
* const fd = await open('sample.txt');
|
|
158
|
+
* fd.createReadStream({ start: 90, end: 99 });
|
|
159
|
+
* ```
|
|
160
|
+
* @since v16.11.0
|
|
161
|
+
*/
|
|
162
|
+
createReadStream(options?: CreateReadStreamOptions): ReadStream;
|
|
163
|
+
/**
|
|
164
|
+
* `options` may also include a `start` option to allow writing data at some
|
|
165
|
+
* position past the beginning of the file, allowed values are in the
|
|
166
|
+
* \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing
|
|
167
|
+
* it may require the `flags` `open` option to be set to `r+` rather than the
|
|
168
|
+
* default `r`. The `encoding` can be any one of those accepted by `Buffer`.
|
|
169
|
+
*
|
|
170
|
+
* If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
|
|
171
|
+
* then the file descriptor won't be closed, even if there's an error.
|
|
172
|
+
* It is the application's responsibility to close it and make sure there's no
|
|
173
|
+
* file descriptor leak.
|
|
174
|
+
*
|
|
175
|
+
* By default, the stream will emit a `'close'` event after it has been
|
|
176
|
+
* destroyed. Set the `emitClose` option to `false` to change this behavior.
|
|
177
|
+
* @since v16.11.0
|
|
178
|
+
*/
|
|
179
|
+
createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
|
|
93
180
|
/**
|
|
94
181
|
* Forces all currently queued I/O operations associated with the file to the
|
|
95
182
|
* operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
|
|
@@ -114,8 +201,8 @@ declare module 'fs/promises' {
|
|
|
114
201
|
* number of bytes read is zero.
|
|
115
202
|
* @since v10.0.0
|
|
116
203
|
* @param buffer A buffer that will be filled with the file data read.
|
|
117
|
-
* @param
|
|
118
|
-
* @param
|
|
204
|
+
* @param offset The location in the buffer at which to start filling.
|
|
205
|
+
* @param length The number of bytes to read.
|
|
119
206
|
* @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
|
|
120
207
|
* integer, the current file position will remain unchanged.
|
|
121
208
|
* @return Fulfills upon success with an object with two properties:
|
|
@@ -928,7 +1015,7 @@ declare module 'fs/promises' {
|
|
|
928
1015
|
* @since v12.12.0
|
|
929
1016
|
* @return Fulfills with an {fs.Dir}.
|
|
930
1017
|
*/
|
|
931
|
-
function opendir(path:
|
|
1018
|
+
function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
|
|
932
1019
|
/**
|
|
933
1020
|
* Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
|
|
934
1021
|
*
|