cdk-ecr-deployment 3.0.80 → 3.0.82

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 (64) hide show
  1. package/.jsii +2 -2
  2. package/.jsii.tabl.json +1 -1
  3. package/lib/index.js +3 -3
  4. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  5. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +11 -0
  6. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +15 -1
  7. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +45 -2
  8. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +16 -0
  9. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -3
  10. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +37 -1
  11. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +121 -2
  12. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +248 -1
  13. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +9 -0
  14. package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +4 -4
  15. package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  16. package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +4 -2
  17. package/node_modules/@types/cacheable-request/node_modules/undici-types/fetch.d.ts +2 -1
  18. package/node_modules/@types/cacheable-request/node_modules/undici-types/index.d.ts +7 -1
  19. package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +8 -2
  20. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-interceptor.d.ts +4 -4
  21. package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +1 -1
  22. package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +4 -17
  23. package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +7 -8
  24. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  25. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +11 -0
  26. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +15 -1
  27. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +45 -2
  28. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +16 -0
  29. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -3
  30. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +37 -1
  31. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +121 -2
  32. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +248 -1
  33. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +9 -0
  34. package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +4 -4
  35. package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  36. package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +4 -2
  37. package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +2 -1
  38. package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +7 -1
  39. package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +8 -2
  40. package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +4 -4
  41. package/node_modules/@types/keyv/node_modules/undici-types/package.json +1 -1
  42. package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +4 -17
  43. package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +7 -8
  44. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  45. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +11 -0
  46. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +15 -1
  47. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +45 -2
  48. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +16 -0
  49. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -3
  50. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +37 -1
  51. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +121 -2
  52. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +248 -1
  53. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +9 -0
  54. package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +4 -4
  55. package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  56. package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +4 -2
  57. package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +2 -1
  58. package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +7 -1
  59. package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +8 -2
  60. package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +4 -4
  61. package/node_modules/@types/responselike/node_modules/undici-types/package.json +1 -1
  62. package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +4 -17
  63. package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +7 -8
  64. package/package.json +3 -3
@@ -19,8 +19,8 @@ declare class Dispatcher extends EventEmitter {
19
19
  connect(options: Dispatcher.ConnectOptions): Promise<Dispatcher.ConnectData>;
20
20
  connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
21
21
  /** Compose a chain of dispatchers */
22
- compose(dispatchers: Dispatcher.DispatcherInterceptor[]): Dispatcher.ComposedDispatcher;
23
- compose(...dispatchers: Dispatcher.DispatcherInterceptor[]): Dispatcher.ComposedDispatcher;
22
+ compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
23
+ compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
24
24
  /** Performs an HTTP request. */
25
25
  request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>;
26
26
  request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void;
@@ -97,7 +97,7 @@ declare class Dispatcher extends EventEmitter {
97
97
 
98
98
  declare namespace Dispatcher {
99
99
  export interface ComposedDispatcher extends Dispatcher {}
100
- export type DispatcherInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'];
100
+ export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'];
101
101
  export interface DispatchOptions {
102
102
  origin?: string | URL;
103
103
  path: string;
@@ -217,7 +217,7 @@ declare namespace Dispatcher {
217
217
  export type StreamFactory = (data: StreamFactoryData) => Writable;
218
218
  export interface DispatchHandlers {
219
219
  /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
220
- onConnect?(abort: () => void): void;
220
+ onConnect?(abort: (err?: Error) => void): void;
221
221
  /** Invoked when an error has occurred. */
222
222
  onError?(err: Error): void;
223
223
  /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
@@ -0,0 +1,21 @@
1
+ import Agent from './agent'
2
+ import Dispatcher from './dispatcher'
3
+
4
+ export default EnvHttpProxyAgent
5
+
6
+ declare class EnvHttpProxyAgent extends Dispatcher {
7
+ constructor(opts?: EnvHttpProxyAgent.Options)
8
+
9
+ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
10
+ }
11
+
12
+ declare namespace EnvHttpProxyAgent {
13
+ export interface Options extends Agent.Options {
14
+ /** Overrides the value of the HTTP_PROXY environment variable */
15
+ httpProxy?: string;
16
+ /** Overrides the value of the HTTPS_PROXY environment variable */
17
+ httpsProxy?: string;
18
+ /** Overrides the value of the NO_PROXY environment variable */
19
+ noProxy?: string;
20
+ }
21
+ }
@@ -1,4 +1,5 @@
1
1
  import { MessageEvent, ErrorEvent } from './websocket'
2
+ import Dispatcher from './dispatcher'
2
3
 
3
4
  import {
4
5
  EventTarget,
@@ -50,12 +51,13 @@ interface EventSource extends EventTarget {
50
51
 
51
52
  export declare const EventSource: {
52
53
  prototype: EventSource
53
- new (url: string | URL, init: EventSourceInit): EventSource
54
+ new (url: string | URL, init?: EventSourceInit): EventSource
54
55
  readonly CLOSED: 2
55
56
  readonly CONNECTING: 0
56
57
  readonly OPEN: 1
57
58
  }
58
59
 
59
60
  interface EventSourceInit {
60
- withCredentials?: boolean
61
+ withCredentials?: boolean,
62
+ dispatcher?: Dispatcher
61
63
  }
@@ -85,7 +85,7 @@ export declare class Headers implements SpecIterable<[string, string]> {
85
85
  readonly keys: () => SpecIterableIterator<string>
86
86
  readonly values: () => SpecIterableIterator<string>
87
87
  readonly entries: () => SpecIterableIterator<[string, string]>
88
- readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
88
+ readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]>
89
89
  }
90
90
 
91
91
  export type RequestCache =
@@ -163,6 +163,7 @@ export declare class Request extends BodyMixin {
163
163
  readonly method: string
164
164
  readonly mode: RequestMode
165
165
  readonly redirect: RequestRedirect
166
+ readonly referrer: string
166
167
  readonly referrerPolicy: ReferrerPolicy
167
168
  readonly url: string
168
169
 
@@ -14,6 +14,7 @@ import MockPool from'./mock-pool'
14
14
  import MockAgent from'./mock-agent'
15
15
  import mockErrors from'./mock-errors'
16
16
  import ProxyAgent from'./proxy-agent'
17
+ import EnvHttpProxyAgent from './env-http-proxy-agent'
17
18
  import RetryHandler from'./retry-handler'
18
19
  import RetryAgent from'./retry-agent'
19
20
  import { request, pipeline, stream, connect, upgrade } from './api'
@@ -31,7 +32,7 @@ export * from './content-type'
31
32
  export * from './cache'
32
33
  export { Interceptable } from './mock-interceptor'
33
34
 
34
- export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent }
35
+ export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent }
35
36
  export default Undici
36
37
 
37
38
  declare namespace Undici {
@@ -65,4 +66,9 @@ declare namespace Undici {
65
66
  var File: typeof import('./file').File;
66
67
  var FileReader: typeof import('./filereader').FileReader;
67
68
  var caches: typeof import('./cache').caches;
69
+ var interceptors: {
70
+ dump: typeof import('./interceptors').dump;
71
+ retry: typeof import('./interceptors').retry;
72
+ redirect: typeof import('./interceptors').redirect;
73
+ }
68
74
  }
@@ -1,5 +1,11 @@
1
1
  import Dispatcher from "./dispatcher";
2
+ import RetryHandler from "./retry-handler";
2
3
 
3
- type RedirectInterceptorOpts = { maxRedirections?: number }
4
+ export type DumpInterceptorOpts = { maxSize?: number }
5
+ export type RetryInterceptorOpts = RetryHandler.RetryOptions
6
+ export type RedirectInterceptorOpts = { maxRedirections?: number }
4
7
 
5
- export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor
8
+ export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
9
+ export declare function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
10
+ export declare function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
11
+ export declare function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
@@ -71,11 +71,11 @@ declare namespace MockInterceptor {
71
71
 
72
72
  export interface MockResponseCallbackOptions {
73
73
  path: string;
74
- origin: string;
75
74
  method: string;
76
- body?: BodyInit | Dispatcher.DispatchOptions['body'];
77
- headers: Headers | Record<string, string>;
78
- maxRedirections: number;
75
+ headers?: Headers | Record<string, string>;
76
+ origin?: string;
77
+ body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
78
+ maxRedirections?: number;
79
79
  }
80
80
 
81
81
  export type MockResponseDataHandler<TData extends object = object> = (
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "6.13.0",
3
+ "version": "6.18.2",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
@@ -8,24 +8,11 @@ export namespace util {
8
8
  /**
9
9
  * Receives a header object and returns the parsed value.
10
10
  * @param headers Header object
11
+ * @param obj Object to specify a proxy object. Used to assign parsed values.
12
+ * @returns If `obj` is specified, it is equivalent to `obj`.
11
13
  */
12
14
  export function parseHeaders(
13
- headers:
14
- | Record<string, string | string[]>
15
- | (Buffer | string | (Buffer | string)[])[]
16
- ): Record<string, string | string[]>;
17
- /**
18
- * Receives a header object and returns the parsed value.
19
- * @param headers Header object
20
- * @param obj Object to specify a proxy object. Used to assign parsed values. But, if `headers` is an object, it is not used.
21
- * @returns If `headers` is an object, it is `headers`. Otherwise, if `obj` is specified, it is equivalent to `obj`.
22
- */
23
- export function parseHeaders<
24
- H extends
25
- | Record<string, string | string[]>
26
- | (Buffer | string | (Buffer | string)[])[]
27
- >(
28
- headers: H,
29
- obj?: H extends any[] ? Record<string, string | string[]> : never
15
+ headers: (Buffer | string | (Buffer | string)[])[],
16
+ obj?: Record<string, string | string[]>
30
17
  ): Record<string, string | string[]>;
31
18
  }
@@ -55,7 +55,9 @@ interface WebidlUtil {
55
55
  V: unknown,
56
56
  bitLength: number,
57
57
  signedness: 'signed' | 'unsigned',
58
- opts?: ConvertToIntOpts
58
+ opts?: ConvertToIntOpts,
59
+ prefix: string,
60
+ argument: string
59
61
  ): number
60
62
 
61
63
  /**
@@ -73,14 +75,14 @@ interface WebidlConverters {
73
75
  /**
74
76
  * @see https://webidl.spec.whatwg.org/#es-DOMString
75
77
  */
76
- DOMString (V: unknown, opts?: {
78
+ DOMString (V: unknown, prefix: string, argument: string, opts?: {
77
79
  legacyNullToEmptyString: boolean
78
80
  }): string
79
81
 
80
82
  /**
81
83
  * @see https://webidl.spec.whatwg.org/#es-ByteString
82
84
  */
83
- ByteString (V: unknown): string
85
+ ByteString (V: unknown, prefix: string, argument: string): string
84
86
 
85
87
  /**
86
88
  * @see https://webidl.spec.whatwg.org/#es-USVString
@@ -204,7 +206,7 @@ export interface Webidl {
204
206
  */
205
207
  dictionaryConverter (converters: {
206
208
  key: string,
207
- defaultValue?: unknown,
209
+ defaultValue?: () => unknown,
208
210
  required?: boolean,
209
211
  converter: (...args: unknown[]) => unknown,
210
212
  allowedValues?: unknown[]
@@ -218,8 +220,5 @@ export interface Webidl {
218
220
  converter: Converter<T>
219
221
  ): (V: unknown) => ReturnType<typeof converter> | null
220
222
 
221
- argumentLengthCheck (args: { length: number }, min: number, context: {
222
- header: string
223
- message?: string
224
- }): void
223
+ argumentLengthCheck (args: { length: number }, min: number, context: string): void
225
224
  }
@@ -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: Fri, 02 Aug 2024 11:07:10 GMT
11
+ * Last updated: Wed, 14 Aug 2024 07:35:57 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -170,6 +170,17 @@ declare module "buffer" {
170
170
  * @since v15.7.0, v14.18.0
171
171
  */
172
172
  arrayBuffer(): Promise<ArrayBuffer>;
173
+ /**
174
+ * The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise<Uint8Array>`.
175
+ *
176
+ * ```js
177
+ * const blob = new Blob(['hello']);
178
+ * blob.bytes().then((bytes) => {
179
+ * console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
180
+ * });
181
+ * ```
182
+ */
183
+ bytes(): Promise<Uint8Array>;
173
184
  /**
174
185
  * Creates and returns a new `Blob` containing a subset of this `Blob` objects
175
186
  * data. The original `Blob` is not altered.
@@ -21,6 +21,8 @@ declare module "fs/promises" {
21
21
  Dir,
22
22
  Dirent,
23
23
  GlobOptions,
24
+ GlobOptionsWithFileTypes,
25
+ GlobOptionsWithoutFileTypes,
24
26
  MakeDirectoryOptions,
25
27
  Mode,
26
28
  ObjectEncodingOptions,
@@ -1243,7 +1245,19 @@ declare module "fs/promises" {
1243
1245
  /**
1244
1246
  * Retrieves the files matching the specified pattern.
1245
1247
  */
1246
- function glob(pattern: string | string[], options?: GlobOptions): AsyncIterableIterator<string>;
1248
+ function glob(pattern: string | string[]): AsyncIterableIterator<string>;
1249
+ function glob(
1250
+ pattern: string | string[],
1251
+ opt: GlobOptionsWithFileTypes,
1252
+ ): AsyncIterableIterator<Dirent>;
1253
+ function glob(
1254
+ pattern: string | string[],
1255
+ opt: GlobOptionsWithoutFileTypes,
1256
+ ): AsyncIterableIterator<string>;
1257
+ function glob(
1258
+ pattern: string | string[],
1259
+ opt: GlobOptions,
1260
+ ): AsyncIterableIterator<Dirent> | AsyncIterableIterator<string>;
1247
1261
  }
1248
1262
  declare module "node:fs/promises" {
1249
1263
  export * from "fs/promises";
@@ -4324,6 +4324,18 @@ declare module "fs" {
4324
4324
  * Function to filter out files/directories. Return true to exclude the item, false to include it.
4325
4325
  */
4326
4326
  exclude?: ((fileName: string) => boolean) | undefined;
4327
+ /**
4328
+ * `true` if the glob should return paths as `Dirent`s, `false` otherwise.
4329
+ * @default false
4330
+ * @since v22.2.0
4331
+ */
4332
+ withFileTypes?: boolean | undefined;
4333
+ }
4334
+ export interface GlobOptionsWithFileTypes extends GlobOptions {
4335
+ withFileTypes: true;
4336
+ }
4337
+ export interface GlobOptionsWithoutFileTypes extends GlobOptions {
4338
+ withFileTypes?: false | undefined;
4327
4339
  }
4328
4340
  /**
4329
4341
  * Retrieves the files matching the specified pattern.
@@ -4332,15 +4344,46 @@ declare module "fs" {
4332
4344
  pattern: string | string[],
4333
4345
  callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
4334
4346
  ): void;
4347
+ export function glob(
4348
+ pattern: string | string[],
4349
+ options: GlobOptionsWithFileTypes,
4350
+ callback: (
4351
+ err: NodeJS.ErrnoException | null,
4352
+ matches: Dirent[],
4353
+ ) => void,
4354
+ ): void;
4355
+ export function glob(
4356
+ pattern: string | string[],
4357
+ options: GlobOptionsWithoutFileTypes,
4358
+ callback: (
4359
+ err: NodeJS.ErrnoException | null,
4360
+ matches: string[],
4361
+ ) => void,
4362
+ ): void;
4335
4363
  export function glob(
4336
4364
  pattern: string | string[],
4337
4365
  options: GlobOptions,
4338
- callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
4366
+ callback: (
4367
+ err: NodeJS.ErrnoException | null,
4368
+ matches: Dirent[] | string[],
4369
+ ) => void,
4339
4370
  ): void;
4340
4371
  /**
4341
4372
  * Retrieves the files matching the specified pattern.
4342
4373
  */
4343
- export function globSync(pattern: string | string[], options?: GlobOptions): string[];
4374
+ export function globSync(pattern: string | string[]): string[];
4375
+ export function globSync(
4376
+ pattern: string | string[],
4377
+ options: GlobOptionsWithFileTypes,
4378
+ ): Dirent[];
4379
+ export function globSync(
4380
+ pattern: string | string[],
4381
+ options: GlobOptionsWithoutFileTypes,
4382
+ ): string[];
4383
+ export function globSync(
4384
+ pattern: string | string[],
4385
+ options: GlobOptions,
4386
+ ): Dirent[] | string[];
4344
4387
  }
4345
4388
  declare module "node:fs" {
4346
4389
  export * from "fs";
@@ -7,12 +7,14 @@ type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undi
7
7
  type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
8
8
  type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
9
9
  type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
10
+ type _MessageEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").MessageEvent;
10
11
  type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
11
12
  : import("undici-types").RequestInit;
12
13
  type _ResponseInit = typeof globalThis extends { onmessage: any } ? {}
13
14
  : import("undici-types").ResponseInit;
14
15
  type _File = typeof globalThis extends { onmessage: any } ? {} : import("node:buffer").File;
15
16
  type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").WebSocket;
17
+ type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").EventSource;
16
18
  // #endregion Fetch and friends
17
19
 
18
20
  declare global {
@@ -404,6 +406,13 @@ declare global {
404
406
  } ? T
405
407
  : typeof import("undici-types").Headers;
406
408
 
409
+ interface MessageEvent extends _MessageEvent {}
410
+ var MessageEvent: typeof globalThis extends {
411
+ onmessage: any;
412
+ MessageEvent: infer T;
413
+ } ? T
414
+ : typeof import("undici-types").MessageEvent;
415
+
407
416
  interface File extends _File {}
408
417
  var File: typeof globalThis extends {
409
418
  onmessage: any;
@@ -414,4 +423,11 @@ declare global {
414
423
  interface WebSocket extends _WebSocket {}
415
424
  var WebSocket: typeof globalThis extends { onmessage: any; WebSocket: infer T } ? T
416
425
  : typeof import("undici-types").WebSocket;
426
+
427
+ interface EventSource extends _EventSource {}
428
+ /**
429
+ * Only available through the [--experimental-eventsource](https://nodejs.org/api/cli.html#--experimental-eventsource) flag.
430
+ */
431
+ var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T
432
+ : typeof import("undici-types").EventSource;
417
433
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.1.0",
3
+ "version": "22.3.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -210,8 +210,8 @@
210
210
  },
211
211
  "scripts": {},
212
212
  "dependencies": {
213
- "undici-types": "~6.13.0"
213
+ "undici-types": "~6.18.2"
214
214
  },
215
- "typesPublisherContentHash": "a016324027de394c0877c1d44c03999bacaa45ed9b7249649d03dd6b9bfe4e5b",
215
+ "typesPublisherContentHash": "620b8a407d4118e9931ab6e01ed7af87ce13d63daa46a4098fca6d43eaf853db",
216
216
  "typeScriptVersion": "4.8"
217
217
  }
@@ -31,7 +31,17 @@
31
31
  */
32
32
  declare module "perf_hooks" {
33
33
  import { AsyncResource } from "node:async_hooks";
34
- type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns" | "net";
34
+ type EntryType =
35
+ | "dns" // Node.js only
36
+ | "function" // Node.js only
37
+ | "gc" // Node.js only
38
+ | "http2" // Node.js only
39
+ | "http" // Node.js only
40
+ | "mark" // available on the Web
41
+ | "measure" // available on the Web
42
+ | "net" // Node.js only
43
+ | "node" // Node.js only
44
+ | "resource"; // available on the Web
35
45
  interface NodeGCPerformanceDetail {
36
46
  /**
37
47
  * When `performanceEntry.entryType` is equal to 'gc', the `performance.kind` property identifies
@@ -114,6 +124,7 @@ declare module "perf_hooks" {
114
124
  * @since v8.5.0
115
125
  */
116
126
  class PerformanceNodeTiming extends PerformanceEntry {
127
+ readonly entryType: "node";
117
128
  /**
118
129
  * The high resolution millisecond timestamp at which the Node.js process
119
130
  * completed bootstrapping. If bootstrapping has not yet finished, the property
@@ -270,6 +281,30 @@ declare module "perf_hooks" {
270
281
  * @param name
271
282
  */
272
283
  mark(name: string, options?: MarkOptions): PerformanceMark;
284
+ /**
285
+ * Creates a new `PerformanceResourceTiming` entry in the Resource Timeline.
286
+ * A `PerformanceResourceTiming` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'resource'`.
287
+ * Performance resources are used to mark moments in the Resource Timeline.
288
+ * @param timingInfo [Fetch Timing Info](https://fetch.spec.whatwg.org/#fetch-timing-info)
289
+ * @param requestedUrl The resource url
290
+ * @param initiatorType The initiator name, e.g: 'fetch'
291
+ * @param global
292
+ * @param cacheMode The cache mode must be an empty string ('') or 'local'
293
+ * @param bodyInfo [Fetch Response Body Info](https://fetch.spec.whatwg.org/#response-body-info)
294
+ * @param responseStatus The response's status code
295
+ * @param deliveryType The delivery type. Default: ''.
296
+ * @since v18.2.0, v16.17.0
297
+ */
298
+ markResourceTiming(
299
+ timingInfo: object,
300
+ requestedUrl: string,
301
+ initiatorType: string,
302
+ global: object,
303
+ cacheMode: "" | "local",
304
+ bodyInfo: object,
305
+ responseStatus: number,
306
+ deliveryType?: string,
307
+ ): PerformanceResourceTiming;
273
308
  /**
274
309
  * Creates a new PerformanceMeasure entry in the Performance Timeline.
275
310
  * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
@@ -543,6 +578,7 @@ declare module "perf_hooks" {
543
578
  * @since v18.2.0, v16.17.0
544
579
  */
545
580
  class PerformanceResourceTiming extends PerformanceEntry {
581
+ readonly entryType: "resource";
546
582
  protected constructor();
547
583
  /**
548
584
  * The high resolution millisecond timestamp at immediately before dispatching the `fetch`
@@ -1,8 +1,121 @@
1
1
  declare module "process" {
2
- import * as net from "node:net";
3
- import * as os from "node:os";
4
2
  import * as tty from "node:tty";
5
3
  import { Worker } from "node:worker_threads";
4
+
5
+ interface BuiltInModule {
6
+ "assert": typeof import("assert");
7
+ "node:assert": typeof import("node:assert");
8
+ "assert/strict": typeof import("assert/strict");
9
+ "node:assert/strict": typeof import("node:assert/strict");
10
+ "async_hooks": typeof import("async_hooks");
11
+ "node:async_hooks": typeof import("node:async_hooks");
12
+ "buffer": typeof import("buffer");
13
+ "node:buffer": typeof import("node:buffer");
14
+ "child_process": typeof import("child_process");
15
+ "node:child_process": typeof import("node:child_process");
16
+ "cluster": typeof import("cluster");
17
+ "node:cluster": typeof import("node:cluster");
18
+ "console": typeof import("console");
19
+ "node:console": typeof import("node:console");
20
+ "constants": typeof import("constants");
21
+ "node:constants": typeof import("node:constants");
22
+ "crypto": typeof import("crypto");
23
+ "node:crypto": typeof import("node:crypto");
24
+ "dgram": typeof import("dgram");
25
+ "node:dgram": typeof import("node:dgram");
26
+ "diagnostics_channel": typeof import("diagnostics_channel");
27
+ "node:diagnostics_channel": typeof import("node:diagnostics_channel");
28
+ "dns": typeof import("dns");
29
+ "node:dns": typeof import("node:dns");
30
+ "dns/promises": typeof import("dns/promises");
31
+ "node:dns/promises": typeof import("node:dns/promises");
32
+ "domain": typeof import("domain");
33
+ "node:domain": typeof import("node:domain");
34
+ "events": typeof import("events");
35
+ "node:events": typeof import("node:events");
36
+ "fs": typeof import("fs");
37
+ "node:fs": typeof import("node:fs");
38
+ "fs/promises": typeof import("fs/promises");
39
+ "node:fs/promises": typeof import("node:fs/promises");
40
+ "http": typeof import("http");
41
+ "node:http": typeof import("node:http");
42
+ "http2": typeof import("http2");
43
+ "node:http2": typeof import("node:http2");
44
+ "https": typeof import("https");
45
+ "node:https": typeof import("node:https");
46
+ "inspector": typeof import("inspector");
47
+ "node:inspector": typeof import("node:inspector");
48
+ // FIXME: module is missed
49
+ // "inspector/promises": typeof import("inspector/promises");
50
+ // "node:inspector/promises": typeof import("node:inspector/promises");
51
+ "module": typeof import("module");
52
+ "node:module": typeof import("node:module");
53
+ "net": typeof import("net");
54
+ "node:net": typeof import("node:net");
55
+ "os": typeof import("os");
56
+ "node:os": typeof import("node:os");
57
+ "path": typeof import("path");
58
+ "node:path": typeof import("node:path");
59
+ "path/posix": typeof import("path/posix");
60
+ "node:path/posix": typeof import("node:path/posix");
61
+ "path/win32": typeof import("path/win32");
62
+ "node:path/win32": typeof import("node:path/win32");
63
+ "perf_hooks": typeof import("perf_hooks");
64
+ "node:perf_hooks": typeof import("node:perf_hooks");
65
+ "process": typeof import("process");
66
+ "node:process": typeof import("node:process");
67
+ "punycode": typeof import("punycode");
68
+ "node:punycode": typeof import("node:punycode");
69
+ "querystring": typeof import("querystring");
70
+ "node:querystring": typeof import("node:querystring");
71
+ "readline": typeof import("readline");
72
+ "node:readline": typeof import("node:readline");
73
+ "readline/promises": typeof import("readline/promises");
74
+ "node:readline/promises": typeof import("node:readline/promises");
75
+ "repl": typeof import("repl");
76
+ "node:repl": typeof import("node:repl");
77
+ "node:sea": typeof import("node:sea");
78
+ "stream": typeof import("stream");
79
+ "node:stream": typeof import("node:stream");
80
+ "stream/consumers": typeof import("stream/consumers");
81
+ "node:stream/consumers": typeof import("node:stream/consumers");
82
+ "stream/promises": typeof import("stream/promises");
83
+ "node:stream/promises": typeof import("node:stream/promises");
84
+ "stream/web": typeof import("stream/web");
85
+ "node:stream/web": typeof import("node:stream/web");
86
+ "string_decoder": typeof import("string_decoder");
87
+ "node:string_decoder": typeof import("node:string_decoder");
88
+ "node:test": typeof import("node:test");
89
+ "node:test/reporters": typeof import("node:test/reporters");
90
+ "timers": typeof import("timers");
91
+ "node:timers": typeof import("node:timers");
92
+ "timers/promises": typeof import("timers/promises");
93
+ "node:timers/promises": typeof import("node:timers/promises");
94
+ "tls": typeof import("tls");
95
+ "node:tls": typeof import("node:tls");
96
+ "trace_events": typeof import("trace_events");
97
+ "node:trace_events": typeof import("node:trace_events");
98
+ "tty": typeof import("tty");
99
+ "node:tty": typeof import("node:tty");
100
+ "url": typeof import("url");
101
+ "node:url": typeof import("node:url");
102
+ "util": typeof import("util");
103
+ "node:util": typeof import("node:util");
104
+ "sys": typeof import("util");
105
+ "node:sys": typeof import("node:util");
106
+ "util/types": typeof import("util/types");
107
+ "node:util/types": typeof import("node:util/types");
108
+ "v8": typeof import("v8");
109
+ "node:v8": typeof import("node:v8");
110
+ "vm": typeof import("vm");
111
+ "node:vm": typeof import("node:vm");
112
+ "wasi": typeof import("wasi");
113
+ "node:wasi": typeof import("node:wasi");
114
+ "worker_threads": typeof import("worker_threads");
115
+ "node:worker_threads": typeof import("node:worker_threads");
116
+ "zlib": typeof import("zlib");
117
+ "node:zlib": typeof import("node:zlib");
118
+ }
6
119
  global {
7
120
  var process: NodeJS.Process;
8
121
  namespace NodeJS {
@@ -793,6 +906,12 @@ declare module "process" {
793
906
  * @since v17.3.0, v16.14.0
794
907
  */
795
908
  getActiveResourcesInfo(): string[];
909
+ /**
910
+ * Provides a way to load built-in modules in a globally available function.
911
+ * @param id ID of the built-in module being requested.
912
+ */
913
+ getBuiltinModule<ID extends keyof BuiltInModule>(id: ID): BuiltInModule[ID];
914
+ getBuiltinModule(id: string): object | undefined;
796
915
  /**
797
916
  * The `process.getgid()` method returns the numerical group identity of the
798
917
  * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)