@openclaw/slack 2026.10.5-beta.1 → 2026.10.5-beta.2

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 (108) hide show
  1. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/package.json +4 -4
  2. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts.map +1 -1
  3. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +9 -17
  4. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js.map +1 -1
  5. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/package.json +4 -4
  6. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +2 -2
  7. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +2 -2
  8. package/node_modules/@slack/bolt/node_modules/@types/node/dgram.d.ts +1 -1
  9. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -17
  10. package/node_modules/@slack/bolt/node_modules/@types/node/zlib.d.ts +6 -0
  11. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  12. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +2 -2
  13. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +1 -1
  14. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  15. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +6 -0
  16. package/package.json +4 -4
  17. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/LICENSE +0 -21
  18. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/README.md +0 -15
  19. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/assert/strict.d.ts +0 -68
  20. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +0 -1077
  21. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +0 -711
  22. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  23. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +0 -1800
  24. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +0 -1361
  25. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +0 -432
  26. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +0 -93
  27. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/constants.d.ts +0 -14
  28. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +0 -3964
  29. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +0 -652
  30. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +0 -794
  31. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +0 -497
  32. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +0 -876
  33. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +0 -150
  34. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +0 -1008
  35. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ffi.d.ts +0 -500
  36. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +0 -1477
  37. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +0 -4803
  38. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +0 -150
  39. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/globals.typedarray.d.ts +0 -101
  40. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +0 -2218
  41. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +0 -2498
  42. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +0 -400
  43. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +0 -116
  44. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/inspector/promises.d.ts +0 -35
  45. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +0 -265
  46. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/inspector.generated.d.ts +0 -4406
  47. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +0 -726
  48. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +0 -1074
  49. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +0 -498
  50. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/package.json +0 -155
  51. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/path/posix.d.ts +0 -8
  52. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/path/win32.d.ts +0 -8
  53. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +0 -178
  54. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +0 -617
  55. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +0 -2269
  56. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +0 -89
  57. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +0 -139
  58. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/quic.d.ts +0 -2191
  59. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +0 -158
  60. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +0 -508
  61. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +0 -420
  62. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/sea.d.ts +0 -47
  63. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/sqlite.d.ts +0 -1140
  64. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/consumers.d.ts +0 -114
  65. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/iter.d.ts +0 -449
  66. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +0 -211
  67. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +0 -320
  68. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +0 -1806
  69. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +0 -27
  70. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/test/reporters.d.ts +0 -60
  71. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +0 -2558
  72. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +0 -93
  73. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +0 -149
  74. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +0 -1232
  75. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +0 -103
  76. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -467
  77. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  78. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
  79. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/index.d.ts +0 -118
  80. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  81. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.7/index.d.ts +0 -118
  82. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +0 -226
  83. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +0 -556
  84. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/util/types.d.ts +0 -558
  85. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +0 -1677
  86. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +0 -1059
  87. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/vfs.d.ts +0 -211
  88. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +0 -1137
  89. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +0 -131
  90. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
  91. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/blob.d.ts +0 -23
  92. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/console.d.ts +0 -9
  93. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
  94. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/domexception.d.ts +0 -83
  95. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
  96. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/events.d.ts +0 -106
  97. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
  98. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
  99. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
  100. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
  101. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/performance.d.ts +0 -45
  102. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  103. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/streams.d.ts +0 -119
  104. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/timers.d.ts +0 -44
  105. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/url.d.ts +0 -24
  106. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +0 -672
  107. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/zlib/iter.d.ts +0 -131
  108. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +0 -606
@@ -1,617 +0,0 @@
1
- declare module "node:perf_hooks" {
2
- import { InternalEventTargetEventProperties } from "node:events";
3
- // #region web types
4
- type EntryType =
5
- | "dns" // Node.js only
6
- | "function" // Node.js only
7
- | "gc" // Node.js only
8
- | "http2" // Node.js only
9
- | "http" // Node.js only
10
- | "mark" // available on the Web
11
- | "measure" // available on the Web
12
- | "net" // Node.js only
13
- | "node" // Node.js only
14
- | "quic" // Node.js only
15
- | "resource"; // available on the Web
16
- interface ConnectionTimingInfo {
17
- domainLookupStartTime: number;
18
- domainLookupEndTime: number;
19
- connectionStartTime: number;
20
- connectionEndTime: number;
21
- secureConnectionStartTime: number;
22
- ALPNNegotiatedProtocol: string;
23
- }
24
- interface FetchTimingInfo {
25
- startTime: number;
26
- redirectStartTime: number;
27
- redirectEndTime: number;
28
- postRedirectStartTime: number;
29
- finalServiceWorkerStartTime: number;
30
- finalNetworkRequestStartTime: number;
31
- finalNetworkResponseStartTime: number;
32
- endTime: number;
33
- finalConnectionTimingInfo: ConnectionTimingInfo | null;
34
- encodedBodySize: number;
35
- decodedBodySize: number;
36
- }
37
- type PerformanceEntryList = PerformanceEntry[];
38
- interface PerformanceMarkOptions {
39
- detail?: any;
40
- startTime?: number;
41
- }
42
- interface PerformanceMeasureOptions {
43
- detail?: any;
44
- duration?: number;
45
- end?: string | number;
46
- start?: string | number;
47
- }
48
- interface PerformanceObserverCallback {
49
- (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
50
- }
51
- interface PerformanceObserverInit {
52
- buffered?: boolean;
53
- entryTypes?: EntryType[];
54
- type?: EntryType;
55
- }
56
- interface PerformanceEventMap {
57
- "resourcetimingbufferfull": Event;
58
- }
59
- interface Performance extends EventTarget, InternalEventTargetEventProperties<PerformanceEventMap> {
60
- readonly nodeTiming: PerformanceNodeTiming;
61
- readonly timeOrigin: number;
62
- clearMarks(markName?: string): void;
63
- clearMeasures(measureName?: string): void;
64
- clearResourceTimings(resourceTimingName?: string): void;
65
- getEntries(): PerformanceEntryList;
66
- getEntriesByName(name: string, type?: EntryType): PerformanceEntryList;
67
- getEntriesByType(type: EntryType): PerformanceEntryList;
68
- mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
69
- markResourceTiming(
70
- timingInfo: FetchTimingInfo,
71
- requestedUrl: string,
72
- initiatorType: string,
73
- global: unknown,
74
- cacheMode: string,
75
- bodyInfo: unknown,
76
- responseStatus: number,
77
- deliveryType?: string,
78
- ): PerformanceResourceTiming;
79
- measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure;
80
- measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
81
- now(): number;
82
- setResourceTimingBufferSize(maxSize: number): void;
83
- toJSON(): any;
84
- addEventListener<K extends keyof PerformanceEventMap>(
85
- type: K,
86
- listener: (ev: PerformanceEventMap[K]) => void,
87
- options?: AddEventListenerOptions | boolean,
88
- ): void;
89
- addEventListener(
90
- type: string,
91
- listener: EventListener | EventListenerObject,
92
- options?: AddEventListenerOptions | boolean,
93
- ): void;
94
- removeEventListener<K extends keyof PerformanceEventMap>(
95
- type: K,
96
- listener: (ev: PerformanceEventMap[K]) => void,
97
- options?: EventListenerOptions | boolean,
98
- ): void;
99
- removeEventListener(
100
- type: string,
101
- listener: EventListener | EventListenerObject,
102
- options?: EventListenerOptions | boolean,
103
- ): void;
104
- /**
105
- * This is an alias of `perf_hooks.eventLoopUtilization()`.
106
- *
107
- * _This property is an extension by Node.js. It is not available in Web browsers._
108
- * @since v14.10.0, v12.19.0
109
- * @param utilization1 The result of a previous call to
110
- * `eventLoopUtilization()`.
111
- * @param utilization2 The result of a previous call to
112
- * `eventLoopUtilization()` prior to `utilization1`.
113
- */
114
- eventLoopUtilization(
115
- utilization1?: EventLoopUtilization,
116
- utilization2?: EventLoopUtilization,
117
- ): EventLoopUtilization;
118
- /**
119
- * This is an alias of `perf_hooks.timerify()`.
120
- *
121
- * _This property is an extension by Node.js. It is not available in Web browsers._
122
- * @since v8.5.0
123
- */
124
- timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
125
- }
126
- var Performance: {
127
- prototype: Performance;
128
- new(): Performance;
129
- };
130
- interface PerformanceEntry {
131
- readonly duration: number;
132
- readonly entryType: EntryType;
133
- readonly name: string;
134
- readonly startTime: number;
135
- toJSON(): any;
136
- }
137
- var PerformanceEntry: {
138
- prototype: PerformanceEntry;
139
- new(): PerformanceEntry;
140
- };
141
- interface PerformanceMark extends PerformanceEntry {
142
- readonly detail: any;
143
- readonly entryType: "mark";
144
- }
145
- var PerformanceMark: {
146
- prototype: PerformanceMark;
147
- new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
148
- };
149
- interface PerformanceMeasure extends PerformanceEntry {
150
- readonly detail: any;
151
- readonly entryType: "measure";
152
- }
153
- var PerformanceMeasure: {
154
- prototype: PerformanceMeasure;
155
- new(): PerformanceMeasure;
156
- };
157
- interface PerformanceObserver {
158
- disconnect(): void;
159
- observe(options: PerformanceObserverInit): void;
160
- takeRecords(): PerformanceEntryList;
161
- }
162
- var PerformanceObserver: {
163
- prototype: PerformanceObserver;
164
- new(callback: PerformanceObserverCallback): PerformanceObserver;
165
- readonly supportedEntryTypes: readonly EntryType[];
166
- };
167
- interface PerformanceObserverEntryList {
168
- getEntries(): PerformanceEntryList;
169
- getEntriesByName(name: string, type?: EntryType): PerformanceEntryList;
170
- getEntriesByType(type: EntryType): PerformanceEntryList;
171
- }
172
- var PerformanceObserverEntryList: {
173
- prototype: PerformanceObserverEntryList;
174
- new(): PerformanceObserverEntryList;
175
- };
176
- interface PerformanceResourceTiming extends PerformanceEntry {
177
- readonly connectEnd: number;
178
- readonly connectStart: number;
179
- readonly decodedBodySize: number;
180
- readonly domainLookupEnd: number;
181
- readonly domainLookupStart: number;
182
- readonly encodedBodySize: number;
183
- readonly entryType: "resource";
184
- readonly fetchStart: number;
185
- readonly initiatorType: string;
186
- readonly nextHopProtocol: string;
187
- readonly redirectEnd: number;
188
- readonly redirectStart: number;
189
- readonly requestStart: number;
190
- readonly responseEnd: number;
191
- readonly responseStart: number;
192
- readonly responseStatus: number;
193
- readonly secureConnectionStart: number;
194
- readonly transferSize: number;
195
- readonly workerStart: number;
196
- toJSON(): any;
197
- }
198
- var PerformanceResourceTiming: {
199
- prototype: PerformanceResourceTiming;
200
- new(): PerformanceResourceTiming;
201
- };
202
- var performance: Performance;
203
- // #endregion
204
- /**
205
- * _This class is an extension by Node.js. It is not available in Web browsers._
206
- *
207
- * Provides detailed Node.js timing data.
208
- *
209
- * The constructor of this class is not exposed to users directly.
210
- * @since v19.0.0
211
- */
212
- class PerformanceNodeEntry extends PerformanceEntry {
213
- /**
214
- * Additional detail specific to the `entryType`.
215
- * @since v16.0.0
216
- */
217
- readonly detail: any;
218
- readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node" | "quic";
219
- }
220
- interface UVMetrics {
221
- /**
222
- * Number of event loop iterations.
223
- */
224
- readonly loopCount: number;
225
- /**
226
- * Number of events that have been processed by the event handler.
227
- */
228
- readonly events: number;
229
- /**
230
- * Number of events that were waiting to be processed when the event provider was called.
231
- */
232
- readonly eventsWaiting: number;
233
- }
234
- /**
235
- * _This property is an extension by Node.js. It is not available in Web browsers._
236
- *
237
- * Provides timing details for Node.js itself. The constructor of this class
238
- * is not exposed to users.
239
- * @since v8.5.0
240
- */
241
- interface PerformanceNodeTiming extends PerformanceEntry {
242
- /**
243
- * The high resolution millisecond timestamp at which the Node.js process
244
- * completed bootstrapping. If bootstrapping has not yet finished, the property
245
- * has the value of -1.
246
- * @since v8.5.0
247
- */
248
- readonly bootstrapComplete: number;
249
- readonly entryType: "node";
250
- /**
251
- * The high resolution millisecond timestamp at which the Node.js environment was
252
- * initialized.
253
- * @since v8.5.0
254
- */
255
- readonly environment: number;
256
- /**
257
- * The high resolution millisecond timestamp of the amount of time the event loop
258
- * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
259
- * does not take CPU usage into consideration. If the event loop has not yet
260
- * started (e.g., in the first tick of the main script), the property has the
261
- * value of 0.
262
- * @since v14.10.0, v12.19.0
263
- */
264
- readonly idleTime: number;
265
- /**
266
- * The high resolution millisecond timestamp at which the Node.js event loop
267
- * exited. If the event loop has not yet exited, the property has the value of -1\.
268
- * It can only have a value of not -1 in a handler of the `'exit'` event.
269
- * @since v8.5.0
270
- */
271
- readonly loopExit: number;
272
- /**
273
- * The high resolution millisecond timestamp at which the Node.js event loop
274
- * started. If the event loop has not yet started (e.g., in the first tick of the
275
- * main script), the property has the value of -1.
276
- * @since v8.5.0
277
- */
278
- readonly loopStart: number;
279
- /**
280
- * The high resolution millisecond timestamp at which the Node.js process was initialized.
281
- * @since v8.5.0
282
- */
283
- readonly nodeStart: number;
284
- /**
285
- * This is a wrapper to the `uv_metrics_info` function.
286
- * It returns the current set of event loop metrics.
287
- *
288
- * It is recommended to use this property inside a function whose execution was
289
- * scheduled using `setImmediate` to avoid collecting metrics before finishing all
290
- * operations scheduled during the current loop iteration.
291
- * @since v22.8.0, v20.18.0
292
- */
293
- readonly uvMetricsInfo: UVMetrics;
294
- /**
295
- * The high resolution millisecond timestamp at which the V8 platform was
296
- * initialized.
297
- * @since v8.5.0
298
- */
299
- readonly v8Start: number;
300
- }
301
- namespace constants {
302
- const NODE_PERFORMANCE_GC_MAJOR: number;
303
- const NODE_PERFORMANCE_GC_MINOR: number;
304
- const NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP: number;
305
- const NODE_PERFORMANCE_GC_INCREMENTAL: number;
306
- const NODE_PERFORMANCE_GC_WEAKCB: number;
307
- const NODE_PERFORMANCE_GC_FLAGS_NO: number;
308
- const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
309
- const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
310
- const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
311
- const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
312
- const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
313
- const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
314
- }
315
- interface EventLoopMonitorOptions {
316
- /**
317
- * When `true`, samples are taken once per
318
- * event loop iteration. **Default:** `false`.
319
- */
320
- samplePerIteration?: boolean | undefined;
321
- /**
322
- * The sampling rate in milliseconds for interval-based
323
- * sampling. Must be greater than zero. This option is ignored when
324
- * `samplePerIteration` is `true`. **Default:** `10`.
325
- */
326
- resolution?: number | undefined;
327
- }
328
- interface Histogram {
329
- /**
330
- * The number of samples recorded by the histogram.
331
- * @since v17.4.0, v16.14.0
332
- */
333
- readonly count: number;
334
- /**
335
- * The number of samples recorded by the histogram.
336
- * v17.4.0, v16.14.0
337
- */
338
- readonly countBigInt: bigint;
339
- /**
340
- * The number of times the event loop delay exceeded the maximum 1 hour event
341
- * loop delay threshold.
342
- * @since v11.10.0
343
- */
344
- readonly exceeds: number;
345
- /**
346
- * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
347
- * @since v17.4.0, v16.14.0
348
- */
349
- readonly exceedsBigInt: bigint;
350
- /**
351
- * The maximum recorded event loop delay.
352
- * @since v11.10.0
353
- */
354
- readonly max: number;
355
- /**
356
- * The maximum recorded event loop delay.
357
- * v17.4.0, v16.14.0
358
- */
359
- readonly maxBigInt: number;
360
- /**
361
- * The mean of the recorded event loop delays.
362
- * @since v11.10.0
363
- */
364
- readonly mean: number;
365
- /**
366
- * The minimum recorded event loop delay.
367
- * @since v11.10.0
368
- */
369
- readonly min: number;
370
- /**
371
- * The minimum recorded event loop delay.
372
- * v17.4.0, v16.14.0
373
- */
374
- readonly minBigInt: bigint;
375
- /**
376
- * Returns the value at the given percentile.
377
- * @since v11.10.0
378
- * @param percentile A percentile value in the range (0, 100].
379
- */
380
- percentile(percentile: number): number;
381
- /**
382
- * Returns the value at the given percentile.
383
- * @since v17.4.0, v16.14.0
384
- * @param percentile A percentile value in the range (0, 100].
385
- */
386
- percentileBigInt(percentile: number): bigint;
387
- /**
388
- * Returns a `Map` object detailing the accumulated percentile distribution.
389
- * @since v11.10.0
390
- */
391
- readonly percentiles: Map<number, number>;
392
- /**
393
- * Returns a `Map` object detailing the accumulated percentile distribution.
394
- * @since v17.4.0, v16.14.0
395
- */
396
- readonly percentilesBigInt: Map<bigint, bigint>;
397
- /**
398
- * Resets the collected histogram data.
399
- * @since v11.10.0
400
- */
401
- reset(): void;
402
- /**
403
- * The standard deviation of the recorded event loop delays.
404
- * @since v11.10.0
405
- */
406
- readonly stddev: number;
407
- }
408
- /**
409
- * A `Histogram` that records event loop delay, returned by
410
- * `perf_hooks.monitorEventLoopDelay()`.
411
- */
412
- interface ELDHistogram extends Histogram {
413
- /**
414
- * Disables event loop delay sampling. Returns `true` if sampling was
415
- * stopped, `false` if it was already stopped.
416
- * @since v11.10.0
417
- */
418
- disable(): boolean;
419
- /**
420
- * Enables event loop delay sampling. Returns `true` if sampling was
421
- * started, `false` if it was already started.
422
- * @since v11.10.0
423
- */
424
- enable(): boolean;
425
- /**
426
- * Disables event loop delay sampling when the histogram is disposed.
427
- *
428
- * ```js
429
- * const { monitorEventLoopDelay } = require('node:perf_hooks');
430
- * {
431
- * using hist = monitorEventLoopDelay({ resolution: 20 });
432
- * hist.enable();
433
- * // The histogram will be disabled when the block is exited.
434
- * }
435
- * ```
436
- * @since v24.2.0
437
- */
438
- [Symbol.dispose](): void;
439
- }
440
- interface RecordableHistogram extends Histogram {
441
- /**
442
- * @since v15.9.0, v14.18.0
443
- * @param val The amount to record in the histogram.
444
- */
445
- record(val: number | bigint): void;
446
- /**
447
- * Calculates the amount of time (in nanoseconds) that has passed since the
448
- * previous call to `recordDelta()` and records that amount in the histogram.
449
- * @since v15.9.0, v14.18.0
450
- */
451
- recordDelta(): void;
452
- /**
453
- * Adds the values from `other` to this histogram.
454
- * @since v17.4.0, v16.14.0
455
- */
456
- add(other: RecordableHistogram): void;
457
- }
458
- interface EventLoopUtilization {
459
- idle: number;
460
- active: number;
461
- utilization: number;
462
- }
463
- /**
464
- * The `eventLoopUtilization()` function returns an object that contains the
465
- * cumulative duration of time the event loop has been both idle and active as a
466
- * high resolution milliseconds timer. The `utilization` value is the calculated
467
- * Event Loop Utilization (ELU).
468
- *
469
- * If bootstrapping has not yet finished on the main thread the properties have
470
- * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#worker-threads) since
471
- * bootstrap happens within the event loop.
472
- *
473
- * Both `utilization1` and `utilization2` are optional parameters.
474
- *
475
- * If `utilization1` is passed, then the delta between the current call's `active`
476
- * and `idle` times, as well as the corresponding `utilization` value are
477
- * calculated and returned (similar to `process.hrtime()`).
478
- *
479
- * If `utilization1` and `utilization2` are both passed, then the delta is
480
- * calculated between the two arguments. This is a convenience option because,
481
- * unlike `process.hrtime()`, calculating the ELU is more complex than a
482
- * single subtraction.
483
- *
484
- * ELU is similar to CPU utilization, except that it only measures event loop
485
- * statistics and not CPU usage. It represents the percentage of time the event
486
- * loop has spent outside the event loop's event provider (e.g. `epoll_wait`).
487
- * No other CPU idle time is taken into consideration. The following is an example
488
- * of how a mostly idle process will have a high ELU.
489
- *
490
- * ```js
491
- * import { eventLoopUtilization } from 'node:perf_hooks';
492
- * import { spawnSync } from 'node:child_process';
493
- *
494
- * setImmediate(() => {
495
- * const elu = eventLoopUtilization();
496
- * spawnSync('sleep', ['5']);
497
- * console.log(eventLoopUtilization(elu).utilization);
498
- * });
499
- * ```
500
- *
501
- * Although the CPU is mostly idle while running this script, the value of
502
- * `utilization` is `1`. This is because the call to
503
- * `child_process.spawnSync()` blocks the event loop from proceeding.
504
- *
505
- * Passing in a user-defined object instead of the result of a previous call to
506
- * `eventLoopUtilization()` will lead to undefined behavior. The return values
507
- * are not guaranteed to reflect any correct state of the event loop.
508
- * @since v25.2.0
509
- * @param utilization1 The result of a previous call to
510
- * `eventLoopUtilization()`.
511
- * @param utilization2 The result of a previous call to
512
- * `eventLoopUtilization()` prior to `utilization1`.
513
- */
514
- function eventLoopUtilization(
515
- utilization1?: EventLoopUtilization,
516
- utilization2?: EventLoopUtilization,
517
- ): EventLoopUtilization;
518
- /**
519
- * _This property is an extension by Node.js. It is not available in Web browsers._
520
- *
521
- * Creates a histogram object that samples and reports the event loop delay over
522
- * time. The delays will be reported in nanoseconds.
523
- *
524
- * By default, the histogram is updated by a timer using the configured
525
- * `resolution`. When `samplePerIteration` is `true`, samples are taken once per
526
- * event loop iteration using `uv_prepare_t` and `uv_check_t` hooks. In that mode,
527
- * the histogram does not keep the loop alive or force additional iterations when
528
- * the application is idle.
529
- * The two sampling modes produce significantly different results and should not
530
- * be compared directly.
531
- *
532
- * ```js
533
- * import { monitorEventLoopDelay } from 'node:perf_hooks';
534
- * const h = monitorEventLoopDelay({ resolution: 20 });
535
- * h.enable();
536
- * // Do something.
537
- * h.disable();
538
- * console.log(h.min);
539
- * console.log(h.max);
540
- * console.log(h.mean);
541
- * console.log(h.stddev);
542
- * console.log(h.percentiles);
543
- * console.log(h.percentile(50));
544
- * console.log(h.percentile(99));
545
- * ```
546
- * @since v11.10.0
547
- */
548
- function monitorEventLoopDelay(options?: EventLoopMonitorOptions): ELDHistogram;
549
- interface TimerifyOptions {
550
- /**
551
- * A histogram object created using
552
- * `perf_hooks.createHistogram()` that will record runtime durations in
553
- * nanoseconds.
554
- */
555
- histogram?: RecordableHistogram | undefined;
556
- }
557
- /**
558
- * _This property is an extension by Node.js. It is not available in Web browsers._
559
- *
560
- * Wraps a function within a new function that measures the running time of the
561
- * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'`
562
- * event type in order for the timing details to be accessed.
563
- *
564
- * ```js
565
- * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks';
566
- *
567
- * function someFunction() {
568
- * console.log('hello world');
569
- * }
570
- *
571
- * const wrapped = timerify(someFunction);
572
- *
573
- * const obs = new PerformanceObserver((list) => {
574
- * console.log(list.getEntries()[0].duration);
575
- *
576
- * performance.clearMarks();
577
- * performance.clearMeasures();
578
- * obs.disconnect();
579
- * });
580
- * obs.observe({ entryTypes: ['function'] });
581
- *
582
- * // A performance timeline entry will be created
583
- * wrapped();
584
- * ```
585
- *
586
- * If the wrapped function returns a promise, a finally handler will be attached
587
- * to the promise and the duration will be reported once the finally handler is
588
- * invoked.
589
- * @since v25.2.0
590
- */
591
- function timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
592
- interface CreateHistogramOptions {
593
- /**
594
- * The minimum recordable value. Must be an integer value greater than 0.
595
- * @default 1
596
- */
597
- lowest?: number | bigint | undefined;
598
- /**
599
- * The maximum recordable value. Must be an integer value greater than min.
600
- * @default Number.MAX_SAFE_INTEGER
601
- */
602
- highest?: number | bigint | undefined;
603
- /**
604
- * The number of accuracy digits. Must be a number between 1 and 5.
605
- * @default 3
606
- */
607
- figures?: number | undefined;
608
- }
609
- /**
610
- * Returns a `RecordableHistogram`.
611
- * @since v15.9.0, v14.18.0
612
- */
613
- function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
614
- }
615
- declare module "perf_hooks" {
616
- export * from "node:perf_hooks";
617
- }