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

@supabase/supabase-js

Package Overview
Dependencies
Maintainers
9
Versions
339
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.39.1 to 2.39.2

2

dist/main/lib/version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "2.39.1";
export declare const version = "2.39.2";
//# sourceMappingURL=version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '2.39.1';
exports.version = '2.39.2';
//# sourceMappingURL=version.js.map
import { FunctionsClient } from '@supabase/functions-js';
import { PostgrestClient, PostgrestFilterBuilder, PostgrestQueryBuilder } from '@supabase/postgrest-js';
import { PostgrestClient } from '@supabase/postgrest-js';
import { RealtimeChannel, RealtimeChannelOptions, RealtimeClient } from '@supabase/realtime-js';

@@ -52,6 +52,9 @@ import { StorageClient as SupabaseStorageClient } from '@supabase/storage-js';

get storage(): SupabaseStorageClient;
from<TableName extends string & keyof Schema['Tables'], Table extends Schema['Tables'][TableName]>(relation: TableName): PostgrestQueryBuilder<Schema, Table>;
from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>(relation: ViewName): PostgrestQueryBuilder<Schema, View>;
from(relation: string): PostgrestQueryBuilder<Schema, any>;
/**
* Perform a query on a table or a view.
*
* @param relation - The table or view name to query
*/
from: PostgrestClient<Database, SchemaName>['from'];
/**
* Perform a query on a schema distinct from the default schema supplied via

@@ -64,3 +67,3 @@ * the `options.db.schema` constructor parameter.

*/
schema<DynamicSchema extends string & keyof Database>(schema: DynamicSchema): PostgrestClient<Database, DynamicSchema, Database[DynamicSchema] extends GenericSchema ? Database[DynamicSchema] : any>;
schema: PostgrestClient<Database, SchemaName>['schema'];
/**

@@ -87,6 +90,3 @@ * Perform a function call.

*/
rpc<FunctionName extends string & keyof Schema['Functions'], Function_ extends Schema['Functions'][FunctionName]>(fn: FunctionName, args?: Function_['Args'], options?: {
head?: boolean;
count?: 'exact' | 'planned' | 'estimated';
}): PostgrestFilterBuilder<Schema, Function_['Returns'] extends any[] ? Function_['Returns'][number] extends Record<string, unknown> ? Function_['Returns'][number] : never : never, Function_['Returns']>;
rpc: PostgrestClient<Database, SchemaName>['rpc'];
/**

@@ -93,0 +93,0 @@ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.

@@ -55,2 +55,45 @@ "use strict";

this.supabaseKey = supabaseKey;
/**
* Perform a query on a table or a view.
*
* @param relation - The table or view name to query
*/
this.from = (relation) => {
return this.rest.from(relation);
};
/**
* Perform a query on a schema distinct from the default schema supplied via
* the `options.db.schema` constructor parameter.
*
* The schema needs to be on the list of exposed schemas inside Supabase.
*
* @param schema - The name of the schema to query
*/
this.schema = (schema) => {
return this.rest.schema(schema);
};
/**
* Perform a function call.
*
* @param fn - The function name to call
* @param args - The arguments to pass to the function call
* @param options - Named parameters
* @param options.head - When set to `true`, `data` will not be returned.
* Useful if you only need the count.
* @param options.count - Count algorithm to use to count rows returned by the
* function. Only applicable for [set-returning
* functions](https://www.postgresql.org/docs/current/functions-srf.html).
*
* `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
* hood.
*
* `"planned"`: Approximated but fast count algorithm. Uses the Postgres
* statistics under the hood.
*
* `"estimated"`: Uses exact count for low numbers and planned count for high
* numbers.
*/
this.rpc = (fn, args = {}, options) => {
return this.rest.rpc(fn, args, options);
};
if (!supabaseUrl)

@@ -102,45 +145,2 @@ throw new Error('supabaseUrl is required.');

/**
* Perform a query on a table or a view.
*
* @param relation - The table or view name to query
*/
from(relation) {
return this.rest.from(relation);
}
/**
* Perform a query on a schema distinct from the default schema supplied via
* the `options.db.schema` constructor parameter.
*
* The schema needs to be on the list of exposed schemas inside Supabase.
*
* @param schema - The name of the schema to query
*/
schema(schema) {
return this.rest.schema(schema);
}
/**
* Perform a function call.
*
* @param fn - The function name to call
* @param args - The arguments to pass to the function call
* @param options - Named parameters
* @param options.head - When set to `true`, `data` will not be returned.
* Useful if you only need the count.
* @param options.count - Count algorithm to use to count rows returned by the
* function. Only applicable for [set-returning
* functions](https://www.postgresql.org/docs/current/functions-srf.html).
*
* `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
* hood.
*
* `"planned"`: Approximated but fast count algorithm. Uses the Postgres
* statistics under the hood.
*
* `"estimated"`: Uses exact count for low numbers and planned count for high
* numbers.
*/
rpc(fn, args = {}, options) {
return this.rest.rpc(fn, args, options);
}
/**
* Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.

@@ -147,0 +147,0 @@ *

@@ -1,2 +0,2 @@

export declare const version = "2.39.1";
export declare const version = "2.39.2";
//# sourceMappingURL=version.d.ts.map

@@ -1,2 +0,2 @@

export const version = '2.39.1';
export const version = '2.39.2';
//# sourceMappingURL=version.js.map
import { FunctionsClient } from '@supabase/functions-js';
import { PostgrestClient, PostgrestFilterBuilder, PostgrestQueryBuilder } from '@supabase/postgrest-js';
import { PostgrestClient } from '@supabase/postgrest-js';
import { RealtimeChannel, RealtimeChannelOptions, RealtimeClient } from '@supabase/realtime-js';

@@ -52,6 +52,9 @@ import { StorageClient as SupabaseStorageClient } from '@supabase/storage-js';

get storage(): SupabaseStorageClient;
from<TableName extends string & keyof Schema['Tables'], Table extends Schema['Tables'][TableName]>(relation: TableName): PostgrestQueryBuilder<Schema, Table>;
from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>(relation: ViewName): PostgrestQueryBuilder<Schema, View>;
from(relation: string): PostgrestQueryBuilder<Schema, any>;
/**
* Perform a query on a table or a view.
*
* @param relation - The table or view name to query
*/
from: PostgrestClient<Database, SchemaName>['from'];
/**
* Perform a query on a schema distinct from the default schema supplied via

@@ -64,3 +67,3 @@ * the `options.db.schema` constructor parameter.

*/
schema<DynamicSchema extends string & keyof Database>(schema: DynamicSchema): PostgrestClient<Database, DynamicSchema, Database[DynamicSchema] extends GenericSchema ? Database[DynamicSchema] : any>;
schema: PostgrestClient<Database, SchemaName>['schema'];
/**

@@ -87,6 +90,3 @@ * Perform a function call.

*/
rpc<FunctionName extends string & keyof Schema['Functions'], Function_ extends Schema['Functions'][FunctionName]>(fn: FunctionName, args?: Function_['Args'], options?: {
head?: boolean;
count?: 'exact' | 'planned' | 'estimated';
}): PostgrestFilterBuilder<Schema, Function_['Returns'] extends any[] ? Function_['Returns'][number] extends Record<string, unknown> ? Function_['Returns'][number] : never : never, Function_['Returns']>;
rpc: PostgrestClient<Database, SchemaName>['rpc'];
/**

@@ -93,0 +93,0 @@ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.

@@ -11,3 +11,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { FunctionsClient } from '@supabase/functions-js';
import { PostgrestClient, } from '@supabase/postgrest-js';
import { PostgrestClient } from '@supabase/postgrest-js';
import { RealtimeClient, } from '@supabase/realtime-js';

@@ -54,2 +54,45 @@ import { StorageClient as SupabaseStorageClient } from '@supabase/storage-js';

this.supabaseKey = supabaseKey;
/**
* Perform a query on a table or a view.
*
* @param relation - The table or view name to query
*/
this.from = (relation) => {
return this.rest.from(relation);
};
/**
* Perform a query on a schema distinct from the default schema supplied via
* the `options.db.schema` constructor parameter.
*
* The schema needs to be on the list of exposed schemas inside Supabase.
*
* @param schema - The name of the schema to query
*/
this.schema = (schema) => {
return this.rest.schema(schema);
};
/**
* Perform a function call.
*
* @param fn - The function name to call
* @param args - The arguments to pass to the function call
* @param options - Named parameters
* @param options.head - When set to `true`, `data` will not be returned.
* Useful if you only need the count.
* @param options.count - Count algorithm to use to count rows returned by the
* function. Only applicable for [set-returning
* functions](https://www.postgresql.org/docs/current/functions-srf.html).
*
* `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
* hood.
*
* `"planned"`: Approximated but fast count algorithm. Uses the Postgres
* statistics under the hood.
*
* `"estimated"`: Uses exact count for low numbers and planned count for high
* numbers.
*/
this.rpc = (fn, args = {}, options) => {
return this.rest.rpc(fn, args, options);
};
if (!supabaseUrl)

@@ -101,45 +144,2 @@ throw new Error('supabaseUrl is required.');

/**
* Perform a query on a table or a view.
*
* @param relation - The table or view name to query
*/
from(relation) {
return this.rest.from(relation);
}
/**
* Perform a query on a schema distinct from the default schema supplied via
* the `options.db.schema` constructor parameter.
*
* The schema needs to be on the list of exposed schemas inside Supabase.
*
* @param schema - The name of the schema to query
*/
schema(schema) {
return this.rest.schema(schema);
}
/**
* Perform a function call.
*
* @param fn - The function name to call
* @param args - The arguments to pass to the function call
* @param options - Named parameters
* @param options.head - When set to `true`, `data` will not be returned.
* Useful if you only need the count.
* @param options.count - Count algorithm to use to count rows returned by the
* function. Only applicable for [set-returning
* functions](https://www.postgresql.org/docs/current/functions-srf.html).
*
* `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
* hood.
*
* `"planned"`: Approximated but fast count algorithm. Uses the Postgres
* statistics under the hood.
*
* `"estimated"`: Uses exact count for low numbers and planned count for high
* numbers.
*/
rpc(fn, args = {}, options) {
return this.rest.rpc(fn, args, options);
}
/**
* Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.

@@ -146,0 +146,0 @@ *

{
"name": "@supabase/supabase-js",
"version": "2.39.1",
"version": "2.39.2",
"description": "Isomorphic Javascript client for Supabase",

@@ -43,3 +43,3 @@ "keywords": [

"@supabase/node-fetch": "^2.6.14",
"@supabase/postgrest-js": "^1.8.6",
"@supabase/postgrest-js": "^1.9.0",
"@supabase/realtime-js": "^2.8.4",

@@ -46,0 +46,0 @@ "@supabase/storage-js": "^2.5.4"

@@ -1,1 +0,1 @@

export const version = '2.39.1'
export const version = '2.39.2'
import { FunctionsClient } from '@supabase/functions-js'
import { AuthChangeEvent } from '@supabase/gotrue-js'
import { PostgrestClient } from '@supabase/postgrest-js'
import {
PostgrestClient,
PostgrestFilterBuilder,
PostgrestQueryBuilder,
} from '@supabase/postgrest-js'
import {
RealtimeChannel,

@@ -146,10 +142,2 @@ RealtimeChannelOptions,

from<
TableName extends string & keyof Schema['Tables'],
Table extends Schema['Tables'][TableName]
>(relation: TableName): PostgrestQueryBuilder<Schema, Table>
from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>(
relation: ViewName
): PostgrestQueryBuilder<Schema, View>
from(relation: string): PostgrestQueryBuilder<Schema, any>
/**

@@ -160,3 +148,3 @@ * Perform a query on a table or a view.

*/
from(relation: string): PostgrestQueryBuilder<Schema, any> {
from: PostgrestClient<Database, SchemaName>['from'] = (relation: string) => {
return this.rest.from(relation)

@@ -173,9 +161,7 @@ }

*/
schema<DynamicSchema extends string & keyof Database>(
schema: PostgrestClient<Database, SchemaName>['schema'] = <
DynamicSchema extends string & keyof Database
>(
schema: DynamicSchema
): PostgrestClient<
Database,
DynamicSchema,
Database[DynamicSchema] extends GenericSchema ? Database[DynamicSchema] : any
> {
) => {
return this.rest.schema<DynamicSchema>(schema)

@@ -205,3 +191,3 @@ }

*/
rpc<
rpc: PostgrestClient<Database, SchemaName>['rpc'] = <
FunctionName extends string & keyof Schema['Functions'],

@@ -216,11 +202,3 @@ Function_ extends Schema['Functions'][FunctionName]

}
): PostgrestFilterBuilder<
Schema,
Function_['Returns'] extends any[]
? Function_['Returns'][number] extends Record<string, unknown>
? Function_['Returns'][number]
: never
: never,
Function_['Returns']
> {
) => {
return this.rest.rpc(fn, args, options)

@@ -227,0 +205,0 @@ }

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