@supabase/auth-js 2.78.0 → 2.78.1-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/main/GoTrueClient.d.ts +11 -0
- package/dist/main/GoTrueClient.d.ts.map +1 -1
- package/dist/main/GoTrueClient.js +145 -112
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/helpers.d.ts.map +1 -1
- package/dist/main/lib/helpers.js +2 -42
- package/dist/main/lib/helpers.js.map +1 -1
- package/dist/main/lib/types.d.ts +5 -0
- package/dist/main/lib/types.d.ts.map +1 -1
- package/dist/main/lib/types.js.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.d.ts.map +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/main/lib/version.js.map +1 -1
- package/dist/module/GoTrueClient.d.ts +11 -0
- package/dist/module/GoTrueClient.d.ts.map +1 -1
- package/dist/module/GoTrueClient.js +145 -112
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/helpers.d.ts.map +1 -1
- package/dist/module/lib/helpers.js +2 -9
- package/dist/module/lib/helpers.js.map +1 -1
- package/dist/module/lib/types.d.ts +5 -0
- package/dist/module/lib/types.d.ts.map +1 -1
- package/dist/module/lib/types.js.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.d.ts.map +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/module/lib/version.js.map +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/GoTrueClient.ts +149 -112
- package/src/lib/helpers.ts +2 -8
- package/src/lib/types.ts +5 -0
- package/src/lib/version.ts +1 -1
package/src/lib/helpers.ts
CHANGED
|
@@ -94,16 +94,10 @@ export function parseParametersFromURL(href: string) {
|
|
|
94
94
|
type Fetch = typeof fetch
|
|
95
95
|
|
|
96
96
|
export const resolveFetch = (customFetch?: Fetch): Fetch => {
|
|
97
|
-
let _fetch: Fetch
|
|
98
97
|
if (customFetch) {
|
|
99
|
-
|
|
100
|
-
} else if (typeof fetch === 'undefined') {
|
|
101
|
-
_fetch = (...args) =>
|
|
102
|
-
import('@supabase/node-fetch' as any).then(({ default: fetch }) => fetch(...args))
|
|
103
|
-
} else {
|
|
104
|
-
_fetch = fetch
|
|
98
|
+
return (...args) => customFetch(...args)
|
|
105
99
|
}
|
|
106
|
-
return (...args) =>
|
|
100
|
+
return (...args) => fetch(...args)
|
|
107
101
|
}
|
|
108
102
|
|
|
109
103
|
export const looksLikeFetchResponse = (maybeResponse: unknown): maybeResponse is Response => {
|
package/src/lib/types.ts
CHANGED
|
@@ -107,6 +107,11 @@ export type GoTrueClientOptions = {
|
|
|
107
107
|
* @experimental
|
|
108
108
|
*/
|
|
109
109
|
hasCustomAuthorizationHeader?: boolean
|
|
110
|
+
/**
|
|
111
|
+
* If there is an error with the query, throwOnError will reject the promise by
|
|
112
|
+
* throwing the error instead of returning it as part of a successful response.
|
|
113
|
+
*/
|
|
114
|
+
throwOnError?: boolean
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
const WeakPasswordReasons = ['length', 'characters', 'pwned'] as const
|
package/src/lib/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '2.78.
|
|
7
|
+
export const version = '2.78.1-canary.1'
|