cloudstructs 0.9.30 → 0.9.32

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 (115) hide show
  1. package/.jsii +4 -4
  2. package/assets/slack-textract/detect.lambda/index.js +5 -6
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/dmarc/index.js +1 -1
  5. package/lib/ecs-service-roller/index.js +2 -2
  6. package/lib/email-receiver/receiver.js +1 -1
  7. package/lib/mjml-template/index.js +1 -1
  8. package/lib/saml-identity-provider/index.js +2 -2
  9. package/lib/slack-app/manifest.js +1 -1
  10. package/lib/slack-app/slack-app.js +2 -2
  11. package/lib/slack-events/index.js +1 -1
  12. package/lib/slack-textract/index.js +1 -1
  13. package/lib/ssl-server-test/index.js +1 -1
  14. package/lib/state-machine-cr-provider/index.js +1 -1
  15. package/lib/static-website/index.js +1 -1
  16. package/lib/toolkit-cleaner/index.js +1 -1
  17. package/lib/url-shortener/index.js +1 -1
  18. package/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +6 -0
  19. package/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +6 -0
  20. package/node_modules/@babel/runtime/package.json +10 -1
  21. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  22. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +28 -18
  23. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +2 -2
  24. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +3 -1
  25. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +50 -5
  26. package/node_modules/@slack/logger/node_modules/@types/node/package.json +4 -4
  27. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +28 -0
  28. package/node_modules/@slack/logger/node_modules/@types/node/sqlite.d.ts +63 -17
  29. package/node_modules/@slack/logger/node_modules/@types/node/stream/consumers.d.ts +32 -6
  30. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +82 -0
  31. package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +24 -13
  32. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +159 -112
  33. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +23 -10
  34. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +1 -0
  35. package/node_modules/@slack/logger/node_modules/undici-types/dispatcher.d.ts +1 -0
  36. package/node_modules/@slack/logger/node_modules/undici-types/package.json +1 -1
  37. package/node_modules/@slack/logger/node_modules/undici-types/readable.d.ts +5 -0
  38. package/node_modules/@slack/logger/node_modules/undici-types/webidl.d.ts +6 -0
  39. package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
  40. package/node_modules/@slack/web-api/dist/WebClient.js +3 -4
  41. package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
  42. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  43. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +28 -18
  44. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +2 -2
  45. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +3 -1
  46. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +50 -5
  47. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +4 -4
  48. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +28 -0
  49. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +63 -17
  50. package/node_modules/@slack/web-api/node_modules/@types/node/stream/consumers.d.ts +32 -6
  51. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +82 -0
  52. package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +24 -13
  53. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +159 -112
  54. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +23 -10
  55. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +1 -0
  56. package/node_modules/@slack/web-api/node_modules/undici-types/dispatcher.d.ts +1 -0
  57. package/node_modules/@slack/web-api/node_modules/undici-types/package.json +1 -1
  58. package/node_modules/@slack/web-api/node_modules/undici-types/readable.d.ts +5 -0
  59. package/node_modules/@slack/web-api/node_modules/undici-types/webidl.d.ts +6 -0
  60. package/node_modules/@slack/web-api/package.json +2 -2
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +28 -18
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +2 -2
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +3 -1
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +50 -5
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +4 -4
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +28 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +63 -17
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +32 -6
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +82 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +24 -13
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +159 -112
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +23 -10
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +1 -0
  75. package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +1 -0
  76. package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +1 -1
  77. package/node_modules/@types/cacheable-request/node_modules/undici-types/readable.d.ts +5 -0
  78. package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +6 -0
  79. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  80. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +28 -18
  81. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +2 -2
  82. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +3 -1
  83. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +50 -5
  84. package/node_modules/@types/keyv/node_modules/@types/node/package.json +4 -4
  85. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +28 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +63 -17
  87. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +32 -6
  88. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +82 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +24 -13
  90. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +159 -112
  91. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +23 -10
  92. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +1 -0
  93. package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +1 -0
  94. package/node_modules/@types/keyv/node_modules/undici-types/package.json +1 -1
  95. package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +5 -0
  96. package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +6 -0
  97. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  98. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +28 -18
  99. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +2 -2
  100. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +3 -1
  101. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +50 -5
  102. package/node_modules/@types/responselike/node_modules/@types/node/package.json +4 -4
  103. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +28 -0
  104. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +63 -17
  105. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +32 -6
  106. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +82 -0
  107. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +24 -13
  108. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +159 -112
  109. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +23 -10
  110. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +1 -0
  111. package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +1 -0
  112. package/node_modules/@types/responselike/node_modules/undici-types/package.json +1 -1
  113. package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +5 -0
  114. package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +6 -0
  115. package/package.json +20 -20
@@ -118,6 +118,12 @@ declare module "util" {
118
118
  * function for this call site.
119
119
  */
120
120
  scriptName: string;
121
+ /**
122
+ * Returns the unique id of the script, as in Chrome DevTools protocol
123
+ * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId).
124
+ * @since v22.14.0
125
+ */
126
+ scriptId: string;
121
127
  /**
122
128
  * Returns the number, 1-based, of the line for the associate function call.
123
129
  */
@@ -125,7 +131,7 @@ declare module "util" {
125
131
  /**
126
132
  * Returns the 1-based column offset on the line for the associated function call.
127
133
  */
128
- column: number;
134
+ columnNumber: number;
129
135
  }
130
136
  /**
131
137
  * The `util.format()` method returns a formatted string using the first argument
@@ -1555,11 +1561,17 @@ declare module "util" {
1555
1561
  * @return The parsed command line arguments:
1556
1562
  */
1557
1563
  export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
1558
- interface ParseArgsOptionConfig {
1564
+
1565
+ /**
1566
+ * Type of argument used in {@link parseArgs}.
1567
+ */
1568
+ export type ParseArgsOptionsType = "boolean" | "string";
1569
+
1570
+ export interface ParseArgsOptionDescriptor {
1559
1571
  /**
1560
1572
  * Type of argument.
1561
1573
  */
1562
- type: "string" | "boolean";
1574
+ type: ParseArgsOptionsType;
1563
1575
  /**
1564
1576
  * Whether this option can be provided multiple times.
1565
1577
  * If `true`, all values will be collected in an array.
@@ -1572,15 +1584,16 @@ declare module "util" {
1572
1584
  */
1573
1585
  short?: string | undefined;
1574
1586
  /**
1575
- * The default option value when it is not set by args.
1576
- * It must be of the same type as the the `type` property.
1577
- * When `multiple` is `true`, it must be an array.
1587
+ * The default value to
1588
+ * be used if (and only if) the option does not appear in the arguments to be
1589
+ * parsed. It must be of the same type as the `type` property. When `multiple`
1590
+ * is `true`, it must be an array.
1578
1591
  * @since v18.11.0
1579
1592
  */
1580
1593
  default?: string | boolean | string[] | boolean[] | undefined;
1581
1594
  }
1582
- interface ParseArgsOptionsConfig {
1583
- [longOption: string]: ParseArgsOptionConfig;
1595
+ export interface ParseArgsOptionsConfig {
1596
+ [longOption: string]: ParseArgsOptionDescriptor;
1584
1597
  }
1585
1598
  export interface ParseArgsConfig {
1586
1599
  /**
@@ -1632,7 +1645,7 @@ declare module "util" {
1632
1645
  : T extends true ? IfTrue
1633
1646
  : IfFalse;
1634
1647
 
1635
- type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
1648
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionDescriptor> = IfDefaultsTrue<
1636
1649
  T["strict"],
1637
1650
  O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean,
1638
1651
  string | boolean
@@ -1665,7 +1678,7 @@ declare module "util" {
1665
1678
 
1666
1679
  type PreciseTokenForOptions<
1667
1680
  K extends string,
1668
- O extends ParseArgsOptionConfig,
1681
+ O extends ParseArgsOptionDescriptor,
1669
1682
  > = O["type"] extends "string" ? {
1670
1683
  kind: "option";
1671
1684
  index: number;
@@ -60,6 +60,7 @@ declare module "worker_threads" {
60
60
  import { Readable, Writable } from "node:stream";
61
61
  import { URL } from "node:url";
62
62
  import { X509Certificate } from "node:crypto";
63
+ const isInternalThread: boolean;
63
64
  const isMainThread: boolean;
64
65
  const parentPort: null | MessagePort;
65
66
  const resourceLimits: ResourceLimits;
@@ -244,6 +244,7 @@ declare namespace Dispatcher {
244
244
  readonly bodyUsed: boolean;
245
245
  arrayBuffer(): Promise<ArrayBuffer>;
246
246
  blob(): Promise<Blob>;
247
+ bytes(): Promise<Uint8Array>;
247
248
  formData(): Promise<never>;
248
249
  json(): Promise<unknown>;
249
250
  text(): Promise<string>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "6.20.0",
3
+ "version": "6.21.0",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
@@ -25,6 +25,11 @@ declare class BodyReadable extends Readable {
25
25
  */
26
26
  blob(): Promise<Blob>
27
27
 
28
+ /** Consumes and returns the body as an Uint8Array
29
+ * https://fetch.spec.whatwg.org/#dom-body-bytes
30
+ */
31
+ bytes(): Promise<Uint8Array>
32
+
28
33
  /** Consumes and returns the body as an ArrayBuffer
29
34
  * https://fetch.spec.whatwg.org/#dom-body-arraybuffer
30
35
  */
@@ -67,6 +67,12 @@ interface WebidlUtil {
67
67
  * Stringifies {@param V}
68
68
  */
69
69
  Stringify (V: any): string
70
+
71
+ /**
72
+ * Mark a value as uncloneable for Node.js.
73
+ * This is only effective in some newer Node.js versions.
74
+ */
75
+ markAsUncloneable (V: any): void
70
76
  }
71
77
 
72
78
  interface WebidlConverters {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slack/web-api",
3
- "version": "7.9.0",
3
+ "version": "7.9.1",
4
4
  "description": "Official library for using the Slack Platform's Web API",
5
5
  "author": "Slack Technologies, LLC",
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "mocha-multi-reporters": "^1.5.1",
64
64
  "nock": "^13",
65
65
  "shx": "^0.4.0",
66
- "sinon": "^19",
66
+ "sinon": "^20",
67
67
  "source-map-support": "^0.5.21",
68
68
  "ts-node": "^10",
69
69
  "tsd": "^0.31.1",
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 08 Mar 2025 07:02:57 GMT
11
+ * Last updated: Fri, 11 Apr 2025 21:33:04 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -581,7 +581,7 @@ declare module "fs" {
581
581
  * @since v0.8.6
582
582
  * @param [len=0]
583
583
  */
584
- export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
584
+ export function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void;
585
585
  /**
586
586
  * Asynchronous truncate(2) - Truncate a file to a specified length.
587
587
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -593,7 +593,7 @@ declare module "fs" {
593
593
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
594
594
  * @param len If not specified, defaults to `0`.
595
595
  */
596
- function __promisify__(path: PathLike, len?: number | null): Promise<void>;
596
+ function __promisify__(path: PathLike, len?: number): Promise<void>;
597
597
  }
598
598
  /**
599
599
  * Truncates the file. Returns `undefined`. A file descriptor can also be
@@ -604,7 +604,7 @@ declare module "fs" {
604
604
  * @since v0.8.6
605
605
  * @param [len=0]
606
606
  */
607
- export function truncateSync(path: PathLike, len?: number | null): void;
607
+ export function truncateSync(path: PathLike, len?: number): void;
608
608
  /**
609
609
  * Truncates the file descriptor. No arguments other than a possible exception are
610
610
  * given to the completion callback.
@@ -648,7 +648,7 @@ declare module "fs" {
648
648
  * @since v0.8.6
649
649
  * @param [len=0]
650
650
  */
651
- export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
651
+ export function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void;
652
652
  /**
653
653
  * Asynchronous ftruncate(2) - Truncate a file to a specified length.
654
654
  * @param fd A file descriptor.
@@ -660,7 +660,7 @@ declare module "fs" {
660
660
  * @param fd A file descriptor.
661
661
  * @param len If not specified, defaults to `0`.
662
662
  */
663
- function __promisify__(fd: number, len?: number | null): Promise<void>;
663
+ function __promisify__(fd: number, len?: number): Promise<void>;
664
664
  }
665
665
  /**
666
666
  * Truncates the file descriptor. Returns `undefined`.
@@ -670,7 +670,7 @@ declare module "fs" {
670
670
  * @since v0.8.6
671
671
  * @param [len=0]
672
672
  */
673
- export function ftruncateSync(fd: number, len?: number | null): void;
673
+ export function ftruncateSync(fd: number, len?: number): void;
674
674
  /**
675
675
  * Asynchronously changes owner and group of a file. No arguments other than a
676
676
  * possible exception are given to the completion callback.
@@ -2544,6 +2544,17 @@ declare module "fs" {
2544
2544
  options: ReadAsyncOptions<TBuffer>,
2545
2545
  callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
2546
2546
  ): void;
2547
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
2548
+ fd: number,
2549
+ buffer: TBuffer,
2550
+ options: ReadSyncOptions,
2551
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
2552
+ ): void;
2553
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
2554
+ fd: number,
2555
+ buffer: TBuffer,
2556
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
2557
+ ): void;
2547
2558
  export function read(
2548
2559
  fd: number,
2549
2560
  callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void,
@@ -4012,7 +4023,7 @@ declare module "fs" {
4012
4023
  export function writev(
4013
4024
  fd: number,
4014
4025
  buffers: readonly NodeJS.ArrayBufferView[],
4015
- position: number,
4026
+ position: number | null,
4016
4027
  cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void,
4017
4028
  ): void;
4018
4029
  export interface WriteVResult {
@@ -4057,7 +4068,7 @@ declare module "fs" {
4057
4068
  export function readv(
4058
4069
  fd: number,
4059
4070
  buffers: readonly NodeJS.ArrayBufferView[],
4060
- position: number,
4071
+ position: number | null,
4061
4072
  cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void,
4062
4073
  ): void;
4063
4074
  export interface ReadVResult {
@@ -4261,7 +4272,7 @@ declare module "fs" {
4261
4272
  */
4262
4273
  export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
4263
4274
 
4264
- interface GlobOptionsBase {
4275
+ interface _GlobOptions<T extends Dirent | string> {
4265
4276
  /**
4266
4277
  * Current working directory.
4267
4278
  * @default process.cwd()
@@ -4274,21 +4285,20 @@ declare module "fs" {
4274
4285
  */
4275
4286
  withFileTypes?: boolean | undefined;
4276
4287
  /**
4277
- * Function to filter out files/directories. Return true to exclude the item, false to include it.
4288
+ * Function to filter out files/directories or a
4289
+ * list of glob patterns to be excluded. If a function is provided, return
4290
+ * `true` to exclude the item, `false` to include it.
4291
+ * @default undefined
4278
4292
  */
4279
- exclude?: ((fileName: any) => boolean) | undefined;
4293
+ exclude?: ((fileName: T) => boolean) | readonly string[] | undefined;
4280
4294
  }
4281
- export interface GlobOptionsWithFileTypes extends GlobOptionsBase {
4282
- exclude?: ((fileName: Dirent) => boolean) | undefined;
4295
+ export interface GlobOptions extends _GlobOptions<Dirent | string> {}
4296
+ export interface GlobOptionsWithFileTypes extends _GlobOptions<Dirent> {
4283
4297
  withFileTypes: true;
4284
4298
  }
4285
- export interface GlobOptionsWithoutFileTypes extends GlobOptionsBase {
4286
- exclude?: ((fileName: string) => boolean) | undefined;
4299
+ export interface GlobOptionsWithoutFileTypes extends _GlobOptions<string> {
4287
4300
  withFileTypes?: false | undefined;
4288
4301
  }
4289
- export interface GlobOptions extends GlobOptionsBase {
4290
- exclude?: ((fileName: Dirent | string) => boolean) | undefined;
4291
- }
4292
4302
 
4293
4303
  /**
4294
4304
  * Retrieves the files matching the specified pattern.
@@ -342,8 +342,8 @@ declare module "http" {
342
342
  * @since v0.9.12
343
343
  * @param [msecs=0 (no timeout)]
344
344
  */
345
- setTimeout(msecs?: number, callback?: () => void): this;
346
- setTimeout(callback: () => void): this;
345
+ setTimeout(msecs?: number, callback?: (socket: Socket) => void): this;
346
+ setTimeout(callback: (socket: Socket) => void): this;
347
347
  /**
348
348
  * Limits maximum incoming headers count. If set to 0, no limit will be applied.
349
349
  * @since v0.7.0
@@ -16,7 +16,9 @@ declare module "https" {
16
16
  & http.RequestOptions
17
17
  & tls.SecureContextOptions
18
18
  & {
19
- checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
19
+ checkServerIdentity?:
20
+ | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined)
21
+ | undefined;
20
22
  rejectUnauthorized?: boolean | undefined; // Defaults to true
21
23
  servername?: string | undefined; // SNI TLS Extension
22
24
  };
@@ -128,12 +128,54 @@ declare module "module" {
128
128
  */
129
129
  function getCompileCacheDir(): string | undefined;
130
130
  /**
131
- * @since v23.2.0, v22.14.0
131
+ * ```text
132
+ * /path/to/project
133
+ * ├ packages/
134
+ * ├ bar/
135
+ * ├ bar.js
136
+ * └ package.json // name = '@foo/bar'
137
+ * └ qux/
138
+ * ├ node_modules/
139
+ * └ some-package/
140
+ * └ package.json // name = 'some-package'
141
+ * ├ qux.js
142
+ * └ package.json // name = '@foo/qux'
143
+ * ├ main.js
144
+ * └ package.json // name = '@foo'
145
+ * ```
146
+ * ```js
147
+ * // /path/to/project/packages/bar/bar.js
148
+ * import { findPackageJSON } from 'node:module';
149
+ *
150
+ * findPackageJSON('..', import.meta.url);
151
+ * // '/path/to/project/package.json'
152
+ * // Same result when passing an absolute specifier instead:
153
+ * findPackageJSON(new URL('../', import.meta.url));
154
+ * findPackageJSON(import.meta.resolve('../'));
155
+ *
156
+ * findPackageJSON('some-package', import.meta.url);
157
+ * // '/path/to/project/packages/bar/node_modules/some-package/package.json'
158
+ * // When passing an absolute specifier, you might get a different result if the
159
+ * // resolved module is inside a subfolder that has nested `package.json`.
160
+ * findPackageJSON(import.meta.resolve('some-package'));
161
+ * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json'
162
+ *
163
+ * findPackageJSON('@foo/qux', import.meta.url);
164
+ * // '/path/to/project/packages/qux/package.json'
165
+ * ```
166
+ * @since v22.14.0
167
+ * @param specifier The specifier for the module whose `package.json` to
168
+ * retrieve. When passing a _bare specifier_, the `package.json` at the root of
169
+ * the package is returned. When passing a _relative specifier_ or an _absolute specifier_,
170
+ * the closest parent `package.json` is returned.
171
+ * @param base The absolute location (`file:` URL string or FS path) of the
172
+ * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use
173
+ * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_.
174
+ * @returns A path if the `package.json` is found. When `startLocation`
175
+ * is a package, the package's root `package.json`; when a relative or unresolved, the closest
176
+ * `package.json` to the `startLocation`.
132
177
  */
133
- function findPackageJSON(
134
- specifier: string | URL,
135
- base?: string | URL,
136
- ): undefined | string;
178
+ function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined;
137
179
  /**
138
180
  * @since v18.6.0, v16.17.0
139
181
  */
@@ -162,6 +204,9 @@ declare module "module" {
162
204
  * Register a module that exports hooks that customize Node.js module
163
205
  * resolution and loading behavior. See
164
206
  * [Customization hooks](https://nodejs.org/docs/latest-v22.x/api/module.html#customization-hooks).
207
+ *
208
+ * This feature requires `--allow-worker` if used with the
209
+ * [Permission Model](https://nodejs.org/docs/latest-v22.x/api/permissions.html#permission-model).
165
210
  * @since v20.6.0, v18.19.0
166
211
  * @param specifier Customization hooks to be registered; this should be
167
212
  * the same string that would be passed to `import()`, except that if it is
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.13.10",
3
+ "version": "22.14.1",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,9 +212,9 @@
212
212
  },
213
213
  "scripts": {},
214
214
  "dependencies": {
215
- "undici-types": "~6.20.0"
215
+ "undici-types": "~6.21.0"
216
216
  },
217
217
  "peerDependencies": {},
218
- "typesPublisherContentHash": "25fcca4abf7a12f9be2302bc659011d734e5385c4d6aa230045dc3f241321494",
219
- "typeScriptVersion": "5.0"
218
+ "typesPublisherContentHash": "666e3d9e77ea72fce79aa22dfe4006fda32f236b986a7afa862b545ff146046f",
219
+ "typeScriptVersion": "5.1"
220
220
  }
@@ -1910,6 +1910,34 @@ declare module "process" {
1910
1910
  * @since v0.8.0
1911
1911
  */
1912
1912
  traceDeprecation: boolean;
1913
+ /**
1914
+ * An object is "refable" if it implements the Node.js "Refable protocol".
1915
+ * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
1916
+ * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
1917
+ * event loop alive, while "unref'd" objects will not. Historically, this was
1918
+ * implemented by using `ref()` and `unref()` methods directly on the objects.
1919
+ * This pattern, however, is being deprecated in favor of the "Refable protocol"
1920
+ * in order to better support Web Platform API types whose APIs cannot be modified
1921
+ * to add `ref()` and `unref()` methods but still need to support that behavior.
1922
+ * @since v22.14.0
1923
+ * @experimental
1924
+ * @param maybeRefable An object that may be "refable".
1925
+ */
1926
+ ref(maybeRefable: any): void;
1927
+ /**
1928
+ * An object is "unrefable" if it implements the Node.js "Refable protocol".
1929
+ * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
1930
+ * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
1931
+ * event loop alive, while "unref'd" objects will not. Historically, this was
1932
+ * implemented by using `ref()` and `unref()` methods directly on the objects.
1933
+ * This pattern, however, is being deprecated in favor of the "Refable protocol"
1934
+ * in order to better support Web Platform API types whose APIs cannot be modified
1935
+ * to add `ref()` and `unref()` methods but still need to support that behavior.
1936
+ * @since v22.14.0
1937
+ * @experimental
1938
+ * @param maybeRefable An object that may be "unref'd".
1939
+ */
1940
+ unref(maybeRefable: any): void;
1913
1941
  /* EventEmitter */
1914
1942
  addListener(event: "beforeExit", listener: BeforeExitListener): this;
1915
1943
  addListener(event: "disconnect", listener: DisconnectListener): this;
@@ -43,7 +43,10 @@
43
43
  * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js)
44
44
  */
45
45
  declare module "node:sqlite" {
46
- type SupportedValueType = null | number | bigint | string | Uint8Array;
46
+ type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
47
+ type SQLOutputValue = null | number | bigint | string | Uint8Array;
48
+ /** @deprecated Use `SQLInputValue` or `SQLOutputValue` instead. */
49
+ type SupportedValueType = SQLOutputValue;
47
50
  interface DatabaseSyncOptions {
48
51
  /**
49
52
  * If `true`, the database is opened by the constructor. When
@@ -109,10 +112,30 @@ declare module "node:sqlite" {
109
112
  */
110
113
  filter?: ((tableName: string) => boolean) | undefined;
111
114
  /**
112
- * Determines how conflicts are handled. **Default**: `SQLITE_CHANGESET_ABORT`.
115
+ * A function that determines how to handle conflicts. The function receives one argument,
116
+ * which can be one of the following values:
117
+ *
118
+ * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values.
119
+ * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist.
120
+ * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key.
121
+ * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation.
122
+ * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint
123
+ * violation.
124
+ *
125
+ * The function should return one of the following values:
126
+ *
127
+ * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes.
128
+ * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with
129
+ `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts).
130
+ * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database.
131
+ *
132
+ * When an error is thrown in the conflict handler or when any other value is returned from the handler,
133
+ * applying the changeset is aborted and the database is rolled back.
134
+ *
135
+ * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`.
113
136
  * @since v22.12.0
114
137
  */
115
- onConflict?: number | undefined;
138
+ onConflict?: ((conflictType: number) => number) | undefined;
116
139
  }
117
140
  interface FunctionOptions {
118
141
  /**
@@ -322,11 +345,11 @@ declare module "node:sqlite" {
322
345
  * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of
323
346
  * the row.
324
347
  */
325
- all(...anonymousParameters: SupportedValueType[]): unknown[];
348
+ all(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
326
349
  all(
327
- namedParameters: Record<string, SupportedValueType>,
328
- ...anonymousParameters: SupportedValueType[]
329
- ): unknown[];
350
+ namedParameters: Record<string, SQLInputValue>,
351
+ ...anonymousParameters: SQLInputValue[]
352
+ ): Record<string, SQLOutputValue>[];
330
353
  /**
331
354
  * The source SQL text of the prepared statement with parameter
332
355
  * placeholders replaced by the values that were used during the most recent
@@ -346,8 +369,11 @@ declare module "node:sqlite" {
346
369
  * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no
347
370
  * rows were returned from the database then this method returns `undefined`.
348
371
  */
349
- get(...anonymousParameters: SupportedValueType[]): unknown;
350
- get(namedParameters: Record<string, SupportedValueType>, ...anonymousParameters: SupportedValueType[]): unknown;
372
+ get(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
373
+ get(
374
+ namedParameters: Record<string, SQLInputValue>,
375
+ ...anonymousParameters: SQLInputValue[]
376
+ ): Record<string, SQLOutputValue> | undefined;
351
377
  /**
352
378
  * This method executes a prepared statement and returns an iterator of
353
379
  * objects. If the prepared statement does not return any results, this method
@@ -361,11 +387,11 @@ declare module "node:sqlite" {
361
387
  * returned by executing the prepared statement. The keys and values of each
362
388
  * object correspond to the column names and values of the row.
363
389
  */
364
- iterate(...anonymousParameters: SupportedValueType[]): NodeJS.Iterator<unknown>;
390
+ iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
365
391
  iterate(
366
- namedParameters: Record<string, SupportedValueType>,
367
- ...anonymousParameters: SupportedValueType[]
368
- ): NodeJS.Iterator<unknown>;
392
+ namedParameters: Record<string, SQLInputValue>,
393
+ ...anonymousParameters: SQLInputValue[]
394
+ ): NodeJS.Iterator<Record<string, SQLOutputValue>>;
369
395
  /**
370
396
  * This method executes a prepared statement and returns an object summarizing the
371
397
  * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
@@ -374,10 +400,10 @@ declare module "node:sqlite" {
374
400
  * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
375
401
  * @param anonymousParameters Zero or more values to bind to anonymous parameters.
376
402
  */
377
- run(...anonymousParameters: SupportedValueType[]): StatementResultingChanges;
403
+ run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges;
378
404
  run(
379
- namedParameters: Record<string, SupportedValueType>,
380
- ...anonymousParameters: SupportedValueType[]
405
+ namedParameters: Record<string, SQLInputValue>,
406
+ ...anonymousParameters: SQLInputValue[]
381
407
  ): StatementResultingChanges;
382
408
  /**
383
409
  * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding
@@ -420,13 +446,33 @@ declare module "node:sqlite" {
420
446
  * @since v22.13.0
421
447
  */
422
448
  namespace constants {
449
+ /**
450
+ * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values.
451
+ * @since v22.14.0
452
+ */
453
+ const SQLITE_CHANGESET_DATA: number;
454
+ /**
455
+ * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database.
456
+ * @since v22.14.0
457
+ */
458
+ const SQLITE_CHANGESET_NOTFOUND: number;
459
+ /**
460
+ * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values.
461
+ * @since v22.14.0
462
+ */
463
+ const SQLITE_CHANGESET_CONFLICT: number;
464
+ /**
465
+ * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back.
466
+ * @since v22.14.0
467
+ */
468
+ const SQLITE_CHANGESET_FOREIGN_KEY: number;
423
469
  /**
424
470
  * Conflicting changes are omitted.
425
471
  * @since v22.12.0
426
472
  */
427
473
  const SQLITE_CHANGESET_OMIT: number;
428
474
  /**
429
- * Conflicting changes replace existing values.
475
+ * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`.
430
476
  * @since v22.12.0
431
477
  */
432
478
  const SQLITE_CHANGESET_REPLACE: number;
@@ -1,11 +1,37 @@
1
+ /**
2
+ * The utility consumer functions provide common options for consuming
3
+ * streams.
4
+ * @since v16.7.0
5
+ */
1
6
  declare module "stream/consumers" {
2
7
  import { Blob as NodeBlob } from "node:buffer";
3
- import { Readable } from "node:stream";
4
- function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<Buffer>;
5
- function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<string>;
6
- function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<ArrayBuffer>;
7
- function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<NodeBlob>;
8
- function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<unknown>;
8
+ import { ReadableStream as WebReadableStream } from "node:stream/web";
9
+ /**
10
+ * @since v16.7.0
11
+ * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.
12
+ */
13
+ function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
14
+ /**
15
+ * @since v16.7.0
16
+ * @returns Fulfills with a `Blob` containing the full contents of the stream.
17
+ */
18
+ function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeBlob>;
19
+ /**
20
+ * @since v16.7.0
21
+ * @returns Fulfills with a `Buffer` containing the full contents of the stream.
22
+ */
23
+ function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<Buffer>;
24
+ /**
25
+ * @since v16.7.0
26
+ * @returns Fulfills with the contents of the stream parsed as a
27
+ * UTF-8 encoded string that is then passed through `JSON.parse()`.
28
+ */
29
+ function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
30
+ /**
31
+ * @since v16.7.0
32
+ * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
33
+ */
34
+ function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
9
35
  }
10
36
  declare module "node:stream/consumers" {
11
37
  export * from "stream/consumers";