@korajs/store 1.0.0-beta.0 → 1.0.0-beta.10
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/dist/adapters/better-sqlite3.cjs.map +1 -1
- package/dist/adapters/better-sqlite3.d.cts +1 -1
- package/dist/adapters/better-sqlite3.d.ts +1 -1
- package/dist/adapters/better-sqlite3.js +1 -1
- package/dist/adapters/indexeddb.cjs +523 -148
- package/dist/adapters/indexeddb.cjs.map +1 -1
- package/dist/adapters/indexeddb.d.cts +4 -2
- package/dist/adapters/indexeddb.d.ts +4 -2
- package/dist/adapters/indexeddb.js +55 -11
- package/dist/adapters/indexeddb.js.map +1 -1
- package/dist/adapters/sqlite-wasm-worker.cjs +207 -187
- package/dist/adapters/sqlite-wasm-worker.cjs.map +1 -1
- package/dist/adapters/sqlite-wasm-worker.js +208 -188
- package/dist/adapters/sqlite-wasm-worker.js.map +1 -1
- package/dist/adapters/sqlite-wasm.cjs +474 -140
- package/dist/adapters/sqlite-wasm.cjs.map +1 -1
- package/dist/adapters/sqlite-wasm.d.cts +45 -8
- package/dist/adapters/sqlite-wasm.d.ts +45 -8
- package/dist/adapters/sqlite-wasm.js +3 -3
- package/dist/{backup-5XZ7THNJ.js → backup-5S7K2Z35.js} +3 -3
- package/dist/blob-fs.cjs +166 -0
- package/dist/blob-fs.cjs.map +1 -0
- package/dist/blob-fs.d.cts +29 -0
- package/dist/blob-fs.d.ts +29 -0
- package/dist/blob-fs.js +128 -0
- package/dist/blob-fs.js.map +1 -0
- package/dist/{chunk-EIVXWF4B.js → chunk-CYO3YKFL.js} +4 -3
- package/dist/chunk-CYO3YKFL.js.map +1 -0
- package/dist/{chunk-ETDJEH2I.js → chunk-GSJ7EEUC.js} +12 -1
- package/dist/chunk-GSJ7EEUC.js.map +1 -0
- package/dist/{chunk-5R4QMY3Z.js → chunk-HS6DBMST.js} +13 -10
- package/dist/chunk-HS6DBMST.js.map +1 -0
- package/dist/chunk-RJIEKEN4.js +751 -0
- package/dist/chunk-RJIEKEN4.js.map +1 -0
- package/dist/{chunk-QL2XVZRN.js → chunk-TUR7RGEP.js} +12 -1
- package/dist/{chunk-QL2XVZRN.js.map → chunk-TUR7RGEP.js.map} +1 -1
- package/dist/{chunk-IOEFNHHP.js → chunk-VDBJQ75K.js} +2 -2
- package/dist/chunk-VDBJQ75K.js.map +1 -0
- package/dist/chunk-W4MTTNEZ.js +55 -0
- package/dist/chunk-W4MTTNEZ.js.map +1 -0
- package/dist/{chunk-OUQDC5Z6.js → chunk-YT7MRFCP.js} +55 -35
- package/dist/chunk-YT7MRFCP.js.map +1 -0
- package/dist/content-addressed-blob-store-Dcj3SB9r.d.cts +60 -0
- package/dist/content-addressed-blob-store-Dcj3SB9r.d.ts +60 -0
- package/dist/{export-audit-VPGQWNR6.js → export-audit-ODGQTQIK.js} +3 -3
- package/dist/index.cjs +923 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +443 -6
- package/dist/index.d.ts +443 -6
- package/dist/index.js +737 -49
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +69 -43
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +3 -3
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +3 -3
- package/dist/sqlite-wasm-channel-GGHA2BXU.js +12 -0
- package/dist/{sqlite-wasm-channel-DUDPclTE.d.cts → sqlite-wasm-channel-L6o3bWQK.d.cts} +1 -1
- package/dist/{sqlite-wasm-channel-DUDPclTE.d.ts → sqlite-wasm-channel-L6o3bWQK.d.ts} +1 -1
- package/dist/{types-CyjXwrjW.d.cts → types-BOO9EPt1.d.ts} +10 -3
- package/dist/{types-CJOVKxLw.d.ts → types-BslDOTk0.d.cts} +32 -2
- package/dist/{types-CJOVKxLw.d.cts → types-BslDOTk0.d.ts} +32 -2
- package/dist/{types-DAxCladl.d.ts → types-C_GDavG-.d.cts} +10 -3
- package/package.json +13 -12
- package/dist/adapters/sqlite-wasm-shared-host.cjs +0 -68
- package/dist/adapters/sqlite-wasm-shared-host.cjs.map +0 -1
- package/dist/adapters/sqlite-wasm-shared-host.d.cts +0 -2
- package/dist/adapters/sqlite-wasm-shared-host.d.ts +0 -2
- package/dist/adapters/sqlite-wasm-shared-host.js +0 -66
- package/dist/adapters/sqlite-wasm-shared-host.js.map +0 -1
- package/dist/chunk-5R4QMY3Z.js.map +0 -1
- package/dist/chunk-EIVXWF4B.js.map +0 -1
- package/dist/chunk-ETDJEH2I.js.map +0 -1
- package/dist/chunk-IOEFNHHP.js.map +0 -1
- package/dist/chunk-OUQDC5Z6.js.map +0 -1
- package/dist/chunk-RBPVEAVM.js +0 -425
- package/dist/chunk-RBPVEAVM.js.map +0 -1
- package/dist/sqlite-wasm-channel-H43KEZLM.js +0 -12
- /package/dist/{backup-5XZ7THNJ.js.map → backup-5S7K2Z35.js.map} +0 -0
- /package/dist/{export-audit-VPGQWNR6.js.map → export-audit-ODGQTQIK.js.map} +0 -0
- /package/dist/{sqlite-wasm-channel-H43KEZLM.js.map → sqlite-wasm-channel-GGHA2BXU.js.map} +0 -0
package/dist/chunk-RBPVEAVM.js
DELETED
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Mutex
|
|
3
|
-
} from "./chunk-TVJEC5S2.js";
|
|
4
|
-
import {
|
|
5
|
-
AdapterError,
|
|
6
|
-
StoreNotOpenError,
|
|
7
|
-
WorkerTimeoutError
|
|
8
|
-
} from "./chunk-QL2XVZRN.js";
|
|
9
|
-
|
|
10
|
-
// src/adapters/sqlite-wasm-adapter.ts
|
|
11
|
-
import { generateFullDDL } from "@korajs/core";
|
|
12
|
-
|
|
13
|
-
// src/multi-tab/shared-worker-bridge.ts
|
|
14
|
-
var SW_REQUEST = "kora-sw-request";
|
|
15
|
-
var SW_RESPONSE = "kora-sw-response";
|
|
16
|
-
var SharedWorkerClientBridge = class {
|
|
17
|
-
constructor(sharedWorker, dbName, workerUrl, timeoutMs = 3e4) {
|
|
18
|
-
this.dbName = dbName;
|
|
19
|
-
this.workerUrl = workerUrl;
|
|
20
|
-
this.timeoutMs = timeoutMs;
|
|
21
|
-
this.port = sharedWorker.port;
|
|
22
|
-
this.port.start();
|
|
23
|
-
this.port.addEventListener("message", (event) => {
|
|
24
|
-
const data = event.data;
|
|
25
|
-
if (data?.type !== SW_RESPONSE) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const entry = this.pending.get(data.requestId);
|
|
29
|
-
if (entry) {
|
|
30
|
-
this.pending.delete(data.requestId);
|
|
31
|
-
entry.resolve(data.response);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
dbName;
|
|
36
|
-
workerUrl;
|
|
37
|
-
port;
|
|
38
|
-
pending = /* @__PURE__ */ new Map();
|
|
39
|
-
timeoutMs;
|
|
40
|
-
terminated = false;
|
|
41
|
-
async send(request) {
|
|
42
|
-
if (this.terminated) {
|
|
43
|
-
return {
|
|
44
|
-
id: request.id,
|
|
45
|
-
type: "error",
|
|
46
|
-
message: "SharedWorker bridge terminated",
|
|
47
|
-
code: "BRIDGE_TERMINATED"
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const requestId = crypto.randomUUID();
|
|
51
|
-
const msg = {
|
|
52
|
-
type: SW_REQUEST,
|
|
53
|
-
requestId,
|
|
54
|
-
dbName: this.dbName,
|
|
55
|
-
workerUrl: this.workerUrl,
|
|
56
|
-
request
|
|
57
|
-
};
|
|
58
|
-
return new Promise((resolve, reject) => {
|
|
59
|
-
const timer = setTimeout(() => {
|
|
60
|
-
this.pending.delete(requestId);
|
|
61
|
-
reject(new WorkerTimeoutError(`shared-worker:${request.type}`, this.timeoutMs));
|
|
62
|
-
}, this.timeoutMs);
|
|
63
|
-
this.pending.set(requestId, {
|
|
64
|
-
resolve: (response) => {
|
|
65
|
-
clearTimeout(timer);
|
|
66
|
-
resolve(response);
|
|
67
|
-
},
|
|
68
|
-
reject: (error) => {
|
|
69
|
-
clearTimeout(timer);
|
|
70
|
-
reject(error);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
this.port.postMessage(msg);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
terminate() {
|
|
77
|
-
if (this.terminated) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
this.terminated = true;
|
|
81
|
-
this.port.close();
|
|
82
|
-
for (const [, entry] of this.pending) {
|
|
83
|
-
entry.reject(new Error("SharedWorker bridge terminated"));
|
|
84
|
-
}
|
|
85
|
-
this.pending.clear();
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// src/multi-tab/tab-storage.ts
|
|
90
|
-
var RPC_REQUEST = "kora-worker-request";
|
|
91
|
-
var RPC_RESPONSE = "kora-worker-response";
|
|
92
|
-
function isSharedWorkerStorageSupported() {
|
|
93
|
-
return typeof globalThis !== "undefined" && typeof SharedWorker !== "undefined";
|
|
94
|
-
}
|
|
95
|
-
function isMultiTabStorageSupported() {
|
|
96
|
-
return typeof globalThis !== "undefined" && typeof BroadcastChannel !== "undefined" && typeof navigator !== "undefined" && typeof navigator.locks?.request === "function";
|
|
97
|
-
}
|
|
98
|
-
async function acquireTabStorageSession(dbName) {
|
|
99
|
-
const channelName = `kora-storage-${dbName}`;
|
|
100
|
-
if (!isMultiTabStorageSupported()) {
|
|
101
|
-
return { role: "leader", channelName };
|
|
102
|
-
}
|
|
103
|
-
return new Promise((resolve) => {
|
|
104
|
-
let releaseHeld;
|
|
105
|
-
void navigator.locks.request(
|
|
106
|
-
`kora-leader-${dbName}`,
|
|
107
|
-
{ mode: "exclusive", ifAvailable: true },
|
|
108
|
-
(lock) => {
|
|
109
|
-
if (lock === null) {
|
|
110
|
-
resolve({ role: "follower", channelName });
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
resolve({
|
|
114
|
-
role: "leader",
|
|
115
|
-
channelName,
|
|
116
|
-
releaseLock: async () => {
|
|
117
|
-
releaseHeld?.();
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
return new Promise((release) => {
|
|
121
|
-
releaseHeld = release;
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function startLeaderRpcRelay(channelName, bridge) {
|
|
128
|
-
const channel = new BroadcastChannel(channelName);
|
|
129
|
-
const onMessage = (event) => {
|
|
130
|
-
const data = event.data;
|
|
131
|
-
if (data?.type !== RPC_REQUEST) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
void bridge.send(data.request).then((response) => {
|
|
135
|
-
const msg = {
|
|
136
|
-
type: RPC_RESPONSE,
|
|
137
|
-
requestId: data.requestId,
|
|
138
|
-
response
|
|
139
|
-
};
|
|
140
|
-
channel.postMessage(msg);
|
|
141
|
-
}).catch((error) => {
|
|
142
|
-
const message = error instanceof Error ? error.message : "Worker RPC failed";
|
|
143
|
-
const msg = {
|
|
144
|
-
type: RPC_RESPONSE,
|
|
145
|
-
requestId: data.requestId,
|
|
146
|
-
response: {
|
|
147
|
-
id: data.request.id,
|
|
148
|
-
type: "error",
|
|
149
|
-
message,
|
|
150
|
-
code: "LEADER_RPC_ERROR"
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
channel.postMessage(msg);
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
channel.addEventListener("message", onMessage);
|
|
157
|
-
return () => {
|
|
158
|
-
channel.removeEventListener("message", onMessage);
|
|
159
|
-
channel.close();
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
var FollowerBroadcastBridge = class {
|
|
163
|
-
channel;
|
|
164
|
-
pending = /* @__PURE__ */ new Map();
|
|
165
|
-
timeoutMs;
|
|
166
|
-
terminated = false;
|
|
167
|
-
constructor(channelName, timeoutMs = 3e4) {
|
|
168
|
-
this.timeoutMs = timeoutMs;
|
|
169
|
-
this.channel = new BroadcastChannel(channelName);
|
|
170
|
-
this.channel.addEventListener("message", (event) => {
|
|
171
|
-
const data = event.data;
|
|
172
|
-
if (data?.type !== RPC_RESPONSE) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
const entry = this.pending.get(data.requestId);
|
|
176
|
-
if (entry) {
|
|
177
|
-
this.pending.delete(data.requestId);
|
|
178
|
-
entry.resolve(data.response);
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
async send(request) {
|
|
183
|
-
if (this.terminated) {
|
|
184
|
-
return {
|
|
185
|
-
id: request.id,
|
|
186
|
-
type: "error",
|
|
187
|
-
message: "Follower bridge terminated",
|
|
188
|
-
code: "BRIDGE_TERMINATED"
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
const requestId = crypto.randomUUID();
|
|
192
|
-
const msg = { type: RPC_REQUEST, requestId, request };
|
|
193
|
-
return new Promise((resolve, reject) => {
|
|
194
|
-
const timer = setTimeout(() => {
|
|
195
|
-
this.pending.delete(requestId);
|
|
196
|
-
reject(new WorkerTimeoutError(`follower-rpc:${request.type}`, this.timeoutMs));
|
|
197
|
-
}, this.timeoutMs);
|
|
198
|
-
this.pending.set(requestId, {
|
|
199
|
-
resolve: (response) => {
|
|
200
|
-
clearTimeout(timer);
|
|
201
|
-
resolve(response);
|
|
202
|
-
},
|
|
203
|
-
reject: (error) => {
|
|
204
|
-
clearTimeout(timer);
|
|
205
|
-
reject(error);
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
this.channel.postMessage(msg);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
terminate() {
|
|
212
|
-
if (this.terminated) {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
this.terminated = true;
|
|
216
|
-
this.channel.close();
|
|
217
|
-
for (const [, entry] of this.pending) {
|
|
218
|
-
entry.reject(new Error("Follower bridge terminated"));
|
|
219
|
-
}
|
|
220
|
-
this.pending.clear();
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
// src/adapters/sqlite-wasm-adapter.ts
|
|
225
|
-
var SqliteWasmAdapter = class {
|
|
226
|
-
bridge = null;
|
|
227
|
-
opened = false;
|
|
228
|
-
mutex = new Mutex();
|
|
229
|
-
injectedBridge;
|
|
230
|
-
workerUrl;
|
|
231
|
-
sharedWorkerUrl;
|
|
232
|
-
workerResponseTimeoutMs;
|
|
233
|
-
dbName;
|
|
234
|
-
tabSession = null;
|
|
235
|
-
sharedWorker = null;
|
|
236
|
-
constructor(options = {}) {
|
|
237
|
-
this.injectedBridge = options.bridge;
|
|
238
|
-
this.workerUrl = options.workerUrl;
|
|
239
|
-
this.sharedWorkerUrl = options.sharedWorkerUrl;
|
|
240
|
-
this.workerResponseTimeoutMs = options.workerResponseTimeoutMs ?? 3e4;
|
|
241
|
-
this.dbName = options.dbName ?? "kora-db";
|
|
242
|
-
}
|
|
243
|
-
async open(schema) {
|
|
244
|
-
if (this.opened) return;
|
|
245
|
-
if (this.injectedBridge) {
|
|
246
|
-
this.bridge = this.injectedBridge;
|
|
247
|
-
} else if (this.sharedWorkerUrl && this.workerUrl && isSharedWorkerStorageSupported()) {
|
|
248
|
-
const workerUrlString = typeof this.workerUrl === "string" ? this.workerUrl : this.workerUrl.href;
|
|
249
|
-
const sharedUrl = typeof this.sharedWorkerUrl === "string" ? this.sharedWorkerUrl : this.sharedWorkerUrl.href;
|
|
250
|
-
this.sharedWorker = new SharedWorker(sharedUrl, { name: `kora-sw-${this.dbName}` });
|
|
251
|
-
this.bridge = new SharedWorkerClientBridge(this.sharedWorker, this.dbName, workerUrlString);
|
|
252
|
-
} else if (this.workerUrl) {
|
|
253
|
-
this.tabSession = await acquireTabStorageSession(this.dbName);
|
|
254
|
-
const { WebWorkerBridge } = await import("./sqlite-wasm-channel-H43KEZLM.js");
|
|
255
|
-
if (this.tabSession.role === "leader") {
|
|
256
|
-
const workerBridge = new WebWorkerBridge(this.workerUrl, this.workerResponseTimeoutMs);
|
|
257
|
-
this.tabSession.stopRelay = startLeaderRpcRelay(this.tabSession.channelName, workerBridge);
|
|
258
|
-
this.bridge = workerBridge;
|
|
259
|
-
} else {
|
|
260
|
-
this.bridge = new FollowerBroadcastBridge(
|
|
261
|
-
this.tabSession.channelName,
|
|
262
|
-
this.workerResponseTimeoutMs
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
} else {
|
|
266
|
-
throw new AdapterError(
|
|
267
|
-
'SqliteWasmAdapter requires either a bridge (for testing) or a workerUrl (for browsers). Pass { bridge: new MockWorkerBridge() } for tests, or { workerUrl: "/worker.js" } for browsers.'
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
const ddlStatements = generateFullDDL(schema);
|
|
271
|
-
const response = await this.sendRequest({
|
|
272
|
-
id: 0,
|
|
273
|
-
type: "open",
|
|
274
|
-
ddlStatements,
|
|
275
|
-
dbName: this.dbName
|
|
276
|
-
});
|
|
277
|
-
if (response.type === "error") {
|
|
278
|
-
throw new AdapterError(`Failed to open database: ${response.message}`, {
|
|
279
|
-
code: response.code,
|
|
280
|
-
dbName: this.dbName
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
this.opened = true;
|
|
284
|
-
}
|
|
285
|
-
async close() {
|
|
286
|
-
if (!this.bridge) return;
|
|
287
|
-
try {
|
|
288
|
-
await this.sendRequest({ id: 0, type: "close" });
|
|
289
|
-
} finally {
|
|
290
|
-
this.tabSession?.stopRelay?.();
|
|
291
|
-
if (this.tabSession?.releaseLock) {
|
|
292
|
-
await this.tabSession.releaseLock();
|
|
293
|
-
}
|
|
294
|
-
this.tabSession = null;
|
|
295
|
-
this.sharedWorker = null;
|
|
296
|
-
this.bridge.terminate();
|
|
297
|
-
this.bridge = null;
|
|
298
|
-
this.opened = false;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
async execute(sql, params) {
|
|
302
|
-
this.guardOpen();
|
|
303
|
-
const response = await this.sendRequest({ id: 0, type: "execute", sql, params });
|
|
304
|
-
if (response.type === "error") {
|
|
305
|
-
throw new AdapterError(`Execute failed: ${response.message}`, { sql, params });
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
async query(sql, params) {
|
|
309
|
-
this.guardOpen();
|
|
310
|
-
const response = await this.sendRequest({ id: 0, type: "query", sql, params });
|
|
311
|
-
if (response.type === "error") {
|
|
312
|
-
throw new AdapterError(`Query failed: ${response.message}`, { sql, params });
|
|
313
|
-
}
|
|
314
|
-
return response.data ?? [];
|
|
315
|
-
}
|
|
316
|
-
async transaction(fn) {
|
|
317
|
-
this.guardOpen();
|
|
318
|
-
const release = await this.mutex.acquire();
|
|
319
|
-
try {
|
|
320
|
-
await this.sendChecked({ id: 0, type: "begin" }, "BEGIN transaction");
|
|
321
|
-
const tx = {
|
|
322
|
-
execute: async (sql, params) => {
|
|
323
|
-
const response = await this.sendRequest({ id: 0, type: "execute", sql, params });
|
|
324
|
-
if (response.type === "error") {
|
|
325
|
-
throw new AdapterError(`Transaction execute failed: ${response.message}`, {
|
|
326
|
-
sql,
|
|
327
|
-
params
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
query: async (sql, params) => {
|
|
332
|
-
const response = await this.sendRequest({ id: 0, type: "query", sql, params });
|
|
333
|
-
if (response.type === "error") {
|
|
334
|
-
throw new AdapterError(`Transaction query failed: ${response.message}`, { sql, params });
|
|
335
|
-
}
|
|
336
|
-
return response.data ?? [];
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
await fn(tx);
|
|
340
|
-
await this.sendChecked({ id: 0, type: "commit" }, "COMMIT transaction");
|
|
341
|
-
} catch (error) {
|
|
342
|
-
try {
|
|
343
|
-
await this.sendRequest({ id: 0, type: "rollback" });
|
|
344
|
-
} catch {
|
|
345
|
-
}
|
|
346
|
-
throw error;
|
|
347
|
-
} finally {
|
|
348
|
-
release();
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
async migrate(from, to, migration) {
|
|
352
|
-
this.guardOpen();
|
|
353
|
-
const release = await this.mutex.acquire();
|
|
354
|
-
try {
|
|
355
|
-
await this.sendChecked({ id: 0, type: "begin" }, "BEGIN migration");
|
|
356
|
-
for (const sql of migration.statements) {
|
|
357
|
-
const response = await this.sendRequest({ id: 0, type: "execute", sql });
|
|
358
|
-
if (response.type === "error") {
|
|
359
|
-
throw new AdapterError(`Migration from v${from} to v${to} failed: ${response.message}`, {
|
|
360
|
-
from,
|
|
361
|
-
to
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
await this.sendChecked({ id: 0, type: "commit" }, "COMMIT migration");
|
|
366
|
-
} catch (error) {
|
|
367
|
-
try {
|
|
368
|
-
await this.sendRequest({ id: 0, type: "rollback" });
|
|
369
|
-
} catch {
|
|
370
|
-
}
|
|
371
|
-
if (error instanceof AdapterError) throw error;
|
|
372
|
-
throw new AdapterError(
|
|
373
|
-
`Migration from v${from} to v${to} failed: ${error.message}`,
|
|
374
|
-
{ from, to }
|
|
375
|
-
);
|
|
376
|
-
} finally {
|
|
377
|
-
release();
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Export the database as a Uint8Array (for IndexedDB persistence).
|
|
382
|
-
* Only available when the database is open.
|
|
383
|
-
*/
|
|
384
|
-
async exportDatabase() {
|
|
385
|
-
this.guardOpen();
|
|
386
|
-
const response = await this.sendRequest({ id: 0, type: "export" });
|
|
387
|
-
if (response.type === "error") {
|
|
388
|
-
throw new AdapterError(`Export failed: ${response.message}`);
|
|
389
|
-
}
|
|
390
|
-
return response.data;
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Import a serialized database snapshot.
|
|
394
|
-
*/
|
|
395
|
-
async importDatabase(data) {
|
|
396
|
-
this.guardOpen();
|
|
397
|
-
const response = await this.sendRequest({ id: 0, type: "import", data });
|
|
398
|
-
if (response.type === "error") {
|
|
399
|
-
throw new AdapterError(`Import failed: ${response.message}`);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
guardOpen() {
|
|
403
|
-
if (!this.opened || !this.bridge) {
|
|
404
|
-
throw new StoreNotOpenError();
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
async sendRequest(request) {
|
|
408
|
-
const bridge = this.bridge;
|
|
409
|
-
if (!bridge) {
|
|
410
|
-
throw new StoreNotOpenError();
|
|
411
|
-
}
|
|
412
|
-
return bridge.send(request);
|
|
413
|
-
}
|
|
414
|
-
async sendChecked(request, description) {
|
|
415
|
-
const response = await this.sendRequest(request);
|
|
416
|
-
if (response.type === "error") {
|
|
417
|
-
throw new AdapterError(`${description} failed: ${response.message}`);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
export {
|
|
423
|
-
SqliteWasmAdapter
|
|
424
|
-
};
|
|
425
|
-
//# sourceMappingURL=chunk-RBPVEAVM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/adapters/sqlite-wasm-adapter.ts","../src/multi-tab/shared-worker-bridge.ts","../src/multi-tab/tab-storage.ts"],"sourcesContent":["import { generateFullDDL } from '@korajs/core'\nimport type { SchemaDefinition } from '@korajs/core'\nimport { AdapterError, StoreNotOpenError } from '../errors'\nimport { SharedWorkerClientBridge } from '../multi-tab/shared-worker-bridge'\nimport {\n\tFollowerBroadcastBridge,\n\tacquireTabStorageSession,\n\tisSharedWorkerStorageSupported,\n\tstartLeaderRpcRelay,\n} from '../multi-tab/tab-storage'\nimport type { MigrationPlan, StorageAdapter, Transaction } from '../types'\nimport { Mutex } from './sqlite-wasm-channel'\nimport type { WorkerBridge, WorkerRequest, WorkerResponse } from './sqlite-wasm-channel'\n\n/**\n * Options for creating a SqliteWasmAdapter.\n */\nexport interface SqliteWasmAdapterOptions {\n\t/**\n\t * Injected WorkerBridge for testing. If omitted, a WebWorkerBridge is created\n\t * in browser environments.\n\t */\n\tbridge?: WorkerBridge\n\n\t/**\n\t * Database name for persistence. Used as the OPFS file name or IDB key.\n\t */\n\tdbName?: string\n\n\t/**\n\t * URL to the sqlite-wasm-worker script. Required in browsers if no bridge is provided.\n\t */\n\tworkerUrl?: string | URL\n\n\t/** Timeout for worker / follower RPC responses. Defaults to 30000ms. */\n\tworkerResponseTimeoutMs?: number\n\n\t/**\n\t * Optional SharedWorker host script (`sqlite-wasm-shared-host`). When set and\n\t * {@link isSharedWorkerStorageSupported}, one DedicatedWorker per `dbName` is pooled per origin.\n\t * Requires `workerUrl` for the inner SQLite worker. Falls back to leader election when omitted.\n\t */\n\tsharedWorkerUrl?: string | URL\n}\n\n/**\n * SQLite WASM adapter that communicates with a SQLite instance through a WorkerBridge.\n *\n * In browsers, the bridge is backed by a Web Worker running SQLite WASM with OPFS persistence.\n * In Node.js tests, the bridge is backed by MockWorkerBridge wrapping better-sqlite3.\n *\n * @example\n * ```typescript\n * // Browser usage\n * const adapter = new SqliteWasmAdapter({ workerUrl: '/sqlite-wasm-worker.js' })\n *\n * // Test usage with MockWorkerBridge\n * import { MockWorkerBridge } from './sqlite-wasm-mock-bridge'\n * const adapter = new SqliteWasmAdapter({ bridge: new MockWorkerBridge() })\n * ```\n */\nexport class SqliteWasmAdapter implements StorageAdapter {\n\tprivate bridge: WorkerBridge | null = null\n\tprivate opened = false\n\tprivate readonly mutex = new Mutex()\n\tprivate readonly injectedBridge: WorkerBridge | undefined\n\tprivate readonly workerUrl: string | URL | undefined\n\tprivate readonly sharedWorkerUrl: string | URL | undefined\n\tprivate readonly workerResponseTimeoutMs: number\n\tprivate readonly dbName: string\n\tprivate tabSession: Awaited<ReturnType<typeof acquireTabStorageSession>> | null = null\n\tprivate sharedWorker: SharedWorker | null = null\n\n\tconstructor(options: SqliteWasmAdapterOptions = {}) {\n\t\tthis.injectedBridge = options.bridge\n\t\tthis.workerUrl = options.workerUrl\n\t\tthis.sharedWorkerUrl = options.sharedWorkerUrl\n\t\tthis.workerResponseTimeoutMs = options.workerResponseTimeoutMs ?? 30_000\n\t\tthis.dbName = options.dbName ?? 'kora-db'\n\t}\n\n\tasync open(schema: SchemaDefinition): Promise<void> {\n\t\tif (this.opened) return\n\n\t\tif (this.injectedBridge) {\n\t\t\tthis.bridge = this.injectedBridge\n\t\t} else if (this.sharedWorkerUrl && this.workerUrl && isSharedWorkerStorageSupported()) {\n\t\t\tconst workerUrlString =\n\t\t\t\ttypeof this.workerUrl === 'string' ? this.workerUrl : this.workerUrl.href\n\t\t\tconst sharedUrl =\n\t\t\t\ttypeof this.sharedWorkerUrl === 'string' ? this.sharedWorkerUrl : this.sharedWorkerUrl.href\n\t\t\tthis.sharedWorker = new SharedWorker(sharedUrl, { name: `kora-sw-${this.dbName}` })\n\t\t\tthis.bridge = new SharedWorkerClientBridge(this.sharedWorker, this.dbName, workerUrlString)\n\t\t} else if (this.workerUrl) {\n\t\t\tthis.tabSession = await acquireTabStorageSession(this.dbName)\n\t\t\tconst { WebWorkerBridge } = await import('./sqlite-wasm-channel')\n\n\t\t\tif (this.tabSession.role === 'leader') {\n\t\t\t\tconst workerBridge = new WebWorkerBridge(this.workerUrl, this.workerResponseTimeoutMs)\n\t\t\t\tthis.tabSession.stopRelay = startLeaderRpcRelay(this.tabSession.channelName, workerBridge)\n\t\t\t\tthis.bridge = workerBridge\n\t\t\t} else {\n\t\t\t\tthis.bridge = new FollowerBroadcastBridge(\n\t\t\t\t\tthis.tabSession.channelName,\n\t\t\t\t\tthis.workerResponseTimeoutMs,\n\t\t\t\t)\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new AdapterError(\n\t\t\t\t'SqliteWasmAdapter requires either a bridge (for testing) or a workerUrl (for browsers). ' +\n\t\t\t\t\t'Pass { bridge: new MockWorkerBridge() } for tests, or { workerUrl: \"/worker.js\" } for browsers.',\n\t\t\t)\n\t\t}\n\n\t\tconst ddlStatements = generateFullDDL(schema)\n\t\tconst response = await this.sendRequest({\n\t\t\tid: 0,\n\t\t\ttype: 'open',\n\t\t\tddlStatements,\n\t\t\tdbName: this.dbName,\n\t\t})\n\t\tif (response.type === 'error') {\n\t\t\tthrow new AdapterError(`Failed to open database: ${response.message}`, {\n\t\t\t\tcode: response.code,\n\t\t\t\tdbName: this.dbName,\n\t\t\t})\n\t\t}\n\t\tthis.opened = true\n\t}\n\n\tasync close(): Promise<void> {\n\t\tif (!this.bridge) return\n\n\t\ttry {\n\t\t\tawait this.sendRequest({ id: 0, type: 'close' })\n\t\t} finally {\n\t\t\tthis.tabSession?.stopRelay?.()\n\t\t\tif (this.tabSession?.releaseLock) {\n\t\t\t\tawait this.tabSession.releaseLock()\n\t\t\t}\n\t\t\tthis.tabSession = null\n\t\t\tthis.sharedWorker = null\n\t\t\tthis.bridge.terminate()\n\t\t\tthis.bridge = null\n\t\t\tthis.opened = false\n\t\t}\n\t}\n\n\tasync execute(sql: string, params?: unknown[]): Promise<void> {\n\t\tthis.guardOpen()\n\t\tconst response = await this.sendRequest({ id: 0, type: 'execute', sql, params })\n\t\tif (response.type === 'error') {\n\t\t\tthrow new AdapterError(`Execute failed: ${response.message}`, { sql, params })\n\t\t}\n\t}\n\n\tasync query<T>(sql: string, params?: unknown[]): Promise<T[]> {\n\t\tthis.guardOpen()\n\t\tconst response = await this.sendRequest({ id: 0, type: 'query', sql, params })\n\t\tif (response.type === 'error') {\n\t\t\tthrow new AdapterError(`Query failed: ${response.message}`, { sql, params })\n\t\t}\n\t\treturn (response.data as T[]) ?? []\n\t}\n\n\tasync transaction(fn: (tx: Transaction) => Promise<void>): Promise<void> {\n\t\tthis.guardOpen()\n\n\t\tconst release = await this.mutex.acquire()\n\t\ttry {\n\t\t\tawait this.sendChecked({ id: 0, type: 'begin' }, 'BEGIN transaction')\n\n\t\t\tconst tx: Transaction = {\n\t\t\t\texecute: async (sql: string, params?: unknown[]): Promise<void> => {\n\t\t\t\t\tconst response = await this.sendRequest({ id: 0, type: 'execute', sql, params })\n\t\t\t\t\tif (response.type === 'error') {\n\t\t\t\t\t\tthrow new AdapterError(`Transaction execute failed: ${response.message}`, {\n\t\t\t\t\t\t\tsql,\n\t\t\t\t\t\t\tparams,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tquery: async <T>(sql: string, params?: unknown[]): Promise<T[]> => {\n\t\t\t\t\tconst response = await this.sendRequest({ id: 0, type: 'query', sql, params })\n\t\t\t\t\tif (response.type === 'error') {\n\t\t\t\t\t\tthrow new AdapterError(`Transaction query failed: ${response.message}`, { sql, params })\n\t\t\t\t\t}\n\t\t\t\t\treturn (response.data as T[]) ?? []\n\t\t\t\t},\n\t\t\t}\n\n\t\t\tawait fn(tx)\n\t\t\tawait this.sendChecked({ id: 0, type: 'commit' }, 'COMMIT transaction')\n\t\t} catch (error) {\n\t\t\t// Attempt rollback, but don't mask the original error\n\t\t\ttry {\n\t\t\t\tawait this.sendRequest({ id: 0, type: 'rollback' })\n\t\t\t} catch {\n\t\t\t\t// Rollback failure is secondary to the original error\n\t\t\t}\n\t\t\tthrow error\n\t\t} finally {\n\t\t\trelease()\n\t\t}\n\t}\n\n\tasync migrate(from: number, to: number, migration: MigrationPlan): Promise<void> {\n\t\tthis.guardOpen()\n\n\t\tconst release = await this.mutex.acquire()\n\t\ttry {\n\t\t\tawait this.sendChecked({ id: 0, type: 'begin' }, 'BEGIN migration')\n\n\t\t\tfor (const sql of migration.statements) {\n\t\t\t\tconst response = await this.sendRequest({ id: 0, type: 'execute', sql })\n\t\t\t\tif (response.type === 'error') {\n\t\t\t\t\tthrow new AdapterError(`Migration from v${from} to v${to} failed: ${response.message}`, {\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tto,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait this.sendChecked({ id: 0, type: 'commit' }, 'COMMIT migration')\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.sendRequest({ id: 0, type: 'rollback' })\n\t\t\t} catch {\n\t\t\t\t// Rollback failure is secondary\n\t\t\t}\n\t\t\tif (error instanceof AdapterError) throw error\n\t\t\tthrow new AdapterError(\n\t\t\t\t`Migration from v${from} to v${to} failed: ${(error as Error).message}`,\n\t\t\t\t{ from, to },\n\t\t\t)\n\t\t} finally {\n\t\t\trelease()\n\t\t}\n\t}\n\n\t/**\n\t * Export the database as a Uint8Array (for IndexedDB persistence).\n\t * Only available when the database is open.\n\t */\n\tasync exportDatabase(): Promise<Uint8Array> {\n\t\tthis.guardOpen()\n\t\tconst response = await this.sendRequest({ id: 0, type: 'export' })\n\t\tif (response.type === 'error') {\n\t\t\tthrow new AdapterError(`Export failed: ${response.message}`)\n\t\t}\n\t\treturn response.data as Uint8Array\n\t}\n\n\t/**\n\t * Import a serialized database snapshot.\n\t */\n\tasync importDatabase(data: Uint8Array): Promise<void> {\n\t\tthis.guardOpen()\n\t\tconst response = await this.sendRequest({ id: 0, type: 'import', data })\n\t\tif (response.type === 'error') {\n\t\t\tthrow new AdapterError(`Import failed: ${response.message}`)\n\t\t}\n\t}\n\n\tprivate guardOpen(): void {\n\t\tif (!this.opened || !this.bridge) {\n\t\t\tthrow new StoreNotOpenError()\n\t\t}\n\t}\n\n\tprivate async sendRequest(request: WorkerRequest): Promise<WorkerResponse> {\n\t\t// guardOpen() is always called before sendRequest, so bridge is guaranteed non-null\n\t\tconst bridge = this.bridge\n\t\tif (!bridge) {\n\t\t\tthrow new StoreNotOpenError()\n\t\t}\n\t\treturn bridge.send(request)\n\t}\n\n\tprivate async sendChecked(request: WorkerRequest, description: string): Promise<void> {\n\t\tconst response = await this.sendRequest(request)\n\t\tif (response.type === 'error') {\n\t\t\tthrow new AdapterError(`${description} failed: ${response.message}`)\n\t\t}\n\t}\n}\n","/// <reference lib=\"dom\" />\nimport type { WorkerBridge, WorkerRequest, WorkerResponse } from '../adapters/sqlite-wasm-channel'\nimport { WorkerTimeoutError } from '../errors'\n\nconst SW_REQUEST = 'kora-sw-request'\nconst SW_RESPONSE = 'kora-sw-response'\n\nexport interface SharedWorkerRpcRequest {\n\ttype: typeof SW_REQUEST\n\trequestId: string\n\tdbName: string\n\tworkerUrl: string\n\trequest: WorkerRequest\n}\n\nexport interface SharedWorkerRpcResponse {\n\ttype: typeof SW_RESPONSE\n\trequestId: string\n\tresponse: WorkerResponse\n}\n\n/**\n * Forwards {@link WorkerBridge} RPC to a SharedWorker that hosts one DedicatedWorker per `dbName`.\n * Pair with the bundled `sqlite-wasm-shared-host` worker script.\n */\nexport class SharedWorkerClientBridge implements WorkerBridge {\n\tprivate readonly port: MessagePort\n\tprivate readonly pending = new Map<\n\t\tstring,\n\t\t{ resolve: (r: WorkerResponse) => void; reject: (e: Error) => void }\n\t>()\n\tprivate readonly timeoutMs: number\n\tprivate terminated = false\n\n\tconstructor(\n\t\tsharedWorker: SharedWorker,\n\t\tprivate readonly dbName: string,\n\t\tprivate readonly workerUrl: string,\n\t\ttimeoutMs = 30000,\n\t) {\n\t\tthis.timeoutMs = timeoutMs\n\t\tthis.port = sharedWorker.port\n\t\tthis.port.start()\n\t\tthis.port.addEventListener('message', (event: MessageEvent<SharedWorkerRpcResponse>) => {\n\t\t\tconst data = event.data\n\t\t\tif (data?.type !== SW_RESPONSE) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst entry = this.pending.get(data.requestId)\n\t\t\tif (entry) {\n\t\t\t\tthis.pending.delete(data.requestId)\n\t\t\t\tentry.resolve(data.response)\n\t\t\t}\n\t\t})\n\t}\n\n\tasync send(request: WorkerRequest): Promise<WorkerResponse> {\n\t\tif (this.terminated) {\n\t\t\treturn {\n\t\t\t\tid: request.id,\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: 'SharedWorker bridge terminated',\n\t\t\t\tcode: 'BRIDGE_TERMINATED',\n\t\t\t}\n\t\t}\n\n\t\tconst requestId = crypto.randomUUID()\n\t\tconst msg: SharedWorkerRpcRequest = {\n\t\t\ttype: SW_REQUEST,\n\t\t\trequestId,\n\t\t\tdbName: this.dbName,\n\t\t\tworkerUrl: this.workerUrl,\n\t\t\trequest,\n\t\t}\n\n\t\treturn new Promise<WorkerResponse>((resolve, reject) => {\n\t\t\tconst timer = setTimeout(() => {\n\t\t\t\tthis.pending.delete(requestId)\n\t\t\t\treject(new WorkerTimeoutError(`shared-worker:${request.type}`, this.timeoutMs))\n\t\t\t}, this.timeoutMs)\n\n\t\t\tthis.pending.set(requestId, {\n\t\t\t\tresolve: (response) => {\n\t\t\t\t\tclearTimeout(timer)\n\t\t\t\t\tresolve(response)\n\t\t\t\t},\n\t\t\t\treject: (error) => {\n\t\t\t\t\tclearTimeout(timer)\n\t\t\t\t\treject(error)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\tthis.port.postMessage(msg)\n\t\t})\n\t}\n\n\tterminate(): void {\n\t\tif (this.terminated) {\n\t\t\treturn\n\t\t}\n\t\tthis.terminated = true\n\t\tthis.port.close()\n\t\tfor (const [, entry] of this.pending) {\n\t\t\tentry.reject(new Error('SharedWorker bridge terminated'))\n\t\t}\n\t\tthis.pending.clear()\n\t}\n}\n","/**\n * Multi-tab SQLite storage coordination via `navigator.locks` and `BroadcastChannel`.\n *\n * One tab holds the exclusive `kora-leader-${dbName}` lock and owns the SQLite worker.\n * Other tabs send worker RPC over a named broadcast channel.\n */\n\nimport type { WorkerBridge, WorkerRequest, WorkerResponse } from '../adapters/sqlite-wasm-channel'\nimport { WorkerTimeoutError } from '../errors'\n\nconst RPC_REQUEST = 'kora-worker-request'\nconst RPC_RESPONSE = 'kora-worker-response'\n\ninterface RpcRequestMessage {\n\ttype: typeof RPC_REQUEST\n\trequestId: string\n\trequest: WorkerRequest\n}\n\ninterface RpcResponseMessage {\n\ttype: typeof RPC_RESPONSE\n\trequestId: string\n\tresponse: WorkerResponse\n}\n\nexport type TabStorageRole = 'leader' | 'follower'\n\nexport interface TabStorageSession {\n\trole: TabStorageRole\n\tchannelName: string\n\t/** Leader only: release the navigator lock when closing the database. */\n\treleaseLock?: () => Promise<void>\n\t/** Leader only: stop the broadcast RPC relay. */\n\tstopRelay?: () => void\n}\n\n/**\n * Returns whether a SharedWorker could host a single SQLite WASM instance per origin.\n * Not implemented yet — use {@link isMultiTabStorageSupported} + leader election today.\n */\nexport function isSharedWorkerStorageSupported(): boolean {\n\treturn typeof globalThis !== 'undefined' && typeof SharedWorker !== 'undefined'\n}\n\n/**\n * Returns whether multi-tab coordination APIs exist in this runtime.\n */\nexport function isMultiTabStorageSupported(): boolean {\n\treturn (\n\t\ttypeof globalThis !== 'undefined' &&\n\t\ttypeof BroadcastChannel !== 'undefined' &&\n\t\ttypeof navigator !== 'undefined' &&\n\t\ttypeof navigator.locks?.request === 'function'\n\t)\n}\n\n/**\n * Resolve leader vs follower for a database name.\n * Without lock APIs, every instance is treated as leader (single-tab / Node).\n */\nexport async function acquireTabStorageSession(dbName: string): Promise<TabStorageSession> {\n\tconst channelName = `kora-storage-${dbName}`\n\n\tif (!isMultiTabStorageSupported()) {\n\t\treturn { role: 'leader', channelName }\n\t}\n\n\treturn new Promise<TabStorageSession>((resolve) => {\n\t\tlet releaseHeld: (() => void) | undefined\n\n\t\tvoid navigator.locks.request(\n\t\t\t`kora-leader-${dbName}`,\n\t\t\t{ mode: 'exclusive', ifAvailable: true },\n\t\t\t(lock) => {\n\t\t\t\tif (lock === null) {\n\t\t\t\t\tresolve({ role: 'follower', channelName })\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tresolve({\n\t\t\t\t\trole: 'leader',\n\t\t\t\t\tchannelName,\n\t\t\t\t\treleaseLock: async () => {\n\t\t\t\t\t\treleaseHeld?.()\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\treturn new Promise<void>((release) => {\n\t\t\t\t\treleaseHeld = release\n\t\t\t\t})\n\t\t\t},\n\t\t)\n\t})\n}\n\n/**\n * Leader tab: forward follower RPC to the real worker bridge.\n */\nexport function startLeaderRpcRelay(channelName: string, bridge: WorkerBridge): () => void {\n\tconst channel = new BroadcastChannel(channelName)\n\n\tconst onMessage = (event: MessageEvent<RpcRequestMessage>): void => {\n\t\tconst data = event.data\n\t\tif (data?.type !== RPC_REQUEST) {\n\t\t\treturn\n\t\t}\n\n\t\tvoid bridge\n\t\t\t.send(data.request)\n\t\t\t.then((response) => {\n\t\t\t\tconst msg: RpcResponseMessage = {\n\t\t\t\t\ttype: RPC_RESPONSE,\n\t\t\t\t\trequestId: data.requestId,\n\t\t\t\t\tresponse,\n\t\t\t\t}\n\t\t\t\tchannel.postMessage(msg)\n\t\t\t})\n\t\t\t.catch((error: unknown) => {\n\t\t\t\tconst message = error instanceof Error ? error.message : 'Worker RPC failed'\n\t\t\t\tconst msg: RpcResponseMessage = {\n\t\t\t\t\ttype: RPC_RESPONSE,\n\t\t\t\t\trequestId: data.requestId,\n\t\t\t\t\tresponse: {\n\t\t\t\t\t\tid: data.request.id,\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\tcode: 'LEADER_RPC_ERROR',\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\tchannel.postMessage(msg)\n\t\t\t})\n\t}\n\n\tchannel.addEventListener('message', onMessage)\n\treturn () => {\n\t\tchannel.removeEventListener('message', onMessage)\n\t\tchannel.close()\n\t}\n}\n\n/**\n * Follower tab: proxy {@link WorkerBridge} over BroadcastChannel to the leader.\n */\nexport class FollowerBroadcastBridge implements WorkerBridge {\n\tprivate readonly channel: BroadcastChannel\n\tprivate readonly pending = new Map<\n\t\tstring,\n\t\t{ resolve: (r: WorkerResponse) => void; reject: (e: Error) => void }\n\t>()\n\tprivate readonly timeoutMs: number\n\tprivate terminated = false\n\n\tconstructor(channelName: string, timeoutMs = 30000) {\n\t\tthis.timeoutMs = timeoutMs\n\t\tthis.channel = new BroadcastChannel(channelName)\n\t\tthis.channel.addEventListener('message', (event: MessageEvent<RpcResponseMessage>) => {\n\t\t\tconst data = event.data\n\t\t\tif (data?.type !== RPC_RESPONSE) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst entry = this.pending.get(data.requestId)\n\t\t\tif (entry) {\n\t\t\t\tthis.pending.delete(data.requestId)\n\t\t\t\tentry.resolve(data.response)\n\t\t\t}\n\t\t})\n\t}\n\n\tasync send(request: WorkerRequest): Promise<WorkerResponse> {\n\t\tif (this.terminated) {\n\t\t\treturn {\n\t\t\t\tid: request.id,\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: 'Follower bridge terminated',\n\t\t\t\tcode: 'BRIDGE_TERMINATED',\n\t\t\t}\n\t\t}\n\n\t\tconst requestId = crypto.randomUUID()\n\t\tconst msg: RpcRequestMessage = { type: RPC_REQUEST, requestId, request }\n\n\t\treturn new Promise<WorkerResponse>((resolve, reject) => {\n\t\t\tconst timer = setTimeout(() => {\n\t\t\t\tthis.pending.delete(requestId)\n\t\t\t\treject(new WorkerTimeoutError(`follower-rpc:${request.type}`, this.timeoutMs))\n\t\t\t}, this.timeoutMs)\n\n\t\t\tthis.pending.set(requestId, {\n\t\t\t\tresolve: (response) => {\n\t\t\t\t\tclearTimeout(timer)\n\t\t\t\t\tresolve(response)\n\t\t\t\t},\n\t\t\t\treject: (error) => {\n\t\t\t\t\tclearTimeout(timer)\n\t\t\t\t\treject(error)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\tthis.channel.postMessage(msg)\n\t\t})\n\t}\n\n\tterminate(): void {\n\t\tif (this.terminated) {\n\t\t\treturn\n\t\t}\n\t\tthis.terminated = true\n\t\tthis.channel.close()\n\t\tfor (const [, entry] of this.pending) {\n\t\t\tentry.reject(new Error('Follower bridge terminated'))\n\t\t}\n\t\tthis.pending.clear()\n\t}\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,uBAAuB;;;ACIhC,IAAM,aAAa;AACnB,IAAM,cAAc;AAoBb,IAAM,2BAAN,MAAuD;AAAA,EAS7D,YACC,cACiB,QACA,WACjB,YAAY,KACX;AAHgB;AACA;AAGjB,SAAK,YAAY;AACjB,SAAK,OAAO,aAAa;AACzB,SAAK,KAAK,MAAM;AAChB,SAAK,KAAK,iBAAiB,WAAW,CAAC,UAAiD;AACvF,YAAM,OAAO,MAAM;AACnB,UAAI,MAAM,SAA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