@gjsify/async_hooks 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @gjsify/async_hooks
2
+
3
+ GJS implementation of the Node.js `async_hooks` module. Provides AsyncLocalStorage, AsyncResource, and createHook.
4
+
5
+ Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and Web APIs for GJS (GNOME JavaScript).
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @gjsify/async_hooks
11
+ # or
12
+ yarn add @gjsify/async_hooks
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import { AsyncLocalStorage, AsyncResource } from '@gjsify/async_hooks';
19
+
20
+ const storage = new AsyncLocalStorage();
21
+ storage.run({ requestId: '123' }, () => {
22
+ console.log(storage.getStore()); // { requestId: '123' }
23
+ });
24
+ ```
25
+
26
+ ## License
27
+
28
+ MIT
@@ -0,0 +1,138 @@
1
+ let _id = 1;
2
+ function executionAsyncId() {
3
+ return _id;
4
+ }
5
+ function triggerAsyncId() {
6
+ return 0;
7
+ }
8
+ function createHook(_callbacks) {
9
+ return {
10
+ enable() {
11
+ return this;
12
+ },
13
+ disable() {
14
+ return this;
15
+ }
16
+ };
17
+ }
18
+ class AsyncResource {
19
+ _type;
20
+ _asyncId;
21
+ _triggerAsyncId;
22
+ constructor(type, triggerAsyncIdOrOpts) {
23
+ this._type = type;
24
+ this._asyncId = _id++;
25
+ if (typeof triggerAsyncIdOrOpts === "number") {
26
+ this._triggerAsyncId = triggerAsyncIdOrOpts;
27
+ } else if (triggerAsyncIdOrOpts && typeof triggerAsyncIdOrOpts.triggerAsyncId === "number") {
28
+ this._triggerAsyncId = triggerAsyncIdOrOpts.triggerAsyncId;
29
+ } else {
30
+ this._triggerAsyncId = executionAsyncId();
31
+ }
32
+ }
33
+ runInAsyncScope(fn, thisArg, ...args) {
34
+ return fn.apply(thisArg, args);
35
+ }
36
+ emitDestroy() {
37
+ return this;
38
+ }
39
+ asyncId() {
40
+ return this._asyncId;
41
+ }
42
+ triggerAsyncId() {
43
+ return this._triggerAsyncId;
44
+ }
45
+ bind(fn) {
46
+ return ((...args) => {
47
+ return this.runInAsyncScope(fn, void 0, ...args);
48
+ });
49
+ }
50
+ static bind(fn, type) {
51
+ const resource = new AsyncResource(type || fn.name || "bound-anonymous-fn");
52
+ return resource.bind(fn);
53
+ }
54
+ }
55
+ const _allInstances = /* @__PURE__ */ new Set();
56
+ class AsyncLocalStorage {
57
+ _store;
58
+ constructor() {
59
+ _allInstances.add(this);
60
+ }
61
+ getStore() {
62
+ return this._store;
63
+ }
64
+ run(store, callback, ...args) {
65
+ const prev = this._store;
66
+ this._store = store;
67
+ try {
68
+ const result = callback(...args);
69
+ if (result != null && typeof result.then === "function") {
70
+ return result.then(
71
+ (value) => {
72
+ this._store = prev;
73
+ return value;
74
+ },
75
+ (err) => {
76
+ this._store = prev;
77
+ throw err;
78
+ }
79
+ );
80
+ }
81
+ this._store = prev;
82
+ return result;
83
+ } catch (err) {
84
+ this._store = prev;
85
+ throw err;
86
+ }
87
+ }
88
+ exit(callback, ...args) {
89
+ const prev = this._store;
90
+ this._store = void 0;
91
+ try {
92
+ return callback(...args);
93
+ } finally {
94
+ this._store = prev;
95
+ }
96
+ }
97
+ enterWith(store) {
98
+ this._store = store;
99
+ }
100
+ disable() {
101
+ this._store = void 0;
102
+ }
103
+ static snapshot() {
104
+ const captured = /* @__PURE__ */ new Map();
105
+ for (const instance of _allInstances) {
106
+ captured.set(instance, instance.getStore());
107
+ }
108
+ return (fn, ...args) => {
109
+ const saved = /* @__PURE__ */ new Map();
110
+ for (const [instance, store] of captured) {
111
+ saved.set(instance, instance.getStore());
112
+ instance._store = store;
113
+ }
114
+ try {
115
+ return fn(...args);
116
+ } finally {
117
+ for (const [instance, store] of saved) {
118
+ instance._store = store;
119
+ }
120
+ }
121
+ };
122
+ }
123
+ }
124
+ var index_default = {
125
+ executionAsyncId,
126
+ triggerAsyncId,
127
+ createHook,
128
+ AsyncResource,
129
+ AsyncLocalStorage
130
+ };
131
+ export {
132
+ AsyncLocalStorage,
133
+ AsyncResource,
134
+ createHook,
135
+ index_default as default,
136
+ executionAsyncId,
137
+ triggerAsyncId
138
+ };
@@ -0,0 +1,47 @@
1
+ export declare function executionAsyncId(): number;
2
+ export declare function triggerAsyncId(): number;
3
+ interface HookCallbacks {
4
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
5
+ before?(asyncId: number): void;
6
+ after?(asyncId: number): void;
7
+ destroy?(asyncId: number): void;
8
+ promiseResolve?(asyncId: number): void;
9
+ }
10
+ interface AsyncHook {
11
+ enable(): AsyncHook;
12
+ disable(): AsyncHook;
13
+ }
14
+ export declare function createHook(_callbacks: HookCallbacks): AsyncHook;
15
+ export declare class AsyncResource {
16
+ private _type;
17
+ private _asyncId;
18
+ private _triggerAsyncId;
19
+ constructor(type: string, triggerAsyncIdOrOpts?: number | {
20
+ triggerAsyncId?: number;
21
+ requireManualDestroy?: boolean;
22
+ });
23
+ runInAsyncScope<T>(fn: (...args: unknown[]) => T, thisArg?: unknown, ...args: unknown[]): T;
24
+ emitDestroy(): this;
25
+ asyncId(): number;
26
+ triggerAsyncId(): number;
27
+ bind<Func extends (...args: unknown[]) => unknown>(fn: Func): Func;
28
+ static bind<Func extends (...args: unknown[]) => unknown>(fn: Func, type?: string): Func;
29
+ }
30
+ export declare class AsyncLocalStorage<T = unknown> {
31
+ private _store;
32
+ constructor();
33
+ getStore(): T | undefined;
34
+ run<R>(store: T, callback: (...args: unknown[]) => R, ...args: unknown[]): R;
35
+ exit<R>(callback: (...args: unknown[]) => R, ...args: unknown[]): R;
36
+ enterWith(store: T): void;
37
+ disable(): void;
38
+ static snapshot(): <R>(fn: (...args: unknown[]) => R, ...args: unknown[]) => R;
39
+ }
40
+ declare const _default: {
41
+ executionAsyncId: typeof executionAsyncId;
42
+ triggerAsyncId: typeof triggerAsyncId;
43
+ createHook: typeof createHook;
44
+ AsyncResource: typeof AsyncResource;
45
+ AsyncLocalStorage: typeof AsyncLocalStorage;
46
+ };
47
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@gjsify/async_hooks",
3
+ "version": "0.1.0",
4
+ "description": "Node.js async_hooks module for Gjs",
5
+ "type": "module",
6
+ "module": "lib/esm/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/esm/index.js"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
16
+ "check": "tsc --noEmit",
17
+ "build": "yarn build:gjsify && yarn build:types",
18
+ "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
19
+ "build:types": "tsc",
20
+ "build:test": "yarn build:test:gjs && yarn build:test:node",
21
+ "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
22
+ "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
23
+ "test": "yarn build:gjsify && yarn build:test && yarn test:node && yarn test:gjs",
24
+ "test:gjs": "gjs -m test.gjs.mjs",
25
+ "test:node": "node test.node.mjs"
26
+ },
27
+ "keywords": [
28
+ "gjs",
29
+ "node",
30
+ "async_hooks"
31
+ ],
32
+ "dependencies": {
33
+ "@gjsify/events": "^0.1.0"
34
+ },
35
+ "devDependencies": {
36
+ "@gjsify/cli": "^0.1.0",
37
+ "@gjsify/unit": "^0.1.0",
38
+ "@types/node": "^25.5.0",
39
+ "typescript": "^6.0.2"
40
+ }
41
+ }
@@ -0,0 +1,652 @@
1
+ // Ported from refs/node-test/async-hooks/test-async-local-storage-*.js
2
+ // and refs/node-test/async-hooks/test-embedder.api.async-resource*.js
3
+ // Original: MIT license, Node.js contributors
4
+
5
+ import { describe, it, expect } from '@gjsify/unit';
6
+ import { AsyncLocalStorage, AsyncResource, executionAsyncId, triggerAsyncId, createHook } from 'node:async_hooks';
7
+
8
+ export default async () => {
9
+ await describe('async_hooks', async () => {
10
+ await it('should export executionAsyncId as a function', async () => {
11
+ expect(typeof executionAsyncId).toBe('function');
12
+ });
13
+
14
+ await it('should export triggerAsyncId as a function', async () => {
15
+ expect(typeof triggerAsyncId).toBe('function');
16
+ });
17
+
18
+ await it('should export createHook as a function', async () => {
19
+ expect(typeof createHook).toBe('function');
20
+ });
21
+
22
+ await it('should create an AsyncLocalStorage', async () => {
23
+ const storage = new AsyncLocalStorage();
24
+ expect(storage).toBeDefined();
25
+ expect(storage.getStore()).toBeUndefined();
26
+ });
27
+
28
+ await it('should run with a store value', async () => {
29
+ const storage = new AsyncLocalStorage<string>();
30
+ const result = storage.run('test-value', () => {
31
+ return storage.getStore();
32
+ });
33
+ expect(result).toBe('test-value');
34
+ });
35
+
36
+ await it('should restore previous store after run', async () => {
37
+ const storage = new AsyncLocalStorage<string>();
38
+ storage.run('outer', () => {
39
+ storage.run('inner', () => {
40
+ expect(storage.getStore()).toBe('inner');
41
+ });
42
+ expect(storage.getStore()).toBe('outer');
43
+ });
44
+ expect(storage.getStore()).toBeUndefined();
45
+ });
46
+
47
+ await it('should create an AsyncResource', async () => {
48
+ const resource = new AsyncResource('TEST');
49
+ expect(resource).toBeDefined();
50
+ expect(typeof resource.runInAsyncScope).toBe('function');
51
+ });
52
+
53
+ await it('should run function in async scope', async () => {
54
+ const resource = new AsyncResource('TEST');
55
+ const result = resource.runInAsyncScope(() => 42);
56
+ expect(result).toBe(42);
57
+ });
58
+
59
+ // ==================== additional tests ====================
60
+
61
+ await it('executionAsyncId should return a number', async () => {
62
+ const id = executionAsyncId();
63
+ expect(typeof id).toBe('number');
64
+ });
65
+
66
+ await it('triggerAsyncId should return a number', async () => {
67
+ const id = triggerAsyncId();
68
+ expect(typeof id).toBe('number');
69
+ });
70
+
71
+ await it('createHook should return an object with enable/disable', async () => {
72
+ const hook = createHook({
73
+ init() {},
74
+ });
75
+ expect(typeof hook.enable).toBe('function');
76
+ expect(typeof hook.disable).toBe('function');
77
+ });
78
+
79
+ await it('AsyncLocalStorage.run should pass arguments to callback', async () => {
80
+ const storage = new AsyncLocalStorage<number>();
81
+ const result = storage.run(42, (a: number, b: number) => {
82
+ return storage.getStore()! + a + b;
83
+ }, 1, 2);
84
+ expect(result).toBe(45);
85
+ });
86
+
87
+ await it('AsyncLocalStorage.run should handle exceptions', async () => {
88
+ const storage = new AsyncLocalStorage<string>();
89
+ try {
90
+ storage.run('error-test', () => {
91
+ throw new Error('intentional');
92
+ });
93
+ } catch (e) {
94
+ // Store should be restored after exception
95
+ expect(storage.getStore()).toBeUndefined();
96
+ }
97
+ });
98
+
99
+ await it('AsyncLocalStorage.disable should clear the store', async () => {
100
+ const storage = new AsyncLocalStorage<string>();
101
+ storage.run('active', () => {
102
+ expect(storage.getStore()).toBe('active');
103
+ storage.disable();
104
+ expect(storage.getStore()).toBeUndefined();
105
+ });
106
+ });
107
+
108
+ await it('AsyncResource.runInAsyncScope should pass thisArg', async () => {
109
+ const resource = new AsyncResource('TEST');
110
+ const obj = { value: 99 };
111
+ const result = resource.runInAsyncScope(function (this: typeof obj) {
112
+ return this.value;
113
+ }, obj);
114
+ expect(result).toBe(99);
115
+ });
116
+
117
+ await it('AsyncResource.runInAsyncScope should pass arguments', async () => {
118
+ const resource = new AsyncResource('TEST');
119
+ const result = resource.runInAsyncScope((a: number, b: number) => a + b, null, 3, 4);
120
+ expect(result).toBe(7);
121
+ });
122
+
123
+ await it('AsyncResource should have asyncId method', async () => {
124
+ const resource = new AsyncResource('TEST');
125
+ expect(typeof resource.asyncId).toBe('function');
126
+ expect(typeof resource.asyncId()).toBe('number');
127
+ });
128
+
129
+ await it('AsyncResource should have triggerAsyncId method', async () => {
130
+ const resource = new AsyncResource('TEST');
131
+ expect(typeof resource.triggerAsyncId).toBe('function');
132
+ expect(typeof resource.triggerAsyncId()).toBe('number');
133
+ });
134
+
135
+ // ==================== Additional tests ====================
136
+
137
+ await describe('createHook additional', async () => {
138
+ await it('createHook returned object should have enable and disable methods', async () => {
139
+ const hook = createHook({ init() {} });
140
+ expect(typeof hook.enable).toBe('function');
141
+ expect(typeof hook.disable).toBe('function');
142
+ });
143
+
144
+ await it('hook.enable() should return the hook itself', async () => {
145
+ const hook = createHook({ init() {} });
146
+ const result = hook.enable();
147
+ expect(result).toBe(hook);
148
+ hook.disable();
149
+ });
150
+
151
+ await it('hook.disable() should return the hook itself', async () => {
152
+ const hook = createHook({ init() {} });
153
+ hook.enable();
154
+ const result = hook.disable();
155
+ expect(result).toBe(hook);
156
+ });
157
+ });
158
+
159
+ await describe('AsyncLocalStorage additional', async () => {
160
+ await it('getStore() should return undefined when not inside a run()', async () => {
161
+ const storage = new AsyncLocalStorage();
162
+ expect(storage.getStore()).toBeUndefined();
163
+ });
164
+
165
+ await it('nested run() should see inner store value', async () => {
166
+ const storage = new AsyncLocalStorage<string>();
167
+ storage.run('outer', () => {
168
+ expect(storage.getStore()).toBe('outer');
169
+ storage.run('inner', () => {
170
+ expect(storage.getStore()).toBe('inner');
171
+ });
172
+ // After inner run completes, should see outer again
173
+ expect(storage.getStore()).toBe('outer');
174
+ });
175
+ });
176
+
177
+ await it('run() should work with async functions', async () => {
178
+ const storage = new AsyncLocalStorage<number>();
179
+ const result = await storage.run(123, async () => {
180
+ // Simulate async operation
181
+ await new Promise<void>((resolve) => setTimeout(resolve, 5));
182
+ return storage.getStore();
183
+ });
184
+ expect(result).toBe(123);
185
+ });
186
+
187
+ await it('multiple AsyncLocalStorage instances should be independent', async () => {
188
+ const storage1 = new AsyncLocalStorage<string>();
189
+ const storage2 = new AsyncLocalStorage<number>();
190
+
191
+ storage1.run('hello', () => {
192
+ storage2.run(42, () => {
193
+ expect(storage1.getStore()).toBe('hello');
194
+ expect(storage2.getStore()).toBe(42);
195
+ });
196
+ // storage2 should be undefined outside its run
197
+ expect(storage1.getStore()).toBe('hello');
198
+ expect(storage2.getStore()).toBeUndefined();
199
+ });
200
+ });
201
+ });
202
+
203
+ await describe('AsyncResource additional', async () => {
204
+ await it('AsyncResource should have type property', async () => {
205
+ const resource = new AsyncResource('MY_TYPE');
206
+ // The type is accessible — either as a property or through the constructor
207
+ expect(resource).toBeDefined();
208
+ // AsyncResource stores the type internally
209
+ expect(typeof resource.asyncId()).toBe('number');
210
+ });
211
+
212
+ await it('AsyncResource.bind() should return a function', async () => {
213
+ const resource = new AsyncResource('BIND_TEST');
214
+ const fn = () => 42;
215
+ const bound = resource.bind(fn);
216
+ expect(typeof bound).toBe('function');
217
+ // Calling the bound function should produce the same result
218
+ expect(bound()).toBe(42);
219
+ });
220
+ });
221
+
222
+ await describe('executionAsyncId additional', async () => {
223
+ await it('executionAsyncId should return a non-negative number', async () => {
224
+ const id = executionAsyncId();
225
+ expect(typeof id).toBe('number');
226
+ expect(id >= 0).toBe(true);
227
+ });
228
+ });
229
+
230
+ // ==================== New tests ====================
231
+
232
+ await describe('AsyncLocalStorage.enterWith', async () => {
233
+ await it('enterWith should set the store without a callback', async () => {
234
+ const storage = new AsyncLocalStorage<string>();
235
+ storage.enterWith('entered');
236
+ expect(storage.getStore()).toBe('entered');
237
+ // Clean up
238
+ storage.disable();
239
+ });
240
+
241
+ await it('enterWith should overwrite a previous enterWith value', async () => {
242
+ const storage = new AsyncLocalStorage<string>();
243
+ storage.enterWith('first');
244
+ expect(storage.getStore()).toBe('first');
245
+ storage.enterWith('second');
246
+ expect(storage.getStore()).toBe('second');
247
+ // Clean up
248
+ storage.disable();
249
+ });
250
+
251
+ await it('run() after enterWith should use run store, then restore enterWith store', async () => {
252
+ const storage = new AsyncLocalStorage<string>();
253
+ storage.enterWith('entered');
254
+ expect(storage.getStore()).toBe('entered');
255
+ storage.run('override', () => {
256
+ expect(storage.getStore()).toBe('override');
257
+ });
258
+ expect(storage.getStore()).toBe('entered');
259
+ // Clean up
260
+ storage.disable();
261
+ });
262
+
263
+ await it('enterWith with an object store', async () => {
264
+ const storage = new AsyncLocalStorage<{ foo: string }>();
265
+ const store = { foo: 'bar' };
266
+ storage.enterWith(store);
267
+ expect(storage.getStore()).toBe(store);
268
+ expect(storage.getStore()!.foo).toBe('bar');
269
+ // Clean up
270
+ storage.disable();
271
+ });
272
+ });
273
+
274
+ await describe('AsyncLocalStorage.snapshot', async () => {
275
+ await it('snapshot should return a function', async () => {
276
+ const snap = AsyncLocalStorage.snapshot();
277
+ expect(typeof snap).toBe('function');
278
+ });
279
+
280
+ await it('snapshot should capture the current store', async () => {
281
+ const storage = new AsyncLocalStorage<string>();
282
+ let snap: ReturnType<typeof AsyncLocalStorage.snapshot>;
283
+ storage.run('captured', () => {
284
+ snap = AsyncLocalStorage.snapshot();
285
+ });
286
+ // Outside the run context, use the snapshot to restore the captured context
287
+ const result = snap!(() => storage.getStore());
288
+ expect(result).toBe('captured');
289
+ });
290
+
291
+ await it('snapshot should not affect the outer store', async () => {
292
+ const storage = new AsyncLocalStorage<string>();
293
+ let snap: ReturnType<typeof AsyncLocalStorage.snapshot>;
294
+ storage.run('captured', () => {
295
+ snap = AsyncLocalStorage.snapshot();
296
+ });
297
+ storage.run('different', () => {
298
+ // Snapshot restores captured context inside
299
+ const inner = snap!(() => storage.getStore());
300
+ expect(inner).toBe('captured');
301
+ // Outside snapshot, store is still 'different'
302
+ expect(storage.getStore()).toBe('different');
303
+ });
304
+ });
305
+
306
+ await it('snapshot outside any run should capture undefined', async () => {
307
+ const storage = new AsyncLocalStorage<string>();
308
+ const snap = AsyncLocalStorage.snapshot();
309
+ storage.run('active', () => {
310
+ const result = snap(() => storage.getStore());
311
+ expect(result).toBeUndefined();
312
+ });
313
+ });
314
+ });
315
+
316
+ await describe('AsyncResource.emitDestroy', async () => {
317
+ await it('emitDestroy should return the resource itself', async () => {
318
+ const resource = new AsyncResource('DESTROY_TEST');
319
+ const result = resource.emitDestroy();
320
+ expect(result).toBe(resource);
321
+ });
322
+
323
+ await it('emitDestroy can be called multiple times', async () => {
324
+ const resource = new AsyncResource('DESTROY_TEST');
325
+ resource.emitDestroy();
326
+ const result = resource.emitDestroy();
327
+ expect(result).toBe(resource);
328
+ });
329
+ });
330
+
331
+ await describe('createHook with before/after/destroy callbacks', async () => {
332
+ await it('createHook should accept before callback', async () => {
333
+ const hook = createHook({ before() {} });
334
+ expect(typeof hook.enable).toBe('function');
335
+ expect(typeof hook.disable).toBe('function');
336
+ });
337
+
338
+ await it('createHook should accept after callback', async () => {
339
+ const hook = createHook({ after() {} });
340
+ expect(typeof hook.enable).toBe('function');
341
+ expect(typeof hook.disable).toBe('function');
342
+ });
343
+
344
+ await it('createHook should accept destroy callback', async () => {
345
+ const hook = createHook({ destroy() {} });
346
+ expect(typeof hook.enable).toBe('function');
347
+ expect(typeof hook.disable).toBe('function');
348
+ });
349
+
350
+ await it('createHook should accept promiseResolve callback', async () => {
351
+ const hook = createHook({ promiseResolve() {} });
352
+ expect(typeof hook.enable).toBe('function');
353
+ expect(typeof hook.disable).toBe('function');
354
+ });
355
+
356
+ await it('createHook should accept all callbacks at once', async () => {
357
+ const hook = createHook({
358
+ init() {},
359
+ before() {},
360
+ after() {},
361
+ destroy() {},
362
+ promiseResolve() {},
363
+ });
364
+ expect(typeof hook.enable).toBe('function');
365
+ expect(typeof hook.disable).toBe('function');
366
+ hook.enable();
367
+ hook.disable();
368
+ });
369
+
370
+ await it('createHook should accept an empty callbacks object', async () => {
371
+ const hook = createHook({});
372
+ expect(typeof hook.enable).toBe('function');
373
+ expect(typeof hook.disable).toBe('function');
374
+ });
375
+ });
376
+
377
+ await describe('AsyncLocalStorage.run with null/undefined store', async () => {
378
+ await it('run with null store should set store to null', async () => {
379
+ const storage = new AsyncLocalStorage<string | null>();
380
+ storage.run(null, () => {
381
+ expect(storage.getStore()).toBeNull();
382
+ });
383
+ });
384
+
385
+ await it('run with undefined store should set store to undefined', async () => {
386
+ const storage = new AsyncLocalStorage<string | undefined>();
387
+ storage.run(undefined, () => {
388
+ expect(storage.getStore()).toBeUndefined();
389
+ });
390
+ });
391
+
392
+ await it('run with null store should restore previous store after', async () => {
393
+ const storage = new AsyncLocalStorage<string | null>();
394
+ storage.run('outer', () => {
395
+ storage.run(null, () => {
396
+ expect(storage.getStore()).toBeNull();
397
+ });
398
+ expect(storage.getStore()).toBe('outer');
399
+ });
400
+ });
401
+
402
+ await it('run with string store (misc store types)', async () => {
403
+ const storage = new AsyncLocalStorage<string>();
404
+ storage.run('hello node', () => {
405
+ expect(storage.getStore()).toBe('hello node');
406
+ });
407
+ });
408
+
409
+ await it('run with object store (misc store types)', async () => {
410
+ const storage = new AsyncLocalStorage<{ hello: string }>();
411
+ const runStore = { hello: 'node' };
412
+ storage.run(runStore, () => {
413
+ expect(storage.getStore()).toBe(runStore);
414
+ });
415
+ });
416
+
417
+ await it('run with number store', async () => {
418
+ const storage = new AsyncLocalStorage<number>();
419
+ storage.run(0, () => {
420
+ expect(storage.getStore()).toBe(0);
421
+ });
422
+ });
423
+
424
+ await it('run with boolean false store', async () => {
425
+ const storage = new AsyncLocalStorage<boolean>();
426
+ storage.run(false, () => {
427
+ expect(storage.getStore()).toBe(false);
428
+ });
429
+ });
430
+ });
431
+
432
+ await describe('AsyncLocalStorage.run deeply nested', async () => {
433
+ await it('3-level nesting should restore stores correctly', async () => {
434
+ const storage = new AsyncLocalStorage<string>();
435
+ storage.run('L1', () => {
436
+ expect(storage.getStore()).toBe('L1');
437
+ storage.run('L2', () => {
438
+ expect(storage.getStore()).toBe('L2');
439
+ storage.run('L3', () => {
440
+ expect(storage.getStore()).toBe('L3');
441
+ });
442
+ expect(storage.getStore()).toBe('L2');
443
+ });
444
+ expect(storage.getStore()).toBe('L1');
445
+ });
446
+ expect(storage.getStore()).toBeUndefined();
447
+ });
448
+
449
+ await it('4-level nesting should restore stores correctly', async () => {
450
+ const storage = new AsyncLocalStorage<string>();
451
+ storage.run('L1', () => {
452
+ storage.run('L2', () => {
453
+ storage.run('L3', () => {
454
+ storage.run('L4', () => {
455
+ expect(storage.getStore()).toBe('L4');
456
+ });
457
+ expect(storage.getStore()).toBe('L3');
458
+ });
459
+ expect(storage.getStore()).toBe('L2');
460
+ });
461
+ expect(storage.getStore()).toBe('L1');
462
+ });
463
+ expect(storage.getStore()).toBeUndefined();
464
+ });
465
+
466
+ await it('nested run with exit in between', async () => {
467
+ const storage = new AsyncLocalStorage<string>();
468
+ storage.run('outer', () => {
469
+ expect(storage.getStore()).toBe('outer');
470
+ storage.run('inner', () => {
471
+ expect(storage.getStore()).toBe('inner');
472
+ });
473
+ expect(storage.getStore()).toBe('outer');
474
+ storage.exit(() => {
475
+ expect(storage.getStore()).toBeUndefined();
476
+ });
477
+ expect(storage.getStore()).toBe('outer');
478
+ });
479
+ expect(storage.getStore()).toBeUndefined();
480
+ });
481
+ });
482
+
483
+ await describe('AsyncResource with triggerAsyncId option', async () => {
484
+ await it('should accept triggerAsyncId as a number (legacy)', async () => {
485
+ const resource = new AsyncResource('TEST', 42);
486
+ expect(resource.triggerAsyncId()).toBe(42);
487
+ });
488
+
489
+ await it('should accept triggerAsyncId in options object', async () => {
490
+ const resource = new AsyncResource('TEST', { triggerAsyncId: 99 });
491
+ expect(resource.triggerAsyncId()).toBe(99);
492
+ });
493
+
494
+ await it('default triggerAsyncId should be executionAsyncId', async () => {
495
+ const resource = new AsyncResource('TEST');
496
+ expect(resource.triggerAsyncId()).toBe(executionAsyncId());
497
+ });
498
+
499
+ await it('asyncId should return a consistent value', async () => {
500
+ const resource = new AsyncResource('TEST');
501
+ const id = resource.asyncId();
502
+ expect(resource.asyncId()).toBe(id);
503
+ expect(resource.asyncId()).toBe(id);
504
+ });
505
+
506
+ await it('different AsyncResource instances should have different asyncIds', async () => {
507
+ const r1 = new AsyncResource('TEST1');
508
+ const r2 = new AsyncResource('TEST2');
509
+ const id1 = r1.asyncId();
510
+ const id2 = r2.asyncId();
511
+ expect(id1 === id2).toBe(false);
512
+ });
513
+ });
514
+
515
+ await describe('AsyncResource.bind static method', async () => {
516
+ await it('static bind should return a function', async () => {
517
+ const bound = AsyncResource.bind(() => 42);
518
+ expect(typeof bound).toBe('function');
519
+ });
520
+
521
+ await it('static bind should preserve return value', async () => {
522
+ const bound = AsyncResource.bind(() => 'hello');
523
+ expect(bound()).toBe('hello');
524
+ });
525
+
526
+ await it('static bind should pass arguments through', async () => {
527
+ const bound = AsyncResource.bind((a: number, b: number) => a + b);
528
+ expect(bound(3, 7)).toBe(10);
529
+ });
530
+
531
+ await it('static bind with explicit type', async () => {
532
+ const bound = AsyncResource.bind(() => 'typed', 'MY_RESOURCE');
533
+ expect(typeof bound).toBe('function');
534
+ expect(bound()).toBe('typed');
535
+ });
536
+ });
537
+
538
+ await describe('Edge cases', async () => {
539
+ await it('run with empty callback (no return value)', async () => {
540
+ const storage = new AsyncLocalStorage<string>();
541
+ const result = storage.run('test', () => {});
542
+ expect(result).toBeUndefined();
543
+ expect(storage.getStore()).toBeUndefined();
544
+ });
545
+
546
+ await it('bind with arrow function should preserve behavior', async () => {
547
+ const resource = new AsyncResource('ARROW_TEST');
548
+ const arrowFn = (x: number) => x * 2;
549
+ const bound = resource.bind(arrowFn);
550
+ expect(bound(5)).toBe(10);
551
+ expect(bound(0)).toBe(0);
552
+ expect(bound(-3)).toBe(-6);
553
+ });
554
+
555
+ await it('bind with function that returns undefined', async () => {
556
+ const resource = new AsyncResource('VOID_TEST');
557
+ const fn = () => undefined;
558
+ const bound = resource.bind(fn);
559
+ expect(bound()).toBeUndefined();
560
+ });
561
+
562
+ await it('exit should pass arguments to callback', async () => {
563
+ const storage = new AsyncLocalStorage<string>();
564
+ storage.run('mystore', () => {
565
+ const result = storage.exit((a: number, b: number) => {
566
+ expect(storage.getStore()).toBeUndefined();
567
+ return a + b;
568
+ }, 10, 20);
569
+ expect(result).toBe(30);
570
+ expect(storage.getStore()).toBe('mystore');
571
+ });
572
+ });
573
+
574
+ await it('exit should return callback return value', async () => {
575
+ const storage = new AsyncLocalStorage<string>();
576
+ storage.run('test', () => {
577
+ const result = storage.exit(() => 'exit-result');
578
+ expect(result).toBe('exit-result');
579
+ });
580
+ });
581
+
582
+ await it('run should return callback return value', async () => {
583
+ const storage = new AsyncLocalStorage<string>();
584
+ const result = storage.run('test', () => 1729);
585
+ expect(result).toBe(1729);
586
+ });
587
+
588
+ await it('run callback throwing should not leak the store', async () => {
589
+ const storage = new AsyncLocalStorage<string>();
590
+ let caught = false;
591
+ try {
592
+ storage.run('leaked?', () => {
593
+ throw new Error('oops');
594
+ });
595
+ } catch {
596
+ caught = true;
597
+ }
598
+ expect(caught).toBe(true);
599
+ expect(storage.getStore()).toBeUndefined();
600
+ });
601
+
602
+ await it('nested run with exception in inner should restore outer', async () => {
603
+ const storage = new AsyncLocalStorage<string>();
604
+ storage.run('outer', () => {
605
+ try {
606
+ storage.run('inner', () => {
607
+ throw new Error('inner error');
608
+ });
609
+ } catch {
610
+ // expected
611
+ }
612
+ expect(storage.getStore()).toBe('outer');
613
+ });
614
+ expect(storage.getStore()).toBeUndefined();
615
+ });
616
+
617
+ await it('disable inside run, then run again', async () => {
618
+ const storage = new AsyncLocalStorage<string>();
619
+ storage.run('first', () => {
620
+ storage.disable();
621
+ expect(storage.getStore()).toBeUndefined();
622
+ });
623
+ // After disable, run should still work
624
+ storage.run('second', () => {
625
+ expect(storage.getStore()).toBe('second');
626
+ });
627
+ });
628
+
629
+ await it('exit after disable should still work', async () => {
630
+ const storage = new AsyncLocalStorage<string>();
631
+ storage.disable();
632
+ storage.exit(() => {
633
+ expect(storage.getStore()).toBeUndefined();
634
+ });
635
+ });
636
+
637
+ await it('multiple run calls on same instance sequentially', async () => {
638
+ const storage = new AsyncLocalStorage<number>();
639
+ storage.run(1, () => {
640
+ expect(storage.getStore()).toBe(1);
641
+ });
642
+ storage.run(2, () => {
643
+ expect(storage.getStore()).toBe(2);
644
+ });
645
+ storage.run(3, () => {
646
+ expect(storage.getStore()).toBe(3);
647
+ });
648
+ expect(storage.getStore()).toBeUndefined();
649
+ });
650
+ });
651
+ });
652
+ };
package/src/index.ts ADDED
@@ -0,0 +1,168 @@
1
+ // Reference: Node.js lib/async_hooks.js
2
+ // Reimplemented for GJS
3
+
4
+ import { EventEmitter } from 'node:events';
5
+
6
+ let _id = 1;
7
+
8
+ export function executionAsyncId(): number {
9
+ return _id;
10
+ }
11
+
12
+ export function triggerAsyncId(): number {
13
+ return 0;
14
+ }
15
+
16
+ interface HookCallbacks {
17
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
18
+ before?(asyncId: number): void;
19
+ after?(asyncId: number): void;
20
+ destroy?(asyncId: number): void;
21
+ promiseResolve?(asyncId: number): void;
22
+ }
23
+
24
+ interface AsyncHook {
25
+ enable(): AsyncHook;
26
+ disable(): AsyncHook;
27
+ }
28
+
29
+ export function createHook(_callbacks: HookCallbacks): AsyncHook {
30
+ return {
31
+ enable() {
32
+ return this;
33
+ },
34
+ disable() {
35
+ return this;
36
+ },
37
+ };
38
+ }
39
+
40
+ export class AsyncResource {
41
+ private _type: string;
42
+ private _asyncId: number;
43
+ private _triggerAsyncId: number;
44
+
45
+ constructor(type: string, triggerAsyncIdOrOpts?: number | { triggerAsyncId?: number; requireManualDestroy?: boolean }) {
46
+ this._type = type;
47
+ this._asyncId = _id++;
48
+ if (typeof triggerAsyncIdOrOpts === 'number') {
49
+ this._triggerAsyncId = triggerAsyncIdOrOpts;
50
+ } else if (triggerAsyncIdOrOpts && typeof triggerAsyncIdOrOpts.triggerAsyncId === 'number') {
51
+ this._triggerAsyncId = triggerAsyncIdOrOpts.triggerAsyncId;
52
+ } else {
53
+ this._triggerAsyncId = executionAsyncId();
54
+ }
55
+ }
56
+
57
+ runInAsyncScope<T>(fn: (...args: unknown[]) => T, thisArg?: unknown, ...args: unknown[]): T {
58
+ return fn.apply(thisArg, args);
59
+ }
60
+
61
+ emitDestroy(): this {
62
+ return this;
63
+ }
64
+
65
+ asyncId(): number {
66
+ return this._asyncId;
67
+ }
68
+
69
+ triggerAsyncId(): number {
70
+ return this._triggerAsyncId;
71
+ }
72
+
73
+ bind<Func extends (...args: unknown[]) => unknown>(fn: Func): Func {
74
+ return ((...args: unknown[]) => {
75
+ return this.runInAsyncScope(fn, undefined, ...args);
76
+ }) as unknown as Func;
77
+ }
78
+
79
+ static bind<Func extends (...args: unknown[]) => unknown>(fn: Func, type?: string): Func {
80
+ const resource = new AsyncResource(type || fn.name || 'bound-anonymous-fn');
81
+ return resource.bind(fn);
82
+ }
83
+ }
84
+
85
+ // Track all live AsyncLocalStorage instances for snapshot()
86
+ const _allInstances = new Set<AsyncLocalStorage>();
87
+
88
+ export class AsyncLocalStorage<T = unknown> {
89
+ private _store: T | undefined;
90
+
91
+ constructor() {
92
+ _allInstances.add(this);
93
+ }
94
+
95
+ getStore(): T | undefined {
96
+ return this._store;
97
+ }
98
+
99
+ run<R>(store: T, callback: (...args: unknown[]) => R, ...args: unknown[]): R {
100
+ const prev = this._store;
101
+ this._store = store;
102
+ try {
103
+ const result = callback(...args);
104
+ if (result != null && typeof (result as unknown as PromiseLike<unknown>).then === 'function') {
105
+ // Async callback — restore store when the promise settles
106
+ return (result as unknown as PromiseLike<unknown>).then(
107
+ (value: unknown) => { this._store = prev; return value; },
108
+ (err: unknown) => { this._store = prev; throw err; },
109
+ ) as R;
110
+ }
111
+ // Sync callback — restore immediately
112
+ this._store = prev;
113
+ return result;
114
+ } catch (err) {
115
+ this._store = prev;
116
+ throw err;
117
+ }
118
+ }
119
+
120
+ exit<R>(callback: (...args: unknown[]) => R, ...args: unknown[]): R {
121
+ const prev = this._store;
122
+ this._store = undefined;
123
+ try {
124
+ return callback(...args);
125
+ } finally {
126
+ this._store = prev;
127
+ }
128
+ }
129
+
130
+ enterWith(store: T): void {
131
+ this._store = store;
132
+ }
133
+
134
+ disable(): void {
135
+ this._store = undefined;
136
+ }
137
+
138
+ static snapshot(): <R>(fn: (...args: unknown[]) => R, ...args: unknown[]) => R {
139
+ // Capture the current store of every live AsyncLocalStorage instance
140
+ const captured = new Map<AsyncLocalStorage, unknown>();
141
+ for (const instance of _allInstances) {
142
+ captured.set(instance, instance.getStore());
143
+ }
144
+ return <R>(fn: (...args: unknown[]) => R, ...args: unknown[]): R => {
145
+ // Save current stores, restore captured stores, run fn, then restore
146
+ const saved = new Map<AsyncLocalStorage, unknown>();
147
+ for (const [instance, store] of captured) {
148
+ saved.set(instance, instance.getStore());
149
+ (instance as AsyncLocalStorage<unknown>)._store = store;
150
+ }
151
+ try {
152
+ return fn(...args);
153
+ } finally {
154
+ for (const [instance, store] of saved) {
155
+ (instance as AsyncLocalStorage<unknown>)._store = store;
156
+ }
157
+ }
158
+ };
159
+ }
160
+ }
161
+
162
+ export default {
163
+ executionAsyncId,
164
+ triggerAsyncId,
165
+ createHook,
166
+ AsyncResource,
167
+ AsyncLocalStorage,
168
+ };
package/src/test.mts ADDED
@@ -0,0 +1,3 @@
1
+ import { run } from '@gjsify/unit';
2
+ import testSuite from './index.spec.js';
3
+ run({ testSuite });
package/tsconfig.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "ESNext",
4
+ "target": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "types": [
7
+ "node"
8
+ ],
9
+ "experimentalDecorators": true,
10
+ "emitDeclarationOnly": true,
11
+ "declaration": true,
12
+ "allowImportingTsExtensions": true,
13
+ "outDir": "lib",
14
+ "rootDir": "src",
15
+ "declarationDir": "lib/types",
16
+ "composite": true,
17
+ "skipLibCheck": true,
18
+ "allowJs": true,
19
+ "checkJs": false,
20
+ "strict": false
21
+ },
22
+ "include": [
23
+ "src/**/*.ts"
24
+ ],
25
+ "exclude": [
26
+ "src/test.ts",
27
+ "src/test.mts",
28
+ "src/**/*.spec.ts",
29
+ "src/**/*.spec.mts"
30
+ ]
31
+ }
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.es2025.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.esnext.full.d.ts","./src/index.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/blob.d.ts","../../../node_modules/@types/node/web-globals/console.d.ts","../../../node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/encoding.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/undici-types/utility.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client-stats.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/undici-types/h2c-client.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/importmeta.d.ts","../../../node_modules/@types/node/web-globals/messaging.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/performance.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/@types/node/web-globals/timers.d.ts","../../../node_modules/@types/node/web-globals/url.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/inspector/promises.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/path/posix.d.ts","../../../node_modules/@types/node/path/win32.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/quic.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/test/reporters.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/util/types.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts"],"fileIdsList":[[97,157,158,160,168,172,175,177,178,179,192],[97,159,160,168,172,175,177,178,179,192],[160,168,172,175,177,178,179,192],[97,160,168,172,175,177,178,179,192,200],[97,160,161,166,168,171,172,175,177,178,179,181,192,197,209],[97,160,161,162,168,171,172,175,177,178,179,192],[97,160,168,172,175,177,178,179,192],[97,160,163,168,172,175,177,178,179,192,210],[97,160,164,165,168,172,175,177,178,179,183,192],[97,160,165,168,172,175,177,178,179,192,197,206],[97,160,166,168,171,172,175,177,178,179,181,192],[97,159,160,167,168,172,175,177,178,179,192],[97,160,168,169,172,175,177,178,179,192],[97,160,168,170,171,172,175,177,178,179,192],[97,159,160,168,171,172,175,177,178,179,192],[97,160,168,171,172,173,175,177,178,179,192,197,209],[97,160,168,171,172,173,175,177,178,179,192,197,200],[97,147,160,168,171,172,174,175,177,178,179,181,192,197,209],[97,160,168,171,172,174,175,177,178,179,181,192,197,206,209],[97,160,168,172,174,175,176,177,178,179,192,197,206,209],[95,96,97,98,99,100,101,102,103,104,105,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216],[97,160,168,171,172,175,177,178,179,192],[97,160,168,172,175,177,179,192],[97,160,168,172,175,177,178,179,180,192,209],[97,160,168,171,172,175,177,178,179,181,192,197],[97,160,168,172,175,177,178,179,183,192],[97,160,168,172,175,177,178,179,184,192],[97,160,168,171,172,175,177,178,179,187,192],[97,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216],[97,160,168,172,175,177,178,179,189,192],[97,160,168,172,175,177,178,179,190,192],[97,160,165,168,172,175,177,178,179,181,192,200],[97,160,168,171,172,175,177,178,179,192,193],[97,160,168,172,175,177,178,179,192,194,210,213],[97,160,168,171,172,175,177,178,179,192,197,199,200],[97,160,168,172,175,177,178,179,192,198,200],[97,160,168,172,175,177,178,179,192,200,210],[97,160,168,172,175,177,178,179,192,201],[97,157,160,168,172,175,177,178,179,192,197,203,209],[97,160,168,172,175,177,178,179,192,197,202],[97,160,168,171,172,175,177,178,179,192,204,205],[97,160,168,172,175,177,178,179,192,204,205],[97,160,165,168,172,175,177,178,179,181,192,197,206],[97,160,168,172,175,177,178,179,192,207],[97,160,168,172,175,177,178,179,181,192,208],[97,160,168,172,174,175,177,178,179,190,192,209],[97,160,168,172,175,177,178,179,192,210,211],[97,160,165,168,172,175,177,178,179,192,211],[97,160,168,172,175,177,178,179,192,197,212],[97,160,168,172,175,177,178,179,180,192,213],[97,160,168,172,175,177,178,179,192,214],[97,160,163,168,172,175,177,178,179,192],[97,160,165,168,172,175,177,178,179,192],[97,160,168,172,175,177,178,179,192,210],[97,147,160,168,172,175,177,178,179,192],[97,160,168,172,175,177,178,179,192,209],[97,160,168,172,175,177,178,179,192,215],[97,160,168,172,175,177,178,179,187,192],[97,160,168,172,175,177,178,179,192,205],[97,147,160,168,171,172,173,175,177,178,179,187,192,197,200,209,212,213,215],[97,160,168,172,175,177,178,179,192,197,216],[97,112,115,118,119,160,168,172,175,177,178,179,192,209],[97,115,160,168,172,175,177,178,179,192,197,209],[97,115,119,160,168,172,175,177,178,179,192,209],[97,160,168,172,175,177,178,179,192,197],[97,109,160,168,172,175,177,178,179,192],[97,113,160,168,172,175,177,178,179,192],[97,111,112,115,160,168,172,175,177,178,179,192,209],[97,160,168,172,175,177,178,179,181,192,206],[97,160,168,172,175,177,178,179,192,217],[97,109,160,168,172,175,177,178,179,192,217],[97,111,115,160,168,172,175,177,178,179,181,192,209],[97,106,107,108,110,114,160,168,171,172,175,177,178,179,192,197,209],[97,115,124,132,160,168,172,175,177,178,179,192],[97,107,113,160,168,172,175,177,178,179,192],[97,115,141,142,160,168,172,175,177,178,179,192],[97,107,110,115,160,168,172,175,177,178,179,192,200,209,217],[97,115,160,168,172,175,177,178,179,192],[97,111,115,160,168,172,175,177,178,179,192,209],[97,106,160,168,172,175,177,178,179,192],[97,109,110,111,113,114,115,116,117,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,144,145,146,160,168,172,175,177,178,179,192],[97,115,134,137,160,168,172,175,177,178,179,192],[97,115,124,125,126,160,168,172,175,177,178,179,192],[97,113,115,125,127,160,168,172,175,177,178,179,192],[97,114,160,168,172,175,177,178,179,192],[97,107,109,115,160,168,172,175,177,178,179,192],[97,115,119,125,127,160,168,172,175,177,178,179,192],[97,119,160,168,172,175,177,178,179,192],[97,113,115,118,160,168,172,175,177,178,179,192,209],[97,107,111,115,124,160,168,172,175,177,178,179,192],[97,115,134,160,168,172,175,177,178,179,192],[97,127,160,168,172,175,177,178,179,192],[97,109,115,141,160,168,172,175,177,178,179,192,200,215,217]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"2a2de5b9459b3fc44decd9ce6100b72f1b002ef523126c1d3d8b2a4a63d74d78","affectsGlobalScope":true,"impliedFormat":1},{"version":"f13f4b465c99041e912db5c44129a94588e1aafee35a50eab51044833f50b4ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"ef4a897cd2a3f91000c10264e400b3667c7e51e1b7365f03b62e8081dc53bde6","impliedFormat":1},{"version":"bb0341b42eaee12d513ed5e26da779f3b82b627951e892363e3ca2c43a0ffced","signature":"cb64ae258ea945b5dbb51246efd4872eca9592830a603a8ba86ecc1854df2d26"},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"438b41419b1df9f1fbe33b5e1b18f5853432be205991d1b19f5b7f351675541e","affectsGlobalScope":true,"impliedFormat":1},{"version":"096116f8fedc1765d5bd6ef360c257b4a9048e5415054b3bf3c41b07f8951b0b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"10ec5e82144dfac6f04fa5d1d6c11763b3e4dbbac6d99101427219ab3e2ae887","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"074de5b2fdead0165a2757e3aaef20f27a6347b1c36adea27d51456795b37682","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"24371e69a38fc33e268d4a8716dbcda430d6c2c414a99ff9669239c4b8f40dea","impliedFormat":1},{"version":"ccab02f3920fc75c01174c47fcf67882a11daf16baf9e81701d0a94636e94556","impliedFormat":1},{"version":"3e11fce78ad8c0e1d1db4ba5f0652285509be3acdd519529bc8fcef85f7dafd9","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"9c32412007b5662fd34a8eb04292fb5314ec370d7016d1c2fb8aa193c807fe22","impliedFormat":1},{"version":"7fd1b31fd35876b0aa650811c25ec2c97a3c6387e5473eb18004bed86cdd76b6","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"6ebe8ebb8659aaa9d1acbf3710d7dae3e923e97610238b9511c25dc39023a166","impliedFormat":1},{"version":"e85d7f8068f6a26710bff0cc8c0fc5e47f71089c3780fbede05857331d2ddec9","impliedFormat":1},{"version":"7befaf0e76b5671be1d47b77fcc65f2b0aad91cc26529df1904f4a7c46d216e9","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"5b03a034c72146b61573aab280f295b015b9168470f2df05f6080a2122f9b4df","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"c63b9ada8c72f95aac5db92aea07e5e87ec810353cdf63b2d78f49a58662cf6c","impliedFormat":1},{"version":"1cc2a09e1a61a5222d4174ab358a9f9de5e906afe79dbf7363d871a7edda3955","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"b64d4d1c5f877f9c666e98e833f0205edb9384acc46e98a1fef344f64d6aba44","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"c9381908473a1c92cb8c516b184e75f4d226dad95c3a85a5af35f670064d9a2f","impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"3fad5618174d74a34ee006406d4eb37e8d07dd62eb1315dbf52f48d31a337547","impliedFormat":1},{"version":"7e49f52a159435fc8df4de9dc377ef5860732ca2dc9efec1640531d3cf5da7a3","impliedFormat":1},{"version":"dd4bde4bdc2e5394aed6855e98cf135dfdf5dd6468cad842e03116d31bbcc9bc","impliedFormat":1},{"version":"4d4e879009a84a47c05350b8dca823036ba3a29a3038efed1be76c9f81e45edf","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b50a819485ffe0d237bf0d131e92178d14d11e2aa873d73615a9ec578b341f5","impliedFormat":1},{"version":"9ba13b47cb450a438e3076c4a3f6afb9dc85e17eae50f26d4b2d72c0688c9251","impliedFormat":1},{"version":"b64cd4401633ea4ecadfd700ddc8323a13b63b106ac7127c1d2726f32424622c","impliedFormat":1},{"version":"37c6e5fe5715814412b43cc9b50b24c67a63c4e04e753e0d1305970d65417a60","impliedFormat":1},{"version":"1d024184fb57c58c5c91823f9d10b4915a4867b7934e89115fd0d861a9df27c8","impliedFormat":1},{"version":"ee0e4946247f842c6dd483cbb60a5e6b484fee07996e3a7bc7343dfb68a04c5d","impliedFormat":1},{"version":"ef051f42b7e0ef5ca04552f54c4552eac84099d64b6c5ad0ef4033574b6035b8","impliedFormat":1},{"version":"853a43154f1d01b0173d9cbd74063507ece57170bad7a3b68f3fa1229ad0a92f","impliedFormat":1},{"version":"56231e3c39a031bfb0afb797690b20ed4537670c93c0318b72d5180833d98b72","impliedFormat":1},{"version":"5cc7c39031bfd8b00ad58f32143d59eb6ffc24f5d41a20931269011dccd36c5e","impliedFormat":1},{"version":"12d602a8fe4c2f2ba4f7804f5eda8ba07e0c83bf5cf0cda8baffa2e9967bfb77","affectsGlobalScope":true,"impliedFormat":1},{"version":"a856ab781967b62b288dfd85b860bef0e62f005ed4b1b8fa25c53ce17856acaf","impliedFormat":1},{"version":"cc25940cfb27aa538e60d465f98bb5068d4d7d33131861ace43f04fe6947d68f","impliedFormat":1},{"version":"8db46b61a690f15b245cf16270db044dc047dce9f93b103a59f50262f677ea1f","impliedFormat":1},{"version":"01ff95aa1443e3f7248974e5a771f513cb2ac158c8898f470a1792f817bee497","impliedFormat":1},{"version":"757227c8b345c57d76f7f0e3bbad7a91ffca23f1b2547cbed9e10025816c9cb7","impliedFormat":1},{"version":"959d0327c96dd9bb5521f3ed6af0c435996504cc8dd46baa8e12cb3b3518cef1","impliedFormat":1},{"version":"e1c1a0b4d1ead0de9eca52203aeb1f771f21e6238d6fcd15aa56ac2a02f1b7bf","impliedFormat":1},{"version":"101f482fd48cb4c7c0468dcc6d62c843d842977aea6235644b1edd05e81fbf22","impliedFormat":1},{"version":"266bee0a41e9c3ba335583e21e9277ae03822402cf5e8e1d99f5196853613b98","affectsGlobalScope":true,"impliedFormat":1},{"version":"386606f8a297988535cb1401959041cfa7f59d54b8a9ed09738e65c98684c976","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"3ef397f12387eff17f550bc484ea7c27d21d43816bbe609d495107f44b97e933","impliedFormat":1},{"version":"1023282e2ba810bc07905d3668349fbd37a26411f0c8f94a70ef3c05fe523fcf","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"e236b5eba291f51bdf32c231673e6cab81b5410850e61f51a7a524dddadc0f95","impliedFormat":1},{"version":"ce8653341224f8b45ff46d2a06f2cacb96f841f768a886c9d8dd8ec0878b11bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f2c62938251b45715fd2a9887060ec4fbc8724727029d1cbce373747252bdd7","impliedFormat":1},{"version":"e3ace08b6bbd84655d41e244677b474fd995923ffef7149ddb68af8848b60b05","impliedFormat":1},{"version":"132580b0e86c48fab152bab850fc57a4b74fe915c8958d2ccb052b809a44b61c","impliedFormat":1},{"version":"90a278f5fab7557e69e97056c0841adf269c42697194f0bd5c5e69152637d4b3","impliedFormat":1},{"version":"69c9a5a9392e8564bd81116e1ed93b13205201fb44cb35a7fde8c9f9e21c4b23","impliedFormat":1},{"version":"5f8fc37f8434691ffac1bfd8fc2634647da2c0e84253ab5d2dd19a7718915b35","impliedFormat":1},{"version":"5981c2340fd8b076cae8efbae818d42c11ffc615994cb060b1cd390795f1be2b","impliedFormat":1},{"version":"f263485c9ca90df9fe7bb3a906db9701997dc6cae86ace1f8106ac8d2f7f677b","impliedFormat":1},{"version":"1edcf2f36fc332615846bde6dcc71a8fe526065505bc5e3dcfd65a14becdf698","affectsGlobalScope":true,"impliedFormat":1},{"version":"0250da3eb85c99624f974e77ef355cdf86f43980251bc371475c2b397ba55bcd","impliedFormat":1},{"version":"f1c93e046fb3d9b7f8249629f4b63dc068dd839b824dd0aa39a5e68476dc9420","impliedFormat":1},{"version":"3d3a5f27ffbc06c885dd4d5f9ee20de61faf877fe2c3a7051c4825903d9a7fdc","impliedFormat":1},{"version":"12806f9f085598ef930edaf2467a5fa1789a878fba077cd27e85dc5851e11834","impliedFormat":1},{"version":"1dbca38aa4b0db1f4f9e6edacc2780af7e028b733d2a98dd3598cd235ca0c97d","impliedFormat":1},{"version":"a43fe41c33d0a192a0ecaf9b92e87bef3709c9972e6d53c42c49251ccb962d69","impliedFormat":1},{"version":"a177959203c017fad3ecc4f3d96c8757a840957a4959a3ae00dab9d35961ca6c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc727ccf9b36e257ff982ea0badeffbfc2c151802f741bddff00c6af3b784cf","impliedFormat":1},{"version":"19143c930aef7ccf248549f3e78992f2f1049118ec5d4622e95025057d8e392b","impliedFormat":1},{"version":"4844a4c9b4b1e812b257676ed8a80b3f3be0e29bf05e742cc2ea9c3c6865e6c6","impliedFormat":1},{"version":"064878a60367e0407c42fb7ba02a2ea4d83257357dc20088e549bd4d89433e9c","impliedFormat":1},{"version":"cca8917838a876e2d7016c9b6af57cbf11fdf903c5fdd8e613fa31840b2957bf","impliedFormat":1},{"version":"d91ae55e4282c22b9c21bc26bd3ef637d3fe132507b10529ae68bf76f5de785b","impliedFormat":1},{"version":"b484ec11ba00e3a2235562a41898d55372ccabe607986c6fa4f4aba72093749f","impliedFormat":1},{"version":"7e8a671604329e178bb479c8f387715ebd40a091fc4a7552a0a75c2f3a21c65c","impliedFormat":1},{"version":"41ef7992c555671a8fe54db302788adefa191ded810a50329b79d20a6772d14c","impliedFormat":1},{"version":"041a7781b9127ab568d2cdcce62c58fdea7c7407f40b8c50045d7866a2727130","impliedFormat":1},{"version":"4c5e90ddbcd177ad3f2ffc909ae217c87820f1e968f6959e4b6ba38a8cec935e","impliedFormat":1},{"version":"b70dd9a44e1ac42f030bb12e7d79117eac7cb74170d72d381a1e7913320af23a","impliedFormat":1},{"version":"55cdbeebe76a1fa18bbd7e7bf73350a2173926bd3085bb050cf5a5397025ee4e","impliedFormat":1}],"root":[94],"options":{"allowImportingTsExtensions":true,"allowJs":true,"checkJs":false,"composite":true,"declaration":true,"declarationDir":"./lib/types","emitDeclarationOnly":true,"experimentalDecorators":true,"module":99,"outDir":"./lib","rootDir":"./src","skipLibCheck":true,"strict":false,"target":99},"referencedMap":[[157,1],[158,1],[159,2],[97,3],[160,4],[161,5],[162,6],[95,7],[163,8],[164,9],[165,10],[166,11],[167,12],[168,13],[169,13],[170,14],[171,15],[172,16],[173,17],[98,7],[96,7],[174,18],[175,19],[176,20],[217,21],[177,22],[178,23],[179,22],[180,24],[181,25],[183,26],[184,27],[185,27],[186,27],[187,28],[188,29],[189,30],[190,31],[191,32],[192,33],[193,33],[194,34],[195,7],[196,7],[197,35],[198,36],[199,35],[200,37],[201,38],[202,39],[203,40],[204,41],[205,42],[206,43],[207,44],[208,45],[209,46],[210,47],[211,48],[212,49],[213,50],[214,51],[99,22],[100,7],[101,52],[102,53],[103,7],[104,54],[105,7],[148,55],[149,56],[150,57],[151,57],[152,58],[153,7],[154,4],[155,59],[156,56],[215,60],[216,61],[182,7],[91,7],[92,7],[16,7],[14,7],[15,7],[20,7],[19,7],[2,7],[21,7],[22,7],[23,7],[24,7],[25,7],[26,7],[27,7],[28,7],[3,7],[29,7],[30,7],[4,7],[31,7],[35,7],[32,7],[33,7],[34,7],[36,7],[37,7],[38,7],[5,7],[39,7],[40,7],[41,7],[42,7],[6,7],[46,7],[43,7],[44,7],[45,7],[47,7],[7,7],[48,7],[53,7],[54,7],[49,7],[50,7],[51,7],[52,7],[8,7],[58,7],[55,7],[56,7],[57,7],[59,7],[9,7],[60,7],[61,7],[62,7],[64,7],[63,7],[65,7],[66,7],[10,7],[67,7],[68,7],[69,7],[11,7],[70,7],[71,7],[72,7],[73,7],[74,7],[75,7],[12,7],[76,7],[77,7],[78,7],[79,7],[80,7],[1,7],[81,7],[82,7],[13,7],[83,7],[84,7],[85,7],[86,7],[93,7],[87,7],[88,7],[89,7],[90,7],[18,7],[17,7],[124,62],[136,63],[121,64],[137,65],[146,66],[112,67],[113,68],[111,69],[145,70],[140,71],[144,72],[115,73],[133,74],[114,75],[143,76],[109,77],[110,71],[116,78],[117,7],[123,79],[120,78],[107,80],[147,81],[138,82],[127,83],[126,78],[128,84],[131,85],[125,86],[129,87],[141,70],[118,88],[119,89],[132,90],[108,65],[135,91],[134,78],[122,89],[130,92],[139,7],[106,7],[142,93],[94,22]],"latestChangedDtsFile":"./lib/types/index.d.ts","version":"6.0.2"}