@supabase/supabase-js 2.107.0-beta.0 → 2.107.0-canary.0
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/index.cjs +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +9 -9
- package/package.json +6 -6
- package/src/lib/constants.ts +13 -1
- package/src/lib/types.ts +5 -12
- 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.107.0-
|
|
3
|
+
"version": "2.107.0-canary.0",
|
|
4
4
|
"description": "Isomorphic Javascript SDK for Supabase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"directory": "packages/core/supabase-js"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@supabase/
|
|
63
|
-
"@supabase/
|
|
64
|
-
"@supabase/
|
|
65
|
-
"@supabase/postgrest-js": "2.107.0-
|
|
66
|
-
"@supabase/
|
|
62
|
+
"@supabase/functions-js": "2.107.0-canary.0",
|
|
63
|
+
"@supabase/auth-js": "2.107.0-canary.0",
|
|
64
|
+
"@supabase/storage-js": "2.107.0-canary.0",
|
|
65
|
+
"@supabase/postgrest-js": "2.107.0-canary.0",
|
|
66
|
+
"@supabase/realtime-js": "2.107.0-canary.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@arethetypeswrong/cli": "^0.18.2",
|
package/src/lib/constants.ts
CHANGED
|
@@ -4,18 +4,30 @@ import { SupabaseAuthClientOptions, TracePropagationOptions } from './types'
|
|
|
4
4
|
import { version } from './version'
|
|
5
5
|
|
|
6
6
|
let JS_ENV = ''
|
|
7
|
+
let JS_RUNTIME_VERSION: string | undefined
|
|
7
8
|
// @ts-ignore
|
|
8
9
|
if (typeof Deno !== 'undefined') {
|
|
9
10
|
JS_ENV = 'deno'
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
JS_RUNTIME_VERSION = Deno.version?.deno
|
|
10
13
|
} else if (typeof document !== 'undefined') {
|
|
11
14
|
JS_ENV = 'web'
|
|
12
15
|
} else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
|
13
16
|
JS_ENV = 'react-native'
|
|
14
17
|
} else {
|
|
15
18
|
JS_ENV = 'node'
|
|
19
|
+
JS_RUNTIME_VERSION =
|
|
20
|
+
typeof process !== 'undefined' ? process.version?.replace(/^v/, '') : undefined
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
const _runtimeMeta = [`runtime=${JS_ENV}`]
|
|
24
|
+
if (JS_RUNTIME_VERSION) {
|
|
25
|
+
_runtimeMeta.push(`runtime-version=${JS_RUNTIME_VERSION}`)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const DEFAULT_HEADERS = {
|
|
29
|
+
'X-Client-Info': `supabase-js/${version}; ${_runtimeMeta.join('; ')}`,
|
|
30
|
+
}
|
|
19
31
|
|
|
20
32
|
export const DEFAULT_GLOBAL_OPTIONS = {
|
|
21
33
|
headers: DEFAULT_HEADERS,
|
package/src/lib/types.ts
CHANGED
|
@@ -182,14 +182,9 @@ export type SupabaseClientOptions<SchemaName> = {
|
|
|
182
182
|
*/
|
|
183
183
|
debug?: SupabaseAuthClientOptions['debug']
|
|
184
184
|
/**
|
|
185
|
-
* Provide your own locking mechanism based on the environment. By default
|
|
186
|
-
* the auth client coordinates refreshes itself and the server resolves
|
|
187
|
-
* cross-tab races. Passing a custom `lock` opts into a legacy path that
|
|
188
|
-
* wraps every auth operation in your supplied lock.
|
|
185
|
+
* Provide your own locking mechanism based on the environment. By default no locking is done at this time.
|
|
189
186
|
*
|
|
190
|
-
* @
|
|
191
|
-
* The legacy lock path will be removed in v3 — drop this option from your
|
|
192
|
-
* `createClient` options before upgrading.
|
|
187
|
+
* @experimental
|
|
193
188
|
*/
|
|
194
189
|
lock?: SupabaseAuthClientOptions['lock']
|
|
195
190
|
/**
|
|
@@ -205,13 +200,11 @@ export type SupabaseClientOptions<SchemaName> = {
|
|
|
205
200
|
*/
|
|
206
201
|
experimental?: SupabaseAuthClientOptions['experimental']
|
|
207
202
|
/**
|
|
208
|
-
* Maximum time in milliseconds to wait
|
|
209
|
-
*
|
|
203
|
+
* Maximum time in milliseconds to wait when acquiring the auth lock before
|
|
204
|
+
* stealing it from the previous holder. See `GoTrueClientOptions.lockAcquireTimeout`
|
|
205
|
+
* for full semantics (zero fails immediately, negative waits indefinitely).
|
|
210
206
|
*
|
|
211
207
|
* @default 5000
|
|
212
|
-
*
|
|
213
|
-
* @deprecated Only used by the legacy lock path. Will be removed in v3
|
|
214
|
-
* along with the `lock` option.
|
|
215
208
|
*/
|
|
216
209
|
lockAcquireTimeout?: SupabaseAuthClientOptions['lockAcquireTimeout']
|
|
217
210
|
/**
|
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.107.0-
|
|
7
|
+
export const version = '2.107.0-canary.0'
|