@supatype/react-native 0.1.6
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/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-test.log +14 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/README.md +52 -0
- package/dist/createNativeClient.d.ts +31 -0
- package/dist/createNativeClient.d.ts.map +1 -0
- package/dist/createNativeClient.js +55 -0
- package/dist/createNativeClient.js.map +1 -0
- package/dist/deepLink.d.ts +27 -0
- package/dist/deepLink.d.ts.map +1 -0
- package/dist/deepLink.js +46 -0
- package/dist/deepLink.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/openOAuth.d.ts +51 -0
- package/dist/openOAuth.d.ts.map +1 -0
- package/dist/openOAuth.js +38 -0
- package/dist/openOAuth.js.map +1 -0
- package/dist/storage.d.ts +18 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +17 -0
- package/dist/storage.js.map +1 -0
- package/package.json +51 -0
- package/src/createNativeClient.ts +96 -0
- package/src/deepLink.ts +83 -0
- package/src/index.ts +26 -0
- package/src/openOAuth.ts +83 -0
- package/src/storage.ts +33 -0
- package/tests/react-native.test.ts +235 -0
- package/tsconfig.json +14 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
> @supatype/react-native@0.1.6 test /home/runner/work/supatype/supatype/packages/react-native
|
|
3
|
+
> vitest run
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/home/runner/work/supatype/supatype/packages/react-native[39m
|
|
7
|
+
|
|
8
|
+
[32m✓[39m tests/react-native.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 107[2mms[22m[39m
|
|
9
|
+
|
|
10
|
+
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
11
|
+
[2m Tests [22m [1m[32m7 passed[39m[22m[90m (7)[39m
|
|
12
|
+
[2m Start at [22m 19:08:23
|
|
13
|
+
[2m Duration [22m 1.64s[2m (transform 841ms, setup 0ms, import 1.01s, tests 107ms, environment 0ms)[22m
|
|
14
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `@supatype/react-native`
|
|
2
|
+
|
|
3
|
+
React Native / Expo helpers for Supatype: secure session persistence, PKCE OAuth, and deep-link auth completion.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx expo install @supatype/client @supatype/react @supatype/react-native \
|
|
9
|
+
expo-secure-store expo-web-browser expo-linking
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Quick start
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import * as SecureStore from "expo-secure-store"
|
|
16
|
+
import * as WebBrowser from "expo-web-browser"
|
|
17
|
+
import * as Linking from "expo-linking"
|
|
18
|
+
import { SupatypeProvider } from "@supatype/react"
|
|
19
|
+
import {
|
|
20
|
+
createNativeClient,
|
|
21
|
+
openOAuth,
|
|
22
|
+
createAuthUrlListener,
|
|
23
|
+
} from "@supatype/react-native"
|
|
24
|
+
|
|
25
|
+
const client = createNativeClient({
|
|
26
|
+
url: process.env.EXPO_PUBLIC_SUPATYPE_URL!,
|
|
27
|
+
anonKey: process.env.EXPO_PUBLIC_SUPATYPE_ANON_KEY!,
|
|
28
|
+
secureStore: SecureStore, // PKCE verifier + session JWT in Secure Store
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
// OAuth (PKCE by default)
|
|
32
|
+
const redirectTo = Linking.createURL("auth/callback")
|
|
33
|
+
await openOAuth(client, {
|
|
34
|
+
provider: "google",
|
|
35
|
+
redirectTo,
|
|
36
|
+
webBrowser: WebBrowser,
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// Cold-start / background deep links
|
|
40
|
+
const unsubscribe = createAuthUrlListener(client, {
|
|
41
|
+
linking: Linking,
|
|
42
|
+
pathIncludes: "auth/callback",
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Register `redirectTo` in your auth server URI allowlist and set the Expo `scheme` in `app.json`.
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
|
|
50
|
+
- `createNativeClient` injects `auth.storage` so sessions survive app restarts (no `localStorage`).
|
|
51
|
+
- `openOAuth` defaults to `flowType: "pkce"`. Pass `flowType: "implicit"` only if you need hash-token redirects.
|
|
52
|
+
- Pass `asyncStorage` instead of `secureStore` if you are not using Expo Secure Store.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type AnyDatabase, type AugmentedDatabase, type SupatypeClient, type SupatypeClientConfig } from "@supatype/client";
|
|
2
|
+
import { type AsyncStorageLike, type SecureStoreLike } from "./storage.js";
|
|
3
|
+
export type NativeStorageBackend = "secure-store" | "async-storage";
|
|
4
|
+
export interface CreateNativeClientConfig extends SupatypeClientConfig {
|
|
5
|
+
/**
|
|
6
|
+
* Preferred persistence backend when `auth.storage` is not set.
|
|
7
|
+
* Default: `"secure-store"` when `secureStore` is provided, else `"async-storage"`.
|
|
8
|
+
*/
|
|
9
|
+
storageBackend?: NativeStorageBackend | undefined;
|
|
10
|
+
/** Pass `import * as SecureStore from "expo-secure-store"`. Preferred for mobile. */
|
|
11
|
+
secureStore?: SecureStoreLike | undefined;
|
|
12
|
+
/** Pass `AsyncStorage` from `@react-native-async-storage/async-storage`. */
|
|
13
|
+
asyncStorage?: AsyncStorageLike | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create a Supatype client wired for React Native session persistence.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import * as SecureStore from "expo-secure-store"
|
|
21
|
+
* import { createNativeClient } from "@supatype/react-native"
|
|
22
|
+
*
|
|
23
|
+
* const client = createNativeClient({
|
|
24
|
+
* url: process.env.EXPO_PUBLIC_SUPATYPE_URL!,
|
|
25
|
+
* anonKey: process.env.EXPO_PUBLIC_SUPATYPE_ANON_KEY!,
|
|
26
|
+
* secureStore: SecureStore,
|
|
27
|
+
* })
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function createNativeClient<TDatabase extends AnyDatabase = AugmentedDatabase>(config: CreateNativeClientConfig): SupatypeClient<TDatabase>;
|
|
31
|
+
//# sourceMappingURL=createNativeClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createNativeClient.d.ts","sourceRoot":"","sources":["../src/createNativeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,eAAe,CAAA;AAEnE,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE;;;OAGG;IACH,cAAc,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAA;IACjD,qFAAqF;IACrF,WAAW,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACzC,4EAA4E;IAC5E,YAAY,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;CAC5C;AAsCD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,WAAW,GAAG,iBAAiB,EAClF,MAAM,EAAE,wBAAwB,GAC/B,cAAc,CAAC,SAAS,CAAC,CAa3B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createClient, } from "@supatype/client";
|
|
2
|
+
import { asyncStorageAdapter, secureStoreAdapter, } from "./storage.js";
|
|
3
|
+
function resolveNativeStorage(config) {
|
|
4
|
+
if (config.auth?.storage !== undefined) {
|
|
5
|
+
return config.auth.storage;
|
|
6
|
+
}
|
|
7
|
+
const backend = config.storageBackend ??
|
|
8
|
+
(config.secureStore !== undefined
|
|
9
|
+
? "secure-store"
|
|
10
|
+
: config.asyncStorage !== undefined
|
|
11
|
+
? "async-storage"
|
|
12
|
+
: null);
|
|
13
|
+
if (backend === "secure-store") {
|
|
14
|
+
if (config.secureStore === undefined) {
|
|
15
|
+
throw new Error('@supatype/react-native: storageBackend "secure-store" requires the `secureStore` option (import * as SecureStore from "expo-secure-store").');
|
|
16
|
+
}
|
|
17
|
+
return secureStoreAdapter(config.secureStore);
|
|
18
|
+
}
|
|
19
|
+
if (backend === "async-storage") {
|
|
20
|
+
if (config.asyncStorage === undefined) {
|
|
21
|
+
throw new Error('@supatype/react-native: storageBackend "async-storage" requires the `asyncStorage` option.');
|
|
22
|
+
}
|
|
23
|
+
return asyncStorageAdapter(config.asyncStorage);
|
|
24
|
+
}
|
|
25
|
+
throw new Error("@supatype/react-native: pass `secureStore` (recommended), `asyncStorage`, or `auth.storage` so sessions persist across app restarts.");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create a Supatype client wired for React Native session persistence.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import * as SecureStore from "expo-secure-store"
|
|
33
|
+
* import { createNativeClient } from "@supatype/react-native"
|
|
34
|
+
*
|
|
35
|
+
* const client = createNativeClient({
|
|
36
|
+
* url: process.env.EXPO_PUBLIC_SUPATYPE_URL!,
|
|
37
|
+
* anonKey: process.env.EXPO_PUBLIC_SUPATYPE_ANON_KEY!,
|
|
38
|
+
* secureStore: SecureStore,
|
|
39
|
+
* })
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export function createNativeClient(config) {
|
|
43
|
+
const storage = resolveNativeStorage(config);
|
|
44
|
+
const { secureStore: _s, asyncStorage: _a, storageBackend: _b, auth, ...rest } = config;
|
|
45
|
+
return createClient({
|
|
46
|
+
...rest,
|
|
47
|
+
auth: {
|
|
48
|
+
persistSession: auth?.persistSession ?? true,
|
|
49
|
+
...(auth?.storageKey !== undefined && { storageKey: auth.storageKey }),
|
|
50
|
+
...(auth?.cookiePrefix !== undefined && { cookiePrefix: auth.cookiePrefix }),
|
|
51
|
+
storage,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=createNativeClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createNativeClient.js","sourceRoot":"","sources":["../src/createNativeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,GAMb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,mBAAmB,EAEnB,kBAAkB,GAEnB,MAAM,cAAc,CAAA;AAgBrB,SAAS,oBAAoB,CAAC,MAAgC;IAC5D,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAA;IAC5B,CAAC;IAED,MAAM,OAAO,GACX,MAAM,CAAC,cAAc;QACrB,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS;YAC/B,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,MAAM,CAAC,YAAY,KAAK,SAAS;gBACjC,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,IAAI,CAAC,CAAA;IAEb,IAAI,OAAO,KAAK,cAAc,EAAE,CAAC;QAC/B,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CACb,6IAA6I,CAC9I,CAAA;QACH,CAAC;QACD,OAAO,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;IAC/C,CAAC;IAED,IAAI,OAAO,KAAK,eAAe,EAAE,CAAC;QAChC,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAA;QACH,CAAC;QACD,OAAO,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;IACjD,CAAC;IAED,MAAM,IAAI,KAAK,CACb,sIAAsI,CACvI,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAgC;IAEhC,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;IAC5C,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;IAEvF,OAAO,YAAY,CAAY;QAC7B,GAAG,IAAI;QACP,IAAI,EAAE;YACJ,cAAc,EAAE,IAAI,EAAE,cAAc,IAAI,IAAI;YAC5C,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;YACtE,GAAG,CAAC,IAAI,EAAE,YAAY,KAAK,SAAS,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;YAC5E,OAAO;SACR;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Session, SupatypeClient, SupatypeError } from "@supatype/client";
|
|
2
|
+
export interface LinkingSubscription {
|
|
3
|
+
remove(): void;
|
|
4
|
+
}
|
|
5
|
+
/** Minimal React Native / Expo Linking surface. */
|
|
6
|
+
export interface LinkingLike {
|
|
7
|
+
addEventListener(type: "url", handler: (event: {
|
|
8
|
+
url: string;
|
|
9
|
+
}) => void): LinkingSubscription;
|
|
10
|
+
getInitialURL(): Promise<string | null>;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateAuthUrlListenerOptions {
|
|
13
|
+
linking: LinkingLike;
|
|
14
|
+
/** Only process URLs that include this substring (e.g. `"auth/callback"`). */
|
|
15
|
+
pathIncludes?: string | undefined;
|
|
16
|
+
onSession?: ((session: Session) => void) | undefined;
|
|
17
|
+
onError?: ((error: SupatypeError) => void) | undefined;
|
|
18
|
+
}
|
|
19
|
+
type AuthCapable = Pick<SupatypeClient, "auth">;
|
|
20
|
+
/**
|
|
21
|
+
* Listen for auth deep links (cold start + warm) and complete PKCE / implicit / error redirects.
|
|
22
|
+
*
|
|
23
|
+
* @returns Unsubscribe function.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createAuthUrlListener(client: AuthCapable, opts: CreateAuthUrlListenerOptions): () => void;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=deepLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepLink.d.ts","sourceRoot":"","sources":["../src/deepLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAE9E,MAAM,WAAW,mBAAmB;IAClC,MAAM,IAAI,IAAI,CAAA;CACf;AAED,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CACd,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,GACxC,mBAAmB,CAAA;IACtB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CACxC;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,WAAW,CAAA;IACpB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;IACpD,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;CACvD;AAED,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AAiC/C;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,4BAA4B,GACjC,MAAM,IAAI,CAkBZ"}
|
package/dist/deepLink.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
function urlMatches(url, pathIncludes) {
|
|
2
|
+
if (pathIncludes === undefined || pathIncludes === "")
|
|
3
|
+
return true;
|
|
4
|
+
return url.includes(pathIncludes);
|
|
5
|
+
}
|
|
6
|
+
async function handleUrl(client, url, opts) {
|
|
7
|
+
if (!urlMatches(url, opts.pathIncludes))
|
|
8
|
+
return;
|
|
9
|
+
// Skip URLs that clearly aren't auth redirects.
|
|
10
|
+
if (!url.includes("code=") &&
|
|
11
|
+
!url.includes("access_token=") &&
|
|
12
|
+
!url.includes("error=") &&
|
|
13
|
+
!url.includes("error_description=")) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const { data, error } = await client.auth.getSessionFromUrl(url);
|
|
17
|
+
if (error !== null) {
|
|
18
|
+
opts.onError?.(error);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (data.session !== null) {
|
|
22
|
+
opts.onSession?.(data.session);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Listen for auth deep links (cold start + warm) and complete PKCE / implicit / error redirects.
|
|
27
|
+
*
|
|
28
|
+
* @returns Unsubscribe function.
|
|
29
|
+
*/
|
|
30
|
+
export function createAuthUrlListener(client, opts) {
|
|
31
|
+
let active = true;
|
|
32
|
+
const onUrl = (event) => {
|
|
33
|
+
void handleUrl(client, event.url, opts);
|
|
34
|
+
};
|
|
35
|
+
const subscription = opts.linking.addEventListener("url", onUrl);
|
|
36
|
+
void opts.linking.getInitialURL().then((url) => {
|
|
37
|
+
if (!active || url === null)
|
|
38
|
+
return;
|
|
39
|
+
void handleUrl(client, url, opts);
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
active = false;
|
|
43
|
+
subscription.remove();
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=deepLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepLink.js","sourceRoot":"","sources":["../src/deepLink.ts"],"names":[],"mappings":"AAyBA,SAAS,UAAU,CAAC,GAAW,EAAE,YAAgC;IAC/D,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,EAAE;QAAE,OAAO,IAAI,CAAA;IAClE,OAAO,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AACnC,CAAC;AAED,KAAK,UAAU,SAAS,CACtB,MAAmB,EACnB,GAAW,EACX,IAAkC;IAElC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC;QAAE,OAAM;IAC/C,gDAAgD;IAChD,IACE,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC;QACtB,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC9B,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACvB,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EACnC,CAAC;QACD,OAAM;IACR,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA;IAChE,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAA;QACrB,OAAM;IACR,CAAC;IACD,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChC,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAmB,EACnB,IAAkC;IAElC,IAAI,MAAM,GAAG,IAAI,CAAA;IAEjB,MAAM,KAAK,GAAG,CAAC,KAAsB,EAAQ,EAAE;QAC7C,KAAK,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC,CAAA;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAEhE,KAAK,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QAC7C,IAAI,CAAC,MAAM,IAAI,GAAG,KAAK,IAAI;YAAE,OAAM;QACnC,KAAK,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,KAAK,CAAA;QACd,YAAY,CAAC,MAAM,EAAE,CAAA;IACvB,CAAC,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createNativeClient, type CreateNativeClientConfig, type NativeStorageBackend, } from "./createNativeClient.js";
|
|
2
|
+
export { secureStoreAdapter, asyncStorageAdapter, type SecureStoreLike, type AsyncStorageLike, } from "./storage.js";
|
|
3
|
+
export { openOAuth, type OpenOAuthOptions, type OpenOAuthResult, type WebBrowserLike, } from "./openOAuth.js";
|
|
4
|
+
export { createAuthUrlListener, type CreateAuthUrlListenerOptions, type LinkingLike, type LinkingSubscription, } from "./deepLink.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,EACjC,KAAK,WAAW,EAChB,KAAK,mBAAmB,GACzB,MAAM,eAAe,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createNativeClient, } from "./createNativeClient.js";
|
|
2
|
+
export { secureStoreAdapter, asyncStorageAdapter, } from "./storage.js";
|
|
3
|
+
export { openOAuth, } from "./openOAuth.js";
|
|
4
|
+
export { createAuthUrlListener, } from "./deepLink.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAGnB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAGpB,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,SAAS,GAIV,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,qBAAqB,GAItB,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { AuthFlowType, Session, SupatypeClient, SupatypeError, User } from "@supatype/client";
|
|
2
|
+
/** Minimal expo-web-browser surface used by openOAuth. */
|
|
3
|
+
export interface WebBrowserLike {
|
|
4
|
+
openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{
|
|
5
|
+
type: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export interface OpenOAuthOptions {
|
|
10
|
+
provider: string;
|
|
11
|
+
/** Deep-link URI registered with the auth server allowlist (e.g. `myapp://auth/callback`). */
|
|
12
|
+
redirectTo: string;
|
|
13
|
+
scopes?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* OAuth redirect flow. Default: `"pkce"` (recommended for mobile).
|
|
16
|
+
* Pass `"implicit"` only if you need hash-token redirects.
|
|
17
|
+
*/
|
|
18
|
+
flowType?: AuthFlowType | undefined;
|
|
19
|
+
/** Inject `expo-web-browser` (required unless provided via dependency injection in tests). */
|
|
20
|
+
webBrowser: WebBrowserLike;
|
|
21
|
+
}
|
|
22
|
+
export interface OpenOAuthResult {
|
|
23
|
+
data: {
|
|
24
|
+
session: Session | null;
|
|
25
|
+
user: User | null;
|
|
26
|
+
};
|
|
27
|
+
error: SupatypeError | null;
|
|
28
|
+
/** True when the user dismissed / cancelled the browser session. */
|
|
29
|
+
cancelled: boolean;
|
|
30
|
+
}
|
|
31
|
+
type AuthCapable = Pick<SupatypeClient, "auth">;
|
|
32
|
+
/**
|
|
33
|
+
* Start an in-app OAuth session (PKCE by default) and exchange the redirect for a session.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import * as WebBrowser from "expo-web-browser"
|
|
38
|
+
* import * as Linking from "expo-linking"
|
|
39
|
+
* import { openOAuth } from "@supatype/react-native"
|
|
40
|
+
*
|
|
41
|
+
* const redirectTo = Linking.createURL("auth/callback")
|
|
42
|
+
* const { data, error, cancelled } = await openOAuth(client, {
|
|
43
|
+
* provider: "google",
|
|
44
|
+
* redirectTo,
|
|
45
|
+
* webBrowser: WebBrowser,
|
|
46
|
+
* })
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function openOAuth(client: AuthCapable, opts: OpenOAuthOptions): Promise<OpenOAuthResult>;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=openOAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openOAuth.d.ts","sourceRoot":"","sources":["../src/openOAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,EACb,IAAI,EACL,MAAM,kBAAkB,CAAA;AAEzB,0DAA0D;AAC1D,MAAM,WAAW,cAAc;IAC7B,oBAAoB,CAClB,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC3C;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,8FAA8F;IAC9F,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACnC,8FAA8F;IAC9F,UAAU,EAAE,cAAc,CAAA;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAA;IACpD,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;IAC3B,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AAE/C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,eAAe,CAAC,CAuB1B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Start an in-app OAuth session (PKCE by default) and exchange the redirect for a session.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import * as WebBrowser from "expo-web-browser"
|
|
7
|
+
* import * as Linking from "expo-linking"
|
|
8
|
+
* import { openOAuth } from "@supatype/react-native"
|
|
9
|
+
*
|
|
10
|
+
* const redirectTo = Linking.createURL("auth/callback")
|
|
11
|
+
* const { data, error, cancelled } = await openOAuth(client, {
|
|
12
|
+
* provider: "google",
|
|
13
|
+
* redirectTo,
|
|
14
|
+
* webBrowser: WebBrowser,
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export async function openOAuth(client, opts) {
|
|
19
|
+
const flowType = opts.flowType ?? "pkce";
|
|
20
|
+
const { data: oauth, error: oauthError } = await client.auth.signInWithOAuth({
|
|
21
|
+
provider: opts.provider,
|
|
22
|
+
options: {
|
|
23
|
+
redirectTo: opts.redirectTo,
|
|
24
|
+
flowType,
|
|
25
|
+
...(opts.scopes !== undefined && { scopes: opts.scopes }),
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
if (oauthError !== null) {
|
|
29
|
+
return { data: { session: null, user: null }, error: oauthError, cancelled: false };
|
|
30
|
+
}
|
|
31
|
+
const result = await opts.webBrowser.openAuthSessionAsync(oauth.url, opts.redirectTo);
|
|
32
|
+
if (result.type !== "success" || result.url === undefined || result.url === "") {
|
|
33
|
+
return { data: { session: null, user: null }, error: null, cancelled: true };
|
|
34
|
+
}
|
|
35
|
+
const { data, error } = await client.auth.getSessionFromUrl(result.url);
|
|
36
|
+
return { data, error, cancelled: false };
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=openOAuth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openOAuth.js","sourceRoot":"","sources":["../src/openOAuth.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAmB,EACnB,IAAsB;IAEtB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAA;IACxC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;QAC3E,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO,EAAE;YACP,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ;YACR,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;SAC1D;KACF,CAAC,CAAA;IAEF,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;IACrF,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;IAErF,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,IAAI,MAAM,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC;QAC/E,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;IAC9E,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACvE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;AAC1C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AuthStorage } from "@supatype/client";
|
|
2
|
+
/** Minimal SecureStore surface (expo-secure-store). */
|
|
3
|
+
export interface SecureStoreLike {
|
|
4
|
+
getItemAsync(key: string): Promise<string | null>;
|
|
5
|
+
setItemAsync(key: string, value: string): Promise<void>;
|
|
6
|
+
deleteItemAsync(key: string): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/** Minimal AsyncStorage surface. */
|
|
9
|
+
export interface AsyncStorageLike {
|
|
10
|
+
getItem(key: string): Promise<string | null>;
|
|
11
|
+
setItem(key: string, value: string): Promise<void>;
|
|
12
|
+
removeItem(key: string): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/** Wrap expo-secure-store as an AuthStorage adapter. */
|
|
15
|
+
export declare function secureStoreAdapter(secureStore: SecureStoreLike): AuthStorage;
|
|
16
|
+
/** Wrap @react-native-async-storage/async-storage as an AuthStorage adapter. */
|
|
17
|
+
export declare function asyncStorageAdapter(asyncStorage: AsyncStorageLike): AuthStorage;
|
|
18
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACjD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5C;AAED,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC5C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED,wDAAwD;AACxD,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,eAAe,GAAG,WAAW,CAM5E;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,GAAG,WAAW,CAM/E"}
|
package/dist/storage.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Wrap expo-secure-store as an AuthStorage adapter. */
|
|
2
|
+
export function secureStoreAdapter(secureStore) {
|
|
3
|
+
return {
|
|
4
|
+
getItem: (key) => secureStore.getItemAsync(key),
|
|
5
|
+
setItem: (key, value) => secureStore.setItemAsync(key, value),
|
|
6
|
+
removeItem: (key) => secureStore.deleteItemAsync(key),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
/** Wrap @react-native-async-storage/async-storage as an AuthStorage adapter. */
|
|
10
|
+
export function asyncStorageAdapter(asyncStorage) {
|
|
11
|
+
return {
|
|
12
|
+
getItem: (key) => asyncStorage.getItem(key),
|
|
13
|
+
setItem: (key, value) => asyncStorage.setItem(key, value),
|
|
14
|
+
removeItem: (key) => asyncStorage.removeItem(key),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAgBA,wDAAwD;AACxD,MAAM,UAAU,kBAAkB,CAAC,WAA4B;IAC7D,OAAO;QACL,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QAC/C,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC;QAC7D,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC;KACtD,CAAA;AACH,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,mBAAmB,CAAC,YAA8B;IAChE,OAAO;QACL,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC;QAC3C,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;QACzD,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC;KAClD,CAAA;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@supatype/react-native",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "Supatype React Native helpers — secure auth storage, createNativeClient, PKCE OAuth deep links",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@supatype/client": "0.1.6"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"expo-secure-store": ">=13",
|
|
19
|
+
"expo-web-browser": ">=13",
|
|
20
|
+
"@react-native-async-storage/async-storage": ">=1.23"
|
|
21
|
+
},
|
|
22
|
+
"peerDependenciesMeta": {
|
|
23
|
+
"expo-secure-store": {
|
|
24
|
+
"optional": true
|
|
25
|
+
},
|
|
26
|
+
"expo-web-browser": {
|
|
27
|
+
"optional": true
|
|
28
|
+
},
|
|
29
|
+
"@react-native-async-storage/async-storage": {
|
|
30
|
+
"optional": true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^22",
|
|
35
|
+
"typescript": "^5",
|
|
36
|
+
"vitest": "^4.0.18"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"supatype",
|
|
40
|
+
"react-native",
|
|
41
|
+
"expo",
|
|
42
|
+
"auth"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc --project tsconfig.json",
|
|
46
|
+
"dev": "tsc --project tsconfig.json --watch",
|
|
47
|
+
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"clean": "rm -rf dist *.tsbuildinfo"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createClient,
|
|
3
|
+
type AnyDatabase,
|
|
4
|
+
type AugmentedDatabase,
|
|
5
|
+
type AuthStorage,
|
|
6
|
+
type SupatypeClient,
|
|
7
|
+
type SupatypeClientConfig,
|
|
8
|
+
} from "@supatype/client"
|
|
9
|
+
import {
|
|
10
|
+
asyncStorageAdapter,
|
|
11
|
+
type AsyncStorageLike,
|
|
12
|
+
secureStoreAdapter,
|
|
13
|
+
type SecureStoreLike,
|
|
14
|
+
} from "./storage.js"
|
|
15
|
+
|
|
16
|
+
export type NativeStorageBackend = "secure-store" | "async-storage"
|
|
17
|
+
|
|
18
|
+
export interface CreateNativeClientConfig extends SupatypeClientConfig {
|
|
19
|
+
/**
|
|
20
|
+
* Preferred persistence backend when `auth.storage` is not set.
|
|
21
|
+
* Default: `"secure-store"` when `secureStore` is provided, else `"async-storage"`.
|
|
22
|
+
*/
|
|
23
|
+
storageBackend?: NativeStorageBackend | undefined
|
|
24
|
+
/** Pass `import * as SecureStore from "expo-secure-store"`. Preferred for mobile. */
|
|
25
|
+
secureStore?: SecureStoreLike | undefined
|
|
26
|
+
/** Pass `AsyncStorage` from `@react-native-async-storage/async-storage`. */
|
|
27
|
+
asyncStorage?: AsyncStorageLike | undefined
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function resolveNativeStorage(config: CreateNativeClientConfig): AuthStorage {
|
|
31
|
+
if (config.auth?.storage !== undefined) {
|
|
32
|
+
return config.auth.storage
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const backend =
|
|
36
|
+
config.storageBackend ??
|
|
37
|
+
(config.secureStore !== undefined
|
|
38
|
+
? "secure-store"
|
|
39
|
+
: config.asyncStorage !== undefined
|
|
40
|
+
? "async-storage"
|
|
41
|
+
: null)
|
|
42
|
+
|
|
43
|
+
if (backend === "secure-store") {
|
|
44
|
+
if (config.secureStore === undefined) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
'@supatype/react-native: storageBackend "secure-store" requires the `secureStore` option (import * as SecureStore from "expo-secure-store").',
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
return secureStoreAdapter(config.secureStore)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (backend === "async-storage") {
|
|
53
|
+
if (config.asyncStorage === undefined) {
|
|
54
|
+
throw new Error(
|
|
55
|
+
'@supatype/react-native: storageBackend "async-storage" requires the `asyncStorage` option.',
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
return asyncStorageAdapter(config.asyncStorage)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
throw new Error(
|
|
62
|
+
"@supatype/react-native: pass `secureStore` (recommended), `asyncStorage`, or `auth.storage` so sessions persist across app restarts.",
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Create a Supatype client wired for React Native session persistence.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* import * as SecureStore from "expo-secure-store"
|
|
72
|
+
* import { createNativeClient } from "@supatype/react-native"
|
|
73
|
+
*
|
|
74
|
+
* const client = createNativeClient({
|
|
75
|
+
* url: process.env.EXPO_PUBLIC_SUPATYPE_URL!,
|
|
76
|
+
* anonKey: process.env.EXPO_PUBLIC_SUPATYPE_ANON_KEY!,
|
|
77
|
+
* secureStore: SecureStore,
|
|
78
|
+
* })
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export function createNativeClient<TDatabase extends AnyDatabase = AugmentedDatabase>(
|
|
82
|
+
config: CreateNativeClientConfig,
|
|
83
|
+
): SupatypeClient<TDatabase> {
|
|
84
|
+
const storage = resolveNativeStorage(config)
|
|
85
|
+
const { secureStore: _s, asyncStorage: _a, storageBackend: _b, auth, ...rest } = config
|
|
86
|
+
|
|
87
|
+
return createClient<TDatabase>({
|
|
88
|
+
...rest,
|
|
89
|
+
auth: {
|
|
90
|
+
persistSession: auth?.persistSession ?? true,
|
|
91
|
+
...(auth?.storageKey !== undefined && { storageKey: auth.storageKey }),
|
|
92
|
+
...(auth?.cookiePrefix !== undefined && { cookiePrefix: auth.cookiePrefix }),
|
|
93
|
+
storage,
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
}
|
package/src/deepLink.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Session, SupatypeClient, SupatypeError } from "@supatype/client"
|
|
2
|
+
|
|
3
|
+
export interface LinkingSubscription {
|
|
4
|
+
remove(): void
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** Minimal React Native / Expo Linking surface. */
|
|
8
|
+
export interface LinkingLike {
|
|
9
|
+
addEventListener(
|
|
10
|
+
type: "url",
|
|
11
|
+
handler: (event: { url: string }) => void,
|
|
12
|
+
): LinkingSubscription
|
|
13
|
+
getInitialURL(): Promise<string | null>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CreateAuthUrlListenerOptions {
|
|
17
|
+
linking: LinkingLike
|
|
18
|
+
/** Only process URLs that include this substring (e.g. `"auth/callback"`). */
|
|
19
|
+
pathIncludes?: string | undefined
|
|
20
|
+
onSession?: ((session: Session) => void) | undefined
|
|
21
|
+
onError?: ((error: SupatypeError) => void) | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type AuthCapable = Pick<SupatypeClient, "auth">
|
|
25
|
+
|
|
26
|
+
function urlMatches(url: string, pathIncludes: string | undefined): boolean {
|
|
27
|
+
if (pathIncludes === undefined || pathIncludes === "") return true
|
|
28
|
+
return url.includes(pathIncludes)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function handleUrl(
|
|
32
|
+
client: AuthCapable,
|
|
33
|
+
url: string,
|
|
34
|
+
opts: CreateAuthUrlListenerOptions,
|
|
35
|
+
): Promise<void> {
|
|
36
|
+
if (!urlMatches(url, opts.pathIncludes)) return
|
|
37
|
+
// Skip URLs that clearly aren't auth redirects.
|
|
38
|
+
if (
|
|
39
|
+
!url.includes("code=") &&
|
|
40
|
+
!url.includes("access_token=") &&
|
|
41
|
+
!url.includes("error=") &&
|
|
42
|
+
!url.includes("error_description=")
|
|
43
|
+
) {
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const { data, error } = await client.auth.getSessionFromUrl(url)
|
|
48
|
+
if (error !== null) {
|
|
49
|
+
opts.onError?.(error)
|
|
50
|
+
return
|
|
51
|
+
}
|
|
52
|
+
if (data.session !== null) {
|
|
53
|
+
opts.onSession?.(data.session)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Listen for auth deep links (cold start + warm) and complete PKCE / implicit / error redirects.
|
|
59
|
+
*
|
|
60
|
+
* @returns Unsubscribe function.
|
|
61
|
+
*/
|
|
62
|
+
export function createAuthUrlListener(
|
|
63
|
+
client: AuthCapable,
|
|
64
|
+
opts: CreateAuthUrlListenerOptions,
|
|
65
|
+
): () => void {
|
|
66
|
+
let active = true
|
|
67
|
+
|
|
68
|
+
const onUrl = (event: { url: string }): void => {
|
|
69
|
+
void handleUrl(client, event.url, opts)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const subscription = opts.linking.addEventListener("url", onUrl)
|
|
73
|
+
|
|
74
|
+
void opts.linking.getInitialURL().then((url) => {
|
|
75
|
+
if (!active || url === null) return
|
|
76
|
+
void handleUrl(client, url, opts)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
return () => {
|
|
80
|
+
active = false
|
|
81
|
+
subscription.remove()
|
|
82
|
+
}
|
|
83
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createNativeClient,
|
|
3
|
+
type CreateNativeClientConfig,
|
|
4
|
+
type NativeStorageBackend,
|
|
5
|
+
} from "./createNativeClient.js"
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
secureStoreAdapter,
|
|
9
|
+
asyncStorageAdapter,
|
|
10
|
+
type SecureStoreLike,
|
|
11
|
+
type AsyncStorageLike,
|
|
12
|
+
} from "./storage.js"
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
openOAuth,
|
|
16
|
+
type OpenOAuthOptions,
|
|
17
|
+
type OpenOAuthResult,
|
|
18
|
+
type WebBrowserLike,
|
|
19
|
+
} from "./openOAuth.js"
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
createAuthUrlListener,
|
|
23
|
+
type CreateAuthUrlListenerOptions,
|
|
24
|
+
type LinkingLike,
|
|
25
|
+
type LinkingSubscription,
|
|
26
|
+
} from "./deepLink.js"
|
package/src/openOAuth.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AuthFlowType,
|
|
3
|
+
Session,
|
|
4
|
+
SupatypeClient,
|
|
5
|
+
SupatypeError,
|
|
6
|
+
User,
|
|
7
|
+
} from "@supatype/client"
|
|
8
|
+
|
|
9
|
+
/** Minimal expo-web-browser surface used by openOAuth. */
|
|
10
|
+
export interface WebBrowserLike {
|
|
11
|
+
openAuthSessionAsync(
|
|
12
|
+
url: string,
|
|
13
|
+
redirectUrl?: string,
|
|
14
|
+
): Promise<{ type: string; url?: string }>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface OpenOAuthOptions {
|
|
18
|
+
provider: string
|
|
19
|
+
/** Deep-link URI registered with the auth server allowlist (e.g. `myapp://auth/callback`). */
|
|
20
|
+
redirectTo: string
|
|
21
|
+
scopes?: string | undefined
|
|
22
|
+
/**
|
|
23
|
+
* OAuth redirect flow. Default: `"pkce"` (recommended for mobile).
|
|
24
|
+
* Pass `"implicit"` only if you need hash-token redirects.
|
|
25
|
+
*/
|
|
26
|
+
flowType?: AuthFlowType | undefined
|
|
27
|
+
/** Inject `expo-web-browser` (required unless provided via dependency injection in tests). */
|
|
28
|
+
webBrowser: WebBrowserLike
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface OpenOAuthResult {
|
|
32
|
+
data: { session: Session | null; user: User | null }
|
|
33
|
+
error: SupatypeError | null
|
|
34
|
+
/** True when the user dismissed / cancelled the browser session. */
|
|
35
|
+
cancelled: boolean
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type AuthCapable = Pick<SupatypeClient, "auth">
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Start an in-app OAuth session (PKCE by default) and exchange the redirect for a session.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import * as WebBrowser from "expo-web-browser"
|
|
46
|
+
* import * as Linking from "expo-linking"
|
|
47
|
+
* import { openOAuth } from "@supatype/react-native"
|
|
48
|
+
*
|
|
49
|
+
* const redirectTo = Linking.createURL("auth/callback")
|
|
50
|
+
* const { data, error, cancelled } = await openOAuth(client, {
|
|
51
|
+
* provider: "google",
|
|
52
|
+
* redirectTo,
|
|
53
|
+
* webBrowser: WebBrowser,
|
|
54
|
+
* })
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export async function openOAuth(
|
|
58
|
+
client: AuthCapable,
|
|
59
|
+
opts: OpenOAuthOptions,
|
|
60
|
+
): Promise<OpenOAuthResult> {
|
|
61
|
+
const flowType = opts.flowType ?? "pkce"
|
|
62
|
+
const { data: oauth, error: oauthError } = await client.auth.signInWithOAuth({
|
|
63
|
+
provider: opts.provider,
|
|
64
|
+
options: {
|
|
65
|
+
redirectTo: opts.redirectTo,
|
|
66
|
+
flowType,
|
|
67
|
+
...(opts.scopes !== undefined && { scopes: opts.scopes }),
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
if (oauthError !== null) {
|
|
72
|
+
return { data: { session: null, user: null }, error: oauthError, cancelled: false }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const result = await opts.webBrowser.openAuthSessionAsync(oauth.url, opts.redirectTo)
|
|
76
|
+
|
|
77
|
+
if (result.type !== "success" || result.url === undefined || result.url === "") {
|
|
78
|
+
return { data: { session: null, user: null }, error: null, cancelled: true }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const { data, error } = await client.auth.getSessionFromUrl(result.url)
|
|
82
|
+
return { data, error, cancelled: false }
|
|
83
|
+
}
|
package/src/storage.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AuthStorage } from "@supatype/client"
|
|
2
|
+
|
|
3
|
+
/** Minimal SecureStore surface (expo-secure-store). */
|
|
4
|
+
export interface SecureStoreLike {
|
|
5
|
+
getItemAsync(key: string): Promise<string | null>
|
|
6
|
+
setItemAsync(key: string, value: string): Promise<void>
|
|
7
|
+
deleteItemAsync(key: string): Promise<void>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Minimal AsyncStorage surface. */
|
|
11
|
+
export interface AsyncStorageLike {
|
|
12
|
+
getItem(key: string): Promise<string | null>
|
|
13
|
+
setItem(key: string, value: string): Promise<void>
|
|
14
|
+
removeItem(key: string): Promise<void>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Wrap expo-secure-store as an AuthStorage adapter. */
|
|
18
|
+
export function secureStoreAdapter(secureStore: SecureStoreLike): AuthStorage {
|
|
19
|
+
return {
|
|
20
|
+
getItem: (key) => secureStore.getItemAsync(key),
|
|
21
|
+
setItem: (key, value) => secureStore.setItemAsync(key, value),
|
|
22
|
+
removeItem: (key) => secureStore.deleteItemAsync(key),
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Wrap @react-native-async-storage/async-storage as an AuthStorage adapter. */
|
|
27
|
+
export function asyncStorageAdapter(asyncStorage: AsyncStorageLike): AuthStorage {
|
|
28
|
+
return {
|
|
29
|
+
getItem: (key) => asyncStorage.getItem(key),
|
|
30
|
+
setItem: (key, value) => asyncStorage.setItem(key, value),
|
|
31
|
+
removeItem: (key) => asyncStorage.removeItem(key),
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from "vitest"
|
|
2
|
+
import { AuthClient } from "@supatype/client"
|
|
3
|
+
import {
|
|
4
|
+
asyncStorageAdapter,
|
|
5
|
+
createAuthUrlListener,
|
|
6
|
+
createNativeClient,
|
|
7
|
+
openOAuth,
|
|
8
|
+
secureStoreAdapter,
|
|
9
|
+
} from "../src/index.js"
|
|
10
|
+
|
|
11
|
+
const GOTRUE = "http://localhost:9999"
|
|
12
|
+
const ANON = "test-anon"
|
|
13
|
+
|
|
14
|
+
function memorySecureStore() {
|
|
15
|
+
const store = new Map<string, string>()
|
|
16
|
+
return {
|
|
17
|
+
store,
|
|
18
|
+
getItemAsync: vi.fn(async (key: string) => store.get(key) ?? null),
|
|
19
|
+
setItemAsync: vi.fn(async (key: string, value: string) => {
|
|
20
|
+
store.set(key, value)
|
|
21
|
+
}),
|
|
22
|
+
deleteItemAsync: vi.fn(async (key: string) => {
|
|
23
|
+
store.delete(key)
|
|
24
|
+
}),
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe("storage adapters", () => {
|
|
29
|
+
it("secureStoreAdapter round-trips", async () => {
|
|
30
|
+
const ss = memorySecureStore()
|
|
31
|
+
const storage = secureStoreAdapter(ss)
|
|
32
|
+
await storage.setItem("k", "v")
|
|
33
|
+
expect(await storage.getItem("k")).toBe("v")
|
|
34
|
+
await storage.removeItem("k")
|
|
35
|
+
expect(await storage.getItem("k")).toBeNull()
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it("asyncStorageAdapter round-trips", async () => {
|
|
39
|
+
const store = new Map<string, string>()
|
|
40
|
+
const storage = asyncStorageAdapter({
|
|
41
|
+
getItem: async (k) => store.get(k) ?? null,
|
|
42
|
+
setItem: async (k, v) => {
|
|
43
|
+
store.set(k, v)
|
|
44
|
+
},
|
|
45
|
+
removeItem: async (k) => {
|
|
46
|
+
store.delete(k)
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
await storage.setItem("a", "b")
|
|
50
|
+
expect(await storage.getItem("a")).toBe("b")
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
describe("createNativeClient", () => {
|
|
55
|
+
it("injects secureStore as auth.storage", async () => {
|
|
56
|
+
const ss = memorySecureStore()
|
|
57
|
+
const client = createNativeClient({
|
|
58
|
+
url: GOTRUE,
|
|
59
|
+
anonKey: ANON,
|
|
60
|
+
secureStore: ss,
|
|
61
|
+
})
|
|
62
|
+
await client.auth.whenReady()
|
|
63
|
+
|
|
64
|
+
vi.stubGlobal(
|
|
65
|
+
"fetch",
|
|
66
|
+
vi.fn().mockResolvedValue({
|
|
67
|
+
ok: true,
|
|
68
|
+
status: 200,
|
|
69
|
+
json: async () => ({
|
|
70
|
+
access_token: "at",
|
|
71
|
+
refresh_token: "rt",
|
|
72
|
+
token_type: "bearer",
|
|
73
|
+
expires_in: 3600,
|
|
74
|
+
user: {
|
|
75
|
+
id: "u1",
|
|
76
|
+
email: "a@b.com",
|
|
77
|
+
created_at: "2024-01-01T00:00:00Z",
|
|
78
|
+
updated_at: "2024-01-01T00:00:00Z",
|
|
79
|
+
app_metadata: {},
|
|
80
|
+
user_metadata: {},
|
|
81
|
+
},
|
|
82
|
+
}),
|
|
83
|
+
}),
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
await client.auth.signInWithPassword({ email: "a@b.com", password: "x" })
|
|
87
|
+
expect(ss.setItemAsync).toHaveBeenCalled()
|
|
88
|
+
const values = ss.setItemAsync.mock.calls.map((c) => c[1] as string)
|
|
89
|
+
expect(values.some((v) => v.includes("accessToken") || v.includes("at"))).toBe(true)
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
it("throws when no storage module is provided", () => {
|
|
93
|
+
expect(() =>
|
|
94
|
+
createNativeClient({ url: GOTRUE, anonKey: ANON }),
|
|
95
|
+
).toThrow(/secureStore/)
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
describe("openOAuth", () => {
|
|
100
|
+
beforeEach(() => vi.restoreAllMocks())
|
|
101
|
+
|
|
102
|
+
it("uses PKCE by default and exchanges success URL", async () => {
|
|
103
|
+
const ss = memorySecureStore()
|
|
104
|
+
const auth = new AuthClient(`${GOTRUE}/auth/v1`, {
|
|
105
|
+
apikey: ANON,
|
|
106
|
+
"Content-Type": "application/json",
|
|
107
|
+
}, { storage: secureStoreAdapter(ss) })
|
|
108
|
+
await auth.whenReady()
|
|
109
|
+
|
|
110
|
+
const client = { auth }
|
|
111
|
+
|
|
112
|
+
const webBrowser = {
|
|
113
|
+
openAuthSessionAsync: vi.fn().mockResolvedValue({
|
|
114
|
+
type: "success",
|
|
115
|
+
url: "myapp://auth/callback?code=auth-code-1",
|
|
116
|
+
}),
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
vi.stubGlobal(
|
|
120
|
+
"fetch",
|
|
121
|
+
vi.fn().mockResolvedValue({
|
|
122
|
+
ok: true,
|
|
123
|
+
status: 200,
|
|
124
|
+
json: async () => ({
|
|
125
|
+
access_token: "at-oauth",
|
|
126
|
+
refresh_token: "rt-oauth",
|
|
127
|
+
token_type: "bearer",
|
|
128
|
+
expires_in: 3600,
|
|
129
|
+
user: {
|
|
130
|
+
id: "u1",
|
|
131
|
+
email: "a@b.com",
|
|
132
|
+
created_at: "2024-01-01T00:00:00Z",
|
|
133
|
+
updated_at: "2024-01-01T00:00:00Z",
|
|
134
|
+
app_metadata: {},
|
|
135
|
+
user_metadata: {},
|
|
136
|
+
},
|
|
137
|
+
}),
|
|
138
|
+
}),
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
const result = await openOAuth(client, {
|
|
142
|
+
provider: "google",
|
|
143
|
+
redirectTo: "myapp://auth/callback",
|
|
144
|
+
webBrowser,
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
expect(result.cancelled).toBe(false)
|
|
148
|
+
expect(result.error).toBeNull()
|
|
149
|
+
expect(result.data.session?.accessToken).toBe("at-oauth")
|
|
150
|
+
expect(webBrowser.openAuthSessionAsync).toHaveBeenCalled()
|
|
151
|
+
const [authorizeUrl] = webBrowser.openAuthSessionAsync.mock.calls[0] as [string]
|
|
152
|
+
expect(authorizeUrl).toContain("code_challenge=")
|
|
153
|
+
expect(authorizeUrl).toContain("code_challenge_method=s256")
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
it("returns cancelled when browser is dismissed", async () => {
|
|
157
|
+
const auth = new AuthClient(`${GOTRUE}/auth/v1`, {
|
|
158
|
+
apikey: ANON,
|
|
159
|
+
"Content-Type": "application/json",
|
|
160
|
+
})
|
|
161
|
+
const result = await openOAuth(
|
|
162
|
+
{ auth },
|
|
163
|
+
{
|
|
164
|
+
provider: "google",
|
|
165
|
+
redirectTo: "myapp://cb",
|
|
166
|
+
webBrowser: {
|
|
167
|
+
openAuthSessionAsync: async () => ({ type: "dismiss" }),
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
)
|
|
171
|
+
expect(result.cancelled).toBe(true)
|
|
172
|
+
expect(result.data.session).toBeNull()
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
describe("createAuthUrlListener", () => {
|
|
177
|
+
it("handles initial URL with code", async () => {
|
|
178
|
+
const ss = memorySecureStore()
|
|
179
|
+
const auth = new AuthClient(`${GOTRUE}/auth/v1`, {
|
|
180
|
+
apikey: ANON,
|
|
181
|
+
"Content-Type": "application/json",
|
|
182
|
+
}, { storage: secureStoreAdapter(ss) })
|
|
183
|
+
await auth.whenReady()
|
|
184
|
+
await auth.signInWithOAuth({
|
|
185
|
+
provider: "google",
|
|
186
|
+
options: { flowType: "pkce" },
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
vi.stubGlobal(
|
|
190
|
+
"fetch",
|
|
191
|
+
vi.fn().mockResolvedValue({
|
|
192
|
+
ok: true,
|
|
193
|
+
status: 200,
|
|
194
|
+
json: async () => ({
|
|
195
|
+
access_token: "at",
|
|
196
|
+
refresh_token: "rt",
|
|
197
|
+
token_type: "bearer",
|
|
198
|
+
expires_in: 3600,
|
|
199
|
+
user: {
|
|
200
|
+
id: "u1",
|
|
201
|
+
created_at: "2024-01-01T00:00:00Z",
|
|
202
|
+
updated_at: "2024-01-01T00:00:00Z",
|
|
203
|
+
app_metadata: {},
|
|
204
|
+
user_metadata: {},
|
|
205
|
+
},
|
|
206
|
+
}),
|
|
207
|
+
}),
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
const onSession = vi.fn()
|
|
211
|
+
let urlHandler: ((e: { url: string }) => void) | null = null
|
|
212
|
+
|
|
213
|
+
const unsubscribe = createAuthUrlListener(
|
|
214
|
+
{ auth },
|
|
215
|
+
{
|
|
216
|
+
linking: {
|
|
217
|
+
addEventListener: (_type, handler) => {
|
|
218
|
+
urlHandler = handler
|
|
219
|
+
return { remove: vi.fn() }
|
|
220
|
+
},
|
|
221
|
+
getInitialURL: async () => "myapp://auth/callback?code=from-cold-start",
|
|
222
|
+
},
|
|
223
|
+
pathIncludes: "auth/callback",
|
|
224
|
+
onSession,
|
|
225
|
+
},
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
await vi.waitFor(() => {
|
|
229
|
+
expect(onSession).toHaveBeenCalled()
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
expect(urlHandler).not.toBeNull()
|
|
233
|
+
unsubscribe()
|
|
234
|
+
})
|
|
235
|
+
})
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../client/dist/query-cache.d.ts","../client/dist/types.d.ts","../client/dist/auth.d.ts","../client/dist/query.d.ts","../client/dist/storage.d.ts","../client/dist/realtime.d.ts","../client/dist/pkce.d.ts","../client/dist/errors.d.ts","../client/dist/fetch-with-retry.d.ts","../client/dist/retry.d.ts","../client/dist/error-codes-doc.d.ts","../client/dist/serverless-docs.d.ts","../client/dist/index.d.ts","./src/storage.ts","./src/createNativeClient.ts","./src/deepLink.ts","./src/openOAuth.ts","./src/index.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/compatibility/index.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/buffer.buffer.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/globals.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/web-globals/domexception.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/web-globals/events.d.ts","../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/web-globals/fetch.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/web-globals/navigator.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/web-globals/storage.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/assert.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/assert/strict.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/async_hooks.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/buffer.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/child_process.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/cluster.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/console.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/constants.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/crypto.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/dgram.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/dns.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/dns/promises.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/domain.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/events.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/fs.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/fs/promises.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/http.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/http2.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/https.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/inspector.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/inspector.generated.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/module.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/net.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/os.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/path.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/perf_hooks.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/process.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/punycode.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/querystring.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/readline.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/readline/promises.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/repl.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/sea.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/sqlite.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/stream.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/stream/promises.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/stream/consumers.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/stream/web.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/string_decoder.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/test.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/timers.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/timers/promises.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/tls.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/trace_events.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/tty.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/url.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/util.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/v8.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/vm.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/wasi.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/worker_threads.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/zlib.d.ts","../../node_modules/.pnpm/@types+node@22.19.13/node_modules/@types/node/index.d.ts"],"fileIdsList":[[81,127,128,130,147,148],[81,129,130,147,148],[130,147,148],[81,130,135,147,148,165],[81,130,131,136,141,147,148,150,162,173],[81,130,131,132,141,147,148,150],[81,130,147,148],[76,77,78,81,130,147,148],[81,130,133,147,148,174],[81,130,134,135,142,147,148,151],[81,130,135,147,148,162,170],[81,130,136,138,141,147,148,150],[81,129,130,137,147,148],[81,130,138,139,147,148],[81,130,140,141,147,148],[81,129,130,141,147,148],[81,130,141,142,143,147,148,162,173],[81,130,141,142,143,147,148,157,162,165],[81,123,130,138,141,144,147,148,150,162,173],[81,130,141,142,144,145,147,148,150,162,170,173],[81,130,144,146,147,148,162,170,173],[79,80,81,82,83,84,85,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179],[81,130,141,147,148],[81,130,147,148,149,173],[81,130,138,141,147,148,150,162],[81,130,147,148,151],[81,130,147,148,152],[81,129,130,147,148,153],[81,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179],[81,130,147,148,155],[81,130,147,148,156],[81,130,141,147,148,157,158],[81,130,147,148,157,159,174,176],[81,130,142,147,148],[81,130,141,147,148,162,163,165],[81,130,147,148,164,165],[81,130,147,148,162,163],[81,130,147,148,165],[81,130,147,148,166],[81,127,130,147,148,162,167,173],[81,130,141,147,148,168,169],[81,130,147,148,168,169],[81,130,135,147,148,150,162,170],[81,130,147,148,171],[81,130,147,148,150,172],[81,130,144,147,148,156,173],[81,130,135,147,148,174],[81,130,147,148,162,175],[81,130,147,148,149,176],[81,130,147,148,177],[81,123,130,147,148],[81,123,130,141,143,147,148,153,162,165,173,175,176,178],[81,130,147,148,162,179],[81,95,99,130,147,148,173],[81,95,130,147,148,162,173],[81,90,130,147,148],[81,92,95,130,147,148,170,173],[81,130,147,148,150,170],[81,130,147,148,180],[81,90,130,147,148,180],[81,92,95,130,147,148,150,173],[81,87,88,91,94,130,141,147,148,162,173],[81,95,102,130,147,148],[81,87,93,130,147,148],[81,95,116,117,130,147,148],[81,91,95,130,147,148,165,173,180],[81,116,130,147,148,180],[81,89,90,130,147,148,180],[81,95,130,147,148],[81,89,90,91,92,93,94,95,96,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,117,118,119,120,121,122,130,147,148],[81,95,110,130,147,148],[81,95,102,103,130,147,148],[81,93,95,103,104,130,147,148],[81,94,130,147,148],[81,87,90,95,130,147,148],[81,95,99,103,104,130,147,148],[81,99,130,147,148],[81,93,95,98,130,147,148,173],[81,87,92,95,102,130,147,148],[81,130,147,148,162],[81,90,95,116,130,147,148,178,180],[59,81,130,147,148],[58,59,60,61,62,63,64,65,66,67,68,69,81,130,147,148],[58,59,81,130,147,148],[66,81,130,147,148],[58,81,130,147,148],[70,71,81,130,147,148],[70,81,130,147,148],[71,72,73,74,81,130,147,148]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4efd6e9242f1406bcd925936ccba0c1c066a5d54c9e755cac6712a1ce71a3ee","impliedFormat":99},{"version":"fef27c63afdabffffe9ce3771f046b1ea8c399a9d5c5b8d5530d2cc2213ff5f1","impliedFormat":99},{"version":"1a16e10f5d17d14149467d377c183e1a978e385934b3efa05230dbb9de21f3c6","impliedFormat":99},{"version":"032c11c7a44637fdcdb1fb46c8d6538280899fe6247aeae0561a3af0ed2c8abc","impliedFormat":99},{"version":"e5363db20ce3327d96a0e8c9a326259764eaf94e2b34eee3c74e5e6a988e5532","impliedFormat":99},{"version":"00f9fbcf8c7f9957b087eb4922fc153085c112d7f386c2cc211995a47fe7e07e","impliedFormat":99},{"version":"9e9f7cf5e66cec7d628c8713b50d61667f3bacc761e3f6f065038736e3874711","impliedFormat":99},{"version":"1600ade5611547c843e1da83f4180fa9d63e76f86503ac94e10ae55d87bfda02","impliedFormat":99},{"version":"ccbb4f957666793ea28e67b0748ba838841e641330b661bae31a5974612c73fd","impliedFormat":99},{"version":"9143a4409f10ae9f6362706e00e3b7ed082d4b2af0125aab31ecd30a6fefab13","impliedFormat":99},{"version":"6c9f37788061375db19a85ad684e2e08c5d0517200fae8479226ed1e82034ed1","impliedFormat":99},{"version":"e0856e33bfa821d4ab90b555ec6311122f178620eceb8effcaf6344abdb0bb75","impliedFormat":99},{"version":"8b875ac2a29675f7e1643a101488cd06bd1342df8611342219fcd4f578a4fde3","impliedFormat":99},{"version":"93ccad15607ca4d31a66eea5ab1d0c4fde351cd9a593686e2809a4398624184a","signature":"50d8d1fcda53d3f17d49de57f4d2404b16b08bb9975373ba60d983d09b62629e","impliedFormat":99},{"version":"ec0a5865f4c6ff7aef425b1e45ba34afde4098b6b940a420783cd5e0f800a6bf","signature":"f26f675d5f78c56d18e7da09f355a4ddfb42b9912c0c9ebf048689083359493a","impliedFormat":99},{"version":"586c1a0038953e24d55218f270f2a5cc856c3fd4ff2ed8336208742a9138e79e","signature":"4494099a5343bd6b96fec4d278abfc5d9430e7590c5ac1d405c7c238d83f10ce","impliedFormat":99},{"version":"3a077b6c1709d785a55c905b647954e8a4795d215c0eacc9b2cc7069f631dc5c","signature":"c526909161d00540b93eab7e576c1d9dbb2e50b255b146321866e1e9b23f4171","impliedFormat":99},{"version":"abf52d28812f76c44bc374053861407a014ff55e3e95b1c061809d419536baa3","signature":"2b39881ae148c3cab7d491bd1df221b06f7dc689a14a3678ced8a10eb78ebd19","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"f949f7f6c7802a338039cfc2156d1fe285cdd1e092c64437ebe15ae8edc854e0","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"6b039f55681caaf111d5eb84d292b9bee9e0131d0db1ad0871eef0964f533c73","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f663c2f91127ef7024e8ca4b3b4383ff2770e5f826696005de382282794b127","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[[71,75]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"referencedMap":[[127,1],[128,1],[129,2],[81,3],[130,4],[131,5],[132,6],[76,7],[79,8],[77,7],[78,7],[133,9],[134,10],[135,11],[136,12],[137,13],[138,14],[139,14],[140,15],[141,16],[142,17],[143,18],[82,7],[80,7],[144,19],[145,20],[146,21],[180,22],[147,23],[148,7],[149,24],[150,25],[151,26],[152,27],[153,28],[154,29],[155,30],[156,31],[157,32],[158,32],[159,33],[160,7],[161,34],[162,35],[164,36],[163,37],[165,38],[166,39],[167,40],[168,41],[169,42],[170,43],[171,44],[172,45],[173,46],[174,47],[175,48],[176,49],[177,50],[83,7],[84,7],[85,7],[124,51],[125,7],[126,7],[178,52],[179,53],[86,7],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[102,54],[112,55],[101,54],[122,56],[93,57],[92,58],[121,59],[115,60],[120,61],[95,62],[109,63],[94,64],[118,65],[90,66],[89,59],[119,67],[91,68],[96,69],[97,7],[100,69],[87,7],[123,70],[113,71],[104,72],[105,73],[107,74],[103,75],[106,76],[116,59],[98,77],[99,78],[108,79],[88,80],[111,71],[110,69],[114,7],[117,81],[60,82],[68,7],[65,7],[66,7],[70,83],[64,7],[58,82],[61,84],[63,7],[67,85],[69,7],[62,82],[59,86],[72,87],[73,88],[75,89],[74,88],[71,88]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.9.3"}
|