@supabase/lite 0.7.1-next.6 → 0.7.1-next.7

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.
@@ -2818,6 +2818,9 @@ declare function createServer(app: App, options?: ServerOptions): hono_hono_base
2818
2818
  delete: never;
2819
2819
  } | undefined;
2820
2820
  } | undefined;
2821
+ system?: {
2822
+ schemaReconciliation?: "additive" | "full" | undefined;
2823
+ } | undefined;
2821
2824
  } | undefined;
2822
2825
  rls?: {
2823
2826
  tables: string[];
@@ -2997,14 +3000,25 @@ interface IAppConfig extends DefaultSchema {
2997
3000
  defaults?: boolean;
2998
3001
  server?: ServerOptions;
2999
3002
  drivers?: PartialAppDrivers;
3003
+ system?: SystemOptions;
3000
3004
  };
3001
3005
  }
3006
+ interface SystemOptions {
3007
+ /**
3008
+ * How `ensureSystemSchema()` reconciles system schemas against config:
3009
+ * `"additive"` (default) only creates missing tables/columns; `"full"` also
3010
+ * drops system tables removed from an enabled module's schema (data-loss
3011
+ * steps require `force`).
3012
+ */
3013
+ schemaReconciliation?: "additive" | "full";
3014
+ }
3002
3015
  interface DefaultAppConfig extends IAppConfig {
3003
3016
  connection: Connection;
3004
3017
  options?: {
3005
3018
  defaults?: true;
3006
3019
  server?: ServerOptions;
3007
3020
  drivers?: PartialAppDrivers;
3021
+ system?: SystemOptions;
3008
3022
  };
3009
3023
  }
3010
3024
  declare class App<Config extends IAppConfig = DefaultAppConfig, Conn = Config extends IAppConfig ? Config["connection"] extends Connection ? Config["connection"] : Config["connection"] extends Promise<Connection> ? Awaited<Config["connection"]> : Connection : never> {
@@ -3023,6 +3037,20 @@ declare class App<Config extends IAppConfig = DefaultAppConfig, Conn = Config ex
3023
3037
  * Initialize the app. This is called automatically on first request.
3024
3038
  */
3025
3039
  init(): Promise<this>;
3040
+ /**
3041
+ * Provision the enabled system schemas (auth / storage / migration-history)
3042
+ * on the connected database with NO filesystem access — the runtime entry
3043
+ * point for non-CLI consumers (e.g. a lite-platform Durable Object) and the
3044
+ * shared provisioning path for the CLI (LITE-291). Reconciles ONLY the system
3045
+ * schemas, so user-land tables are never touched. The reconciliation mode
3046
+ * comes from `options.system.schemaReconciliation` (default `"additive"`).
3047
+ *
3048
+ * @param opts.force allow data-loss drops in `"full"` mode (else throws
3049
+ * `DataLossError`).
3050
+ */
3051
+ ensureSystemSchema(opts?: {
3052
+ force?: boolean;
3053
+ }): Promise<void>;
3026
3054
  isValidConfig(config: Schema | DefaultSchema | IAppConfig): boolean;
3027
3055
  getClient<SchemaName extends string = "public">(options?: SupabaseClientOptions<SchemaName>): _supabase_supabase_js.SupabaseClient<any, "public", SchemaName, Omit<any, "__InternalSupabase">[SchemaName] extends {
3028
3056
  Tables: Record<string, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/lite",
3
- "version": "0.7.1-next.6",
3
+ "version": "0.7.1-next.7",
4
4
  "description": "Lightweight TypeScript-native Supabase implementation on SQLite (alpha). PostgREST + GoTrue compatible — use @supabase/supabase-js as-is.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",