@supabase/supabase-js 2.100.0 → 2.101.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/cors.cjs CHANGED
@@ -58,7 +58,7 @@ const SUPABASE_METHODS = [
58
58
  * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.
59
59
  * Use this for simple CORS configurations with wildcard origin.
60
60
  *
61
- * @example
61
+ * @example Basic usage
62
62
  * ```typescript
63
63
  * import { corsHeaders } from '@supabase/supabase-js/cors'
64
64
  *
package/dist/cors.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cors.cjs","names":["corsHeaders: CorsHeaders"],"sources":["../src/cors.ts"],"sourcesContent":["/**\n * Canonical CORS configuration for Supabase Edge Functions\n *\n * This module exports CORS headers that stay synchronized with the Supabase SDK.\n * When new headers are added to the SDK, they are automatically included here,\n * preventing CORS errors in Edge Functions.\n *\n * @example Basic usage\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n *\n * @module cors\n */\n\n/**\n * All custom headers sent by the Supabase SDK.\n * These headers need to be included in CORS configuration to prevent preflight failures.\n *\n * Headers:\n * - authorization: Bearer token for authentication\n * - x-client-info: Library version information\n * - apikey: Project API key\n * - content-type: Standard HTTP content type\n */\nconst SUPABASE_HEADERS = ['authorization', 'x-client-info', 'apikey', 'content-type'].join(', ')\n\n/**\n * All HTTP methods used by the Supabase SDK\n */\nconst SUPABASE_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'].join(', ')\n\n/**\n * Type representing CORS headers as a record of header names to values\n */\nexport type CorsHeaders = Record<string, string>\n\n/**\n * Default CORS headers for Supabase Edge Functions.\n *\n * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.\n * Use this for simple CORS configurations with wildcard origin.\n *\n * @example\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n */\nexport const corsHeaders: CorsHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Headers': SUPABASE_HEADERS,\n 'Access-Control-Allow-Methods': SUPABASE_METHODS,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,mBAAmB;CAAC;CAAiB;CAAiB;CAAU;CAAe,CAAC,KAAK,KAAK;;;;AAKhG,MAAM,mBAAmB;CAAC;CAAO;CAAQ;CAAO;CAAS;CAAU;CAAU,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;;;;;;;AA6BxF,MAAaA,cAA2B;CACtC,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;CACjC"}
1
+ {"version":3,"file":"cors.cjs","names":["corsHeaders: CorsHeaders"],"sources":["../src/cors.ts"],"sourcesContent":["/**\n * Canonical CORS configuration for Supabase Edge Functions\n *\n * This module exports CORS headers that stay synchronized with the Supabase SDK.\n * When new headers are added to the SDK, they are automatically included here,\n * preventing CORS errors in Edge Functions.\n *\n * @example Basic usage\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n *\n * @module cors\n */\n\n/**\n * All custom headers sent by the Supabase SDK.\n * These headers need to be included in CORS configuration to prevent preflight failures.\n *\n * Headers:\n * - authorization: Bearer token for authentication\n * - x-client-info: Library version information\n * - apikey: Project API key\n * - content-type: Standard HTTP content type\n */\nconst SUPABASE_HEADERS = ['authorization', 'x-client-info', 'apikey', 'content-type'].join(', ')\n\n/**\n * All HTTP methods used by the Supabase SDK\n */\nconst SUPABASE_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'].join(', ')\n\n/**\n * Type representing CORS headers as a record of header names to values\n */\nexport type CorsHeaders = Record<string, string>\n\n/**\n * Default CORS headers for Supabase Edge Functions.\n *\n * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.\n * Use this for simple CORS configurations with wildcard origin.\n *\n * @example Basic usage\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n */\nexport const corsHeaders: CorsHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Headers': SUPABASE_HEADERS,\n 'Access-Control-Allow-Methods': SUPABASE_METHODS,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,mBAAmB;CAAC;CAAiB;CAAiB;CAAU;CAAe,CAAC,KAAK,KAAK;;;;AAKhG,MAAM,mBAAmB;CAAC;CAAO;CAAQ;CAAO;CAAS;CAAU;CAAU,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;;;;;;;AA6BxF,MAAaA,cAA2B;CACtC,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;CACjC"}
package/dist/cors.d.cts CHANGED
@@ -34,7 +34,7 @@ type CorsHeaders = Record<string, string>;
34
34
  * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.
35
35
  * Use this for simple CORS configurations with wildcard origin.
36
36
  *
37
- * @example
37
+ * @example Basic usage
38
38
  * ```typescript
39
39
  * import { corsHeaders } from '@supabase/supabase-js/cors'
40
40
  *
package/dist/cors.d.mts CHANGED
@@ -34,7 +34,7 @@ type CorsHeaders = Record<string, string>;
34
34
  * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.
35
35
  * Use this for simple CORS configurations with wildcard origin.
36
36
  *
37
- * @example
37
+ * @example Basic usage
38
38
  * ```typescript
39
39
  * import { corsHeaders } from '@supabase/supabase-js/cors'
40
40
  *
package/dist/cors.mjs CHANGED
@@ -57,7 +57,7 @@ const SUPABASE_METHODS = [
57
57
  * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.
58
58
  * Use this for simple CORS configurations with wildcard origin.
59
59
  *
60
- * @example
60
+ * @example Basic usage
61
61
  * ```typescript
62
62
  * import { corsHeaders } from '@supabase/supabase-js/cors'
63
63
  *
package/dist/cors.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cors.mjs","names":["corsHeaders: CorsHeaders"],"sources":["../src/cors.ts"],"sourcesContent":["/**\n * Canonical CORS configuration for Supabase Edge Functions\n *\n * This module exports CORS headers that stay synchronized with the Supabase SDK.\n * When new headers are added to the SDK, they are automatically included here,\n * preventing CORS errors in Edge Functions.\n *\n * @example Basic usage\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n *\n * @module cors\n */\n\n/**\n * All custom headers sent by the Supabase SDK.\n * These headers need to be included in CORS configuration to prevent preflight failures.\n *\n * Headers:\n * - authorization: Bearer token for authentication\n * - x-client-info: Library version information\n * - apikey: Project API key\n * - content-type: Standard HTTP content type\n */\nconst SUPABASE_HEADERS = ['authorization', 'x-client-info', 'apikey', 'content-type'].join(', ')\n\n/**\n * All HTTP methods used by the Supabase SDK\n */\nconst SUPABASE_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'].join(', ')\n\n/**\n * Type representing CORS headers as a record of header names to values\n */\nexport type CorsHeaders = Record<string, string>\n\n/**\n * Default CORS headers for Supabase Edge Functions.\n *\n * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.\n * Use this for simple CORS configurations with wildcard origin.\n *\n * @example\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n */\nexport const corsHeaders: CorsHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Headers': SUPABASE_HEADERS,\n 'Access-Control-Allow-Methods': SUPABASE_METHODS,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,mBAAmB;CAAC;CAAiB;CAAiB;CAAU;CAAe,CAAC,KAAK,KAAK;;;;AAKhG,MAAM,mBAAmB;CAAC;CAAO;CAAQ;CAAO;CAAS;CAAU;CAAU,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;;;;;;;AA6BxF,MAAaA,cAA2B;CACtC,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;CACjC"}
1
+ {"version":3,"file":"cors.mjs","names":["corsHeaders: CorsHeaders"],"sources":["../src/cors.ts"],"sourcesContent":["/**\n * Canonical CORS configuration for Supabase Edge Functions\n *\n * This module exports CORS headers that stay synchronized with the Supabase SDK.\n * When new headers are added to the SDK, they are automatically included here,\n * preventing CORS errors in Edge Functions.\n *\n * @example Basic usage\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n *\n * @module cors\n */\n\n/**\n * All custom headers sent by the Supabase SDK.\n * These headers need to be included in CORS configuration to prevent preflight failures.\n *\n * Headers:\n * - authorization: Bearer token for authentication\n * - x-client-info: Library version information\n * - apikey: Project API key\n * - content-type: Standard HTTP content type\n */\nconst SUPABASE_HEADERS = ['authorization', 'x-client-info', 'apikey', 'content-type'].join(', ')\n\n/**\n * All HTTP methods used by the Supabase SDK\n */\nconst SUPABASE_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'].join(', ')\n\n/**\n * Type representing CORS headers as a record of header names to values\n */\nexport type CorsHeaders = Record<string, string>\n\n/**\n * Default CORS headers for Supabase Edge Functions.\n *\n * Includes all headers sent by Supabase client libraries and allows all standard HTTP methods.\n * Use this for simple CORS configurations with wildcard origin.\n *\n * @example Basic usage\n * ```typescript\n * import { corsHeaders } from '@supabase/supabase-js/cors'\n *\n * Deno.serve(async (req) => {\n * if (req.method === 'OPTIONS') {\n * return new Response('ok', { headers: corsHeaders })\n * }\n *\n * return new Response(\n * JSON.stringify({ data: 'Hello' }),\n * { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }\n * )\n * })\n * ```\n */\nexport const corsHeaders: CorsHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Headers': SUPABASE_HEADERS,\n 'Access-Control-Allow-Methods': SUPABASE_METHODS,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,mBAAmB;CAAC;CAAiB;CAAiB;CAAU;CAAe,CAAC,KAAK,KAAK;;;;AAKhG,MAAM,mBAAmB;CAAC;CAAO;CAAQ;CAAO;CAAS;CAAU;CAAU,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;;;;;;;AA6BxF,MAAaA,cAA2B;CACtC,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;CACjC"}
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 = "2.100.0";
8
+ const version = "2.101.0-canary.0";
9
9
 
10
10
  //#endregion
11
11
  //#region src/lib/constants.ts
@@ -470,6 +470,13 @@ var SupabaseClient = class {
470
470
  }
471
471
  /**
472
472
  * Returns all Realtime channels.
473
+ *
474
+ * @category Initializing
475
+ *
476
+ * @example Get all channels
477
+ * ```js
478
+ * const channels = supabase.getChannels()
479
+ * ```
473
480
  */
474
481
  getChannels() {
475
482
  return this.realtime.getChannels();
@@ -479,12 +486,32 @@ var SupabaseClient = class {
479
486
  *
480
487
  * @param {RealtimeChannel} channel - The name of the Realtime channel.
481
488
  *
489
+ *
490
+ * @category Initializing
491
+ *
492
+ * @remarks
493
+ * - 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.
494
+ *
495
+ * @example Removes a channel
496
+ * ```js
497
+ * supabase.removeChannel(myChannel)
498
+ * ```
482
499
  */
483
500
  removeChannel(channel) {
484
501
  return this.realtime.removeChannel(channel);
485
502
  }
486
503
  /**
487
504
  * Unsubscribes and removes all Realtime channels from Realtime client.
505
+ *
506
+ * @category Initializing
507
+ *
508
+ * @remarks
509
+ * - 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.
510
+ *
511
+ * @example Remove all channels
512
+ * ```js
513
+ * supabase.removeAllChannels()
514
+ * ```
488
515
  */
489
516
  removeAllChannels() {
490
517
  return this.realtime.removeAllChannels();
@@ -543,7 +570,7 @@ var SupabaseClient = class {
543
570
  /**
544
571
  * Creates a new Supabase Client.
545
572
  *
546
- * @example
573
+ * @example Creating a Supabase client
547
574
  * ```ts
548
575
  * import { createClient } from '@supabase/supabase-js'
549
576
  *
@@ -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 = '2.100.0'\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', 'public-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 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 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 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} from '@supabase/postgrest-js'\nexport { PostgrestError } from '@supabase/postgrest-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\n * ```ts\n * import { createClient } from '@supabase/supabase-js'\n *\n * const supabase = createClient('https://xyzcompany.supabase.co', 'public-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;;;;AC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IONS","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 = '2.101.0-canary.0'\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', 'public-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} from '@supabase/postgrest-js'\nexport { PostgrestError } from '@supabase/postgrest-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', 'public-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,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,SAAQ,IAAI,iBAAiB,UAAU,cAAc;AAGvD,SAAOA,QAAM,yCAAY,aAAM,WAAU;;;;;;ACtB7C,SAAgB,oBAAoB,KAAqB;AACvD,Q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3B;;AAGzB,IAAI,8BAA8B,CAChC,SAAQ,KACN,8OAGD"}
package/dist/index.d.cts CHANGED
@@ -62,7 +62,7 @@ type SupabaseClientOptions<SchemaName> = {
62
62
  * Optional timeout in milliseconds for PostgREST requests.
63
63
  * When set, requests will automatically abort after this duration to prevent indefinite hangs.
64
64
  *
65
- * @example
65
+ * @example With timeout
66
66
  * ```ts
67
67
  * const supabase = createClient(url, key, {
68
68
  * db: { timeout: 30000 } // 30 second timeout
@@ -75,7 +75,7 @@ type SupabaseClientOptions<SchemaName> = {
75
75
  * Defaults to 8000 characters. Used to provide helpful hints when URLs
76
76
  * exceed server limits.
77
77
  *
78
- * @example
78
+ * @example With custom URL length limit
79
79
  * ```ts
80
80
  * const supabase = createClient(url, key, {
81
81
  * db: { urlLengthLimit: 10000 } // Custom limit
@@ -108,7 +108,7 @@ type SupabaseClientOptions<SchemaName> = {
108
108
  * also return access_token in the URL fragment, which would otherwise be incorrectly
109
109
  * intercepted by Supabase Auth.
110
110
  *
111
- * @example
111
+ * @example With custom detection logic
112
112
  * ```ts
113
113
  * detectSessionInUrl: (url, params) => {
114
114
  * // Ignore Facebook OAuth redirects
@@ -193,7 +193,7 @@ type QueryError = PostgrestError$1;
193
193
  * Strips internal Supabase metadata from Database types.
194
194
  * Useful for libraries defining generic constraints on Database types.
195
195
  *
196
- * @example
196
+ * @example Stripping internal Supabase metadata
197
197
  * ```typescript
198
198
  * type CleanDB = DatabaseWithoutInternals<Database>
199
199
  * ```
@@ -524,6 +524,13 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
524
524
  channel(name: string, opts?: RealtimeChannelOptions): RealtimeChannel;
525
525
  /**
526
526
  * Returns all Realtime channels.
527
+ *
528
+ * @category Initializing
529
+ *
530
+ * @example Get all channels
531
+ * ```js
532
+ * const channels = supabase.getChannels()
533
+ * ```
527
534
  */
528
535
  getChannels(): RealtimeChannel[];
529
536
  /**
@@ -531,10 +538,30 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
531
538
  *
532
539
  * @param {RealtimeChannel} channel - The name of the Realtime channel.
533
540
  *
541
+ *
542
+ * @category Initializing
543
+ *
544
+ * @remarks
545
+ * - 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.
546
+ *
547
+ * @example Removes a channel
548
+ * ```js
549
+ * supabase.removeChannel(myChannel)
550
+ * ```
534
551
  */
535
552
  removeChannel(channel: RealtimeChannel): Promise<'ok' | 'timed out' | 'error'>;
536
553
  /**
537
554
  * Unsubscribes and removes all Realtime channels from Realtime client.
555
+ *
556
+ * @category Initializing
557
+ *
558
+ * @remarks
559
+ * - 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.
560
+ *
561
+ * @example Remove all channels
562
+ * ```js
563
+ * supabase.removeAllChannels()
564
+ * ```
538
565
  */
539
566
  removeAllChannels(): Promise<('ok' | 'timed out' | 'error')[]>;
540
567
  private _getAccessToken;
@@ -548,7 +575,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
548
575
  /**
549
576
  * Creates a new Supabase Client.
550
577
  *
551
- * @example
578
+ * @example Creating a Supabase client
552
579
  * ```ts
553
580
  * import { createClient } from '@supabase/supabase-js'
554
581
  *
@@ -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":";;;;;;;;;KAcY,mBAAA;EAAA,cAAA,EAAA,MAAmB;EAQnB,OAAA,EAAA,MAAY,EAAA;EACjB,UAAA,CAAA,EAAA,OAAA;EACG,kBAAA,EAAA,MAAA;EACA,iBA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AAGpC,CAAA,IAAY,QAAA,SAAA,MKQgD,ILRzB,CKQ8B,QLR9B,EAC5B,oBACU,CAAA,GAAA,QAAmB,GAAA,MAAA,GAAA,MKQf,ILRe,CKQV,QLRU,EAAA,oBAAA,CAAA,GAAA,mBAAA,MAAA,GAAA,MKU1B,ILV0B,CKUrB,QLVqB,EAAA,oBAAA,CAAA,IKUa,yBLVb,SAAA,MAAA,GAAA,MKW1B,ILX0B,CKWrB,QLXqB,EAAA,oBAAA,CAAA,GKY9B,yBLZ8B,GAAA,QAAA,SAAA,MKaP,ILbO,CKaF,QLbE,EAAA,oBAAA,CAAA,GAAA,QAAA,GAAA,MAAA,GAAA,MKeb,ILfa,CKeR,ILfQ,CKeH,QLfG,EAAA,oBAAA,CAAA,EAAA,oBAAA,CAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EKmBxB,qBLnBwB,CKmBF,ULnBE,CAAA,EAAA,GKoBjC,cLpBiC,CKoBlB,QLpBkB,EKoBR,yBLpBQ,EKoBmB,ULpBnB,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":";;;;;;;;;KAcY,mBAAA;EAAA,cAAA,EAAA,MAAmB;EAQnB,OAAA,EAAA,MAAY,EAAA;EACjB,UAAA,CAAA,EAAA,OAAA;EACG,kBAAA,EAAA,MAAA;EACA,iBAAA,EAAA,MAAA,EAAA;CACO;AAAmB,KAJxB,YAAA,GAIwB;EAGxB,GAAA,EANL,MAMK,CAAA,MAAA,EAAA,OAAoB,CAAA;EACzB,MAAA,EANG,MAMH,CAAA,MAAA,EAAA,OAAA,CAAA;EACG,MAAA,EANA,MAMA,CAAA,MAAA,EAAA,OAAA,CAAA;EACA,aAAA,EANO,mBAMP,EA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AA,oBAAA,CAAA,IKUa,yBLVb,SAAA,MAAA,GAAA,MKW1B,ILX0B,CKWrB,QLXqB,EAAA,oBAAA,CAAA,GKY9B,yBLZ8B,GAAA,QAAA,SAAA,MKaP,ILbO,CKaF,QLbE,EAAA,oBAAA,CAAA,GAAA,QAAA,GAAA,MAAA,GAAA,MKeb,ILfa,CKeR,ILfQ,CKeH,QLfG,EAAA,oBAAA,CAAA,EAAA,oBAAA,CAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EKmBxB,qBLnBwB,CKmBF,ULnBE,CAAA,EAAA,GKoBjC,cLpBiC,CKoBlB,QLpBkB,EKoBR,yBLpBQ,EKoBmB,ULpBnB,CAAA"}
package/dist/index.d.mts CHANGED
@@ -62,7 +62,7 @@ type SupabaseClientOptions<SchemaName> = {
62
62
  * Optional timeout in milliseconds for PostgREST requests.
63
63
  * When set, requests will automatically abort after this duration to prevent indefinite hangs.
64
64
  *
65
- * @example
65
+ * @example With timeout
66
66
  * ```ts
67
67
  * const supabase = createClient(url, key, {
68
68
  * db: { timeout: 30000 } // 30 second timeout
@@ -75,7 +75,7 @@ type SupabaseClientOptions<SchemaName> = {
75
75
  * Defaults to 8000 characters. Used to provide helpful hints when URLs
76
76
  * exceed server limits.
77
77
  *
78
- * @example
78
+ * @example With custom URL length limit
79
79
  * ```ts
80
80
  * const supabase = createClient(url, key, {
81
81
  * db: { urlLengthLimit: 10000 } // Custom limit
@@ -108,7 +108,7 @@ type SupabaseClientOptions<SchemaName> = {
108
108
  * also return access_token in the URL fragment, which would otherwise be incorrectly
109
109
  * intercepted by Supabase Auth.
110
110
  *
111
- * @example
111
+ * @example With custom detection logic
112
112
  * ```ts
113
113
  * detectSessionInUrl: (url, params) => {
114
114
  * // Ignore Facebook OAuth redirects
@@ -193,7 +193,7 @@ type QueryError = PostgrestError$1;
193
193
  * Strips internal Supabase metadata from Database types.
194
194
  * Useful for libraries defining generic constraints on Database types.
195
195
  *
196
- * @example
196
+ * @example Stripping internal Supabase metadata
197
197
  * ```typescript
198
198
  * type CleanDB = DatabaseWithoutInternals<Database>
199
199
  * ```
@@ -524,6 +524,13 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
524
524
  channel(name: string, opts?: RealtimeChannelOptions): RealtimeChannel;
525
525
  /**
526
526
  * Returns all Realtime channels.
527
+ *
528
+ * @category Initializing
529
+ *
530
+ * @example Get all channels
531
+ * ```js
532
+ * const channels = supabase.getChannels()
533
+ * ```
527
534
  */
528
535
  getChannels(): RealtimeChannel[];
529
536
  /**
@@ -531,10 +538,30 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
531
538
  *
532
539
  * @param {RealtimeChannel} channel - The name of the Realtime channel.
533
540
  *
541
+ *
542
+ * @category Initializing
543
+ *
544
+ * @remarks
545
+ * - 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.
546
+ *
547
+ * @example Removes a channel
548
+ * ```js
549
+ * supabase.removeChannel(myChannel)
550
+ * ```
534
551
  */
535
552
  removeChannel(channel: RealtimeChannel): Promise<'ok' | 'timed out' | 'error'>;
536
553
  /**
537
554
  * Unsubscribes and removes all Realtime channels from Realtime client.
555
+ *
556
+ * @category Initializing
557
+ *
558
+ * @remarks
559
+ * - 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.
560
+ *
561
+ * @example Remove all channels
562
+ * ```js
563
+ * supabase.removeAllChannels()
564
+ * ```
538
565
  */
539
566
  removeAllChannels(): Promise<('ok' | 'timed out' | 'error')[]>;
540
567
  private _getAccessToken;
@@ -548,7 +575,7 @@ declare class SupabaseClient<Database = any, SchemaNameOrClientOptions extends (
548
575
  /**
549
576
  * Creates a new Supabase Client.
550
577
  *
551
- * @example
578
+ * @example Creating a Supabase client
552
579
  * ```ts
553
580
  * import { createClient } from '@supabase/supabase-js'
554
581
  *