create-leo-app 0.9.13 → 0.9.14

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 (121) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
  3. package/template-build-and-execute-authorization-ts/package.json +1 -1
  4. package/template-extension/package.json +1 -1
  5. package/template-nextjs-ts/next-env.d.ts +1 -1
  6. package/template-nextjs-ts/node_modules/@types/node/README.md +2 -2
  7. package/template-nextjs-ts/node_modules/@types/node/assert/strict.d.ts +105 -2
  8. package/template-nextjs-ts/node_modules/@types/node/assert.d.ts +119 -95
  9. package/template-nextjs-ts/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  10. package/template-nextjs-ts/node_modules/@types/node/buffer.d.ts +12 -6
  11. package/template-nextjs-ts/node_modules/@types/node/child_process.d.ts +89 -162
  12. package/template-nextjs-ts/node_modules/@types/node/cluster.d.ts +4 -5
  13. package/template-nextjs-ts/node_modules/@types/node/crypto.d.ts +203 -167
  14. package/template-nextjs-ts/node_modules/@types/node/dgram.d.ts +9 -8
  15. package/template-nextjs-ts/node_modules/@types/node/dns/promises.d.ts +11 -10
  16. package/template-nextjs-ts/node_modules/@types/node/dns.d.ts +24 -20
  17. package/template-nextjs-ts/node_modules/@types/node/events.d.ts +80 -34
  18. package/template-nextjs-ts/node_modules/@types/node/fs/promises.d.ts +78 -56
  19. package/template-nextjs-ts/node_modules/@types/node/fs.d.ts +153 -129
  20. package/template-nextjs-ts/node_modules/@types/node/globals.d.ts +151 -343
  21. package/template-nextjs-ts/node_modules/@types/node/globals.typedarray.d.ts +17 -0
  22. package/template-nextjs-ts/node_modules/@types/node/http.d.ts +82 -54
  23. package/template-nextjs-ts/node_modules/@types/node/http2.d.ts +45 -26
  24. package/template-nextjs-ts/node_modules/@types/node/https.d.ts +96 -62
  25. package/template-nextjs-ts/node_modules/@types/node/index.d.ts +7 -2
  26. package/template-nextjs-ts/node_modules/@types/node/inspector.d.ts +187 -3936
  27. package/template-nextjs-ts/node_modules/@types/node/inspector.generated.d.ts +4052 -0
  28. package/template-nextjs-ts/node_modules/@types/node/module.d.ts +24 -0
  29. package/template-nextjs-ts/node_modules/@types/node/net.d.ts +33 -11
  30. package/template-nextjs-ts/node_modules/@types/node/os.d.ts +14 -3
  31. package/template-nextjs-ts/node_modules/@types/node/package.json +3 -83
  32. package/template-nextjs-ts/node_modules/@types/node/path.d.ts +1 -1
  33. package/template-nextjs-ts/node_modules/@types/node/perf_hooks.d.ts +6 -8
  34. package/template-nextjs-ts/node_modules/@types/node/process.d.ts +34 -25
  35. package/template-nextjs-ts/node_modules/@types/node/readline/promises.d.ts +1 -2
  36. package/template-nextjs-ts/node_modules/@types/node/sqlite.d.ts +48 -7
  37. package/template-nextjs-ts/node_modules/@types/node/stream/consumers.d.ts +2 -2
  38. package/template-nextjs-ts/node_modules/@types/node/stream/web.d.ts +4 -0
  39. package/template-nextjs-ts/node_modules/@types/node/stream.d.ts +29 -33
  40. package/template-nextjs-ts/node_modules/@types/node/string_decoder.d.ts +2 -2
  41. package/template-nextjs-ts/node_modules/@types/node/test.d.ts +10 -23
  42. package/template-nextjs-ts/node_modules/@types/node/tls.d.ts +122 -66
  43. package/template-nextjs-ts/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  44. package/template-nextjs-ts/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +15 -0
  45. package/template-nextjs-ts/node_modules/@types/node/ts5.6/index.d.ts +7 -2
  46. package/template-nextjs-ts/node_modules/@types/node/url.d.ts +21 -9
  47. package/template-nextjs-ts/node_modules/@types/node/util.d.ts +18 -8
  48. package/template-nextjs-ts/node_modules/@types/node/v8.d.ts +33 -35
  49. package/template-nextjs-ts/node_modules/@types/node/vm.d.ts +21 -50
  50. package/template-nextjs-ts/node_modules/@types/node/wasi.d.ts +1 -1
  51. package/template-nextjs-ts/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  52. package/template-nextjs-ts/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  53. package/template-nextjs-ts/node_modules/@types/node/{dom-events.d.ts → web-globals/events.d.ts} +49 -51
  54. package/template-nextjs-ts/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
  55. package/template-nextjs-ts/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
  56. package/template-nextjs-ts/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  57. package/template-nextjs-ts/node_modules/@types/node/worker_threads.d.ts +65 -50
  58. package/template-nextjs-ts/node_modules/@types/node/zlib.d.ts +39 -26
  59. package/template-nextjs-ts/package.json +2 -2
  60. package/template-nextjs-ts/src/app/page.tsx +1 -1
  61. package/template-node/package.json +2 -2
  62. package/template-node-ts/package.json +2 -2
  63. package/template-offline-public-transaction-ts/package.json +1 -1
  64. package/template-private-transaction-ts/package.json +1 -1
  65. package/template-react-leo/package.json +1 -1
  66. package/template-react-managed-worker/package.json +1 -1
  67. package/template-react-ts/node_modules/@types/node/README.md +2 -2
  68. package/template-react-ts/node_modules/@types/node/assert/strict.d.ts +105 -2
  69. package/template-react-ts/node_modules/@types/node/assert.d.ts +119 -95
  70. package/template-react-ts/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  71. package/template-react-ts/node_modules/@types/node/buffer.d.ts +12 -6
  72. package/template-react-ts/node_modules/@types/node/child_process.d.ts +89 -162
  73. package/template-react-ts/node_modules/@types/node/cluster.d.ts +4 -5
  74. package/template-react-ts/node_modules/@types/node/crypto.d.ts +203 -167
  75. package/template-react-ts/node_modules/@types/node/dgram.d.ts +9 -8
  76. package/template-react-ts/node_modules/@types/node/dns/promises.d.ts +11 -10
  77. package/template-react-ts/node_modules/@types/node/dns.d.ts +24 -20
  78. package/template-react-ts/node_modules/@types/node/events.d.ts +80 -34
  79. package/template-react-ts/node_modules/@types/node/fs/promises.d.ts +78 -56
  80. package/template-react-ts/node_modules/@types/node/fs.d.ts +153 -129
  81. package/template-react-ts/node_modules/@types/node/globals.d.ts +151 -343
  82. package/template-react-ts/node_modules/@types/node/globals.typedarray.d.ts +17 -0
  83. package/template-react-ts/node_modules/@types/node/http.d.ts +82 -54
  84. package/template-react-ts/node_modules/@types/node/http2.d.ts +45 -26
  85. package/template-react-ts/node_modules/@types/node/https.d.ts +96 -62
  86. package/template-react-ts/node_modules/@types/node/index.d.ts +7 -2
  87. package/template-react-ts/node_modules/@types/node/inspector.d.ts +187 -3936
  88. package/template-react-ts/node_modules/@types/node/inspector.generated.d.ts +4052 -0
  89. package/template-react-ts/node_modules/@types/node/module.d.ts +24 -0
  90. package/template-react-ts/node_modules/@types/node/net.d.ts +33 -11
  91. package/template-react-ts/node_modules/@types/node/os.d.ts +14 -3
  92. package/template-react-ts/node_modules/@types/node/package.json +3 -83
  93. package/template-react-ts/node_modules/@types/node/path.d.ts +1 -1
  94. package/template-react-ts/node_modules/@types/node/perf_hooks.d.ts +6 -8
  95. package/template-react-ts/node_modules/@types/node/process.d.ts +34 -25
  96. package/template-react-ts/node_modules/@types/node/readline/promises.d.ts +1 -2
  97. package/template-react-ts/node_modules/@types/node/sqlite.d.ts +48 -7
  98. package/template-react-ts/node_modules/@types/node/stream/consumers.d.ts +2 -2
  99. package/template-react-ts/node_modules/@types/node/stream/web.d.ts +4 -0
  100. package/template-react-ts/node_modules/@types/node/stream.d.ts +29 -33
  101. package/template-react-ts/node_modules/@types/node/string_decoder.d.ts +2 -2
  102. package/template-react-ts/node_modules/@types/node/test.d.ts +10 -23
  103. package/template-react-ts/node_modules/@types/node/tls.d.ts +122 -66
  104. package/template-react-ts/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  105. package/template-react-ts/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +15 -0
  106. package/template-react-ts/node_modules/@types/node/ts5.6/index.d.ts +7 -2
  107. package/template-react-ts/node_modules/@types/node/url.d.ts +21 -9
  108. package/template-react-ts/node_modules/@types/node/util.d.ts +18 -8
  109. package/template-react-ts/node_modules/@types/node/v8.d.ts +33 -35
  110. package/template-react-ts/node_modules/@types/node/vm.d.ts +21 -50
  111. package/template-react-ts/node_modules/@types/node/wasi.d.ts +1 -1
  112. package/template-react-ts/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  113. package/template-react-ts/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  114. package/template-react-ts/node_modules/@types/node/{dom-events.d.ts → web-globals/events.d.ts} +49 -51
  115. package/template-react-ts/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
  116. package/template-react-ts/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
  117. package/template-react-ts/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  118. package/template-react-ts/node_modules/@types/node/worker_threads.d.ts +65 -50
  119. package/template-react-ts/node_modules/@types/node/zlib.d.ts +39 -26
  120. package/template-react-ts/package.json +1 -1
  121. package/template-vanilla/package.json +1 -1
@@ -9,6 +9,7 @@
9
9
  * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tls.js)
10
10
  */
11
11
  declare module "tls" {
12
+ import { NonSharedBuffer } from "node:buffer";
12
13
  import { X509Certificate } from "node:crypto";
13
14
  import * as net from "node:net";
14
15
  import * as stream from "stream";
@@ -49,7 +50,7 @@ declare module "tls" {
49
50
  /**
50
51
  * The DER encoded X.509 certificate data.
51
52
  */
52
- raw: Buffer;
53
+ raw: NonSharedBuffer;
53
54
  /**
54
55
  * The certificate subject.
55
56
  */
@@ -115,7 +116,7 @@ declare module "tls" {
115
116
  /**
116
117
  * The public key.
117
118
  */
118
- pubkey?: Buffer;
119
+ pubkey?: NonSharedBuffer;
119
120
  /**
120
121
  * The ASN.1 name of the OID of the elliptic curve.
121
122
  * Well-known curves are identified by an OID.
@@ -295,7 +296,7 @@ declare module "tls" {
295
296
  * @since v9.9.0
296
297
  * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet.
297
298
  */
298
- getFinished(): Buffer | undefined;
299
+ getFinished(): NonSharedBuffer | undefined;
299
300
  /**
300
301
  * Returns an object representing the peer's certificate. If the peer does not
301
302
  * provide a certificate, an empty object will be returned. If the socket has been
@@ -322,7 +323,7 @@ declare module "tls" {
322
323
  * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so
323
324
  * far.
324
325
  */
325
- getPeerFinished(): Buffer | undefined;
326
+ getPeerFinished(): NonSharedBuffer | undefined;
326
327
  /**
327
328
  * Returns a string containing the negotiated SSL/TLS protocol version of the
328
329
  * current connection. The value `'unknown'` will be returned for connected
@@ -352,7 +353,7 @@ declare module "tls" {
352
353
  * must use the `'session'` event (it also works for TLSv1.2 and below).
353
354
  * @since v0.11.4
354
355
  */
355
- getSession(): Buffer | undefined;
356
+ getSession(): NonSharedBuffer | undefined;
356
357
  /**
357
358
  * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
358
359
  * @since v12.11.0
@@ -367,7 +368,7 @@ declare module "tls" {
367
368
  * See `Session Resumption` for more information.
368
369
  * @since v0.11.4
369
370
  */
370
- getTLSTicket(): Buffer | undefined;
371
+ getTLSTicket(): NonSharedBuffer | undefined;
371
372
  /**
372
373
  * See `Session Resumption` for more information.
373
374
  * @since v0.5.6
@@ -478,37 +479,37 @@ declare module "tls" {
478
479
  * @param context Optionally provide a context.
479
480
  * @return requested bytes of the keying material
480
481
  */
481
- exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
482
+ exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer;
482
483
  addListener(event: string, listener: (...args: any[]) => void): this;
483
- addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
484
+ addListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
484
485
  addListener(event: "secureConnect", listener: () => void): this;
485
- addListener(event: "session", listener: (session: Buffer) => void): this;
486
- addListener(event: "keylog", listener: (line: Buffer) => void): this;
486
+ addListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
487
+ addListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
487
488
  emit(event: string | symbol, ...args: any[]): boolean;
488
- emit(event: "OCSPResponse", response: Buffer): boolean;
489
+ emit(event: "OCSPResponse", response: NonSharedBuffer): boolean;
489
490
  emit(event: "secureConnect"): boolean;
490
- emit(event: "session", session: Buffer): boolean;
491
- emit(event: "keylog", line: Buffer): boolean;
491
+ emit(event: "session", session: NonSharedBuffer): boolean;
492
+ emit(event: "keylog", line: NonSharedBuffer): boolean;
492
493
  on(event: string, listener: (...args: any[]) => void): this;
493
- on(event: "OCSPResponse", listener: (response: Buffer) => void): this;
494
+ on(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
494
495
  on(event: "secureConnect", listener: () => void): this;
495
- on(event: "session", listener: (session: Buffer) => void): this;
496
- on(event: "keylog", listener: (line: Buffer) => void): this;
496
+ on(event: "session", listener: (session: NonSharedBuffer) => void): this;
497
+ on(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
497
498
  once(event: string, listener: (...args: any[]) => void): this;
498
- once(event: "OCSPResponse", listener: (response: Buffer) => void): this;
499
+ once(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
499
500
  once(event: "secureConnect", listener: () => void): this;
500
- once(event: "session", listener: (session: Buffer) => void): this;
501
- once(event: "keylog", listener: (line: Buffer) => void): this;
501
+ once(event: "session", listener: (session: NonSharedBuffer) => void): this;
502
+ once(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
502
503
  prependListener(event: string, listener: (...args: any[]) => void): this;
503
- prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
504
+ prependListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
504
505
  prependListener(event: "secureConnect", listener: () => void): this;
505
- prependListener(event: "session", listener: (session: Buffer) => void): this;
506
- prependListener(event: "keylog", listener: (line: Buffer) => void): this;
506
+ prependListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
507
+ prependListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
507
508
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
508
- prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
509
+ prependOnceListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
509
510
  prependOnceListener(event: "secureConnect", listener: () => void): this;
510
- prependOnceListener(event: "session", listener: (session: Buffer) => void): this;
511
- prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this;
511
+ prependOnceListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
512
+ prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
512
513
  }
513
514
  interface CommonConnectionOptions {
514
515
  /**
@@ -531,7 +532,7 @@ declare module "tls" {
531
532
  * An array of strings or a Buffer naming possible ALPN protocols.
532
533
  * (Protocols should be ordered by their priority.)
533
534
  */
534
- ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
535
+ ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined;
535
536
  /**
536
537
  * SNICallback(servername, cb) <Function> A function that will be
537
538
  * called if the client supports SNI TLS extension. Two arguments
@@ -586,7 +587,7 @@ declare module "tls" {
586
587
  * requires explicitly specifying a cipher suite with the `ciphers` option.
587
588
  * More information can be found in the RFC 4279.
588
589
  */
589
- pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
590
+ pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined;
590
591
  /**
591
592
  * hint to send to a client to help
592
593
  * with selecting the identity during TLS-PSK negotiation. Will be ignored
@@ -596,7 +597,7 @@ declare module "tls" {
596
597
  pskIdentityHint?: string | undefined;
597
598
  }
598
599
  interface PSKCallbackNegotation {
599
- psk: DataView | NodeJS.TypedArray;
600
+ psk: NodeJS.ArrayBufferView;
600
601
  identity: string;
601
602
  }
602
603
  interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
@@ -627,7 +628,7 @@ declare module "tls" {
627
628
  * compatible with the selected cipher's digest.
628
629
  * `identity` must use UTF-8 encoding.
629
630
  */
630
- pskCallback?(hint: string | null): PSKCallbackNegotation | null;
631
+ pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined;
631
632
  }
632
633
  /**
633
634
  * Accepts encrypted connections using TLS or SSL.
@@ -655,7 +656,7 @@ declare module "tls" {
655
656
  * @since v3.0.0
656
657
  * @return A 48-byte buffer containing the session ticket keys.
657
658
  */
658
- getTicketKeys(): Buffer;
659
+ getTicketKeys(): NonSharedBuffer;
659
660
  /**
660
661
  * The `server.setSecureContext()` method replaces the secure context of an
661
662
  * existing server. Existing connections to the server are not interrupted.
@@ -687,115 +688,138 @@ declare module "tls" {
687
688
  addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
688
689
  addListener(
689
690
  event: "newSession",
690
- listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
691
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
691
692
  ): this;
692
693
  addListener(
693
694
  event: "OCSPRequest",
694
695
  listener: (
695
- certificate: Buffer,
696
- issuer: Buffer,
697
- callback: (err: Error | null, resp: Buffer) => void,
696
+ certificate: NonSharedBuffer,
697
+ issuer: NonSharedBuffer,
698
+ callback: (err: Error | null, resp: Buffer | null) => void,
698
699
  ) => void,
699
700
  ): this;
700
701
  addListener(
701
702
  event: "resumeSession",
702
- listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
703
+ listener: (
704
+ sessionId: NonSharedBuffer,
705
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
706
+ ) => void,
703
707
  ): this;
704
708
  addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
705
- addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
709
+ addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
706
710
  emit(event: string | symbol, ...args: any[]): boolean;
707
711
  emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
708
- emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
712
+ emit(
713
+ event: "newSession",
714
+ sessionId: NonSharedBuffer,
715
+ sessionData: NonSharedBuffer,
716
+ callback: () => void,
717
+ ): boolean;
709
718
  emit(
710
719
  event: "OCSPRequest",
711
- certificate: Buffer,
712
- issuer: Buffer,
713
- callback: (err: Error | null, resp: Buffer) => void,
720
+ certificate: NonSharedBuffer,
721
+ issuer: NonSharedBuffer,
722
+ callback: (err: Error | null, resp: Buffer | null) => void,
714
723
  ): boolean;
715
724
  emit(
716
725
  event: "resumeSession",
717
- sessionId: Buffer,
726
+ sessionId: NonSharedBuffer,
718
727
  callback: (err: Error | null, sessionData: Buffer | null) => void,
719
728
  ): boolean;
720
729
  emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
721
- emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean;
730
+ emit(event: "keylog", line: NonSharedBuffer, tlsSocket: TLSSocket): boolean;
722
731
  on(event: string, listener: (...args: any[]) => void): this;
723
732
  on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
724
- on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
733
+ on(
734
+ event: "newSession",
735
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
736
+ ): this;
725
737
  on(
726
738
  event: "OCSPRequest",
727
739
  listener: (
728
- certificate: Buffer,
729
- issuer: Buffer,
730
- callback: (err: Error | null, resp: Buffer) => void,
740
+ certificate: NonSharedBuffer,
741
+ issuer: NonSharedBuffer,
742
+ callback: (err: Error | null, resp: Buffer | null) => void,
731
743
  ) => void,
732
744
  ): this;
733
745
  on(
734
746
  event: "resumeSession",
735
- listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
747
+ listener: (
748
+ sessionId: NonSharedBuffer,
749
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
750
+ ) => void,
736
751
  ): this;
737
752
  on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
738
- on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
753
+ on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
739
754
  once(event: string, listener: (...args: any[]) => void): this;
740
755
  once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
741
756
  once(
742
757
  event: "newSession",
743
- listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
758
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
744
759
  ): this;
745
760
  once(
746
761
  event: "OCSPRequest",
747
762
  listener: (
748
- certificate: Buffer,
749
- issuer: Buffer,
750
- callback: (err: Error | null, resp: Buffer) => void,
763
+ certificate: NonSharedBuffer,
764
+ issuer: NonSharedBuffer,
765
+ callback: (err: Error | null, resp: Buffer | null) => void,
751
766
  ) => void,
752
767
  ): this;
753
768
  once(
754
769
  event: "resumeSession",
755
- listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
770
+ listener: (
771
+ sessionId: NonSharedBuffer,
772
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
773
+ ) => void,
756
774
  ): this;
757
775
  once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
758
- once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
776
+ once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
759
777
  prependListener(event: string, listener: (...args: any[]) => void): this;
760
778
  prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
761
779
  prependListener(
762
780
  event: "newSession",
763
- listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
781
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
764
782
  ): this;
765
783
  prependListener(
766
784
  event: "OCSPRequest",
767
785
  listener: (
768
- certificate: Buffer,
769
- issuer: Buffer,
770
- callback: (err: Error | null, resp: Buffer) => void,
786
+ certificate: NonSharedBuffer,
787
+ issuer: NonSharedBuffer,
788
+ callback: (err: Error | null, resp: Buffer | null) => void,
771
789
  ) => void,
772
790
  ): this;
773
791
  prependListener(
774
792
  event: "resumeSession",
775
- listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
793
+ listener: (
794
+ sessionId: NonSharedBuffer,
795
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
796
+ ) => void,
776
797
  ): this;
777
798
  prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
778
- prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
799
+ prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
779
800
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
780
801
  prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
781
802
  prependOnceListener(
782
803
  event: "newSession",
783
- listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
804
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
784
805
  ): this;
785
806
  prependOnceListener(
786
807
  event: "OCSPRequest",
787
808
  listener: (
788
- certificate: Buffer,
789
- issuer: Buffer,
790
- callback: (err: Error | null, resp: Buffer) => void,
809
+ certificate: NonSharedBuffer,
810
+ issuer: NonSharedBuffer,
811
+ callback: (err: Error | null, resp: Buffer | null) => void,
791
812
  ) => void,
792
813
  ): this;
793
814
  prependOnceListener(
794
815
  event: "resumeSession",
795
- listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
816
+ listener: (
817
+ sessionId: NonSharedBuffer,
818
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
819
+ ) => void,
796
820
  ): this;
797
821
  prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
798
- prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
822
+ prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
799
823
  }
800
824
  /**
801
825
  * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
@@ -1208,6 +1232,38 @@ declare module "tls" {
1208
1232
  * @since v0.10.2
1209
1233
  */
1210
1234
  function getCiphers(): string[];
1235
+ /**
1236
+ * Sets the default CA certificates used by Node.js TLS clients. If the provided
1237
+ * certificates are parsed successfully, they will become the default CA
1238
+ * certificate list returned by {@link getCACertificates} and used
1239
+ * by subsequent TLS connections that don't specify their own CA certificates.
1240
+ * The certificates will be deduplicated before being set as the default.
1241
+ *
1242
+ * This function only affects the current Node.js thread. Previous
1243
+ * sessions cached by the HTTPS agent won't be affected by this change, so
1244
+ * this method should be called before any unwanted cachable TLS connections are
1245
+ * made.
1246
+ *
1247
+ * To use system CA certificates as the default:
1248
+ *
1249
+ * ```js
1250
+ * import tls from 'node:tls';
1251
+ * tls.setDefaultCACertificates(tls.getCACertificates('system'));
1252
+ * ```
1253
+ *
1254
+ * This function completely replaces the default CA certificate list. To add additional
1255
+ * certificates to the existing defaults, get the current certificates and append to them:
1256
+ *
1257
+ * ```js
1258
+ * import tls from 'node:tls';
1259
+ * const currentCerts = tls.getCACertificates('default');
1260
+ * const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...'];
1261
+ * tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]);
1262
+ * ```
1263
+ * @since v22.19.0
1264
+ * @param certs An array of CA certificates in PEM format.
1265
+ */
1266
+ function setDefaultCACertificates(certs: ReadonlyArray<string | NodeJS.ArrayBufferView>): void;
1211
1267
  /**
1212
1268
  * The default curve name to use for ECDH key agreement in a tls server.
1213
1269
  * The default value is `'auto'`. See `{@link createSecureContext()}` for further
@@ -32,7 +32,7 @@ declare module "buffer" {
32
32
  * @param arrayBuffer The ArrayBuffer with which to share memory.
33
33
  * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
34
34
  */
35
- new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
35
+ new(arrayBuffer: ArrayBufferLike): Buffer;
36
36
  /**
37
37
  * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
38
38
  * Array entries outside that range will be truncated to fit into it.
@@ -126,7 +126,7 @@ declare module "buffer" {
126
126
  * `arrayBuffer.byteLength - byteOffset`.
127
127
  */
128
128
  from(
129
- arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
129
+ arrayBuffer: WithImplicitCoercion<ArrayBufferLike>,
130
130
  byteOffset?: number,
131
131
  length?: number,
132
132
  ): Buffer;
@@ -448,7 +448,15 @@ declare module "buffer" {
448
448
  */
449
449
  subarray(start?: number, end?: number): Buffer;
450
450
  }
451
+ /**
452
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
453
+ * TypeScript versions earlier than 5.7.
454
+ */
451
455
  type NonSharedBuffer = Buffer;
456
+ /**
457
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
458
+ * TypeScript versions earlier than 5.7.
459
+ */
452
460
  type AllowSharedBuffer = Buffer;
453
461
  }
454
462
  /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
@@ -15,5 +15,20 @@ declare global {
15
15
  | Float32Array
16
16
  | Float64Array;
17
17
  type ArrayBufferView = TypedArray | DataView;
18
+
19
+ type NonSharedUint8Array = Uint8Array;
20
+ type NonSharedUint8ClampedArray = Uint8ClampedArray;
21
+ type NonSharedUint16Array = Uint16Array;
22
+ type NonSharedUint32Array = Uint32Array;
23
+ type NonSharedInt8Array = Int8Array;
24
+ type NonSharedInt16Array = Int16Array;
25
+ type NonSharedInt32Array = Int32Array;
26
+ type NonSharedBigUint64Array = BigUint64Array;
27
+ type NonSharedBigInt64Array = BigInt64Array;
28
+ type NonSharedFloat32Array = Float32Array;
29
+ type NonSharedFloat64Array = Float64Array;
30
+ type NonSharedDataView = DataView;
31
+ type NonSharedTypedArray = TypedArray;
32
+ type NonSharedArrayBufferView = ArrayBufferView;
18
33
  }
19
34
  }
@@ -36,6 +36,12 @@
36
36
 
37
37
  // Definitions for Node.js modules that are not specific to any version of TypeScript:
38
38
  /// <reference path="../globals.d.ts" />
39
+ /// <reference path="../web-globals/abortcontroller.d.ts" />
40
+ /// <reference path="../web-globals/domexception.d.ts" />
41
+ /// <reference path="../web-globals/events.d.ts" />
42
+ /// <reference path="../web-globals/fetch.d.ts" />
43
+ /// <reference path="../web-globals/navigator.d.ts" />
44
+ /// <reference path="../web-globals/storage.d.ts" />
39
45
  /// <reference path="../assert.d.ts" />
40
46
  /// <reference path="../assert/strict.d.ts" />
41
47
  /// <reference path="../async_hooks.d.ts" />
@@ -49,9 +55,7 @@
49
55
  /// <reference path="../diagnostics_channel.d.ts" />
50
56
  /// <reference path="../dns.d.ts" />
51
57
  /// <reference path="../dns/promises.d.ts" />
52
- /// <reference path="../dns/promises.d.ts" />
53
58
  /// <reference path="../domain.d.ts" />
54
- /// <reference path="../dom-events.d.ts" />
55
59
  /// <reference path="../events.d.ts" />
56
60
  /// <reference path="../fs.d.ts" />
57
61
  /// <reference path="../fs/promises.d.ts" />
@@ -59,6 +63,7 @@
59
63
  /// <reference path="../http2.d.ts" />
60
64
  /// <reference path="../https.d.ts" />
61
65
  /// <reference path="../inspector.d.ts" />
66
+ /// <reference path="../inspector.generated.d.ts" />
62
67
  /// <reference path="../module.d.ts" />
63
68
  /// <reference path="../net.d.ts" />
64
69
  /// <reference path="../os.d.ts" />
@@ -8,7 +8,7 @@
8
8
  * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/url.js)
9
9
  */
10
10
  declare module "url" {
11
- import { Blob as NodeBlob } from "node:buffer";
11
+ import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
12
12
  import { ClientRequestArgs } from "node:http";
13
13
  import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
14
14
  // Input to `url.format`
@@ -315,6 +315,17 @@ declare module "url" {
315
315
  * @return The fully-resolved platform-specific Node.js file path.
316
316
  */
317
317
  function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string;
318
+ /**
319
+ * Like `url.fileURLToPath(...)` except that instead of returning a string
320
+ * representation of the path, a `Buffer` is returned. This conversion is
321
+ * helpful when the input URL contains percent-encoded segments that are
322
+ * not valid UTF-8 / Unicode sequences.
323
+ * @since v22.18.0
324
+ * @param url The file URL string or URL object to convert to a path.
325
+ * @returns The fully-resolved platform-specific Node.js file path
326
+ * as a `Buffer`.
327
+ */
328
+ function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer;
318
329
  /**
319
330
  * This function ensures that `path` is resolved absolutely, and that the URL
320
331
  * control characters are correctly encoded when converting into a File URL.
@@ -420,14 +431,12 @@ declare module "url" {
420
431
  * Threads, `Blob` objects registered within one Worker will not be available
421
432
  * to other workers or the main thread.
422
433
  * @since v16.7.0
423
- * @experimental
424
434
  */
425
435
  static createObjectURL(blob: NodeBlob): string;
426
436
  /**
427
437
  * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
428
438
  * ID that isn't registered will silently fail.
429
439
  * @since v16.7.0
430
- * @experimental
431
440
  * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
432
441
  */
433
442
  static revokeObjectURL(id: string): void;
@@ -446,12 +455,15 @@ declare module "url" {
446
455
  */
447
456
  static canParse(input: string, base?: string): boolean;
448
457
  /**
449
- * Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs.
450
- * Returns `null` if `input` is not a valid.
451
- * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
452
- * `converted to a string` first.
453
- * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
458
+ * Parses a string as a URL. If `base` is provided, it will be used as the base
459
+ * URL for the purpose of resolving non-absolute `input` URLs. Returns `null`
460
+ * if the parameters can't be resolved to a valid URL.
454
461
  * @since v22.1.0
462
+ * @param input The absolute or relative input URL to parse. If `input`
463
+ * is relative, then `base` is required. If `input` is absolute, the `base`
464
+ * is ignored. If `input` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
465
+ * @param base The base URL to resolve against if the `input` is not
466
+ * absolute. If `base` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
455
467
  */
456
468
  static parse(input: string, base?: string): URL | null;
457
469
  constructor(input: string | { toString: () => string }, base?: string | URL);
@@ -828,7 +840,7 @@ declare module "url" {
828
840
  * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
829
841
  * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`.
830
842
  *
831
- * Alias for `urlSearchParams[@@iterator]()`.
843
+ * Alias for `urlSearchParams[Symbol.iterator]()`.
832
844
  */
833
845
  entries(): URLSearchParamsIterator<[string, string]>;
834
846
  /**
@@ -338,6 +338,11 @@ declare module "util" {
338
338
  * @since v9.7.0
339
339
  */
340
340
  export function getSystemErrorName(err: number): string;
341
+ /**
342
+ * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread.
343
+ * @since 22.19.0
344
+ */
345
+ export function setTraceSigInt(enable: boolean): void;
341
346
  /**
342
347
  * Returns a Map of all system error codes available from the Node.js API.
343
348
  * The mapping between error codes and error names is platform-dependent.
@@ -444,8 +449,8 @@ declare module "util" {
444
449
  * intended for debugging. The output of `util.inspect` may change at any time
445
450
  * and should not be depended upon programmatically. Additional `options` may be
446
451
  * passed that alter the result.
447
- * `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make
448
- * an identifiable tag for an inspected value.
452
+ * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag`
453
+ * property to make an identifiable tag for an inspected value.
449
454
  *
450
455
  * ```js
451
456
  * class Foo {
@@ -1461,6 +1466,7 @@ declare module "util" {
1461
1466
  | "hidden"
1462
1467
  | "inverse"
1463
1468
  | "italic"
1469
+ | "none"
1464
1470
  | "overlined"
1465
1471
  | "reset"
1466
1472
  | "strikethrough"
@@ -1517,6 +1523,8 @@ declare module "util" {
1517
1523
  * );
1518
1524
  * ```
1519
1525
  *
1526
+ * The special format value `none` applies no additional styling to the text.
1527
+ *
1520
1528
  * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v22.x/api/util.html#modifiers).
1521
1529
  * @param format A text format or an Array of text formats defined in `util.inspect.colors`.
1522
1530
  * @param text The text to to be formatted.
@@ -1613,7 +1621,7 @@ declare module "util" {
1613
1621
  * encoded bytes.
1614
1622
  * @param [input='an empty string'] The text to encode.
1615
1623
  */
1616
- encode(input?: string): Uint8Array;
1624
+ encode(input?: string): NodeJS.NonSharedUint8Array;
1617
1625
  /**
1618
1626
  * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
1619
1627
  * containing the read Unicode code units and written UTF-8 bytes.
@@ -1706,10 +1714,12 @@ declare module "util" {
1706
1714
  */
1707
1715
  short?: string | undefined;
1708
1716
  /**
1709
- * The default value to
1710
- * be used if (and only if) the option does not appear in the arguments to be
1711
- * parsed. It must be of the same type as the `type` property. When `multiple`
1712
- * is `true`, it must be an array.
1717
+ * The value to assign to
1718
+ * the option if it does not appear in the arguments to be parsed. The value
1719
+ * must match the type specified by the `type` property. If `multiple` is
1720
+ * `true`, it must be an array. No default value is applied when the option
1721
+ * does appear in the arguments to be parsed, even if the provided value
1722
+ * is falsy.
1713
1723
  * @since v18.11.0
1714
1724
  */
1715
1725
  default?: string | boolean | string[] | boolean[] | undefined;
@@ -1721,7 +1731,7 @@ declare module "util" {
1721
1731
  /**
1722
1732
  * Array of argument strings.
1723
1733
  */
1724
- args?: string[] | undefined;
1734
+ args?: readonly string[] | undefined;
1725
1735
  /**
1726
1736
  * Used to describe arguments known to the parser.
1727
1737
  */