@supabase/lite 0.0.1
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/Connection-BJclIu8v.d.ts +529 -0
- package/dist/Connection-BsiQMo4A.d.ts +562 -0
- package/dist/Connection-rAPmec1m.d.ts +710 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +29518 -0
- package/dist/cli/lib.d.ts +158 -0
- package/dist/cli/lib.js +6343 -0
- package/dist/db/browser/index.d.ts +550 -0
- package/dist/db/browser/index.js +15682 -0
- package/dist/db/bun/index.d.ts +548 -0
- package/dist/db/bun/index.js +15670 -0
- package/dist/db/fallback.d.ts +182 -0
- package/dist/db/fallback.js +15566 -0
- package/dist/db/node/index.d.ts +547 -0
- package/dist/db/node/index.js +15663 -0
- package/dist/db/postgres/BasePostgresConnection-B7zHDAib.d.ts +24 -0
- package/dist/db/postgres/BasePostgresConnection-COHRCvc-.d.ts +24 -0
- package/dist/db/postgres/BasePostgresConnection-Di94o0ON.d.ts +24 -0
- package/dist/db/postgres/PostgresConnection.d.ts +16 -0
- package/dist/db/postgres/PostgresConnection.js +611 -0
- package/dist/db/postgres/index.js +802 -0
- package/dist/db/postgres/pglite/PgliteConnection.d.ts +38 -0
- package/dist/db/postgres/pglite/PgliteConnection.js +890 -0
- package/dist/db/sqlite/index.js +14724 -0
- package/dist/db/workerd/index.d.ts +570 -0
- package/dist/db/workerd/index.js +15788 -0
- package/dist/index-4cbfQyFv.d.ts +763 -0
- package/dist/index-xv_pDjEt.d.ts +769 -0
- package/dist/index.d.ts +2498 -0
- package/dist/index.js +32303 -0
- package/dist/static/.vite/manifest.json +11 -0
- package/dist/static/assets/main-BsWx0q9l.js +40913 -0
- package/dist/static/assets/main-DexXgo9R.css +4002 -0
- package/dist/static/favicon.ico +0 -0
- package/dist/static/fonts/CustomFont-Black.woff2 +0 -0
- package/dist/static/fonts/CustomFont-BlackItalic.woff2 +0 -0
- package/dist/static/fonts/CustomFont-Bold.woff2 +0 -0
- package/dist/static/fonts/CustomFont-BoldItalic.woff2 +0 -0
- package/dist/static/fonts/CustomFont-Book.woff2 +0 -0
- package/dist/static/fonts/CustomFont-BookItalic.woff2 +0 -0
- package/dist/static/fonts/CustomFont-Medium.woff2 +0 -0
- package/dist/vite/index.d.ts +3017 -0
- package/dist/vite/index.js +1923 -0
- package/package.json +195 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IConnectionConfig, Connection, IntrospectResult, VarsContext, ConnectionContextOptions, AnyAST, TransactionOptions } from '@supabase/lite';
|
|
2
|
+
import { Kysely } from 'kysely';
|
|
3
|
+
|
|
4
|
+
interface IBasePostgresConnectionConfig extends IConnectionConfig {
|
|
5
|
+
}
|
|
6
|
+
declare abstract class BasePostgresConnection<Driver = unknown, DB = any> extends Connection<Driver, DB> {
|
|
7
|
+
abstract driver: Driver;
|
|
8
|
+
dialect: "postgres";
|
|
9
|
+
constructor(options: IBasePostgresConnectionConfig);
|
|
10
|
+
introspect(options?: {
|
|
11
|
+
useCache?: boolean;
|
|
12
|
+
}): Promise<IntrospectResult>;
|
|
13
|
+
private rlsState;
|
|
14
|
+
/**
|
|
15
|
+
* Detect if any table has RLS enabled, and if so ensure anon/authenticated
|
|
16
|
+
* roles exist with default privileges. Runs once per connection.
|
|
17
|
+
*/
|
|
18
|
+
private ensureRlsContext;
|
|
19
|
+
withContext<T>(vars: VarsContext | undefined, fn: (db: Kysely<any>) => Promise<T>, opts?: ConnectionContextOptions): Promise<T>;
|
|
20
|
+
onPostgrestAST(ast: AnyAST): Promise<AnyAST>;
|
|
21
|
+
transaction(statements: string[], opts?: TransactionOptions): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { BasePostgresConnection as B, type IBasePostgresConnectionConfig as I };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IConnectionConfig, Connection, IntrospectResult, VarsContext, AnyAST, TransactionOptions } from 'lite-supa';
|
|
2
|
+
import { Kysely } from 'kysely';
|
|
3
|
+
|
|
4
|
+
interface IBasePostgresConnectionConfig extends IConnectionConfig {
|
|
5
|
+
}
|
|
6
|
+
declare abstract class BasePostgresConnection<Driver = unknown, DB = any> extends Connection<Driver, DB> {
|
|
7
|
+
abstract driver: Driver;
|
|
8
|
+
dialect: "postgres";
|
|
9
|
+
constructor(options: IBasePostgresConnectionConfig);
|
|
10
|
+
introspect(options?: {
|
|
11
|
+
useCache?: boolean;
|
|
12
|
+
}): Promise<IntrospectResult>;
|
|
13
|
+
private rlsState;
|
|
14
|
+
/**
|
|
15
|
+
* Detect if any table has RLS enabled, and if so ensure anon/authenticated
|
|
16
|
+
* roles exist with default privileges. Runs once per connection.
|
|
17
|
+
*/
|
|
18
|
+
private ensureRlsContext;
|
|
19
|
+
withContext<T>(vars: VarsContext | undefined, fn: (db: Kysely<any>) => Promise<T>): Promise<T>;
|
|
20
|
+
onPostgrestAST(ast: AnyAST): Promise<AnyAST>;
|
|
21
|
+
transaction(statements: string[], opts?: TransactionOptions): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { BasePostgresConnection as B, type IBasePostgresConnectionConfig as I };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IConnectionConfig, Connection, IntrospectResult, VarsContext, ConnectionContextOptions, AnyAST, TransactionOptions } from 'lite-supa';
|
|
2
|
+
import { Kysely } from 'kysely';
|
|
3
|
+
|
|
4
|
+
interface IBasePostgresConnectionConfig extends IConnectionConfig {
|
|
5
|
+
}
|
|
6
|
+
declare abstract class BasePostgresConnection<Driver = unknown, DB = any> extends Connection<Driver, DB> {
|
|
7
|
+
abstract driver: Driver;
|
|
8
|
+
dialect: "postgres";
|
|
9
|
+
constructor(options: IBasePostgresConnectionConfig);
|
|
10
|
+
introspect(options?: {
|
|
11
|
+
useCache?: boolean;
|
|
12
|
+
}): Promise<IntrospectResult>;
|
|
13
|
+
private rlsState;
|
|
14
|
+
/**
|
|
15
|
+
* Detect if any table has RLS enabled, and if so ensure anon/authenticated
|
|
16
|
+
* roles exist with default privileges. Runs once per connection.
|
|
17
|
+
*/
|
|
18
|
+
private ensureRlsContext;
|
|
19
|
+
withContext<T>(vars: VarsContext | undefined, fn: (db: Kysely<any>) => Promise<T>, opts?: ConnectionContextOptions): Promise<T>;
|
|
20
|
+
onPostgrestAST(ast: AnyAST): Promise<AnyAST>;
|
|
21
|
+
transaction(statements: string[], opts?: TransactionOptions): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { BasePostgresConnection as B, type IBasePostgresConnectionConfig as I };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import postgres from 'postgres';
|
|
2
|
+
import { I as IBasePostgresConnectionConfig, B as BasePostgresConnection } from './BasePostgresConnection-B7zHDAib.js';
|
|
3
|
+
import '@supabase/lite';
|
|
4
|
+
import 'kysely';
|
|
5
|
+
|
|
6
|
+
interface IPostgresConnectionConfig extends IBasePostgresConnectionConfig {
|
|
7
|
+
}
|
|
8
|
+
declare class PostgresConnection extends BasePostgresConnection<postgres.Sql, any> {
|
|
9
|
+
driver: postgres.Sql<any>;
|
|
10
|
+
dialect: "postgres";
|
|
11
|
+
constructor(config: IPostgresConnectionConfig);
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
declare function createPostgresConnection(config: IPostgresConnectionConfig): PostgresConnection;
|
|
15
|
+
|
|
16
|
+
export { type IPostgresConnectionConfig, PostgresConnection, createPostgresConnection };
|