@procedures/client 0.2.0 → 0.2.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.
- package/CHANGELOG.md +12 -0
- package/README.md +4 -4
- package/dist/.tsbuildinfo +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/procedures/invoke.d.ts +6 -1
- package/dist/procedures/invoke.d.ts.map +1 -1
- package/dist/procedures/invoke.js +2 -2
- package/dist/procedures/invoke.js.map +1 -1
- package/dist/procedures/schema.d.ts +4 -1
- package/dist/procedures/schema.d.ts.map +1 -1
- package/dist/procedures/schema.js +27 -2
- package/dist/procedures/schema.js.map +1 -1
- package/dist/server/host-policy.d.ts +3 -3
- package/dist/server/host-policy.d.ts.map +1 -1
- package/dist/server/procedure-server.d.ts +2 -2
- package/dist/server/procedure-server.d.ts.map +1 -1
- package/dist/server/procedure-server.js.map +1 -1
- package/package.json +1 -1
- package/src/browser.ts +1 -0
- package/src/procedures/invoke.ts +10 -4
- package/src/procedures/schema.ts +27 -2
- package/src/server/host-policy.ts +3 -3
- package/src/server/procedure-server.ts +2 -2
- package/dist/client/middleware/batching.d.ts +0 -102
- package/dist/client/middleware/batching.d.ts.map +0 -1
- package/dist/client/middleware/batching.js +0 -245
- package/dist/client/middleware/batching.js.map +0 -1
- package/dist/collections/async/async-queue.d.ts +0 -144
- package/dist/collections/async/async-queue.d.ts.map +0 -1
- package/dist/collections/async/async-queue.js +0 -347
- package/dist/collections/async/async-queue.js.map +0 -1
- package/dist/collections/async/channels.d.ts +0 -188
- package/dist/collections/async/channels.d.ts.map +0 -1
- package/dist/collections/async/channels.js +0 -312
- package/dist/collections/async/channels.js.map +0 -1
- package/dist/collections/behaviors/bounded.d.ts +0 -79
- package/dist/collections/behaviors/bounded.d.ts.map +0 -1
- package/dist/collections/behaviors/bounded.js +0 -384
- package/dist/collections/behaviors/bounded.js.map +0 -1
- package/dist/collections/behaviors/evented.d.ts +0 -154
- package/dist/collections/behaviors/evented.d.ts.map +0 -1
- package/dist/collections/behaviors/evented.js +0 -299
- package/dist/collections/behaviors/evented.js.map +0 -1
- package/dist/collections/behaviors/lru.d.ts +0 -84
- package/dist/collections/behaviors/lru.d.ts.map +0 -1
- package/dist/collections/behaviors/lru.js +0 -330
- package/dist/collections/behaviors/lru.js.map +0 -1
- package/dist/collections/behaviors/readonly.d.ts +0 -73
- package/dist/collections/behaviors/readonly.d.ts.map +0 -1
- package/dist/collections/behaviors/readonly.js +0 -158
- package/dist/collections/behaviors/readonly.js.map +0 -1
- package/dist/collections/behaviors/safe.d.ts +0 -163
- package/dist/collections/behaviors/safe.d.ts.map +0 -1
- package/dist/collections/behaviors/safe.js +0 -172
- package/dist/collections/behaviors/safe.js.map +0 -1
- package/dist/collections/behaviors/synchronized.d.ts +0 -88
- package/dist/collections/behaviors/synchronized.d.ts.map +0 -1
- package/dist/collections/behaviors/synchronized.js +0 -294
- package/dist/collections/behaviors/synchronized.js.map +0 -1
- package/dist/collections/behaviors/ttl.d.ts +0 -118
- package/dist/collections/behaviors/ttl.d.ts.map +0 -1
- package/dist/collections/behaviors/ttl.js +0 -338
- package/dist/collections/behaviors/ttl.js.map +0 -1
- package/dist/collections/core/effects.d.ts +0 -176
- package/dist/collections/core/effects.d.ts.map +0 -1
- package/dist/collections/core/effects.js +0 -180
- package/dist/collections/core/effects.js.map +0 -1
- package/dist/collections/core/events.d.ts +0 -192
- package/dist/collections/core/events.d.ts.map +0 -1
- package/dist/collections/core/events.js +0 -291
- package/dist/collections/core/events.js.map +0 -1
- package/dist/collections/core/middleware.d.ts +0 -231
- package/dist/collections/core/middleware.d.ts.map +0 -1
- package/dist/collections/core/middleware.js +0 -161
- package/dist/collections/core/middleware.js.map +0 -1
- package/dist/collections/core/policies.d.ts +0 -220
- package/dist/collections/core/policies.d.ts.map +0 -1
- package/dist/collections/core/policies.js +0 -48
- package/dist/collections/core/policies.js.map +0 -1
- package/dist/collections/core/traits.d.ts +0 -142
- package/dist/collections/core/traits.d.ts.map +0 -1
- package/dist/collections/core/traits.js +0 -8
- package/dist/collections/core/traits.js.map +0 -1
- package/dist/collections/examples.d.ts +0 -13
- package/dist/collections/examples.d.ts.map +0 -1
- package/dist/collections/examples.js +0 -302
- package/dist/collections/examples.js.map +0 -1
- package/dist/collections/fx/collectors.d.ts +0 -190
- package/dist/collections/fx/collectors.d.ts.map +0 -1
- package/dist/collections/fx/collectors.js +0 -369
- package/dist/collections/fx/collectors.js.map +0 -1
- package/dist/collections/fx/iter.d.ts +0 -166
- package/dist/collections/fx/iter.d.ts.map +0 -1
- package/dist/collections/fx/iter.js +0 -421
- package/dist/collections/fx/iter.js.map +0 -1
- package/dist/collections/impl/array-deque.d.ts +0 -107
- package/dist/collections/impl/array-deque.d.ts.map +0 -1
- package/dist/collections/impl/array-deque.js +0 -381
- package/dist/collections/impl/array-deque.js.map +0 -1
- package/dist/collections/impl/array-list.d.ts +0 -101
- package/dist/collections/impl/array-list.d.ts.map +0 -1
- package/dist/collections/impl/array-list.js +0 -387
- package/dist/collections/impl/array-list.js.map +0 -1
- package/dist/collections/impl/hash-map.d.ts +0 -141
- package/dist/collections/impl/hash-map.d.ts.map +0 -1
- package/dist/collections/impl/hash-map.js +0 -450
- package/dist/collections/impl/hash-map.js.map +0 -1
- package/dist/collections/impl/hash-set.d.ts +0 -125
- package/dist/collections/impl/hash-set.d.ts.map +0 -1
- package/dist/collections/impl/hash-set.js +0 -264
- package/dist/collections/impl/hash-set.js.map +0 -1
- package/dist/collections/impl/linked-hash-map.d.ts +0 -141
- package/dist/collections/impl/linked-hash-map.d.ts.map +0 -1
- package/dist/collections/impl/linked-hash-map.js +0 -472
- package/dist/collections/impl/linked-hash-map.js.map +0 -1
- package/dist/collections/impl/linked-list.d.ts +0 -109
- package/dist/collections/impl/linked-list.d.ts.map +0 -1
- package/dist/collections/impl/linked-list.js +0 -491
- package/dist/collections/impl/linked-list.js.map +0 -1
- package/dist/collections/impl/priority-queue.d.ts +0 -134
- package/dist/collections/impl/priority-queue.d.ts.map +0 -1
- package/dist/collections/impl/priority-queue.js +0 -336
- package/dist/collections/impl/priority-queue.js.map +0 -1
- package/dist/collections/impl/tree-map.d.ts +0 -146
- package/dist/collections/impl/tree-map.d.ts.map +0 -1
- package/dist/collections/impl/tree-map.js +0 -781
- package/dist/collections/impl/tree-map.js.map +0 -1
- package/dist/collections/impl/tree-set.d.ts +0 -112
- package/dist/collections/impl/tree-set.d.ts.map +0 -1
- package/dist/collections/impl/tree-set.js +0 -374
- package/dist/collections/impl/tree-set.js.map +0 -1
- package/dist/collections/index.d.ts +0 -105
- package/dist/collections/index.d.ts.map +0 -1
- package/dist/collections/index.js +0 -135
- package/dist/collections/index.js.map +0 -1
- package/dist/collections/interfaces/collection.d.ts +0 -119
- package/dist/collections/interfaces/collection.d.ts.map +0 -1
- package/dist/collections/interfaces/collection.js +0 -8
- package/dist/collections/interfaces/collection.js.map +0 -1
- package/dist/collections/interfaces/list.d.ts +0 -247
- package/dist/collections/interfaces/list.d.ts.map +0 -1
- package/dist/collections/interfaces/list.js +0 -8
- package/dist/collections/interfaces/list.js.map +0 -1
- package/dist/collections/interfaces/map.d.ts +0 -344
- package/dist/collections/interfaces/map.d.ts.map +0 -1
- package/dist/collections/interfaces/map.js +0 -8
- package/dist/collections/interfaces/map.js.map +0 -1
- package/dist/collections/interfaces/queue.d.ts +0 -304
- package/dist/collections/interfaces/queue.d.ts.map +0 -1
- package/dist/collections/interfaces/queue.js +0 -8
- package/dist/collections/interfaces/queue.js.map +0 -1
- package/dist/collections/interfaces/set.d.ts +0 -137
- package/dist/collections/interfaces/set.d.ts.map +0 -1
- package/dist/collections/interfaces/set.js +0 -8
- package/dist/collections/interfaces/set.js.map +0 -1
- package/dist/collections/storage/api.d.ts +0 -109
- package/dist/collections/storage/api.d.ts.map +0 -1
- package/dist/collections/storage/api.js +0 -182
- package/dist/collections/storage/api.js.map +0 -1
- package/dist/collections/storage/hybrid.d.ts +0 -164
- package/dist/collections/storage/hybrid.d.ts.map +0 -1
- package/dist/collections/storage/hybrid.js +0 -416
- package/dist/collections/storage/hybrid.js.map +0 -1
- package/dist/collections/storage/index.d.ts +0 -16
- package/dist/collections/storage/index.d.ts.map +0 -1
- package/dist/collections/storage/index.js +0 -13
- package/dist/collections/storage/index.js.map +0 -1
- package/dist/collections/storage/interface.d.ts +0 -141
- package/dist/collections/storage/interface.d.ts.map +0 -1
- package/dist/collections/storage/interface.js +0 -23
- package/dist/collections/storage/interface.js.map +0 -1
- package/dist/collections/storage/memory.d.ts +0 -68
- package/dist/collections/storage/memory.d.ts.map +0 -1
- package/dist/collections/storage/memory.js +0 -154
- package/dist/collections/storage/memory.js.map +0 -1
- package/dist/collections/utils/defaults.d.ts +0 -135
- package/dist/collections/utils/defaults.d.ts.map +0 -1
- package/dist/collections/utils/defaults.js +0 -322
- package/dist/collections/utils/defaults.js.map +0 -1
- package/dist/collections/utils/factories.d.ts +0 -144
- package/dist/collections/utils/factories.d.ts.map +0 -1
- package/dist/collections/utils/factories.js +0 -293
- package/dist/collections/utils/factories.js.map +0 -1
- package/dist/collections/utils/helpers.d.ts +0 -137
- package/dist/collections/utils/helpers.d.ts.map +0 -1
- package/dist/collections/utils/helpers.js +0 -221
- package/dist/collections/utils/helpers.js.map +0 -1
- package/dist/collections.d.ts +0 -12
- package/dist/collections.d.ts.map +0 -1
- package/dist/collections.js +0 -10
- package/dist/collections.js.map +0 -1
- package/dist/components/define.d.ts +0 -134
- package/dist/components/define.d.ts.map +0 -1
- package/dist/components/define.js +0 -486
- package/dist/components/define.js.map +0 -1
- package/dist/components/index.d.ts +0 -39
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -38
- package/dist/components/index.js.map +0 -1
- package/dist/components/types.d.ts +0 -264
- package/dist/components/types.d.ts.map +0 -1
- package/dist/components/types.js +0 -46
- package/dist/components/types.js.map +0 -1
- package/dist/procedures/storage/adapter.d.ts +0 -148
- package/dist/procedures/storage/adapter.d.ts.map +0 -1
- package/dist/procedures/storage/adapter.js +0 -214
- package/dist/procedures/storage/adapter.js.map +0 -1
- package/dist/procedures/storage/api.d.ts +0 -125
- package/dist/procedures/storage/api.d.ts.map +0 -1
- package/dist/procedures/storage/api.js +0 -220
- package/dist/procedures/storage/api.js.map +0 -1
- package/dist/procedures/storage/factory.d.ts +0 -134
- package/dist/procedures/storage/factory.d.ts.map +0 -1
- package/dist/procedures/storage/factory.js +0 -166
- package/dist/procedures/storage/factory.js.map +0 -1
- package/dist/procedures/storage/hybrid.d.ts +0 -193
- package/dist/procedures/storage/hybrid.d.ts.map +0 -1
- package/dist/procedures/storage/hybrid.js +0 -519
- package/dist/procedures/storage/hybrid.js.map +0 -1
- package/dist/procedures/storage/index.d.ts +0 -17
- package/dist/procedures/storage/index.d.ts.map +0 -1
- package/dist/procedures/storage/index.js +0 -17
- package/dist/procedures/storage/index.js.map +0 -1
- package/dist/procedures/storage/procedures.d.ts +0 -39
- package/dist/procedures/storage/procedures.d.ts.map +0 -1
- package/dist/procedures/storage/procedures.js +0 -261
- package/dist/procedures/storage/procedures.js.map +0 -1
- package/dist/procedures/storage/serialization.d.ts +0 -123
- package/dist/procedures/storage/serialization.d.ts.map +0 -1
- package/dist/procedures/storage/serialization.js +0 -216
- package/dist/procedures/storage/serialization.js.map +0 -1
- package/dist/procedures/storage/synced-registry.d.ts +0 -246
- package/dist/procedures/storage/synced-registry.d.ts.map +0 -1
- package/dist/procedures/storage/synced-registry.js +0 -575
- package/dist/procedures/storage/synced-registry.js.map +0 -1
- package/dist/procedures/storage/types.d.ts +0 -130
- package/dist/procedures/storage/types.d.ts.map +0 -1
- package/dist/procedures/storage/types.js +0 -8
- package/dist/procedures/storage/types.js.map +0 -1
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Synchronized behavior - Provides thread-safe access with mutex locking.
|
|
3
|
-
*
|
|
4
|
-
* Wraps collections to serialize all operations using a mutex, ensuring
|
|
5
|
-
* thread-safe access in concurrent environments. Mirrors Java's
|
|
6
|
-
* Collections.synchronizedList() and related methods.
|
|
7
|
-
*
|
|
8
|
-
* Note: JavaScript is single-threaded, but async operations can interleave.
|
|
9
|
-
* This middleware ensures atomic operations across async boundaries.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* const list = compose(
|
|
13
|
-
* synchronized()
|
|
14
|
-
* )(arrayList<number>())
|
|
15
|
-
*
|
|
16
|
-
* // All operations are now serialized
|
|
17
|
-
* await Promise.all([
|
|
18
|
-
* list.add(1),
|
|
19
|
-
* list.add(2),
|
|
20
|
-
* list.add(3)
|
|
21
|
-
* ])
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Simple mutex implementation for JavaScript async operations.
|
|
25
|
-
*
|
|
26
|
-
* Ensures that only one operation executes at a time, even if
|
|
27
|
-
* multiple async operations are initiated concurrently.
|
|
28
|
-
*/
|
|
29
|
-
class Mutex {
|
|
30
|
-
queue = Promise.resolve();
|
|
31
|
-
/**
|
|
32
|
-
* Acquires the lock and executes the function.
|
|
33
|
-
* Other operations wait until this completes.
|
|
34
|
-
*/
|
|
35
|
-
async lock(fn) {
|
|
36
|
-
const run = this.queue.then(() => fn());
|
|
37
|
-
this.queue = run.then(() => undefined, () => undefined);
|
|
38
|
-
return run;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Synchronous version that executes immediately.
|
|
42
|
-
* Still queues to prevent interleaving with async operations.
|
|
43
|
-
*/
|
|
44
|
-
lockSync(fn) {
|
|
45
|
-
let result;
|
|
46
|
-
let error;
|
|
47
|
-
let hasError = false;
|
|
48
|
-
// Execute synchronously but update queue
|
|
49
|
-
try {
|
|
50
|
-
result = fn();
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
error = e;
|
|
54
|
-
hasError = true;
|
|
55
|
-
}
|
|
56
|
-
// Update the queue to reflect this operation completed
|
|
57
|
-
const completed = Promise.resolve();
|
|
58
|
-
this.queue = this.queue.then(() => completed);
|
|
59
|
-
if (hasError) {
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Creates a synchronized middleware that locks all method calls.
|
|
67
|
-
*
|
|
68
|
-
* Every method call on the collection is wrapped with a mutex,
|
|
69
|
-
* ensuring atomic execution even in concurrent async scenarios.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* const syncList = compose(
|
|
73
|
-
* synchronized()
|
|
74
|
-
* )(arrayList<number>())
|
|
75
|
-
*
|
|
76
|
-
* // These additions are guaranteed to execute in order
|
|
77
|
-
* await Promise.all([
|
|
78
|
-
* syncList.add(1),
|
|
79
|
-
* syncList.add(2),
|
|
80
|
-
* syncList.add(3)
|
|
81
|
-
* ])
|
|
82
|
-
*/
|
|
83
|
-
export function synchronized() {
|
|
84
|
-
return (next) => {
|
|
85
|
-
const mutex = new Mutex();
|
|
86
|
-
return new Proxy(next, {
|
|
87
|
-
get(target, prop, receiver) {
|
|
88
|
-
const value = Reflect.get(target, prop, receiver);
|
|
89
|
-
// Don't wrap non-functions
|
|
90
|
-
if (typeof value !== "function") {
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
// Check if the method is async by checking if it returns a Promise
|
|
94
|
-
return function (...args) {
|
|
95
|
-
// Try to execute synchronously first
|
|
96
|
-
const result = value.apply(target, args);
|
|
97
|
-
// If result is a Promise, wrap with async lock
|
|
98
|
-
if (result instanceof Promise) {
|
|
99
|
-
return mutex.lock(() => result);
|
|
100
|
-
}
|
|
101
|
-
// Otherwise, use sync lock
|
|
102
|
-
return mutex.lockSync(() => result);
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Alias for Java compatibility: synchronizedList
|
|
110
|
-
*/
|
|
111
|
-
export const synchronizedList = synchronized;
|
|
112
|
-
/**
|
|
113
|
-
* Alias for Java compatibility: synchronizedMap
|
|
114
|
-
*/
|
|
115
|
-
export const synchronizedMap = synchronized;
|
|
116
|
-
/**
|
|
117
|
-
* Alias for Java compatibility: synchronizedCollection
|
|
118
|
-
*/
|
|
119
|
-
export const synchronizedCollection = synchronized;
|
|
120
|
-
/**
|
|
121
|
-
* Alias for Java compatibility: synchronizedSet
|
|
122
|
-
*/
|
|
123
|
-
export const synchronizedSet = synchronized;
|
|
124
|
-
/**
|
|
125
|
-
* Advanced synchronized middleware with reentrant locking.
|
|
126
|
-
*
|
|
127
|
-
* Allows the same "thread" (async context) to acquire the lock multiple times.
|
|
128
|
-
* Useful for methods that call other synchronized methods internally.
|
|
129
|
-
*
|
|
130
|
-
* Note: JavaScript doesn't have true thread IDs, so we use async context
|
|
131
|
-
* tracking if available, or fall back to non-reentrant behavior.
|
|
132
|
-
*/
|
|
133
|
-
export function reentrantSynchronized() {
|
|
134
|
-
return (next) => {
|
|
135
|
-
const mutex = new Mutex();
|
|
136
|
-
let lockHolder = null;
|
|
137
|
-
let lockCount = 0;
|
|
138
|
-
return new Proxy(next, {
|
|
139
|
-
get(target, prop, receiver) {
|
|
140
|
-
const value = Reflect.get(target, prop, receiver);
|
|
141
|
-
if (typeof value !== "function") {
|
|
142
|
-
return value;
|
|
143
|
-
}
|
|
144
|
-
return async function (...args) {
|
|
145
|
-
// Generate a unique ID for this call context
|
|
146
|
-
const callerId = Symbol("caller");
|
|
147
|
-
// If we already hold the lock, execute directly (reentrant)
|
|
148
|
-
if (lockHolder === callerId) {
|
|
149
|
-
lockCount++;
|
|
150
|
-
try {
|
|
151
|
-
const result = value.apply(target, args);
|
|
152
|
-
return result instanceof Promise ? await result : result;
|
|
153
|
-
}
|
|
154
|
-
finally {
|
|
155
|
-
lockCount--;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
// Otherwise, acquire the lock
|
|
159
|
-
return mutex.lock(async () => {
|
|
160
|
-
lockHolder = callerId;
|
|
161
|
-
lockCount = 1;
|
|
162
|
-
try {
|
|
163
|
-
const result = value.apply(target, args);
|
|
164
|
-
return result instanceof Promise ? await result : result;
|
|
165
|
-
}
|
|
166
|
-
finally {
|
|
167
|
-
lockCount--;
|
|
168
|
-
if (lockCount === 0) {
|
|
169
|
-
lockHolder = null;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Read-write lock implementation for collections.
|
|
180
|
-
*
|
|
181
|
-
* Allows multiple concurrent readers but exclusive writers.
|
|
182
|
-
* More efficient than full synchronization for read-heavy workloads.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* const list = compose(
|
|
186
|
-
* readWriteLock()
|
|
187
|
-
* )(arrayList<number>())
|
|
188
|
-
*
|
|
189
|
-
* // Multiple reads can happen concurrently
|
|
190
|
-
* await Promise.all([
|
|
191
|
-
* list.get(0),
|
|
192
|
-
* list.get(1),
|
|
193
|
-
* list.get(2)
|
|
194
|
-
* ])
|
|
195
|
-
*/
|
|
196
|
-
export function readWriteLock() {
|
|
197
|
-
return (next) => {
|
|
198
|
-
let readers = 0;
|
|
199
|
-
let writer = false;
|
|
200
|
-
let waitingReaders = [];
|
|
201
|
-
let waitingWriters = [];
|
|
202
|
-
const acquireRead = async () => {
|
|
203
|
-
if (writer || waitingWriters.length > 0) {
|
|
204
|
-
await new Promise((resolve) => waitingReaders.push(resolve));
|
|
205
|
-
}
|
|
206
|
-
readers++;
|
|
207
|
-
};
|
|
208
|
-
const releaseRead = () => {
|
|
209
|
-
readers--;
|
|
210
|
-
if (readers === 0 && waitingWriters.length > 0) {
|
|
211
|
-
writer = true;
|
|
212
|
-
const next = waitingWriters.shift();
|
|
213
|
-
next();
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
const acquireWrite = async () => {
|
|
217
|
-
if (writer || readers > 0) {
|
|
218
|
-
await new Promise((resolve) => waitingWriters.push(resolve));
|
|
219
|
-
}
|
|
220
|
-
writer = true;
|
|
221
|
-
};
|
|
222
|
-
const releaseWrite = () => {
|
|
223
|
-
writer = false;
|
|
224
|
-
if (waitingWriters.length > 0) {
|
|
225
|
-
writer = true;
|
|
226
|
-
const next = waitingWriters.shift();
|
|
227
|
-
next();
|
|
228
|
-
}
|
|
229
|
-
else if (waitingReaders.length > 0) {
|
|
230
|
-
const allReaders = waitingReaders.splice(0);
|
|
231
|
-
readers = allReaders.length;
|
|
232
|
-
allReaders.forEach((resolve) => resolve());
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
// Methods that only read (don't mutate)
|
|
236
|
-
const READ_METHODS = new Set([
|
|
237
|
-
"get",
|
|
238
|
-
"has",
|
|
239
|
-
"contains",
|
|
240
|
-
"containsAll",
|
|
241
|
-
"containsValue",
|
|
242
|
-
"indexOf",
|
|
243
|
-
"lastIndexOf",
|
|
244
|
-
"peek",
|
|
245
|
-
"peekFirst",
|
|
246
|
-
"peekLast",
|
|
247
|
-
"first",
|
|
248
|
-
"last",
|
|
249
|
-
"isEmpty",
|
|
250
|
-
"size",
|
|
251
|
-
"toArray",
|
|
252
|
-
"keys",
|
|
253
|
-
"values",
|
|
254
|
-
"entries",
|
|
255
|
-
"forEach",
|
|
256
|
-
"getOrDefault",
|
|
257
|
-
"getOrUndefined",
|
|
258
|
-
]);
|
|
259
|
-
return new Proxy(next, {
|
|
260
|
-
get(target, prop, receiver) {
|
|
261
|
-
const value = Reflect.get(target, prop, receiver);
|
|
262
|
-
if (typeof value !== "function") {
|
|
263
|
-
return value;
|
|
264
|
-
}
|
|
265
|
-
const isReadMethod = typeof prop === "string" && READ_METHODS.has(prop);
|
|
266
|
-
return async function (...args) {
|
|
267
|
-
if (isReadMethod) {
|
|
268
|
-
// Acquire read lock
|
|
269
|
-
await acquireRead();
|
|
270
|
-
try {
|
|
271
|
-
const result = value.apply(target, args);
|
|
272
|
-
return result instanceof Promise ? await result : result;
|
|
273
|
-
}
|
|
274
|
-
finally {
|
|
275
|
-
releaseRead();
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
// Acquire write lock
|
|
280
|
-
await acquireWrite();
|
|
281
|
-
try {
|
|
282
|
-
const result = value.apply(target, args);
|
|
283
|
-
return result instanceof Promise ? await result : result;
|
|
284
|
-
}
|
|
285
|
-
finally {
|
|
286
|
-
releaseWrite();
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
},
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
//# sourceMappingURL=synchronized.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"synchronized.js","sourceRoot":"","sources":["../../../src/collections/behaviors/synchronized.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;GAKG;AACH,MAAM,KAAK;IACD,KAAK,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAEjD;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAI,EAAwB;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CACnB,GAAG,EAAE,CAAC,SAAS,EACf,GAAG,EAAE,CAAC,SAAS,CAChB,CAAC;QACF,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAI,EAAW;QACrB,IAAI,MAAS,CAAC;QACd,IAAI,KAAU,CAAC;QACf,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,yCAAyC;QACzC,IAAI,CAAC;YACH,MAAM,GAAG,EAAE,EAAE,CAAC;QAChB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,KAAK,GAAG,CA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
|
|
5
|
-
* Perfect for temporary caches and time-limited data.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* const cache = compose(
|
|
9
|
-
* ttlMap({ ttl: 60000 }) // 60 seconds
|
|
10
|
-
* )(hashMap<string, Data>())
|
|
11
|
-
*
|
|
12
|
-
* cache.set('key', data)
|
|
13
|
-
* // After 60 seconds, 'key' is automatically removed
|
|
14
|
-
*/
|
|
15
|
-
import type { Middleware } from "../core/middleware.js";
|
|
16
|
-
import type { MapLike } from "../interfaces/map.js";
|
|
17
|
-
import type { Collection } from "../interfaces/collection.js";
|
|
18
|
-
/**
|
|
19
|
-
* Options for TTL behavior.
|
|
20
|
-
*/
|
|
21
|
-
export interface TTLOptions {
|
|
22
|
-
/**
|
|
23
|
-
* Time-to-live in milliseconds.
|
|
24
|
-
* Elements expire after this duration.
|
|
25
|
-
*/
|
|
26
|
-
ttl: number;
|
|
27
|
-
/**
|
|
28
|
-
* Interval for checking expired elements (in milliseconds).
|
|
29
|
-
* @default 1000 (check every second)
|
|
30
|
-
*/
|
|
31
|
-
checkInterval?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Optional callback invoked when an element expires.
|
|
34
|
-
*/
|
|
35
|
-
onExpire?: (info: {
|
|
36
|
-
key: any;
|
|
37
|
-
value: any;
|
|
38
|
-
createdAt: number;
|
|
39
|
-
expiredAt: number;
|
|
40
|
-
}) => void;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Creates a TTL Map middleware.
|
|
44
|
-
*
|
|
45
|
-
* Automatically removes entries after TTL expires.
|
|
46
|
-
* Uses a background interval to check for expired entries.
|
|
47
|
-
*/
|
|
48
|
-
export declare function ttlMap<K, V>(options: TTLOptions): Middleware<MapLike<K, V> & {
|
|
49
|
-
readonly dispose: () => void;
|
|
50
|
-
}>;
|
|
51
|
-
/**
|
|
52
|
-
* Creates a TTL Collection middleware.
|
|
53
|
-
*
|
|
54
|
-
* Note: This is less precise than TTL map because collections don't have keys.
|
|
55
|
-
* Elements are tracked by reference, which may not work for primitive types.
|
|
56
|
-
*/
|
|
57
|
-
export declare function ttlCollection<T>(options: Omit<TTLOptions, "onExpire"> & {
|
|
58
|
-
onExpire?: (info: {
|
|
59
|
-
element: T;
|
|
60
|
-
createdAt: number;
|
|
61
|
-
expiredAt: number;
|
|
62
|
-
}) => void;
|
|
63
|
-
}): Middleware<Collection<T> & {
|
|
64
|
-
readonly dispose: () => void;
|
|
65
|
-
}>;
|
|
66
|
-
/**
|
|
67
|
-
* Standalone TTL cache with Map-like API.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* const cache = new TTLCache<string, number>(60000) // 60 second TTL
|
|
71
|
-
* cache.set('key', 42)
|
|
72
|
-
* setTimeout(() => {
|
|
73
|
-
* cache.get('key') // undefined (expired)
|
|
74
|
-
* }, 61000)
|
|
75
|
-
*/
|
|
76
|
-
export declare class TTLCache<K, V> {
|
|
77
|
-
private readonly ttl;
|
|
78
|
-
private readonly checkInterval;
|
|
79
|
-
private readonly onExpire?;
|
|
80
|
-
private map;
|
|
81
|
-
private intervalId;
|
|
82
|
-
constructor(ttl: number, checkInterval?: number, onExpire?: ((key: K, value: V) => void) | undefined);
|
|
83
|
-
get size(): number;
|
|
84
|
-
get(key: K): V | undefined;
|
|
85
|
-
set(key: K, value: V, customTTL?: number): void;
|
|
86
|
-
has(key: K): boolean;
|
|
87
|
-
delete(key: K): boolean;
|
|
88
|
-
clear(): void;
|
|
89
|
-
/**
|
|
90
|
-
* Manually trigger cleanup of expired entries.
|
|
91
|
-
*/
|
|
92
|
-
cleanup(): void;
|
|
93
|
-
/**
|
|
94
|
-
* Get remaining TTL for a key in milliseconds.
|
|
95
|
-
* Returns undefined if key doesn't exist or is expired.
|
|
96
|
-
*/
|
|
97
|
-
getTTL(key: K): number | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Update TTL for an existing key.
|
|
100
|
-
*/
|
|
101
|
-
touch(key: K, customTTL?: number): boolean;
|
|
102
|
-
private startExpirationCheck;
|
|
103
|
-
/**
|
|
104
|
-
* Stop the background expiration checker and clean up.
|
|
105
|
-
*/
|
|
106
|
-
dispose(): void;
|
|
107
|
-
keys(): IterableIterator<K>;
|
|
108
|
-
values(): IterableIterator<V>;
|
|
109
|
-
entries(): IterableIterator<[K, V]>;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Factory function to create a TTL cache.
|
|
113
|
-
*/
|
|
114
|
-
export declare function ttlCache<K, V>(ttl: number, options?: {
|
|
115
|
-
checkInterval?: number;
|
|
116
|
-
onExpire?: (key: K, value: V) => void;
|
|
117
|
-
}): TTLCache<K, V>;
|
|
118
|
-
//# sourceMappingURL=ttl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ttl.d.ts","sourceRoot":"","sources":["../../../src/collections/behaviors/ttl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC3F;AAWD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EACzB,OAAO,EAAE,UAAU,GAClB,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;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