@passlock/client 0.9.32 → 2.0.0-beta.2
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/README.md +14 -86
- package/README.template.md +16 -88
- package/dist/index.d.ts +4 -206
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -158
- package/dist/index.js.map +1 -1
- package/dist/logger/index.d.ts +24 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +47 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/network.d.ts +39 -0
- package/dist/network.d.ts.map +1 -0
- package/dist/network.js +83 -0
- package/dist/network.js.map +1 -0
- package/dist/passkey/authentication/index.d.ts +21 -0
- package/dist/passkey/authentication/index.d.ts.map +1 -0
- package/dist/passkey/authentication/index.js +22 -0
- package/dist/passkey/authentication/index.js.map +1 -0
- package/dist/passkey/authentication/micro.d.ts +71 -0
- package/dist/passkey/authentication/micro.d.ts.map +1 -0
- package/dist/passkey/authentication/micro.js +107 -0
- package/dist/passkey/authentication/micro.js.map +1 -0
- package/dist/passkey/index.d.ts +7 -0
- package/dist/passkey/index.d.ts.map +1 -0
- package/dist/passkey/index.js +5 -0
- package/dist/passkey/index.js.map +1 -0
- package/dist/passkey/registration/index.d.ts +19 -0
- package/dist/passkey/registration/index.d.ts.map +1 -0
- package/dist/passkey/registration/index.js +20 -0
- package/dist/passkey/registration/index.js.map +1 -0
- package/dist/passkey/registration/micro.d.ts +101 -0
- package/dist/passkey/registration/micro.d.ts.map +1 -0
- package/dist/passkey/registration/micro.js +126 -0
- package/dist/passkey/registration/micro.js.map +1 -0
- package/dist/passkey/shared.d.ts +24 -0
- package/dist/passkey/shared.d.ts.map +1 -0
- package/dist/passkey/shared.js +10 -0
- package/dist/passkey/shared.js.map +1 -0
- package/dist/passkey/support.d.ts +3 -0
- package/dist/passkey/support.d.ts.map +1 -0
- package/dist/passkey/support.js +4 -0
- package/dist/passkey/support.js.map +1 -0
- package/dist/passkey/types.d.ts +26 -0
- package/dist/passkey/types.d.ts.map +1 -0
- package/dist/passkey/types.js +2 -0
- package/dist/passkey/types.js.map +1 -0
- package/dist/promise.d.ts +15 -0
- package/dist/promise.d.ts.map +1 -0
- package/dist/promise.js +46 -0
- package/dist/promise.js.map +1 -0
- package/dist/shared.d.ts +15 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +2 -0
- package/dist/shared.js.map +1 -0
- package/dist/tenancy.d.ts +8 -0
- package/dist/tenancy.d.ts.map +1 -0
- package/dist/tenancy.js +4 -0
- package/dist/tenancy.js.map +1 -0
- package/package.json +52 -58
- package/LICENSE +0 -21
- package/dist/authentication/authenticate.d.ts +0 -23
- package/dist/authentication/authenticate.fixture.d.ts +0 -52
- package/dist/authentication/authenticate.fixture.js +0 -50
- package/dist/authentication/authenticate.fixture.js.map +0 -1
- package/dist/authentication/authenticate.js +0 -72
- package/dist/authentication/authenticate.js.map +0 -1
- package/dist/capabilities/capabilities.d.ts +0 -19
- package/dist/capabilities/capabilities.js +0 -37
- package/dist/capabilities/capabilities.js.map +0 -1
- package/dist/connection/connection.d.ts +0 -15
- package/dist/connection/connection.fixture.d.ts +0 -10
- package/dist/connection/connection.fixture.js +0 -13
- package/dist/connection/connection.fixture.js.map +0 -1
- package/dist/connection/connection.js +0 -23
- package/dist/connection/connection.js.map +0 -1
- package/dist/effect.d.ts +0 -26
- package/dist/effect.js +0 -78
- package/dist/effect.js.map +0 -1
- package/dist/email/email.d.ts +0 -70
- package/dist/email/email.fixture.d.ts +0 -46
- package/dist/email/email.fixture.js +0 -25
- package/dist/email/email.fixture.js.map +0 -1
- package/dist/email/email.js +0 -83
- package/dist/email/email.js.map +0 -1
- package/dist/event/event.d.ts +0 -8
- package/dist/event/event.js +0 -23
- package/dist/event/event.js.map +0 -1
- package/dist/logging/eventLogger.d.ts +0 -17
- package/dist/logging/eventLogger.js +0 -38
- package/dist/logging/eventLogger.js.map +0 -1
- package/dist/registration/register.d.ts +0 -25
- package/dist/registration/register.fixture.d.ts +0 -53
- package/dist/registration/register.fixture.js +0 -66
- package/dist/registration/register.fixture.js.map +0 -1
- package/dist/registration/register.js +0 -77
- package/dist/registration/register.js.map +0 -1
- package/dist/rpc/client.d.ts +0 -30
- package/dist/rpc/client.js +0 -101
- package/dist/rpc/client.js.map +0 -1
- package/dist/rpc/config.d.ts +0 -15
- package/dist/rpc/config.js +0 -6
- package/dist/rpc/config.js.map +0 -1
- package/dist/rpc/connection.d.ts +0 -8
- package/dist/rpc/connection.js +0 -16
- package/dist/rpc/connection.js.map +0 -1
- package/dist/rpc/passkey/authentication.d.ts +0 -8
- package/dist/rpc/passkey/authentication.js +0 -17
- package/dist/rpc/passkey/authentication.js.map +0 -1
- package/dist/rpc/passkey/registration.d.ts +0 -8
- package/dist/rpc/passkey/registration.js +0 -17
- package/dist/rpc/passkey/registration.js.map +0 -1
- package/dist/rpc/social.d.ts +0 -10
- package/dist/rpc/social.js +0 -19
- package/dist/rpc/social.js.map +0 -1
- package/dist/rpc/user.d.ts +0 -8
- package/dist/rpc/user.js +0 -20
- package/dist/rpc/user.js.map +0 -1
- package/dist/social/social.d.ts +0 -23
- package/dist/social/social.fixture.d.ts +0 -46
- package/dist/social/social.fixture.js +0 -31
- package/dist/social/social.fixture.js.map +0 -1
- package/dist/social/social.js +0 -38
- package/dist/social/social.js.map +0 -1
- package/dist/storage/storage.d.ts +0 -56
- package/dist/storage/storage.fixture.d.ts +0 -4
- package/dist/storage/storage.fixture.js +0 -10
- package/dist/storage/storage.fixture.js.map +0 -1
- package/dist/storage/storage.js +0 -111
- package/dist/storage/storage.js.map +0 -1
- package/dist/test/fixtures.d.ts +0 -15
- package/dist/test/fixtures.js +0 -56
- package/dist/test/fixtures.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/user/user.d.ts +0 -25
- package/dist/user/user.fixture.d.ts +0 -12
- package/dist/user/user.fixture.js +0 -20
- package/dist/user/user.fixture.js.map +0 -1
- package/dist/user/user.js +0 -37
- package/dist/user/user.js.map +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -2
- package/dist/version.js.map +0 -1
- package/src/authentication/authenticate.fixture.ts +0 -73
- package/src/authentication/authenticate.test.ts +0 -249
- package/src/authentication/authenticate.ts +0 -143
- package/src/capabilities/capabilities.ts +0 -83
- package/src/connection/connection.fixture.ts +0 -20
- package/src/connection/connection.test.ts +0 -60
- package/src/connection/connection.ts +0 -51
- package/src/effect.ts +0 -280
- package/src/email/email.fixture.ts +0 -44
- package/src/email/email.test.ts +0 -186
- package/src/email/email.ts +0 -148
- package/src/event/event.node.test.ts +0 -21
- package/src/event/event.test.ts +0 -37
- package/src/event/event.ts +0 -25
- package/src/index.ts +0 -407
- package/src/logging/eventLogger.test.ts +0 -104
- package/src/logging/eventLogger.ts +0 -41
- package/src/registration/register.fixture.ts +0 -96
- package/src/registration/register.test.ts +0 -216
- package/src/registration/register.ts +0 -156
- package/src/rpc/client.ts +0 -174
- package/src/rpc/config.ts +0 -18
- package/src/rpc/connection.ts +0 -32
- package/src/rpc/passkey/authentication.ts +0 -52
- package/src/rpc/passkey/registration.ts +0 -52
- package/src/rpc/social.ts +0 -55
- package/src/rpc/user.ts +0 -68
- package/src/social/social.fixture.ts +0 -44
- package/src/social/social.test.ts +0 -179
- package/src/social/social.ts +0 -79
- package/src/storage/storage.fixture.ts +0 -16
- package/src/storage/storage.test.ts +0 -206
- package/src/storage/storage.ts +0 -168
- package/src/test/fixtures.ts +0 -70
- package/src/user/user.fixture.ts +0 -33
- package/src/user/user.test.ts +0 -84
- package/src/user/user.ts +0 -71
- package/src/version.ts +0 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ in README.template.md and outputs to README.md
|
|
|
8
8
|
</a>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
<h1 align="center">
|
|
11
|
+
<h1 align="center">Passkey Authentication for Typescript apps</h1>
|
|
12
12
|
|
|
13
13
|
<div align="center">
|
|
14
14
|
<picture align="center">
|
|
@@ -16,18 +16,17 @@ in README.template.md and outputs to README.md
|
|
|
16
16
|
<img align="center" width=550 height=50 src="https://passlock-assets.b-cdn.net/images/client-repo-banner.svg" />
|
|
17
17
|
</picture>
|
|
18
18
|
<p align="center">
|
|
19
|
-
|
|
20
|
-
Passkeys, Apple login, Google one-tap and more..
|
|
19
|
+
Next generation passkey authentication for Astro, Svelte(kit), Angular and other frameworks.
|
|
21
20
|
<br />
|
|
22
21
|
<a href="https://passlock.dev"><strong>Project website »</strong></a>
|
|
23
22
|
<br />
|
|
24
23
|
<a href="https://github.com/passlock-dev/passlock">GitHub</a>
|
|
25
24
|
·
|
|
26
|
-
<a href="https://
|
|
25
|
+
<a href="https://passlock.dev">Documentation</a>
|
|
27
26
|
·
|
|
28
|
-
<a href="https://
|
|
27
|
+
<a href="https://passlock.dev/getting-started/">Quick start</a>
|
|
29
28
|
·
|
|
30
|
-
<a href="https://
|
|
29
|
+
<a href="https://passlock.dev/#demo">Demo</a>
|
|
31
30
|
</p>
|
|
32
31
|
</div>
|
|
33
32
|
|
|
@@ -35,96 +34,25 @@ in README.template.md and outputs to README.md
|
|
|
35
34
|
|
|
36
35
|
## Features
|
|
37
36
|
|
|
38
|
-
Passkeys and the WebAuthn API are quite complex.
|
|
37
|
+
Passkeys and the WebAuthn API are quite complex. We've tried to simplify things for you, whilst still offering you the power and flexibility of the underlying APIs.
|
|
39
38
|
|
|
40
|
-
1.
|
|
39
|
+
1. **💪 Powerful** - We expose the full WebAuthn/Passkey featureset including user verification, autofil, backup/sync and more
|
|
41
40
|
|
|
42
|
-
2.
|
|
41
|
+
2. ** Biometrics** - Passlock allows you to add biometric authentication to your webapps
|
|
43
42
|
|
|
44
|
-
3.
|
|
43
|
+
3. **👌 Headless components** - Giving you 100% control over the UI
|
|
45
44
|
|
|
46
|
-
4.
|
|
45
|
+
4. **🧰 Framework agnostic** - Passlock works with all major frontend & backend frameworks
|
|
47
46
|
|
|
48
|
-
5.
|
|
47
|
+
5. **👩💻 Dev console** - Something not working? check the unified client/server dev console
|
|
49
48
|
|
|
50
|
-
6. **🖥️
|
|
49
|
+
6. **🖥️ Management console** - Suspend or revoke access for users, passkeys and more..
|
|
51
50
|
|
|
52
|
-
7.
|
|
53
|
-
|
|
54
|
-
## Screenshots
|
|
55
|
-
|
|
56
|
-

|
|
57
|
-
<p align="center">Demo app using this library for passkey and social login</p>
|
|
58
|
-
|
|
59
|
-

|
|
60
|
-
<p align="center">Viewing a user's authentication activity on their profile page</p>
|
|
61
|
-
|
|
62
|
-
## Usage
|
|
63
|
-
|
|
64
|
-
### Register a passkey
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
import { Passlock, PasslockError } from '@passlock/client'
|
|
68
|
-
|
|
69
|
-
// you can find these details in the settings area of your Passlock console
|
|
70
|
-
const tenancyId = '...'
|
|
71
|
-
const clientId = '...'
|
|
72
|
-
|
|
73
|
-
const passlock = new Passlock({ tenancyId, clientId })
|
|
74
|
-
|
|
75
|
-
// to register a new passkey, call registerPasskey(). We're using placeholders for
|
|
76
|
-
// the user data. You should grab this from an HTML form, React store, Redux etc.
|
|
77
|
-
const [email, givenName, familyName] = ["jdoe@gmail.com", "John", "Doe"]
|
|
78
|
-
|
|
79
|
-
// Passlock doesn't throw but instead returns a union: result | error
|
|
80
|
-
const result = await passlock.registerPasskey({ email, givenName, familyName })
|
|
81
|
-
|
|
82
|
-
// ensure we're error free
|
|
83
|
-
if (!PasslockError.isError(result)) {
|
|
84
|
-
// send the token to your backend (json/fetch or hidden form field etc)
|
|
85
|
-
console.log('Token: %s', result.token)
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Authenticate using a passkey
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
import { Passlock, PasslockError } from '@passlock/client'
|
|
93
|
-
|
|
94
|
-
const tenancyId = '...'
|
|
95
|
-
const clientId = '...'
|
|
96
|
-
|
|
97
|
-
const passlock = new Passlock({ tenancyId, clientId })
|
|
98
|
-
const result = await passlock.authenticatePasskey()
|
|
99
|
-
|
|
100
|
-
if (!PasslockError.isError(result)) {
|
|
101
|
-
// send the token to your backend for verification
|
|
102
|
-
console.log('Token: %s', result.token)
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Backend verification
|
|
107
|
-
|
|
108
|
-
Verify the token and obtain the passkey registration or authentication details. You can make a simple GET request to `https://api.v1.passlock.dev/{tenancyId}/token/{token}` or use the [@passlock/node][node] library:
|
|
109
|
-
|
|
110
|
-
```typescript
|
|
111
|
-
import { Passlock } from '@passlock/node'
|
|
112
|
-
|
|
113
|
-
// API Keys can be found in your passlock console
|
|
114
|
-
const passlock = new Passlock({ tenancyId, apiKey })
|
|
115
|
-
|
|
116
|
-
// token comes from your frontend
|
|
117
|
-
const principal = await passlock.fetchPrincipal({ token })
|
|
118
|
-
|
|
119
|
-
// get the user id
|
|
120
|
-
console.log(principal.user.id)
|
|
121
|
-
```
|
|
51
|
+
7. **🕵️♂️ Audit trail** - View a full audit trail for each passkey and user
|
|
122
52
|
|
|
123
53
|
## More information
|
|
124
54
|
|
|
125
|
-
Please see the [tutorial]
|
|
55
|
+
Please see the [tutorial](https://passlock.dev/getting-started/) and [documentation](https://passlock.dev)
|
|
126
56
|
|
|
127
57
|
[contact]: https://passlock.dev/contact
|
|
128
|
-
[tutorial]: https://docs.passlock.dev/docs/tutorial/introduction
|
|
129
|
-
[docs]: https://docs.passlock.dev
|
|
130
58
|
[node]: https://www.npmjs.com/package/@passlock/node
|
package/README.template.md
CHANGED
|
@@ -8,26 +8,25 @@ in README.template.md and outputs to README.md
|
|
|
8
8
|
</a>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
<h1 align="center">
|
|
11
|
+
<h1 align="center">Passkey Authentication for Typescript apps</h1>
|
|
12
12
|
|
|
13
13
|
<div align="center">
|
|
14
14
|
<picture align="center">
|
|
15
|
-
<source srcset="#{
|
|
16
|
-
<img align="center" width=550 height=50 src="#{
|
|
15
|
+
<source srcset="#{ASSETS}#/images/client-repo-banner.dark.svg" media="(prefers-color-scheme: dark)" />
|
|
16
|
+
<img align="center" width=550 height=50 src="#{ASSETS}#/images/client-repo-banner.svg" />
|
|
17
17
|
</picture>
|
|
18
18
|
<p align="center">
|
|
19
|
-
|
|
20
|
-
Passkeys, Apple login, Google one-tap and more..
|
|
19
|
+
Next generation passkey authentication for Astro, Svelte(kit), Angular and other frameworks.
|
|
21
20
|
<br />
|
|
22
21
|
<a href="#{PASSLOCK_SITE}#"><strong>Project website »</strong></a>
|
|
23
22
|
<br />
|
|
24
23
|
<a href="#{GITHUB_REPO}#">GitHub</a>
|
|
25
24
|
·
|
|
26
|
-
<a href="#{PRELINE_DEMO_SITE}#">Demo</a>
|
|
27
|
-
·
|
|
28
25
|
<a href="#{DOCS}#">Documentation</a>
|
|
29
26
|
·
|
|
30
|
-
<a href="#{TUTORIAL}#">
|
|
27
|
+
<a href="#{TUTORIAL}#">Quick start</a>
|
|
28
|
+
·
|
|
29
|
+
<a href="#{DEMO}#">Demo</a>
|
|
31
30
|
</p>
|
|
32
31
|
</div>
|
|
33
32
|
|
|
@@ -35,96 +34,25 @@ in README.template.md and outputs to README.md
|
|
|
35
34
|
|
|
36
35
|
## Features
|
|
37
36
|
|
|
38
|
-
Passkeys and the WebAuthn API are quite complex.
|
|
39
|
-
|
|
40
|
-
1. **🔐 Primary or secondary authentication** - 2FA or a complete replacement for passwords
|
|
41
|
-
|
|
42
|
-
2. **🚀 Social login** - Supporting Apple & Google. GitHub coming soon..
|
|
43
|
-
|
|
44
|
-
3. **☝🏻 Biometrics** - Frictionless facial or fingerprint recognition for your webapps
|
|
45
|
-
|
|
46
|
-
4. **🖥️ Management console** - Suspend users, disable or revoke passkeys and more..
|
|
47
|
-
|
|
48
|
-
5. **🕵️ Audit trail** - View a full audit trail for each user
|
|
49
|
-
|
|
50
|
-
6. **🖥️ Dev console** - Something not working? check the web console for details
|
|
51
|
-
|
|
52
|
-
7. **👌 Headless components** - You have 100% control over the UI
|
|
53
|
-
|
|
54
|
-
## Screenshots
|
|
55
|
-
|
|
56
|
-

|
|
57
|
-
<p align="center">Demo app using this library for passkey and social login</p>
|
|
58
|
-
|
|
59
|
-

|
|
60
|
-
<p align="center">Viewing a user's authentication activity on their profile page</p>
|
|
61
|
-
|
|
62
|
-
## Usage
|
|
63
|
-
|
|
64
|
-
### Register a passkey
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
import { Passlock, PasslockError } from '@passlock/client'
|
|
68
|
-
|
|
69
|
-
// you can find these details in the settings area of your Passlock console
|
|
70
|
-
const tenancyId = '...'
|
|
71
|
-
const clientId = '...'
|
|
72
|
-
|
|
73
|
-
const passlock = new Passlock({ tenancyId, clientId })
|
|
74
|
-
|
|
75
|
-
// to register a new passkey, call registerPasskey(). We're using placeholders for
|
|
76
|
-
// the user data. You should grab this from an HTML form, React store, Redux etc.
|
|
77
|
-
const [email, givenName, familyName] = ["jdoe@gmail.com", "John", "Doe"]
|
|
78
|
-
|
|
79
|
-
// Passlock doesn't throw but instead returns a union: result | error
|
|
80
|
-
const result = await passlock.registerPasskey({ email, givenName, familyName })
|
|
81
|
-
|
|
82
|
-
// ensure we're error free
|
|
83
|
-
if (!PasslockError.isError(result)) {
|
|
84
|
-
// send the token to your backend (json/fetch or hidden form field etc)
|
|
85
|
-
console.log('Token: %s', result.token)
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Authenticate using a passkey
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
import { Passlock, PasslockError } from '@passlock/client'
|
|
93
|
-
|
|
94
|
-
const tenancyId = '...'
|
|
95
|
-
const clientId = '...'
|
|
96
|
-
|
|
97
|
-
const passlock = new Passlock({ tenancyId, clientId })
|
|
98
|
-
const result = await passlock.authenticatePasskey()
|
|
37
|
+
Passkeys and the WebAuthn API are quite complex. We've tried to simplify things for you, whilst still offering you the power and flexibility of the underlying APIs.
|
|
99
38
|
|
|
100
|
-
|
|
101
|
-
// send the token to your backend for verification
|
|
102
|
-
console.log('Token: %s', result.token)
|
|
103
|
-
}
|
|
104
|
-
```
|
|
39
|
+
1. **💪 Powerful** - We expose the full WebAuthn/Passkey featureset including user verification, autofil, backup/sync and more
|
|
105
40
|
|
|
106
|
-
|
|
41
|
+
2. ** Biometrics** - Passlock allows you to add biometric authentication to your webapps
|
|
107
42
|
|
|
108
|
-
|
|
43
|
+
3. **👌 Headless components** - Giving you 100% control over the UI
|
|
109
44
|
|
|
110
|
-
|
|
111
|
-
import { Passlock } from '@passlock/node'
|
|
45
|
+
4. **🧰 Framework agnostic** - Passlock works with all major frontend & backend frameworks
|
|
112
46
|
|
|
113
|
-
|
|
114
|
-
const passlock = new Passlock({ tenancyId, apiKey })
|
|
47
|
+
5. **👩💻 Dev console** - Something not working? check the unified client/server dev console
|
|
115
48
|
|
|
116
|
-
|
|
117
|
-
const principal = await passlock.fetchPrincipal({ token })
|
|
49
|
+
6. **🖥️ Management console** - Suspend or revoke access for users, passkeys and more..
|
|
118
50
|
|
|
119
|
-
|
|
120
|
-
console.log(principal.user.id)
|
|
121
|
-
```
|
|
51
|
+
7. **🕵️♂️ Audit trail** - View a full audit trail for each passkey and user
|
|
122
52
|
|
|
123
53
|
## More information
|
|
124
54
|
|
|
125
|
-
Please see the [tutorial]
|
|
55
|
+
Please see the [tutorial](#{TUTORIAL}#) and [documentation](#{DOCS}#)
|
|
126
56
|
|
|
127
57
|
[contact]: https://passlock.dev/contact
|
|
128
|
-
[tutorial]: https://docs.passlock.dev/docs/tutorial/introduction
|
|
129
|
-
[docs]: https://docs.passlock.dev
|
|
130
58
|
[node]: https://www.npmjs.com/package/@passlock/node
|
package/dist/index.d.ts
CHANGED
|
@@ -1,206 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { VerifyRequest } from './email/email.js';
|
|
6
|
-
import type { Provider } from './social/social.js';
|
|
7
|
-
import { type AuthType, type StoredToken } from './storage/storage.js';
|
|
8
|
-
import type { Email, ResendEmail } from './user/user.js';
|
|
9
|
-
export type Options = {
|
|
10
|
-
signal?: AbortSignal;
|
|
11
|
-
};
|
|
12
|
-
export type { VerifyEmail } from '@passlock/shared/dist/schema/email.js';
|
|
13
|
-
export type { UserVerification } from '@passlock/shared/dist/schema/passkey.js';
|
|
14
|
-
export type { Principal, UserPrincipal } from '@passlock/shared/dist/schema/principal.js';
|
|
15
|
-
export type { VerifyRequest } from './email/email.js';
|
|
16
|
-
export type { AuthType, StoredToken } from './storage/storage.js';
|
|
17
|
-
export type { Email } from './user/user.js';
|
|
18
|
-
export type PasslockProps = {
|
|
19
|
-
tenancyId: string;
|
|
20
|
-
clientId: string;
|
|
21
|
-
endpoint?: string;
|
|
22
|
-
};
|
|
23
|
-
export type RegistrationRequest = {
|
|
24
|
-
email: string;
|
|
25
|
-
givenName?: string;
|
|
26
|
-
familyName?: string;
|
|
27
|
-
userVerification?: UserVerification;
|
|
28
|
-
verifyEmail?: VerifyEmail;
|
|
29
|
-
};
|
|
30
|
-
export type AuthenticationRequest = {
|
|
31
|
-
email?: string;
|
|
32
|
-
userVerification?: UserVerification;
|
|
33
|
-
};
|
|
34
|
-
export type RegisterOidcReq = {
|
|
35
|
-
provider: Provider;
|
|
36
|
-
idToken: string;
|
|
37
|
-
givenName?: string;
|
|
38
|
-
familyName?: string;
|
|
39
|
-
nonce: string;
|
|
40
|
-
};
|
|
41
|
-
export type AuthenticateOidcReq = {
|
|
42
|
-
provider: Provider;
|
|
43
|
-
idToken: string;
|
|
44
|
-
nonce: string;
|
|
45
|
-
};
|
|
46
|
-
export { ErrorCode } from '@passlock/shared/dist/error/error.js';
|
|
47
|
-
export declare class PasslockError extends Error {
|
|
48
|
-
readonly code: ErrorCode;
|
|
49
|
-
readonly detail: string | undefined;
|
|
50
|
-
constructor(message: string, code: ErrorCode, detail?: string);
|
|
51
|
-
static readonly isError: (error: unknown) => error is PasslockError;
|
|
52
|
-
}
|
|
53
|
-
export declare class PasslockUnsafe {
|
|
54
|
-
private readonly runtime;
|
|
55
|
-
constructor(props: PasslockProps);
|
|
56
|
-
static isPrincipal: (value: unknown) => value is Principal;
|
|
57
|
-
static isUserPrincipal: (value: unknown) => value is UserPrincipal;
|
|
58
|
-
private readonly runPromise;
|
|
59
|
-
preConnect: (options?: Options) => Promise<void>;
|
|
60
|
-
isPasskeySupport: () => Promise<boolean>;
|
|
61
|
-
isExistingUser: (email: Email, options?: Options) => Promise<boolean>;
|
|
62
|
-
registerPasskey: (request: RegistrationRequest, options?: Options) => Promise<Principal>;
|
|
63
|
-
authenticatePasskey: (request: AuthenticationRequest, options?: Options) => Promise<Principal>;
|
|
64
|
-
registerOidc: (request: RegisterOidcReq, options?: Options) => Promise<{
|
|
65
|
-
readonly email?: string;
|
|
66
|
-
readonly givenName?: string;
|
|
67
|
-
readonly familyName?: string;
|
|
68
|
-
readonly emailVerified?: boolean;
|
|
69
|
-
readonly user?: {
|
|
70
|
-
readonly email: string;
|
|
71
|
-
readonly id: string;
|
|
72
|
-
readonly givenName: string;
|
|
73
|
-
readonly familyName: string;
|
|
74
|
-
readonly emailVerified: boolean;
|
|
75
|
-
};
|
|
76
|
-
readonly iss: string;
|
|
77
|
-
readonly aud: string;
|
|
78
|
-
readonly sub: string;
|
|
79
|
-
readonly iat: Date;
|
|
80
|
-
readonly nbf: Date;
|
|
81
|
-
readonly exp: Date;
|
|
82
|
-
readonly jti: string;
|
|
83
|
-
readonly token: string;
|
|
84
|
-
readonly userVerified: boolean;
|
|
85
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
86
|
-
readonly authId: string;
|
|
87
|
-
readonly authStatement: {
|
|
88
|
-
readonly userVerified: boolean;
|
|
89
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
90
|
-
readonly authTimestamp: Date;
|
|
91
|
-
};
|
|
92
|
-
readonly expireAt: Date;
|
|
93
|
-
}>;
|
|
94
|
-
authenticateOidc: (request: AuthenticateOidcReq, options?: Options) => Promise<{
|
|
95
|
-
readonly email?: string;
|
|
96
|
-
readonly givenName?: string;
|
|
97
|
-
readonly familyName?: string;
|
|
98
|
-
readonly emailVerified?: boolean;
|
|
99
|
-
readonly user?: {
|
|
100
|
-
readonly email: string;
|
|
101
|
-
readonly id: string;
|
|
102
|
-
readonly givenName: string;
|
|
103
|
-
readonly familyName: string;
|
|
104
|
-
readonly emailVerified: boolean;
|
|
105
|
-
};
|
|
106
|
-
readonly iss: string;
|
|
107
|
-
readonly aud: string;
|
|
108
|
-
readonly sub: string;
|
|
109
|
-
readonly iat: Date;
|
|
110
|
-
readonly nbf: Date;
|
|
111
|
-
readonly exp: Date;
|
|
112
|
-
readonly jti: string;
|
|
113
|
-
readonly token: string;
|
|
114
|
-
readonly userVerified: boolean;
|
|
115
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
116
|
-
readonly authId: string;
|
|
117
|
-
readonly authStatement: {
|
|
118
|
-
readonly userVerified: boolean;
|
|
119
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
120
|
-
readonly authTimestamp: Date;
|
|
121
|
-
};
|
|
122
|
-
readonly expireAt: Date;
|
|
123
|
-
}>;
|
|
124
|
-
verifyEmailCode: (request: VerifyRequest, options?: Options) => Promise<Principal>;
|
|
125
|
-
resendVerificationEmail: (request: ResendEmail, options?: Options) => Promise<void>;
|
|
126
|
-
verifyEmailLink: (options?: Options) => Promise<Principal>;
|
|
127
|
-
getSessionToken: (authType: AuthType) => StoredToken | undefined;
|
|
128
|
-
clearExpiredTokens: () => void;
|
|
129
|
-
}
|
|
130
|
-
export declare class Passlock {
|
|
131
|
-
private readonly runtime;
|
|
132
|
-
constructor(props: PasslockProps);
|
|
133
|
-
static isPrincipal: (value: unknown) => value is Principal;
|
|
134
|
-
static isUserPrincipal: (value: unknown) => value is UserPrincipal;
|
|
135
|
-
private readonly runPromise;
|
|
136
|
-
preConnect: (options?: Options) => Promise<boolean | PasslockError>;
|
|
137
|
-
isPasskeySupport: () => Promise<boolean>;
|
|
138
|
-
isExistingUser: (email: Email, options?: Options) => Promise<boolean | PasslockError>;
|
|
139
|
-
registerPasskey: (request: RegistrationRequest, options?: Options) => Promise<Principal | PasslockError>;
|
|
140
|
-
authenticatePasskey: (request?: AuthenticationRequest, options?: Options) => Promise<Principal | PasslockError>;
|
|
141
|
-
registerOidc: (request: RegisterOidcReq, options?: Options) => Promise<{
|
|
142
|
-
readonly email?: string;
|
|
143
|
-
readonly givenName?: string;
|
|
144
|
-
readonly familyName?: string;
|
|
145
|
-
readonly emailVerified?: boolean;
|
|
146
|
-
readonly user?: {
|
|
147
|
-
readonly email: string;
|
|
148
|
-
readonly id: string;
|
|
149
|
-
readonly givenName: string;
|
|
150
|
-
readonly familyName: string;
|
|
151
|
-
readonly emailVerified: boolean;
|
|
152
|
-
};
|
|
153
|
-
readonly iss: string;
|
|
154
|
-
readonly aud: string;
|
|
155
|
-
readonly sub: string;
|
|
156
|
-
readonly iat: Date;
|
|
157
|
-
readonly nbf: Date;
|
|
158
|
-
readonly exp: Date;
|
|
159
|
-
readonly jti: string;
|
|
160
|
-
readonly token: string;
|
|
161
|
-
readonly userVerified: boolean;
|
|
162
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
163
|
-
readonly authId: string;
|
|
164
|
-
readonly authStatement: {
|
|
165
|
-
readonly userVerified: boolean;
|
|
166
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
167
|
-
readonly authTimestamp: Date;
|
|
168
|
-
};
|
|
169
|
-
readonly expireAt: Date;
|
|
170
|
-
} | PasslockError>;
|
|
171
|
-
authenticateOidc: (request: AuthenticateOidcReq, options?: Options) => Promise<{
|
|
172
|
-
readonly email?: string;
|
|
173
|
-
readonly givenName?: string;
|
|
174
|
-
readonly familyName?: string;
|
|
175
|
-
readonly emailVerified?: boolean;
|
|
176
|
-
readonly user?: {
|
|
177
|
-
readonly email: string;
|
|
178
|
-
readonly id: string;
|
|
179
|
-
readonly givenName: string;
|
|
180
|
-
readonly familyName: string;
|
|
181
|
-
readonly emailVerified: boolean;
|
|
182
|
-
};
|
|
183
|
-
readonly iss: string;
|
|
184
|
-
readonly aud: string;
|
|
185
|
-
readonly sub: string;
|
|
186
|
-
readonly iat: Date;
|
|
187
|
-
readonly nbf: Date;
|
|
188
|
-
readonly exp: Date;
|
|
189
|
-
readonly jti: string;
|
|
190
|
-
readonly token: string;
|
|
191
|
-
readonly userVerified: boolean;
|
|
192
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
193
|
-
readonly authId: string;
|
|
194
|
-
readonly authStatement: {
|
|
195
|
-
readonly userVerified: boolean;
|
|
196
|
-
readonly authType: "email" | "apple" | "google" | "passkey";
|
|
197
|
-
readonly authTimestamp: Date;
|
|
198
|
-
};
|
|
199
|
-
readonly expireAt: Date;
|
|
200
|
-
} | PasslockError>;
|
|
201
|
-
verifyEmailCode: (request: VerifyRequest, options?: Options) => Promise<Principal | PasslockError>;
|
|
202
|
-
verifyEmailLink: (options?: Options) => Promise<Principal | PasslockError>;
|
|
203
|
-
resendVerificationEmail: (request: ResendEmail, options?: Options) => Promise<boolean | PasslockError>;
|
|
204
|
-
getSessionToken: (authType: AuthType) => Promise<StoredToken | undefined>;
|
|
205
|
-
clearExpiredTokens: () => void;
|
|
206
|
-
}
|
|
1
|
+
export * from "./passkey/index";
|
|
2
|
+
export type { PasslockOptions } from "./shared";
|
|
3
|
+
export { UnexpectedError, isUnexpectedError } from "./network";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,159 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ErrorCode } from '@passlock/shared/dist/error/error.js';
|
|
4
|
-
import { isPrincipal, isUserPrincipal, } from '@passlock/shared/dist/schema/principal.js';
|
|
5
|
-
import { allRequirements, authenticateOidc, authenticatePasskey, clearExpiredTokens, getSessionToken, isExistingUser, isPasskeySupport, preConnect, registerOidc, registerPasskey, resendVerificationEmail, verifyEmailCode, verifyEmailLink, } from './effect.js';
|
|
6
|
-
import { RpcConfig } from './rpc/config.js';
|
|
7
|
-
import { BrowserStorage, StorageService, } from './storage/storage.js';
|
|
8
|
-
import { PASSLOCK_CLIENT_VERSION } from './version.js';
|
|
9
|
-
const nonEmpty = (text) => {
|
|
10
|
-
const trimmed = text.trim();
|
|
11
|
-
if (trimmed.length > 0)
|
|
12
|
-
return O.some(trimmed);
|
|
13
|
-
return O.none();
|
|
14
|
-
};
|
|
15
|
-
const toRpcRegistrationRequest = (request) => {
|
|
16
|
-
return {
|
|
17
|
-
email: request.email,
|
|
18
|
-
givenName: pipe(O.fromNullable(request.givenName), O.flatMap(nonEmpty)),
|
|
19
|
-
familyName: pipe(O.fromNullable(request.familyName), O.flatMap(nonEmpty)),
|
|
20
|
-
userVerification: O.fromNullable(request.userVerification),
|
|
21
|
-
verifyEmail: O.fromNullable(request.verifyEmail),
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const toRpcAuthenticationRequest = (request) => {
|
|
25
|
-
return {
|
|
26
|
-
email: O.fromNullable(request.email),
|
|
27
|
-
userVerification: O.fromNullable(request.userVerification),
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
const toRpcRegisterOidcReq = (request) => {
|
|
31
|
-
return {
|
|
32
|
-
provider: request.provider,
|
|
33
|
-
idToken: request.idToken,
|
|
34
|
-
givenName: pipe(O.fromNullable(request.givenName), O.flatMap(nonEmpty)),
|
|
35
|
-
familyName: pipe(O.fromNullable(request.familyName), O.flatMap(nonEmpty)),
|
|
36
|
-
nonce: request.nonce,
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
const toRpcAuthenticateOidcReq = (request) => {
|
|
40
|
-
return {
|
|
41
|
-
provider: request.provider,
|
|
42
|
-
idToken: request.idToken,
|
|
43
|
-
nonce: request.nonce,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export { ErrorCode } from '@passlock/shared/dist/error/error.js';
|
|
47
|
-
export class PasslockError extends Error {
|
|
48
|
-
code;
|
|
49
|
-
detail;
|
|
50
|
-
constructor(message, code, detail) {
|
|
51
|
-
super(message);
|
|
52
|
-
this.code = code;
|
|
53
|
-
this.detail = detail;
|
|
54
|
-
}
|
|
55
|
-
static isError = (error) => {
|
|
56
|
-
return typeof error === 'object' && error !== null && error instanceof PasslockError;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const hasMessage = (defect) => {
|
|
60
|
-
return (typeof defect === 'object' &&
|
|
61
|
-
defect !== null &&
|
|
62
|
-
'message' in defect &&
|
|
63
|
-
typeof defect['message'] === 'string');
|
|
64
|
-
};
|
|
65
|
-
const transformErrors = (effect) => {
|
|
66
|
-
const withErrorHandling = E.catchTags(effect, {
|
|
67
|
-
NotSupported: e => E.succeed(new PasslockError(e.message, ErrorCode.NotSupported)),
|
|
68
|
-
BadRequest: e => E.succeed(new PasslockError(e.message, ErrorCode.BadRequest, e.detail)),
|
|
69
|
-
Duplicate: e => E.succeed(new PasslockError(e.message, ErrorCode.Duplicate, e.detail)),
|
|
70
|
-
Unauthorized: e => E.succeed(new PasslockError(e.message, ErrorCode.Unauthorized, e.detail)),
|
|
71
|
-
Forbidden: e => E.succeed(new PasslockError(e.message, ErrorCode.Forbidden, e.detail)),
|
|
72
|
-
Disabled: e => E.succeed(new PasslockError(e.message, ErrorCode.Disabled, e.detail)),
|
|
73
|
-
NotFound: e => E.succeed(new PasslockError(e.message, ErrorCode.NotFound, e.detail)),
|
|
74
|
-
});
|
|
75
|
-
const sandboxed = E.sandbox(withErrorHandling);
|
|
76
|
-
const withSandboxing = E.catchTags(sandboxed, {
|
|
77
|
-
Die: ({ defect }) => {
|
|
78
|
-
return hasMessage(defect)
|
|
79
|
-
? E.succeed(new PasslockError(defect.message, ErrorCode.InternalServerError))
|
|
80
|
-
: E.succeed(new PasslockError('Sorry, something went wrong', ErrorCode.InternalServerError));
|
|
81
|
-
},
|
|
82
|
-
Interrupt: () => {
|
|
83
|
-
console.error('Interrupt');
|
|
84
|
-
return E.succeed(new PasslockError('Operation aborted', ErrorCode.InternalBrowserError));
|
|
85
|
-
},
|
|
86
|
-
Sequential: errors => {
|
|
87
|
-
console.error(errors);
|
|
88
|
-
return E.succeed(new PasslockError('Sorry, something went wrong', ErrorCode.InternalServerError));
|
|
89
|
-
},
|
|
90
|
-
Parallel: errors => {
|
|
91
|
-
console.error(errors);
|
|
92
|
-
return E.succeed(new PasslockError('Sorry, something went wrong', ErrorCode.InternalServerError));
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
return E.unsandbox(withSandboxing);
|
|
96
|
-
};
|
|
97
|
-
export class PasslockUnsafe {
|
|
98
|
-
runtime;
|
|
99
|
-
constructor(props) {
|
|
100
|
-
const config = Layer.succeed(RpcConfig, RpcConfig.of(props));
|
|
101
|
-
const storage = Layer.succeed(BrowserStorage, BrowserStorage.of(globalThis.localStorage));
|
|
102
|
-
const allLayers = pipe(allRequirements, L.provide(config), L.provide(storage), L.merge(config));
|
|
103
|
-
const scope = E.runSync(Scope.make());
|
|
104
|
-
this.runtime = E.runSync(Layer.toRuntime(allLayers).pipe(Scope.extend(scope)));
|
|
105
|
-
E.runSync(E.logDebug(`Passlock version: ${PASSLOCK_CLIENT_VERSION}`));
|
|
106
|
-
}
|
|
107
|
-
static isPrincipal = (value) => isPrincipal(value);
|
|
108
|
-
static isUserPrincipal = (value) => isUserPrincipal(value);
|
|
109
|
-
runPromise = dual(2, (effect, options) => pipe(transformErrors(effect), E.flatMap(result => (PasslockError.isError(result) ? E.fail(result) : E.succeed(result))), effect => Runtime.runPromise(this.runtime)(effect, options)));
|
|
110
|
-
preConnect = (options) => pipe(preConnect(), this.runPromise(options));
|
|
111
|
-
isPasskeySupport = () => pipe(isPasskeySupport, effect => Runtime.runPromise(this.runtime)(effect));
|
|
112
|
-
isExistingUser = (email, options) => pipe(isExistingUser(email), this.runPromise(options));
|
|
113
|
-
registerPasskey = (request, options) => pipe(registerPasskey(toRpcRegistrationRequest(request)), this.runPromise(options));
|
|
114
|
-
authenticatePasskey = (request, options) => pipe(authenticatePasskey(toRpcAuthenticationRequest(request)), this.runPromise(options));
|
|
115
|
-
registerOidc = (request, options) => pipe(registerOidc(toRpcRegisterOidcReq(request)), this.runPromise(options));
|
|
116
|
-
authenticateOidc = (request, options) => pipe(authenticateOidc(toRpcAuthenticateOidcReq(request)), this.runPromise(options));
|
|
117
|
-
verifyEmailCode = (request, options) => pipe(verifyEmailCode(request), this.runPromise(options));
|
|
118
|
-
resendVerificationEmail = (request, options) => pipe(resendVerificationEmail(request), this.runPromise(options));
|
|
119
|
-
verifyEmailLink = (options) => pipe(verifyEmailLink, this.runPromise(options));
|
|
120
|
-
getSessionToken = (authType) => pipe(getSessionToken(authType), E.orElseSucceed(() => undefined), effect => Runtime.runSync(this.runtime)(effect));
|
|
121
|
-
clearExpiredTokens = () => {
|
|
122
|
-
pipe(clearExpiredTokens, effect => {
|
|
123
|
-
Runtime.runSync(this.runtime)(effect);
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
export class Passlock {
|
|
128
|
-
runtime;
|
|
129
|
-
constructor(props) {
|
|
130
|
-
const config = Layer.succeed(RpcConfig, RpcConfig.of(props));
|
|
131
|
-
const storage = Layer.succeed(BrowserStorage, BrowserStorage.of(globalThis.localStorage));
|
|
132
|
-
const allLayers = pipe(allRequirements, L.provide(config), L.provide(storage), L.merge(config));
|
|
133
|
-
const scope = E.runSync(Scope.make());
|
|
134
|
-
this.runtime = E.runSync(Layer.toRuntime(allLayers).pipe(Scope.extend(scope)));
|
|
135
|
-
E.runSync(E.logDebug(`Passlock version: ${PASSLOCK_CLIENT_VERSION}`));
|
|
136
|
-
}
|
|
137
|
-
static isPrincipal = (value) => isPrincipal(value);
|
|
138
|
-
static isUserPrincipal = (value) => isUserPrincipal(value);
|
|
139
|
-
runPromise = dual(2, (effect, options) => pipe(transformErrors(effect), effect => Runtime.runPromise(this.runtime)(effect, options)));
|
|
140
|
-
preConnect = async (options) => {
|
|
141
|
-
return pipe(preConnect(), E.as(true), this.runPromise(options));
|
|
142
|
-
};
|
|
143
|
-
isPasskeySupport = () => pipe(isPasskeySupport, effect => Runtime.runPromise(this.runtime)(effect));
|
|
144
|
-
isExistingUser = (email, options) => pipe(isExistingUser(email), this.runPromise(options));
|
|
145
|
-
registerPasskey = (request, options) => pipe(registerPasskey(toRpcRegistrationRequest(request)), this.runPromise(options));
|
|
146
|
-
authenticatePasskey = (request = {}, options) => pipe(toRpcAuthenticationRequest(request), authenticatePasskey, this.runPromise(options));
|
|
147
|
-
registerOidc = (request, options) => pipe(registerOidc(toRpcRegisterOidcReq(request)), this.runPromise(options));
|
|
148
|
-
authenticateOidc = (request, options) => pipe(authenticateOidc(request), this.runPromise(options));
|
|
149
|
-
verifyEmailCode = (request, options) => pipe(verifyEmailCode(request), this.runPromise(options));
|
|
150
|
-
verifyEmailLink = (options) => pipe(verifyEmailLink, this.runPromise(options));
|
|
151
|
-
resendVerificationEmail = (request, options) => pipe(resendVerificationEmail(request), E.as(true), this.runPromise(options));
|
|
152
|
-
getSessionToken = (authType) => pipe(getSessionToken(authType), E.orElseSucceed(() => undefined), effect => E.runPromise(effect));
|
|
153
|
-
clearExpiredTokens = () => {
|
|
154
|
-
pipe(StorageService, E.flatMap(service => service.clearExpiredTokens), effect => {
|
|
155
|
-
Runtime.runSync(this.runtime)(effect);
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
}
|
|
1
|
+
export * from "./passkey/index";
|
|
2
|
+
export { UnexpectedError, isUnexpectedError } from "./network";
|
|
159
3
|
//# sourceMappingURL=index.js.map
|