cdk-ecr-deployment 2.4.4 → 2.5.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.
Files changed (70) hide show
  1. package/.gitattributes +0 -1
  2. package/.jsii +26 -26
  3. package/README.md +12 -3
  4. package/changelog.md +6 -1
  5. package/lambda/Dockerfile +3 -2
  6. package/lambda/go.mod +21 -31
  7. package/lambda/go.sum +421 -93
  8. package/lib/config.d.ts +1 -0
  9. package/lib/config.js +13 -0
  10. package/lib/index.js +6 -9
  11. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +3 -3
  12. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +1 -1
  13. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +93 -3
  14. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +42 -11
  15. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  16. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +31 -3
  17. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +48 -14
  18. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +12 -2
  19. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +1 -0
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -1
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +12 -0
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +8 -8
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1 -1
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +2 -1
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +13 -0
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +3 -3
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1 -1
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +31 -1
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1 -1
  30. package/node_modules/@types/keyv/node_modules/@types/node/README.md +3 -3
  31. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +1 -1
  32. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +93 -3
  33. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +42 -11
  34. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  35. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +31 -3
  36. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +48 -14
  37. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +12 -2
  38. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +1 -0
  39. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -1
  40. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +12 -0
  41. package/node_modules/@types/keyv/node_modules/@types/node/package.json +8 -8
  42. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1 -1
  43. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +2 -1
  44. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +13 -0
  45. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +3 -3
  46. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1 -1
  47. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +31 -1
  48. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1 -1
  49. package/node_modules/@types/responselike/node_modules/@types/node/README.md +3 -3
  50. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +1 -1
  51. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +93 -3
  52. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +42 -11
  53. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  54. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +31 -3
  55. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +48 -14
  56. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +12 -2
  57. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +1 -0
  58. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -1
  59. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +12 -0
  60. package/node_modules/@types/responselike/node_modules/@types/node/package.json +8 -8
  61. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1 -1
  62. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +2 -1
  63. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +13 -0
  64. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +3 -3
  65. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1 -1
  66. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +31 -1
  67. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1 -1
  68. package/package.json +9 -6
  69. package/releasetag.txt +1 -1
  70. package/version.txt +1 -1
@@ -390,7 +390,7 @@ declare module 'buffer' {
390
390
  * @since v0.11.13
391
391
  * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
392
392
  */
393
- compare(buf1: Uint8Array, buf2: Uint8Array): number;
393
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
394
394
  /**
395
395
  * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
396
396
  *
@@ -443,7 +443,7 @@ declare module 'buffer' {
443
443
  * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
444
444
  *
445
445
  * The underlying memory for `Buffer` instances created in this way is _not_
446
- * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
446
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
447
447
  *
448
448
  * ```js
449
449
  * import { Buffer } from 'buffer';
@@ -704,7 +704,7 @@ declare module 'buffer' {
704
704
  * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
705
705
  * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
706
706
  */
707
- compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
707
+ compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
708
708
  /**
709
709
  * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
710
710
  *
@@ -909,6 +909,11 @@ declare module 'buffer' {
909
909
  * @return `offset` plus the number of bytes written.
910
910
  */
911
911
  writeBigUInt64BE(value: bigint, offset?: number): number;
912
+ /**
913
+ * @alias Buffer.writeBigUInt64BE
914
+ * @since v14.10.0, v12.19.0
915
+ */
916
+ writeBigUint64BE(value: bigint, offset?: number): number;
912
917
  /**
913
918
  * Writes `value` to `buf` at the specified `offset` as little-endian
914
919
  *
@@ -930,6 +935,11 @@ declare module 'buffer' {
930
935
  * @return `offset` plus the number of bytes written.
931
936
  */
932
937
  writeBigUInt64LE(value: bigint, offset?: number): number;
938
+ /**
939
+ * @alias Buffer.writeBigUInt64LE
940
+ * @since v14.10.0, v12.19.0
941
+ */
942
+ writeBigUint64LE(value: bigint, offset?: number): number;
933
943
  /**
934
944
  * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
935
945
  * when `value` is anything other than an unsigned integer.
@@ -953,6 +963,11 @@ declare module 'buffer' {
953
963
  * @return `offset` plus the number of bytes written.
954
964
  */
955
965
  writeUIntLE(value: number, offset: number, byteLength: number): number;
966
+ /**
967
+ * @alias Buffer.writeUIntLE
968
+ * @since v14.9.0, v12.19.0
969
+ */
970
+ writeUintLE(value: number, offset: number, byteLength: number): number;
956
971
  /**
957
972
  * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
958
973
  * when `value` is anything other than an unsigned integer.
@@ -976,6 +991,11 @@ declare module 'buffer' {
976
991
  * @return `offset` plus the number of bytes written.
977
992
  */
978
993
  writeUIntBE(value: number, offset: number, byteLength: number): number;
994
+ /**
995
+ * @alias Buffer.writeUIntBE
996
+ * @since v14.9.0, v12.19.0
997
+ */
998
+ writeUintBE(value: number, offset: number, byteLength: number): number;
979
999
  /**
980
1000
  * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
981
1001
  * when `value` is anything other than a signed integer.
@@ -1035,6 +1055,11 @@ declare module 'buffer' {
1035
1055
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
1036
1056
  */
1037
1057
  readBigUInt64BE(offset?: number): bigint;
1058
+ /**
1059
+ * @alias Buffer.readBigUInt64BE
1060
+ * @since v14.10.0, v12.19.0
1061
+ */
1062
+ readBigUint64BE(offset?: number): bigint;
1038
1063
  /**
1039
1064
  * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
1040
1065
  *
@@ -1052,6 +1077,11 @@ declare module 'buffer' {
1052
1077
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
1053
1078
  */
1054
1079
  readBigUInt64LE(offset?: number): bigint;
1080
+ /**
1081
+ * @alias Buffer.readBigUInt64LE
1082
+ * @since v14.10.0, v12.19.0
1083
+ */
1084
+ readBigUint64LE(offset?: number): bigint;
1055
1085
  /**
1056
1086
  * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
1057
1087
  *
@@ -1089,6 +1119,11 @@ declare module 'buffer' {
1089
1119
  * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
1090
1120
  */
1091
1121
  readUIntLE(offset: number, byteLength: number): number;
1122
+ /**
1123
+ * @alias Buffer.readUIntLE
1124
+ * @since v14.9.0, v12.19.0
1125
+ */
1126
+ readUintLE(offset: number, byteLength: number): number;
1092
1127
  /**
1093
1128
  * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
1094
1129
  * up to 48 bits of accuracy.
@@ -1110,6 +1145,11 @@ declare module 'buffer' {
1110
1145
  * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
1111
1146
  */
1112
1147
  readUIntBE(offset: number, byteLength: number): number;
1148
+ /**
1149
+ * @alias Buffer.readUIntBE
1150
+ * @since v14.9.0, v12.19.0
1151
+ */
1152
+ readUintBE(offset: number, byteLength: number): number;
1113
1153
  /**
1114
1154
  * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
1115
1155
  * supporting up to 48 bits of accuracy.
@@ -1169,6 +1209,11 @@ declare module 'buffer' {
1169
1209
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
1170
1210
  */
1171
1211
  readUInt8(offset?: number): number;
1212
+ /**
1213
+ * @alias Buffer.readUInt8
1214
+ * @since v14.9.0, v12.19.0
1215
+ */
1216
+ readUint8(offset?: number): number;
1172
1217
  /**
1173
1218
  * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
1174
1219
  *
@@ -1190,6 +1235,11 @@ declare module 'buffer' {
1190
1235
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
1191
1236
  */
1192
1237
  readUInt16LE(offset?: number): number;
1238
+ /**
1239
+ * @alias Buffer.readUInt16LE
1240
+ * @since v14.9.0, v12.19.0
1241
+ */
1242
+ readUint16LE(offset?: number): number;
1193
1243
  /**
1194
1244
  * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
1195
1245
  *
@@ -1209,6 +1259,11 @@ declare module 'buffer' {
1209
1259
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
1210
1260
  */
1211
1261
  readUInt16BE(offset?: number): number;
1262
+ /**
1263
+ * @alias Buffer.readUInt16BE
1264
+ * @since v14.9.0, v12.19.0
1265
+ */
1266
+ readUint16BE(offset?: number): number;
1212
1267
  /**
1213
1268
  * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
1214
1269
  *
@@ -1228,6 +1283,11 @@ declare module 'buffer' {
1228
1283
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1229
1284
  */
1230
1285
  readUInt32LE(offset?: number): number;
1286
+ /**
1287
+ * @alias Buffer.readUInt32LE
1288
+ * @since v14.9.0, v12.19.0
1289
+ */
1290
+ readUint32LE(offset?: number): number;
1231
1291
  /**
1232
1292
  * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
1233
1293
  *
@@ -1245,6 +1305,11 @@ declare module 'buffer' {
1245
1305
  * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1246
1306
  */
1247
1307
  readUInt32BE(offset?: number): number;
1308
+ /**
1309
+ * @alias Buffer.readUInt32BE
1310
+ * @since v14.9.0, v12.19.0
1311
+ */
1312
+ readUint32BE(offset?: number): number;
1248
1313
  /**
1249
1314
  * Reads a signed 8-bit integer from `buf` at the specified `offset`.
1250
1315
  *
@@ -1517,6 +1582,11 @@ declare module 'buffer' {
1517
1582
  * @return `offset` plus the number of bytes written.
1518
1583
  */
1519
1584
  writeUInt8(value: number, offset?: number): number;
1585
+ /**
1586
+ * @alias Buffer.writeUInt8
1587
+ * @since v14.9.0, v12.19.0
1588
+ */
1589
+ writeUint8(value: number, offset?: number): number;
1520
1590
  /**
1521
1591
  * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
1522
1592
  * anything other than an unsigned 16-bit integer.
@@ -1540,6 +1610,11 @@ declare module 'buffer' {
1540
1610
  * @return `offset` plus the number of bytes written.
1541
1611
  */
1542
1612
  writeUInt16LE(value: number, offset?: number): number;
1613
+ /**
1614
+ * @alias Buffer.writeUInt16LE
1615
+ * @since v14.9.0, v12.19.0
1616
+ */
1617
+ writeUint16LE(value: number, offset?: number): number;
1543
1618
  /**
1544
1619
  * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
1545
1620
  * unsigned 16-bit integer.
@@ -1563,6 +1638,11 @@ declare module 'buffer' {
1563
1638
  * @return `offset` plus the number of bytes written.
1564
1639
  */
1565
1640
  writeUInt16BE(value: number, offset?: number): number;
1641
+ /**
1642
+ * @alias Buffer.writeUInt16BE
1643
+ * @since v14.9.0, v12.19.0
1644
+ */
1645
+ writeUint16BE(value: number, offset?: number): number;
1566
1646
  /**
1567
1647
  * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
1568
1648
  * anything other than an unsigned 32-bit integer.
@@ -1585,6 +1665,11 @@ declare module 'buffer' {
1585
1665
  * @return `offset` plus the number of bytes written.
1586
1666
  */
1587
1667
  writeUInt32LE(value: number, offset?: number): number;
1668
+ /**
1669
+ * @alias Buffer.writeUInt32LE
1670
+ * @since v14.9.0, v12.19.0
1671
+ */
1672
+ writeUint32LE(value: number, offset?: number): number;
1588
1673
  /**
1589
1674
  * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
1590
1675
  * unsigned 32-bit integer.
@@ -1607,6 +1692,11 @@ declare module 'buffer' {
1607
1692
  * @return `offset` plus the number of bytes written.
1608
1693
  */
1609
1694
  writeUInt32BE(value: number, offset?: number): number;
1695
+ /**
1696
+ * @alias Buffer.writeUInt32BE
1697
+ * @since v14.9.0, v12.19.0
1698
+ */
1699
+ writeUint32BE(value: number, offset?: number): number;
1610
1700
  /**
1611
1701
  * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
1612
1702
  * signed 8-bit integer. Behavior is undefined when `value` is anything other than
@@ -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' | 'base64url' | 'hex';
253
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
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;
@@ -646,6 +646,7 @@ declare module 'crypto' {
646
646
  }
647
647
  type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
648
648
  type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
649
+ type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
649
650
  type BinaryLike = string | NodeJS.ArrayBufferView;
650
651
  type CipherKey = BinaryLike | KeyObject;
651
652
  interface CipherCCMOptions extends stream.TransformOptions {
@@ -654,6 +655,9 @@ declare module 'crypto' {
654
655
  interface CipherGCMOptions extends stream.TransformOptions {
655
656
  authTagLength?: number | undefined;
656
657
  }
658
+ interface CipherOCBOptions extends stream.TransformOptions {
659
+ authTagLength: number;
660
+ }
657
661
  /**
658
662
  * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
659
663
  *
@@ -720,8 +724,9 @@ declare module 'crypto' {
720
724
  * @since v0.1.94
721
725
  * @param options `stream.transform` options
722
726
  */
723
- function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): CipherCCM;
724
- function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM;
727
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
728
+ function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
729
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
725
730
  function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
726
731
  /**
727
732
  * Instances of the `Cipher` class are used to encrypt data. The class can be
@@ -907,6 +912,15 @@ declare module 'crypto' {
907
912
  ): this;
908
913
  getAuthTag(): Buffer;
909
914
  }
915
+ interface CipherOCB extends Cipher {
916
+ setAAD(
917
+ buffer: NodeJS.ArrayBufferView,
918
+ options?: {
919
+ plaintextLength: number;
920
+ }
921
+ ): this;
922
+ getAuthTag(): Buffer;
923
+ }
910
924
  /**
911
925
  * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
912
926
  *
@@ -961,8 +975,9 @@ declare module 'crypto' {
961
975
  * @since v0.1.94
962
976
  * @param options `stream.transform` options
963
977
  */
964
- function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): DecipherCCM;
965
- function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM;
978
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
979
+ function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
980
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
966
981
  function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
967
982
  /**
968
983
  * Instances of the `Decipher` class are used to decrypt data. The class can be
@@ -1133,6 +1148,15 @@ declare module 'crypto' {
1133
1148
  }
1134
1149
  ): this;
1135
1150
  }
1151
+ interface DecipherOCB extends Decipher {
1152
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
1153
+ setAAD(
1154
+ buffer: NodeJS.ArrayBufferView,
1155
+ options?: {
1156
+ plaintextLength: number;
1157
+ }
1158
+ ): this;
1159
+ }
1136
1160
  interface PrivateKeyInput {
1137
1161
  key: string | Buffer;
1138
1162
  format?: KeyFormat | undefined;
@@ -3084,21 +3108,28 @@ declare module 'crypto' {
3084
3108
  * @since v15.6.0
3085
3109
  */
3086
3110
  readonly fingerprint256: string;
3111
+ /**
3112
+ * The SHA-512 fingerprint of this certificate.
3113
+ * @since v16.14.0
3114
+ */
3115
+ readonly fingerprint512: string;
3087
3116
  /**
3088
3117
  * The complete subject of this certificate.
3089
3118
  * @since v15.6.0
3090
3119
  */
3091
3120
  readonly subject: string;
3092
3121
  /**
3093
- * The subject alternative name specified for this certificate.
3122
+ * The subject alternative name specified for this certificate or `undefined`
3123
+ * if not available.
3094
3124
  * @since v15.6.0
3095
3125
  */
3096
- readonly subjectAltName: string;
3126
+ readonly subjectAltName: string | undefined;
3097
3127
  /**
3098
- * The information access content of this certificate.
3128
+ * The information access content of this certificate or `undefined` if not
3129
+ * available.
3099
3130
  * @since v15.6.0
3100
3131
  */
3101
- readonly infoAccess: string;
3132
+ readonly infoAccess: string | undefined;
3102
3133
  /**
3103
3134
  * An array detailing the key usages for this certificate.
3104
3135
  * @since v15.6.0
@@ -3146,7 +3177,7 @@ declare module 'crypto' {
3146
3177
  * @since v15.6.0
3147
3178
  * @return Returns `email` if the certificate matches, `undefined` if it does not.
3148
3179
  */
3149
- checkEmail(email: string, options?: X509CheckOptions): string | undefined;
3180
+ checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
3150
3181
  /**
3151
3182
  * Checks whether the certificate matches the given host name.
3152
3183
  * @since v15.6.0
@@ -3158,7 +3189,7 @@ declare module 'crypto' {
3158
3189
  * @since v15.6.0
3159
3190
  * @return Returns `ip` if the certificate matches, `undefined` if it does not.
3160
3191
  */
3161
- checkIP(ip: string, options?: X509CheckOptions): string | undefined;
3192
+ checkIP(ip: string): string | undefined;
3162
3193
  /**
3163
3194
  * Checks whether this certificate was issued by the given `otherCert`.
3164
3195
  * @since v15.6.0
@@ -57,7 +57,7 @@ declare module 'diagnostics_channel' {
57
57
  * @return The named channel object
58
58
  */
59
59
  function channel(name: string): Channel;
60
- type ChannelListener = (name: string, message: unknown) => void;
60
+ type ChannelListener = (message: unknown, name: string) => 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
@@ -89,6 +89,24 @@ declare module 'diagnostics_channel' {
89
89
  */
90
90
  readonly hasSubscribers: boolean;
91
91
  private constructor(name: string);
92
+ /**
93
+ * Publish a message to any subscribers to the channel. This will
94
+ * trigger message handlers synchronously so they will execute within
95
+ * the same context.
96
+ *
97
+ * ```js
98
+ * import diagnostics_channel from 'diagnostics_channel';
99
+ *
100
+ * const channel = diagnostics_channel.channel('my-channel');
101
+ *
102
+ * channel.publish({
103
+ * some: 'message'
104
+ * });
105
+ * ```
106
+ * @since v15.1.0, v14.17.0
107
+ * @param message The message to send to the channel subscribers
108
+ */
109
+ publish(message: unknown): void;
92
110
  /**
93
111
  * Register a message handler to subscribe to this channel. This message handler
94
112
  * will be run synchronously whenever a message is published to the channel. Any
@@ -50,7 +50,7 @@ declare module 'events' {
50
50
  listener: (...args: any[]) => void,
51
51
  opts?: {
52
52
  once: boolean;
53
- }
53
+ },
54
54
  ): any;
55
55
  }
56
56
  interface StaticEventEmitterOptions {
@@ -154,7 +154,11 @@ declare module 'events' {
154
154
  * ```
155
155
  * @since v11.13.0, v10.16.0
156
156
  */
157
- static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
157
+ static once(
158
+ emitter: NodeEventTarget,
159
+ eventName: string | symbol,
160
+ options?: StaticEventEmitterOptions,
161
+ ): Promise<any[]>;
158
162
  static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
159
163
  /**
160
164
  * ```js
@@ -214,7 +218,11 @@ declare module 'events' {
214
218
  * @param eventName The name of the event being listened for
215
219
  * @return that iterates `eventName` events emitted by the `emitter`
216
220
  */
217
- static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
221
+ static on(
222
+ emitter: NodeJS.EventEmitter,
223
+ eventName: string,
224
+ options?: StaticEventEmitterOptions,
225
+ ): AsyncIterableIterator<any>;
218
226
  /**
219
227
  * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
220
228
  *
@@ -260,6 +268,26 @@ declare module 'events' {
260
268
  * @since v15.2.0, v14.17.0
261
269
  */
262
270
  static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
271
+ /**
272
+ * By default `EventEmitter`s will print a warning if more than `10` listeners are
273
+ * added for a particular event. This is a useful default that helps finding
274
+ * memory leaks. The `EventEmitter.setMaxListeners()` method allows the default limit to be
275
+ * modified (if eventTargets is empty) or modify the limit specified in every `EventTarget` | `EventEmitter` passed as arguments.
276
+ * The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
277
+ *
278
+ * ```js
279
+ * EventEmitter.setMaxListeners(20);
280
+ * // Equivalent to
281
+ * EventEmitter.defaultMaxListeners = 20;
282
+ *
283
+ * const eventTarget = new EventTarget();
284
+ * // Only way to increase limit for `EventTarget` instances
285
+ * // as these doesn't expose its own `setMaxListeners` method
286
+ * EventEmitter.setMaxListeners(20, eventTarget);
287
+ * ```
288
+ * @since v15.3.0, v14.17.0
289
+ */
290
+ static setMaxListeners(n?: number, ...eventTargets: Array<DOMEventTarget | NodeJS.EventEmitter>): void;
263
291
  /**
264
292
  * This symbol shall be used to install a listener for only monitoring `'error'`
265
293
  * events. Listeners installed using this symbol are called before the regular
@@ -2233,6 +2233,23 @@ declare module 'fs' {
2233
2233
  */
2234
2234
  export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
2235
2235
  export type ReadPosition = number | bigint;
2236
+ export interface ReadSyncOptions {
2237
+ /**
2238
+ * @default 0
2239
+ */
2240
+ offset?: number | undefined;
2241
+ /**
2242
+ * @default `length of buffer`
2243
+ */
2244
+ length?: number | undefined;
2245
+ /**
2246
+ * @default null
2247
+ */
2248
+ position?: ReadPosition | null | undefined;
2249
+ }
2250
+ export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
2251
+ buffer?: TBuffer;
2252
+ }
2236
2253
  /**
2237
2254
  * Read data from the file specified by `fd`.
2238
2255
  *
@@ -2258,6 +2275,24 @@ declare module 'fs' {
2258
2275
  position: ReadPosition | null,
2259
2276
  callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
2260
2277
  ): void;
2278
+ /**
2279
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
2280
+ * If not otherwise specified in an `options` object,
2281
+ * `buffer` defaults to `Buffer.alloc(16384)`,
2282
+ * `offset` defaults to `0`,
2283
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
2284
+ * `position` defaults to `null`
2285
+ * @since v12.17.0, 13.11.0
2286
+ */
2287
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
2288
+ fd: number,
2289
+ options: ReadAsyncOptions<TBuffer>,
2290
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
2291
+ ): void;
2292
+ export function read(
2293
+ fd: number,
2294
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void
2295
+ ): void;
2261
2296
  export namespace read {
2262
2297
  /**
2263
2298
  * @param fd A file descriptor.
@@ -2276,20 +2311,19 @@ declare module 'fs' {
2276
2311
  bytesRead: number;
2277
2312
  buffer: TBuffer;
2278
2313
  }>;
2279
- }
2280
- export interface ReadSyncOptions {
2281
- /**
2282
- * @default 0
2283
- */
2284
- offset?: number | undefined;
2285
- /**
2286
- * @default `length of buffer`
2287
- */
2288
- length?: number | undefined;
2289
- /**
2290
- * @default null
2291
- */
2292
- position?: ReadPosition | null | undefined;
2314
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
2315
+ fd: number,
2316
+ options: ReadAsyncOptions<TBuffer>
2317
+ ): Promise<{
2318
+ bytesRead: number;
2319
+ buffer: TBuffer;
2320
+ }>;
2321
+ function __promisify__(
2322
+ fd: number
2323
+ ): Promise<{
2324
+ bytesRead: number;
2325
+ buffer: NodeJS.ArrayBufferView;
2326
+ }>;
2293
2327
  }
2294
2328
  /**
2295
2329
  * Returns the number of `bytesRead`.
@@ -100,6 +100,16 @@ interface BigInt64Array extends RelativeIndexable<bigint> {}
100
100
  interface BigUint64Array extends RelativeIndexable<bigint> {}
101
101
  //#endregion ArrayLike.at() end
102
102
 
103
+ /**
104
+ * @since v17.0.0
105
+ *
106
+ * Creates a deep clone of an object.
107
+ */
108
+ declare function structuredClone<T>(
109
+ value: T,
110
+ transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
111
+ ): T;
112
+
103
113
  /*----------------------------------------------*
104
114
  * *
105
115
  * GLOBAL INTERFACES *
@@ -262,11 +272,11 @@ declare namespace NodeJS {
262
272
  id: string;
263
273
  filename: string;
264
274
  loaded: boolean;
265
- /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
275
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
266
276
  parent: Module | null | undefined;
267
277
  children: Module[];
268
278
  /**
269
- * @since 11.14.0
279
+ * @since v11.14.0
270
280
  *
271
281
  * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
272
282
  */
@@ -580,6 +580,7 @@ declare module 'http2' {
580
580
  parent?: number | undefined;
581
581
  weight?: number | undefined;
582
582
  waitForTrailers?: boolean | undefined;
583
+ signal?: AbortSignal | undefined;
583
584
  }
584
585
  export interface SessionState {
585
586
  effectiveLocalWindowSize?: number | undefined;
@@ -21,7 +21,6 @@
21
21
  // Nikita Galkin <https://github.com/galkin>
22
22
  // Parambir Singh <https://github.com/parambirs>
23
23
  // Sebastian Silbermann <https://github.com/eps1lon>
24
- // Seth Westphal <https://github.com/westy92>
25
24
  // Simon Schick <https://github.com/SimonSchick>
26
25
  // Thomas den Hollander <https://github.com/ThomasdenH>
27
26
  // Wilco Bakker <https://github.com/WilcoBakker>
@@ -41,6 +40,7 @@
41
40
  // NodeJS Contributors <https://github.com/NodeJS>
42
41
  // Linus Unnebäck <https://github.com/LinusU>
43
42
  // wafuwafu13 <https://github.com/wafuwafu13>
43
+ // Matteo Collina <https://github.com/mcollina>
44
44
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
45
45
 
46
46
  /**
@@ -59,6 +59,7 @@ declare module 'net' {
59
59
  path: string;
60
60
  }
61
61
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
62
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
62
63
  /**
63
64
  * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
64
65
  * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
@@ -262,6 +263,12 @@ declare module 'net' {
262
263
  * @since v0.9.6
263
264
  */
264
265
  readonly localPort?: number;
266
+ /**
267
+ * This property represents the state of the connection as a string.
268
+ * @see {https://nodejs.org/api/net.html#socketreadystate}
269
+ * @since v0.5.0
270
+ */
271
+ readonly readyState: SocketReadyState;
265
272
  /**
266
273
  * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
267
274
  * the socket is destroyed (for example, if the client disconnected).
@@ -278,6 +285,11 @@ declare module 'net' {
278
285
  * @since v0.5.10
279
286
  */
280
287
  readonly remotePort?: number | undefined;
288
+ /**
289
+ * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
290
+ * @since v10.7.0
291
+ */
292
+ readonly timeout?: number | undefined;
281
293
  /**
282
294
  * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
283
295
  * server will still send some data.