@ai-matrx/vault 0.1.24 → 0.1.25

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.js CHANGED
@@ -6709,6 +6709,7 @@ import { Button as Button25 } from "@ai-matrx/design-system/controls";
6709
6709
  import { formatAbsoluteDate as formatAbsoluteDate4 } from "@ai-matrx/kit/format";
6710
6710
 
6711
6711
  // src/lists/logic.ts
6712
+ import { isRfc9562Uuid } from "@ai-matrx/kit/uuid";
6712
6713
  var ENTITY_TYPE = "credential_item";
6713
6714
  var rowsOf = (data) => (Array.isArray(data) ? data : []).filter((r) => r && r.entity_type === ENTITY_TYPE && typeof r.entity_id === "string");
6714
6715
  function favoriteIds(data) {
@@ -6739,7 +6740,6 @@ var REFUSALS = [
6739
6740
  "native_manifest_invalid"
6740
6741
  ];
6741
6742
  var isRefusal = (v) => REFUSALS.includes(v);
6742
- var isUuid = (v) => typeof v === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(v);
6743
6743
  var isCount = (v) => typeof v === "number" && Number.isInteger(v) && v >= 0;
6744
6744
  var INCOMPLETE = "Recovery details were incomplete. Reload Trash and try again.";
6745
6745
  function parseRecoveryPreview(raw) {
@@ -6749,11 +6749,11 @@ function parseRecoveryPreview(raw) {
6749
6749
  const prior = r.prior_was_disabled;
6750
6750
  if (r.supported) {
6751
6751
  const passkeys = r.native_passkeys_count === void 0 ? 0 : r.native_passkeys_count;
6752
- if (!isCount(r.fields_count) || !isCount(r.attachments_count) || passkeys !== 0 && passkeys !== 1 || passkeys === 1 && r.fields_count < 1 || typeof prior !== "boolean" || !isUuid(r.deletion_id) || (r.reason ?? null) !== null) throw new Error(INCOMPLETE);
6752
+ if (!isCount(r.fields_count) || !isCount(r.attachments_count) || passkeys !== 0 && passkeys !== 1 || passkeys === 1 && r.fields_count < 1 || typeof prior !== "boolean" || !isRfc9562Uuid(r.deletion_id) || (r.reason ?? null) !== null) throw new Error(INCOMPLETE);
6753
6753
  return { supported: true, deletionId: r.deletion_id, fields: r.fields_count, attachments: r.attachments_count, passkeys, priorWasDisabled: prior };
6754
6754
  }
6755
6755
  const deletionId = r.deletion_id ?? null;
6756
- if (deletionId !== null && !isUuid(deletionId) || prior != null && typeof prior !== "boolean" || (r.fields_count ?? null) !== null || (r.attachments_count ?? null) !== null || !isRefusal(r.reason)) throw new Error(INCOMPLETE);
6756
+ if (deletionId !== null && !isRfc9562Uuid(deletionId) || prior != null && typeof prior !== "boolean" || (r.fields_count ?? null) !== null || (r.attachments_count ?? null) !== null || !isRefusal(r.reason)) throw new Error(INCOMPLETE);
6757
6757
  return { supported: false, deletionId, reason: r.reason, priorWasDisabled: typeof prior === "boolean" ? prior : null };
6758
6758
  }
6759
6759
  function refusalText(reason) {