clivly 0.8.0 → 0.9.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 +330 -134
- package/core-drizzle.cjs +3 -1
- package/core-drizzle.d.cts +3 -2
- package/core-drizzle.d.mts +3 -2
- package/core-drizzle.mjs +2 -2
- package/core-entity-config.cjs +2 -1
- package/core-entity-config.d.cts +2 -2
- package/core-entity-config.d.mts +2 -2
- package/core-entity-config.mjs +2 -2
- package/core-entity-heuristics.d.cts +3 -2
- package/core-entity-heuristics.d.mts +3 -2
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mappings-config.cjs +1 -1
- package/core-mappings-config.d.cts +1 -1
- package/core-mappings-config.d.mts +1 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-view-compiler.cjs +2 -1
- package/core-view-compiler.d.cts +2 -2
- package/core-view-compiler.d.mts +2 -2
- package/core-view-compiler.mjs +2 -2
- package/core.cjs +21 -5
- package/core.d.cts +7 -6
- package/core.d.mts +7 -6
- package/core.mjs +7 -6
- package/drizzle-3kvhkwO7.mjs +110 -0
- package/drizzle-DooDUGqO.d.mts +41 -0
- package/drizzle-bfjVzYR6.cjs +127 -0
- package/drizzle-jz0lrAgl.d.cts +41 -0
- package/drizzle.cjs +12 -40
- package/drizzle.d.cts +3 -11
- package/drizzle.d.mts +3 -11
- package/drizzle.mjs +12 -41
- package/entity-config-D08zAeFY.mjs +657 -0
- package/{entity-config-DoUCXtq5.d.cts → entity-config-fKQhimtD.d.cts} +263 -2
- package/{entity-config-DoUCXtq5.d.mts → entity-config-fKQhimtD.d.mts} +263 -2
- package/entity-config-nuXge6rY.cjs +778 -0
- package/index.cjs +768 -122
- package/index.d.cts +12 -0
- package/index.d.mts +12 -0
- package/index.mjs +769 -123
- package/internal-BGVUG312.mjs +68 -0
- package/internal-BLCK81kB.d.mts +72 -0
- package/internal-C-YBW2DB.d.cts +72 -0
- package/internal-D4HDi2GC.cjs +97 -0
- package/internal-drizzle.cjs +3 -1
- package/internal-drizzle.d.cts +2 -2
- package/internal-drizzle.d.mts +2 -2
- package/internal-drizzle.mjs +2 -2
- package/internal-entity-config.cjs +2 -1
- package/internal-entity-config.d.cts +2 -2
- package/internal-entity-config.d.mts +2 -2
- package/internal-entity-config.mjs +2 -2
- package/internal-entity-heuristics.cjs +28 -8
- package/internal-entity-heuristics.d.cts +2 -12
- package/internal-entity-heuristics.d.mts +2 -12
- package/internal-entity-heuristics.mjs +28 -8
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +1 -1
- package/internal-mappings-config.d.cts +1 -1
- package/internal-mappings-config.d.mts +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-view-compiler.cjs +2 -1
- package/internal-view-compiler.d.cts +2 -2
- package/internal-view-compiler.d.mts +2 -2
- package/internal-view-compiler.mjs +2 -2
- package/internal.cjs +21 -4
- package/internal.d.cts +7 -6
- package/internal.d.mts +7 -6
- package/internal.mjs +7 -5
- package/{mapping-form-D93lhHEc.d.mts → mapping-form-DhY0iFmN.d.cts} +1 -1
- package/{mapping-form-lfyEE7EJ.d.cts → mapping-form-Du36VZr1.d.mts} +1 -1
- package/{mappings-config-DsUa7-1w.d.mts → mappings-config-B1qNM8VL.d.cts} +7 -1
- package/{mappings-config-XmzB4dag.d.cts → mappings-config-BChZsany.d.mts} +7 -1
- package/{mappings-config-BsRADNRv.cjs → mappings-config-C8ynKmDK.cjs} +32 -6
- package/{mappings-config-Dbgxx3Nv.mjs → mappings-config-DNaYGyKN.mjs} +32 -6
- package/namespace-probe-BkUs8raG.d.mts +381 -0
- package/namespace-probe-aRFmpU85.d.cts +381 -0
- package/package.json +1 -1
- package/{entity-config-va2bkH5o.mjs → projection-C5244vGa.cjs} +130 -309
- package/{entity-config-D87rV-tE.cjs → projection-D7xmQP4S.mjs} +60 -381
- package/{sdk-iqOXeWIp.cjs → sdk-Bj-ZDf4u.cjs} +126 -28
- package/{sdk-C6WANW8M.mjs → sdk-BvRD2jAp.mjs} +126 -28
- package/sdk.cjs +2 -2
- package/sdk.d.cts +36 -1
- package/sdk.d.mts +36 -1
- package/sdk.mjs +2 -2
- package/{sync-engine-DGk_AeHJ.d.mts → sync-engine-DHQ7rXZe.d.mts} +2 -2
- package/{sync-engine-B7QIbXro.d.cts → sync-engine-DiPjH53O.d.cts} +2 -2
- package/{sync-engine-Do5ru3WF.mjs → sync-engine-SuxSzbZ4.mjs} +9 -2
- package/{sync-engine-CzEbpQGv.cjs → sync-engine-abE94g6X.cjs} +9 -2
- package/{view-compiler-BIwvm-o2.cjs → view-compiler-Blu4OXJ7.cjs} +103 -12
- package/{view-compiler-ChWr_Lml.mjs → view-compiler-CQx8TRrW.mjs} +98 -13
- package/{view-compiler-BWz0sGdm.d.cts → view-compiler-CcUwzZut.d.mts} +12 -2
- package/{view-compiler-Bn_EJJMO.d.mts → view-compiler-DqAdVxLq.d.cts} +12 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/drizzle-B89tLo4T.mjs +0 -31
- package/drizzle-CFOr9dU9.d.mts +0 -20
- package/drizzle-DiReZf6d.cjs +0 -36
- package/drizzle-DmeKSqeF.d.cts +0 -20
- package/types-CsL0rFYh.d.cts +0 -155
- package/types-CsL0rFYh.d.mts +0 -155
package/index.d.cts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
//#region src/detect.d.ts
|
|
2
2
|
type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
|
3
3
|
//#endregion
|
|
4
|
+
//#region src/app-layout.d.ts
|
|
5
|
+
type AppLayout = "app" | "src/app";
|
|
6
|
+
//#endregion
|
|
4
7
|
//#region src/workspace-graph.d.ts
|
|
5
8
|
interface WorkspacePackage {
|
|
6
9
|
/** Absolute path to the package directory. */
|
|
@@ -30,6 +33,12 @@ interface DiscoveredTable {
|
|
|
30
33
|
columns: DiscoveredColumn[];
|
|
31
34
|
moduleKey: string;
|
|
32
35
|
tableName: string;
|
|
36
|
+
/**
|
|
37
|
+
* Every unique key as DB column names, PKs included. Absent when reflection
|
|
38
|
+
* is unavailable or failed (unknown); present as `[]` when reflection
|
|
39
|
+
* succeeded and the table genuinely has no unique keys (confirmed none).
|
|
40
|
+
*/
|
|
41
|
+
uniqueConstraints?: string[][];
|
|
33
42
|
}
|
|
34
43
|
interface DiscoveredSchema {
|
|
35
44
|
db: {
|
|
@@ -51,6 +60,7 @@ interface ProbeHit {
|
|
|
51
60
|
//#region src/index.d.ts
|
|
52
61
|
declare function nearestCommand(input: string): string | undefined;
|
|
53
62
|
interface AddDeps {
|
|
63
|
+
fileExists: (path: string) => boolean;
|
|
54
64
|
out: (line: string) => void;
|
|
55
65
|
readDeps: (cwd: string) => Record<string, string>;
|
|
56
66
|
readFile: (path: string) => string | null;
|
|
@@ -71,6 +81,7 @@ interface RunInitOptions {
|
|
|
71
81
|
diff?: boolean;
|
|
72
82
|
discoverSchema?: (schemaPath: string, cwd: string) => Promise<DiscoveredSchema>;
|
|
73
83
|
dryRun?: boolean;
|
|
84
|
+
fileExists?: (path: string) => boolean;
|
|
74
85
|
force: boolean;
|
|
75
86
|
installPackages?: (options: {
|
|
76
87
|
cwd: string;
|
|
@@ -88,6 +99,7 @@ interface RunInitOptions {
|
|
|
88
99
|
readEnv?: (cwd: string) => string;
|
|
89
100
|
readFile?: (path: string) => string | null;
|
|
90
101
|
readOwnVersion?: () => string | undefined;
|
|
102
|
+
resolveAppLayout?: (cwd: string, fileExists: (path: string) => boolean) => AppLayout;
|
|
91
103
|
resolveSchemaPath?: (cwd: string) => string | null;
|
|
92
104
|
resolveTargetApp?: (cwd: string) => {
|
|
93
105
|
candidates?: string[];
|
package/index.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
//#region src/detect.d.ts
|
|
2
2
|
type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
|
3
3
|
//#endregion
|
|
4
|
+
//#region src/app-layout.d.ts
|
|
5
|
+
type AppLayout = "app" | "src/app";
|
|
6
|
+
//#endregion
|
|
4
7
|
//#region src/workspace-graph.d.ts
|
|
5
8
|
interface WorkspacePackage {
|
|
6
9
|
/** Absolute path to the package directory. */
|
|
@@ -30,6 +33,12 @@ interface DiscoveredTable {
|
|
|
30
33
|
columns: DiscoveredColumn[];
|
|
31
34
|
moduleKey: string;
|
|
32
35
|
tableName: string;
|
|
36
|
+
/**
|
|
37
|
+
* Every unique key as DB column names, PKs included. Absent when reflection
|
|
38
|
+
* is unavailable or failed (unknown); present as `[]` when reflection
|
|
39
|
+
* succeeded and the table genuinely has no unique keys (confirmed none).
|
|
40
|
+
*/
|
|
41
|
+
uniqueConstraints?: string[][];
|
|
33
42
|
}
|
|
34
43
|
interface DiscoveredSchema {
|
|
35
44
|
db: {
|
|
@@ -51,6 +60,7 @@ interface ProbeHit {
|
|
|
51
60
|
//#region src/index.d.ts
|
|
52
61
|
declare function nearestCommand(input: string): string | undefined;
|
|
53
62
|
interface AddDeps {
|
|
63
|
+
fileExists: (path: string) => boolean;
|
|
54
64
|
out: (line: string) => void;
|
|
55
65
|
readDeps: (cwd: string) => Record<string, string>;
|
|
56
66
|
readFile: (path: string) => string | null;
|
|
@@ -71,6 +81,7 @@ interface RunInitOptions {
|
|
|
71
81
|
diff?: boolean;
|
|
72
82
|
discoverSchema?: (schemaPath: string, cwd: string) => Promise<DiscoveredSchema>;
|
|
73
83
|
dryRun?: boolean;
|
|
84
|
+
fileExists?: (path: string) => boolean;
|
|
74
85
|
force: boolean;
|
|
75
86
|
installPackages?: (options: {
|
|
76
87
|
cwd: string;
|
|
@@ -88,6 +99,7 @@ interface RunInitOptions {
|
|
|
88
99
|
readEnv?: (cwd: string) => string;
|
|
89
100
|
readFile?: (path: string) => string | null;
|
|
90
101
|
readOwnVersion?: () => string | undefined;
|
|
102
|
+
resolveAppLayout?: (cwd: string, fileExists: (path: string) => boolean) => AppLayout;
|
|
91
103
|
resolveSchemaPath?: (cwd: string) => string | null;
|
|
92
104
|
resolveTargetApp?: (cwd: string) => {
|
|
93
105
|
candidates?: string[];
|