@gusnips/react 0.9.18 → 0.9.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.
|
@@ -33,8 +33,13 @@ export interface SupabaseSessionAuth {
|
|
|
33
33
|
* whichever version happens to be installed, which is not the same as being right, and a fleet
|
|
34
34
|
* installs several versions at once. It is also a LIST rather than a range, so it has holes at
|
|
35
35
|
* every version, drift or no drift: at 2.112 nothing covers 505 through 519 or 531 up, and a
|
|
36
|
-
* 507 or a 599
|
|
37
|
-
*
|
|
36
|
+
* 507 or a 599 with a JSON body arrives as a plain `AuthApiError`. Pinning a recent SDK does not
|
|
37
|
+
* make the status clause redundant.
|
|
38
|
+
*
|
|
39
|
+
* The same statuses with a body that is NOT JSON — a proxy's HTML page — arrive as an
|
|
40
|
+
* `AuthUnknownError`, which carries no status at any status, so nothing here can tell that 507
|
|
41
|
+
* from a malformed 400. It answers false for both, on purpose: reading an unreadable 4xx as an
|
|
42
|
+
* outage would leave a dead session retrying forever, which is the other half of the same bug.
|
|
38
43
|
*
|
|
39
44
|
* Read the version a tree really serves with `bun why @supabase/auth-js`, which prints one
|
|
40
45
|
* heading per RESOLVED version; `node_modules` keeps copies the resolver does not serve.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supabase-session.d.ts","sourceRoot":"","sources":["../src/supabase-session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,UAAU,qBAAqB;IAC7B,IAAI,EAAE;QAAE,OAAO,EAAE;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,CAAC;CACpD;AAED,8FAA8F;AAC9F,MAAM,WAAW,mBAAmB;IAClC,UAAU,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC7C,cAAc,IAAI,OAAO,CAAC,qBAAqB,GAAG;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAA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;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CAChF;AACH;;;;;GAKG;GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE;AAClF,qFAAqF;GACnF;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE,IAAI,SAAK,GAAG,YAAY,CA6B3F"}
|
package/dist/supabase-session.js
CHANGED
|
@@ -16,8 +16,13 @@ import { isAuthError, isAuthRetryableFetchError } from "@supabase/supabase-js";
|
|
|
16
16
|
* whichever version happens to be installed, which is not the same as being right, and a fleet
|
|
17
17
|
* installs several versions at once. It is also a LIST rather than a range, so it has holes at
|
|
18
18
|
* every version, drift or no drift: at 2.112 nothing covers 505 through 519 or 531 up, and a
|
|
19
|
-
* 507 or a 599
|
|
20
|
-
*
|
|
19
|
+
* 507 or a 599 with a JSON body arrives as a plain `AuthApiError`. Pinning a recent SDK does not
|
|
20
|
+
* make the status clause redundant.
|
|
21
|
+
*
|
|
22
|
+
* The same statuses with a body that is NOT JSON — a proxy's HTML page — arrive as an
|
|
23
|
+
* `AuthUnknownError`, which carries no status at any status, so nothing here can tell that 507
|
|
24
|
+
* from a malformed 400. It answers false for both, on purpose: reading an unreadable 4xx as an
|
|
25
|
+
* outage would leave a dead session retrying forever, which is the other half of the same bug.
|
|
21
26
|
*
|
|
22
27
|
* Read the version a tree really serves with `bun why @supabase/auth-js`, which prints one
|
|
23
28
|
* heading per RESOLVED version; `node_modules` keeps copies the resolver does not serve.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supabase-session.js","sourceRoot":"","sources":["../src/supabase-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAuB,MAAM,uBAAuB,CAAC;AAmBpG
|
|
1
|
+
{"version":3,"file":"supabase-session.js","sourceRoot":"","sources":["../src/supabase-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAuB,MAAM,uBAAuB,CAAC;AAmBpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,4FAA4F;IAC5F,6EAA6E;IAC7E,8FAA8F;IAC9F,8FAA8F;IAC9F,gFAAgF;IAChF,IAAI,KAAK,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IAChC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;AACxE,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,0FAA0F;IAC1F,uFAAuF;IACvF,kFAAkF;IAClF,8EAA8E;IAC9E,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7D,8FAA8F;IAC9F,8FAA8F;IAC9F,OAAO,KAAK,CAAC,IAAI,KAAK,2BAA2B,CAAC;AACpD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,4BAA4B,CAAC,IAAyB;IACpE,OAAO;QACL,QAAQ,EAAE,KAAK,IAAI,EAAE;YACnB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YACzC,OAAO,IAAI,CAAC,OAAO,EAAE,YAAY,IAAI,IAAI,CAAC;QAC5C,CAAC;QACD,OAAO,EAAE,KAAK,IAAI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ACf,IAAI;YACJ,UAAU,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE;SACvE,CAAC;IAEJ,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gusnips/react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
4
4
|
"description": "The headless runtime under a Vite + React SPA: typed fetch client with single-flight refresh, auth store, query defaults, route guards, error boundary, stale-tab recovery, i18n bootstrap.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"release:major": "bun pm version major && bun publish --access public"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@gusnips/http": "0.1.
|
|
83
|
+
"@gusnips/http": "0.1.6",
|
|
84
84
|
"clsx": "^2.1.1",
|
|
85
85
|
"tailwind-merge": "^3.6.0"
|
|
86
86
|
},
|
|
@@ -127,8 +127,9 @@ describe("isAuthOutage", () => {
|
|
|
127
127
|
// A gateway between us and GoTrue, which auth-js wraps by name.
|
|
128
128
|
expect(isAuthOutage(new AuthRetryableFetchError("Bad Gateway", 502))).toBe(true);
|
|
129
129
|
// And the reason the status clause is not redundant: the statuses earning that name are a
|
|
130
|
-
// LIST, so it has holes at every version. 507 and 599 are on no version of it, and
|
|
131
|
-
// as ordinary AuthApiErrors that `isAuthRetryableFetchError` answers false
|
|
130
|
+
// LIST, so it has holes at every version. 507 and 599 are on no version of it, and with a
|
|
131
|
+
// JSON body arrive as ordinary AuthApiErrors that `isAuthRetryableFetchError` answers false
|
|
132
|
+
// for. (With a body that is not JSON they arrive with no status at all: see below.)
|
|
132
133
|
expect(isAuthOutage(new AuthApiError("Insufficient Storage", 507, undefined))).toBe(true);
|
|
133
134
|
expect(isAuthOutage(new AuthApiError("Network Connect Timeout", 599, undefined))).toBe(true);
|
|
134
135
|
});
|
package/src/supabase-session.ts
CHANGED
|
@@ -34,8 +34,13 @@ type _SupabaseAuthFitsAdapter = Satisfied<
|
|
|
34
34
|
* whichever version happens to be installed, which is not the same as being right, and a fleet
|
|
35
35
|
* installs several versions at once. It is also a LIST rather than a range, so it has holes at
|
|
36
36
|
* every version, drift or no drift: at 2.112 nothing covers 505 through 519 or 531 up, and a
|
|
37
|
-
* 507 or a 599
|
|
38
|
-
*
|
|
37
|
+
* 507 or a 599 with a JSON body arrives as a plain `AuthApiError`. Pinning a recent SDK does not
|
|
38
|
+
* make the status clause redundant.
|
|
39
|
+
*
|
|
40
|
+
* The same statuses with a body that is NOT JSON — a proxy's HTML page — arrive as an
|
|
41
|
+
* `AuthUnknownError`, which carries no status at any status, so nothing here can tell that 507
|
|
42
|
+
* from a malformed 400. It answers false for both, on purpose: reading an unreadable 4xx as an
|
|
43
|
+
* outage would leave a dead session retrying forever, which is the other half of the same bug.
|
|
39
44
|
*
|
|
40
45
|
* Read the version a tree really serves with `bun why @supabase/auth-js`, which prints one
|
|
41
46
|
* heading per RESOLVED version; `node_modules` keeps copies the resolver does not serve.
|