cloudstructs 0.6.20 → 0.6.22

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 (126) hide show
  1. package/.jsii +3 -3
  2. package/assets/slack-textract/detect.lambda/index.js +6 -6
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/ecs-service-roller/index.js +2 -2
  5. package/lib/email-receiver/receiver.js +1 -1
  6. package/lib/saml-identity-provider/index.js +2 -2
  7. package/lib/slack-app/manifest.js +1 -1
  8. package/lib/slack-app/slack-app.js +2 -2
  9. package/lib/slack-events/index.js +1 -1
  10. package/lib/slack-textract/index.js +1 -1
  11. package/lib/ssl-server-test/index.js +1 -1
  12. package/lib/state-machine-cr-provider/index.js +1 -1
  13. package/lib/static-website/index.js +1 -1
  14. package/lib/toolkit-cleaner/index.js +1 -1
  15. package/lib/url-shortener/index.js +1 -1
  16. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  17. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +12 -0
  18. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +31 -7
  19. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -1
  20. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +1 -0
  21. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +8 -0
  22. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
  23. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +247 -1
  24. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +86 -7
  25. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/async_hooks.d.ts +12 -0
  26. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/buffer.d.ts +31 -7
  27. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/module.d.ts +1 -0
  28. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/net.d.ts +9 -1
  29. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +247 -1
  30. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tls.d.ts +86 -7
  31. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +85 -0
  32. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +85 -0
  33. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  34. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +12 -0
  35. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +31 -7
  36. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -1
  37. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +1 -0
  38. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +8 -0
  39. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  40. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +247 -1
  41. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +86 -7
  42. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/async_hooks.d.ts +12 -0
  43. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/buffer.d.ts +31 -7
  44. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/module.d.ts +1 -0
  45. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/net.d.ts +9 -1
  46. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +247 -1
  47. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tls.d.ts +86 -7
  48. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +85 -0
  49. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +85 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +12 -0
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +31 -7
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -1
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +1 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +8 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +247 -1
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +86 -7
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +12 -0
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +31 -7
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +1 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +9 -1
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +247 -1
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +86 -7
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +85 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +85 -0
  67. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  68. package/node_modules/@types/is-stream/node_modules/@types/node/async_hooks.d.ts +12 -0
  69. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +31 -7
  70. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -1
  71. package/node_modules/@types/is-stream/node_modules/@types/node/module.d.ts +1 -0
  72. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +8 -0
  73. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
  74. package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +247 -1
  75. package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +86 -7
  76. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/async_hooks.d.ts +12 -0
  77. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/buffer.d.ts +31 -7
  78. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/module.d.ts +1 -0
  79. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/net.d.ts +9 -1
  80. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +247 -1
  81. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tls.d.ts +86 -7
  82. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +85 -0
  83. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +85 -0
  84. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  85. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +12 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +31 -7
  87. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -1
  88. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +1 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +8 -0
  90. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
  91. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +247 -1
  92. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +86 -7
  93. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +12 -0
  94. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +31 -7
  95. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +1 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +9 -1
  97. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +247 -1
  98. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +86 -7
  99. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +85 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +85 -0
  101. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  102. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +12 -0
  103. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +31 -7
  104. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -1
  105. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +1 -0
  106. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +8 -0
  107. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
  108. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +247 -1
  109. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +86 -7
  110. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +12 -0
  111. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +31 -7
  112. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +1 -0
  113. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +9 -1
  114. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +247 -1
  115. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +86 -7
  116. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +85 -0
  117. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +85 -0
  118. package/package.json +8 -8
  119. /package/node_modules/{retry → p-retry/node_modules/retry}/License +0 -0
  120. /package/node_modules/{retry → p-retry/node_modules/retry}/README.md +0 -0
  121. /package/node_modules/{retry → p-retry/node_modules/retry}/example/dns.js +0 -0
  122. /package/node_modules/{retry → p-retry/node_modules/retry}/example/stop.js +0 -0
  123. /package/node_modules/{retry → p-retry/node_modules/retry}/index.js +0 -0
  124. /package/node_modules/{retry → p-retry/node_modules/retry}/lib/retry.js +0 -0
  125. /package/node_modules/{retry → p-retry/node_modules/retry}/lib/retry_operation.js +0 -0
  126. /package/node_modules/{retry → p-retry/node_modules/retry}/package.json +0 -0
@@ -85,6 +85,7 @@ declare module 'module' {
85
85
  static wrap(code: string): string;
86
86
  static createRequire(path: string | URL): NodeRequire;
87
87
  static builtinModules: string[];
88
+ static isBuiltin(moduleName: string): boolean;
88
89
  static Module: typeof Module;
89
90
  constructor(id: string, parent?: Module);
90
91
  }
@@ -57,6 +57,14 @@ declare module 'net' {
57
57
  noDelay?: boolean | undefined;
58
58
  keepAlive?: boolean | undefined;
59
59
  keepAliveInitialDelay?: number | undefined;
60
+ /**
61
+ * @since v18.13.0
62
+ */
63
+ autoSelectFamily?: boolean | undefined;
64
+ /**
65
+ * @since v18.13.0
66
+ */
67
+ autoSelectFamilyAttemptTimeout?: number | undefined;
60
68
  }
61
69
  interface IpcSocketConnectOpts extends ConnectOpts {
62
70
  path: string;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.11.18",
3
+ "version": "18.14.1",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "540ec74ad976942ed4b12e09fd57842adfd77a63a4ea099f15f0602ad707835c",
235
+ "typesPublisherContentHash": "4b700d8e69578ec73360139a785868405bb684e4fe62cd395573dccfde90213e",
236
236
  "typeScriptVersion": "4.2"
237
237
  }
@@ -264,6 +264,15 @@ declare module 'node:test' {
264
264
  */
265
265
  beforeEach: typeof beforeEach;
266
266
 
267
+ /**
268
+ * This function is used to create a hook that runs after the current test finishes.
269
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
270
+ * the second argument. Default: A no-op function.
271
+ * @param options Configuration options for the hook.
272
+ * @since v18.13.0
273
+ */
274
+ after: typeof after;
275
+
267
276
  /**
268
277
  * This function is used to create a hook running after each subtest of the current test.
269
278
  * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
@@ -333,6 +342,10 @@ declare module 'node:test' {
333
342
  * @returns A {@link Promise} resolved with `undefined` once the test completes.
334
343
  */
335
344
  test: typeof test;
345
+ /**
346
+ * Each test provides its own MockTracker instance.
347
+ */
348
+ readonly mock: MockTracker;
336
349
  }
337
350
 
338
351
  interface TestOptions {
@@ -442,5 +455,238 @@ declare module 'node:test' {
442
455
  timeout?: number | undefined;
443
456
  }
444
457
 
445
- export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
458
+ interface MockFunctionOptions {
459
+ /**
460
+ * The number of times that the mock will use the behavior of `implementation`.
461
+ * Once the mock function has been called `times` times,
462
+ * it will automatically restore the behavior of `original`.
463
+ * This value must be an integer greater than zero.
464
+ * @default Infinity
465
+ */
466
+ times?: number | undefined;
467
+ }
468
+
469
+ interface MockMethodOptions extends MockFunctionOptions {
470
+ /**
471
+ * If `true`, `object[methodName]` is treated as a getter.
472
+ * This option cannot be used with the `setter` option.
473
+ */
474
+ getter?: boolean | undefined;
475
+
476
+ /**
477
+ * If `true`, `object[methodName]` is treated as a setter.
478
+ * This option cannot be used with the `getter` option.
479
+ */
480
+ setter?: boolean | undefined;
481
+ }
482
+
483
+ type Mock<F extends Function> = F & {
484
+ mock: MockFunctionContext<F>;
485
+ };
486
+
487
+ type NoOpFunction = (...args: any[]) => undefined;
488
+
489
+ type FunctionPropertyNames<T> = {
490
+ [K in keyof T]: T[K] extends Function ? K : never;
491
+ }[keyof T];
492
+
493
+ interface MockTracker {
494
+ /**
495
+ * This function is used to create a mock function.
496
+ * @param original An optional function to create a mock on.
497
+ * @param implementation An optional function used as the mock implementation for `original`.
498
+ * This is useful for creating mocks that exhibit one behavior for a specified number of calls and then restore the behavior of `original`.
499
+ * @param options Optional configuration options for the mock function.
500
+ */
501
+ fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
502
+ fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
503
+
504
+ /**
505
+ * This function is used to create a mock on an existing object method.
506
+ * @param object The object whose method is being mocked.
507
+ * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
508
+ * @param implementation An optional function used as the mock implementation for `object[methodName]`.
509
+ * @param options Optional configuration options for the mock method.
510
+ */
511
+ method<
512
+ MockedObject extends object,
513
+ MethodName extends FunctionPropertyNames<MockedObject>,
514
+ >(
515
+ object: MockedObject,
516
+ methodName: MethodName,
517
+ options?: MockFunctionOptions,
518
+ ): MockedObject[MethodName] extends Function
519
+ ? Mock<MockedObject[MethodName]>
520
+ : never;
521
+ method<
522
+ MockedObject extends object,
523
+ MethodName extends FunctionPropertyNames<MockedObject>,
524
+ Implementation extends Function,
525
+ >(
526
+ object: MockedObject,
527
+ methodName: MethodName,
528
+ implementation: Implementation,
529
+ options?: MockFunctionOptions,
530
+ ): MockedObject[MethodName] extends Function
531
+ ? Mock<MockedObject[MethodName] | Implementation>
532
+ : never;
533
+ method<MockedObject extends object>(
534
+ object: MockedObject,
535
+ methodName: keyof MockedObject,
536
+ options: MockMethodOptions,
537
+ ): Mock<Function>;
538
+ method<MockedObject extends object>(
539
+ object: MockedObject,
540
+ methodName: keyof MockedObject,
541
+ implementation: Function,
542
+ options: MockMethodOptions,
543
+ ): Mock<Function>;
544
+
545
+ /**
546
+ * This function is syntax sugar for {@link MockTracker.method} with `options.getter` set to `true`.
547
+ */
548
+ getter<
549
+ MockedObject extends object,
550
+ MethodName extends keyof MockedObject,
551
+ >(
552
+ object: MockedObject,
553
+ methodName: MethodName,
554
+ options?: MockFunctionOptions,
555
+ ): Mock<() => MockedObject[MethodName]>;
556
+ getter<
557
+ MockedObject extends object,
558
+ MethodName extends keyof MockedObject,
559
+ Implementation extends Function,
560
+ >(
561
+ object: MockedObject,
562
+ methodName: MethodName,
563
+ implementation?: Implementation,
564
+ options?: MockFunctionOptions,
565
+ ): Mock<(() => MockedObject[MethodName]) | Implementation>;
566
+
567
+ /**
568
+ * This function is syntax sugar for {@link MockTracker.method} with `options.setter` set to `true`.
569
+ */
570
+ setter<
571
+ MockedObject extends object,
572
+ MethodName extends keyof MockedObject,
573
+ >(
574
+ object: MockedObject,
575
+ methodName: MethodName,
576
+ options?: MockFunctionOptions,
577
+ ): Mock<(value: MockedObject[MethodName]) => void>;
578
+ setter<
579
+ MockedObject extends object,
580
+ MethodName extends keyof MockedObject,
581
+ Implementation extends Function,
582
+ >(
583
+ object: MockedObject,
584
+ methodName: MethodName,
585
+ implementation?: Implementation,
586
+ options?: MockFunctionOptions,
587
+ ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
588
+
589
+ /**
590
+ * This function restores the default behavior of all mocks that were previously created by this `MockTracker`
591
+ * and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used,
592
+ * but the `MockTracker` instance can no longer be used to reset their behavior or otherwise interact with them.
593
+ *
594
+ * After each test completes, this function is called on the test context's `MockTracker`.
595
+ * If the global `MockTracker` is used extensively, calling this function manually is recommended.
596
+ */
597
+ reset(): void;
598
+
599
+ /**
600
+ * This function restores the default behavior of all mocks that were previously created by this `MockTracker`.
601
+ * Unlike `mock.reset()`, `mock.restoreAll()` does not disassociate the mocks from the `MockTracker` instance.
602
+ */
603
+ restoreAll(): void;
604
+ }
605
+
606
+ const mock: MockTracker;
607
+
608
+ interface MockFunctionCall<
609
+ F extends Function,
610
+ ReturnType = F extends (...args: any) => infer T
611
+ ? T
612
+ : F extends abstract new (...args: any) => infer T
613
+ ? T
614
+ : unknown,
615
+ Args = F extends (...args: infer Y) => any
616
+ ? Y
617
+ : F extends abstract new (...args: infer Y) => any
618
+ ? Y
619
+ : unknown[],
620
+ > {
621
+ /**
622
+ * An array of the arguments passed to the mock function.
623
+ */
624
+ arguments: Args;
625
+ /**
626
+ * If the mocked function threw then this property contains the thrown value.
627
+ */
628
+ error: unknown | undefined;
629
+ /**
630
+ * The value returned by the mocked function.
631
+ *
632
+ * If the mocked function threw, it will be `undefined`.
633
+ */
634
+ result: ReturnType | undefined;
635
+ /**
636
+ * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation.
637
+ */
638
+ stack: Error;
639
+ /**
640
+ * If the mocked function is a constructor, this field contains the class being constructed.
641
+ * Otherwise this will be `undefined`.
642
+ */
643
+ target: F extends abstract new (...args: any) => any ? F : undefined;
644
+ /**
645
+ * The mocked function's `this` value.
646
+ */
647
+ this: unknown;
648
+ }
649
+
650
+ interface MockFunctionContext<F extends Function> {
651
+ /**
652
+ * A getter that returns a copy of the internal array used to track calls to the mock.
653
+ */
654
+ readonly calls: Array<MockFunctionCall<F>>;
655
+
656
+ /**
657
+ * This function returns the number of times that this mock has been invoked.
658
+ * This function is more efficient than checking `ctx.calls.length`
659
+ * because `ctx.calls` is a getter that creates a copy of the internal call tracking array.
660
+ */
661
+ callCount(): number;
662
+
663
+ /**
664
+ * This function is used to change the behavior of an existing mock.
665
+ * @param implementation The function to be used as the mock's new implementation.
666
+ */
667
+ mockImplementation(implementation: Function): void;
668
+
669
+ /**
670
+ * This function is used to change the behavior of an existing mock for a single invocation.
671
+ * Once invocation `onCall` has occurred, the mock will revert to whatever behavior
672
+ * it would have used had `mockImplementationOnce()` not been called.
673
+ * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
674
+ * @param onCall The invocation number that will use `implementation`.
675
+ * If the specified invocation has already occurred then an exception is thrown.
676
+ */
677
+ mockImplementationOnce(implementation: Function, onCall?: number): void;
678
+
679
+ /**
680
+ * Resets the call history of the mock function.
681
+ */
682
+ resetCalls(): void;
683
+
684
+ /**
685
+ * Resets the implementation of the mock function to its original behavior.
686
+ * The mock can still be used after calling this function.
687
+ */
688
+ restore(): void;
689
+ }
690
+
691
+ export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
446
692
  }
@@ -41,21 +41,100 @@ declare module 'tls' {
41
41
  CN: string;
42
42
  }
43
43
  interface PeerCertificate {
44
+ /**
45
+ * `true` if a Certificate Authority (CA), `false` otherwise.
46
+ * @since v18.13.0
47
+ */
48
+ ca: boolean;
49
+ /**
50
+ * The DER encoded X.509 certificate data.
51
+ */
52
+ raw: Buffer;
53
+ /**
54
+ * The certificate subject.
55
+ */
44
56
  subject: Certificate;
57
+ /**
58
+ * The certificate issuer, described in the same terms as the `subject`.
59
+ */
45
60
  issuer: Certificate;
46
- subjectaltname: string;
47
- infoAccess: NodeJS.Dict<string[]>;
48
- modulus: string;
49
- exponent: string;
61
+ /**
62
+ * The date-time the certificate is valid from.
63
+ */
50
64
  valid_from: string;
65
+ /**
66
+ * The date-time the certificate is valid to.
67
+ */
51
68
  valid_to: string;
69
+ /**
70
+ * The certificate serial number, as a hex string.
71
+ */
72
+ serialNumber: string;
73
+ /**
74
+ * The SHA-1 digest of the DER encoded certificate.
75
+ * It is returned as a `:` separated hexadecimal string.
76
+ */
52
77
  fingerprint: string;
78
+ /**
79
+ * The SHA-256 digest of the DER encoded certificate.
80
+ * It is returned as a `:` separated hexadecimal string.
81
+ */
53
82
  fingerprint256: string;
54
- ext_key_usage: string[];
55
- serialNumber: string;
56
- raw: Buffer;
83
+ /**
84
+ * The SHA-512 digest of the DER encoded certificate.
85
+ * It is returned as a `:` separated hexadecimal string.
86
+ */
87
+ fingerprint512: string;
88
+ /**
89
+ * The extended key usage, a set of OIDs.
90
+ */
91
+ ext_key_usage?: string[];
92
+ /**
93
+ * A string containing concatenated names for the subject,
94
+ * an alternative to the `subject` names.
95
+ */
96
+ subjectaltname?: string;
97
+ /**
98
+ * An array describing the AuthorityInfoAccess, used with OCSP.
99
+ */
100
+ infoAccess?: NodeJS.Dict<string[]>;
101
+ /**
102
+ * For RSA keys: The RSA bit size.
103
+ *
104
+ * For EC keys: The key size in bits.
105
+ */
106
+ bits?: number;
107
+ /**
108
+ * The RSA exponent, as a string in hexadecimal number notation.
109
+ */
110
+ exponent?: string;
111
+ /**
112
+ * The RSA modulus, as a hexadecimal string.
113
+ */
114
+ modulus?: string;
115
+ /**
116
+ * The public key.
117
+ */
118
+ pubkey?: Buffer;
119
+ /**
120
+ * The ASN.1 name of the OID of the elliptic curve.
121
+ * Well-known curves are identified by an OID.
122
+ * While it is unusual, it is possible that the curve
123
+ * is identified by its mathematical properties,
124
+ * in which case it will not have an OID.
125
+ */
126
+ asn1Curve?: string;
127
+ /**
128
+ * The NIST name for the elliptic curve,if it has one
129
+ * (not all well-known curves have been assigned names by NIST).
130
+ */
131
+ nistCurve?: string;
57
132
  }
58
133
  interface DetailedPeerCertificate extends PeerCertificate {
134
+ /**
135
+ * The issuer certificate object.
136
+ * For self-signed certificates, this may be a circular reference.
137
+ */
59
138
  issuerCertificate: DetailedPeerCertificate;
60
139
  }
61
140
  interface CipherNameAndProtocol {
@@ -319,6 +319,16 @@ declare module 'async_hooks' {
319
319
  */
320
320
  triggerAsyncId(): number;
321
321
  }
322
+ interface AsyncLocalStorageOptions<T> {
323
+ /**
324
+ * Optional callback invoked before a store is propagated to a new async resource.
325
+ * Returning `true` allows propagation, returning `false` avoids it. Default is to propagate always.
326
+ * @param type The type of async event.
327
+ * @param store The current store.
328
+ * @since v18.13.0
329
+ */
330
+ onPropagate?: ((type: string, store: T) => boolean) | undefined;
331
+ }
322
332
  /**
323
333
  * This class creates stores that stay coherent through asynchronous operations.
324
334
  *
@@ -368,6 +378,8 @@ declare module 'async_hooks' {
368
378
  * @since v13.10.0, v12.17.0
369
379
  */
370
380
  class AsyncLocalStorage<T> {
381
+ constructor(options?: AsyncLocalStorageOptions<T>);
382
+
371
383
  /**
372
384
  * Disables the instance of `AsyncLocalStorage`. All subsequent calls
373
385
  * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
@@ -46,6 +46,7 @@
46
46
  declare module 'buffer' {
47
47
  import { BinaryLike } from 'node:crypto';
48
48
  import { ReadableStream as WebReadableStream } from 'node:stream/web';
49
+ export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
49
50
  export const INSPECT_MAX_BYTES: number;
50
51
  export const kMaxLength: number;
51
52
  export const kStringMaxLength: number;
@@ -169,12 +170,22 @@ declare module 'buffer' {
169
170
  import { Blob as NodeBlob } from 'buffer';
170
171
  // This conditional type will be the existing global Blob in a browser, or
171
172
  // the copy below in a Node environment.
172
- type __Blob = typeof globalThis extends { onmessage: any, Blob: any }
173
- ? {} : NodeBlob;
173
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
174
174
 
175
175
  global {
176
176
  // Buffer class
177
- type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
177
+ type BufferEncoding =
178
+ | 'ascii'
179
+ | 'utf8'
180
+ | 'utf-8'
181
+ | 'utf16le'
182
+ | 'ucs2'
183
+ | 'ucs-2'
184
+ | 'base64'
185
+ | 'base64url'
186
+ | 'latin1'
187
+ | 'binary'
188
+ | 'hex';
178
189
  type WithImplicitCoercion<T> =
179
190
  | T
180
191
  | {
@@ -248,7 +259,11 @@ declare module 'buffer' {
248
259
  * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
249
260
  * @since v5.10.0
250
261
  */
251
- from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
262
+ from(
263
+ arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
264
+ byteOffset?: number,
265
+ length?: number,
266
+ ): Buffer;
252
267
  /**
253
268
  * Creates a new Buffer using the passed {data}
254
269
  * @param data data to create a new Buffer
@@ -266,7 +281,7 @@ declare module 'buffer' {
266
281
  | {
267
282
  [Symbol.toPrimitive](hint: 'string'): string;
268
283
  },
269
- encoding?: BufferEncoding
284
+ encoding?: BufferEncoding,
270
285
  ): Buffer;
271
286
  /**
272
287
  * Creates a new Buffer using the passed {data}
@@ -340,7 +355,10 @@ declare module 'buffer' {
340
355
  * @param [encoding='utf8'] If `string` is a string, this is its encoding.
341
356
  * @return The number of bytes contained within `string`.
342
357
  */
343
- byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
358
+ byteLength(
359
+ string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
360
+ encoding?: BufferEncoding,
361
+ ): number;
344
362
  /**
345
363
  * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
346
364
  *
@@ -711,7 +729,13 @@ declare module 'buffer' {
711
729
  * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
712
730
  * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
713
731
  */
714
- compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
732
+ compare(
733
+ target: Uint8Array,
734
+ targetStart?: number,
735
+ targetEnd?: number,
736
+ sourceStart?: number,
737
+ sourceEnd?: number,
738
+ ): -1 | 0 | 1;
715
739
  /**
716
740
  * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
717
741
  *
@@ -85,6 +85,7 @@ declare module 'module' {
85
85
  static wrap(code: string): string;
86
86
  static createRequire(path: string | URL): NodeRequire;
87
87
  static builtinModules: string[];
88
+ static isBuiltin(moduleName: string): boolean;
88
89
  static Module: typeof Module;
89
90
  constructor(id: string, parent?: Module);
90
91
  }
@@ -57,6 +57,14 @@ declare module 'net' {
57
57
  noDelay?: boolean | undefined;
58
58
  keepAlive?: boolean | undefined;
59
59
  keepAliveInitialDelay?: number | undefined;
60
+ /**
61
+ * @since v18.13.0
62
+ */
63
+ autoSelectFamily?: boolean | undefined;
64
+ /**
65
+ * @since v18.13.0
66
+ */
67
+ autoSelectFamilyAttemptTimeout?: number | undefined;
60
68
  }
61
69
  interface IpcSocketConnectOpts extends ConnectOpts {
62
70
  path: string;
@@ -281,7 +289,7 @@ declare module 'net' {
281
289
  * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
282
290
  * @since v18.8.0
283
291
  */
284
- readonly localFamily?: string;
292
+ readonly localFamily?: string;
285
293
  /**
286
294
  * This property represents the state of the connection as a string.
287
295
  * @see {https://nodejs.org/api/net.html#socketreadystate}