@haex-space/vault-sdk 4.7.0 → 4.7.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/svelte.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as StorageAPI } from './client-DS-j-fHu.mjs';
1
+ import { S as StorageAPI } from './client-BlUizM-l.mjs';
2
2
  import { HaexVaultSdk } from './index.mjs';
3
3
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
4
4
  import { Readable } from 'svelte/store';
package/dist/svelte.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as StorageAPI } from './client-DkVe1o-u.js';
1
+ import { S as StorageAPI } from './client--CgEtJ4G.js';
2
2
  import { HaexVaultSdk } from './index.js';
3
3
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
4
4
  import { Readable } from 'svelte/store';
package/dist/svelte.js CHANGED
@@ -3091,6 +3091,11 @@ var PermissionWaiterRegistry = class {
3091
3091
  for (const callback of [...set]) callback(decision);
3092
3092
  }
3093
3093
  };
3094
+ function promptedKey(error) {
3095
+ const details = error.details ?? {};
3096
+ const field = (name) => typeof details[name] === "string" ? details[name] : error[name];
3097
+ return permissionKey(field("resourceType"), field("action"), field("target"));
3098
+ }
3094
3099
  function toDeniedError(error) {
3095
3100
  return { ...error, code: 1002 /* DENIED */ };
3096
3101
  }
@@ -3103,7 +3108,7 @@ async function withPermissionRetry(send, registry, log, timeoutMs = PERMISSION_D
3103
3108
  if (!isPermissionPromptError(error) || attempt >= MAX_PERMISSION_PROMPTS) {
3104
3109
  throw error;
3105
3110
  }
3106
- const key = permissionKey(error.resourceType, error.action, error.target);
3111
+ const key = promptedKey(error);
3107
3112
  const times = asked.get(key) ?? 0;
3108
3113
  if (times >= MAX_PERMISSION_RETRIES) throw error;
3109
3114
  asked.set(key, times + 1);