@delta-comic/db 0.0.4 → 0.0.7
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/index.js +306 -225
- package/dist/index.js.map +1 -1
- package/dist/lib/nativeStore/index.d.ts +1 -1
- package/dist/pack.tgz +0 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Pn as e, Wr as t, c as n, lr as r, n as i, r as a, s as o, sn as s, t as c, u as l, y as u } from "./esm-Di_XcAT-.js";
|
|
2
2
|
import { useGlobalVar as d } from "@delta-comic/utils";
|
|
3
|
-
import { computed as f,
|
|
4
|
-
import { SourcedValue as
|
|
5
|
-
var
|
|
3
|
+
import { computed as f, customRef as p, getCurrentInstance as m, nextTick as h, onMounted as g, readonly as _, ref as v, shallowRef as y, toRef as b, toValue as x, triggerRef as S, unref as C, watch as w } from "vue";
|
|
4
|
+
import { SourcedValue as T, Struct as E, uni as D } from "@delta-comic/model";
|
|
5
|
+
var O = Object.defineProperty, k = (e, t) => {
|
|
6
6
|
let n = {};
|
|
7
|
-
for (var r in e)
|
|
7
|
+
for (var r in e) O(n, r, {
|
|
8
8
|
get: e[r],
|
|
9
9
|
enumerable: !0
|
|
10
10
|
});
|
|
11
|
-
return t ||
|
|
11
|
+
return t || O(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
12
|
};
|
|
13
|
-
async function
|
|
13
|
+
async function A(e) {
|
|
14
14
|
await e.schema.createTable("itemStore").addColumn("key", "text", (e) => e.primaryKey().notNull()).addColumn("item", "text", (e) => e.notNull()).execute(), await e.schema.createIndex("item_store_key").on("itemStore").column("key").execute(), await e.schema.createTable("history").addColumn("ep", "text", (e) => e.notNull()).addColumn("timestamp", "datetime", (e) => e.notNull().primaryKey()).addColumn("itemKey", "text", (e) => e.notNull().unique()).addForeignKeyConstraint("itemKeyForeign", ["itemKey"], "itemStore", ["key"], (e) => e.onDelete("cascade")).execute(), await e.schema.createIndex("history_timestamp").on("history").column("timestamp desc").execute(), await e.schema.createTable("recentView").addColumn("timestamp", "datetime", (e) => e.notNull().primaryKey()).addColumn("itemKey", "text", (e) => e.notNull().unique()).addForeignKeyConstraint("itemKeyForeign", ["itemKey"], "itemStore", ["key"], (e) => e.onDelete("cascade")).addColumn("isViewed", "boolean", (e) => e.notNull()).execute(), await e.schema.createIndex("recent_timestamp").on("recentView").column("timestamp desc").execute(), await e.schema.createTable("favouriteCard").addColumn("createAt", "datetime", (e) => e.notNull().primaryKey()).addColumn("title", "text", (e) => e.notNull()).addColumn("private", "boolean", (e) => e.notNull()).addColumn("description", "text", (e) => e.notNull()).execute(), await e.insertInto("favouriteCard").values({
|
|
15
15
|
createAt: 0,
|
|
16
16
|
title: "默认收藏夹",
|
|
@@ -22,24 +22,24 @@ async function T(e) {
|
|
|
22
22
|
"itemKey"
|
|
23
23
|
]).addUniqueConstraint("uniqueKey", ["belongTo", "itemKey"]).addForeignKeyConstraint("itemKeyForeign", ["itemKey"], "itemStore", ["createAt"], (e) => e.onDelete("cascade")).addForeignKeyConstraint("belongToForeign", ["belongTo"], "favouriteCard", ["key"], (e) => e.onDelete("cascade")).execute(), await e.schema.createIndex("favourite_item_belongTo_addTime").on("favouriteItem").column("addTime desc").column("belongTo").execute(), await e.schema.createTable("subscribe").addColumn("itemKey", "text").addForeignKeyConstraint("itemKeyForeign", ["itemKey"], "itemStore", ["key"], (e) => e.onDelete("cascade")).addColumn("author", "text").addColumn("type", "text", (e) => e.notNull()).addColumn("key", "text", (e) => e.notNull()).addColumn("plugin", "text", (e) => e.notNull()).addPrimaryKeyConstraint("primary_key", ["plugin", "key"]).execute(), await e.schema.createIndex("subscribe_key_plugin").on("subscribe").column("key").column("plugin").execute(), await e.schema.createTable("plugin").addColumn("installerName", "text", (e) => e.notNull()).addColumn("loaderName", "text", (e) => e.notNull()).addColumn("pluginName", "text", (e) => e.notNull().primaryKey()).addColumn("meta", "json", (e) => e.notNull()).addColumn("enable", "text", (e) => e.notNull()).addColumn("installInput", "text", (e) => e.notNull()).execute(), await e.schema.createIndex("plugin_enable").on("plugin").column("enable").execute(), await e.schema.createIndex("plugin_pluginName").on("plugin").column("pluginName").execute();
|
|
24
24
|
}
|
|
25
|
-
async function
|
|
25
|
+
async function j(e) {
|
|
26
26
|
await e.schema.dropTable("itemStore").ifExists().execute(), await e.schema.dropTable("history").ifExists().execute(), await e.schema.dropTable("recentView").ifExists().execute(), await e.schema.dropTable("favouriteCard").ifExists().execute(), await e.schema.dropTable("favouriteItem").ifExists().execute(), await e.schema.dropTable("subscribe").ifExists().execute(), await e.schema.dropTable("plugin").ifExists().execute();
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
up:
|
|
30
|
-
down:
|
|
28
|
+
var M = {
|
|
29
|
+
up: A,
|
|
30
|
+
down: j
|
|
31
31
|
};
|
|
32
|
-
async function
|
|
32
|
+
async function ee(e) {
|
|
33
33
|
await e.schema.alterTable("plugin").addColumn("displayName", "text").execute();
|
|
34
34
|
}
|
|
35
|
-
async function
|
|
35
|
+
async function te(e) {
|
|
36
36
|
await e.schema.alterTable("plugin").dropColumn("displayName").execute();
|
|
37
37
|
}
|
|
38
|
-
var
|
|
39
|
-
up:
|
|
40
|
-
down:
|
|
38
|
+
var ne = {
|
|
39
|
+
up: ee,
|
|
40
|
+
down: te
|
|
41
41
|
};
|
|
42
|
-
async function
|
|
42
|
+
async function re(e) {
|
|
43
43
|
await e.schema.alterTable("favouriteItem").renameTo("favouriteItem_old").execute(), await e.schema.createTable("favouriteItem").addColumn("addTime", "datetime", (e) => e.notNull()).addColumn("belongTo", "integer", (e) => e.notNull()).addColumn("itemKey", "text", (e) => e.notNull()).addPrimaryKeyConstraint("primary_key", [
|
|
44
44
|
"addTime",
|
|
45
45
|
"belongTo",
|
|
@@ -54,7 +54,7 @@ async function ae(e) {
|
|
|
54
54
|
"itemKey"
|
|
55
55
|
])).execute(), await e.schema.dropTable("favouriteItem_old").execute(), await e.schema.createIndex("favourite_item_belongTo_addTime").on("favouriteItem").column("addTime desc").column("belongTo").execute();
|
|
56
56
|
}
|
|
57
|
-
async function
|
|
57
|
+
async function ie(e) {
|
|
58
58
|
await e.schema.alterTable("favouriteItem").renameTo("favouriteItem_new").execute(), await e.schema.createTable("favouriteItem").addColumn("addTime", "datetime", (e) => e.notNull()).addColumn("belongTo", "integer", (e) => e.notNull()).addColumn("itemKey", "text", (e) => e.notNull()).addPrimaryKeyConstraint("primary_key", [
|
|
59
59
|
"addTime",
|
|
60
60
|
"belongTo",
|
|
@@ -69,9 +69,9 @@ async function oe(e) {
|
|
|
69
69
|
"itemKey"
|
|
70
70
|
])).execute(), await e.schema.dropTable("favouriteItem_new").execute(), await e.schema.createIndex("favourite_item_belongTo_addTime").on("favouriteItem").column("addTime desc").column("belongTo").execute();
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
up:
|
|
74
|
-
down:
|
|
72
|
+
var ae = {
|
|
73
|
+
up: re,
|
|
74
|
+
down: ie
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* Sends a message to the backend.
|
|
@@ -88,7 +88,7 @@ var se = {
|
|
|
88
88
|
*
|
|
89
89
|
* @since 1.0.0
|
|
90
90
|
*/
|
|
91
|
-
async function
|
|
91
|
+
async function N(e, t = {}, n) {
|
|
92
92
|
return window.__TAURI_INTERNALS__.invoke(e, t, n);
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
@@ -97,7 +97,7 @@ async function E(e, t = {}, n) {
|
|
|
97
97
|
* The `Database` class serves as the primary interface for
|
|
98
98
|
* communicating with the rust side of the sql plugin.
|
|
99
99
|
*/
|
|
100
|
-
var
|
|
100
|
+
var oe = class e {
|
|
101
101
|
constructor(e) {
|
|
102
102
|
this.path = e;
|
|
103
103
|
}
|
|
@@ -117,7 +117,7 @@ var D = class e {
|
|
|
117
117
|
* ```
|
|
118
118
|
*/
|
|
119
119
|
static async load(t) {
|
|
120
|
-
return new e(await
|
|
120
|
+
return new e(await N("plugin:sql|load", { db: t }));
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* **get**
|
|
@@ -171,7 +171,7 @@ var D = class e {
|
|
|
171
171
|
* ```
|
|
172
172
|
*/
|
|
173
173
|
async execute(e, t) {
|
|
174
|
-
let [n, r] = await
|
|
174
|
+
let [n, r] = await N("plugin:sql|execute", {
|
|
175
175
|
db: this.path,
|
|
176
176
|
query: e,
|
|
177
177
|
values: t ?? []
|
|
@@ -200,7 +200,7 @@ var D = class e {
|
|
|
200
200
|
* ```
|
|
201
201
|
*/
|
|
202
202
|
async select(e, t) {
|
|
203
|
-
return await
|
|
203
|
+
return await N("plugin:sql|select", {
|
|
204
204
|
db: this.path,
|
|
205
205
|
query: e,
|
|
206
206
|
values: t ?? []
|
|
@@ -218,10 +218,10 @@ var D = class e {
|
|
|
218
218
|
* @param db - Optionally state the name of a database if you are managing more than one. Otherwise, all database pools will be in scope.
|
|
219
219
|
*/
|
|
220
220
|
async close(e) {
|
|
221
|
-
return await
|
|
221
|
+
return await N("plugin:sql|close", { db: e });
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
function
|
|
224
|
+
function P(e, t, { signal: n, edges: r } = {}) {
|
|
225
225
|
let i, a = null, o = r != null && r.includes("leading"), s = r == null || r.includes("trailing"), c = () => {
|
|
226
226
|
a !== null && (e.apply(i, a), i = void 0, a = null);
|
|
227
227
|
}, l = () => {
|
|
@@ -244,13 +244,7 @@ function O(e, t, { signal: n, edges: r } = {}) {
|
|
|
244
244
|
};
|
|
245
245
|
return h.schedule = d, h.cancel = p, h.flush = m, n?.addEventListener("abort", p, { once: !0 }), h;
|
|
246
246
|
}
|
|
247
|
-
|
|
248
|
-
return typeof e == "string";
|
|
249
|
-
}
|
|
250
|
-
function le(e) {
|
|
251
|
-
return e === void 0;
|
|
252
|
-
}
|
|
253
|
-
var ue = class {
|
|
247
|
+
var se = class {
|
|
254
248
|
/**
|
|
255
249
|
* Base class that implements {@link Dialect}
|
|
256
250
|
* @param create function that create {@link Driver}
|
|
@@ -268,7 +262,7 @@ var ue = class {
|
|
|
268
262
|
createIntrospector(e) {
|
|
269
263
|
return new a(e);
|
|
270
264
|
}
|
|
271
|
-
},
|
|
265
|
+
}, ce = class {
|
|
272
266
|
promise;
|
|
273
267
|
resolve;
|
|
274
268
|
async lock() {
|
|
@@ -282,11 +276,11 @@ var ue = class {
|
|
|
282
276
|
this.promise = void 0, this.resolve = void 0, e?.();
|
|
283
277
|
}
|
|
284
278
|
};
|
|
285
|
-
async function
|
|
279
|
+
async function F(e, n, i, a, o) {
|
|
286
280
|
await i.executeQuery(o(r.createWithChildren([r.createWithSql(`${e} `), t.create(a)]), n()));
|
|
287
281
|
}
|
|
288
|
-
var
|
|
289
|
-
mutex = new
|
|
282
|
+
var le = class {
|
|
283
|
+
mutex = new ce();
|
|
290
284
|
conn;
|
|
291
285
|
savepoint;
|
|
292
286
|
releaseSavepoint;
|
|
@@ -299,7 +293,7 @@ var fe = class {
|
|
|
299
293
|
*/
|
|
300
294
|
constructor(e) {
|
|
301
295
|
this.init = () => import("./esm-CzppQRXP.js").then(({ createQueryId: e }) => {
|
|
302
|
-
e && (this.savepoint =
|
|
296
|
+
e && (this.savepoint = F.bind(null, "savepoint", e), this.releaseSavepoint = F.bind(null, "release", e), this.rollbackToSavepoint = F.bind(null, "rollback to", e));
|
|
303
297
|
}).then(e);
|
|
304
298
|
}
|
|
305
299
|
async acquireConnection() {
|
|
@@ -318,7 +312,7 @@ var fe = class {
|
|
|
318
312
|
this.mutex.unlock();
|
|
319
313
|
}
|
|
320
314
|
};
|
|
321
|
-
function
|
|
315
|
+
function ue(e) {
|
|
322
316
|
return async (t, n, r) => {
|
|
323
317
|
let i = await e.all(n, r);
|
|
324
318
|
return t || i.length ? { rows: i } : {
|
|
@@ -327,20 +321,20 @@ function pe(e) {
|
|
|
327
321
|
};
|
|
328
322
|
};
|
|
329
323
|
}
|
|
330
|
-
function
|
|
324
|
+
function I(e) {
|
|
331
325
|
return e == null ? void 0 : BigInt(e);
|
|
332
326
|
}
|
|
333
|
-
var
|
|
327
|
+
var de = class extends le {
|
|
334
328
|
db;
|
|
335
329
|
constructor(e, t) {
|
|
336
330
|
super(async () => {
|
|
337
|
-
this.db = await e(), this.conn = new
|
|
331
|
+
this.db = await e(), this.conn = new fe(this.db), await t?.(this.conn);
|
|
338
332
|
});
|
|
339
333
|
}
|
|
340
334
|
async destroy() {
|
|
341
335
|
await this.db?.close();
|
|
342
336
|
}
|
|
343
|
-
},
|
|
337
|
+
}, fe = class {
|
|
344
338
|
constructor(e) {
|
|
345
339
|
this.db = e;
|
|
346
340
|
}
|
|
@@ -352,7 +346,7 @@ var me = class extends fe {
|
|
|
352
346
|
async executeQuery({ parameters: t, query: n, sql: r }) {
|
|
353
347
|
return await this.db.query(e.is(n), r, t);
|
|
354
348
|
}
|
|
355
|
-
},
|
|
349
|
+
}, pe = class extends se {
|
|
356
350
|
/**
|
|
357
351
|
* Dialect for generic SQLite that run SQLs in current thread
|
|
358
352
|
*
|
|
@@ -360,9 +354,9 @@ var me = class extends fe {
|
|
|
360
354
|
* @param onCreateConnection optional callback after connection created
|
|
361
355
|
*/
|
|
362
356
|
constructor(e, t) {
|
|
363
|
-
super(() => new
|
|
357
|
+
super(() => new de(e, t));
|
|
364
358
|
}
|
|
365
|
-
},
|
|
359
|
+
}, L = class extends pe {
|
|
366
360
|
/**
|
|
367
361
|
* SQLite dialect for Tauri, using [official sql plugin](https://github.com/tauri-apps/plugins-workspace/tree/dev/plugins/sql)
|
|
368
362
|
*/
|
|
@@ -372,13 +366,13 @@ var me = class extends fe {
|
|
|
372
366
|
let e = typeof t == "function" ? await t("sqlite:") : t;
|
|
373
367
|
return {
|
|
374
368
|
db: e,
|
|
375
|
-
query:
|
|
369
|
+
query: ue({
|
|
376
370
|
all: async (t, n) => await e.select(t, n),
|
|
377
371
|
run: async (t, n) => {
|
|
378
372
|
let { rowsAffected: r, lastInsertId: i } = await e.execute(t, n);
|
|
379
373
|
return {
|
|
380
|
-
numAffectedRows:
|
|
381
|
-
insertId:
|
|
374
|
+
numAffectedRows: I(r),
|
|
375
|
+
insertId: I(i)
|
|
382
376
|
};
|
|
383
377
|
}
|
|
384
378
|
}),
|
|
@@ -386,7 +380,7 @@ var me = class extends fe {
|
|
|
386
380
|
};
|
|
387
381
|
}, n);
|
|
388
382
|
}
|
|
389
|
-
},
|
|
383
|
+
}, me = class extends s {
|
|
390
384
|
serializer;
|
|
391
385
|
constructor(e) {
|
|
392
386
|
super(), this.serializer = e;
|
|
@@ -415,8 +409,8 @@ var me = class extends fe {
|
|
|
415
409
|
value: this.serializer(e.value)
|
|
416
410
|
};
|
|
417
411
|
}
|
|
418
|
-
},
|
|
419
|
-
if (
|
|
412
|
+
}, he = (e) => {
|
|
413
|
+
if (R(e) || typeof e == "string") return e;
|
|
420
414
|
if (typeof e == "boolean") return "" + e;
|
|
421
415
|
if (e instanceof Date) return e.toISOString();
|
|
422
416
|
try {
|
|
@@ -424,25 +418,25 @@ var me = class extends fe {
|
|
|
424
418
|
} catch {
|
|
425
419
|
return e;
|
|
426
420
|
}
|
|
427
|
-
},
|
|
428
|
-
if (
|
|
421
|
+
}, ge = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:\.\d+)?Z?$/, _e = (e) => {
|
|
422
|
+
if (R(e)) return e;
|
|
429
423
|
if (typeof e == "string") {
|
|
430
424
|
if (e === "true") return !0;
|
|
431
425
|
if (e === "false") return !1;
|
|
432
|
-
if (
|
|
433
|
-
if (
|
|
426
|
+
if (ge.test(e)) return new Date(e);
|
|
427
|
+
if (ve(e)) try {
|
|
434
428
|
return JSON.parse(e);
|
|
435
429
|
} catch {}
|
|
436
430
|
return e;
|
|
437
431
|
}
|
|
438
432
|
};
|
|
439
|
-
function
|
|
433
|
+
function ve(e) {
|
|
440
434
|
return e.startsWith("{") && e.endsWith("}") || e.startsWith("[") && e.endsWith("]");
|
|
441
435
|
}
|
|
442
|
-
function
|
|
436
|
+
function R(e) {
|
|
443
437
|
return e == null || typeof e == "bigint" || typeof e == "number" || typeof e == "object" && "buffer" in e;
|
|
444
438
|
}
|
|
445
|
-
var
|
|
439
|
+
var ye = class {
|
|
446
440
|
transformer;
|
|
447
441
|
deserializer;
|
|
448
442
|
skipNodeSet;
|
|
@@ -451,7 +445,7 @@ var xe = class {
|
|
|
451
445
|
* Base class for {@link SerializePlugin}, without default options
|
|
452
446
|
*/
|
|
453
447
|
constructor(e, t, n) {
|
|
454
|
-
this.transformer = new
|
|
448
|
+
this.transformer = new me(e), this.deserializer = t, n.length && (this.skipNodeSet = new Set(n), this.ctx = /* @__PURE__ */ new WeakSet());
|
|
455
449
|
}
|
|
456
450
|
transformQuery({ node: e, queryId: t }) {
|
|
457
451
|
return this.skipNodeSet?.has(e.kind) ? (this.ctx?.add(t), e) : this.transformer.transformNode(e);
|
|
@@ -472,7 +466,7 @@ var xe = class {
|
|
|
472
466
|
}
|
|
473
467
|
return t;
|
|
474
468
|
}
|
|
475
|
-
},
|
|
469
|
+
}, z = class extends ye {
|
|
476
470
|
/**
|
|
477
471
|
* _**THIS PLUGIN SHOULD BE PLACED AT THE END OF PLUGINS ARRAY !!!**_
|
|
478
472
|
*
|
|
@@ -535,11 +529,11 @@ var xe = class {
|
|
|
535
529
|
* ```
|
|
536
530
|
*/
|
|
537
531
|
constructor(e = {}) {
|
|
538
|
-
let { deserializer: t =
|
|
532
|
+
let { deserializer: t = _e, serializer: n = he, skipNodeKind: r = [] } = e;
|
|
539
533
|
super(n, t, r);
|
|
540
534
|
}
|
|
541
535
|
};
|
|
542
|
-
function
|
|
536
|
+
function B(e) {
|
|
543
537
|
return {
|
|
544
538
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
545
539
|
on: function(t, n) {
|
|
@@ -560,48 +554,48 @@ function F(e) {
|
|
|
560
554
|
}
|
|
561
555
|
};
|
|
562
556
|
}
|
|
563
|
-
var
|
|
564
|
-
get: () =>
|
|
565
|
-
getByEnabled: () =>
|
|
566
|
-
toggleEnable: () =>
|
|
557
|
+
var be = /* @__PURE__ */ k({
|
|
558
|
+
get: () => Se,
|
|
559
|
+
getByEnabled: () => xe,
|
|
560
|
+
toggleEnable: () => Ce
|
|
567
561
|
});
|
|
568
|
-
async function
|
|
562
|
+
async function xe(e) {
|
|
569
563
|
let { db: t } = await import("./index.js");
|
|
570
564
|
return t.value.selectFrom("plugin").where("enable", "=", e).selectAll().execute();
|
|
571
565
|
}
|
|
572
|
-
async function
|
|
566
|
+
async function Se(e) {
|
|
573
567
|
let { db: t } = await import("./index.js");
|
|
574
568
|
return t.value.selectFrom("plugin").where("pluginName", "=", e).selectAll().executeTakeFirstOrThrow();
|
|
575
569
|
}
|
|
576
|
-
async function
|
|
570
|
+
async function Ce(e) {
|
|
577
571
|
let { db: t } = await import("./index.js"), n = await t.value.selectFrom("plugin").where("pluginName", "=", e).select("enable").executeTakeFirstOrThrow();
|
|
578
572
|
return t.value.updateTable("plugin").where("pluginName", "=", e).set({ enable: !n.enable }).execute();
|
|
579
573
|
}
|
|
580
|
-
var
|
|
581
|
-
key: () =>
|
|
582
|
-
upsert: () =>
|
|
574
|
+
var we = /* @__PURE__ */ k({
|
|
575
|
+
key: () => V,
|
|
576
|
+
upsert: () => H
|
|
583
577
|
});
|
|
584
|
-
const
|
|
585
|
-
async function
|
|
586
|
-
let { db: t } = await import("./index.js"), n =
|
|
578
|
+
const V = new T("*");
|
|
579
|
+
async function H(e) {
|
|
580
|
+
let { db: t } = await import("./index.js"), n = V.toString([D.content.ContentPage.contentPage.toString(e.contentType), e.id]);
|
|
587
581
|
return await t.value.replaceInto("itemStore").values({
|
|
588
|
-
item:
|
|
582
|
+
item: E.toRaw(e),
|
|
589
583
|
key: n
|
|
590
584
|
}).execute(), n;
|
|
591
585
|
}
|
|
592
|
-
var
|
|
593
|
-
moveItem: () =>
|
|
594
|
-
upsertItem: () =>
|
|
586
|
+
var Te = /* @__PURE__ */ k({
|
|
587
|
+
moveItem: () => De,
|
|
588
|
+
upsertItem: () => Ee
|
|
595
589
|
});
|
|
596
|
-
async function
|
|
597
|
-
let { db: n } = await import("./index.js"), r = await
|
|
590
|
+
async function Ee(e, ...t) {
|
|
591
|
+
let { db: n } = await import("./index.js"), r = await H(e);
|
|
598
592
|
for (let e of t) await n.value.replaceInto("favouriteItem").values({
|
|
599
593
|
addTime: Date.now(),
|
|
600
594
|
itemKey: r,
|
|
601
595
|
belongTo: e
|
|
602
596
|
}).execute();
|
|
603
597
|
}
|
|
604
|
-
async function
|
|
598
|
+
async function De(e, t, ...n) {
|
|
605
599
|
let { db: r } = await import("./index.js");
|
|
606
600
|
await r.value.deleteFrom("favouriteItem").where("itemKey", "=", e.id).where("belongTo", "=", t).execute();
|
|
607
601
|
for (let t of n) await r.value.replaceInto("favouriteItem").values({
|
|
@@ -610,26 +604,26 @@ async function ke(e, t, ...n) {
|
|
|
610
604
|
belongTo: t
|
|
611
605
|
}).execute();
|
|
612
606
|
}
|
|
613
|
-
var
|
|
614
|
-
async function
|
|
615
|
-
let { db: t } = await import("./index.js"), n = await
|
|
607
|
+
var Oe = /* @__PURE__ */ k({ upsert: () => ke });
|
|
608
|
+
async function ke(e) {
|
|
609
|
+
let { db: t } = await import("./index.js"), n = await H(e);
|
|
616
610
|
await t.value.replaceInto("history").values({
|
|
617
611
|
itemKey: n,
|
|
618
612
|
timestamp: Date.now(),
|
|
619
|
-
ep:
|
|
613
|
+
ep: E.toRaw(e)
|
|
620
614
|
}).execute();
|
|
621
615
|
}
|
|
622
|
-
var
|
|
623
|
-
getAll: () =>
|
|
624
|
-
key: () =>
|
|
625
|
-
upsert: () =>
|
|
616
|
+
var Ae = /* @__PURE__ */ k({
|
|
617
|
+
getAll: () => Me,
|
|
618
|
+
key: () => je,
|
|
619
|
+
upsert: () => Ne
|
|
626
620
|
});
|
|
627
|
-
const
|
|
628
|
-
async function
|
|
621
|
+
const je = new T();
|
|
622
|
+
async function Me() {
|
|
629
623
|
let { db: e } = await import("./index.js");
|
|
630
624
|
return e.value.selectFrom("subscribe").selectAll().execute();
|
|
631
625
|
}
|
|
632
|
-
async function
|
|
626
|
+
async function Ne(e) {
|
|
633
627
|
let { db: t } = await import("./index.js");
|
|
634
628
|
return t.value.replaceInto("subscribe").values({
|
|
635
629
|
type: e.type,
|
|
@@ -639,31 +633,39 @@ async function Fe(e) {
|
|
|
639
633
|
author: JSON.stringify(e.author)
|
|
640
634
|
}).execute();
|
|
641
635
|
}
|
|
642
|
-
var
|
|
643
|
-
async function
|
|
644
|
-
let { db: t } = await import("./index.js"), n = await
|
|
636
|
+
var Pe = /* @__PURE__ */ k({ upsert: () => Fe });
|
|
637
|
+
async function Fe(e) {
|
|
638
|
+
let { db: t } = await import("./index.js"), n = await H(e);
|
|
645
639
|
await t.value.replaceInto("recentView").values({
|
|
646
640
|
isViewed: !1,
|
|
647
641
|
itemKey: n,
|
|
648
642
|
timestamp: Date.now()
|
|
649
643
|
}).execute();
|
|
650
644
|
}
|
|
651
|
-
async function
|
|
645
|
+
async function Ie(e) {
|
|
652
646
|
await e.schema.createTable("store").addColumn("item", "text", (e) => e.notNull()).addColumn("name", "text", (e) => e.notNull()).addColumn("namespace", "text", (e) => e.notNull()).addPrimaryKeyConstraint("key", ["name", "namespace"]).execute();
|
|
653
647
|
}
|
|
654
|
-
async function
|
|
648
|
+
async function Le(e) {
|
|
655
649
|
await e.schema.dropTable("store").ifExists().execute();
|
|
656
650
|
}
|
|
657
|
-
var
|
|
658
|
-
up:
|
|
659
|
-
down:
|
|
660
|
-
},
|
|
651
|
+
var Re = {
|
|
652
|
+
up: Ie,
|
|
653
|
+
down: Le
|
|
654
|
+
}, U = typeof window < "u" && typeof document < "u";
|
|
661
655
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
662
|
-
var
|
|
656
|
+
var ze = Object.prototype.toString, Be = (e) => ze.call(e) === "[object Object]", Ve = () => {};
|
|
657
|
+
function He(...e) {
|
|
658
|
+
if (e.length !== 1) return b(...e);
|
|
659
|
+
let t = e[0];
|
|
660
|
+
return typeof t == "function" ? _(p(() => ({
|
|
661
|
+
get: t,
|
|
662
|
+
set: Ve
|
|
663
|
+
}))) : v(t);
|
|
664
|
+
}
|
|
663
665
|
/**
|
|
664
666
|
* @internal
|
|
665
667
|
*/
|
|
666
|
-
function
|
|
668
|
+
function Ue(e, t) {
|
|
667
669
|
function n(...n) {
|
|
668
670
|
return new Promise((r, i) => {
|
|
669
671
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -675,65 +677,114 @@ function He(e, t) {
|
|
|
675
677
|
}
|
|
676
678
|
return n;
|
|
677
679
|
}
|
|
678
|
-
var
|
|
679
|
-
|
|
680
|
+
var W = (e) => e();
|
|
681
|
+
/**
|
|
682
|
+
* EventFilter that gives extra controls to pause and resume the filter
|
|
683
|
+
*
|
|
684
|
+
* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
|
|
685
|
+
* @param options Options to configure the filter
|
|
686
|
+
*/
|
|
687
|
+
function We(e = W, t = {}) {
|
|
688
|
+
let { initialState: n = "active" } = t, r = He(n === "active");
|
|
689
|
+
function i() {
|
|
690
|
+
r.value = !1;
|
|
691
|
+
}
|
|
692
|
+
function a() {
|
|
693
|
+
r.value = !0;
|
|
694
|
+
}
|
|
695
|
+
return {
|
|
696
|
+
isActive: _(r),
|
|
697
|
+
pause: i,
|
|
698
|
+
resume: a,
|
|
699
|
+
eventFilter: (...t) => {
|
|
700
|
+
r.value && e(...t);
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
function G(e) {
|
|
680
705
|
return Array.isArray(e) ? e : [e];
|
|
681
706
|
}
|
|
682
|
-
function
|
|
683
|
-
|
|
684
|
-
|
|
707
|
+
function Ge(e) {
|
|
708
|
+
return e || m();
|
|
709
|
+
}
|
|
710
|
+
function Ke(e, t, n = {}) {
|
|
711
|
+
let { eventFilter: r = W, ...i } = n;
|
|
712
|
+
return w(e, Ue(r, t), i);
|
|
713
|
+
}
|
|
714
|
+
/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */
|
|
715
|
+
function qe(e, t, n = {}) {
|
|
716
|
+
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = We(r, { initialState: i });
|
|
717
|
+
return {
|
|
718
|
+
stop: Ke(e, t, {
|
|
719
|
+
...a,
|
|
720
|
+
eventFilter: o
|
|
721
|
+
}),
|
|
722
|
+
pause: s,
|
|
723
|
+
resume: c,
|
|
724
|
+
isActive: l
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Call onMounted() if it's inside a component lifecycle, if not, just call the function
|
|
729
|
+
*
|
|
730
|
+
* @param fn
|
|
731
|
+
* @param sync if set to false, it will run in the nextTick() of Vue
|
|
732
|
+
* @param target
|
|
733
|
+
*/
|
|
734
|
+
function Je(e, t = !0, n) {
|
|
735
|
+
Ge(n) ? g(e, n) : t ? e() : h(e);
|
|
685
736
|
}
|
|
686
737
|
/**
|
|
687
738
|
* Shorthand for watching value with {immediate: true}
|
|
688
739
|
*
|
|
689
740
|
* @see https://vueuse.org/watchImmediate
|
|
690
741
|
*/
|
|
691
|
-
function
|
|
692
|
-
return
|
|
742
|
+
function Ye(e, t, n) {
|
|
743
|
+
return w(e, t, {
|
|
693
744
|
...n,
|
|
694
745
|
immediate: !0
|
|
695
746
|
});
|
|
696
747
|
}
|
|
697
|
-
var
|
|
698
|
-
|
|
748
|
+
var K = U ? window : void 0;
|
|
749
|
+
U && window.document, U && window.navigator, U && window.location;
|
|
699
750
|
/**
|
|
700
751
|
* Get the dom element of a ref of element or Vue component instance
|
|
701
752
|
*
|
|
702
753
|
* @param elRef
|
|
703
754
|
*/
|
|
704
|
-
function
|
|
705
|
-
let t =
|
|
755
|
+
function Xe(e) {
|
|
756
|
+
let t = x(e);
|
|
706
757
|
return t?.$el ?? t;
|
|
707
758
|
}
|
|
708
|
-
function
|
|
759
|
+
function q(...e) {
|
|
709
760
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = f(() => {
|
|
710
|
-
let t =
|
|
761
|
+
let t = G(x(e[0])).filter((e) => e != null);
|
|
711
762
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
712
763
|
});
|
|
713
|
-
return
|
|
714
|
-
n.value?.map((e) =>
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
764
|
+
return Ye(() => [
|
|
765
|
+
n.value?.map((e) => Xe(e)) ?? [K].filter((e) => e != null),
|
|
766
|
+
G(x(n.value ? e[1] : e[0])),
|
|
767
|
+
G(C(n.value ? e[2] : e[1])),
|
|
768
|
+
x(n.value ? e[3] : e[2])
|
|
718
769
|
], ([e, n, r, i], a, o) => {
|
|
719
770
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
720
|
-
let s =
|
|
771
|
+
let s = Be(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
721
772
|
o(() => {
|
|
722
773
|
c.forEach((e) => e());
|
|
723
774
|
});
|
|
724
775
|
}, { flush: "post" });
|
|
725
776
|
}
|
|
726
|
-
var
|
|
727
|
-
function
|
|
728
|
-
return
|
|
777
|
+
var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Y = "__vueuse_ssr_handlers__", Ze = /* @__PURE__ */ Qe();
|
|
778
|
+
function Qe() {
|
|
779
|
+
return Y in J || (J[Y] = J[Y] || {}), J[Y];
|
|
729
780
|
}
|
|
730
|
-
function
|
|
731
|
-
return
|
|
781
|
+
function $e(e, t) {
|
|
782
|
+
return Ze[e] || t;
|
|
732
783
|
}
|
|
733
|
-
function
|
|
784
|
+
function et(e) {
|
|
734
785
|
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
|
|
735
786
|
}
|
|
736
|
-
var
|
|
787
|
+
var tt = {
|
|
737
788
|
boolean: {
|
|
738
789
|
read: (e) => e === "true",
|
|
739
790
|
write: (e) => String(e)
|
|
@@ -766,138 +817,168 @@ var Qe = {
|
|
|
766
817
|
read: (e) => new Date(e),
|
|
767
818
|
write: (e) => e.toISOString()
|
|
768
819
|
}
|
|
769
|
-
};
|
|
820
|
+
}, X = "vueuse-storage";
|
|
770
821
|
/**
|
|
771
|
-
* Reactive
|
|
822
|
+
* Reactive LocalStorage/SessionStorage.
|
|
772
823
|
*
|
|
773
|
-
* @see https://vueuse.org/
|
|
774
|
-
* @param key
|
|
775
|
-
* @param initialValue
|
|
776
|
-
* @param storage
|
|
777
|
-
* @param options
|
|
824
|
+
* @see https://vueuse.org/useStorage
|
|
778
825
|
*/
|
|
779
|
-
function
|
|
780
|
-
let { flush: i = "pre", deep: a = !0, listenToStorageChanges: o = !0, writeDefaults: s = !0, mergeDefaults: c = !1, shallow: l, window: u =
|
|
826
|
+
function nt(e, t, n, r = {}) {
|
|
827
|
+
let { flush: i = "pre", deep: a = !0, listenToStorageChanges: o = !0, writeDefaults: s = !0, mergeDefaults: c = !1, shallow: l, window: u = K, eventFilter: d, onError: p = (e) => {
|
|
781
828
|
console.error(e);
|
|
782
|
-
},
|
|
829
|
+
}, initOnMounted: m } = r, g = (l ? y : v)(typeof t == "function" ? t() : t), _ = f(() => x(e));
|
|
783
830
|
if (!n) try {
|
|
784
|
-
n =
|
|
831
|
+
n = $e("getDefaultStorage", () => K?.localStorage)();
|
|
785
832
|
} catch (e) {
|
|
786
|
-
|
|
787
|
-
}
|
|
788
|
-
async function x(t) {
|
|
789
|
-
if (!(!n || t && t.key !== e)) try {
|
|
790
|
-
let r = t ? t.newValue : await n.getItem(e);
|
|
791
|
-
if (r == null) y.value = _, s && _ !== null && await n.setItem(e, await b.write(_));
|
|
792
|
-
else if (c) {
|
|
793
|
-
let e = await b.read(r);
|
|
794
|
-
typeof c == "function" ? y.value = c(e, _) : v === "object" && !Array.isArray(e) ? y.value = {
|
|
795
|
-
..._,
|
|
796
|
-
...e
|
|
797
|
-
} : y.value = e;
|
|
798
|
-
} else y.value = await b.read(r);
|
|
799
|
-
} catch (e) {
|
|
800
|
-
f(e);
|
|
801
|
-
}
|
|
833
|
+
p(e);
|
|
802
834
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
835
|
+
if (!n) return g;
|
|
836
|
+
let b = x(t), S = et(b), C = r.serializer ?? tt[S], { pause: T, resume: E } = qe(g, (e) => k(e), {
|
|
837
|
+
flush: i,
|
|
838
|
+
deep: a,
|
|
839
|
+
eventFilter: d
|
|
807
840
|
});
|
|
808
|
-
|
|
841
|
+
w(_, () => j(), { flush: i });
|
|
842
|
+
let D = !1;
|
|
843
|
+
u && o && (n instanceof Storage ? q(u, "storage", (e) => {
|
|
844
|
+
m && !D || j(e);
|
|
845
|
+
}, { passive: !0 }) : q(u, X, (e) => {
|
|
846
|
+
m && !D || M(e);
|
|
847
|
+
})), m ? Je(() => {
|
|
848
|
+
D = !0, j();
|
|
849
|
+
}) : j();
|
|
850
|
+
function O(e, t) {
|
|
851
|
+
if (u) {
|
|
852
|
+
let r = {
|
|
853
|
+
key: _.value,
|
|
854
|
+
oldValue: e,
|
|
855
|
+
newValue: t,
|
|
856
|
+
storageArea: n
|
|
857
|
+
};
|
|
858
|
+
u.dispatchEvent(n instanceof Storage ? new StorageEvent("storage", r) : new CustomEvent(X, { detail: r }));
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
function k(e) {
|
|
809
862
|
try {
|
|
810
|
-
|
|
863
|
+
let t = n.getItem(_.value);
|
|
864
|
+
if (e == null) O(t, null), n.removeItem(_.value);
|
|
865
|
+
else {
|
|
866
|
+
let r = C.write(e);
|
|
867
|
+
t !== r && (n.setItem(_.value, r), O(t, r));
|
|
868
|
+
}
|
|
811
869
|
} catch (e) {
|
|
812
|
-
|
|
870
|
+
p(e);
|
|
813
871
|
}
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
872
|
+
}
|
|
873
|
+
function A(e) {
|
|
874
|
+
let t = e ? e.newValue : n.getItem(_.value);
|
|
875
|
+
if (t == null) return s && b != null && n.setItem(_.value, C.write(b)), b;
|
|
876
|
+
if (!e && c) {
|
|
877
|
+
let e = C.read(t);
|
|
878
|
+
return typeof c == "function" ? c(e, b) : S === "object" && !Array.isArray(e) ? {
|
|
879
|
+
...b,
|
|
880
|
+
...e
|
|
881
|
+
} : e;
|
|
882
|
+
} else if (typeof t != "string") return t;
|
|
883
|
+
else return C.read(t);
|
|
884
|
+
}
|
|
885
|
+
function j(e) {
|
|
886
|
+
if (!(e && e.storageArea !== n)) {
|
|
887
|
+
if (e && e.key == null) {
|
|
888
|
+
g.value = b;
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
if (!(e && e.key !== _.value)) {
|
|
892
|
+
T();
|
|
893
|
+
try {
|
|
894
|
+
let t = C.write(g.value);
|
|
895
|
+
(e === void 0 || e?.newValue !== t) && (g.value = A(e));
|
|
896
|
+
} catch (e) {
|
|
897
|
+
p(e);
|
|
898
|
+
} finally {
|
|
899
|
+
e ? h(E) : E();
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
function M(e) {
|
|
905
|
+
j(e.detail);
|
|
906
|
+
}
|
|
907
|
+
return g;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Reactive LocalStorage.
|
|
911
|
+
*
|
|
912
|
+
* @see https://vueuse.org/useLocalStorage
|
|
913
|
+
* @param key
|
|
914
|
+
* @param initialValue
|
|
915
|
+
* @param options
|
|
916
|
+
*/
|
|
917
|
+
function rt(e, t, n = {}) {
|
|
918
|
+
let { window: r = K } = n;
|
|
919
|
+
return nt(e, t, r?.localStorage, n);
|
|
920
|
+
}
|
|
921
|
+
var it = /* @__PURE__ */ Object.assign({ "./migrations/1_initial.ts": Re }), Z = d(await oe.load("sqlite:native_store.db"), "core/store/raw"), at = B(), ot = /\b(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER)\b/i, st = P(() => {
|
|
922
|
+
console.debug("[db sync] db changed"), at.emit("onChange"), S(ct);
|
|
923
|
+
}, 300), ct = d(await (async () => {
|
|
924
|
+
let e = y(new u({
|
|
925
|
+
dialect: new L({ database: {
|
|
828
926
|
close(e) {
|
|
829
|
-
return
|
|
927
|
+
return Z.close(e);
|
|
830
928
|
},
|
|
831
|
-
path:
|
|
929
|
+
path: Z.path,
|
|
832
930
|
async select(e, t) {
|
|
833
931
|
console.debug("sql!", e, t);
|
|
834
|
-
let n = await
|
|
835
|
-
return
|
|
932
|
+
let n = await Z.select(e, t);
|
|
933
|
+
return ot.test(e) && st(), n;
|
|
836
934
|
},
|
|
837
935
|
async execute(e, t) {
|
|
838
936
|
console.debug("sql!", e, t);
|
|
839
|
-
let n = await
|
|
840
|
-
return
|
|
937
|
+
let n = await Z.execute(e, t);
|
|
938
|
+
return ot.test(e) && st(), n;
|
|
841
939
|
}
|
|
842
940
|
} }),
|
|
843
|
-
plugins: [new c(), new
|
|
941
|
+
plugins: [new c(), new z()]
|
|
844
942
|
}));
|
|
845
943
|
return await new o({
|
|
846
944
|
db: e.value,
|
|
847
945
|
provider: { async getMigrations() {
|
|
848
|
-
return
|
|
946
|
+
return it;
|
|
849
947
|
} }
|
|
850
948
|
}).migrateToLatest(), e;
|
|
851
|
-
})(), "core/store/ins"),
|
|
852
|
-
const
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
return await q.value.selectFrom("store").selectAll().where("namespace", "=", t).where("name", "=", n).executeTakeFirst().then((e) => ce(e) ? e : le(e) ? null : JSON.stringify(e));
|
|
860
|
-
},
|
|
861
|
-
async setItem(e, t) {
|
|
862
|
-
let [n, r] = J.toJSON(e);
|
|
863
|
-
await q.value.replaceInto("store").values({
|
|
864
|
-
namespace: n,
|
|
865
|
-
name: r,
|
|
866
|
-
item: JSON.stringify({ value: t })
|
|
867
|
-
}).execute();
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
|
-
var rt = /* @__PURE__ */ Object.assign({
|
|
871
|
-
"./migrations/1_initial.ts": te,
|
|
872
|
-
"./migrations/2_fix-display_name.ts": ie,
|
|
873
|
-
"./migrations/3_fix_fvi_foreign_key.ts": se
|
|
874
|
-
}), Y = d(await D.load("sqlite:app.db"), "core/db/raw"), it = F(), X = /\b(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER)\b/i, Z = O(() => {
|
|
875
|
-
console.debug("[db sync] db changed"), it.emit("onChange"), _(Q);
|
|
949
|
+
})(), "core/store/ins"), lt = new T();
|
|
950
|
+
const ut = (e, t, n) => rt(lt.toString([e, x(t)]), n);
|
|
951
|
+
var dt = /* @__PURE__ */ Object.assign({
|
|
952
|
+
"./migrations/1_initial.ts": M,
|
|
953
|
+
"./migrations/2_fix-display_name.ts": ne,
|
|
954
|
+
"./migrations/3_fix_fvi_foreign_key.ts": ae
|
|
955
|
+
}), Q = d(await oe.load("sqlite:app.db"), "core/db/raw"), ft = B(), pt = /\b(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER)\b/i, mt = P(() => {
|
|
956
|
+
console.debug("[db sync] db changed"), ft.emit("onChange"), S(ht);
|
|
876
957
|
}, 300);
|
|
877
|
-
const
|
|
878
|
-
let e =
|
|
879
|
-
dialect: new
|
|
958
|
+
const ht = d(await (async () => {
|
|
959
|
+
let e = y(new u({
|
|
960
|
+
dialect: new L({ database: {
|
|
880
961
|
close(e) {
|
|
881
|
-
return
|
|
962
|
+
return Q.close(e);
|
|
882
963
|
},
|
|
883
|
-
path:
|
|
964
|
+
path: Q.path,
|
|
884
965
|
async select(e, t) {
|
|
885
966
|
console.debug("sql!", e, t);
|
|
886
|
-
let n = await
|
|
887
|
-
return
|
|
967
|
+
let n = await Q.select(e, t);
|
|
968
|
+
return pt.test(e) && mt(), n;
|
|
888
969
|
},
|
|
889
970
|
async execute(e, t) {
|
|
890
971
|
console.debug("sql!", e, t);
|
|
891
|
-
let n = await
|
|
892
|
-
return
|
|
972
|
+
let n = await Q.execute(e, t);
|
|
973
|
+
return pt.test(e) && mt(), n;
|
|
893
974
|
}
|
|
894
975
|
} }),
|
|
895
|
-
plugins: [new c(), new
|
|
976
|
+
plugins: [new c(), new z()]
|
|
896
977
|
}));
|
|
897
978
|
return await new o({
|
|
898
979
|
db: e.value,
|
|
899
980
|
provider: { async getMigrations() {
|
|
900
|
-
return
|
|
981
|
+
return dt;
|
|
901
982
|
} }
|
|
902
983
|
}).migrateToLatest(), e;
|
|
903
984
|
})(), "core/db/ins");
|
|
@@ -908,6 +989,6 @@ let $;
|
|
|
908
989
|
}
|
|
909
990
|
e.countDb = t;
|
|
910
991
|
})($ ||= {});
|
|
911
|
-
export { $ as DBUtils,
|
|
992
|
+
export { $ as DBUtils, Te as FavouriteDB, Oe as HistoryDB, we as ItemStoreDB, be as PluginArchiveDB, Pe as RecentDB, Ae as SubscribeDB, ht as db, ut as useNativeStore };
|
|
912
993
|
|
|
913
994
|
//# sourceMappingURL=index.js.map
|