clivly 0.4.0 → 0.7.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 (164) hide show
  1. package/README.md +87 -6
  2. package/{adapter-CXr12l4K.d.cts → adapter-C2eRbBfo.d.cts} +1 -2
  3. package/{adapter-CvNBD_3y.d.mts → adapter-D5LRa-NA.d.mts} +1 -2
  4. package/{auth-adapter-CdLODn2p.d.cts → auth-adapter-Bjgo8LhN.d.mts} +1 -2
  5. package/{auth-adapter-CRBW4elj.d.mts → auth-adapter-DWzgl5Yq.d.cts} +1 -2
  6. package/auth-better-auth.d.cts +1 -2
  7. package/auth-better-auth.d.mts +1 -2
  8. package/auth-clerk.d.cts +1 -2
  9. package/auth-clerk.d.mts +1 -2
  10. package/auth-workos.d.cts +1 -2
  11. package/auth-workos.d.mts +1 -2
  12. package/core-adapter.cjs +5 -0
  13. package/core-adapter.d.cts +1 -1
  14. package/core-adapter.d.mts +1 -1
  15. package/core-adapter.mjs +5 -0
  16. package/core-auth-adapter.cjs +6 -1
  17. package/core-auth-adapter.d.cts +1 -1
  18. package/core-auth-adapter.d.mts +1 -1
  19. package/core-auth-adapter.mjs +6 -1
  20. package/core-drizzle.cjs +6 -30
  21. package/core-drizzle.d.cts +1 -20
  22. package/core-drizzle.d.mts +1 -20
  23. package/core-drizzle.mjs +5 -29
  24. package/core-entity-config.cjs +5 -1
  25. package/core-entity-config.d.cts +1 -1
  26. package/core-entity-config.d.mts +1 -1
  27. package/core-entity-config.mjs +5 -1
  28. package/core-entity-heuristics.cjs +15 -453
  29. package/core-entity-heuristics.d.cts +1 -67
  30. package/core-entity-heuristics.d.mts +1 -67
  31. package/core-entity-heuristics.mjs +4 -442
  32. package/core-mapping-form.cjs +6 -1
  33. package/core-mapping-form.d.cts +1 -1
  34. package/core-mapping-form.d.mts +1 -1
  35. package/core-mapping-form.mjs +6 -1
  36. package/core-mapping-score.cjs +5 -1
  37. package/core-mapping-score.d.cts +1 -1
  38. package/core-mapping-score.d.mts +1 -1
  39. package/core-mapping-score.mjs +5 -1
  40. package/core-mappings-config.cjs +6 -1
  41. package/core-mappings-config.d.cts +1 -1
  42. package/core-mappings-config.d.mts +1 -1
  43. package/core-mappings-config.mjs +6 -1
  44. package/core-sync-engine.cjs +6 -1
  45. package/core-sync-engine.d.cts +1 -1
  46. package/core-sync-engine.d.mts +1 -1
  47. package/core-sync-engine.mjs +6 -1
  48. package/core-types.cjs +5 -0
  49. package/core-types.d.cts +1 -1
  50. package/core-types.d.mts +1 -1
  51. package/core-types.mjs +5 -0
  52. package/core-view-compiler.cjs +6 -1
  53. package/core-view-compiler.d.cts +1 -1
  54. package/core-view-compiler.d.mts +1 -1
  55. package/core-view-compiler.mjs +6 -1
  56. package/core.cjs +11 -6
  57. package/core.d.cts +9 -9
  58. package/core.d.mts +9 -9
  59. package/core.mjs +11 -6
  60. package/deprecate-subpath-B9ngvizt.cjs +30 -0
  61. package/deprecate-subpath-CmvZtCpE.mjs +25 -0
  62. package/drizzle-B89tLo4T.mjs +31 -0
  63. package/drizzle-CFOr9dU9.d.mts +20 -0
  64. package/drizzle-DiReZf6d.cjs +36 -0
  65. package/drizzle-DmeKSqeF.d.cts +20 -0
  66. package/drizzle.cjs +3 -1
  67. package/drizzle.d.cts +11 -3
  68. package/drizzle.d.mts +11 -3
  69. package/drizzle.mjs +3 -2
  70. package/{entity-config-DMuZpchz.cjs → entity-config-D87rV-tE.cjs} +194 -192
  71. package/{entity-config-D1DFyeUp.d.mts → entity-config-DoUCXtq5.d.cts} +48 -35
  72. package/{entity-config-GczjD3y8.d.cts → entity-config-DoUCXtq5.d.mts} +48 -35
  73. package/{entity-config-D3YpQB0z.mjs → entity-config-va2bkH5o.mjs} +194 -192
  74. package/index.cjs +943 -228
  75. package/index.d.cts +32 -2
  76. package/index.d.mts +32 -2
  77. package/index.mjs +932 -221
  78. package/internal-adapter.cjs +0 -0
  79. package/internal-adapter.d.cts +2 -0
  80. package/internal-adapter.d.mts +2 -0
  81. package/internal-adapter.mjs +1 -0
  82. package/internal-auth-adapter.cjs +3 -0
  83. package/internal-auth-adapter.d.cts +2 -0
  84. package/internal-auth-adapter.d.mts +2 -0
  85. package/internal-auth-adapter.mjs +2 -0
  86. package/internal-drizzle.cjs +3 -0
  87. package/internal-drizzle.d.cts +2 -0
  88. package/internal-drizzle.d.mts +2 -0
  89. package/internal-drizzle.mjs +2 -0
  90. package/internal-entity-config.cjs +13 -0
  91. package/internal-entity-config.d.cts +2 -0
  92. package/internal-entity-config.d.mts +2 -0
  93. package/internal-entity-config.mjs +2 -0
  94. package/internal-entity-heuristics.cjs +455 -0
  95. package/internal-entity-heuristics.d.cts +67 -0
  96. package/internal-entity-heuristics.d.mts +67 -0
  97. package/internal-entity-heuristics.mjs +444 -0
  98. package/internal-mapping-form.cjs +5 -0
  99. package/internal-mapping-form.d.cts +2 -0
  100. package/internal-mapping-form.d.mts +2 -0
  101. package/internal-mapping-form.mjs +2 -0
  102. package/internal-mapping-score.cjs +12 -0
  103. package/internal-mapping-score.d.cts +2 -0
  104. package/internal-mapping-score.d.mts +2 -0
  105. package/internal-mapping-score.mjs +2 -0
  106. package/internal-mappings-config.cjs +3 -0
  107. package/internal-mappings-config.d.cts +2 -0
  108. package/internal-mappings-config.d.mts +2 -0
  109. package/internal-mappings-config.mjs +2 -0
  110. package/internal-sync-engine.cjs +6 -0
  111. package/internal-sync-engine.d.cts +2 -0
  112. package/internal-sync-engine.d.mts +2 -0
  113. package/internal-sync-engine.mjs +2 -0
  114. package/internal-types.cjs +0 -0
  115. package/internal-types.d.cts +2 -0
  116. package/internal-types.d.mts +2 -0
  117. package/internal-types.mjs +1 -0
  118. package/internal-view-compiler.cjs +6 -0
  119. package/internal-view-compiler.d.cts +2 -0
  120. package/internal-view-compiler.d.mts +2 -0
  121. package/internal-view-compiler.mjs +2 -0
  122. package/internal.cjs +28 -0
  123. package/internal.d.cts +9 -0
  124. package/internal.d.mts +9 -0
  125. package/internal.mjs +7 -0
  126. package/{mapping-form-CUlFVfG8.d.cts → mapping-form-D93lhHEc.d.mts} +1 -2
  127. package/{mapping-form-kjSiJaCX.d.mts → mapping-form-lfyEE7EJ.d.cts} +1 -2
  128. package/{mappings-config-DYZ_uOOB.cjs → mappings-config-BsRADNRv.cjs} +1 -1
  129. package/{mappings-config-CNTZRD4g.mjs → mappings-config-Dbgxx3Nv.mjs} +1 -1
  130. package/{mappings-config-DjRLCb2Q.d.cts → mappings-config-DsUa7-1w.d.mts} +1 -2
  131. package/{mappings-config-GxiYsSBQ.d.mts → mappings-config-XmzB4dag.d.cts} +1 -2
  132. package/package.json +156 -3
  133. package/{sdk-DdzBxgMx.mjs → sdk-C_1sGiH8.mjs} +15 -11
  134. package/{sdk-D1BHQDf5.cjs → sdk-CzOf596t.cjs} +15 -11
  135. package/sdk.cjs +3 -1
  136. package/sdk.d.cts +1 -41
  137. package/sdk.d.mts +1 -41
  138. package/sdk.mjs +3 -2
  139. package/{sync-engine-DIVMG9EV.d.cts → sync-engine-B7QIbXro.d.cts} +6 -5
  140. package/{sync-engine-BtzkzKmY.cjs → sync-engine-CzEbpQGv.cjs} +1 -1
  141. package/{sync-engine-DLx243iw.d.mts → sync-engine-DGk_AeHJ.d.mts} +6 -5
  142. package/{sync-engine-D9vghQab.mjs → sync-engine-Do5ru3WF.mjs} +1 -1
  143. package/types-CsL0rFYh.d.cts +155 -0
  144. package/types-CsL0rFYh.d.mts +155 -0
  145. package/{view-compiler-4HsRUTWH.d.cts → view-compiler-BWz0sGdm.d.cts} +1 -2
  146. package/{view-compiler-BpIDExjd.d.mts → view-compiler-Bn_EJJMO.d.mts} +1 -2
  147. package/vite.d.cts +1 -2
  148. package/vite.d.mts +1 -2
  149. package/namespace-probe-CA4Vj40g.d.mts +0 -331
  150. package/namespace-probe-CkHCj9tQ.d.cts +0 -331
  151. /package/{auth-adapter-CBOKDhlc.cjs → auth-adapter-CiEXcweZ.cjs} +0 -0
  152. /package/{auth-adapter-wqnnEjo3.mjs → auth-adapter-gfVDxf3d.mjs} +0 -0
  153. /package/{drizzle-meta-BVR1qiyu.cjs → drizzle-meta-Bb1JWYqf.cjs} +0 -0
  154. /package/{drizzle-meta-DpMKataU.mjs → drizzle-meta-D-5k3n0i.mjs} +0 -0
  155. /package/{mapping-form-DdmDebC3.cjs → mapping-form-BpfON_ME.cjs} +0 -0
  156. /package/{mapping-form-BHtPexzI.mjs → mapping-form-DigkuvFc.mjs} +0 -0
  157. /package/{mapping-score-CPPvwoZC.mjs → mapping-score-C68uAqGB.mjs} +0 -0
  158. /package/{mapping-score-i3p8LWDF.cjs → mapping-score-CaB3F4Uu.cjs} +0 -0
  159. /package/{mapping-score-A2lRnlpk.d.mts → mapping-score-D7Gzg7Ii.d.cts} +0 -0
  160. /package/{mapping-score-BcjC0ZQs.d.cts → mapping-score-D7Gzg7Ii.d.mts} +0 -0
  161. /package/{types-BpsKVccL.d.cts → types-B1oRXdNP.d.cts} +0 -0
  162. /package/{types-_qbJXMt_.d.mts → types-B1oRXdNP.d.mts} +0 -0
  163. /package/{view-compiler-BcgJINr7.cjs → view-compiler-BIwvm-o2.cjs} +0 -0
  164. /package/{view-compiler-DeZzx_jn.mjs → view-compiler-ChWr_Lml.mjs} +0 -0
package/README.md CHANGED
@@ -31,8 +31,7 @@ are intentionally testing a prerelease cut.
31
31
  `npx clivly`, while application code imports from typed subpaths:
32
32
 
33
33
  ```ts
34
- import { defineClivlyConfig } from "clivly/core";
35
- import { createClivlySDK } from "clivly/sdk";
34
+ import { createClivlySDK, defineClivlyConfig } from "clivly/sdk";
36
35
  import { fromDrizzle } from "clivly/drizzle";
37
36
  import { clivlyVite } from "clivly/vite";
38
37
  import { createClerkAuthAdapter } from "clivly/auth/clerk";
@@ -40,18 +39,70 @@ import { createWorkOSAuthAdapter } from "clivly/auth/workos";
40
39
  import { createBetterAuthAdapter } from "clivly/auth/better-auth";
41
40
  ```
42
41
 
43
- Provider and framework integrations use optional peer dependencies. Install only
44
- what your app actually uses, such as `drizzle-orm`, `vite`, `@clerk/backend`, or
45
- `@workos-inc/node`.
42
+ Provider and framework integrations use optional peer dependencies.
43
+ **Supported auth providers: Clerk, WorkOS, and BetterAuth.** Install only
44
+ what your app actually uses, such as `drizzle-orm`, `vite`, `@clerk/backend`,
45
+ `@workos-inc/node`, or `better-auth`.
46
46
 
47
47
  `clivly init` detects your framework from `package.json`, locates your Drizzle
48
48
  schema, and generates a `clivly.config.ts` that maps likely contact and company
49
49
  tables. The init command currently generates config for Drizzle only; Prisma and
50
50
  Kysely projects should use a hand-written `fetchPage` source for now.
51
51
 
52
- Use `--schema <path>` when your Drizzle schema is not in a common location or in
52
+ Use `--schema` when your Drizzle schema is not in a common location or in
53
53
  `drizzle.config.ts`. Re-run with `--force` to overwrite an existing config.
54
54
 
55
+ ### Monorepos
56
+
57
+ In a workspace, `init` reads your `pnpm-workspace.yaml` (or `workspaces` array)
58
+ and imports anything owned by a *sibling* package by **package name** rather than
59
+ by a relative path that climbs out of your app:
60
+
61
+ ```ts
62
+ import * as schema from "@acme/database"; // not "../../packages/database/src/index"
63
+ ```
64
+
65
+ `--schema` accepts a package specifier as well as a path, so all of these work:
66
+
67
+ ```bash
68
+ clivly init --schema @acme/database # the package entry
69
+ clivly init --schema @acme/database/src/schema.ts # a subpath inside it
70
+ clivly init --schema ./src/db/schema.ts # a plain path (unchanged)
71
+ ```
72
+
73
+ A real file always wins over a same-named package, so existing relative paths
74
+ keep their meaning.
75
+
76
+ | Flag | Purpose |
77
+ | --- | --- |
78
+ | `--schema <path\|package>` | Where your Drizzle tables live. |
79
+ | `--db-import <specifier>` | Where the Drizzle instance lives, when it isn't beside the schema. Accepts `@acme/database#database` to name the export. |
80
+ | `--auth-import <specifier>` | Where your better-auth instance lives. Same `#exportName` form. Overrides on-disk probing, which cannot see across a package boundary. |
81
+ | `--contact-table <name>` | Use this table as the contact entity, skipping the naming heuristics. |
82
+ | `--company-table <name>` | Same for companies. |
83
+
84
+ `--contact-table` and `--company-table` accept either the SQL table name or the
85
+ name it is exported under in your schema module — whichever you have in front of
86
+ you.
87
+
88
+ ### When no contact entity can be found
89
+
90
+ `init` **writes nothing** rather than scaffolding a config that cannot compile.
91
+ Clivly needs one entity before a config will load, and it will not invent one:
92
+
93
+ ```
94
+ No usable contact entity
95
+
96
+ Tables in @acme/database:
97
+ widgets
98
+ invoices
99
+
100
+ Pick the one that holds your people and re-run:
101
+ clivly init --schema @acme/database --contact-table widgets
102
+
103
+ Nothing was written — Clivly needs one entity before a config can load.
104
+ ```
105
+
55
106
  First-class route scaffolding currently exists for:
56
107
 
57
108
  - Next.js
@@ -102,6 +153,25 @@ The pairing endpoints are feature-flagged server-side
102
153
  (`CLIVLY_CLI_PAIRING_ENABLED`); if the backend you point at has not enabled
103
154
  them, `clivly login` says so and exits non-zero.
104
155
 
156
+ **Clivly Cloud has pairing enabled**, so `clivly login` is the normal path there.
157
+ The flag defaults to `false`, so a self-hosted backend must opt in.
158
+
159
+ ### Manual credential path
160
+
161
+ If pairing is unavailable — a self-hosted backend with the flag off, or a
162
+ restricted environment — every credential can be set by hand. Nothing about the
163
+ CLI requires pairing.
164
+
165
+ | Value | Where to get it | Notes |
166
+ | --- | --- | --- |
167
+ | `CLIVLY_API_KEY` | Dashboard → **Settings → API keys** → Create | **Shown once.** Copy it immediately; you cannot retrieve it later, only regenerate. Regenerating **revokes the previous key**, so redeploy after rotating. |
168
+ | `CLIVLY_SYNC_TRIGGER_SECRET` | Dashboard → **Integrations → Remote sync** | Must match the value in your app's env exactly. A mismatch surfaces as a `401` on the signed trigger. |
169
+ | `CLIVLY_SYNC_TRIGGER_URL` | Your own deployment | The public URL of your mounted tick route, e.g. `https://app.example.com/api/clivly/tick`. Optional until you deploy — push-only setups can leave it unset. |
170
+ | `CLIVLY_VERIFY_TOKEN` | Dashboard → **Integrations** | Only needed if you mount the auth-verify route. |
171
+
172
+ Write them into the `.env` of the package that imports `clivly`, then re-run
173
+ `clivly status` to confirm each rung goes green.
174
+
105
175
  > **Running your own Clivly backend?** `CLIVLY_TRIGGER_SECRET_WRAPPING_KEY` (a
106
176
  > 32-byte hex key) is a **hard production prerequisite** for pairing. The
107
177
  > trigger secret is stored encrypted with it, so without the key set on the
@@ -152,10 +222,21 @@ npx clivly doctor
152
222
  npx clivly doctor --config ./apps/web/clivly.config.ts
153
223
  ```
154
224
 
225
+ ## Telemetry
226
+
227
+ **Clivly collects no telemetry.** The CLI makes network requests only to the
228
+ Clivly API you point it at, and only to do what you asked: pairing, heartbeats,
229
+ schema pushes, and status checks. No usage analytics, no crash reporting, no
230
+ phone-home. See [SECURITY.md](https://github.com/amani-joseph/clivly.com/blob/master/SECURITY.md#telemetry).
231
+
155
232
  ## More docs
156
233
 
157
234
  - Onboarding guide:
158
235
  [connecting to Clivly Cloud](https://github.com/amani-joseph/clivly.com/blob/master/docs/guides/connecting-to-clivly-cloud.md)
236
+ - Adding the chat widget:
237
+ [guide](https://github.com/amani-joseph/clivly.com/blob/master/docs/guides/adding-the-chat-widget.md)
238
+ - Security policy:
239
+ [SECURITY.md](https://github.com/amani-joseph/clivly.com/blob/master/SECURITY.md)
159
240
  - SDK docs:
160
241
  [`@clivly/sdk` README](https://github.com/amani-joseph/clivly.com/blob/master/packages/sdk/README.md)
161
242
  - Release notes:
@@ -1,5 +1,4 @@
1
- import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, c as CreateCompanyInput, d as CreateTaskInput, g as RecordSource, i as Contact, l as CreateContactInput, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, w as UpdateTaskInput, y as TaskFilters } from "./types-BpsKVccL.cjs";
2
-
1
+ import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, c as CreateCompanyInput, d as CreateTaskInput, g as RecordSource, i as Contact, l as CreateContactInput, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, w as UpdateTaskInput, y as TaskFilters } from "./types-B1oRXdNP.cjs";
3
2
  //#region ../core/src/adapter.d.ts
4
3
  /**
5
4
  * The contract every ORM implementation fulfils. `packages/drizzle` is the first
@@ -1,5 +1,4 @@
1
- import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, c as CreateCompanyInput, d as CreateTaskInput, g as RecordSource, i as Contact, l as CreateContactInput, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, w as UpdateTaskInput, y as TaskFilters } from "./types-_qbJXMt_.mjs";
2
-
1
+ import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, c as CreateCompanyInput, d as CreateTaskInput, g as RecordSource, i as Contact, l as CreateContactInput, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, w as UpdateTaskInput, y as TaskFilters } from "./types-B1oRXdNP.mjs";
3
2
  //#region ../core/src/adapter.d.ts
4
3
  /**
5
4
  * The contract every ORM implementation fulfils. `packages/drizzle` is the first
@@ -1,5 +1,4 @@
1
- import { f as CrmRole } from "./types-BpsKVccL.cjs";
2
-
1
+ import { f as CrmRole } from "./types-B1oRXdNP.mjs";
3
2
  //#region ../core/src/auth-adapter.d.ts
4
3
  interface ClivlyUser {
5
4
  email: string;
@@ -1,5 +1,4 @@
1
- import { f as CrmRole } from "./types-_qbJXMt_.mjs";
2
-
1
+ import { f as CrmRole } from "./types-B1oRXdNP.cjs";
3
2
  //#region ../core/src/auth-adapter.d.ts
4
3
  interface ClivlyUser {
5
4
  email: string;
@@ -1,5 +1,4 @@
1
- import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-CdLODn2p.cjs";
2
-
1
+ import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
3
2
  //#region ../auth-better-auth/src/map.d.ts
4
3
  interface BetterAuthLikeUser {
5
4
  email?: string | null;
@@ -1,5 +1,4 @@
1
- import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-CRBW4elj.mjs";
2
-
1
+ import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
3
2
  //#region ../auth-better-auth/src/map.d.ts
4
3
  interface BetterAuthLikeUser {
5
4
  email?: string | null;
package/auth-clerk.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-CdLODn2p.cjs";
2
-
1
+ import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
3
2
  //#region ../auth-clerk/src/map.d.ts
4
3
  interface ClerkLikeUser {
5
4
  emailAddresses?: Array<{
package/auth-clerk.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-CRBW4elj.mjs";
2
-
1
+ import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
3
2
  //#region ../auth-clerk/src/map.d.ts
4
3
  interface ClerkLikeUser {
5
4
  emailAddresses?: Array<{
package/auth-workos.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-CdLODn2p.cjs";
2
-
1
+ import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
3
2
  //#region ../auth-workos/src/map.d.ts
4
3
  interface WorkOSLikeUser {
5
4
  email: string;
package/auth-workos.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-CRBW4elj.mjs";
2
-
1
+ import { n as ClivlyUser, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
3
2
  //#region ../auth-workos/src/map.d.ts
4
3
  interface WorkOSLikeUser {
5
4
  email: string;
package/core-adapter.cjs CHANGED
@@ -0,0 +1,5 @@
1
+ const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
2
+ require("./internal-adapter.cjs");
3
+ //#region src/core-adapter.ts
4
+ require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/adapter", "clivly/internal/adapter");
5
+ //#endregion
@@ -1,2 +1,2 @@
1
- import { t as CRMAdapter } from "./adapter-CXr12l4K.cjs";
1
+ import { t as CRMAdapter } from "./adapter-C2eRbBfo.cjs";
2
2
  export { CRMAdapter };
@@ -1,2 +1,2 @@
1
- import { t as CRMAdapter } from "./adapter-CvNBD_3y.mjs";
1
+ import { t as CRMAdapter } from "./adapter-D5LRa-NA.mjs";
2
2
  export { CRMAdapter };
package/core-adapter.mjs CHANGED
@@ -1 +1,6 @@
1
+ import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
2
+ import "./internal-adapter.mjs";
3
+ //#region src/core-adapter.ts
4
+ warnDeprecatedSubpath("clivly/core/adapter", "clivly/internal/adapter");
5
+ //#endregion
1
6
  export {};
@@ -1,3 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_auth_adapter = require("./auth-adapter-CBOKDhlc.cjs");
2
+ const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
3
+ const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
4
+ require("./internal-auth-adapter.cjs");
5
+ //#region src/core-auth-adapter.ts
6
+ require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/auth-adapter", "clivly/internal/auth-adapter");
7
+ //#endregion
3
8
  exports.authCustom = require_auth_adapter.authCustom;
@@ -1,2 +1,2 @@
1
- import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-CdLODn2p.cjs";
1
+ import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
2
2
  export { ClivlyAuthAdapter, ClivlyUser, CrmMembership, MembershipResolver, authCustom };
@@ -1,2 +1,2 @@
1
- import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-CRBW4elj.mjs";
1
+ import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
2
2
  export { ClivlyAuthAdapter, ClivlyUser, CrmMembership, MembershipResolver, authCustom };
@@ -1,2 +1,7 @@
1
- import { t as authCustom } from "./auth-adapter-wqnnEjo3.mjs";
1
+ import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
2
+ import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
3
+ import "./internal-auth-adapter.mjs";
4
+ //#region src/core-auth-adapter.ts
5
+ warnDeprecatedSubpath("clivly/core/auth-adapter", "clivly/internal/auth-adapter");
6
+ //#endregion
2
7
  export { authCustom };
package/core-drizzle.cjs CHANGED
@@ -1,32 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let drizzle_orm = require("drizzle-orm");
3
- //#region ../core/src/drizzle.ts
4
- /**
5
- * Derive Clivly's discovery shape (table + column names) from a Drizzle schema
6
- * object — the `* as schema` you pass to `drizzle(client, { schema })`. This
7
- * delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
8
- * `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
9
- * against your entity config.
10
- *
11
- * Column names are the real database column names (e.g. `full_name`), not the
12
- * Drizzle property keys (`fullName`). Non-table values in the schema object
13
- * (relations, enums, helpers) are ignored.
14
- *
15
- * `drizzle-orm` is an **optional peer dependency** — you only need it installed
16
- * when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
17
- * stays dependency-free.
18
- */
19
- function discoverFromDrizzle(schema) {
20
- const tables = [];
21
- for (const value of Object.values(schema)) {
22
- if (!(0, drizzle_orm.is)(value, drizzle_orm.Table)) continue;
23
- const columns = (0, drizzle_orm.getTableColumns)(value);
24
- tables.push({
25
- name: (0, drizzle_orm.getTableName)(value),
26
- columns: Object.values(columns).map((column) => column.name)
27
- });
28
- }
29
- return tables;
30
- }
2
+ const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
3
+ const require_drizzle = require("./drizzle-DiReZf6d.cjs");
4
+ require("./internal-drizzle.cjs");
5
+ //#region src/core-drizzle.ts
6
+ require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/drizzle", "clivly/internal/drizzle");
31
7
  //#endregion
32
- exports.discoverFromDrizzle = discoverFromDrizzle;
8
+ exports.discoverFromDrizzle = require_drizzle.discoverFromDrizzle;
@@ -1,21 +1,2 @@
1
- import { u as DiscoveredSchemaTable } from "./entity-config-GczjD3y8.cjs";
2
-
3
- //#region ../core/src/drizzle.d.ts
4
- /**
5
- * Derive Clivly's discovery shape (table + column names) from a Drizzle schema
6
- * object — the `* as schema` you pass to `drizzle(client, { schema })`. This
7
- * delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
8
- * `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
9
- * against your entity config.
10
- *
11
- * Column names are the real database column names (e.g. `full_name`), not the
12
- * Drizzle property keys (`fullName`). Non-table values in the schema object
13
- * (relations, enums, helpers) are ignored.
14
- *
15
- * `drizzle-orm` is an **optional peer dependency** — you only need it installed
16
- * when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
17
- * stays dependency-free.
18
- */
19
- declare function discoverFromDrizzle(schema: Record<string, unknown>): DiscoveredSchemaTable[];
20
- //#endregion
1
+ import { t as discoverFromDrizzle } from "./drizzle-DmeKSqeF.cjs";
21
2
  export { discoverFromDrizzle };
@@ -1,21 +1,2 @@
1
- import { u as DiscoveredSchemaTable } from "./entity-config-D1DFyeUp.mjs";
2
-
3
- //#region ../core/src/drizzle.d.ts
4
- /**
5
- * Derive Clivly's discovery shape (table + column names) from a Drizzle schema
6
- * object — the `* as schema` you pass to `drizzle(client, { schema })`. This
7
- * delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
8
- * `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
9
- * against your entity config.
10
- *
11
- * Column names are the real database column names (e.g. `full_name`), not the
12
- * Drizzle property keys (`fullName`). Non-table values in the schema object
13
- * (relations, enums, helpers) are ignored.
14
- *
15
- * `drizzle-orm` is an **optional peer dependency** — you only need it installed
16
- * when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
17
- * stays dependency-free.
18
- */
19
- declare function discoverFromDrizzle(schema: Record<string, unknown>): DiscoveredSchemaTable[];
20
- //#endregion
1
+ import { t as discoverFromDrizzle } from "./drizzle-CFOr9dU9.mjs";
21
2
  export { discoverFromDrizzle };
package/core-drizzle.mjs CHANGED
@@ -1,31 +1,7 @@
1
- import { Table, getTableColumns, getTableName, is } from "drizzle-orm";
2
- //#region ../core/src/drizzle.ts
3
- /**
4
- * Derive Clivly's discovery shape (table + column names) from a Drizzle schema
5
- * object — the `* as schema` you pass to `drizzle(client, { schema })`. This
6
- * delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
7
- * `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
8
- * against your entity config.
9
- *
10
- * Column names are the real database column names (e.g. `full_name`), not the
11
- * Drizzle property keys (`fullName`). Non-table values in the schema object
12
- * (relations, enums, helpers) are ignored.
13
- *
14
- * `drizzle-orm` is an **optional peer dependency** — you only need it installed
15
- * when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
16
- * stays dependency-free.
17
- */
18
- function discoverFromDrizzle(schema) {
19
- const tables = [];
20
- for (const value of Object.values(schema)) {
21
- if (!is(value, Table)) continue;
22
- const columns = getTableColumns(value);
23
- tables.push({
24
- name: getTableName(value),
25
- columns: Object.values(columns).map((column) => column.name)
26
- });
27
- }
28
- return tables;
29
- }
1
+ import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
2
+ import { t as discoverFromDrizzle } from "./drizzle-B89tLo4T.mjs";
3
+ import "./internal-drizzle.mjs";
4
+ //#region src/core-drizzle.ts
5
+ warnDeprecatedSubpath("clivly/core/drizzle", "clivly/internal/drizzle");
30
6
  //#endregion
31
7
  export { discoverFromDrizzle };
@@ -1,5 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_entity_config = require("./entity-config-DMuZpchz.cjs");
2
+ const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
3
+ const require_entity_config = require("./entity-config-D87rV-tE.cjs");
4
+ //#region src/core-entity-config.ts
5
+ require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/entity-config", "clivly/internal/entity-config");
6
+ //#endregion
3
7
  exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
4
8
  exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
5
9
  exports.CUSTOM_CONCEPT = require_entity_config.CUSTOM_CONCEPT;
@@ -1,2 +1,2 @@
1
- import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, r as CUSTOM_CONCEPT, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-GczjD3y8.cjs";
1
+ import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, r as CUSTOM_CONCEPT, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-DoUCXtq5.cjs";
2
2
  export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
@@ -1,2 +1,2 @@
1
- import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, r as CUSTOM_CONCEPT, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-D1DFyeUp.mjs";
1
+ import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, r as CUSTOM_CONCEPT, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-DoUCXtq5.mjs";
2
2
  export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
@@ -1,2 +1,6 @@
1
- import { a as MATERIALIZING_CONCEPTS, c as filterSchema, d as validateEntitiesConfig, i as ClivlyConfigError, l as relationshipSchema, n as CRM_CONCEPTS, o as defineClivlyConfig, r as CUSTOM_CONCEPT, s as entitiesConfigSchema, t as CANONICAL_FIELDS, u as relationshipsSchema } from "./entity-config-D3YpQB0z.mjs";
1
+ import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
2
+ import { a as MATERIALIZING_CONCEPTS, c as filterSchema, d as validateEntitiesConfig, i as ClivlyConfigError, l as relationshipSchema, n as CRM_CONCEPTS, o as defineClivlyConfig, r as CUSTOM_CONCEPT, s as entitiesConfigSchema, t as CANONICAL_FIELDS, u as relationshipsSchema } from "./entity-config-va2bkH5o.mjs";
3
+ //#region src/core-entity-config.ts
4
+ warnDeprecatedSubpath("clivly/core/entity-config", "clivly/internal/entity-config");
5
+ //#endregion
2
6
  export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };