feat: update @valkyr/db -> 3.0.2
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
"@tailwindcss/vite": "4.1.17",
|
||||
"@tanstack/react-router": "1.139.9",
|
||||
"@tanstack/react-table": "8.21.3",
|
||||
"@valkyr/db": "npm:@jsr/valkyr__db@3.0.1",
|
||||
"@valkyr/db": "npm:@jsr/valkyr__db@3.0.2",
|
||||
"@zitadel/react": "1.1.0",
|
||||
"class-variance-authority": "0.7.1",
|
||||
"clsx": "2.1.1",
|
||||
|
||||
@@ -82,8 +82,20 @@ export const payment = new IndexedDB({
|
||||
});
|
||||
|
||||
export async function loadBeneficiaries(): Promise<void> {
|
||||
if (hasCacheKey("beneficiaries")) {
|
||||
return; // don't re-fetch the same key
|
||||
}
|
||||
setCacheKey("beneficiaries");
|
||||
const result = await api.payment.benficiaries.list();
|
||||
if ("data" in result) {
|
||||
payment.collection("beneficiary").insert(result.data);
|
||||
}
|
||||
}
|
||||
|
||||
function hasCacheKey(key: string): boolean {
|
||||
return localStorage.getItem(key) !== null;
|
||||
}
|
||||
|
||||
function setCacheKey(key: string): void {
|
||||
localStorage.setItem(key, "cached");
|
||||
}
|
||||
|
||||
10
deno.lock
generated
10
deno.lock
generated
@@ -12,7 +12,7 @@
|
||||
"npm:@jsr/std__assert@1.0.14": "1.0.14",
|
||||
"npm:@jsr/std__dotenv@0.225.5": "0.225.5",
|
||||
"npm:@jsr/std__testing@1.0.15": "1.0.15",
|
||||
"npm:@jsr/valkyr__db@3.0.1": "3.0.1",
|
||||
"npm:@jsr/valkyr__db@3.0.2": "3.0.2",
|
||||
"npm:@jsr/valkyr__event-store@2.0.1": "2.0.1",
|
||||
"npm:@jsr/valkyr__json-rpc@1.1.0": "1.1.0",
|
||||
"npm:@radix-ui/react-avatar@1.1.11": "1.1.11_@types+react@19.2.7_@types+react-dom@19.2.3__@types+react@19.2.7_react@19.2.0_react-dom@19.2.0__react@19.2.0",
|
||||
@@ -797,15 +797,15 @@
|
||||
],
|
||||
"tarball": "https://npm.jsr.io/~/11/@jsr/valkyr__db/2.0.0.tgz"
|
||||
},
|
||||
"@jsr/valkyr__db@3.0.1": {
|
||||
"integrity": "sha512-fOSiEMELURwPbOhJ8qyNLiINETmNHOZV+46m4sNDTBv6nojhts53taStIAjYDTioQH0T7KdXCOEnS2bHwOilhA==",
|
||||
"@jsr/valkyr__db@3.0.2": {
|
||||
"integrity": "sha512-aL1GpKj/rpW/ImIBNeMVMV3KYB7gPKng4eRdfxDUanOAD6Zy9NIgZQKrpjiItzyx7qheEY9MpnrE7VBUKdyqog==",
|
||||
"dependencies": [
|
||||
"@jsr/valkyr__event-emitter",
|
||||
"idb",
|
||||
"mingo@7.1.1",
|
||||
"zod@4.3.4"
|
||||
],
|
||||
"tarball": "https://npm.jsr.io/~/11/@jsr/valkyr__db/3.0.1.tgz"
|
||||
"tarball": "https://npm.jsr.io/~/11/@jsr/valkyr__db/3.0.2.tgz"
|
||||
},
|
||||
"@jsr/valkyr__event-emitter@1.0.1": {
|
||||
"integrity": "sha512-mre5tWJddz8LylSQWuLOw3zgIxd2JmhGRV46jKXNPCGzY2NKJwGGT9H7SBw36RV4dW7jnnH2U1aCJkh8IS/pzA==",
|
||||
@@ -3719,7 +3719,7 @@
|
||||
"npm:@dnd-kit/sortable@10.0.0",
|
||||
"npm:@dnd-kit/utilities@3.2.2",
|
||||
"npm:@eslint/js@9.39.1",
|
||||
"npm:@jsr/valkyr__db@3.0.1",
|
||||
"npm:@jsr/valkyr__db@3.0.2",
|
||||
"npm:@radix-ui/react-avatar@1.1.11",
|
||||
"npm:@radix-ui/react-checkbox@1.3.3",
|
||||
"npm:@radix-ui/react-collapsible@^1.1.12",
|
||||
|
||||
Reference in New Issue
Block a user