@gscdump/engine-sqlite 0.25.14 → 0.26.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/dist/index.mjs +2 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { createScopedHelpers } from "@gscdump/engine/scope";
|
|
|
5
5
|
import { SQLiteAsyncDialect, index, integer, primaryKey, real, sqliteTable, text, unique } from "drizzle-orm/sqlite-core";
|
|
6
6
|
import { drizzle } from "drizzle-orm/sqlite-proxy";
|
|
7
7
|
import { inferSearchType } from "@gscdump/engine";
|
|
8
|
+
import { engineErrorToException, engineErrors } from "@gscdump/engine/errors";
|
|
8
9
|
import { resolveWindow } from "@gscdump/engine/period";
|
|
9
10
|
const DEFAULT_TTL_MS = 3e4;
|
|
10
11
|
function cacheKey(filter) {
|
|
@@ -560,7 +561,7 @@ function createD1ManifestStore(db) {
|
|
|
560
561
|
setWhere: lt(r2Locks.expiresAt, now)
|
|
561
562
|
}).run();
|
|
562
563
|
if ((await db.select({ holderId: r2Locks.holderId }).from(r2Locks).where(eq$1(r2Locks.scope, key)).get())?.holderId === holderId) break;
|
|
563
|
-
if (Date.now() >= deadline) throw
|
|
564
|
+
if (Date.now() >= deadline) throw engineErrorToException(engineErrors.lockAcquireTimeout(key, LOCK_ACQUIRE_TIMEOUT_MS));
|
|
564
565
|
await new Promise((resolve) => setTimeout(resolve, jitterDelay()));
|
|
565
566
|
}
|
|
566
567
|
return await fn().finally(async () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/engine-sqlite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.26.1",
|
|
5
5
|
"description": "SQLite / D1 engine adapter for @gscdump/analysis — typed analytics over sqlite-proxy executors (Cloudflare D1, libsql).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"drizzle-orm": "1.0.0-rc.3"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@gscdump/engine": "0.
|
|
48
|
-
"gscdump": "0.
|
|
47
|
+
"@gscdump/engine": "0.26.1",
|
|
48
|
+
"gscdump": "0.26.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"drizzle-orm": "1.0.0-rc.3",
|