@supabase/supabase-js
Advanced tools
Comparing version 2.47.4-rc.1 to 2.47.4
@@ -78,9 +78,2 @@ import { AuthClient } from '@supabase/auth-js'; | ||
}; | ||
export declare type GenericRelationship = { | ||
foreignKeyName: string; | ||
columns: string[]; | ||
isOneToOne?: boolean; | ||
referencedRelation: string; | ||
referencedColumns: string[]; | ||
}; | ||
export declare type GenericTable = { | ||
@@ -90,3 +83,2 @@ Row: Record<string, unknown>; | ||
Update: Record<string, unknown>; | ||
Relationships: GenericRelationship[]; | ||
}; | ||
@@ -96,3 +88,2 @@ export declare type GenericUpdatableView = GenericTable; | ||
Row: Record<string, unknown>; | ||
Relationships: GenericRelationship[]; | ||
}; | ||
@@ -99,0 +90,0 @@ export declare type GenericView = GenericUpdatableView | GenericNonUpdatableView; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.47.4-rc.1"; | ||
export declare const version = "2.47.4"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '2.47.4-rc.1'; | ||
exports.version = '2.47.4'; | ||
//# sourceMappingURL=version.js.map |
@@ -88,3 +88,3 @@ import { FunctionsClient } from '@supabase/functions-js'; | ||
count?: 'exact' | 'planned' | 'estimated'; | ||
}): PostgrestFilterBuilder<Schema, Fn['Returns'] extends any[] ? Fn['Returns'][number] extends Record<string, unknown> ? Fn['Returns'][number] : never : never, Fn['Returns'], FnName, null>; | ||
}): PostgrestFilterBuilder<Schema, Fn['Returns'] extends any[] ? Fn['Returns'][number] extends Record<string, unknown> ? Fn['Returns'][number] : never : never, Fn['Returns']>; | ||
/** | ||
@@ -91,0 +91,0 @@ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes. |
@@ -213,18 +213,22 @@ "use strict"; | ||
_listenForAuthEvents() { | ||
let data = this.auth.onAuthStateChange((event, session) => { | ||
this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token); | ||
}); | ||
let data = this.auth.onAuthStateChange((event, session) => __awaiter(this, void 0, void 0, function* () { | ||
yield this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token); | ||
})); | ||
return data; | ||
} | ||
_handleTokenChanged(event, source, token) { | ||
if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') && | ||
this.changedAccessToken !== token) { | ||
this.changedAccessToken = token; | ||
} | ||
else if (event === 'SIGNED_OUT') { | ||
this.realtime.setAuth(); | ||
if (source == 'STORAGE') | ||
this.auth.signOut(); | ||
this.changedAccessToken = undefined; | ||
} | ||
return __awaiter(this, void 0, void 0, function* () { | ||
// On token change, call Realtime's `setAuth` to sync auth and connections. | ||
// Realtime handles token retrieval internally which may involve customizations, so we don't pass the token directly. | ||
yield this.realtime.setAuth(); | ||
if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') && | ||
this.changedAccessToken !== token) { | ||
this.changedAccessToken = token; | ||
} | ||
else if (event === 'SIGNED_OUT') { | ||
if (source == 'STORAGE') | ||
this.auth.signOut(); | ||
this.changedAccessToken = undefined; | ||
} | ||
}); | ||
} | ||
@@ -231,0 +235,0 @@ } |
@@ -78,9 +78,2 @@ import { AuthClient } from '@supabase/auth-js'; | ||
}; | ||
export declare type GenericRelationship = { | ||
foreignKeyName: string; | ||
columns: string[]; | ||
isOneToOne?: boolean; | ||
referencedRelation: string; | ||
referencedColumns: string[]; | ||
}; | ||
export declare type GenericTable = { | ||
@@ -90,3 +83,2 @@ Row: Record<string, unknown>; | ||
Update: Record<string, unknown>; | ||
Relationships: GenericRelationship[]; | ||
}; | ||
@@ -96,3 +88,2 @@ export declare type GenericUpdatableView = GenericTable; | ||
Row: Record<string, unknown>; | ||
Relationships: GenericRelationship[]; | ||
}; | ||
@@ -99,0 +90,0 @@ export declare type GenericView = GenericUpdatableView | GenericNonUpdatableView; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.47.4-rc.1"; | ||
export declare const version = "2.47.4"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export const version = '2.47.4-rc.1'; | ||
export const version = '2.47.4'; | ||
//# sourceMappingURL=version.js.map |
@@ -88,3 +88,3 @@ import { FunctionsClient } from '@supabase/functions-js'; | ||
count?: 'exact' | 'planned' | 'estimated'; | ||
}): PostgrestFilterBuilder<Schema, Fn['Returns'] extends any[] ? Fn['Returns'][number] extends Record<string, unknown> ? Fn['Returns'][number] : never : never, Fn['Returns'], FnName, null>; | ||
}): PostgrestFilterBuilder<Schema, Fn['Returns'] extends any[] ? Fn['Returns'][number] extends Record<string, unknown> ? Fn['Returns'][number] : never : never, Fn['Returns']>; | ||
/** | ||
@@ -91,0 +91,0 @@ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes. |
@@ -211,20 +211,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
_listenForAuthEvents() { | ||
let data = this.auth.onAuthStateChange((event, session) => { | ||
this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token); | ||
}); | ||
let data = this.auth.onAuthStateChange((event, session) => __awaiter(this, void 0, void 0, function* () { | ||
yield this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token); | ||
})); | ||
return data; | ||
} | ||
_handleTokenChanged(event, source, token) { | ||
if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') && | ||
this.changedAccessToken !== token) { | ||
this.changedAccessToken = token; | ||
} | ||
else if (event === 'SIGNED_OUT') { | ||
this.realtime.setAuth(); | ||
if (source == 'STORAGE') | ||
this.auth.signOut(); | ||
this.changedAccessToken = undefined; | ||
} | ||
return __awaiter(this, void 0, void 0, function* () { | ||
// On token change, call Realtime's `setAuth` to sync auth and connections. | ||
// Realtime handles token retrieval internally which may involve customizations, so we don't pass the token directly. | ||
yield this.realtime.setAuth(); | ||
if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') && | ||
this.changedAccessToken !== token) { | ||
this.changedAccessToken = token; | ||
} | ||
else if (event === 'SIGNED_OUT') { | ||
if (source == 'STORAGE') | ||
this.auth.signOut(); | ||
this.changedAccessToken = undefined; | ||
} | ||
}); | ||
} | ||
} | ||
//# sourceMappingURL=SupabaseClient.js.map |
{ | ||
"name": "@supabase/supabase-js", | ||
"version": "2.47.4-rc.1", | ||
"version": "2.47.4", | ||
"description": "Isomorphic Javascript client for Supabase", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"@supabase/node-fetch": "2.6.15", | ||
"@supabase/postgrest-js": "1.17.7", | ||
"@supabase/postgrest-js": "1.16.3", | ||
"@supabase/realtime-js": "2.11.2", | ||
@@ -49,0 +49,0 @@ "@supabase/storage-js": "2.7.1" |
@@ -14,3 +14,2 @@ # `supabase-js` - Isomorphic JavaScript Client for Supabase. | ||
Then you're able to import the library and establish the connection with the database: | ||
@@ -17,0 +16,0 @@ |
@@ -83,10 +83,2 @@ import { AuthClient } from '@supabase/auth-js' | ||
export type GenericRelationship = { | ||
foreignKeyName: string | ||
columns: string[] | ||
isOneToOne?: boolean | ||
referencedRelation: string | ||
referencedColumns: string[] | ||
} | ||
export type GenericTable = { | ||
@@ -96,3 +88,2 @@ Row: Record<string, unknown> | ||
Update: Record<string, unknown> | ||
Relationships: GenericRelationship[] | ||
} | ||
@@ -104,3 +95,2 @@ | ||
Row: Record<string, unknown> | ||
Relationships: GenericRelationship[] | ||
} | ||
@@ -107,0 +97,0 @@ |
@@ -1,1 +0,1 @@ | ||
export const version = '2.47.4-rc.1' | ||
export const version = '2.47.4' |
@@ -227,5 +227,3 @@ import { FunctionsClient } from '@supabase/functions-js' | ||
: never, | ||
Fn['Returns'], | ||
FnName, | ||
null | ||
Fn['Returns'] | ||
> { | ||
@@ -324,4 +322,4 @@ return this.rest.rpc(fn, args, options) | ||
private _listenForAuthEvents() { | ||
let data = this.auth.onAuthStateChange((event, session) => { | ||
this._handleTokenChanged(event, 'CLIENT', session?.access_token) | ||
let data = this.auth.onAuthStateChange(async (event, session) => { | ||
await this._handleTokenChanged(event, 'CLIENT', session?.access_token) | ||
}) | ||
@@ -331,3 +329,3 @@ return data | ||
private _handleTokenChanged( | ||
private async _handleTokenChanged( | ||
event: AuthChangeEvent, | ||
@@ -337,2 +335,5 @@ source: 'CLIENT' | 'STORAGE', | ||
) { | ||
// On token change, call Realtime's `setAuth` to sync auth and connections. | ||
// Realtime handles token retrieval internally which may involve customizations, so we don't pass the token directly. | ||
await this.realtime.setAuth() | ||
if ( | ||
@@ -344,3 +345,2 @@ (event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') && | ||
} else if (event === 'SIGNED_OUT') { | ||
this.realtime.setAuth() | ||
if (source == 'STORAGE') this.auth.signOut() | ||
@@ -347,0 +347,0 @@ this.changedAccessToken = undefined |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
237694
1934
95
+ Added@supabase/postgrest-js@1.16.3(transitive)
- Removed@supabase/postgrest-js@1.17.7(transitive)