pi-hashline-edit-pro 0.17.7 → 0.17.9
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/package.json +1 -1
- package/src/hash-store.ts +11 -1
package/package.json
CHANGED
package/src/hash-store.ts
CHANGED
|
@@ -213,7 +213,17 @@ export async function loadHashStore(): Promise<HashStore> {
|
|
|
213
213
|
|
|
214
214
|
let handle: BackendHandle;
|
|
215
215
|
if (BetterDatabase) {
|
|
216
|
-
|
|
216
|
+
try {
|
|
217
|
+
handle = openBetterDb(storePath);
|
|
218
|
+
} catch {
|
|
219
|
+
const debug = process.env.PI_HASHLINE_DEBUG === "1" || process.env.PI_HASHLINE_DEBUG === "true";
|
|
220
|
+
if (debug) {
|
|
221
|
+
console.error('better-sqlite3 native binding failed, falling back to sql.js');
|
|
222
|
+
}
|
|
223
|
+
BetterDatabase = null;
|
|
224
|
+
await ensureSqlJs();
|
|
225
|
+
handle = openSqlJsDb(storePath);
|
|
226
|
+
}
|
|
217
227
|
} else {
|
|
218
228
|
await ensureSqlJs();
|
|
219
229
|
handle = openSqlJsDb(storePath);
|