@supabase/supabase-js 3.0.0-next.1 → 3.0.0-next.11
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/README.md +4 -4
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +16 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +14 -12
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +8 -8
- package/package.json +6 -6
- package/src/SupabaseClient.ts +11 -8
- package/src/index.ts +1 -1
- package/src/lib/types.ts +7 -0
- package/src/lib/version.ts +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Then you're able to import the library and establish the connection with the dat
|
|
|
44
44
|
import { createClient } from '@supabase/supabase-js'
|
|
45
45
|
|
|
46
46
|
// Create a single supabase client for interacting with your database
|
|
47
|
-
const supabase = createClient('https://xyzcompany.supabase.co', '
|
|
47
|
+
const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### UMD
|
|
@@ -66,7 +66,7 @@ Then you can use it from a global `supabase` variable:
|
|
|
66
66
|
```html
|
|
67
67
|
<script>
|
|
68
68
|
const { createClient } = supabase
|
|
69
|
-
const _supabase = createClient('https://xyzcompany.supabase.co', '
|
|
69
|
+
const _supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
70
70
|
|
|
71
71
|
console.log('Supabase Instance: ', _supabase)
|
|
72
72
|
// ...
|
|
@@ -80,7 +80,7 @@ You can use `<script type="module">` to import supabase-js from CDNs, like:
|
|
|
80
80
|
```html
|
|
81
81
|
<script type="module">
|
|
82
82
|
import { createClient } from 'https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm'
|
|
83
|
-
const supabase = createClient('https://xyzcompany.supabase.co', '
|
|
83
|
+
const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
84
84
|
|
|
85
85
|
console.log('Supabase Instance: ', supabase)
|
|
86
86
|
// ...
|
|
@@ -103,7 +103,7 @@ import { createClient } from 'jsr:@supabase/supabase-js@2'
|
|
|
103
103
|
import { createClient } from '@supabase/supabase-js'
|
|
104
104
|
|
|
105
105
|
// Provide a custom `fetch` implementation as an option
|
|
106
|
-
const supabase = createClient('https://xyzcompany.supabase.co', '
|
|
106
|
+
const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
107
107
|
global: {
|
|
108
108
|
fetch: (...args) => fetch(...args),
|
|
109
109
|
},
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ let __supabase_storage_js = require("@supabase/storage-js");
|
|
|
5
5
|
let __supabase_auth_js = require("@supabase/auth-js");
|
|
6
6
|
|
|
7
7
|
//#region src/lib/version.ts
|
|
8
|
-
const version = "3.0.0-next.
|
|
8
|
+
const version = "3.0.0-next.11";
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/lib/constants.ts
|
|
@@ -189,7 +189,7 @@ var SupabaseClient = class {
|
|
|
189
189
|
* import { createClient } from '@supabase/supabase-js'
|
|
190
190
|
*
|
|
191
191
|
* // Create a single supabase client for interacting with your database
|
|
192
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
192
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
193
193
|
* ```
|
|
194
194
|
*
|
|
195
195
|
* @example With a custom domain
|
|
@@ -197,7 +197,7 @@ var SupabaseClient = class {
|
|
|
197
197
|
* import { createClient } from '@supabase/supabase-js'
|
|
198
198
|
*
|
|
199
199
|
* // Use a custom domain as the supabase URL
|
|
200
|
-
* const supabase = createClient('https://my-custom-domain.com', 'publishable-
|
|
200
|
+
* const supabase = createClient('https://my-custom-domain.com', 'your-publishable-key')
|
|
201
201
|
* ```
|
|
202
202
|
*
|
|
203
203
|
* @example With additional parameters
|
|
@@ -217,7 +217,7 @@ var SupabaseClient = class {
|
|
|
217
217
|
* headers: { 'x-my-custom-header': 'my-app-name' },
|
|
218
218
|
* },
|
|
219
219
|
* }
|
|
220
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
220
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", options)
|
|
221
221
|
* ```
|
|
222
222
|
*
|
|
223
223
|
* @exampleDescription With custom schemas
|
|
@@ -230,7 +230,7 @@ var SupabaseClient = class {
|
|
|
230
230
|
* ```js
|
|
231
231
|
* import { createClient } from '@supabase/supabase-js'
|
|
232
232
|
*
|
|
233
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
233
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
234
234
|
* // Provide a custom schema. Defaults to "public".
|
|
235
235
|
* db: { schema: 'other_schema' }
|
|
236
236
|
* })
|
|
@@ -245,7 +245,7 @@ var SupabaseClient = class {
|
|
|
245
245
|
* ```js
|
|
246
246
|
* import { createClient } from '@supabase/supabase-js'
|
|
247
247
|
*
|
|
248
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
248
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
249
249
|
* global: { fetch: fetch.bind(globalThis) }
|
|
250
250
|
* })
|
|
251
251
|
* ```
|
|
@@ -259,7 +259,7 @@ var SupabaseClient = class {
|
|
|
259
259
|
* import { createClient } from '@supabase/supabase-js'
|
|
260
260
|
* import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
261
261
|
*
|
|
262
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
262
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
|
|
263
263
|
* auth: {
|
|
264
264
|
* storage: AsyncStorage,
|
|
265
265
|
* autoRefreshToken: true,
|
|
@@ -336,7 +336,7 @@ var SupabaseClient = class {
|
|
|
336
336
|
* }
|
|
337
337
|
* }
|
|
338
338
|
*
|
|
339
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
339
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
|
|
340
340
|
* auth: {
|
|
341
341
|
* storage: new LargeSecureStore(),
|
|
342
342
|
* autoRefreshToken: true,
|
|
@@ -350,7 +350,7 @@ var SupabaseClient = class {
|
|
|
350
350
|
* ```ts
|
|
351
351
|
* import { createClient } from '@supabase/supabase-js'
|
|
352
352
|
*
|
|
353
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
353
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
354
354
|
*
|
|
355
355
|
* const { data } = await supabase.from('profiles').select('*')
|
|
356
356
|
* ```
|
|
@@ -388,7 +388,8 @@ var SupabaseClient = class {
|
|
|
388
388
|
this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch);
|
|
389
389
|
this.realtime = this._initRealtimeClient(_objectSpread2({
|
|
390
390
|
headers: this.headers,
|
|
391
|
-
accessToken: this._getAccessToken.bind(this)
|
|
391
|
+
accessToken: this._getAccessToken.bind(this),
|
|
392
|
+
fetch: this.fetch
|
|
392
393
|
}, settings.realtime));
|
|
393
394
|
if (this.accessToken) Promise.resolve(this.accessToken()).then((token) => this.realtime.setAuth(token)).catch((e) => console.warn("Failed to set initial Realtime auth token:", e));
|
|
394
395
|
this.rest = new __supabase_postgrest_js.PostgrestClient(new URL("rest/v1", baseUrl).href, {
|
|
@@ -523,7 +524,7 @@ var SupabaseClient = class {
|
|
|
523
524
|
const { data } = await _this.auth.getSession();
|
|
524
525
|
return (_data$session$access_ = (_data$session = data.session) === null || _data$session === void 0 ? void 0 : _data$session.access_token) !== null && _data$session$access_ !== void 0 ? _data$session$access_ : _this.supabaseKey;
|
|
525
526
|
}
|
|
526
|
-
_initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, userStorage, storageKey, flowType, lock, debug, throwOnError }, headers, fetch$1) {
|
|
527
|
+
_initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, userStorage, storageKey, flowType, lock, debug, throwOnError, experimental }, headers, fetch$1) {
|
|
527
528
|
const authHeaders = {
|
|
528
529
|
Authorization: `Bearer ${this.supabaseKey}`,
|
|
529
530
|
apikey: `${this.supabaseKey}`
|
|
@@ -541,6 +542,7 @@ var SupabaseClient = class {
|
|
|
541
542
|
lock,
|
|
542
543
|
debug,
|
|
543
544
|
throwOnError,
|
|
545
|
+
experimental,
|
|
544
546
|
fetch: fetch$1,
|
|
545
547
|
hasCustomAuthorizationHeader: Object.keys(this.headers).some((key) => key.toLowerCase() === "authorization")
|
|
546
548
|
});
|
|
@@ -574,7 +576,7 @@ var SupabaseClient = class {
|
|
|
574
576
|
* ```ts
|
|
575
577
|
* import { createClient } from '@supabase/supabase-js'
|
|
576
578
|
*
|
|
577
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
579
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
578
580
|
* const { data, error } = await supabase.from('profiles').select('*')
|
|
579
581
|
* ```
|
|
580
582
|
*/
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["DEFAULT_AUTH_OPTIONS: SupabaseAuthClientOptions","DEFAULT_REALTIME_OPTIONS: RealtimeClientOptions","fetch","DEFAULT_DB_OPTIONS","DEFAULT_AUTH_OPTIONS","DEFAULT_REALTIME_OPTIONS","DEFAULT_GLOBAL_OPTIONS","result: Required<SupabaseClientOptions<SchemaName>>","AuthClient","supabaseUrl: string","supabaseKey: string","PostgrestClient","SupabaseStorageClient","FunctionsClient","this","RealtimeClient"],"sources":["../src/lib/version.ts","../src/lib/constants.ts","../src/lib/fetch.ts","../src/lib/helpers.ts","../src/lib/SupabaseAuthClient.ts","../src/SupabaseClient.ts","../src/index.ts"],"sourcesContent":["// Generated automatically during releases by scripts/update-version-files.ts\n// This file provides runtime access to the package version for:\n// - HTTP request headers (e.g., X-Client-Info header for API requests)\n// - Debugging and support (identifying which version is running)\n// - Telemetry and logging (version reporting in errors/analytics)\n// - Ensuring build artifacts match the published package version\nexport const version = '3.0.0-next.1'\n","// constants.ts\nimport { RealtimeClientOptions } from '@supabase/realtime-js'\nimport { SupabaseAuthClientOptions } from './types'\nimport { version } from './version'\n\nlet JS_ENV = ''\n// @ts-ignore\nif (typeof Deno !== 'undefined') {\n JS_ENV = 'deno'\n} else if (typeof document !== 'undefined') {\n JS_ENV = 'web'\n} else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n JS_ENV = 'react-native'\n} else {\n JS_ENV = 'node'\n}\n\nexport const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version}` }\n\nexport const DEFAULT_GLOBAL_OPTIONS = {\n headers: DEFAULT_HEADERS,\n}\n\nexport const DEFAULT_DB_OPTIONS = {\n schema: 'public',\n}\n\nexport const DEFAULT_AUTH_OPTIONS: SupabaseAuthClientOptions = {\n autoRefreshToken: true,\n persistSession: true,\n detectSessionInUrl: true,\n flowType: 'implicit',\n}\n\nexport const DEFAULT_REALTIME_OPTIONS: RealtimeClientOptions = {}\n","type Fetch = typeof fetch\n\nexport const resolveFetch = (customFetch?: Fetch): Fetch => {\n if (customFetch) {\n return (...args: Parameters<Fetch>) => customFetch(...args)\n }\n return (...args: Parameters<Fetch>) => fetch(...args)\n}\n\nexport const resolveHeadersConstructor = () => {\n return Headers\n}\n\nexport const fetchWithAuth = (\n supabaseKey: string,\n getAccessToken: () => Promise<string | null>,\n customFetch?: Fetch\n): Fetch => {\n const fetch = resolveFetch(customFetch)\n const HeadersConstructor = resolveHeadersConstructor()\n\n return async (input, init) => {\n const accessToken = (await getAccessToken()) ?? supabaseKey\n let headers = new HeadersConstructor(init?.headers)\n\n if (!headers.has('apikey')) {\n headers.set('apikey', supabaseKey)\n }\n\n if (!headers.has('Authorization')) {\n headers.set('Authorization', `Bearer ${accessToken}`)\n }\n\n return fetch(input, { ...init, headers })\n }\n}\n","// helpers.ts\nimport { SupabaseClientOptions } from './types'\n\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n}\n\nexport function ensureTrailingSlash(url: string): string {\n return url.endsWith('/') ? url : url + '/'\n}\n\nexport const isBrowser = () => typeof window !== 'undefined'\n\nexport function applySettingDefaults<\n Database = any,\n SchemaName extends string & keyof Database = 'public' extends keyof Database\n ? 'public'\n : string & keyof Database,\n>(\n options: SupabaseClientOptions<SchemaName>,\n defaults: SupabaseClientOptions<any>\n): Required<SupabaseClientOptions<SchemaName>> {\n const {\n db: dbOptions,\n auth: authOptions,\n realtime: realtimeOptions,\n global: globalOptions,\n } = options\n const {\n db: DEFAULT_DB_OPTIONS,\n auth: DEFAULT_AUTH_OPTIONS,\n realtime: DEFAULT_REALTIME_OPTIONS,\n global: DEFAULT_GLOBAL_OPTIONS,\n } = defaults\n\n const result: Required<SupabaseClientOptions<SchemaName>> = {\n db: {\n ...DEFAULT_DB_OPTIONS,\n ...dbOptions,\n },\n auth: {\n ...DEFAULT_AUTH_OPTIONS,\n ...authOptions,\n },\n realtime: {\n ...DEFAULT_REALTIME_OPTIONS,\n ...realtimeOptions,\n },\n storage: {},\n global: {\n ...DEFAULT_GLOBAL_OPTIONS,\n ...globalOptions,\n headers: {\n ...(DEFAULT_GLOBAL_OPTIONS?.headers ?? {}),\n ...(globalOptions?.headers ?? {}),\n },\n },\n accessToken: async () => '',\n }\n\n if (options.accessToken) {\n result.accessToken = options.accessToken\n } else {\n // hack around Required<>\n delete (result as any).accessToken\n }\n\n return result\n}\n\n/**\n * Validates a Supabase client URL\n *\n * @param {string} supabaseUrl - The Supabase client URL string.\n * @returns {URL} - The validated base URL.\n * @throws {Error}\n */\nexport function validateSupabaseUrl(supabaseUrl: string): URL {\n const trimmedUrl = supabaseUrl?.trim()\n\n if (!trimmedUrl) {\n throw new Error('supabaseUrl is required.')\n }\n\n if (!trimmedUrl.match(/^https?:\\/\\//i)) {\n throw new Error('Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.')\n }\n\n try {\n return new URL(ensureTrailingSlash(trimmedUrl))\n } catch {\n throw Error('Invalid supabaseUrl: Provided URL is malformed.')\n }\n}\n","import { AuthClient } from '@supabase/auth-js'\nimport { SupabaseAuthClientOptions } from './types'\n\nexport class SupabaseAuthClient extends AuthClient {\n constructor(options: SupabaseAuthClientOptions) {\n super(options)\n }\n}\n","import type { AuthChangeEvent } from '@supabase/auth-js'\nimport { FunctionsClient } from '@supabase/functions-js'\nimport {\n PostgrestClient,\n type PostgrestFilterBuilder,\n type PostgrestQueryBuilder,\n} from '@supabase/postgrest-js'\nimport {\n type RealtimeChannel,\n type RealtimeChannelOptions,\n RealtimeClient,\n type RealtimeClientOptions,\n} from '@supabase/realtime-js'\nimport { StorageClient as SupabaseStorageClient } from '@supabase/storage-js'\nimport {\n DEFAULT_AUTH_OPTIONS,\n DEFAULT_DB_OPTIONS,\n DEFAULT_GLOBAL_OPTIONS,\n DEFAULT_REALTIME_OPTIONS,\n} from './lib/constants'\nimport { fetchWithAuth } from './lib/fetch'\nimport { applySettingDefaults, validateSupabaseUrl } from './lib/helpers'\nimport { SupabaseAuthClient } from './lib/SupabaseAuthClient'\nimport type {\n Fetch,\n GenericSchema,\n SupabaseAuthClientOptions,\n SupabaseClientOptions,\n} from './lib/types'\nimport { GetRpcFunctionFilterBuilderByArgs } from './lib/rest/types/common/rpc'\n\n/**\n * Supabase Client.\n *\n * An isomorphic Javascript client for interacting with Postgres.\n */\nexport default class SupabaseClient<\n Database = any,\n // The second type parameter is also used for specifying db_schema, so we\n // support both cases.\n // TODO: Allow setting db_schema from ClientOptions.\n SchemaNameOrClientOptions extends\n | (string & keyof Omit<Database, '__InternalSupabase'>)\n | { PostgrestVersion: string } = 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Database, '__InternalSupabase'>,\n SchemaName extends string &\n keyof Omit<Database, '__InternalSupabase'> = SchemaNameOrClientOptions extends string &\n keyof Omit<Database, '__InternalSupabase'>\n ? SchemaNameOrClientOptions\n : 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Omit<Database, '__InternalSupabase'>, '__InternalSupabase'>,\n Schema extends Omit<Database, '__InternalSupabase'>[SchemaName] extends GenericSchema\n ? Omit<Database, '__InternalSupabase'>[SchemaName]\n : never = Omit<Database, '__InternalSupabase'>[SchemaName] extends GenericSchema\n ? Omit<Database, '__InternalSupabase'>[SchemaName]\n : never,\n ClientOptions extends { PostgrestVersion: string } = SchemaNameOrClientOptions extends string &\n keyof Omit<Database, '__InternalSupabase'>\n ? // If the version isn't explicitly set, look for it in the __InternalSupabase object to infer the right version\n Database extends { __InternalSupabase: { PostgrestVersion: string } }\n ? Database['__InternalSupabase']\n : // otherwise default to 12\n { PostgrestVersion: '12' }\n : SchemaNameOrClientOptions extends { PostgrestVersion: string }\n ? SchemaNameOrClientOptions\n : never,\n> {\n /**\n * Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies.\n */\n auth: SupabaseAuthClient\n realtime: RealtimeClient\n /**\n * Supabase Storage allows you to manage user-generated content, such as photos or videos.\n */\n storage: SupabaseStorageClient\n\n protected realtimeUrl: URL\n protected authUrl: URL\n protected storageUrl: URL\n protected functionsUrl: URL\n protected rest: PostgrestClient<Database, ClientOptions, SchemaName>\n protected storageKey: string\n protected fetch?: Fetch\n protected changedAccessToken?: string\n protected accessToken?: () => Promise<string | null>\n\n protected headers: Record<string, string>\n\n /**\n * Create a new client for use in the browser.\n *\n * @category Initializing\n *\n * @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.\n * @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.\n * @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.\n * @param options.auth.autoRefreshToken Set to \"true\" if you want to automatically refresh the token before expiring.\n * @param options.auth.persistSession Set to \"true\" if you want to automatically save the user session into local storage.\n * @param options.auth.detectSessionInUrl Set to \"true\" if you want to automatically detects OAuth grants in the URL and signs in the user.\n * @param options.realtime Options passed along to realtime-js constructor.\n * @param options.storage Options passed along to the storage-js constructor.\n * @param options.global.fetch A custom fetch implementation.\n * @param options.global.headers Any additional headers to send with each network request.\n *\n * @example Creating a client\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * // Create a single supabase client for interacting with your database\n * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')\n * ```\n *\n * @example With a custom domain\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * // Use a custom domain as the supabase URL\n * const supabase = createClient('https://my-custom-domain.com', 'publishable-or-anon-key')\n * ```\n *\n * @example With additional parameters\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * const options = {\n * db: {\n * schema: 'public',\n * },\n * auth: {\n * autoRefreshToken: true,\n * persistSession: true,\n * detectSessionInUrl: true\n * },\n * global: {\n * headers: { 'x-my-custom-header': 'my-app-name' },\n * },\n * }\n * const supabase = createClient(\"https://xyzcompany.supabase.co\", \"publishable-or-anon-key\", options)\n * ```\n *\n * @exampleDescription With custom schemas\n * By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.\n * Go to [Settings > API > Exposed schemas](/dashboard/project/_/settings/api) and add the schema which you want to expose to the API.\n *\n * Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema.\n *\n * @example With custom schemas\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key', {\n * // Provide a custom schema. Defaults to \"public\".\n * db: { schema: 'other_schema' }\n * })\n * ```\n *\n * @exampleDescription Custom fetch implementation\n * `supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,\n * but an alternative `fetch` implementation can be provided as an option.\n * This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers).\n *\n * @example Custom fetch implementation\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key', {\n * global: { fetch: fetch.bind(globalThis) }\n * })\n * ```\n *\n * @exampleDescription React Native options with AsyncStorage\n * For React Native we recommend using `AsyncStorage` as the storage implementation for Supabase Auth.\n *\n * @example React Native options with AsyncStorage\n * ```js\n * import 'react-native-url-polyfill/auto'\n * import { createClient } from '@supabase/supabase-js'\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n *\n * const supabase = createClient(\"https://xyzcompany.supabase.co\", \"publishable-or-anon-key\", {\n * auth: {\n * storage: AsyncStorage,\n * autoRefreshToken: true,\n * persistSession: true,\n * detectSessionInUrl: false,\n * },\n * });\n * ```\n *\n * @exampleDescription React Native options with Expo SecureStore\n * If you wish to encrypt the user's session information, you can use `aes-js` and store the encryption key in Expo SecureStore.\n * The `aes-js` library, a reputable JavaScript-only implementation of the AES encryption algorithm in CTR mode.\n * A new 256-bit encryption key is generated using the `react-native-get-random-values` library.\n * This key is stored inside Expo's SecureStore, while the value is encrypted and placed inside AsyncStorage.\n *\n * Please make sure that:\n * - You keep the `expo-secure-store`, `aes-js` and `react-native-get-random-values` libraries up-to-date.\n * - Choose the correct [`SecureStoreOptions`](https://docs.expo.dev/versions/latest/sdk/securestore/#securestoreoptions) for your app's needs.\n * E.g. [`SecureStore.WHEN_UNLOCKED`](https://docs.expo.dev/versions/latest/sdk/securestore/#securestorewhen_unlocked) regulates when the data can be accessed.\n * - Carefully consider optimizations or other modifications to the above example, as those can lead to introducing subtle security vulnerabilities.\n *\n * @example React Native options with Expo SecureStore\n * ```ts\n * import 'react-native-url-polyfill/auto'\n * import { createClient } from '@supabase/supabase-js'\n * import AsyncStorage from '@react-native-async-storage/async-storage';\n * import * as SecureStore from 'expo-secure-store';\n * import * as aesjs from 'aes-js';\n * import 'react-native-get-random-values';\n *\n * // As Expo's SecureStore does not support values larger than 2048\n * // bytes, an AES-256 key is generated and stored in SecureStore, while\n * // it is used to encrypt/decrypt values stored in AsyncStorage.\n * class LargeSecureStore {\n * private async _encrypt(key: string, value: string) {\n * const encryptionKey = crypto.getRandomValues(new Uint8Array(256 / 8));\n *\n * const cipher = new aesjs.ModeOfOperation.ctr(encryptionKey, new aesjs.Counter(1));\n * const encryptedBytes = cipher.encrypt(aesjs.utils.utf8.toBytes(value));\n *\n * await SecureStore.setItemAsync(key, aesjs.utils.hex.fromBytes(encryptionKey));\n *\n * return aesjs.utils.hex.fromBytes(encryptedBytes);\n * }\n *\n * private async _decrypt(key: string, value: string) {\n * const encryptionKeyHex = await SecureStore.getItemAsync(key);\n * if (!encryptionKeyHex) {\n * return encryptionKeyHex;\n * }\n *\n * const cipher = new aesjs.ModeOfOperation.ctr(aesjs.utils.hex.toBytes(encryptionKeyHex), new aesjs.Counter(1));\n * const decryptedBytes = cipher.decrypt(aesjs.utils.hex.toBytes(value));\n *\n * return aesjs.utils.utf8.fromBytes(decryptedBytes);\n * }\n *\n * async getItem(key: string) {\n * const encrypted = await AsyncStorage.getItem(key);\n * if (!encrypted) { return encrypted; }\n *\n * return await this._decrypt(key, encrypted);\n * }\n *\n * async removeItem(key: string) {\n * await AsyncStorage.removeItem(key);\n * await SecureStore.deleteItemAsync(key);\n * }\n *\n * async setItem(key: string, value: string) {\n * const encrypted = await this._encrypt(key, value);\n *\n * await AsyncStorage.setItem(key, encrypted);\n * }\n * }\n *\n * const supabase = createClient(\"https://xyzcompany.supabase.co\", \"publishable-or-anon-key\", {\n * auth: {\n * storage: new LargeSecureStore(),\n * autoRefreshToken: true,\n * persistSession: true,\n * detectSessionInUrl: false,\n * },\n * });\n * ```\n *\n * @example With a database query\n * ```ts\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')\n *\n * const { data } = await supabase.from('profiles').select('*')\n * ```\n */\n constructor(\n protected supabaseUrl: string,\n protected supabaseKey: string,\n options?: SupabaseClientOptions<SchemaName>\n ) {\n const baseUrl = validateSupabaseUrl(supabaseUrl)\n if (!supabaseKey) throw new Error('supabaseKey is required.')\n\n this.realtimeUrl = new URL('realtime/v1', baseUrl)\n this.realtimeUrl.protocol = this.realtimeUrl.protocol.replace('http', 'ws')\n this.authUrl = new URL('auth/v1', baseUrl)\n this.storageUrl = new URL('storage/v1', baseUrl)\n this.functionsUrl = new URL('functions/v1', baseUrl)\n\n // default storage key uses the supabase project ref as a namespace\n const defaultStorageKey = `sb-${baseUrl.hostname.split('.')[0]}-auth-token`\n const DEFAULTS = {\n db: DEFAULT_DB_OPTIONS,\n realtime: DEFAULT_REALTIME_OPTIONS,\n auth: { ...DEFAULT_AUTH_OPTIONS, storageKey: defaultStorageKey },\n global: DEFAULT_GLOBAL_OPTIONS,\n }\n\n const settings = applySettingDefaults(options ?? {}, DEFAULTS)\n\n this.storageKey = settings.auth.storageKey ?? ''\n this.headers = settings.global.headers ?? {}\n\n if (!settings.accessToken) {\n this.auth = this._initSupabaseAuthClient(\n settings.auth ?? {},\n this.headers,\n settings.global.fetch\n )\n } else {\n this.accessToken = settings.accessToken\n\n this.auth = new Proxy<SupabaseAuthClient>({} as any, {\n get: (_, prop) => {\n throw new Error(\n `@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(\n prop\n )} is not possible`\n )\n },\n })\n }\n\n this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch)\n this.realtime = this._initRealtimeClient({\n headers: this.headers,\n accessToken: this._getAccessToken.bind(this),\n ...settings.realtime,\n })\n if (this.accessToken) {\n // Start auth immediately to avoid race condition with channel subscriptions\n // Wrap Promise to avoid Firefox extension cross-context Promise access errors\n Promise.resolve(this.accessToken())\n .then((token) => this.realtime.setAuth(token))\n .catch((e) => console.warn('Failed to set initial Realtime auth token:', e))\n }\n\n this.rest = new PostgrestClient(new URL('rest/v1', baseUrl).href, {\n headers: this.headers,\n schema: settings.db.schema,\n fetch: this.fetch,\n timeout: settings.db.timeout,\n urlLengthLimit: settings.db.urlLengthLimit,\n })\n\n this.storage = new SupabaseStorageClient(\n this.storageUrl.href,\n this.headers,\n this.fetch,\n options?.storage\n )\n\n if (!settings.accessToken) {\n this._listenForAuthEvents()\n }\n }\n\n /**\n * Supabase Functions allows you to deploy and invoke edge functions.\n */\n get functions(): FunctionsClient {\n return new FunctionsClient(this.functionsUrl.href, {\n headers: this.headers,\n customFetch: this.fetch,\n })\n }\n\n // NOTE: signatures must be kept in sync with PostgrestClient.from\n from<\n TableName extends string & keyof Schema['Tables'],\n Table extends Schema['Tables'][TableName],\n >(relation: TableName): PostgrestQueryBuilder<ClientOptions, Schema, Table, TableName>\n from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>(\n relation: ViewName\n ): PostgrestQueryBuilder<ClientOptions, Schema, View, ViewName>\n /**\n * Perform a query on a table or a view.\n *\n * @param relation - The table or view name to query\n */\n from(relation: string): PostgrestQueryBuilder<ClientOptions, Schema, any> {\n return this.rest.from(relation)\n }\n\n // NOTE: signatures must be kept in sync with PostgrestClient.schema\n /**\n * Select a schema to query or perform an function (rpc) call.\n *\n * The schema needs to be on the list of exposed schemas inside Supabase.\n *\n * @param schema - The schema to query\n */\n schema<DynamicSchema extends string & keyof Omit<Database, '__InternalSupabase'>>(\n schema: DynamicSchema\n ): PostgrestClient<\n Database,\n ClientOptions,\n DynamicSchema,\n Database[DynamicSchema] extends GenericSchema ? Database[DynamicSchema] : any\n > {\n return this.rest.schema<DynamicSchema>(schema)\n }\n\n // NOTE: signatures must be kept in sync with PostgrestClient.rpc\n /**\n * Perform a function call.\n *\n * @param fn - The function name to call\n * @param args - The arguments to pass to the function call\n * @param options - Named parameters\n * @param options.head - When set to `true`, `data` will not be returned.\n * Useful if you only need the count.\n * @param options.get - When set to `true`, the function will be called with\n * read-only access mode.\n * @param options.count - Count algorithm to use to count rows returned by the\n * function. Only applicable for [set-returning\n * functions](https://www.postgresql.org/docs/current/functions-srf.html).\n *\n * `\"exact\"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the\n * hood.\n *\n * `\"planned\"`: Approximated but fast count algorithm. Uses the Postgres\n * statistics under the hood.\n *\n * `\"estimated\"`: Uses exact count for low numbers and planned count for high\n * numbers.\n */\n rpc<\n FnName extends string & keyof Schema['Functions'],\n Args extends Schema['Functions'][FnName]['Args'] = never,\n FilterBuilder extends GetRpcFunctionFilterBuilderByArgs<\n Schema,\n FnName,\n Args\n > = GetRpcFunctionFilterBuilderByArgs<Schema, FnName, Args>,\n >(\n fn: FnName,\n args: Args = {} as Args,\n options: {\n head?: boolean\n get?: boolean\n count?: 'exact' | 'planned' | 'estimated'\n } = {\n head: false,\n get: false,\n count: undefined,\n }\n ): PostgrestFilterBuilder<\n ClientOptions,\n Schema,\n FilterBuilder['Row'],\n FilterBuilder['Result'],\n FilterBuilder['RelationName'],\n FilterBuilder['Relationships'],\n 'RPC'\n > {\n return this.rest.rpc(fn, args, options) as unknown as PostgrestFilterBuilder<\n ClientOptions,\n Schema,\n FilterBuilder['Row'],\n FilterBuilder['Result'],\n FilterBuilder['RelationName'],\n FilterBuilder['Relationships'],\n 'RPC'\n >\n }\n\n /**\n * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.\n *\n * @param {string} name - The name of the Realtime channel.\n * @param {Object} opts - The options to pass to the Realtime channel.\n *\n */\n channel(name: string, opts: RealtimeChannelOptions = { config: {} }): RealtimeChannel {\n return this.realtime.channel(name, opts)\n }\n\n /**\n * Returns all Realtime channels.\n *\n * @category Initializing\n *\n * @example Get all channels\n * ```js\n * const channels = supabase.getChannels()\n * ```\n */\n getChannels(): RealtimeChannel[] {\n return this.realtime.getChannels()\n }\n\n /**\n * Unsubscribes and removes Realtime channel from Realtime client.\n *\n * @param {RealtimeChannel} channel - The name of the Realtime channel.\n *\n *\n * @category Initializing\n *\n * @remarks\n * - 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.\n *\n * @example Removes a channel\n * ```js\n * supabase.removeChannel(myChannel)\n * ```\n */\n removeChannel(channel: RealtimeChannel): Promise<'ok' | 'timed out' | 'error'> {\n return this.realtime.removeChannel(channel)\n }\n\n /**\n * Unsubscribes and removes all Realtime channels from Realtime client.\n *\n * @category Initializing\n *\n * @remarks\n * - 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.\n *\n * @example Remove all channels\n * ```js\n * supabase.removeAllChannels()\n * ```\n */\n removeAllChannels(): Promise<('ok' | 'timed out' | 'error')[]> {\n return this.realtime.removeAllChannels()\n }\n\n private async _getAccessToken() {\n if (this.accessToken) {\n return await this.accessToken()\n }\n\n const { data } = await this.auth.getSession()\n\n return data.session?.access_token ?? this.supabaseKey\n }\n\n private _initSupabaseAuthClient(\n {\n autoRefreshToken,\n persistSession,\n detectSessionInUrl,\n storage,\n userStorage,\n storageKey,\n flowType,\n lock,\n debug,\n throwOnError,\n }: SupabaseAuthClientOptions,\n headers?: Record<string, string>,\n fetch?: Fetch\n ) {\n const authHeaders = {\n Authorization: `Bearer ${this.supabaseKey}`,\n apikey: `${this.supabaseKey}`,\n }\n return new SupabaseAuthClient({\n url: this.authUrl.href,\n headers: { ...authHeaders, ...headers },\n storageKey: storageKey,\n autoRefreshToken,\n persistSession,\n detectSessionInUrl,\n storage,\n userStorage,\n flowType,\n lock,\n debug,\n throwOnError,\n fetch,\n // auth checks if there is a custom authorizaiton header using this flag\n // so it knows whether to return an error when getUser is called with no session\n hasCustomAuthorizationHeader: Object.keys(this.headers).some(\n (key) => key.toLowerCase() === 'authorization'\n ),\n })\n }\n\n private _initRealtimeClient(options: RealtimeClientOptions) {\n return new RealtimeClient(this.realtimeUrl.href, {\n ...options,\n params: { ...{ apikey: this.supabaseKey }, ...options?.params },\n })\n }\n\n private _listenForAuthEvents() {\n const data = this.auth.onAuthStateChange((event, session) => {\n this._handleTokenChanged(event, 'CLIENT', session?.access_token)\n })\n return data\n }\n\n private _handleTokenChanged(\n event: AuthChangeEvent,\n source: 'CLIENT' | 'STORAGE',\n token?: string\n ) {\n if (\n (event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&\n this.changedAccessToken !== token\n ) {\n this.changedAccessToken = token\n this.realtime.setAuth(token)\n } else if (event === 'SIGNED_OUT') {\n this.realtime.setAuth()\n if (source == 'STORAGE') this.auth.signOut()\n this.changedAccessToken = undefined\n }\n }\n}\n","import SupabaseClient from './SupabaseClient'\nimport type { SupabaseClientOptions } from './lib/types'\n\nexport * from '@supabase/auth-js'\nexport type { User as AuthUser, Session as AuthSession } from '@supabase/auth-js'\nexport type {\n PostgrestResponse,\n PostgrestSingleResponse,\n PostgrestMaybeSingleResponse,\n PostgrestBuilder,\n PostgrestFilterBuilder,\n PostgrestTransformBuilder,\n PostgrestQueryBuilder,\n} from '@supabase/postgrest-js'\nexport { PostgrestError } from '@supabase/postgrest-js'\nexport { StorageApiError } from '@supabase/storage-js'\nexport type { FunctionInvokeOptions } from '@supabase/functions-js'\nexport {\n FunctionsHttpError,\n FunctionsFetchError,\n FunctionsRelayError,\n FunctionsError,\n FunctionRegion,\n} from '@supabase/functions-js'\nexport * from '@supabase/realtime-js'\nexport { default as SupabaseClient } from './SupabaseClient'\nexport type {\n SupabaseClientOptions,\n QueryResult,\n QueryData,\n QueryError,\n DatabaseWithoutInternals,\n} from './lib/types'\n\n/**\n * Creates a new Supabase Client.\n *\n * @example Creating a Supabase client\n * ```ts\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')\n * const { data, error } = await supabase.from('profiles').select('*')\n * ```\n */\nexport const createClient = <\n Database = any,\n SchemaNameOrClientOptions extends\n | (string & keyof Omit<Database, '__InternalSupabase'>)\n | { PostgrestVersion: string } = 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Database, '__InternalSupabase'>,\n SchemaName extends string &\n keyof Omit<Database, '__InternalSupabase'> = SchemaNameOrClientOptions extends string &\n keyof Omit<Database, '__InternalSupabase'>\n ? SchemaNameOrClientOptions\n : 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Omit<Database, '__InternalSupabase'>, '__InternalSupabase'>,\n>(\n supabaseUrl: string,\n supabaseKey: string,\n options?: SupabaseClientOptions<SchemaName>\n): SupabaseClient<Database, SchemaNameOrClientOptions, SchemaName> => {\n return new SupabaseClient<Database, SchemaNameOrClientOptions, SchemaName>(\n supabaseUrl,\n supabaseKey,\n options\n )\n}\n\n// Check for Node.js <= 18 deprecation\nfunction shouldShowDeprecationWarning(): boolean {\n // Skip in browser environments\n if (typeof window !== 'undefined') {\n return false\n }\n\n // Skip if process is not available (e.g., Edge Runtime)\n // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings\n const _process = (globalThis as any)['process']\n if (!_process) {\n return false\n }\n\n const processVersion = _process['version']\n if (processVersion === undefined || processVersion === null) {\n return false\n }\n\n const versionMatch = processVersion.match(/^v(\\d+)\\./)\n if (!versionMatch) {\n return false\n }\n\n const majorVersion = parseInt(versionMatch[1], 10)\n return majorVersion <= 18\n}\n\nif (shouldShowDeprecationWarning()) {\n console.warn(\n `⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. ` +\n `Please upgrade to Node.js 20 or later. ` +\n `For more information, visit: https://github.com/orgs/supabase/discussions/37217`\n )\n}\n"],"mappings":";;;;;;;AAMA,MAAa,UAAU;;;;ACDvB,IAAI,SAAS;AAEb,IAAI,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EFAULT_DB_OPTIONS","DEFAULT_AUTH_OPTIONS","DEFAULT_REALTIME_OPTIONS","DEFAULT_GLOBAL_OPTIONS","result: Required<SupabaseClientOptions<SchemaName>>","AuthClient","supabaseUrl: string","supabaseKey: string","PostgrestClient","SupabaseStorageClient","FunctionsClient","this","RealtimeClient"],"sources":["../src/lib/version.ts","../src/lib/constants.ts","../src/lib/fetch.ts","../src/lib/helpers.ts","../src/lib/SupabaseAuthClient.ts","../src/SupabaseClient.ts","../src/index.ts"],"sourcesContent":["// Generated automatically during releases by scripts/update-version-files.ts\n// This file provides runtime access to the package version for:\n// - HTTP request headers (e.g., X-Client-Info header for API requests)\n// - Debugging and support (identifying which version is running)\n// - Telemetry and logging (version reporting in errors/analytics)\n// - Ensuring build artifacts match the published package version\nexport const version = '3.0.0-next.11'\n","// constants.ts\nimport { RealtimeClientOptions } from '@supabase/realtime-js'\nimport { SupabaseAuthClientOptions } from './types'\nimport { version } from './version'\n\nlet JS_ENV = ''\n// @ts-ignore\nif (typeof Deno !== 'undefined') {\n JS_ENV = 'deno'\n} else if (typeof document !== 'undefined') {\n JS_ENV = 'web'\n} else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n JS_ENV = 'react-native'\n} else {\n JS_ENV = 'node'\n}\n\nexport const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version}` }\n\nexport const DEFAULT_GLOBAL_OPTIONS = {\n headers: DEFAULT_HEADERS,\n}\n\nexport const DEFAULT_DB_OPTIONS = {\n schema: 'public',\n}\n\nexport const DEFAULT_AUTH_OPTIONS: SupabaseAuthClientOptions = {\n autoRefreshToken: true,\n persistSession: true,\n detectSessionInUrl: true,\n flowType: 'implicit',\n}\n\nexport const DEFAULT_REALTIME_OPTIONS: RealtimeClientOptions = {}\n","type Fetch = typeof fetch\n\nexport const resolveFetch = (customFetch?: Fetch): Fetch => {\n if (customFetch) {\n return (...args: Parameters<Fetch>) => customFetch(...args)\n }\n return (...args: Parameters<Fetch>) => fetch(...args)\n}\n\nexport const resolveHeadersConstructor = () => {\n return Headers\n}\n\nexport const fetchWithAuth = (\n supabaseKey: string,\n getAccessToken: () => Promise<string | null>,\n customFetch?: Fetch\n): Fetch => {\n const fetch = resolveFetch(customFetch)\n const HeadersConstructor = resolveHeadersConstructor()\n\n return async (input, init) => {\n const accessToken = (await getAccessToken()) ?? supabaseKey\n let headers = new HeadersConstructor(init?.headers)\n\n if (!headers.has('apikey')) {\n headers.set('apikey', supabaseKey)\n }\n\n if (!headers.has('Authorization')) {\n headers.set('Authorization', `Bearer ${accessToken}`)\n }\n\n return fetch(input, { ...init, headers })\n }\n}\n","// helpers.ts\nimport { SupabaseClientOptions } from './types'\n\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n}\n\nexport function ensureTrailingSlash(url: string): string {\n return url.endsWith('/') ? url : url + '/'\n}\n\nexport const isBrowser = () => typeof window !== 'undefined'\n\nexport function applySettingDefaults<\n Database = any,\n SchemaName extends string & keyof Database = 'public' extends keyof Database\n ? 'public'\n : string & keyof Database,\n>(\n options: SupabaseClientOptions<SchemaName>,\n defaults: SupabaseClientOptions<any>\n): Required<SupabaseClientOptions<SchemaName>> {\n const {\n db: dbOptions,\n auth: authOptions,\n realtime: realtimeOptions,\n global: globalOptions,\n } = options\n const {\n db: DEFAULT_DB_OPTIONS,\n auth: DEFAULT_AUTH_OPTIONS,\n realtime: DEFAULT_REALTIME_OPTIONS,\n global: DEFAULT_GLOBAL_OPTIONS,\n } = defaults\n\n const result: Required<SupabaseClientOptions<SchemaName>> = {\n db: {\n ...DEFAULT_DB_OPTIONS,\n ...dbOptions,\n },\n auth: {\n ...DEFAULT_AUTH_OPTIONS,\n ...authOptions,\n },\n realtime: {\n ...DEFAULT_REALTIME_OPTIONS,\n ...realtimeOptions,\n },\n storage: {},\n global: {\n ...DEFAULT_GLOBAL_OPTIONS,\n ...globalOptions,\n headers: {\n ...(DEFAULT_GLOBAL_OPTIONS?.headers ?? {}),\n ...(globalOptions?.headers ?? {}),\n },\n },\n accessToken: async () => '',\n }\n\n if (options.accessToken) {\n result.accessToken = options.accessToken\n } else {\n // hack around Required<>\n delete (result as any).accessToken\n }\n\n return result\n}\n\n/**\n * Validates a Supabase client URL\n *\n * @param {string} supabaseUrl - The Supabase client URL string.\n * @returns {URL} - The validated base URL.\n * @throws {Error}\n */\nexport function validateSupabaseUrl(supabaseUrl: string): URL {\n const trimmedUrl = supabaseUrl?.trim()\n\n if (!trimmedUrl) {\n throw new Error('supabaseUrl is required.')\n }\n\n if (!trimmedUrl.match(/^https?:\\/\\//i)) {\n throw new Error('Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.')\n }\n\n try {\n return new URL(ensureTrailingSlash(trimmedUrl))\n } catch {\n throw Error('Invalid supabaseUrl: Provided URL is malformed.')\n }\n}\n","import { AuthClient } from '@supabase/auth-js'\nimport { SupabaseAuthClientOptions } from './types'\n\nexport class SupabaseAuthClient extends AuthClient {\n constructor(options: SupabaseAuthClientOptions) {\n super(options)\n }\n}\n","import type { AuthChangeEvent } from '@supabase/auth-js'\nimport { FunctionsClient } from '@supabase/functions-js'\nimport {\n PostgrestClient,\n type PostgrestFilterBuilder,\n type PostgrestQueryBuilder,\n} from '@supabase/postgrest-js'\nimport {\n type RealtimeChannel,\n type RealtimeChannelOptions,\n RealtimeClient,\n type RealtimeClientOptions,\n} from '@supabase/realtime-js'\nimport { StorageClient as SupabaseStorageClient } from '@supabase/storage-js'\nimport {\n DEFAULT_AUTH_OPTIONS,\n DEFAULT_DB_OPTIONS,\n DEFAULT_GLOBAL_OPTIONS,\n DEFAULT_REALTIME_OPTIONS,\n} from './lib/constants'\nimport { fetchWithAuth } from './lib/fetch'\nimport { applySettingDefaults, validateSupabaseUrl } from './lib/helpers'\nimport { SupabaseAuthClient } from './lib/SupabaseAuthClient'\nimport type {\n Fetch,\n GenericSchema,\n SupabaseAuthClientOptions,\n SupabaseClientOptions,\n} from './lib/types'\nimport { GetRpcFunctionFilterBuilderByArgs } from './lib/rest/types/common/rpc'\n\n/**\n * Supabase Client.\n *\n * An isomorphic Javascript client for interacting with Postgres.\n */\nexport default class SupabaseClient<\n Database = any,\n // The second type parameter is also used for specifying db_schema, so we\n // support both cases.\n // TODO: Allow setting db_schema from ClientOptions.\n SchemaNameOrClientOptions extends\n | (string & keyof Omit<Database, '__InternalSupabase'>)\n | { PostgrestVersion: string } = 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Database, '__InternalSupabase'>,\n SchemaName extends string &\n keyof Omit<Database, '__InternalSupabase'> = SchemaNameOrClientOptions extends string &\n keyof Omit<Database, '__InternalSupabase'>\n ? SchemaNameOrClientOptions\n : 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Omit<Database, '__InternalSupabase'>, '__InternalSupabase'>,\n Schema extends Omit<Database, '__InternalSupabase'>[SchemaName] extends GenericSchema\n ? Omit<Database, '__InternalSupabase'>[SchemaName]\n : never = Omit<Database, '__InternalSupabase'>[SchemaName] extends GenericSchema\n ? Omit<Database, '__InternalSupabase'>[SchemaName]\n : never,\n ClientOptions extends { PostgrestVersion: string } = SchemaNameOrClientOptions extends string &\n keyof Omit<Database, '__InternalSupabase'>\n ? // If the version isn't explicitly set, look for it in the __InternalSupabase object to infer the right version\n Database extends { __InternalSupabase: { PostgrestVersion: string } }\n ? Database['__InternalSupabase']\n : // otherwise default to 12\n { PostgrestVersion: '12' }\n : SchemaNameOrClientOptions extends { PostgrestVersion: string }\n ? SchemaNameOrClientOptions\n : never,\n> {\n /**\n * Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies.\n */\n auth: SupabaseAuthClient\n realtime: RealtimeClient\n /**\n * Supabase Storage allows you to manage user-generated content, such as photos or videos.\n */\n storage: SupabaseStorageClient\n\n protected realtimeUrl: URL\n protected authUrl: URL\n protected storageUrl: URL\n protected functionsUrl: URL\n protected rest: PostgrestClient<Database, ClientOptions, SchemaName>\n protected storageKey: string\n protected fetch?: Fetch\n protected changedAccessToken?: string\n protected accessToken?: () => Promise<string | null>\n\n protected headers: Record<string, string>\n\n /**\n * Create a new client for use in the browser.\n *\n * @category Initializing\n *\n * @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.\n * @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.\n * @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.\n * @param options.auth.autoRefreshToken Set to \"true\" if you want to automatically refresh the token before expiring.\n * @param options.auth.persistSession Set to \"true\" if you want to automatically save the user session into local storage.\n * @param options.auth.detectSessionInUrl Set to \"true\" if you want to automatically detects OAuth grants in the URL and signs in the user.\n * @param options.realtime Options passed along to realtime-js constructor.\n * @param options.storage Options passed along to the storage-js constructor.\n * @param options.global.fetch A custom fetch implementation.\n * @param options.global.headers Any additional headers to send with each network request.\n *\n * @example Creating a client\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * // Create a single supabase client for interacting with your database\n * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')\n * ```\n *\n * @example With a custom domain\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * // Use a custom domain as the supabase URL\n * const supabase = createClient('https://my-custom-domain.com', 'your-publishable-key')\n * ```\n *\n * @example With additional parameters\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * const options = {\n * db: {\n * schema: 'public',\n * },\n * auth: {\n * autoRefreshToken: true,\n * persistSession: true,\n * detectSessionInUrl: true\n * },\n * global: {\n * headers: { 'x-my-custom-header': 'my-app-name' },\n * },\n * }\n * const supabase = createClient(\"https://xyzcompany.supabase.co\", \"your-publishable-key\", options)\n * ```\n *\n * @exampleDescription With custom schemas\n * By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.\n * Go to [Settings > API > Exposed schemas](/dashboard/project/_/settings/api) and add the schema which you want to expose to the API.\n *\n * Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema.\n *\n * @example With custom schemas\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {\n * // Provide a custom schema. Defaults to \"public\".\n * db: { schema: 'other_schema' }\n * })\n * ```\n *\n * @exampleDescription Custom fetch implementation\n * `supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,\n * but an alternative `fetch` implementation can be provided as an option.\n * This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers).\n *\n * @example Custom fetch implementation\n * ```js\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {\n * global: { fetch: fetch.bind(globalThis) }\n * })\n * ```\n *\n * @exampleDescription React Native options with AsyncStorage\n * For React Native we recommend using `AsyncStorage` as the storage implementation for Supabase Auth.\n *\n * @example React Native options with AsyncStorage\n * ```js\n * import 'react-native-url-polyfill/auto'\n * import { createClient } from '@supabase/supabase-js'\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n *\n * const supabase = createClient(\"https://xyzcompany.supabase.co\", \"your-publishable-key\", {\n * auth: {\n * storage: AsyncStorage,\n * autoRefreshToken: true,\n * persistSession: true,\n * detectSessionInUrl: false,\n * },\n * });\n * ```\n *\n * @exampleDescription React Native options with Expo SecureStore\n * If you wish to encrypt the user's session information, you can use `aes-js` and store the encryption key in Expo SecureStore.\n * The `aes-js` library, a reputable JavaScript-only implementation of the AES encryption algorithm in CTR mode.\n * A new 256-bit encryption key is generated using the `react-native-get-random-values` library.\n * This key is stored inside Expo's SecureStore, while the value is encrypted and placed inside AsyncStorage.\n *\n * Please make sure that:\n * - You keep the `expo-secure-store`, `aes-js` and `react-native-get-random-values` libraries up-to-date.\n * - Choose the correct [`SecureStoreOptions`](https://docs.expo.dev/versions/latest/sdk/securestore/#securestoreoptions) for your app's needs.\n * E.g. [`SecureStore.WHEN_UNLOCKED`](https://docs.expo.dev/versions/latest/sdk/securestore/#securestorewhen_unlocked) regulates when the data can be accessed.\n * - Carefully consider optimizations or other modifications to the above example, as those can lead to introducing subtle security vulnerabilities.\n *\n * @example React Native options with Expo SecureStore\n * ```ts\n * import 'react-native-url-polyfill/auto'\n * import { createClient } from '@supabase/supabase-js'\n * import AsyncStorage from '@react-native-async-storage/async-storage';\n * import * as SecureStore from 'expo-secure-store';\n * import * as aesjs from 'aes-js';\n * import 'react-native-get-random-values';\n *\n * // As Expo's SecureStore does not support values larger than 2048\n * // bytes, an AES-256 key is generated and stored in SecureStore, while\n * // it is used to encrypt/decrypt values stored in AsyncStorage.\n * class LargeSecureStore {\n * private async _encrypt(key: string, value: string) {\n * const encryptionKey = crypto.getRandomValues(new Uint8Array(256 / 8));\n *\n * const cipher = new aesjs.ModeOfOperation.ctr(encryptionKey, new aesjs.Counter(1));\n * const encryptedBytes = cipher.encrypt(aesjs.utils.utf8.toBytes(value));\n *\n * await SecureStore.setItemAsync(key, aesjs.utils.hex.fromBytes(encryptionKey));\n *\n * return aesjs.utils.hex.fromBytes(encryptedBytes);\n * }\n *\n * private async _decrypt(key: string, value: string) {\n * const encryptionKeyHex = await SecureStore.getItemAsync(key);\n * if (!encryptionKeyHex) {\n * return encryptionKeyHex;\n * }\n *\n * const cipher = new aesjs.ModeOfOperation.ctr(aesjs.utils.hex.toBytes(encryptionKeyHex), new aesjs.Counter(1));\n * const decryptedBytes = cipher.decrypt(aesjs.utils.hex.toBytes(value));\n *\n * return aesjs.utils.utf8.fromBytes(decryptedBytes);\n * }\n *\n * async getItem(key: string) {\n * const encrypted = await AsyncStorage.getItem(key);\n * if (!encrypted) { return encrypted; }\n *\n * return await this._decrypt(key, encrypted);\n * }\n *\n * async removeItem(key: string) {\n * await AsyncStorage.removeItem(key);\n * await SecureStore.deleteItemAsync(key);\n * }\n *\n * async setItem(key: string, value: string) {\n * const encrypted = await this._encrypt(key, value);\n *\n * await AsyncStorage.setItem(key, encrypted);\n * }\n * }\n *\n * const supabase = createClient(\"https://xyzcompany.supabase.co\", \"your-publishable-key\", {\n * auth: {\n * storage: new LargeSecureStore(),\n * autoRefreshToken: true,\n * persistSession: true,\n * detectSessionInUrl: false,\n * },\n * });\n * ```\n *\n * @example With a database query\n * ```ts\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')\n *\n * const { data } = await supabase.from('profiles').select('*')\n * ```\n */\n constructor(\n protected supabaseUrl: string,\n protected supabaseKey: string,\n options?: SupabaseClientOptions<SchemaName>\n ) {\n const baseUrl = validateSupabaseUrl(supabaseUrl)\n if (!supabaseKey) throw new Error('supabaseKey is required.')\n\n this.realtimeUrl = new URL('realtime/v1', baseUrl)\n this.realtimeUrl.protocol = this.realtimeUrl.protocol.replace('http', 'ws')\n this.authUrl = new URL('auth/v1', baseUrl)\n this.storageUrl = new URL('storage/v1', baseUrl)\n this.functionsUrl = new URL('functions/v1', baseUrl)\n\n // default storage key uses the supabase project ref as a namespace\n const defaultStorageKey = `sb-${baseUrl.hostname.split('.')[0]}-auth-token`\n const DEFAULTS = {\n db: DEFAULT_DB_OPTIONS,\n realtime: DEFAULT_REALTIME_OPTIONS,\n auth: { ...DEFAULT_AUTH_OPTIONS, storageKey: defaultStorageKey },\n global: DEFAULT_GLOBAL_OPTIONS,\n }\n\n const settings = applySettingDefaults(options ?? {}, DEFAULTS)\n\n this.storageKey = settings.auth.storageKey ?? ''\n this.headers = settings.global.headers ?? {}\n\n if (!settings.accessToken) {\n this.auth = this._initSupabaseAuthClient(\n settings.auth ?? {},\n this.headers,\n settings.global.fetch\n )\n } else {\n this.accessToken = settings.accessToken\n\n this.auth = new Proxy<SupabaseAuthClient>({} as any, {\n get: (_, prop) => {\n throw new Error(\n `@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(\n prop\n )} is not possible`\n )\n },\n })\n }\n\n this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch)\n this.realtime = this._initRealtimeClient({\n headers: this.headers,\n accessToken: this._getAccessToken.bind(this),\n fetch: this.fetch,\n ...settings.realtime,\n })\n if (this.accessToken) {\n // Start auth immediately to avoid race condition with channel subscriptions\n // Wrap Promise to avoid Firefox extension cross-context Promise access errors\n Promise.resolve(this.accessToken())\n .then((token) => this.realtime.setAuth(token))\n .catch((e) => console.warn('Failed to set initial Realtime auth token:', e))\n }\n\n this.rest = new PostgrestClient(new URL('rest/v1', baseUrl).href, {\n headers: this.headers,\n schema: settings.db.schema,\n fetch: this.fetch,\n timeout: settings.db.timeout,\n urlLengthLimit: settings.db.urlLengthLimit,\n })\n\n this.storage = new SupabaseStorageClient(\n this.storageUrl.href,\n this.headers,\n this.fetch,\n options?.storage\n )\n\n if (!settings.accessToken) {\n this._listenForAuthEvents()\n }\n }\n\n /**\n * Supabase Functions allows you to deploy and invoke edge functions.\n */\n get functions(): FunctionsClient {\n return new FunctionsClient(this.functionsUrl.href, {\n headers: this.headers,\n customFetch: this.fetch,\n })\n }\n\n // NOTE: signatures must be kept in sync with PostgrestClient.from\n from<\n TableName extends string & keyof Schema['Tables'],\n Table extends Schema['Tables'][TableName],\n >(relation: TableName): PostgrestQueryBuilder<ClientOptions, Schema, Table, TableName>\n from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>(\n relation: ViewName\n ): PostgrestQueryBuilder<ClientOptions, Schema, View, ViewName>\n /**\n * Perform a query on a table or a view.\n *\n * @param relation - The table or view name to query\n */\n from(relation: string): PostgrestQueryBuilder<ClientOptions, Schema, any> {\n return this.rest.from(relation)\n }\n\n // NOTE: signatures must be kept in sync with PostgrestClient.schema\n /**\n * Select a schema to query or perform an function (rpc) call.\n *\n * The schema needs to be on the list of exposed schemas inside Supabase.\n *\n * @param schema - The schema to query\n */\n schema<DynamicSchema extends string & keyof Omit<Database, '__InternalSupabase'>>(\n schema: DynamicSchema\n ): PostgrestClient<\n Database,\n ClientOptions,\n DynamicSchema,\n Database[DynamicSchema] extends GenericSchema ? Database[DynamicSchema] : any\n > {\n return this.rest.schema<DynamicSchema>(schema)\n }\n\n // NOTE: signatures must be kept in sync with PostgrestClient.rpc\n /**\n * Perform a function call.\n *\n * @param fn - The function name to call\n * @param args - The arguments to pass to the function call\n * @param options - Named parameters\n * @param options.head - When set to `true`, `data` will not be returned.\n * Useful if you only need the count.\n * @param options.get - When set to `true`, the function will be called with\n * read-only access mode.\n * @param options.count - Count algorithm to use to count rows returned by the\n * function. Only applicable for [set-returning\n * functions](https://www.postgresql.org/docs/current/functions-srf.html).\n *\n * `\"exact\"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the\n * hood.\n *\n * `\"planned\"`: Approximated but fast count algorithm. Uses the Postgres\n * statistics under the hood.\n *\n * `\"estimated\"`: Uses exact count for low numbers and planned count for high\n * numbers.\n */\n rpc<\n FnName extends string & keyof Schema['Functions'],\n Args extends Schema['Functions'][FnName]['Args'] = never,\n FilterBuilder extends GetRpcFunctionFilterBuilderByArgs<\n Schema,\n FnName,\n Args\n > = GetRpcFunctionFilterBuilderByArgs<Schema, FnName, Args>,\n >(\n fn: FnName,\n args: Args = {} as Args,\n options: {\n head?: boolean\n get?: boolean\n count?: 'exact' | 'planned' | 'estimated'\n } = {\n head: false,\n get: false,\n count: undefined,\n }\n ): PostgrestFilterBuilder<\n ClientOptions,\n Schema,\n FilterBuilder['Row'],\n FilterBuilder['Result'],\n FilterBuilder['RelationName'],\n FilterBuilder['Relationships'],\n 'RPC'\n > {\n return this.rest.rpc(fn, args, options) as unknown as PostgrestFilterBuilder<\n ClientOptions,\n Schema,\n FilterBuilder['Row'],\n FilterBuilder['Result'],\n FilterBuilder['RelationName'],\n FilterBuilder['Relationships'],\n 'RPC'\n >\n }\n\n /**\n * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.\n *\n * @param {string} name - The name of the Realtime channel.\n * @param {Object} opts - The options to pass to the Realtime channel.\n *\n */\n channel(name: string, opts: RealtimeChannelOptions = { config: {} }): RealtimeChannel {\n return this.realtime.channel(name, opts)\n }\n\n /**\n * Returns all Realtime channels.\n *\n * @category Initializing\n *\n * @example Get all channels\n * ```js\n * const channels = supabase.getChannels()\n * ```\n */\n getChannels(): RealtimeChannel[] {\n return this.realtime.getChannels()\n }\n\n /**\n * Unsubscribes and removes Realtime channel from Realtime client.\n *\n * @param {RealtimeChannel} channel - The name of the Realtime channel.\n *\n *\n * @category Initializing\n *\n * @remarks\n * - 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.\n *\n * @example Removes a channel\n * ```js\n * supabase.removeChannel(myChannel)\n * ```\n */\n removeChannel(channel: RealtimeChannel): Promise<'ok' | 'timed out' | 'error'> {\n return this.realtime.removeChannel(channel)\n }\n\n /**\n * Unsubscribes and removes all Realtime channels from Realtime client.\n *\n * @category Initializing\n *\n * @remarks\n * - 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.\n *\n * @example Remove all channels\n * ```js\n * supabase.removeAllChannels()\n * ```\n */\n removeAllChannels(): Promise<('ok' | 'timed out' | 'error')[]> {\n return this.realtime.removeAllChannels()\n }\n\n private async _getAccessToken() {\n if (this.accessToken) {\n return await this.accessToken()\n }\n\n const { data } = await this.auth.getSession()\n\n return data.session?.access_token ?? this.supabaseKey\n }\n\n private _initSupabaseAuthClient(\n {\n autoRefreshToken,\n persistSession,\n detectSessionInUrl,\n storage,\n userStorage,\n storageKey,\n flowType,\n lock,\n debug,\n throwOnError,\n experimental,\n }: SupabaseAuthClientOptions,\n headers?: Record<string, string>,\n fetch?: Fetch\n ) {\n const authHeaders = {\n Authorization: `Bearer ${this.supabaseKey}`,\n apikey: `${this.supabaseKey}`,\n }\n return new SupabaseAuthClient({\n url: this.authUrl.href,\n headers: { ...authHeaders, ...headers },\n storageKey: storageKey,\n autoRefreshToken,\n persistSession,\n detectSessionInUrl,\n storage,\n userStorage,\n flowType,\n lock,\n debug,\n throwOnError,\n experimental,\n fetch,\n // auth checks if there is a custom authorizaiton header using this flag\n // so it knows whether to return an error when getUser is called with no session\n hasCustomAuthorizationHeader: Object.keys(this.headers).some(\n (key) => key.toLowerCase() === 'authorization'\n ),\n })\n }\n\n private _initRealtimeClient(options: RealtimeClientOptions) {\n return new RealtimeClient(this.realtimeUrl.href, {\n ...options,\n params: { ...{ apikey: this.supabaseKey }, ...options?.params },\n })\n }\n\n private _listenForAuthEvents() {\n const data = this.auth.onAuthStateChange((event, session) => {\n this._handleTokenChanged(event, 'CLIENT', session?.access_token)\n })\n return data\n }\n\n private _handleTokenChanged(\n event: AuthChangeEvent,\n source: 'CLIENT' | 'STORAGE',\n token?: string\n ) {\n if (\n (event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&\n this.changedAccessToken !== token\n ) {\n this.changedAccessToken = token\n this.realtime.setAuth(token)\n } else if (event === 'SIGNED_OUT') {\n this.realtime.setAuth()\n if (source == 'STORAGE') this.auth.signOut()\n this.changedAccessToken = undefined\n }\n }\n}\n","import SupabaseClient from './SupabaseClient'\nimport type { SupabaseClientOptions } from './lib/types'\n\nexport * from '@supabase/auth-js'\nexport type { User as AuthUser, Session as AuthSession } from '@supabase/auth-js'\nexport type {\n PostgrestResponse,\n PostgrestSingleResponse,\n PostgrestMaybeSingleResponse,\n PostgrestBuilder,\n PostgrestFilterBuilder,\n PostgrestTransformBuilder,\n PostgrestQueryBuilder,\n} from '@supabase/postgrest-js'\nexport { PostgrestError } from '@supabase/postgrest-js'\nexport { StorageApiError } from '@supabase/storage-js'\nexport type { FunctionInvokeOptions } from '@supabase/functions-js'\nexport {\n FunctionsHttpError,\n FunctionsFetchError,\n FunctionsRelayError,\n FunctionsError,\n FunctionRegion,\n} from '@supabase/functions-js'\nexport * from '@supabase/realtime-js'\nexport { default as SupabaseClient } from './SupabaseClient'\nexport type {\n SupabaseClientOptions,\n QueryResult,\n QueryData,\n QueryError,\n DatabaseWithoutInternals,\n} from './lib/types'\n\n/**\n * Creates a new Supabase Client.\n *\n * @example Creating a Supabase client\n * ```ts\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')\n * const { data, error } = await supabase.from('profiles').select('*')\n * ```\n */\nexport const createClient = <\n Database = any,\n SchemaNameOrClientOptions extends\n | (string & keyof Omit<Database, '__InternalSupabase'>)\n | { PostgrestVersion: string } = 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Database, '__InternalSupabase'>,\n SchemaName extends string &\n keyof Omit<Database, '__InternalSupabase'> = SchemaNameOrClientOptions extends string &\n keyof Omit<Database, '__InternalSupabase'>\n ? SchemaNameOrClientOptions\n : 'public' extends keyof Omit<Database, '__InternalSupabase'>\n ? 'public'\n : string & keyof Omit<Omit<Database, '__InternalSupabase'>, '__InternalSupabase'>,\n>(\n supabaseUrl: string,\n supabaseKey: string,\n options?: SupabaseClientOptions<SchemaName>\n): SupabaseClient<Database, SchemaNameOrClientOptions, SchemaName> => {\n return new SupabaseClient<Database, SchemaNameOrClientOptions, SchemaName>(\n supabaseUrl,\n supabaseKey,\n options\n )\n}\n\n// Check for Node.js <= 18 deprecation\nfunction shouldShowDeprecationWarning(): boolean {\n // Skip in browser environments\n if (typeof window !== 'undefined') {\n return false\n }\n\n // Skip if process is not available (e.g., Edge Runtime)\n // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings\n const _process = (globalThis as any)['process']\n if (!_process) {\n return false\n }\n\n const processVersion = _process['version']\n if (processVersion === undefined || processVersion === null) {\n return false\n }\n\n const versionMatch = processVersion.match(/^v(\\d+)\\./)\n if (!versionMatch) {\n return false\n }\n\n const majorVersion = parseInt(versionMatch[1], 10)\n return majorVersion <= 18\n}\n\nif (shouldShowDeprecationWarning()) {\n console.warn(\n `⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. ` +\n `Please upgrade to Node.js 20 or later. ` +\n `For more information, visit: https://github.com/orgs/supabase/discussions/37217`\n )\n}\n"],"mappings":";;;;;;;AAMA,MAAa,UAAU;;;;ACDvB,IAAI,SAAS;AAEb,IAAI,OAAO,SAAS,YAClB,UAAS;SACA,OAAO,aAAa,YAC7B,UAAS;SACA,OAAO,cAAc,eAAe,UAAU,YAAY,cACnE,UAAS;IAET,UAAS;AAGX,MAAa,kBAAkB,EAAE,iBAAiB,eAAe,OAAO,GAAG,WAAW;AAEtF,MAAa,yBAAyB,EACpC,SAAS,iBACV;AAED,MAAa,qBAAqB,EAChC,QAAQ,UACT;AAED,MAAaA,uBAAkD;CAC7D,kBAAkB;CAClB,gBAAgB;CAChB,oBAAoB;CACpB,UAAU;CACX;AAED,MAAaC,2BAAkD,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChCjE,MAAa,gBAAgB,gBAA+B;AAC1D,KAAI,YACF,SAAQ,GAAG,SAA4B,YAAY,GAAG,KAAK;AAE7D,SAAQ,GAAG,SAA4B,MAAM,GAAG,KAAK;;AAGvD,MAAa,kCAAkC;AAC7C,QAAO;;AAGT,MAAa,iBACX,aACA,gBACA,gBACU;CACV,MAAMC,UAAQ,aAAa,YAAY;CACvC,MAAM,qBAAqB,2BAA2B;AAEtD,QAAO,OAAO,OAAO,SAAS;;EAC5B,MAAM,uCAAe,MAAM,gBAAgB,yEAAK;EAChD,IAAI,UAAU,IAAI,+DAAmB,KAAM,QAAQ;AAEnD,MAAI,CAAC,QAAQ,IAAI,SAAS,CACxB,SAAQ,IAAI,UAAU,YAAY;AAGpC,MAAI,CAAC,QAAQ,IAAI,gBAAgB,CAC/B,S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AAI,mBAAmB,UAAa,mBAAmB,KACrD,QAAO;CAGT,MAAM,eAAe,eAAe,MAAM,YAAY;AACtD,KAAI,CAAC,aACH,QAAO;AAIT,QADqB,SAAS,aAAa,IAAI,GAAG,IAC3B;;AAGzB,IAAI,8BAA8B,CAChC,SAAQ,KACN,8OAGD"}
|
package/dist/index.d.cts
CHANGED
|
@@ -153,6 +153,13 @@ type SupabaseClientOptions<SchemaName> = {
|
|
|
153
153
|
* throwing the error instead of returning it as part of a successful response.
|
|
154
154
|
*/
|
|
155
155
|
throwOnError?: SupabaseAuthClientOptions['throwOnError'];
|
|
156
|
+
/**
|
|
157
|
+
* Opt-in flags for experimental features. These APIs may change without
|
|
158
|
+
* notice and are disabled by default.
|
|
159
|
+
*
|
|
160
|
+
* @experimental
|
|
161
|
+
*/
|
|
162
|
+
experimental?: SupabaseAuthClientOptions['experimental'];
|
|
156
163
|
};
|
|
157
164
|
/**
|
|
158
165
|
* Options passed to the realtime-js instance
|
|
@@ -306,7 +313,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
306
313
|
* import { createClient } from '@supabase/supabase-js'
|
|
307
314
|
*
|
|
308
315
|
* // Create a single supabase client for interacting with your database
|
|
309
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
316
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
310
317
|
* ```
|
|
311
318
|
*
|
|
312
319
|
* @example With a custom domain
|
|
@@ -314,7 +321,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
314
321
|
* import { createClient } from '@supabase/supabase-js'
|
|
315
322
|
*
|
|
316
323
|
* // Use a custom domain as the supabase URL
|
|
317
|
-
* const supabase = createClient('https://my-custom-domain.com', 'publishable-
|
|
324
|
+
* const supabase = createClient('https://my-custom-domain.com', 'your-publishable-key')
|
|
318
325
|
* ```
|
|
319
326
|
*
|
|
320
327
|
* @example With additional parameters
|
|
@@ -334,7 +341,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
334
341
|
* headers: { 'x-my-custom-header': 'my-app-name' },
|
|
335
342
|
* },
|
|
336
343
|
* }
|
|
337
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
344
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", options)
|
|
338
345
|
* ```
|
|
339
346
|
*
|
|
340
347
|
* @exampleDescription With custom schemas
|
|
@@ -347,7 +354,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
347
354
|
* ```js
|
|
348
355
|
* import { createClient } from '@supabase/supabase-js'
|
|
349
356
|
*
|
|
350
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
357
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
351
358
|
* // Provide a custom schema. Defaults to "public".
|
|
352
359
|
* db: { schema: 'other_schema' }
|
|
353
360
|
* })
|
|
@@ -362,7 +369,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
362
369
|
* ```js
|
|
363
370
|
* import { createClient } from '@supabase/supabase-js'
|
|
364
371
|
*
|
|
365
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
372
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
366
373
|
* global: { fetch: fetch.bind(globalThis) }
|
|
367
374
|
* })
|
|
368
375
|
* ```
|
|
@@ -376,7 +383,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
376
383
|
* import { createClient } from '@supabase/supabase-js'
|
|
377
384
|
* import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
378
385
|
*
|
|
379
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
386
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
|
|
380
387
|
* auth: {
|
|
381
388
|
* storage: AsyncStorage,
|
|
382
389
|
* autoRefreshToken: true,
|
|
@@ -453,7 +460,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
453
460
|
* }
|
|
454
461
|
* }
|
|
455
462
|
*
|
|
456
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
463
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
|
|
457
464
|
* auth: {
|
|
458
465
|
* storage: new LargeSecureStore(),
|
|
459
466
|
* autoRefreshToken: true,
|
|
@@ -467,7 +474,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
467
474
|
* ```ts
|
|
468
475
|
* import { createClient } from '@supabase/supabase-js'
|
|
469
476
|
*
|
|
470
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
477
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
471
478
|
*
|
|
472
479
|
* const { data } = await supabase.from('profiles').select('*')
|
|
473
480
|
* ```
|
|
@@ -580,7 +587,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
580
587
|
* ```ts
|
|
581
588
|
* import { createClient } from '@supabase/supabase-js'
|
|
582
589
|
*
|
|
583
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
590
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
584
591
|
* const { data, error } = await supabase.from('profiles').select('*')
|
|
585
592
|
* ```
|
|
586
593
|
*/
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/lib/rest/types/common/common.ts","../src/lib/types.ts","../src/lib/SupabaseAuthClient.ts","../src/lib/rest/types/common/rpc.ts","../src/SupabaseClient.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAsFS,KA7CG,mBAAA,GA6CH;EAC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IKfvB,yBLeuB,SAAA,MAAA,GAAA,MKd9D,ILc8D,CKdzD,QLcyD,EAAA,oBAAA,CAAA,GKblE,yBLakE,GAAA,QAAA,SAAA,MKZ3C,ILY2C,CKZtC,QLYsC,EAAA,oBAAA,CAAA,GAAA,QAAA,GAAA,MAAA,GAAA,MKVjD,ILUiD,CKV5C,ILU4C,CKVvC,QLUuC,EAAA,oBAAA,CAAA,EAAA,oBAAA,CAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EKN5D,qBLM4D,CKNtC,ULMsC,CAAA,EAAA,GKLrE,cLKqE,CKLtD,QLKsD,EKL5C,yBLK4C,EKLjB,ULKiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/lib/rest/types/common/common.ts","../src/lib/types.ts","../src/lib/SupabaseAuthClient.ts","../src/lib/rest/types/common/rpc.ts","../src/SupabaseClient.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAsFS,KA7CG,mBAAA,GA6CH;EACmB,cAAA,EAAA,MAAA;EAAf,OAAA,EAAA,MAAA,EAAA;EAAM,UAAA,CAAA,EAAA,OAAA;;;;AChEF,KD0BL,YAAA,GC1BK;EAEL,GAAA,EDyBL,MCzBU,CAAA,MAAA,EAAU,OAAK,CAAA;EAEpB,MAAA,EDwBF,MCxBE,CAAA,MAAA,EAAA,OAAqB,CAAA;EAKpB,MAAA,EDoBH,MCpBG,CAAA,MAAA,EAAA,OAAA,CAAA;EA8D6B,aAAA,EDzCzB,mBCyCyB,EAAA;CAI5B;AAQI,KDlDN,oBAAA,GCkDM;EAIH,GAAA,EDrDR,MCqDQ,CAAA,MAAA,EAAA,OAAA,CAAA;EAIH,MAAA,EDxDF,MCwDE,CAAA,MAAA,EAAA,OAAA,CAAA;EAMD,MAAA,ED7DD,MC6DC,CAAA,MAAA,EAAA,OAAA,CAAA;EAKQ,aAAA,EDjEF,mBCiEE,EA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AA,CAAA;EACA,QAAA,eAAA;EACA,QAAA,uBAAA;EACA,QAAA,mBAAA;EAAS,QAAA,oBAAA;EAAuB,QAAA,mBAAA;;;;AJjWpC;;;;;;AAOA;;;;;AAIoC,cKfvB,YLeuB,EAAA,CAAA,WAAA,GAAA,EAAA,kCAAA,CAAA,MAAA,GAAA,MKZd,ILYc,CKZT,QLYS,EAAA,oBAAA,CAAA,CAAA,GAAA;EAGxB,gBAAA,EAAA,MAAA;AAKZ,CAAA,IAAY,QAAA,SAAW,MKnBqC,ILmBlC,CKnBuC,QLmBvC,EAAA,oBAAuB,CAAA,GAAA,QAAA,GAAuB,MAAA,GAAA,MKjBnD,ILiBmD,CKjB9C,QLiB8C,EAAA,oBAAA,CAAA,GAAA,mBAAA,MAAA,GAAA,MKf9D,ILe8D,CKfzD,QLeyD,EAAA,oBAAA,CAAA,IKfvB,yBLeuB,SAAA,MAAA,GAAA,MKd9D,ILc8D,CKdzD,QLcyD,EAAA,oBAAA,CAAA,GKblE,yBLakE,GAAA,QAAA,SAAA,MKZ3C,ILY2C,CKZtC,QLYsC,EAAA,oBAAA,CAAA,GAAA,QAAA,GAAA,MAAA,GAAA,MKVjD,ILUiD,CKV5C,ILU4C,CKVvC,QLUuC,EAAA,oBAAA,CAAA,EAAA,oBAAA,CAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EKN5D,qBLM4D,CKNtC,ULMsC,CAAA,EAAA,GKLrE,cLKqE,CKLtD,QLKsD,EKL5C,yBLK4C,EKLjB,ULKiB,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -153,6 +153,13 @@ type SupabaseClientOptions<SchemaName> = {
|
|
|
153
153
|
* throwing the error instead of returning it as part of a successful response.
|
|
154
154
|
*/
|
|
155
155
|
throwOnError?: SupabaseAuthClientOptions['throwOnError'];
|
|
156
|
+
/**
|
|
157
|
+
* Opt-in flags for experimental features. These APIs may change without
|
|
158
|
+
* notice and are disabled by default.
|
|
159
|
+
*
|
|
160
|
+
* @experimental
|
|
161
|
+
*/
|
|
162
|
+
experimental?: SupabaseAuthClientOptions['experimental'];
|
|
156
163
|
};
|
|
157
164
|
/**
|
|
158
165
|
* Options passed to the realtime-js instance
|
|
@@ -306,7 +313,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
306
313
|
* import { createClient } from '@supabase/supabase-js'
|
|
307
314
|
*
|
|
308
315
|
* // Create a single supabase client for interacting with your database
|
|
309
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
316
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
310
317
|
* ```
|
|
311
318
|
*
|
|
312
319
|
* @example With a custom domain
|
|
@@ -314,7 +321,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
314
321
|
* import { createClient } from '@supabase/supabase-js'
|
|
315
322
|
*
|
|
316
323
|
* // Use a custom domain as the supabase URL
|
|
317
|
-
* const supabase = createClient('https://my-custom-domain.com', 'publishable-
|
|
324
|
+
* const supabase = createClient('https://my-custom-domain.com', 'your-publishable-key')
|
|
318
325
|
* ```
|
|
319
326
|
*
|
|
320
327
|
* @example With additional parameters
|
|
@@ -334,7 +341,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
334
341
|
* headers: { 'x-my-custom-header': 'my-app-name' },
|
|
335
342
|
* },
|
|
336
343
|
* }
|
|
337
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
344
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", options)
|
|
338
345
|
* ```
|
|
339
346
|
*
|
|
340
347
|
* @exampleDescription With custom schemas
|
|
@@ -347,7 +354,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
347
354
|
* ```js
|
|
348
355
|
* import { createClient } from '@supabase/supabase-js'
|
|
349
356
|
*
|
|
350
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
357
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
351
358
|
* // Provide a custom schema. Defaults to "public".
|
|
352
359
|
* db: { schema: 'other_schema' }
|
|
353
360
|
* })
|
|
@@ -362,7 +369,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
362
369
|
* ```js
|
|
363
370
|
* import { createClient } from '@supabase/supabase-js'
|
|
364
371
|
*
|
|
365
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
372
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
|
|
366
373
|
* global: { fetch: fetch.bind(globalThis) }
|
|
367
374
|
* })
|
|
368
375
|
* ```
|
|
@@ -376,7 +383,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
376
383
|
* import { createClient } from '@supabase/supabase-js'
|
|
377
384
|
* import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
378
385
|
*
|
|
379
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
386
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
|
|
380
387
|
* auth: {
|
|
381
388
|
* storage: AsyncStorage,
|
|
382
389
|
* autoRefreshToken: true,
|
|
@@ -453,7 +460,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
453
460
|
* }
|
|
454
461
|
* }
|
|
455
462
|
*
|
|
456
|
-
* const supabase = createClient("https://xyzcompany.supabase.co", "publishable-
|
|
463
|
+
* const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
|
|
457
464
|
* auth: {
|
|
458
465
|
* storage: new LargeSecureStore(),
|
|
459
466
|
* autoRefreshToken: true,
|
|
@@ -467,7 +474,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
467
474
|
* ```ts
|
|
468
475
|
* import { createClient } from '@supabase/supabase-js'
|
|
469
476
|
*
|
|
470
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
477
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
471
478
|
*
|
|
472
479
|
* const { data } = await supabase.from('profiles').select('*')
|
|
473
480
|
* ```
|
|
@@ -580,7 +587,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
|
|
|
580
587
|
* ```ts
|
|
581
588
|
* import { createClient } from '@supabase/supabase-js'
|
|
582
589
|
*
|
|
583
|
-
* const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-
|
|
590
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
584
591
|
* const { data, error } = await supabase.from('profiles').select('*')
|
|
585
592
|
* ```
|
|
586
593
|
*/
|