@passlock/client 2.0.6 → 2.2.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.
Files changed (40) hide show
  1. package/dist/index.d.ts +101 -18
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +106 -17
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/network.d.ts +14 -1
  6. package/dist/internal/network.d.ts.map +1 -1
  7. package/dist/internal/network.js +11 -1
  8. package/dist/internal/network.js.map +1 -1
  9. package/dist/internal/promise.d.ts +7 -3
  10. package/dist/internal/promise.d.ts.map +1 -1
  11. package/dist/internal/promise.js +9 -5
  12. package/dist/internal/promise.js.map +1 -1
  13. package/dist/internal/result.d.ts +33 -0
  14. package/dist/internal/result.d.ts.map +1 -0
  15. package/dist/internal/result.js +35 -0
  16. package/dist/internal/result.js.map +1 -0
  17. package/dist/options.d.ts +5 -5
  18. package/dist/options.d.ts.map +1 -1
  19. package/dist/passkey/authentication/authentication.d.ts +13 -6
  20. package/dist/passkey/authentication/authentication.d.ts.map +1 -1
  21. package/dist/passkey/authentication/authentication.js +4 -1
  22. package/dist/passkey/authentication/authentication.js.map +1 -1
  23. package/dist/passkey/errors.d.ts +19 -13
  24. package/dist/passkey/errors.d.ts.map +1 -1
  25. package/dist/passkey/errors.js +16 -16
  26. package/dist/passkey/errors.js.map +1 -1
  27. package/dist/passkey/registration/registration.d.ts +9 -6
  28. package/dist/passkey/registration/registration.d.ts.map +1 -1
  29. package/dist/passkey/registration/registration.js +3 -3
  30. package/dist/passkey/registration/registration.js.map +1 -1
  31. package/dist/passkey/signals/signals.d.ts +188 -27
  32. package/dist/passkey/signals/signals.d.ts.map +1 -1
  33. package/dist/passkey/signals/signals.js +122 -24
  34. package/dist/passkey/signals/signals.js.map +1 -1
  35. package/dist/principal.d.ts +1 -1
  36. package/dist/safe.d.ts +165 -59
  37. package/dist/safe.d.ts.map +1 -1
  38. package/dist/safe.js +163 -54
  39. package/dist/safe.js.map +1 -1
  40. package/package.json +7 -7
package/dist/safe.js CHANGED
@@ -1,10 +1,22 @@
1
1
  /**
2
- * _safe_ functions i.e. functions that return discriminated unions composed of either a
3
- * success result or an error result for expected outcomes. Use one of the type guards to
4
- * narrow the result to a given success or error type.
2
+ * _safe_ functions i.e. functions that return result envelopes over the original
3
+ * tagged success and error payloads. Use `result.success` or `result.failure`
4
+ * to branch between success and error outcomes. Existing type guards and `_tag`
5
+ * checks remain supported.
5
6
  *
6
7
  * Note: unexpected runtime failures may still throw.
7
8
  *
9
+ * @example
10
+ * const result = await registerPasskey({ tenancyId, username: "jdoe@gmail.com" });
11
+ *
12
+ * if (result.success) {
13
+ * console.log(result.value.code);
14
+ * }
15
+ *
16
+ * if (result.failure) {
17
+ * console.log(result.error.message);
18
+ * }
19
+ *
8
20
  * @categoryDescription Passkeys (core)
9
21
  * Creating, authenticating, updating and deleting passkeys. {@link registerPasskey}
10
22
  * and {@link authenticatePasskey} are the key functions.
@@ -23,7 +35,7 @@ import { runToPromise } from "./internal/index.js";
23
35
  import { eventLogger, Logger } from "./logger.js";
24
36
  import { AuthenticationHelper, authenticatePasskey as authenticatePasskeyM, } from "./passkey/authentication/authentication.js";
25
37
  import { RegistrationHelper, registerPasskey as registerPasskeyM, } from "./passkey/registration/registration.js";
26
- import { deletePasskey as deletePasskeyM, isDeleteSuccess, isPasskeyDeleteSupport as isPasskeyDeleteSupportM, isPasskeyPruningSupport as isPasskeyPruningSupportM, isPasskeyUpdateSupport as isPasskeyUpdateSupportM, isPruningSuccess, isUpdateSuccess, prunePasskeys as prunePasskeysM, updatePasskey as updatePasskeyM, } from "./passkey/signals/signals.js";
38
+ import { deletePasskey as deletePasskeyM, deleteUserPasskeys as deleteUserPasskeysM, isDeleteSuccess, isPasskeyDeleteSupport as isPasskeyDeleteSupportM, isPasskeyPruningSupport as isPasskeyPruningSupportM, isPasskeyUpdateSupport as isPasskeyUpdateSupportM, isPruningSuccess, isUpdateSuccess, prunePasskeys as prunePasskeysM, updatePasskey as updatePasskeyM, updatePasskeyUsernames as updatePasskeyUsernamesM, } from "./passkey/signals/signals.js";
27
39
  /* Registration */
28
40
  /**
29
41
  * Registers a passkey on the user's device, then saves the server-side component in your vault.
@@ -33,11 +45,9 @@ import { deletePasskey as deletePasskeyM, isDeleteSuccess, isPasskeyDeleteSuppor
33
45
  *
34
46
  * @param options
35
47
  *
36
- * @returns Use {@link isRegistrationSuccess} to test for a successful result, {@link RegistrationError} is
37
- * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
38
- * the error.
39
- *
40
- * Alternatively test the result's `_tag` property, which acts as a union discriminator.
48
+ * @returns A {@link Result} whose success branch contains a {@link RegistrationSuccess}
49
+ * and whose error branch contains a {@link RegistrationError}. Existing
50
+ * {@link isRegistrationSuccess} checks and `_tag` discrimination still work.
41
51
  *
42
52
  * @see {@link isRegistrationSuccess}
43
53
  * @see {@link isPasskeyUnsupportedError}
@@ -51,15 +61,15 @@ import { deletePasskey as deletePasskeyM, isDeleteSuccess, isPasskeyDeleteSuppor
51
61
  *
52
62
  * const result = await registerPasskey({ tenancyId, username });
53
63
  *
54
- * if (isRegistrationSuccess(result)) {
64
+ * if (result.success) {
55
65
  * // send this to your backend for verification
56
- * console.log(result.code);
57
- * } else if (isPasskeyUnsupportedError(result)) {
66
+ * console.log(result.value.code);
67
+ * } else if (result.failure && isPasskeyUnsupportedError(result.error)) {
58
68
  * // ^^ using an error type guard
59
69
  * console.log("Device does not support passkeys");
60
- * } else if (result._tag === "@error/OtherPasskey") {
70
+ * } else if (result.failure && result.error._tag === "@error/OtherPasskey") {
61
71
  * // ^^ narrowing the result using the _tag
62
- * console.log(result.message);
72
+ * console.log(result.error.message);
63
73
  * } else {
64
74
  * ...
65
75
  * }
@@ -78,11 +88,10 @@ logger = eventLogger) => pipe(registerPasskeyM(options), Micro.provideService(Re
78
88
  *
79
89
  * @param options
80
90
  *
81
- * @returns Use {@link isAuthenticationSuccess} to test for a successful result, {@link AuthenticationError} is
82
- * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
83
- * the error.
84
- *
85
- * Alternatively test the result's `_tag` property, which acts as a union discriminator.
91
+ * @returns A {@link Result} whose success branch contains an
92
+ * {@link AuthenticationSuccess} and whose error branch contains an
93
+ * {@link AuthenticationError}. Existing {@link isAuthenticationSuccess}
94
+ * checks and `_tag` discrimination still work.
86
95
  *
87
96
  * @see {@link isAuthenticationSuccess}
88
97
  * @see {@link isPasskeyUnsupportedError}
@@ -95,15 +104,15 @@ logger = eventLogger) => pipe(registerPasskeyM(options), Micro.provideService(Re
95
104
  *
96
105
  * const result = await authenticatePasskey({ tenancyId });
97
106
  *
98
- * if (isAuthenticationSuccess(result)) {
107
+ * if (result.success) {
99
108
  * // send this to your backend for verification
100
- * console.log(result.code);
101
- * } else if (isPasskeyUnsupportedError(result)) {
109
+ * console.log(result.value.code);
110
+ * } else if (result.failure && isPasskeyUnsupportedError(result.error)) {
102
111
  * // ^^ using an error type guard
103
112
  * console.log("Device does not support passkeys");
104
- * } else if (result._tag === "@error/OtherPasskey") {
113
+ * } else if (result.failure && result.error._tag === "@error/OtherPasskey") {
105
114
  * // ^^ narrowing the result using the _tag
106
- * console.log(result.message);
115
+ * console.log(result.error.message);
107
116
  * }
108
117
  *
109
118
  * @category Passkeys (core)
@@ -123,10 +132,15 @@ logger = eventLogger) => pipe(authenticatePasskeyM(options), Micro.provideServic
123
132
  * By calling this function and supplying a new username/display name, their local
124
133
  * password manager will align with their updated account identifier.
125
134
  *
126
- * @param options You will typically supply a target `passkeyId` via {@link UpdatePasskeyOptions}. {@link UpdateCredentialOptions} is for advanced use cases.
127
- * @returns Use {@link isUpdateSuccess} and {@link isUpdateError} to test the update status.
128
- *
129
- * Alternatively, examine the result's `_tag` property, which acts as a discriminator.
135
+ * @param options You will typically supply a target `passkeyId` via
136
+ * {@link UpdatePasskeyOptions}. {@link UpdateCredentialOptions} is intended
137
+ * for credential-scoped updates, for example when replaying data returned by
138
+ * `@passlock/server`.
139
+ * @returns A {@link Result} whose success branch contains an
140
+ * {@link UpdateSuccess} after the browser has been asked to refresh the local
141
+ * passkey details, and whose error branch contains an {@link UpdateError}.
142
+ * Existing {@link isUpdateSuccess}, {@link isUpdateError}, and `_tag` checks
143
+ * still work.
130
144
  *
131
145
  * @see {@link isUpdateSuccess}
132
146
  * @see {@link isUpdateError}
@@ -140,12 +154,11 @@ logger = eventLogger) => pipe(authenticatePasskeyM(options), Micro.provideServic
140
154
  *
141
155
  * const result = await updatePasskey({ tenancyId, passkeyId, username, displayName });
142
156
  *
143
- * if (result._tag === "UpdateSuccess") {
144
- * // ^^ narrowing the result using the _tag
145
- * console.log("passkey updated locally");
146
- * } else if (isUpdateError(result)) {
157
+ * if (result.success) {
158
+ * console.log("passkey update signal sent");
159
+ * } else if (result.failure && isUpdateError(result.error)) {
147
160
  * // narrowed to an UpdateError type
148
- * console.log(result.code);
161
+ * console.log(result.error.code);
149
162
  * } else {
150
163
  * console.log("unable to update passkey");
151
164
  * }
@@ -159,9 +172,101 @@ logger = eventLogger) => {
159
172
  return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
160
173
  };
161
174
  /**
162
- * Attempts to delete a passkey from a local device. There are two scenarios in which this function is useful:
175
+ * Attempt to update the username and/or display name for multiple passkeys (client-side only).
176
+ *
177
+ * Useful if the user has changed their account identifier. For example, they register
178
+ * using jdoe@gmail.com but later change their account username to jdoe@yahoo.com.
179
+ * Even after you update their account details in your backend, their local password
180
+ * manager will continue to display jdoe@gmail.com.
181
+ *
182
+ * By calling this function and supplying a new username/display name, their local
183
+ * password manager will align with their updated account identifier.
184
+ *
185
+ * @param options The `credentials` array returned by
186
+ * `@passlock/server/safe`'s `updatePasskeyUsernames` success branch.
187
+ * @returns A {@link Result} whose success branch contains an
188
+ * {@link UpdateSuccess} after the browser has been asked to refresh the local
189
+ * passkey details, and whose error branch contains an {@link UpdateError}.
190
+ * Existing {@link isUpdateSuccess}, {@link isUpdateError}, and `_tag` checks
191
+ * still work.
192
+ *
193
+ * @see {@link isUpdateSuccess}
194
+ * @see {@link isUpdateError}
195
+ *
196
+ * @example
197
+ * // server code
198
+ * import { updatePasskeyUsernames as updatePasskeyUsernamesOnServer } from "@passlock/server/safe";
199
+ *
200
+ * const backendResult = await updatePasskeyUsernamesOnServer({
201
+ * tenancyId,
202
+ * userId,
203
+ * username,
204
+ * displayName,
205
+ * });
206
+ * // send backendResult.value.credentials to your frontend when backendResult.success
163
207
  *
164
- * 1. **Deleting a passkey** - Use the `@passlock/node` package or make vanilla REST calls from your
208
+ * // client code
209
+ * import { updatePasskeyUsernames } from "@passlock/client/safe";
210
+ *
211
+ * const credentialsFromBackend = backendResult.value.credentials;
212
+ * const result = await updatePasskeyUsernames(credentialsFromBackend);
213
+ * console.log(result);
214
+ *
215
+ * @category Passkeys (core)
216
+ */
217
+ export const updatePasskeyUsernames = (options,
218
+ /** @hidden */
219
+ logger = eventLogger) => {
220
+ const micro = updatePasskeyUsernamesM(options);
221
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
222
+ };
223
+ /**
224
+ * Attempt to signal removal of multiple passkeys from a local device.
225
+ *
226
+ * Use this after deleting the server-side passkeys. The `deleted` array returned
227
+ * by `@passlock/server/safe` already has the right shape, so you can pass it
228
+ * straight into this function.
229
+ *
230
+ * @param options Credentials derived from deleted backend passkeys.
231
+ * @returns A {@link Result} whose success branch contains a
232
+ * {@link DeleteSuccess} once the browser removal signals have been queued, and
233
+ * whose error branch contains a {@link DeleteError}. Existing
234
+ * {@link isDeleteSuccess}, {@link isDeleteError}, and `_tag` checks still work.
235
+ * @see {@link isDeleteSuccess}
236
+ * @see {@link isDeleteError}
237
+ *
238
+ * @example
239
+ * // server code
240
+ * import { deleteUserPasskeys as deleteUserPasskeysOnServer } from "@passlock/server/safe";
241
+ *
242
+ * const backendResult = await deleteUserPasskeysOnServer({
243
+ * tenancyId,
244
+ * userId,
245
+ * apiKey,
246
+ * });
247
+ *
248
+ * // send backendResult.value.deleted to your frontend when backendResult.success
249
+ *
250
+ * // client code
251
+ * import { deleteUserPasskeys } from "@passlock/client/safe";
252
+ *
253
+ * const deletedCredentials = backendResult.value.deleted;
254
+ * const result = await deleteUserPasskeys(deletedCredentials);
255
+ * console.log(result);
256
+ *
257
+ * @category Passkeys (core)
258
+ */
259
+ export const deleteUserPasskeys = (options,
260
+ /** @hidden */
261
+ logger = eventLogger) => {
262
+ const micro = deleteUserPasskeysM(options);
263
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
264
+ };
265
+ /**
266
+ * Attempts to signal removal of a passkey from a local device. There are two
267
+ * scenarios in which this function is useful:
268
+ *
269
+ * 1. **Deleting a passkey** - Use the `@passlock/server` package or make vanilla REST calls from your
165
270
  * backend to delete the server-side component, then use this function to delete the client-side component.
166
271
  *
167
272
  * 2. **Missing passkey** - When a user presented a passkey but the server-side component could not be found.
@@ -170,9 +275,13 @@ logger = eventLogger) => {
170
275
  * See [deleting passkeys](https://passlock.dev/passkeys/passkey-removal/) and
171
276
  * [handling missing passkeys](https://passlock.dev/handling-missing-passkeys/) in the documentation.
172
277
  *
173
- * @param options You will typically pass {@link DeletePasskeyOptions}, the other types are for advanced use cases/optimizations.
174
- * @returns Use {@link isDeleteSuccess} to test for a successful deletion, or {@link isDeleteError} to test for an error.
175
- * Alternatively, test the result's `_tag` property, which acts as a discriminator.
278
+ * @param options You will typically pass {@link DeletePasskeyOptions}. Use
279
+ * {@link DeleteCredentialOptions} or {@link OrphanedPasskeyError} when you
280
+ * already have the credential metadata.
281
+ * @returns A {@link Result} whose success branch contains a
282
+ * {@link DeleteSuccess} once the browser removal signal has been queued, and
283
+ * whose error branch contains a {@link DeleteError}. Existing
284
+ * {@link isDeleteSuccess}, {@link isDeleteError}, and `_tag` checks still work.
176
285
  * @see {@link isDeleteSuccess}
177
286
  * @see {@link isDeleteError}
178
287
  *
@@ -183,12 +292,11 @@ logger = eventLogger) => {
183
292
  *
184
293
  * const result = await deletePasskey({ tenancyId, passkeyId });
185
294
  *
186
- * if (result._tag === "DeleteSuccess") {
187
- * // ^^ narrowing the result using the _tag
188
- * console.log("passkey deleted locally");
189
- * } else if (isDeleteError(result)) {
295
+ * if (result.success) {
296
+ * console.log("passkey removal signal sent");
297
+ * } else if (result.failure && isDeleteError(result.error)) {
190
298
  * // narrowed to a DeleteError type
191
- * console.log(result.code);
299
+ * console.log(result.error.code);
192
300
  * } else {
193
301
  * console.log("unable to delete passkey");
194
302
  * }
@@ -208,8 +316,11 @@ logger = eventLogger) => {
208
316
  * should still exist for a given account on this device.
209
317
  *
210
318
  * @param options Pass the passkeys you **want to retain**.
211
- * @returns Use {@link isPruningSuccess} and {@link isPruningError} to narrow the result.
212
- * Alternatively test the result's `_tag` property, which acts as a discriminator.
319
+ * @returns A {@link Result} whose success branch contains a
320
+ * {@link PruningSuccess} once the browser has been told which credentials
321
+ * should remain accepted, and whose error branch contains a
322
+ * {@link PruningError}. Existing {@link isPruningSuccess},
323
+ * {@link isPruningError}, and `_tag` checks still work.
213
324
  *
214
325
  * @see {@link isPruningSuccess}
215
326
  * @see {@link isPruningError}
@@ -221,12 +332,11 @@ logger = eventLogger) => {
221
332
  *
222
333
  * const result = await prunePasskeys({ tenancyId, allowablePasskeyIds });
223
334
  *
224
- * if (result._tag === "PruningSuccess") {
225
- * // ^^ narrowing the result using the _tag
226
- * console.log("local passkeys pruned");
227
- * } else if (isPruningError(result)) {
335
+ * if (result.success) {
336
+ * console.log("accepted credentials signal sent");
337
+ * } else if (result.failure && isPruningError(result.error)) {
228
338
  * // narrowed to a PruningError type
229
- * console.log(result.code);
339
+ * console.log(result.error.code);
230
340
  * } else {
231
341
  * console.log("unable to prune passkeys");
232
342
  * }
@@ -241,7 +351,7 @@ logger = eventLogger) => {
241
351
  };
242
352
  /* Support */
243
353
  /**
244
- * Does the local device support programmatic passkey deletion
354
+ * Does the local device support programmatic passkey deletion?
245
355
  *
246
356
  * @returns `true` if local passkey deletion is supported.
247
357
  *
@@ -249,7 +359,7 @@ logger = eventLogger) => {
249
359
  */
250
360
  export const isPasskeyDeleteSupport = () => pipe(isPasskeyDeleteSupportM, Micro.runSync);
251
361
  /**
252
- * Does the local device support programmatic passkey pruning
362
+ * Does the local device support programmatic passkey pruning?
253
363
  *
254
364
  * @returns `true` if local passkey pruning is supported.
255
365
  *
@@ -257,14 +367,13 @@ export const isPasskeyDeleteSupport = () => pipe(isPasskeyDeleteSupportM, Micro.
257
367
  */
258
368
  export const isPasskeyPruningSupport = () => pipe(isPasskeyPruningSupportM, Micro.runSync);
259
369
  /**
260
- * Does the local device support programmatic passkey updates
370
+ * Does the local device support programmatic passkey updates?
261
371
  *
262
372
  * @returns `true` if local passkey updates are supported.
263
373
  *
264
374
  * @category Passkeys (other)
265
375
  */
266
376
  export const isPasskeyUpdateSupport = () => pipe(isPasskeyUpdateSupportM, Micro.runSync);
267
- /* Re-exports */
268
377
  export { isNetworkError, NetworkError } from "./internal/network.js";
269
378
  export { LogEvent, Logger, LogLevel, } from "./logger.js";
270
379
  export { AuthenticationHelper, isAuthenticationSuccess, } from "./passkey/authentication/authentication.js";
package/dist/safe.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"safe.js","sourceRoot":"","sources":["../src/safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAMjD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,IAAI,oBAAoB,GAC5C,MAAM,4CAA4C,CAAA;AAanD,OAAO,EACL,kBAAkB,EAClB,eAAe,IAAI,gBAAgB,GACpC,MAAM,wCAAwC,CAAA;AAY/C,OAAO,EACL,aAAa,IAAI,cAAc,EAC/B,eAAe,EACf,sBAAsB,IAAI,uBAAuB,EACjD,uBAAuB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C,OAAO,CAAC,CAAA;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAC1C,IAAI,CAAC,wBAAwB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CACzC,IAAI,CAAC,uBAAuB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AAK9C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,MAAM,aAAa,CAAA;AAUpB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,4CAA4C,CAAA;AAEnD,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,YAAY,EACZ,WAAW,GACZ,MAAM,qBAAqB,CAAA;AAQ5B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,wCAAwC,CAAA;AAa/C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sBAAsB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@passlock/client",
3
- "version": "2.0.6",
3
+ "version": "2.2.1",
4
4
  "description": "Flexible passkey authentication for Astro, SvelteKit, NextJS and other frameworks",
5
5
  "keywords": [
6
6
  "passkey",
@@ -47,16 +47,16 @@
47
47
  "dist"
48
48
  ],
49
49
  "dependencies": {
50
- "@simplewebauthn/browser": "^13.2.2",
51
- "effect": "3.19.19"
50
+ "@simplewebauthn/browser": "^13.3.0",
51
+ "effect": "3.20.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@biomejs/biome": "^2.4.4",
55
- "@effect/language-service": "^0.77.0",
54
+ "@biomejs/biome": "^2.4.8",
55
+ "@effect/language-service": "^0.80.0",
56
56
  "@fetch-mock/vitest": "^0.2.18",
57
- "@typescript/lib-dom": "npm:@types/web@^0.0.339",
57
+ "@typescript/lib-dom": "npm:@types/web@^0.0.344",
58
58
  "globals": "^17.4.0",
59
- "npm-check-updates": "^19.6.3",
59
+ "npm-check-updates": "^19.6.5",
60
60
  "publint": "0.3.18",
61
61
  "rimraf": "^6.1.3",
62
62
  "tsx": "4.21.0",