@supabase/supabase-js 2.100.0-rc.0 → 2.100.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/dist/cors.cjs +1 -1
- package/dist/cors.cjs.map +1 -1
- package/dist/cors.d.cts +1 -1
- package/dist/cors.d.mts +1 -1
- package/dist/cors.mjs +1 -1
- package/dist/cors.mjs.map +1 -1
- package/dist/index.cjs +29 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +32 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +29 -2
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +9 -9
- package/package.json +7 -7
- package/src/SupabaseClient.ts +27 -0
- package/src/cors.ts +1 -1
- package/src/index.ts +1 -1
- package/src/lib/types.ts +4 -4
- package/src/lib/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/supabase-js",
|
|
3
|
-
"version": "2.100.
|
|
3
|
+
"version": "2.100.1",
|
|
4
4
|
"description": "Isomorphic Javascript SDK for Supabase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"test:unit": "jest --runInBand --detectOpenHandles test/unit",
|
|
58
58
|
"test:coverage": "jest --runInBand --coverage --testPathIgnorePatterns=\"test/integration|test/deno\"",
|
|
59
59
|
"test:integration": "jest --runInBand --detectOpenHandles test/integration.test.ts",
|
|
60
|
-
"test:integration:browser": "deno test --allow-all test/integration.browser.test.ts",
|
|
60
|
+
"test:integration:browser": "deno test --node-modules-dir=manual --allow-all test/integration.browser.test.ts",
|
|
61
61
|
"test:edge-functions": "cd test/deno && npm run test:edge-functions",
|
|
62
62
|
"test:deno": "cd test/deno && npm run test",
|
|
63
63
|
"test:watch": "jest --watch --verbose false --silent false",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"update:test-deps:bun": "cd test/integration/bun && bun install"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@supabase/auth-js": "2.100.
|
|
84
|
-
"@supabase/functions-js": "2.100.
|
|
85
|
-
"@supabase/postgrest-js": "2.100.
|
|
86
|
-
"@supabase/realtime-js": "2.100.
|
|
87
|
-
"@supabase/storage-js": "2.100.
|
|
83
|
+
"@supabase/auth-js": "2.100.1",
|
|
84
|
+
"@supabase/functions-js": "2.100.1",
|
|
85
|
+
"@supabase/postgrest-js": "2.100.1",
|
|
86
|
+
"@supabase/realtime-js": "2.100.1",
|
|
87
|
+
"@supabase/storage-js": "2.100.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"jsr": "^0.13.5",
|
package/src/SupabaseClient.ts
CHANGED
|
@@ -481,6 +481,13 @@ export default class SupabaseClient<
|
|
|
481
481
|
|
|
482
482
|
/**
|
|
483
483
|
* Returns all Realtime channels.
|
|
484
|
+
*
|
|
485
|
+
* @category Initializing
|
|
486
|
+
*
|
|
487
|
+
* @example Get all channels
|
|
488
|
+
* ```js
|
|
489
|
+
* const channels = supabase.getChannels()
|
|
490
|
+
* ```
|
|
484
491
|
*/
|
|
485
492
|
getChannels(): RealtimeChannel[] {
|
|
486
493
|
return this.realtime.getChannels()
|
|
@@ -491,6 +498,16 @@ export default class SupabaseClient<
|
|
|
491
498
|
*
|
|
492
499
|
* @param {RealtimeChannel} channel - The name of the Realtime channel.
|
|
493
500
|
*
|
|
501
|
+
*
|
|
502
|
+
* @category Initializing
|
|
503
|
+
*
|
|
504
|
+
* @remarks
|
|
505
|
+
* - Removing a channel is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.
|
|
506
|
+
*
|
|
507
|
+
* @example Removes a channel
|
|
508
|
+
* ```js
|
|
509
|
+
* supabase.removeChannel(myChannel)
|
|
510
|
+
* ```
|
|
494
511
|
*/
|
|
495
512
|
removeChannel(channel: RealtimeChannel): Promise<'ok' | 'timed out' | 'error'> {
|
|
496
513
|
return this.realtime.removeChannel(channel)
|
|
@@ -498,6 +515,16 @@ export default class SupabaseClient<
|
|
|
498
515
|
|
|
499
516
|
/**
|
|
500
517
|
* Unsubscribes and removes all Realtime channels from Realtime client.
|
|
518
|
+
*
|
|
519
|
+
* @category Initializing
|
|
520
|
+
*
|
|
521
|
+
* @remarks
|
|
522
|
+
* - Removing channels is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.
|
|
523
|
+
*
|
|
524
|
+
* @example Remove all channels
|
|
525
|
+
* ```js
|
|
526
|
+
* supabase.removeAllChannels()
|
|
527
|
+
* ```
|
|
501
528
|
*/
|
|
502
529
|
removeAllChannels(): Promise<('ok' | 'timed out' | 'error')[]> {
|
|
503
530
|
return this.realtime.removeAllChannels()
|
package/src/cors.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type CorsHeaders = Record<string, string>
|
|
|
52
52
|
* Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.
|
|
53
53
|
* Use this for simple CORS configurations with wildcard origin.
|
|
54
54
|
*
|
|
55
|
-
* @example
|
|
55
|
+
* @example Basic usage
|
|
56
56
|
* ```typescript
|
|
57
57
|
* import { corsHeaders } from '@supabase/supabase-js/cors'
|
|
58
58
|
*
|
package/src/index.ts
CHANGED
package/src/lib/types.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type SupabaseClientOptions<SchemaName> = {
|
|
|
35
35
|
* Optional timeout in milliseconds for PostgREST requests.
|
|
36
36
|
* When set, requests will automatically abort after this duration to prevent indefinite hangs.
|
|
37
37
|
*
|
|
38
|
-
* @example
|
|
38
|
+
* @example With timeout
|
|
39
39
|
* ```ts
|
|
40
40
|
* const supabase = createClient(url, key, {
|
|
41
41
|
* db: { timeout: 30000 } // 30 second timeout
|
|
@@ -48,7 +48,7 @@ export type SupabaseClientOptions<SchemaName> = {
|
|
|
48
48
|
* Defaults to 8000 characters. Used to provide helpful hints when URLs
|
|
49
49
|
* exceed server limits.
|
|
50
50
|
*
|
|
51
|
-
* @example
|
|
51
|
+
* @example With custom URL length limit
|
|
52
52
|
* ```ts
|
|
53
53
|
* const supabase = createClient(url, key, {
|
|
54
54
|
* db: { urlLengthLimit: 10000 } // Custom limit
|
|
@@ -82,7 +82,7 @@ export type SupabaseClientOptions<SchemaName> = {
|
|
|
82
82
|
* also return access_token in the URL fragment, which would otherwise be incorrectly
|
|
83
83
|
* intercepted by Supabase Auth.
|
|
84
84
|
*
|
|
85
|
-
* @example
|
|
85
|
+
* @example With custom detection logic
|
|
86
86
|
* ```ts
|
|
87
87
|
* detectSessionInUrl: (url, params) => {
|
|
88
88
|
* // Ignore Facebook OAuth redirects
|
|
@@ -165,7 +165,7 @@ export type QueryError = PostgrestError
|
|
|
165
165
|
* Strips internal Supabase metadata from Database types.
|
|
166
166
|
* Useful for libraries defining generic constraints on Database types.
|
|
167
167
|
*
|
|
168
|
-
* @example
|
|
168
|
+
* @example Stripping internal Supabase metadata
|
|
169
169
|
* ```typescript
|
|
170
170
|
* type CleanDB = DatabaseWithoutInternals<Database>
|
|
171
171
|
* ```
|
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.100.
|
|
7
|
+
export const version = '2.100.1'
|