@supatype/client 0.9.0 → 0.9.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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +71 -68
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +82 -0
- package/dist/auth.d.ts +41 -6
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +102 -32
- package/dist/auth.js.map +1 -1
- package/dist/bindings.d.ts +3 -0
- package/dist/bindings.d.ts.map +1 -1
- package/dist/bindings.js +2 -0
- package/dist/bindings.js.map +1 -1
- package/dist/error-codes-doc.d.ts +1 -1
- package/dist/error-codes-doc.d.ts.map +1 -1
- package/dist/error-codes-doc.js +7 -0
- package/dist/error-codes-doc.js.map +1 -1
- package/dist/errors.d.ts +81 -21
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +133 -46
- package/dist/errors.js.map +1 -1
- package/dist/graphql-transport.d.ts +8 -1
- package/dist/graphql-transport.d.ts.map +1 -1
- package/dist/graphql-transport.js +5 -5
- package/dist/graphql-transport.js.map +1 -1
- package/dist/index.d.ts +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -37
- package/dist/index.js.map +1 -1
- package/dist/latest-rows.d.ts +29 -0
- package/dist/latest-rows.d.ts.map +1 -0
- package/dist/latest-rows.js +51 -0
- package/dist/latest-rows.js.map +1 -0
- package/dist/mutation-request.d.ts +2 -1
- package/dist/mutation-request.d.ts.map +1 -1
- package/dist/mutation-request.js +2 -1
- package/dist/mutation-request.js.map +1 -1
- package/dist/page-env-script.d.ts +12 -0
- package/dist/page-env-script.d.ts.map +1 -0
- package/dist/page-env-script.js +30 -0
- package/dist/page-env-script.js.map +1 -0
- package/dist/preview.d.ts +2 -1
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +7 -3
- package/dist/preview.js.map +1 -1
- package/dist/query.d.ts +11 -5
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +22 -13
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.ts +5 -2
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +13 -6
- package/dist/realtime.js.map +1 -1
- package/dist/runtime-env.d.ts +59 -0
- package/dist/runtime-env.d.ts.map +1 -0
- package/dist/runtime-env.js +167 -0
- package/dist/runtime-env.js.map +1 -0
- package/dist/setup-fault.d.ts +13 -0
- package/dist/setup-fault.d.ts.map +1 -0
- package/dist/setup-fault.js +17 -0
- package/dist/setup-fault.js.map +1 -0
- package/dist/storage.d.ts +10 -5
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +22 -13
- package/dist/storage.js.map +1 -1
- package/dist/table-subscription.d.ts +1 -1
- package/dist/table-subscription.d.ts.map +1 -1
- package/dist/table-subscription.js +3 -2
- package/dist/table-subscription.js.map +1 -1
- package/dist/thrown-error.d.ts +16 -0
- package/dist/thrown-error.d.ts.map +1 -0
- package/dist/thrown-error.js +31 -0
- package/dist/thrown-error.js.map +1 -0
- package/dist/types.d.ts +59 -15
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -1
- package/src/auth.ts +106 -36
- package/src/bindings.ts +3 -0
- package/src/error-codes-doc.ts +9 -1
- package/src/errors.ts +155 -57
- package/src/graphql-transport.ts +5 -6
- package/src/index.ts +62 -44
- package/src/latest-rows.ts +78 -0
- package/src/mutation-request.ts +3 -2
- package/src/page-env-script.ts +27 -0
- package/src/preview.ts +8 -4
- package/src/query.ts +27 -16
- package/src/realtime.ts +15 -6
- package/src/runtime-env.ts +220 -0
- package/src/setup-fault.ts +18 -0
- package/src/storage.ts +26 -16
- package/src/table-subscription.ts +3 -3
- package/src/thrown-error.ts +31 -0
- package/src/types.ts +65 -14
- package/tests/auth-errors.test.ts +3 -3
- package/tests/auth-events.test.ts +3 -7
- package/tests/auth-sso.test.ts +260 -0
- package/tests/auth-url-session.test.ts +6 -25
- package/tests/entry-points.test.ts +9 -0
- package/tests/error-family.test.ts +79 -0
- package/tests/helpers/auth-unmount-binding.ts +63 -0
- package/tests/helpers/oauth-binding.ts +4 -3
- package/tests/helpers/stale-read-binding.ts +113 -0
- package/tests/helpers/thrown-error-binding.ts +127 -0
- package/tests/postgrest-error-codes.test.ts +4 -4
- package/tests/rate-limit-integration.test.ts +1 -1
- package/tests/result-error-class.test.ts +107 -0
- package/tests/retry-policy.test.ts +1 -1
- package/tests/runtime-env-bundle.test.ts +121 -0
- package/tests/runtime-env-page-script.test.ts +174 -0
- package/tests/runtime-env.test.ts +224 -0
- package/tests/server-bodies.test.ts +3 -3
- package/tests/support/browser.ts +28 -0
- package/tests/support/jwt.ts +5 -0
- package/tests/thrown-error.test.ts +59 -0
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,79 +1,82 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/client@0.9.
|
|
2
|
+
> @supatype/client@0.9.1 test /home/runner/work/supatype/supatype/packages/client
|
|
3
3
|
> vitest run --maxWorkers=50%
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/home/runner/work/supatype/supatype/packages/client[39m
|
|
7
7
|
|
|
8
|
-
[32m✓[39m tests/
|
|
9
|
-
[32m✓[39m tests/
|
|
10
|
-
[32m✓[39m tests/mfa-totp-integration.test.ts [2m([22m[2m12 tests[22m[2m)[22m[
|
|
11
|
-
[32m✓[39m tests/types.test.ts [2m([22m[2m30 tests[22m[2m)[22m[
|
|
12
|
-
[32m✓[39m tests/draft-profile.test.ts [2m([22m[2m18 tests[22m[2m)[22m[33m
|
|
13
|
-
[32m✓[39m tests/table-subscribe.test.ts [2m([22m[2m12 tests[22m[2m)[22m[
|
|
14
|
-
[32m✓[39m tests/realtime-multi-tenant-integration.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m
|
|
15
|
-
|
|
16
|
-
[32m✓[39m tests/draft-insert.test.ts [2m([22m[2m18 tests[22m[2m)[22m[
|
|
17
|
-
|
|
18
|
-
[32m✓[39m tests/
|
|
19
|
-
[32m✓[39m tests/
|
|
20
|
-
[32m✓[39m tests/
|
|
21
|
-
[32m✓[39m tests/
|
|
22
|
-
|
|
23
|
-
[32m✓[39m tests/
|
|
24
|
-
[32m✓[39m tests/
|
|
25
|
-
[32m✓[39m tests/
|
|
26
|
-
[32m✓[39m tests/
|
|
27
|
-
[32m✓[39m tests/
|
|
28
|
-
[32m✓[39m tests/
|
|
8
|
+
[32m✓[39m tests/query.test.ts [2m([22m[2m36 tests[22m[2m)[22m[33m 418[2mms[22m[39m
|
|
9
|
+
[32m✓[39m tests/auth.test.ts [2m([22m[2m46 tests[22m[2m)[22m[33m 649[2mms[22m[39m
|
|
10
|
+
[32m✓[39m tests/mfa-totp-integration.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 291[2mms[22m[39m
|
|
11
|
+
[32m✓[39m tests/types.test.ts [2m([22m[2m30 tests[22m[2m)[22m[33m 364[2mms[22m[39m
|
|
12
|
+
[32m✓[39m tests/draft-profile.test.ts [2m([22m[2m18 tests[22m[2m)[22m[33m 500[2mms[22m[39m
|
|
13
|
+
[32m✓[39m tests/table-subscribe.test.ts [2m([22m[2m12 tests[22m[2m)[22m[33m 335[2mms[22m[39m
|
|
14
|
+
[32m✓[39m tests/realtime-multi-tenant-integration.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 310[2mms[22m[39m
|
|
15
|
+
[32m✓[39m tests/auth-sso.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 279[2mms[22m[39m
|
|
16
|
+
[32m✓[39m tests/draft-insert.test.ts [2m([22m[2m18 tests[22m[2m)[22m[33m 719[2mms[22m[39m
|
|
17
|
+
[33m[2m✓[22m[39m creates the record through supatype.create_record [33m 358[2mms[22m[39m
|
|
18
|
+
[32m✓[39m tests/runtime-env.test.ts [2m([22m[2m27 tests[22m[2m)[22m[32m 87[2mms[22m[39m
|
|
19
|
+
[32m✓[39m tests/graphql-json.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 266[2mms[22m[39m
|
|
20
|
+
[32m✓[39m tests/realtime-shared-channel.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 207[2mms[22m[39m
|
|
21
|
+
[32m✓[39m tests/draft-update.test.ts [2m([22m[2m11 tests[22m[2m)[22m[33m 556[2mms[22m[39m
|
|
22
|
+
[33m[2m✓[22m[39m reads the keys of the records its filters match, as the caller reads the table [33m 381[2mms[22m[39m
|
|
23
|
+
[32m✓[39m tests/server-bodies.test.ts [2m([22m[2m20 tests[22m[2m)[22m[33m 400[2mms[22m[39m
|
|
24
|
+
[32m✓[39m tests/retry-integration.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 127[2mms[22m[39m
|
|
25
|
+
[32m✓[39m tests/auth-url-session.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 214[2mms[22m[39m
|
|
26
|
+
[32m✓[39m tests/runtime-env-page-script.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 148[2mms[22m[39m
|
|
27
|
+
[32m✓[39m tests/exact-values.test.ts [2m([22m[2m24 tests[22m[2m)[22m[32m 35[2mms[22m[39m
|
|
28
|
+
[32m✓[39m tests/storage-quota-integration.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 98[2mms[22m[39m
|
|
29
|
+
[32m✓[39m tests/rate-limit-integration.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 209[2mms[22m[39m
|
|
30
|
+
[32m✓[39m tests/storage-upload-limit-integration.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 201[2mms[22m[39m
|
|
31
|
+
[32m✓[39m tests/realtime-exact-values.test.ts [2m([22m[2m8 tests[22m[2m)[22m[33m 310[2mms[22m[39m
|
|
32
|
+
[32m✓[39m tests/retry-policy.test.ts [2m([22m[2m17 tests[22m[2m)[22m[33m 1839[2mms[22m[39m
|
|
33
|
+
[32m✓[39m tests/realtime-session-auth.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 219[2mms[22m[39m
|
|
29
34
|
[2m[90m↓[39m[22m tests/draft-update.integration.test.ts [2m([22m[2m3 tests[22m[2m | [22m[33m3 skipped[39m[2m)[22m
|
|
30
|
-
[32m✓[39m tests/
|
|
31
|
-
[32m✓[39m tests/
|
|
32
|
-
[32m✓[39m tests/minimal-writes.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 230[2mms[22m[39m
|
|
35
|
+
[32m✓[39m tests/subscribe-frame.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 210[2mms[22m[39m
|
|
36
|
+
[32m✓[39m tests/minimal-writes.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 279[2mms[22m[39m
|
|
33
37
|
[2m[90m↓[39m[22m tests/draft-insert.integration.test.ts [2m([22m[2m4 tests[22m[2m | [22m[33m4 skipped[39m[2m)[22m
|
|
34
|
-
[32m✓[39m tests/supatype-prepare.test.ts [2m([22m[2m12 tests[22m[2m)[22m[33m
|
|
35
|
-
[33m[2m✓[22m[39m
|
|
36
|
-
[33m[2m✓[22m[39m
|
|
37
|
-
[33m[2m✓[22m[39m
|
|
38
|
-
[33m[2m✓[22m[39m runs
|
|
39
|
-
[33m[2m✓[22m[39m
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[32m✓[39m tests/
|
|
46
|
-
[32m✓[39m tests/
|
|
47
|
-
[32m✓[39m tests/
|
|
48
|
-
[32m✓[39m tests/
|
|
49
|
-
[32m✓[39m tests/
|
|
50
|
-
[32m✓[39m tests/
|
|
51
|
-
[32m✓[39m tests/
|
|
52
|
-
[32m✓[39m tests/
|
|
53
|
-
[32m✓[39m tests/
|
|
54
|
-
[32m✓[39m tests/
|
|
55
|
-
[32m✓[39m tests/
|
|
56
|
-
[32m✓[39m tests/table-
|
|
57
|
-
[32m✓[39m tests/
|
|
58
|
-
[32m✓[39m tests/
|
|
59
|
-
[32m✓[39m tests/
|
|
60
|
-
[32m✓[39m tests/
|
|
61
|
-
[32m✓[39m tests/
|
|
62
|
-
[32m✓[39m tests/
|
|
63
|
-
[32m✓[39m tests/
|
|
64
|
-
[32m✓[39m tests/
|
|
65
|
-
[32m✓[39m tests/
|
|
66
|
-
[32m✓[39m tests/
|
|
67
|
-
[32m✓[39m tests/masked-fields.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
38
|
+
[32m✓[39m tests/supatype-prepare.test.ts [2m([22m[2m12 tests[22m[2m)[22m[33m 3574[2mms[22m[39m
|
|
39
|
+
[33m[2m✓[22m[39m runs supatype generate where the CLI is installed, its bin named [33m 435[2mms[22m[39m
|
|
40
|
+
[33m[2m✓[22m[39m runs supatype generate where the CLI is installed, its bin given as a string [33m 328[2mms[22m[39m
|
|
41
|
+
[33m[2m✓[22m[39m finds a CLI hoisted into a parent directory [33m 465[2mms[22m[39m
|
|
42
|
+
[33m[2m✓[22m[39m runs the nearest CLI [33m 364[2mms[22m[39m
|
|
43
|
+
[33m[2m✓[22m[39m fails the install when generate fails [33m 369[2mms[22m[39m
|
|
44
|
+
[32m✓[39m tests/realtime-ack-ref.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 148[2mms[22m[39m
|
|
45
|
+
[32m✓[39m tests/filters.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 108[2mms[22m[39m
|
|
46
|
+
[32m✓[39m tests/unauthorized-resend.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 143[2mms[22m[39m
|
|
47
|
+
[32m✓[39m tests/storage-object-shape.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 227[2mms[22m[39m
|
|
48
|
+
[32m✓[39m tests/result-error-class.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 107[2mms[22m[39m
|
|
49
|
+
[32m✓[39m tests/postgrest-error-codes.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 139[2mms[22m[39m
|
|
50
|
+
[32m✓[39m tests/auth-events.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 106[2mms[22m[39m
|
|
51
|
+
[32m✓[39m tests/data-plane-auth.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 157[2mms[22m[39m
|
|
52
|
+
[32m✓[39m tests/serverless.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
53
|
+
[32m✓[39m tests/exact-response.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
54
|
+
[32m✓[39m tests/runtime-env-bundle.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m 1791[2mms[22m[39m
|
|
55
|
+
[32m✓[39m tests/query-cache.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 52[2mms[22m[39m
|
|
56
|
+
[32m✓[39m tests/auth-errors.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 98[2mms[22m[39m
|
|
57
|
+
[32m✓[39m tests/table-subscription.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 54[2mms[22m[39m
|
|
58
|
+
[32m✓[39m tests/identity-change.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
59
|
+
[32m✓[39m tests/signed-url-absolute.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 45[2mms[22m[39m
|
|
60
|
+
[32m✓[39m tests/table-transport.test.ts [2m([22m[2m8 tests[22m[2m)[22m[33m 462[2mms[22m[39m
|
|
61
|
+
[32m✓[39m tests/error-family.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
62
|
+
[32m✓[39m tests/storage-upload-browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
63
|
+
[32m✓[39m tests/field-kinds-registry.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
64
|
+
[32m✓[39m tests/realtime-presence.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 83[2mms[22m[39m
|
|
65
|
+
[32m✓[39m tests/thrown-error.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
66
|
+
[32m✓[39m tests/storage-reference-url.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
67
|
+
[32m✓[39m tests/auth-error-codes.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
68
|
+
[32m✓[39m tests/realtime-swap-status.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 115[2mms[22m[39m
|
|
69
|
+
[32m✓[39m tests/rpc-resend.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 50[2mms[22m[39m
|
|
70
|
+
[32m✓[39m tests/masked-fields.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
68
71
|
[32m✓[39m tests/count.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
69
|
-
[32m✓[39m tests/storage-url-encoding.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
70
|
-
[32m✓[39m tests/
|
|
71
|
-
[32m✓[39m tests/
|
|
72
|
-
[32m✓[39m tests/
|
|
73
|
-
[32m✓[39m tests/sha256-hex.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
72
|
+
[32m✓[39m tests/storage-url-encoding.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 45[2mms[22m[39m
|
|
73
|
+
[32m✓[39m tests/entry-points.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
74
|
+
[32m✓[39m tests/pkce.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
75
|
+
[32m✓[39m tests/dynamic-headers.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 54[2mms[22m[39m
|
|
76
|
+
[32m✓[39m tests/sha256-hex.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
74
77
|
|
|
75
|
-
[2m Test Files [22m [1m[
|
|
76
|
-
[2m Tests [22m [1m[
|
|
77
|
-
[2m Start at [22m
|
|
78
|
-
[2m Duration [22m
|
|
78
|
+
[2m Test Files [22m [1m[32m60 passed[39m[22m[2m | [22m[33m2 skipped[39m[90m (62)[39m
|
|
79
|
+
[2m Tests [22m [1m[32m664 passed[39m[22m[2m | [22m[33m7 skipped[39m[90m (671)[39m
|
|
80
|
+
[2m Start at [22m 09:14:16
|
|
81
|
+
[2m Duration [22m 35.31s[2m (transform 6.69s, setup 0ms, import 18.89s, tests 17.01s, environment 44ms)[22m
|
|
79
82
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
### Breaking Changes
|
|
6
6
|
|
|
7
|
+
* **errors:** one error family. `SupatypeError` is a class, exported as a value and a type, and
|
|
8
|
+
every error a result carries is one: `message` and, when known, `code`, `status`, `field`,
|
|
9
|
+
`hint` and `details`, its JSON and spread exactly those fields. It replaces the `SupatypeError`
|
|
10
|
+
interface. The SDK's thrown errors are its subclass `SupatypeCodedError` (the class that used to
|
|
11
|
+
be called `SupatypeError`), keeping a required `code` and `helpUrl`: `AuthError`,
|
|
12
|
+
`PostgrestError`, `StorageError`, `RealtimeError`, `NetworkError`, `RateLimitError` and now
|
|
13
|
+
`MissingClientValuesError` (code `MISSING_CLIENT_VALUES`), so `instanceof SupatypeError` holds for
|
|
14
|
+
all of them. Their `statusCode` is renamed `status`, the one name for it. `PostgrestError`'s
|
|
15
|
+
`details` and `hint` are absent rather than `null` when the server gave none, and an rpc refusal
|
|
16
|
+
is the `PostgrestError` itself. `AuthRedirectError` is a class too, with `provider` as one more
|
|
17
|
+
own field. `SupatypeErrorFields` is the fields' type, as the constructor takes them.
|
|
7
18
|
* **query:** `insert`, `update`, `upsert` and `delete` ask for no rows back and resolve to
|
|
8
19
|
`data: null`, as postgrest-js does. Chain `.select()` (or `.select(columns)`) to get the written
|
|
9
20
|
rows. Returning a row needs the right to read it, so a table whose rules let a caller create but
|
|
@@ -19,10 +30,81 @@
|
|
|
19
30
|
(`filter`, `publish`, `select`) in place of the positional `filter` and update options, and returns
|
|
20
31
|
rows only when `request.select` asks for them (`true`, or the columns as `.select()` takes them).
|
|
21
32
|
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **auth:** `auth.signInWithSSO({ domain })` or `auth.signInWithSSO({ providerId })` signs in
|
|
36
|
+
through a SAML identity provider registered on the project. It asks `POST /auth/v1/sso` for the
|
|
37
|
+
identity provider's URL, returns it as `data.url`, and sends the browser there unless
|
|
38
|
+
`options.skipBrowserRedirect` is set. `options` also takes `redirectTo`, `captchaToken` and
|
|
39
|
+
`flowType`. SSO is PKCE by default, unlike `signInWithOAuth`: the S256 challenge goes with the
|
|
40
|
+
request and the sign-in comes back as a `?code=` this browser exchanges, so no tokens are put in
|
|
41
|
+
the URL; `flowType: "implicit"` opts out. A sign-in the identity provider starts comes back with
|
|
42
|
+
tokens in the fragment, and the client signs in from them even while a PKCE sign-in it started is
|
|
43
|
+
still waiting. A refusal (`sso_provider_not_found`, `sso_provider_disabled`) is the returned
|
|
44
|
+
`SupatypeError`, and the page stays put. The argument's type is `SignInWithSSOCredentials`, and
|
|
45
|
+
passing both a domain and a provider ID is a type error. A refusal the auth
|
|
46
|
+
server sends back in the URL after an SSO sign-in is an `AuthRedirectError` whose `provider` is
|
|
47
|
+
the exported `SSO_PROVIDER` (`"sso"`).
|
|
48
|
+
* **client:** `createClient`'s `url` and `anonKey` are optional. One left out, or empty as a bundler
|
|
49
|
+
leaves an unset name, is read from `window.__SUPATYPE_ENV__` when the first request is made. The
|
|
50
|
+
page sets it with `<script src="/supatype-env.js">`, which a Supatype server answers, and which a
|
|
51
|
+
Next.js app serves from the route `@supatype/ssr/next` exports, so one build works on every
|
|
52
|
+
deployment that serves it. Read at the first request rather than at `createClient`, so a script
|
|
53
|
+
that loads after the module creating the client still counts. A value given always wins, and no
|
|
54
|
+
address is ever guessed from the page's own origin. `client.url` is the address as found so far,
|
|
55
|
+
empty until there is one.
|
|
56
|
+
* **client:** `AuthClient`, `StorageClient`, `BucketClient`, `RealtimeClient`, `QueryBuilder` and
|
|
57
|
+
`MutationBuilder` take their address (and `AuthClient` its headers) as a value or as a function
|
|
58
|
+
read for each request. A plain string works as before.
|
|
59
|
+
|
|
22
60
|
### Bug Fixes
|
|
23
61
|
|
|
62
|
+
* **client:** `MissingClientValuesError` gives the script tag as
|
|
63
|
+
`<script src="/supatype-env.js" vite-ignore></script>`, the form `vite build` leaves alone. The
|
|
64
|
+
tag it gave made every `vite build` warn that it could not bundle the script.
|
|
65
|
+
* **client:** the first request a client makes with no address or no anon key throws
|
|
66
|
+
`MissingClientValuesError`, naming what is missing, every frontend name to set (`VITE_`, `PUBLIC_`,
|
|
67
|
+
`NEXT_PUBLIC_`, `EXPO_PUBLIC_`), `supatype build`, the `/supatype-env.js` script tag, and for
|
|
68
|
+
Next.js the route file `app/supatype-env.js/route.ts` and the server's `SUPATYPE_URL` and
|
|
69
|
+
`SUPATYPE_ANON_KEY`. REST, rpc, auth, storage, functions, GraphQL and a realtime subscribe all
|
|
70
|
+
throw it, and none turns it into `{ data: null, error }`. Requests used to go out with
|
|
71
|
+
`apikey: undefined`, every one was refused, and a production build was a blank page with nothing
|
|
72
|
+
saying why. `createClient` itself never throws for either value, so `next build` prerenders a page
|
|
73
|
+
that creates a client at module scope without them. The check reads the page at run time, so a
|
|
74
|
+
bundler that replaced both names with `undefined` cannot fold it away. On a server, where there
|
|
75
|
+
is no page, the error names `SUPATYPE_URL` and `SUPATYPE_ANON_KEY` as the server's variables to
|
|
76
|
+
set first, then the build-time names, rather than a `window.__SUPATYPE_ENV__` no server has.
|
|
77
|
+
`MissingClientValuesError` is exported for an app to catch.
|
|
78
|
+
* **client:** a page whose `/supatype-env.js` gave it no values is told why on its first call. A
|
|
79
|
+
misconfigured server now answers the script 200 with `window.__SUPATYPE_ENV__ = {"error":"..."}`,
|
|
80
|
+
since a browser runs no script answered with an error status and tells the page nothing of why,
|
|
81
|
+
and every first call (table reads and writes, rpc, functions, GraphQL, auth, realtime and storage)
|
|
82
|
+
throws `MissingClientValuesError` quoting that reason, with no request of its own. A page that has
|
|
83
|
+
the script element but no `window.__SUPATYPE_ENV__` at all is no longer told to add the tag: the
|
|
84
|
+
error says the script did not run (blocked, failed to load, ran after the app's own script, or
|
|
85
|
+
from a server too old to serve it) and to open it in the browser. A page with no element is told
|
|
86
|
+
to add it, as before.
|
|
87
|
+
|
|
24
88
|
* **auth:** a request refused with 401 is sent again only when the server said the token was
|
|
25
89
|
expired or invalid (`PGRST301`, `PGRST303`, or "JWT expired"), a session was there to refresh, and
|
|
26
90
|
the refresh produced a different token. Every 401 used to be sent twice, an anon write a row rule
|
|
27
91
|
refused among them. The refresh now runs even when the local clock still calls the token valid,
|
|
28
92
|
since the server has said otherwise.
|
|
93
|
+
* **bindings:** `reportThrown(where, thrown)` turns a request that threw instead of answering
|
|
94
|
+
`{ data, error }` into the binding's `error`, and logs it once with `console.error`. A thrown
|
|
95
|
+
`Error` is kept as it is, so `instanceof` still names it; the SDK's own error classes get the shape
|
|
96
|
+
a failed request answers with. Every framework binding uses it, so none can leave `loading` set
|
|
97
|
+
for good when a request throws.
|
|
98
|
+
* **bindings:** `latestRowsReader(client, table, where, view)` is the read the Vue, Svelte and
|
|
99
|
+
Solid queries share, where only the newest request may change what the binding shows. An older
|
|
100
|
+
read that lands last is dropped, rows, returned error or throw alike; a throw is still logged.
|
|
101
|
+
* **client:** the `error` of every `{ data, error }` result is now an `Error`, a `SupatypeError`,
|
|
102
|
+
rather than a plain object. A network failure used to resolve `{ message: "fetch failed", code }`,
|
|
103
|
+
so `error instanceof Error` was false and `String(error)` printed "[object Object]", which is what
|
|
104
|
+
a page rendering the error showed for an unreachable server or a CORS refusal. It is now the
|
|
105
|
+
`NetworkError` the transport threw, reading `NetworkError: fetch failed` with a stack. Its JSON is
|
|
106
|
+
the same `message`, `code`, `status`, `field`, `hint` and `details` as before; a test comparing
|
|
107
|
+
the error with `toEqual` against a plain object needs `{ ...error }`, since Vitest tells an Error
|
|
108
|
+
from one. Server refusals, client-side refusals (`Not authenticated`) and `reportThrown` follow
|
|
109
|
+
suit: `reportThrown` keeps an SDK error as it is and holds any other thrown value as the `cause`
|
|
110
|
+
of a `SupatypeError`.
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { AuthChangeEvent, AuthFlowType,
|
|
1
|
+
import type { AuthChangeEvent, AuthFlowType, AuthMFAChallengeResponse, AuthMFAEnrollResponse, AuthMFAListFactorsResponse, AuthStorage, OtpType, Session, SignInWithSSOCredentials, SignInWithSSOResult, User } from "./types.js";
|
|
2
2
|
import { type RequestTransport } from "./fetch-with-retry.js";
|
|
3
|
+
import { type Deferred } from "./runtime-env.js";
|
|
4
|
+
import { AuthRedirectError, SupatypeError } from "./errors.js";
|
|
3
5
|
export type AuthListener = (event: AuthChangeEvent, session: Session | null) => void;
|
|
4
6
|
interface AuthClientOptions {
|
|
5
7
|
initialSession?: Session | undefined;
|
|
@@ -17,9 +19,14 @@ interface AuthClientOptions {
|
|
|
17
19
|
/** Finish a sign-in carried by the page's URL on start (browser only). Default: true. */
|
|
18
20
|
detectSessionInUrl?: boolean | undefined;
|
|
19
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* What a SAML sign-in is remembered as: the `provider` of an `AuthRedirectError` the auth server
|
|
24
|
+
* sent back in the URL for a sign-in `signInWithSSO` started.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SSO_PROVIDER = "sso";
|
|
20
27
|
export declare class AuthClient {
|
|
21
|
-
private readonly
|
|
22
|
-
private readonly
|
|
28
|
+
private readonly urlSource;
|
|
29
|
+
private readonly baseHeadersSource;
|
|
23
30
|
private currentSession;
|
|
24
31
|
private readonly listeners;
|
|
25
32
|
private listenerIdCounter;
|
|
@@ -45,7 +52,15 @@ export declare class AuthClient {
|
|
|
45
52
|
private refreshInFlight;
|
|
46
53
|
/** In-memory PKCE code_verifier for the in-flight OAuth / OTP redirect. */
|
|
47
54
|
private codeVerifier;
|
|
48
|
-
|
|
55
|
+
/**
|
|
56
|
+
* `url` and `baseHeaders` may be functions, read for each request. `createClient` passes
|
|
57
|
+
* functions, so a client made before the page has said where the API is fails only at a request.
|
|
58
|
+
*/
|
|
59
|
+
constructor(url: Deferred<string>, baseHeaders: Deferred<Record<string, string>>, opts?: AuthClientOptions);
|
|
60
|
+
/** The auth address, read now. */
|
|
61
|
+
private get url();
|
|
62
|
+
/** The anon headers every auth request starts from, read now. */
|
|
63
|
+
private get baseHeaders();
|
|
49
64
|
/** The session the client starts with: the one passed in, else the persisted one. */
|
|
50
65
|
private loadInitialSession;
|
|
51
66
|
/** Resolves when the client has its starting session (storage hydrated, any URL sign-in done). */
|
|
@@ -152,6 +167,22 @@ export declare class AuthClient {
|
|
|
152
167
|
};
|
|
153
168
|
error: SupatypeError | null;
|
|
154
169
|
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Sign in with SAML single sign-on, through the identity provider registered for the user's email
|
|
172
|
+
* domain, or one named by its ID.
|
|
173
|
+
*
|
|
174
|
+
* Asks `POST /sso` for the identity provider's URL and sends the browser there, unless
|
|
175
|
+
* `skipBrowserRedirect` is set or there is no browser. The identity provider returns the user to
|
|
176
|
+
* the auth server, which sends them on to `redirectTo`; the client finishes the sign-in on start,
|
|
177
|
+
* as it does for OAuth. A refusal (no provider for the domain, a disabled one) is returned and the
|
|
178
|
+
* page stays put.
|
|
179
|
+
*
|
|
180
|
+
* PKCE by default (`flowType`), unlike `signInWithOAuth`: the sign-in comes back as a `?code=`
|
|
181
|
+
* this browser exchanges with its stored verifier.
|
|
182
|
+
*/
|
|
183
|
+
signInWithSSO(params: SignInWithSSOCredentials): Promise<SignInWithSSOResult>;
|
|
184
|
+
/** The `/sso` body: the domain or the provider's ID, the caller's options, and any PKCE challenge. */
|
|
185
|
+
private ssoRequestBody;
|
|
155
186
|
/**
|
|
156
187
|
* True only when the server's `/settings` list the provider as off. A provider they do not list
|
|
157
188
|
* (a `custom:` one) or settings that cannot be read leave the decision to `/authorize`. Looked up
|
|
@@ -174,8 +205,8 @@ export declare class AuthClient {
|
|
|
174
205
|
}>;
|
|
175
206
|
/**
|
|
176
207
|
* Exchange a PKCE auth code for a session (`POST /token?grant_type=pkce`).
|
|
177
|
-
* Requires a prior
|
|
178
|
-
* so the matching `code_verifier` is available in memory / storage.
|
|
208
|
+
* Requires a prior PKCE sign-in in this browser (`signInWithSSO`, or `signInWithOAuth` or OTP with
|
|
209
|
+
* `flowType: "pkce"`), so the matching `code_verifier` is available in memory / storage.
|
|
179
210
|
*/
|
|
180
211
|
exchangeCodeForSession(authCode: string): Promise<{
|
|
181
212
|
data: {
|
|
@@ -414,6 +445,10 @@ export declare class AuthClient {
|
|
|
414
445
|
private removeFlowItem;
|
|
415
446
|
/** Read a flow value once: the redirect it was kept for has now arrived. */
|
|
416
447
|
private takeFlowItem;
|
|
448
|
+
/**
|
|
449
|
+
* Start a PKCE flow: a fresh verifier, kept for the redirect, and the challenge parameters the
|
|
450
|
+
* auth server takes with it (as `/authorize` query parameters or `/sso` body fields).
|
|
451
|
+
*/
|
|
417
452
|
private beginPkce;
|
|
418
453
|
private readCodeVerifier;
|
|
419
454
|
private clearCodeVerifier;
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,WAAW,EAEX,OAAO,E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