Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@supabase/supabase-js

Package Overview
Dependencies
Maintainers
12
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/supabase-js - npm Package Compare versions

Comparing version 2.47.4-rc.1 to 2.47.4

9

dist/main/lib/types.d.ts

@@ -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;

2

dist/main/lib/version.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc