v1.2.2 - Fix network error on background, auto-retry streaming with reconnect

This commit is contained in:
admin
2026-05-19 15:50:45 +04:00
Unverified
parent 2e327317e4
commit 1026259a20
3831 changed files with 384316 additions and 39 deletions

24
node_modules/@kvs/node-localstorage/module/index.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import path from "path";
import { kvsStorage } from "@kvs/storage";
import fs from "node:fs/promises";
// @ts-ignore
import { LocalStorage } from "node-localstorage";
// @ts-ignore
import appRoot from "app-root-path";
export const kvsLocalStorage = async (options) => {
const defaultCacheDir = path.join(appRoot.toString(), ".cache");
if (!options.storeFilePath) {
await fs.mkdir(defaultCacheDir, {
recursive: true
});
}
const saveFilePath = options.storeFilePath
? options.storeFilePath
: path.join(defaultCacheDir, "kvs-node-localstorage");
const storeQuota = options.storeQuota ? options.storeQuota : 5 * 1024 * 1024;
return kvsStorage({
...options,
storage: new LocalStorage(saveFilePath, storeQuota)
});
};
//# sourceMappingURL=index.js.map