@vibes.diy/identity 14.3.443 → 14.3.445

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.
@@ -184,12 +184,8 @@ export class DeviceIdVerifyMsg {
184
184
  }
185
185
  findTrustedCA(cert, trustedCAs) {
186
186
  return trustedCAs.find((trustedCA) => {
187
- try {
188
- return cert.iss === trustedCA.sub;
189
- }
190
- catch {
191
- return false;
192
- }
187
+ const r = exception2Result(() => cert.iss === trustedCA.sub);
188
+ return r.isOk() ? r.Ok() : false;
193
189
  });
194
190
  }
195
191
  async validateCertificateChainSignature(certInfo) {
@@ -1,4 +1,4 @@
1
- import type { URI } from "@adviser/cement";
1
+ import { type URI } from "@adviser/cement";
2
2
  import type { SuperThis } from "../types/sthis.js";
3
3
  export declare class KeyBagProviderMemory {
4
4
  #private;
@@ -1,3 +1,4 @@
1
+ import { exception2Result } from "@adviser/cement";
1
2
  const memoryKeyBag = new Map();
2
3
  export class KeyBagProviderMemory {
3
4
  url;
@@ -19,12 +20,9 @@ export class KeyBagProviderMemory {
19
20
  async get(id) {
20
21
  const binKeyItem = memoryKeyBag.get(this.#key(id));
21
22
  if (binKeyItem) {
22
- try {
23
- const ki = JSON.parse(this.sthis.txt.decode(binKeyItem));
24
- return ki;
25
- }
26
- catch {
27
- }
23
+ const rKi = exception2Result(() => JSON.parse(this.sthis.txt.decode(binKeyItem)));
24
+ if (rKi.isOk())
25
+ return rKi.Ok();
28
26
  }
29
27
  return undefined;
30
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/identity",
3
- "version": "14.3.443",
3
+ "version": "14.3.445",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -19,7 +19,7 @@
19
19
  "@adviser/ts-xxhash": "~1.0.2",
20
20
  "@clerk/shared": "~4.48.2",
21
21
  "@hono/node-server": "~2.1.9",
22
- "@vibes.diy/cmd-tools": "14.3.443",
22
+ "@vibes.diy/cmd-tools": "14.3.445",
23
23
  "arktype": "~2.2.9",
24
24
  "hono": "~4.13.19",
25
25
  "jose": "~6.2.17",