@supabase/auth-js 3.0.0-next.17 → 3.0.0-next.19
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/dist/main/GoTrueClient.js +24 -24
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/fetch.d.ts +27 -7
- package/dist/main/lib/fetch.d.ts.map +1 -1
- package/dist/main/lib/fetch.js +15 -2
- package/dist/main/lib/fetch.js.map +1 -1
- package/dist/main/lib/helpers.js +2 -2
- package/dist/main/lib/helpers.js.map +1 -1
- package/dist/main/lib/locks.d.ts.map +1 -1
- package/dist/main/lib/locks.js +8 -3
- package/dist/main/lib/locks.js.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/module/GoTrueClient.js +24 -24
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/fetch.d.ts +27 -7
- package/dist/module/lib/fetch.d.ts.map +1 -1
- package/dist/module/lib/fetch.js +15 -2
- package/dist/module/lib/fetch.js.map +1 -1
- package/dist/module/lib/helpers.js +2 -2
- package/dist/module/lib/helpers.js.map +1 -1
- package/dist/module/lib/locks.d.ts.map +1 -1
- package/dist/module/lib/locks.js +8 -3
- package/dist/module/lib/locks.js.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/GoTrueClient.ts +7 -7
- package/src/lib/fetch.ts +52 -18
- package/src/lib/helpers.ts +3 -3
- package/src/lib/locks.ts +14 -7
- package/src/lib/version.ts +1 -1
package/src/lib/locks.ts
CHANGED
|
@@ -176,7 +176,7 @@ export async function navigatorLock<R>(
|
|
|
176
176
|
'@supabase/gotrue-js: Navigator LockManager state',
|
|
177
177
|
JSON.stringify(result, null, ' ')
|
|
178
178
|
)
|
|
179
|
-
} catch (e
|
|
179
|
+
} catch (e) {
|
|
180
180
|
console.warn(
|
|
181
181
|
'@supabase/gotrue-js: Error when querying Navigator LockManager state',
|
|
182
182
|
e
|
|
@@ -198,14 +198,21 @@ export async function navigatorLock<R>(
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
)
|
|
201
|
-
} catch (e
|
|
201
|
+
} catch (e) {
|
|
202
202
|
// Always clear the acquire timeout once the request settles, so it cannot
|
|
203
203
|
// fire later and incorrectly abort/log after a rejection.
|
|
204
204
|
if (acquireTimeout > 0) {
|
|
205
205
|
clearTimeout(acquireTimeoutTimer)
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
// DOMException does not extend Error in Node.js, so use structural check
|
|
209
|
+
if (
|
|
210
|
+
e !== null &&
|
|
211
|
+
typeof e === 'object' &&
|
|
212
|
+
'name' in e &&
|
|
213
|
+
e.name === 'AbortError' &&
|
|
214
|
+
acquireTimeout > 0
|
|
215
|
+
) {
|
|
209
216
|
if (abortController.signal.aborted) {
|
|
210
217
|
// OUR timeout fired — the lock is genuinely orphaned. Steal it.
|
|
211
218
|
//
|
|
@@ -370,14 +377,14 @@ export async function processLock<R>(
|
|
|
370
377
|
if (timeoutId !== null) {
|
|
371
378
|
clearTimeout(timeoutId)
|
|
372
379
|
}
|
|
373
|
-
} catch (e
|
|
380
|
+
} catch (e) {
|
|
374
381
|
// Clear the timeout on error path as well
|
|
375
382
|
if (timeoutId !== null) {
|
|
376
383
|
clearTimeout(timeoutId)
|
|
377
384
|
}
|
|
378
385
|
|
|
379
386
|
// Re-throw timeout errors, ignore others
|
|
380
|
-
if (e
|
|
387
|
+
if (e instanceof LockAcquireTimeoutError) {
|
|
381
388
|
throw e
|
|
382
389
|
}
|
|
383
390
|
// Fall through to run fn() - previous operation finished with error
|
|
@@ -391,8 +398,8 @@ export async function processLock<R>(
|
|
|
391
398
|
PROCESS_LOCKS[name] = (async () => {
|
|
392
399
|
try {
|
|
393
400
|
return await currentOperation
|
|
394
|
-
} catch (e
|
|
395
|
-
if (e
|
|
401
|
+
} catch (e) {
|
|
402
|
+
if (e instanceof LockAcquireTimeoutError) {
|
|
396
403
|
// if the current operation timed out, it doesn't mean that the previous
|
|
397
404
|
// operation finished, so we need continue waiting for it to finish
|
|
398
405
|
try {
|
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 = '3.0.0-next.
|
|
7
|
+
export const version = '3.0.0-next.19'
|