clivly 0.23.1 → 0.24.0-next.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/README.md +42 -2
- package/{adapter-B4v4dwgD.d.mts → adapter--YV7du3i.d.cts} +1 -1
- package/{adapter-BK3gsby5.d.cts → adapter-DD3K3dCW.d.mts} +1 -1
- package/app-id-5cB6yioz.mjs +53 -0
- package/app-id-DcQ4u1c8.cjs +70 -0
- package/{auth-adapter-BIa-ZyVV.d.mts → auth-adapter-C17dzlzF.d.cts} +1 -1
- package/{auth-adapter-DwtMJb7D.d.cts → auth-adapter-CizFv7oU.d.mts} +1 -1
- package/auth-better-auth.d.cts +1 -1
- package/auth-better-auth.d.mts +1 -1
- package/auth-clerk.d.cts +1 -1
- package/auth-clerk.d.mts +1 -1
- package/auth-supabase.cjs +121 -0
- package/auth-supabase.d.cts +23 -0
- package/auth-supabase.d.mts +23 -0
- package/auth-supabase.mjs +119 -0
- package/auth-workos.d.cts +1 -1
- package/auth-workos.d.mts +1 -1
- package/core-adapter.d.cts +1 -1
- package/core-adapter.d.mts +1 -1
- package/core-auth-adapter.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-mapping-score.d.cts +1 -0
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-types.cjs +5 -1
- package/core-types.d.cts +2 -2
- package/core-types.d.mts +2 -2
- package/core-types.mjs +1 -1
- package/core-view-compiler.cjs +1 -1
- package/core-view-compiler.mjs +1 -1
- package/core.cjs +9 -5
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +6 -6
- package/drizzle.cjs +121 -14
- package/drizzle.d.cts +8 -2
- package/drizzle.d.mts +8 -2
- package/drizzle.mjs +126 -19
- package/executor-CJEWurjZ.mjs +23 -0
- package/executor-CU-jRgpC.cjs +40 -0
- package/from-sql-BD7gR4bC.mjs +282 -0
- package/from-sql-CFgXkCe2.cjs +347 -0
- package/from-sql-CpGP7K3J.d.mts +70 -0
- package/from-sql-S8dSvU-e.d.cts +70 -0
- package/index-BoemTWH4.d.mts +134 -0
- package/index-CIupXz_w.d.cts +134 -0
- package/{index-Bh7o2J7K.d.mts → index-DOoX2GgI.d.mts} +3 -3
- package/{index-DRRTE5IJ.d.cts → index-uFDiQEjj.d.cts} +231 -5
- package/index.cjs +1079 -36
- package/index.d.cts +36 -0
- package/index.d.mts +35 -0
- package/index.mjs +1077 -34
- package/{internal-CdfVkh4O.d.mts → internal-D_2q2BOB.d.mts} +1 -1
- package/internal-adapter.d.cts +1 -1
- package/internal-adapter.d.mts +1 -1
- package/internal-auth-adapter.d.cts +1 -1
- package/internal-auth-adapter.d.mts +1 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-types.cjs +5 -1
- package/internal-types.d.cts +2 -2
- package/internal-types.d.mts +2 -2
- package/internal-types.mjs +1 -1
- package/internal-view-compiler.cjs +1 -1
- package/internal-view-compiler.mjs +1 -1
- package/internal.cjs +9 -5
- package/internal.d.cts +5 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +6 -6
- package/introspector-5w2x89RD.mjs +55 -0
- package/introspector-DT_Ma59k.cjs +60 -0
- package/kysely.cjs +56 -0
- package/kysely.d.cts +45 -0
- package/kysely.d.mts +45 -0
- package/kysely.mjs +54 -0
- package/{namespace-probe-JuHriruA.d.mts → namespace-probe-CUR2zG2l.d.mts} +41 -4
- package/package.json +45 -1
- package/projection-guard-C70l5U24.cjs +170 -0
- package/projection-guard-DOt_nbGn.mjs +147 -0
- package/{projection-sql-DQQdjw9I.mjs → projection-sql-2joBkLz2.mjs} +13 -3
- package/{projection-sql-BkrHR2ea.cjs → projection-sql-DS5sVTY-.cjs} +18 -2
- package/sdk-Bzkr24NW.cjs +207 -0
- package/sdk-D2WwGBzk.mjs +178 -0
- package/sdk.cjs +8 -6
- package/sdk.d.cts +7 -1
- package/sdk.d.mts +7 -1
- package/sdk.mjs +3 -2
- package/sql.cjs +20 -0
- package/sql.d.cts +3 -0
- package/sql.d.mts +3 -0
- package/sql.mjs +7 -0
- package/{sdk-BOarpe5I.cjs → src-CZIdwwI2.cjs} +203 -583
- package/{sdk-BkMDOfCk.mjs → src-tFhC1Ru2.mjs} +175 -531
- package/supabase-contact-3ke1KKUs.mjs +595 -0
- package/supabase-contact-BXQ0nnLq.cjs +624 -0
- package/supabase.cjs +165 -0
- package/supabase.d.cts +20 -0
- package/supabase.d.mts +20 -0
- package/supabase.mjs +164 -0
- package/sync-CdA9dgZz.cjs +519 -0
- package/sync-Q0O-2kFI.mjs +382 -0
- package/{sync-engine-yFLEyId3.mjs → sync-engine-D0mJUeqP.mjs} +1 -1
- package/{sync-engine-DNSoZeo0.cjs → sync-engine-hU041kXO.cjs} +1 -1
- package/{namespace-probe-CcL6Wj8E.d.cts → types-CzL7lUH9.d.cts} +84 -47
- package/types-KMH5D5Lg.mjs +32 -0
- package/{types-BBfwsDxe.d.cts → types-f-Vcv-pl.d.cts} +18 -2
- package/{types-BBfwsDxe.d.mts → types-f-Vcv-pl.d.mts} +18 -2
- package/types-kR1kUlmz.cjs +67 -0
- package/{view-compiler-CSHSqZl7.mjs → view-compiler-BhKiezRH.mjs} +1 -1
- package/{view-compiler-NqiortOA.cjs → view-compiler-DgZadq1F.cjs} +1 -1
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/drizzle-meta-BPnRLpsB.cjs +0 -8
- package/drizzle-meta-D00lFvAk.mjs +0 -3
- package/internal-D7qVRIFb.d.cts +0 -228
- package/types-8KSw2AWg.mjs +0 -8
- package/types-B8m39L1s.cjs +0 -19
package/index.d.cts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { m as DiscoveredSchemaTable } from "./entity-config-CXpGowQa.cjs";
|
|
3
|
+
import { i as SqlExecutor } from "./from-sql-S8dSvU-e.cjs";
|
|
4
|
+
import "./index-CIupXz_w.cjs";
|
|
1
5
|
type Framework = "nextjs" | "tanstack-start" | "sveltekit" | "remix" | "nuxt" | "unknown";
|
|
2
6
|
type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
|
3
7
|
type AppLayout = "app" | "src/app";
|
|
@@ -42,6 +46,35 @@ interface DiscoveredSchema {
|
|
|
42
46
|
importPath: string;
|
|
43
47
|
tables: DiscoveredTable[];
|
|
44
48
|
}
|
|
49
|
+
interface LiveSchemaConnection {
|
|
50
|
+
close(): Promise<void>;
|
|
51
|
+
executor: SqlExecutor;
|
|
52
|
+
}
|
|
53
|
+
interface SupabaseCliResult {
|
|
54
|
+
code: number;
|
|
55
|
+
stdout: string;
|
|
56
|
+
}
|
|
57
|
+
type LiveSchemaFailure = "cli_failed" | "connect_failed" | "driver_missing";
|
|
58
|
+
type RunSupabaseCli = (args: string[]) => Promise<SupabaseCliResult>;
|
|
59
|
+
interface ReadLiveSchemaOptions {
|
|
60
|
+
/** Opens the database. Defaults to the host app's own `postgres` or `pg`. */
|
|
61
|
+
connect?: (url: string) => Promise<LiveSchemaConnection>;
|
|
62
|
+
/** Which variable the string came from, for the failure message only. */
|
|
63
|
+
connectionLabel?: string;
|
|
64
|
+
connectionString?: string;
|
|
65
|
+
/** Why a source failed, so the caller can word its next step. */
|
|
66
|
+
onFailure?: (reason: LiveSchemaFailure) => void;
|
|
67
|
+
out?: (line: string) => void;
|
|
68
|
+
runSupabaseCli?: RunSupabaseCli;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the Supabase CLI may run. Only a linked project does: an absent
|
|
71
|
+
* or unlinked one would make `npx --yes supabase` download tens of MB to
|
|
72
|
+
* fail. Unset keeps the older rule (run whenever `runSupabaseCli` is given).
|
|
73
|
+
*/
|
|
74
|
+
supabaseProject?: SupabaseProjectState;
|
|
75
|
+
}
|
|
76
|
+
/** Is this a Supabase app, and has `supabase link` been run in it? */
|
|
77
|
+
type SupabaseProjectState = "absent" | "linked" | "unlinked";
|
|
45
78
|
interface ProbeHit {
|
|
46
79
|
/** Config-relative specifier to import it from, e.g. "./lib/db". */
|
|
47
80
|
importPath: string;
|
|
@@ -84,13 +117,16 @@ export interface RunInitOptions {
|
|
|
84
117
|
loadWorkspaceGraph?: (cwd: string) => WorkspaceGraph | null;
|
|
85
118
|
login?: (cwd: string) => Promise<number>;
|
|
86
119
|
noLogin?: boolean;
|
|
120
|
+
noOrm?: boolean;
|
|
87
121
|
openBrowser?: boolean;
|
|
88
122
|
out?: (line: string) => void;
|
|
89
123
|
probeAuthInstance?: (cwd: string) => Promise<ProbeHit | null>;
|
|
124
|
+
processEnv?: Record<string, string | undefined>;
|
|
90
125
|
readDeps?: (cwd: string) => Record<string, string>;
|
|
91
126
|
readEnv?: (cwd: string) => string;
|
|
92
127
|
readFile?: (path: string) => string | null;
|
|
93
128
|
readInstalledVersion?: (cwd: string, name: string) => string | null;
|
|
129
|
+
readLiveSchema?: (opts: Pick<ReadLiveSchemaOptions, "connectionLabel" | "connectionString" | "onFailure" | "out" | "supabaseProject">) => Promise<DiscoveredSchemaTable[] | null>;
|
|
94
130
|
readOwnVersion?: () => string | undefined;
|
|
95
131
|
resolveAppLayout?: (cwd: string, fileExists: (path: string) => boolean) => AppLayout;
|
|
96
132
|
resolveSchemaPath?: (cwd: string) => string | null;
|
package/index.d.mts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { m as DiscoveredSchemaTable } from "./entity-config-CXpGowQa.mjs";
|
|
2
|
+
import { i as SqlExecutor } from "./from-sql-CpGP7K3J.mjs";
|
|
3
|
+
import "./index-BoemTWH4.mjs";
|
|
1
4
|
type Framework = "nextjs" | "tanstack-start" | "sveltekit" | "remix" | "nuxt" | "unknown";
|
|
2
5
|
type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
|
3
6
|
type AppLayout = "app" | "src/app";
|
|
@@ -42,6 +45,35 @@ interface DiscoveredSchema {
|
|
|
42
45
|
importPath: string;
|
|
43
46
|
tables: DiscoveredTable[];
|
|
44
47
|
}
|
|
48
|
+
interface LiveSchemaConnection {
|
|
49
|
+
close(): Promise<void>;
|
|
50
|
+
executor: SqlExecutor;
|
|
51
|
+
}
|
|
52
|
+
interface SupabaseCliResult {
|
|
53
|
+
code: number;
|
|
54
|
+
stdout: string;
|
|
55
|
+
}
|
|
56
|
+
type LiveSchemaFailure = "cli_failed" | "connect_failed" | "driver_missing";
|
|
57
|
+
type RunSupabaseCli = (args: string[]) => Promise<SupabaseCliResult>;
|
|
58
|
+
interface ReadLiveSchemaOptions {
|
|
59
|
+
/** Opens the database. Defaults to the host app's own `postgres` or `pg`. */
|
|
60
|
+
connect?: (url: string) => Promise<LiveSchemaConnection>;
|
|
61
|
+
/** Which variable the string came from, for the failure message only. */
|
|
62
|
+
connectionLabel?: string;
|
|
63
|
+
connectionString?: string;
|
|
64
|
+
/** Why a source failed, so the caller can word its next step. */
|
|
65
|
+
onFailure?: (reason: LiveSchemaFailure) => void;
|
|
66
|
+
out?: (line: string) => void;
|
|
67
|
+
runSupabaseCli?: RunSupabaseCli;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the Supabase CLI may run. Only a linked project does: an absent
|
|
70
|
+
* or unlinked one would make `npx --yes supabase` download tens of MB to
|
|
71
|
+
* fail. Unset keeps the older rule (run whenever `runSupabaseCli` is given).
|
|
72
|
+
*/
|
|
73
|
+
supabaseProject?: SupabaseProjectState;
|
|
74
|
+
}
|
|
75
|
+
/** Is this a Supabase app, and has `supabase link` been run in it? */
|
|
76
|
+
type SupabaseProjectState = "absent" | "linked" | "unlinked";
|
|
45
77
|
interface ProbeHit {
|
|
46
78
|
/** Config-relative specifier to import it from, e.g. "./lib/db". */
|
|
47
79
|
importPath: string;
|
|
@@ -84,13 +116,16 @@ export interface RunInitOptions {
|
|
|
84
116
|
loadWorkspaceGraph?: (cwd: string) => WorkspaceGraph | null;
|
|
85
117
|
login?: (cwd: string) => Promise<number>;
|
|
86
118
|
noLogin?: boolean;
|
|
119
|
+
noOrm?: boolean;
|
|
87
120
|
openBrowser?: boolean;
|
|
88
121
|
out?: (line: string) => void;
|
|
89
122
|
probeAuthInstance?: (cwd: string) => Promise<ProbeHit | null>;
|
|
123
|
+
processEnv?: Record<string, string | undefined>;
|
|
90
124
|
readDeps?: (cwd: string) => Record<string, string>;
|
|
91
125
|
readEnv?: (cwd: string) => string;
|
|
92
126
|
readFile?: (path: string) => string | null;
|
|
93
127
|
readInstalledVersion?: (cwd: string, name: string) => string | null;
|
|
128
|
+
readLiveSchema?: (opts: Pick<ReadLiveSchemaOptions, "connectionLabel" | "connectionString" | "onFailure" | "out" | "supabaseProject">) => Promise<DiscoveredSchemaTable[] | null>;
|
|
94
129
|
readOwnVersion?: () => string | undefined;
|
|
95
130
|
resolveAppLayout?: (cwd: string, fileExists: (path: string) => boolean) => AppLayout;
|
|
96
131
|
resolveSchemaPath?: (cwd: string) => string | null;
|