clivly 0.23.0 → 0.24.0-next.0

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.
Files changed (103) hide show
  1. package/README.md +36 -0
  2. package/{adapter-B4v4dwgD.d.mts → adapter--YV7du3i.d.cts} +1 -1
  3. package/{adapter-BK3gsby5.d.cts → adapter-DD3K3dCW.d.mts} +1 -1
  4. package/{auth-adapter-BIa-ZyVV.d.mts → auth-adapter-C17dzlzF.d.cts} +1 -1
  5. package/{auth-adapter-DwtMJb7D.d.cts → auth-adapter-CizFv7oU.d.mts} +1 -1
  6. package/auth-better-auth.d.cts +1 -1
  7. package/auth-better-auth.d.mts +1 -1
  8. package/auth-clerk.d.cts +1 -1
  9. package/auth-clerk.d.mts +1 -1
  10. package/auth-supabase.cjs +121 -0
  11. package/auth-supabase.d.cts +23 -0
  12. package/auth-supabase.d.mts +23 -0
  13. package/auth-supabase.mjs +119 -0
  14. package/auth-workos.d.cts +1 -1
  15. package/auth-workos.d.mts +1 -1
  16. package/core-adapter.d.cts +1 -1
  17. package/core-adapter.d.mts +1 -1
  18. package/core-auth-adapter.d.cts +1 -1
  19. package/core-auth-adapter.d.mts +1 -1
  20. package/core-mapping-score.d.cts +1 -0
  21. package/core-sync-engine.cjs +1 -1
  22. package/core-sync-engine.mjs +1 -1
  23. package/core-types.cjs +5 -1
  24. package/core-types.d.cts +2 -2
  25. package/core-types.d.mts +2 -2
  26. package/core-types.mjs +1 -1
  27. package/core-view-compiler.cjs +1 -1
  28. package/core-view-compiler.mjs +1 -1
  29. package/core.cjs +9 -5
  30. package/core.d.cts +6 -6
  31. package/core.d.mts +6 -6
  32. package/core.mjs +6 -6
  33. package/discover-BZIPXl23.cjs +200 -0
  34. package/discover-CFIi43Qn.mjs +195 -0
  35. package/drizzle.cjs +1 -1
  36. package/drizzle.d.cts +2 -2
  37. package/drizzle.d.mts +2 -2
  38. package/drizzle.mjs +1 -1
  39. package/executor-CJEWurjZ.mjs +23 -0
  40. package/executor-CU-jRgpC.cjs +40 -0
  41. package/index-CZkp8TV4.d.cts +108 -0
  42. package/index-Cnrz4ywf.d.mts +108 -0
  43. package/{index-Bh7o2J7K.d.mts → index-DOoX2GgI.d.mts} +3 -3
  44. package/{index-DRRTE5IJ.d.cts → index-uFDiQEjj.d.cts} +231 -5
  45. package/index.cjs +903 -30
  46. package/index.d.cts +27 -0
  47. package/index.d.mts +26 -0
  48. package/index.mjs +901 -28
  49. package/{internal-CdfVkh4O.d.mts → internal-D_2q2BOB.d.mts} +1 -1
  50. package/internal-adapter.d.cts +1 -1
  51. package/internal-adapter.d.mts +1 -1
  52. package/internal-auth-adapter.d.cts +1 -1
  53. package/internal-auth-adapter.d.mts +1 -1
  54. package/internal-sync-engine.cjs +1 -1
  55. package/internal-sync-engine.mjs +1 -1
  56. package/internal-types.cjs +5 -1
  57. package/internal-types.d.cts +2 -2
  58. package/internal-types.d.mts +2 -2
  59. package/internal-types.mjs +1 -1
  60. package/internal-view-compiler.cjs +1 -1
  61. package/internal-view-compiler.mjs +1 -1
  62. package/internal.cjs +9 -5
  63. package/internal.d.cts +5 -6
  64. package/internal.d.mts +6 -6
  65. package/internal.mjs +6 -6
  66. package/introspector-BwYgHGcS.cjs +363 -0
  67. package/introspector-Bz52xOUr.mjs +334 -0
  68. package/{namespace-probe-JuHriruA.d.mts → namespace-probe--GvxJ06J.d.mts} +8 -1
  69. package/package.json +31 -1
  70. package/projection-guard-7AMY0aCk.mjs +389 -0
  71. package/projection-guard-D8VUhCz7.cjs +508 -0
  72. package/{projection-sql-DQQdjw9I.mjs → projection-sql-2joBkLz2.mjs} +13 -3
  73. package/{projection-sql-BkrHR2ea.cjs → projection-sql-DS5sVTY-.cjs} +18 -2
  74. package/sdk-Bzkr24NW.cjs +207 -0
  75. package/sdk-D2WwGBzk.mjs +178 -0
  76. package/sdk.cjs +8 -6
  77. package/sdk.d.cts +7 -1
  78. package/sdk.d.mts +7 -1
  79. package/sdk.mjs +3 -2
  80. package/sql.cjs +13 -0
  81. package/sql.d.cts +2 -0
  82. package/sql.d.mts +2 -0
  83. package/sql.mjs +4 -0
  84. package/{sdk-BkMDOfCk.mjs → src-Dq2nY1Sj.mjs} +36 -495
  85. package/{sdk-BOarpe5I.cjs → src-X0-yIA3O.cjs} +63 -546
  86. package/supabase.cjs +255 -0
  87. package/supabase.d.cts +19 -0
  88. package/supabase.d.mts +19 -0
  89. package/supabase.mjs +254 -0
  90. package/{sync-engine-yFLEyId3.mjs → sync-engine-D0mJUeqP.mjs} +1 -1
  91. package/{sync-engine-DNSoZeo0.cjs → sync-engine-hU041kXO.cjs} +1 -1
  92. package/types-KMH5D5Lg.mjs +32 -0
  93. package/{namespace-probe-CcL6Wj8E.d.cts → types-UR-tT4c1.d.cts} +52 -45
  94. package/{types-BBfwsDxe.d.cts → types-f-Vcv-pl.d.cts} +18 -2
  95. package/{types-BBfwsDxe.d.mts → types-f-Vcv-pl.d.mts} +18 -2
  96. package/types-kR1kUlmz.cjs +67 -0
  97. package/{view-compiler-CSHSqZl7.mjs → view-compiler-BhKiezRH.mjs} +1 -1
  98. package/{view-compiler-NqiortOA.cjs → view-compiler-DgZadq1F.cjs} +1 -1
  99. package/vite.d.cts +1 -1
  100. package/vite.d.mts +1 -1
  101. package/internal-D7qVRIFb.d.cts +0 -228
  102. package/types-8KSw2AWg.mjs +0 -8
  103. package/types-B8m39L1s.cjs +0 -19
package/index.d.cts CHANGED
@@ -1,3 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { m as DiscoveredSchemaTable } from "./entity-config-CXpGowQa.cjs";
3
+ import { s as SqlExecutor } from "./index-CZkp8TV4.cjs";
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,27 @@ 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
+ }
45
69
  interface ProbeHit {
46
70
  /** Config-relative specifier to import it from, e.g. "./lib/db". */
47
71
  importPath: string;
@@ -84,13 +108,16 @@ export interface RunInitOptions {
84
108
  loadWorkspaceGraph?: (cwd: string) => WorkspaceGraph | null;
85
109
  login?: (cwd: string) => Promise<number>;
86
110
  noLogin?: boolean;
111
+ noOrm?: boolean;
87
112
  openBrowser?: boolean;
88
113
  out?: (line: string) => void;
89
114
  probeAuthInstance?: (cwd: string) => Promise<ProbeHit | null>;
115
+ processEnv?: Record<string, string | undefined>;
90
116
  readDeps?: (cwd: string) => Record<string, string>;
91
117
  readEnv?: (cwd: string) => string;
92
118
  readFile?: (path: string) => string | null;
93
119
  readInstalledVersion?: (cwd: string, name: string) => string | null;
120
+ readLiveSchema?: (opts: Pick<ReadLiveSchemaOptions, "connectionLabel" | "connectionString" | "onFailure" | "out">) => Promise<DiscoveredSchemaTable[] | null>;
94
121
  readOwnVersion?: () => string | undefined;
95
122
  resolveAppLayout?: (cwd: string, fileExists: (path: string) => boolean) => AppLayout;
96
123
  resolveSchemaPath?: (cwd: string) => string | null;
package/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { m as DiscoveredSchemaTable } from "./entity-config-CXpGowQa.mjs";
2
+ import { s as SqlExecutor } from "./index-Cnrz4ywf.mjs";
1
3
  type Framework = "nextjs" | "tanstack-start" | "sveltekit" | "remix" | "nuxt" | "unknown";
2
4
  type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
3
5
  type AppLayout = "app" | "src/app";
@@ -42,6 +44,27 @@ interface DiscoveredSchema {
42
44
  importPath: string;
43
45
  tables: DiscoveredTable[];
44
46
  }
47
+ interface LiveSchemaConnection {
48
+ close(): Promise<void>;
49
+ executor: SqlExecutor;
50
+ }
51
+ interface SupabaseCliResult {
52
+ code: number;
53
+ stdout: string;
54
+ }
55
+ type LiveSchemaFailure = "cli_failed" | "connect_failed" | "driver_missing";
56
+ type RunSupabaseCli = (args: string[]) => Promise<SupabaseCliResult>;
57
+ interface ReadLiveSchemaOptions {
58
+ /** Opens the database. Defaults to the host app's own `postgres` or `pg`. */
59
+ connect?: (url: string) => Promise<LiveSchemaConnection>;
60
+ /** Which variable the string came from, for the failure message only. */
61
+ connectionLabel?: string;
62
+ connectionString?: string;
63
+ /** Why a source failed, so the caller can word its next step. */
64
+ onFailure?: (reason: LiveSchemaFailure) => void;
65
+ out?: (line: string) => void;
66
+ runSupabaseCli?: RunSupabaseCli;
67
+ }
45
68
  interface ProbeHit {
46
69
  /** Config-relative specifier to import it from, e.g. "./lib/db". */
47
70
  importPath: string;
@@ -84,13 +107,16 @@ export interface RunInitOptions {
84
107
  loadWorkspaceGraph?: (cwd: string) => WorkspaceGraph | null;
85
108
  login?: (cwd: string) => Promise<number>;
86
109
  noLogin?: boolean;
110
+ noOrm?: boolean;
87
111
  openBrowser?: boolean;
88
112
  out?: (line: string) => void;
89
113
  probeAuthInstance?: (cwd: string) => Promise<ProbeHit | null>;
114
+ processEnv?: Record<string, string | undefined>;
90
115
  readDeps?: (cwd: string) => Record<string, string>;
91
116
  readEnv?: (cwd: string) => string;
92
117
  readFile?: (path: string) => string | null;
93
118
  readInstalledVersion?: (cwd: string, name: string) => string | null;
119
+ readLiveSchema?: (opts: Pick<ReadLiveSchemaOptions, "connectionLabel" | "connectionString" | "onFailure" | "out">) => Promise<DiscoveredSchemaTable[] | null>;
94
120
  readOwnVersion?: () => string | undefined;
95
121
  resolveAppLayout?: (cwd: string, fileExists: (path: string) => boolean) => AppLayout;
96
122
  resolveSchemaPath?: (cwd: string) => string | null;