@actualwave/deferred-data-access 2.0.0 → 2.1.1
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 +400 -27
- package/SKILL.md +106 -0
- package/command/index.d.ts.map +1 -0
- package/command/index.es.js +98 -0
- package/command/index.es.js.map +1 -0
- package/command/index.js +102 -4
- package/command/index.js.map +1 -1
- package/command/package.json +4 -1
- package/command/src/command-chain.d.ts +8 -1
- package/command/src/command-chain.d.ts.map +1 -0
- package/command/src/command-chain.js +9 -0
- package/command/src/command-chain.js.map +1 -1
- package/command/src/command-handler.d.ts.map +1 -0
- package/command/src/command.d.ts +2 -2
- package/command/src/command.d.ts.map +1 -0
- package/command/src/command.js +5 -6
- package/command/src/command.js.map +1 -1
- package/core/core.d.ts.map +1 -0
- package/core/core.js +23 -25
- package/core/core.js.map +1 -1
- package/core/index.d.ts.map +1 -0
- package/deferred-data-access.umd.js +2 -0
- package/deferred-data-access.umd.js.map +1 -0
- package/index.d.ts.map +1 -0
- package/{dist/deferred-data-access.js → index.es.js} +199 -138
- package/index.es.js.map +1 -0
- package/index.js +627 -2
- package/index.js.map +1 -1
- package/interface/index.d.ts.map +1 -0
- package/interface/index.es.js +380 -0
- package/interface/index.es.js.map +1 -0
- package/interface/index.js +396 -7
- package/interface/index.js.map +1 -1
- package/interface/package.json +4 -1
- package/interface/src/handshake.d.ts.map +1 -0
- package/interface/src/handshake.js +6 -4
- package/interface/src/handshake.js.map +1 -1
- package/interface/src/helpers.d.ts.map +1 -0
- package/interface/src/intialize.d.ts +5 -2
- package/interface/src/intialize.d.ts.map +1 -0
- package/interface/src/intialize.js +37 -57
- package/interface/src/intialize.js.map +1 -1
- package/interface/src/request.d.ts +3 -2
- package/interface/src/request.d.ts.map +1 -0
- package/interface/src/request.js +39 -29
- package/interface/src/request.js.map +1 -1
- package/interface/src/types.d.ts.map +1 -0
- package/interface/src/utils.d.ts +2 -2
- package/interface/src/utils.d.ts.map +1 -0
- package/interface/src/utils.js +44 -29
- package/interface/src/utils.js.map +1 -1
- package/package.json +7 -6
- package/proxy/index.d.ts.map +1 -0
- package/proxy/index.es.js +144 -0
- package/proxy/index.es.js.map +1 -0
- package/proxy/index.js +155 -5
- package/proxy/index.js.map +1 -1
- package/proxy/package.json +4 -1
- package/proxy/src/command.d.ts.map +1 -0
- package/proxy/src/proxy.d.ts +2 -2
- package/proxy/src/proxy.d.ts.map +1 -0
- package/proxy/src/proxy.js +13 -3
- package/proxy/src/proxy.js.map +1 -1
- package/proxy/src/traps.d.ts +1 -1
- package/proxy/src/traps.d.ts.map +1 -0
- package/proxy/src/traps.js +4 -14
- package/proxy/src/traps.js.map +1 -1
- package/proxy/src/types.d.ts.map +1 -0
- package/proxy/src/utils.d.ts +6 -0
- package/proxy/src/utils.d.ts.map +1 -0
- package/proxy/src/utils.js +11 -5
- package/proxy/src/utils.js.map +1 -1
- package/record/index.d.ts.map +1 -0
- package/record/index.es.js +26 -0
- package/record/index.es.js.map +1 -0
- package/record/index.js +31 -2
- package/record/index.js.map +1 -1
- package/record/package.json +4 -1
- package/record/record.d.ts +2 -2
- package/record/record.d.ts.map +1 -0
- package/record/record.js +9 -3
- package/record/record.js.map +1 -1
- package/resource/index.d.ts +1 -0
- package/resource/index.d.ts.map +1 -0
- package/resource/index.es.js +191 -0
- package/resource/index.es.js.map +1 -0
- package/resource/index.js +206 -6
- package/resource/index.js.map +1 -1
- package/resource/package.json +4 -1
- package/resource/src/default-resource-pool.d.ts +1 -0
- package/resource/src/default-resource-pool.d.ts.map +1 -0
- package/resource/src/default-resource-pool.js +8 -5
- package/resource/src/default-resource-pool.js.map +1 -1
- package/resource/src/finalization-registry.d.ts +13 -0
- package/resource/src/finalization-registry.d.ts.map +1 -0
- package/resource/src/finalization-registry.js +18 -0
- package/resource/src/finalization-registry.js.map +1 -0
- package/resource/src/resource-pool-registry.d.ts +1 -0
- package/resource/src/resource-pool-registry.d.ts.map +1 -0
- package/resource/src/resource-pool-registry.js +10 -8
- package/resource/src/resource-pool-registry.js.map +1 -1
- package/resource/src/resource-pool.d.ts +8 -1
- package/resource/src/resource-pool.d.ts.map +1 -0
- package/resource/src/resource-pool.js +29 -17
- package/resource/src/resource-pool.js.map +1 -1
- package/resource/src/resource.d.ts +1 -1
- package/resource/src/resource.d.ts.map +1 -0
- package/resource/src/resource.js +3 -2
- package/resource/src/resource.js.map +1 -1
- package/resource/src/utils.d.ts +1 -1
- package/resource/src/utils.d.ts.map +1 -0
- package/resource/src/utils.js +9 -1
- package/resource/src/utils.js.map +1 -1
- package/utils/index.d.ts.map +1 -0
- package/utils/index.es.js +48 -0
- package/utils/index.es.js.map +1 -0
- package/utils/index.js +54 -3
- package/utils/index.js.map +1 -1
- package/utils/package.json +4 -1
- package/utils/src/types.d.ts +3 -3
- package/utils/src/types.d.ts.map +1 -0
- package/utils/src/utils.d.ts +18 -2
- package/utils/src/utils.d.ts.map +1 -0
- package/utils/src/utils.js +28 -4
- package/utils/src/utils.js.map +1 -1
- package/dist/deferred-data-access.js.map +0 -1
- package/dist/deferred-data-access.umd.js +0 -2
- package/dist/deferred-data-access.umd.js.map +0 -1
package/index.js
CHANGED
|
@@ -1,2 +1,627 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var weakStorage = require('@actualwave/weak-storage');
|
|
4
|
+
|
|
5
|
+
class Command {
|
|
6
|
+
constructor(type, name, value, context) {
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.value = value;
|
|
10
|
+
this.context = context;
|
|
11
|
+
Object.defineProperty(this, 'type', { value: type, writable: false, configurable: false });
|
|
12
|
+
Object.defineProperty(this, 'name', { value: name, writable: false, configurable: false });
|
|
13
|
+
}
|
|
14
|
+
toObject(includeContext = false) {
|
|
15
|
+
const { type, name, value, context } = this;
|
|
16
|
+
return {
|
|
17
|
+
type,
|
|
18
|
+
name,
|
|
19
|
+
value,
|
|
20
|
+
context: includeContext ? context : undefined,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
toJSON(includeContext = false) {
|
|
24
|
+
const { type, name, value, context } = this;
|
|
25
|
+
return includeContext
|
|
26
|
+
? JSON.stringify([type, name, value, context])
|
|
27
|
+
: JSON.stringify([type, name, value]);
|
|
28
|
+
}
|
|
29
|
+
static fromJSON(jsonString) {
|
|
30
|
+
const [type, name, value, context] = JSON.parse(jsonString);
|
|
31
|
+
return new Command(type, name, value, context);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
class CommandChain extends Command {
|
|
36
|
+
constructor(prev, type, name, value, context) {
|
|
37
|
+
super(type, name, value, context);
|
|
38
|
+
this.prev = prev;
|
|
39
|
+
}
|
|
40
|
+
*[Symbol.iterator]() {
|
|
41
|
+
let item = this;
|
|
42
|
+
while (item) {
|
|
43
|
+
yield item;
|
|
44
|
+
item = item.prev;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
isTail() {
|
|
48
|
+
return !this.prev;
|
|
49
|
+
}
|
|
50
|
+
forEach(callback) {
|
|
51
|
+
let node = this;
|
|
52
|
+
do {
|
|
53
|
+
callback(node);
|
|
54
|
+
node = node.prev;
|
|
55
|
+
} while (node);
|
|
56
|
+
}
|
|
57
|
+
map(callback) {
|
|
58
|
+
let node = this;
|
|
59
|
+
const list = [];
|
|
60
|
+
do {
|
|
61
|
+
list.push(callback(node));
|
|
62
|
+
node = node.prev;
|
|
63
|
+
} while (node);
|
|
64
|
+
return list;
|
|
65
|
+
}
|
|
66
|
+
reduce(callback, base) {
|
|
67
|
+
let node = this;
|
|
68
|
+
let result = base;
|
|
69
|
+
do {
|
|
70
|
+
result = callback(result, node);
|
|
71
|
+
node = node.prev;
|
|
72
|
+
} while (node);
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Returns a new CommandChain that is identical to this one but with the
|
|
77
|
+
* `prev` link severed, rather than mutating the existing instance in-place.
|
|
78
|
+
* Use this instead of `delete command.prev` to avoid corrupting shared chain
|
|
79
|
+
* references held by other code.
|
|
80
|
+
*/
|
|
81
|
+
withoutPrev() {
|
|
82
|
+
return new CommandChain(undefined, this.type, this.name, this.value, this.context);
|
|
83
|
+
}
|
|
84
|
+
static fromCommand({ type, name, value, context }, prev) {
|
|
85
|
+
return new CommandChain(prev, type, name, value, context);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
Creates a function that calls handler depending on command type
|
|
91
|
+
*/
|
|
92
|
+
const createCommandHandler = ({ handlers, defaultHandler, }) => (command, ...args) => {
|
|
93
|
+
const { type } = command;
|
|
94
|
+
const handler = (handlers && handlers[type]) || defaultHandler;
|
|
95
|
+
if (handler) {
|
|
96
|
+
return handler(command, ...args);
|
|
97
|
+
}
|
|
98
|
+
return Promise.resolve(undefined);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// Subtract a small random offset so IDs generated in the same millisecond
|
|
102
|
+
// across separate module loads remain unique.
|
|
103
|
+
const DATE_NOW = Date.now() - Math.floor(Math.random() * 1000);
|
|
104
|
+
let index = 0;
|
|
105
|
+
exports.ReservedPropertyNames = void 0;
|
|
106
|
+
(function (ReservedPropertyNames) {
|
|
107
|
+
ReservedPropertyNames["THEN"] = "then";
|
|
108
|
+
ReservedPropertyNames["CATCH"] = "catch";
|
|
109
|
+
})(exports.ReservedPropertyNames || (exports.ReservedPropertyNames = {}));
|
|
110
|
+
/**
|
|
111
|
+
* Returns true only for string property names that match reserved Promise
|
|
112
|
+
* method names. Symbol names are never reserved — they always pass through
|
|
113
|
+
* to the proxy handler.
|
|
114
|
+
*/
|
|
115
|
+
const isReservedPropertyName = (name) => typeof name === 'string' &&
|
|
116
|
+
(name === exports.ReservedPropertyNames.THEN || name === exports.ReservedPropertyNames.CATCH);
|
|
117
|
+
/**
|
|
118
|
+
* Returns a rejected Promise. Throws the message as a value (not an Error
|
|
119
|
+
* instance) to preserve the original behaviour expected by callers.
|
|
120
|
+
*/
|
|
121
|
+
const reject = (message) => Promise.reject(message);
|
|
122
|
+
/**
|
|
123
|
+
* Returns a function that generates monotonically increasing unique IDs.
|
|
124
|
+
* All generators in this module share the same counter so IDs are globally
|
|
125
|
+
* unique within a single process.
|
|
126
|
+
*
|
|
127
|
+
* @param key - Optional namespace prefix included in every generated ID.
|
|
128
|
+
*/
|
|
129
|
+
const createUIDGenerator = (key = '') => {
|
|
130
|
+
const prefix = `${key ? `${key}/` : ''}${DATE_NOW}/`;
|
|
131
|
+
return () => `${prefix}${++index};`;
|
|
132
|
+
};
|
|
133
|
+
const generateId = createUIDGenerator();
|
|
134
|
+
class IdOwner {
|
|
135
|
+
constructor(id = generateId()) {
|
|
136
|
+
this.id = id;
|
|
137
|
+
// Prevent external mutation while remaining compatible with subclasses
|
|
138
|
+
// that call super() without explicitly sealing.
|
|
139
|
+
Object.defineProperty(this, 'id', {
|
|
140
|
+
value: this.id,
|
|
141
|
+
writable: false,
|
|
142
|
+
configurable: false,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
exports.ProxyCommand = void 0;
|
|
148
|
+
(function (ProxyCommand) {
|
|
149
|
+
ProxyCommand["GET"] = "P:get";
|
|
150
|
+
ProxyCommand["SET"] = "P:set";
|
|
151
|
+
ProxyCommand["APPLY"] = "P:apply";
|
|
152
|
+
ProxyCommand["DELETE_PROPERTY"] = "P:del";
|
|
153
|
+
// If proxy works in lazy mode and APPLY command has previous GET command, this will be generated.
|
|
154
|
+
ProxyCommand["METHOD_CALL"] = "P:call";
|
|
155
|
+
})(exports.ProxyCommand || (exports.ProxyCommand = {}));
|
|
156
|
+
const generateProxyCommand = (head, type, name, value, context, lazy) => {
|
|
157
|
+
if (type === exports.ProxyCommand.APPLY && lazy && head?.type === exports.ProxyCommand.GET) {
|
|
158
|
+
return new CommandChain(head.prev, exports.ProxyCommand.METHOD_CALL, head.name, value, head.context);
|
|
159
|
+
}
|
|
160
|
+
return new CommandChain(head, type, name, value, context);
|
|
161
|
+
};
|
|
162
|
+
const getMethodName = ({ prev }) => prev?.name;
|
|
163
|
+
const getMethodCallContext = ({ prev }) => prev?.context;
|
|
164
|
+
|
|
165
|
+
const EXCLUSIONS = {
|
|
166
|
+
/*
|
|
167
|
+
INFO arguments and caller were included because they are required function properties
|
|
168
|
+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/arguments
|
|
169
|
+
*/
|
|
170
|
+
arguments: true,
|
|
171
|
+
caller: true,
|
|
172
|
+
prototype: true,
|
|
173
|
+
};
|
|
174
|
+
const API_PROP = Symbol('P:api');
|
|
175
|
+
|
|
176
|
+
const wrapWithProxy = (
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
178
|
+
target, traps, api = {}) => {
|
|
179
|
+
// Always use a function as the wrapper so the Proxy can intercept `apply`.
|
|
180
|
+
// For non-function targets the wrapper body is intentionally empty — it is
|
|
181
|
+
// never actually called; the apply trap intercepts all invocations first.
|
|
182
|
+
const wrapper = Object.assign(typeof target === 'function'
|
|
183
|
+
? function $RequestFn(...args) {
|
|
184
|
+
return target.apply(this, args);
|
|
185
|
+
}
|
|
186
|
+
: function $Request() {
|
|
187
|
+
/* intentionally empty — apply trap handles all calls */
|
|
188
|
+
}, {
|
|
189
|
+
target,
|
|
190
|
+
[API_PROP]: { getTarget: () => target, ...api },
|
|
191
|
+
});
|
|
192
|
+
return new Proxy(wrapper, traps);
|
|
193
|
+
};
|
|
194
|
+
const isWrappedWithProxy = (obj) => obj != null && typeof obj === 'object' || typeof obj === 'function'
|
|
195
|
+
? !!(obj && obj[API_PROP])
|
|
196
|
+
: false;
|
|
197
|
+
const unwrapProxy = (obj) => {
|
|
198
|
+
if (obj != null && obj[API_PROP]) {
|
|
199
|
+
return obj[API_PROP].getTarget();
|
|
200
|
+
}
|
|
201
|
+
return obj;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const isNameExcluded = (name) => name === API_PROP || Object.hasOwn(EXCLUSIONS, name);
|
|
205
|
+
const isNameSymbol = (name) => typeof name === 'symbol';
|
|
206
|
+
/**
|
|
207
|
+
* Walks a CommandChain and resolves it against a live target.
|
|
208
|
+
* Only GET and APPLY commands are supported — all other command types
|
|
209
|
+
* (SET, DELETE_PROPERTY, METHOD_CALL) are write/side-effect operations
|
|
210
|
+
* that cannot be replayed safely and will throw.
|
|
211
|
+
*/
|
|
212
|
+
const followCommandChain = async (head,
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
214
|
+
context) => {
|
|
215
|
+
let target = context;
|
|
216
|
+
if (context === undefined) {
|
|
217
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
|
+
target = head.prev
|
|
219
|
+
? await followCommandChain(head.prev)
|
|
220
|
+
: await head.context;
|
|
221
|
+
}
|
|
222
|
+
const { type, name, value } = head;
|
|
223
|
+
switch (type) {
|
|
224
|
+
case exports.ProxyCommand.GET:
|
|
225
|
+
return target[name];
|
|
226
|
+
case exports.ProxyCommand.APPLY:
|
|
227
|
+
return target.apply(getMethodCallContext(head), value);
|
|
228
|
+
default:
|
|
229
|
+
throw new Error(`Command "${type}" cannot be followed. Only ProxyCommand.GET and ProxyCommand.APPLY are supported by followCommandChain.`);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const createGetTrap = (handler) => (wrapper, name) => {
|
|
234
|
+
const { target } = wrapper;
|
|
235
|
+
if (isNameExcluded(name)) {
|
|
236
|
+
return wrapper[name];
|
|
237
|
+
}
|
|
238
|
+
// We expect that user of the lib will wrap with Proxy explicitly whatever they want
|
|
239
|
+
return handler(exports.ProxyCommand.GET, name, undefined, target);
|
|
240
|
+
};
|
|
241
|
+
const createApplyTrap = (handler) => ({ target }, thisValue, args) => {
|
|
242
|
+
// thisValue is being ignored for now
|
|
243
|
+
// target is a function that should be applied
|
|
244
|
+
return handler(exports.ProxyCommand.APPLY, undefined, args, target);
|
|
245
|
+
};
|
|
246
|
+
const createSetTrap = (handler) => ({ target }, name, value) => {
|
|
247
|
+
if (isNameExcluded(name)) {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
handler(exports.ProxyCommand.SET, name, value, target);
|
|
251
|
+
return true;
|
|
252
|
+
};
|
|
253
|
+
const createDeletePropertyTrap = (handler) => (wrapper, name) => {
|
|
254
|
+
if (isNameExcluded(name)) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
handler(exports.ProxyCommand.DELETE_PROPERTY, name, undefined, wrapper.target);
|
|
258
|
+
return true;
|
|
259
|
+
};
|
|
260
|
+
const proxyHasTrap = (wrapper, name) => {
|
|
261
|
+
if (isNameExcluded(name)) {
|
|
262
|
+
return wrapper[name];
|
|
263
|
+
}
|
|
264
|
+
// Because of this, Promise does not call ProxyWrapper.then() and just returns it.
|
|
265
|
+
// If changed to true, it will subscribe to ProxyWrapper.then() and wait for it to resolve.
|
|
266
|
+
return false;
|
|
267
|
+
};
|
|
268
|
+
const proxyOwnKeysTrap = () => Object.getOwnPropertyNames(EXCLUSIONS);
|
|
269
|
+
const proxyGetOwnPropertyDescriptorTrap = (wrapper, name) => {
|
|
270
|
+
if (isNameExcluded(name)) {
|
|
271
|
+
return Object.getOwnPropertyDescriptor(wrapper, name);
|
|
272
|
+
}
|
|
273
|
+
return Object.getOwnPropertyDescriptor(wrapper.target, name);
|
|
274
|
+
};
|
|
275
|
+
const createProxyTrapsObject = (handler) => ({
|
|
276
|
+
get: createGetTrap(handler),
|
|
277
|
+
apply: createApplyTrap(handler),
|
|
278
|
+
set: createSetTrap(handler),
|
|
279
|
+
deleteProperty: createDeletePropertyTrap(handler),
|
|
280
|
+
has: proxyHasTrap,
|
|
281
|
+
ownKeys: proxyOwnKeysTrap,
|
|
282
|
+
// NOTE: `enumerate` trap was removed from the ES Proxy spec and is a no-op
|
|
283
|
+
// in all modern runtimes — removed to avoid confusion.
|
|
284
|
+
getOwnPropertyDescriptor: proxyGetOwnPropertyDescriptorTrap,
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
const EMPTY_PROMISE = Promise.resolve(undefined);
|
|
288
|
+
const isPromiseActivity = (command) => {
|
|
289
|
+
const { type } = command;
|
|
290
|
+
if (type === exports.ProxyCommand.GET || type === exports.ProxyCommand.METHOD_CALL) {
|
|
291
|
+
return isReservedPropertyName(command.name);
|
|
292
|
+
}
|
|
293
|
+
if (type === exports.ProxyCommand.APPLY) {
|
|
294
|
+
return isReservedPropertyName(command.prev?.name);
|
|
295
|
+
}
|
|
296
|
+
return false;
|
|
297
|
+
};
|
|
298
|
+
const executePromiseMethod = (context, name, args) => {
|
|
299
|
+
switch (name) {
|
|
300
|
+
case exports.ReservedPropertyNames.THEN:
|
|
301
|
+
return context.then(...args);
|
|
302
|
+
case exports.ReservedPropertyNames.CATCH:
|
|
303
|
+
return context.catch(...args);
|
|
304
|
+
default:
|
|
305
|
+
throw new Error(`Unexpected Error: Promise method "${String(name)}" could not be called.`);
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
const applyPromiseActivity = (command, commandHandler, lazy, wrap, rawContext) => {
|
|
309
|
+
switch (command.type) {
|
|
310
|
+
case exports.ProxyCommand.GET: {
|
|
311
|
+
const { name, prev } = command;
|
|
312
|
+
let { context } = command;
|
|
313
|
+
if (lazy) {
|
|
314
|
+
if (!prev) {
|
|
315
|
+
// Root lazy access to a reserved name (then/catch) — no chain to resolve
|
|
316
|
+
// through, so use the raw context (the promise passed to wrap) directly.
|
|
317
|
+
context = rawContext;
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
// When lazy, context is a dummy promise, so we call handler with the previous
|
|
321
|
+
// command and use the result as the context to subscribe to.
|
|
322
|
+
context = commandHandler(prev, prev.context, wrap);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
// When not lazy, context is already the live promise result — subscribe directly.
|
|
326
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
327
|
+
return (...args) => context[name](...args);
|
|
328
|
+
}
|
|
329
|
+
case exports.ProxyCommand.METHOD_CALL:
|
|
330
|
+
if (!command.context) {
|
|
331
|
+
throw new Error(`Unexpected Error: Could not apply Promise method of unknown context.`);
|
|
332
|
+
}
|
|
333
|
+
return executePromiseMethod(command.context, command.name, command.value);
|
|
334
|
+
case exports.ProxyCommand.APPLY: {
|
|
335
|
+
const { prev } = command;
|
|
336
|
+
if (!prev?.context || !prev?.name) {
|
|
337
|
+
throw new Error(`Unexpected Error: Could not apply Promise method of unknown context.`);
|
|
338
|
+
}
|
|
339
|
+
return executePromiseMethod(prev.context, prev.name, command.value);
|
|
340
|
+
}
|
|
341
|
+
default:
|
|
342
|
+
throw new Error(`Command type "${command.type}" could not be executed as a Promise command.`);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
const handle = (commandHandler, lazy = true) => (context, command) => {
|
|
346
|
+
const wrap = (context, command) => {
|
|
347
|
+
const traps = createProxyTrapsObject((type, name, value, context) => {
|
|
348
|
+
const childCommand = generateProxyCommand(command, type, name, value, context, lazy);
|
|
349
|
+
let result;
|
|
350
|
+
if (isPromiseActivity(childCommand)) {
|
|
351
|
+
return applyPromiseActivity(childCommand, commandHandler, lazy, wrap, context);
|
|
352
|
+
}
|
|
353
|
+
else if ((type === exports.ProxyCommand.APPLY || type === exports.ProxyCommand.GET) &&
|
|
354
|
+
lazy) {
|
|
355
|
+
result = EMPTY_PROMISE;
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
result = commandHandler(childCommand, context, wrap);
|
|
359
|
+
}
|
|
360
|
+
// anything coming not from Promise methods is always wrapped
|
|
361
|
+
return wrap(result, childCommand);
|
|
362
|
+
});
|
|
363
|
+
return wrapWithProxy(context, traps, {
|
|
364
|
+
getCommand() {
|
|
365
|
+
return command;
|
|
366
|
+
},
|
|
367
|
+
/**
|
|
368
|
+
* Returns a new chain with the prev link severed rather than mutating
|
|
369
|
+
* the existing command in-place. Safe for callers holding references.
|
|
370
|
+
*/
|
|
371
|
+
dropCommandChain() {
|
|
372
|
+
if (command) {
|
|
373
|
+
// Replace the reference with a severed copy rather than mutating
|
|
374
|
+
command = command.withoutPrev?.() ?? command;
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
return wrap(Promise.resolve(context), command ? CommandChain.fromCommand(command) : undefined);
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
let finalizationRegistryClass;
|
|
383
|
+
/**
|
|
384
|
+
* Returns class of a custom FinalizationRegistry if set with setCustomFinalizationRegistryClass()
|
|
385
|
+
* @returns {IFinalizationRegistryConstructor}
|
|
386
|
+
*/
|
|
387
|
+
const getCustomFinalizationRegistryClass = () => {
|
|
388
|
+
return finalizationRegistryClass;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Allows to setup custom FinalizationRegistry in environments where
|
|
392
|
+
* it is not available natively. It is used to cleanup stored weak
|
|
393
|
+
* references in ResourcePools.
|
|
394
|
+
* @param definition FinalizationRegistry, its mock or polyfill, etc.
|
|
395
|
+
*/
|
|
396
|
+
const setCustomFinalizationRegistryClass = (definition) => {
|
|
397
|
+
finalizationRegistryClass = definition;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
class Resource extends IdOwner {
|
|
401
|
+
constructor(pool, type) {
|
|
402
|
+
super();
|
|
403
|
+
this.pool = pool;
|
|
404
|
+
this.type = type;
|
|
405
|
+
Object.defineProperty(this, 'pool', { value: pool, writable: false, configurable: false });
|
|
406
|
+
Object.defineProperty(this, 'type', { value: type, writable: false, configurable: false });
|
|
407
|
+
}
|
|
408
|
+
toObject() {
|
|
409
|
+
return { id: this.id, poolId: this.pool.id, type: this.type };
|
|
410
|
+
}
|
|
411
|
+
toJSON() {
|
|
412
|
+
return JSON.stringify(this.toObject());
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
const createResource = (pool, target, type) => new Resource(pool, type || typeof target);
|
|
416
|
+
const isResourceObject = (obj) => obj != null &&
|
|
417
|
+
typeof obj === 'object' &&
|
|
418
|
+
typeof obj.id === 'string' &&
|
|
419
|
+
typeof obj.poolId === 'string';
|
|
420
|
+
|
|
421
|
+
// Valid target types are scoped per-module and intentionally not shared across
|
|
422
|
+
// ResourcePool instances. If you need per-pool validity rules, pass a custom
|
|
423
|
+
// isValidTarget predicate into ResourcePool directly.
|
|
424
|
+
const validTargets = new Set();
|
|
425
|
+
const getDefaultValidTargets = () => ['object', 'function'];
|
|
426
|
+
const isValidTarget = (value) => {
|
|
427
|
+
// typeof null === 'object' but null cannot be used as a WeakMap key
|
|
428
|
+
if (value === null)
|
|
429
|
+
return false;
|
|
430
|
+
return validTargets.has(typeof value);
|
|
431
|
+
};
|
|
432
|
+
const setValidTargets = (list) => {
|
|
433
|
+
validTargets.clear();
|
|
434
|
+
list.forEach((item) => validTargets.add(item));
|
|
435
|
+
};
|
|
436
|
+
setValidTargets(getDefaultValidTargets());
|
|
437
|
+
|
|
438
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
439
|
+
class ResourcePool extends IdOwner {
|
|
440
|
+
constructor(FinalizationRegistry = getCustomFinalizationRegistryClass()) {
|
|
441
|
+
super();
|
|
442
|
+
// target → Resource: allows lookup by target object
|
|
443
|
+
this.resources = new WeakMap();
|
|
444
|
+
this.refs = new weakStorage.WeakValueMap(FinalizationRegistry);
|
|
445
|
+
}
|
|
446
|
+
get active() {
|
|
447
|
+
return !!this.resources;
|
|
448
|
+
}
|
|
449
|
+
set(target, type) {
|
|
450
|
+
if (!isValidTarget(target)) {
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
const existing = this.resources.get(target);
|
|
454
|
+
if (existing) {
|
|
455
|
+
return existing;
|
|
456
|
+
}
|
|
457
|
+
const resource = createResource(this, target, type);
|
|
458
|
+
this.refs.set(resource.id, target);
|
|
459
|
+
this.resources.set(target, resource);
|
|
460
|
+
return resource;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Returns true only when the target is registered AND its weakref is still
|
|
464
|
+
* alive. Checks both maps to avoid the asymmetry where WeakMap.has() returns
|
|
465
|
+
* true for a target whose WeakValueMap entry has already been collected.
|
|
466
|
+
*/
|
|
467
|
+
has(target) {
|
|
468
|
+
if (!this.resources.has(target)) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
const resource = this.resources.get(target);
|
|
472
|
+
// Confirm the forward ref is still alive too
|
|
473
|
+
return resource !== undefined && this.refs.get(resource.id) !== undefined;
|
|
474
|
+
}
|
|
475
|
+
get({ id }) {
|
|
476
|
+
return this.getById(id);
|
|
477
|
+
}
|
|
478
|
+
getById(id) {
|
|
479
|
+
return this.refs.get(id);
|
|
480
|
+
}
|
|
481
|
+
getResource(target) {
|
|
482
|
+
return this.resources.get(target);
|
|
483
|
+
}
|
|
484
|
+
remove(target) {
|
|
485
|
+
const resource = this.resources.get(target);
|
|
486
|
+
if (resource) {
|
|
487
|
+
this.refs.delete(resource.id);
|
|
488
|
+
return this.resources.delete(target);
|
|
489
|
+
}
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
clear() {
|
|
493
|
+
this.refs.forEach((_value, key) => {
|
|
494
|
+
const target = this.refs.get(key);
|
|
495
|
+
if (target !== undefined) {
|
|
496
|
+
this.resources.delete(target);
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
this.refs.clear();
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
let defaultResourcePool;
|
|
504
|
+
const getDefaultResourcePool = () => {
|
|
505
|
+
if (!defaultResourcePool) {
|
|
506
|
+
defaultResourcePool = new ResourcePool();
|
|
507
|
+
}
|
|
508
|
+
return defaultResourcePool;
|
|
509
|
+
};
|
|
510
|
+
const setDefaultResourcePool = (pool) => {
|
|
511
|
+
defaultResourcePool = pool;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
class ResourcePoolRegistry extends IdOwner {
|
|
515
|
+
constructor() {
|
|
516
|
+
super();
|
|
517
|
+
this.pools = {};
|
|
518
|
+
this.register(getDefaultResourcePool());
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Create and register ResourcePool
|
|
522
|
+
*/
|
|
523
|
+
createPool() {
|
|
524
|
+
const pool = new ResourcePool();
|
|
525
|
+
this.register(pool);
|
|
526
|
+
return pool;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Register ResourcePool instance.
|
|
530
|
+
*/
|
|
531
|
+
register(pool) {
|
|
532
|
+
if (Object.hasOwn(this.pools, pool.id))
|
|
533
|
+
return false;
|
|
534
|
+
this.pools[pool.id] = pool;
|
|
535
|
+
return true;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Retrieve ResourcePool instance from registry by its Id.
|
|
539
|
+
*/
|
|
540
|
+
get(poolId) {
|
|
541
|
+
return this.pools[poolId] || null;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Check if ResourcePool registered in this registry instance.
|
|
545
|
+
*/
|
|
546
|
+
isRegistered(pool) {
|
|
547
|
+
return Object.hasOwn(this.pools, pool.id);
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Remove ResourcePool from current registry instance.
|
|
551
|
+
*/
|
|
552
|
+
remove(pool) {
|
|
553
|
+
const poolId = typeof pool === 'string' ? pool : pool.id;
|
|
554
|
+
return delete this.pools[poolId];
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
let defaultRegistry;
|
|
558
|
+
const getRegistry = () => {
|
|
559
|
+
if (!defaultRegistry) {
|
|
560
|
+
defaultRegistry = new ResourcePoolRegistry();
|
|
561
|
+
}
|
|
562
|
+
return defaultRegistry;
|
|
563
|
+
};
|
|
564
|
+
const setRegistry = (registry) => {
|
|
565
|
+
defaultRegistry = registry;
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
const calls = new Map();
|
|
569
|
+
let latest = Promise.resolve();
|
|
570
|
+
// Silently swallow unhandled rejections from tracked calls so that cleanup
|
|
571
|
+
// always runs — callers are responsible for handling errors on the original promise.
|
|
572
|
+
const noop = () => undefined;
|
|
573
|
+
const latestCall = () => latest;
|
|
574
|
+
const latestCallFor = (context) => calls.get(unwrapProxy(context));
|
|
575
|
+
const clearLatestCalls = () => calls.clear();
|
|
576
|
+
const recordHandlerCalls = (handler) => (command, context, wrap) => {
|
|
577
|
+
const promise = handler(command, context, wrap);
|
|
578
|
+
// Only track the *first* call per context — subsequent calls for the same
|
|
579
|
+
// context update `latest` but do not overwrite the stored per-context entry.
|
|
580
|
+
// Use strict identity (not truthiness) so falsy-but-valid contexts aren't skipped.
|
|
581
|
+
if (context !== undefined && context !== null && !calls.has(context)) {
|
|
582
|
+
calls.set(context, promise);
|
|
583
|
+
// Clean up the entry once the call settles (regardless of outcome)
|
|
584
|
+
promise.then(() => calls.delete(context), noop);
|
|
585
|
+
}
|
|
586
|
+
latest = promise;
|
|
587
|
+
return promise;
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
exports.Command = Command;
|
|
591
|
+
exports.CommandChain = CommandChain;
|
|
592
|
+
exports.IdOwner = IdOwner;
|
|
593
|
+
exports.Resource = Resource;
|
|
594
|
+
exports.ResourcePool = ResourcePool;
|
|
595
|
+
exports.ResourcePoolRegistry = ResourcePoolRegistry;
|
|
596
|
+
exports.clearLatestCalls = clearLatestCalls;
|
|
597
|
+
exports.createCommandHandler = createCommandHandler;
|
|
598
|
+
exports.createProxyTrapsObject = createProxyTrapsObject;
|
|
599
|
+
exports.createResource = createResource;
|
|
600
|
+
exports.createUIDGenerator = createUIDGenerator;
|
|
601
|
+
exports.followCommandChain = followCommandChain;
|
|
602
|
+
exports.generateId = generateId;
|
|
603
|
+
exports.generateProxyCommand = generateProxyCommand;
|
|
604
|
+
exports.getCustomFinalizationRegistryClass = getCustomFinalizationRegistryClass;
|
|
605
|
+
exports.getDefaultResourcePool = getDefaultResourcePool;
|
|
606
|
+
exports.getDefaultValidTargets = getDefaultValidTargets;
|
|
607
|
+
exports.getMethodCallContext = getMethodCallContext;
|
|
608
|
+
exports.getMethodName = getMethodName;
|
|
609
|
+
exports.getRegistry = getRegistry;
|
|
610
|
+
exports.handle = handle;
|
|
611
|
+
exports.isNameExcluded = isNameExcluded;
|
|
612
|
+
exports.isNameSymbol = isNameSymbol;
|
|
613
|
+
exports.isReservedPropertyName = isReservedPropertyName;
|
|
614
|
+
exports.isResourceObject = isResourceObject;
|
|
615
|
+
exports.isValidTarget = isValidTarget;
|
|
616
|
+
exports.isWrappedWithProxy = isWrappedWithProxy;
|
|
617
|
+
exports.latestCall = latestCall;
|
|
618
|
+
exports.latestCallFor = latestCallFor;
|
|
619
|
+
exports.recordHandlerCalls = recordHandlerCalls;
|
|
620
|
+
exports.reject = reject;
|
|
621
|
+
exports.setCustomFinalizationRegistryClass = setCustomFinalizationRegistryClass;
|
|
622
|
+
exports.setDefaultResourcePool = setDefaultResourcePool;
|
|
623
|
+
exports.setRegistry = setRegistry;
|
|
624
|
+
exports.setValidTargets = setValidTargets;
|
|
625
|
+
exports.unwrapProxy = unwrapProxy;
|
|
626
|
+
exports.wrapWithProxy = wrapWithProxy;
|
|
627
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../packages/deferred-data-access/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../packages/deferred-data-access/command/src/command.ts","../../../../packages/deferred-data-access/command/src/command-chain.ts","../../../../packages/deferred-data-access/command/src/command-handler.ts","../../../../packages/deferred-data-access/utils/src/utils.ts","../../../../packages/deferred-data-access/proxy/src/command.ts","../../../../packages/deferred-data-access/proxy/src/types.ts","../../../../packages/deferred-data-access/proxy/src/proxy.ts","../../../../packages/deferred-data-access/proxy/src/utils.ts","../../../../packages/deferred-data-access/proxy/src/traps.ts","../../../../packages/deferred-data-access/core/core.ts","../../../../packages/deferred-data-access/resource/src/finalization-registry.ts","../../../../packages/deferred-data-access/resource/src/resource.ts","../../../../packages/deferred-data-access/resource/src/utils.ts","../../../../packages/deferred-data-access/resource/src/resource-pool.ts","../../../../packages/deferred-data-access/resource/src/default-resource-pool.ts","../../../../packages/deferred-data-access/resource/src/resource-pool-registry.ts","../../../../packages/deferred-data-access/record/record.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["ReservedPropertyNames","ProxyCommand","WeakValueMap"],"mappings":";;;;MAMa,OAAO,CAAA;AAClB,IAAA,WAAA,CACkB,IAAY,EACZ,IAAmB,EACnB,KAAe,EACf,OAAwB,EAAA;QAHxB,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,OAAO,GAAP,OAAO;QAEvB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAC1F,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IAC5F;IAEA,QAAQ,CAAC,cAAc,GAAG,KAAK,EAAA;QAC7B,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI;QAC3C,OAAO;YACL,IAAI;YACJ,IAAI;YACJ,KAAK;YACL,OAAO,EAAE,cAAc,GAAG,OAAO,GAAG,SAAS;SAC9C;IACH;IAEA,MAAM,CAAC,cAAc,GAAG,KAAK,EAAA;QAC3B,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OA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