aws-delivlib 15.0.2 → 15.0.3

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.
@@ -1,77 +1,50 @@
1
- export {}; // Don't export anything!
1
+ // Make this a module
2
+ export {};
2
3
 
3
- //// DOM-like Events
4
- // NB: The Event / EventTarget / EventListener implementations below were copied
5
- // from lib.dom.d.ts, then edited to reflect Node's documentation at
6
- // https://nodejs.org/api/events.html#class-eventtarget.
7
- // Please read that link to understand important implementation differences.
4
+ // Conditional type aliases, which are later merged into the global scope.
5
+ // Will either be empty if the relevant web library is already present, or the @types/node definition otherwise.
8
6
 
9
- // This conditional type will be the existing global Event in a browser, or
10
- // the copy below in a Node environment.
11
- type __Event = typeof globalThis extends { onmessage: any; Event: any } ? {}
12
- : {
13
- /** This is not used in Node.js and is provided purely for completeness. */
14
- readonly bubbles: boolean;
15
- /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
16
- cancelBubble: () => void;
17
- /** True if the event was created with the cancelable option */
18
- readonly cancelable: boolean;
19
- /** This is not used in Node.js and is provided purely for completeness. */
20
- readonly composed: boolean;
21
- /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
22
- composedPath(): [EventTarget?];
23
- /** Alias for event.target. */
24
- readonly currentTarget: EventTarget | null;
25
- /** Is true if cancelable is true and event.preventDefault() has been called. */
26
- readonly defaultPrevented: boolean;
27
- /** This is not used in Node.js and is provided purely for completeness. */
28
- readonly eventPhase: 0 | 2;
29
- /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
30
- readonly isTrusted: boolean;
31
- /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
32
- preventDefault(): void;
33
- /** This is not used in Node.js and is provided purely for completeness. */
34
- returnValue: boolean;
35
- /** Alias for event.target. */
36
- readonly srcElement: EventTarget | null;
37
- /** Stops the invocation of event listeners after the current one completes. */
38
- stopImmediatePropagation(): void;
39
- /** This is not used in Node.js and is provided purely for completeness. */
40
- stopPropagation(): void;
41
- /** The `EventTarget` dispatching the event */
42
- readonly target: EventTarget | null;
43
- /** The millisecond timestamp when the Event object was created. */
44
- readonly timeStamp: number;
45
- /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
46
- readonly type: string;
47
- };
7
+ type __Event = typeof globalThis extends { onmessage: any } ? {} : Event;
8
+ interface Event {
9
+ readonly bubbles: boolean;
10
+ cancelBubble: boolean;
11
+ readonly cancelable: boolean;
12
+ readonly composed: boolean;
13
+ composedPath(): [EventTarget?];
14
+ readonly currentTarget: EventTarget | null;
15
+ readonly defaultPrevented: boolean;
16
+ readonly eventPhase: 0 | 2;
17
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
18
+ readonly isTrusted: boolean;
19
+ preventDefault(): void;
20
+ readonly returnValue: boolean;
21
+ readonly srcElement: EventTarget | null;
22
+ stopImmediatePropagation(): void;
23
+ stopPropagation(): void;
24
+ readonly target: EventTarget | null;
25
+ readonly timeStamp: number;
26
+ readonly type: string;
27
+ }
48
28
 
49
- // See comment above explaining conditional type
50
- type __EventTarget = typeof globalThis extends { onmessage: any; EventTarget: any } ? {}
51
- : {
52
- /**
53
- * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
54
- *
55
- * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
56
- *
57
- * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
58
- * Specifically, the `capture` option is used as part of the key when registering a `listener`.
59
- * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
60
- */
61
- addEventListener(
62
- type: string,
63
- listener: EventListener | EventListenerObject,
64
- options?: AddEventListenerOptions | boolean,
65
- ): void;
66
- /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
67
- dispatchEvent(event: Event): boolean;
68
- /** Removes the event listener in target's event listener list with the same type, callback, and options. */
69
- removeEventListener(
70
- type: string,
71
- listener: EventListener | EventListenerObject,
72
- options?: EventListenerOptions | boolean,
73
- ): void;
74
- };
29
+ type __CustomEvent<T = any> = typeof globalThis extends { onmessage: any } ? {} : CustomEvent<T>;
30
+ interface CustomEvent<T = any> extends Event {
31
+ readonly detail: T;
32
+ }
33
+
34
+ type __EventTarget = typeof globalThis extends { onmessage: any } ? {} : EventTarget;
35
+ interface EventTarget {
36
+ addEventListener(
37
+ type: string,
38
+ listener: EventListener | EventListenerObject,
39
+ options?: AddEventListenerOptions | boolean,
40
+ ): void;
41
+ dispatchEvent(event: Event): boolean;
42
+ removeEventListener(
43
+ type: string,
44
+ listener: EventListener | EventListenerObject,
45
+ options?: EventListenerOptions | boolean,
46
+ ): void;
47
+ }
75
48
 
76
49
  interface EventInit {
77
50
  bubbles?: boolean;
@@ -79,17 +52,17 @@ interface EventInit {
79
52
  composed?: boolean;
80
53
  }
81
54
 
55
+ interface CustomEventInit<T = any> extends EventInit {
56
+ detail?: T;
57
+ }
58
+
82
59
  interface EventListenerOptions {
83
- /** Not directly used by Node.js. Added for API completeness. Default: `false`. */
84
60
  capture?: boolean;
85
61
  }
86
62
 
87
63
  interface AddEventListenerOptions extends EventListenerOptions {
88
- /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
89
64
  once?: boolean;
90
- /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
91
65
  passive?: boolean;
92
- /** The listener will be removed when the given AbortSignal object's `abort()` method is called. */
93
66
  signal?: AbortSignal;
94
67
  }
95
68
 
@@ -101,24 +74,26 @@ interface EventListenerObject {
101
74
  handleEvent(object: Event): void;
102
75
  }
103
76
 
104
- import {} from "events"; // Make this an ambient declaration
77
+ // Merge conditional interfaces into global scope, and conditionally declare global constructors.
105
78
  declare global {
106
- /** An event which takes place in the DOM. */
107
79
  interface Event extends __Event {}
108
80
  var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
109
81
  : {
110
- prototype: __Event;
111
- new(type: string, eventInitDict?: EventInit): __Event;
82
+ prototype: Event;
83
+ new(type: string, eventInitDict?: EventInit): Event;
84
+ };
85
+
86
+ interface CustomEvent<T = any> extends __CustomEvent<T> {}
87
+ var CustomEvent: typeof globalThis extends { onmessage: any; CustomEvent: infer T } ? T
88
+ : {
89
+ prototype: CustomEvent;
90
+ new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
112
91
  };
113
92
 
114
- /**
115
- * EventTarget is a DOM interface implemented by objects that can
116
- * receive events and may have listeners for them.
117
- */
118
93
  interface EventTarget extends __EventTarget {}
119
94
  var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
120
95
  : {
121
- prototype: __EventTarget;
122
- new(): __EventTarget;
96
+ prototype: EventTarget;
97
+ new(): EventTarget;
123
98
  };
124
99
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.23",
3
+ "version": "22.15.24",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.21.0"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "3844c0b84003a1c9382712245a57b4124212f8132db577606add964efd038ea4",
223
+ "typesPublisherContentHash": "6f7f89960f322a2c8f03b6e218fbe161037b484003d22ccf2cec6c358735b527",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  "@typescript-eslint/eslint-plugin": "^8",
54
54
  "@typescript-eslint/parser": "^8",
55
55
  "adm-zip": "^0.5.16",
56
- "aws-cdk": "2.1016.1",
56
+ "aws-cdk": "2.1017.0",
57
57
  "aws-cdk-lib": "2.187.0",
58
58
  "commit-and-tag-version": "^12",
59
59
  "constructs": "10.1.31",
@@ -97,7 +97,7 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "version": "15.0.2",
100
+ "version": "15.0.3",
101
101
  "jest": {
102
102
  "coverageProvider": "v8",
103
103
  "testMatch": [