clivly 0.16.0 → 0.17.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.
Files changed (186) hide show
  1. package/README.md +21 -27
  2. package/{adapter-BMAUq4hf.d.mts → adapter-C63F9VZL.d.mts} +1 -3
  3. package/{adapter-IH3r_I8v.d.cts → adapter-OO5g17qF.d.cts} +1 -3
  4. package/{auth-adapter-CiEXcweZ.cjs → auth-adapter-CNVuxT9W.cjs} +1 -2
  5. package/{auth-adapter-Bt1GZiag.d.cts → auth-adapter-COMP0Fud.d.cts} +1 -3
  6. package/{auth-adapter-CHy273qb.d.mts → auth-adapter-ZlhllVpm.d.mts} +1 -3
  7. package/{auth-adapter-gfVDxf3d.mjs → auth-adapter-u91PByaw.mjs} +1 -2
  8. package/auth-better-auth.cjs +2 -4
  9. package/auth-better-auth.d.cts +1 -5
  10. package/auth-better-auth.d.mts +1 -5
  11. package/auth-better-auth.mjs +2 -4
  12. package/auth-clerk.cjs +2 -4
  13. package/auth-clerk.d.cts +1 -5
  14. package/auth-clerk.d.mts +1 -5
  15. package/auth-clerk.mjs +2 -4
  16. package/auth-workos.cjs +2 -4
  17. package/auth-workos.d.cts +1 -5
  18. package/auth-workos.d.mts +1 -5
  19. package/auth-workos.mjs +2 -4
  20. package/core-adapter.cjs +2 -3
  21. package/core-adapter.d.cts +1 -1
  22. package/core-adapter.d.mts +1 -1
  23. package/core-adapter.mjs +2 -3
  24. package/core-auth-adapter.cjs +3 -4
  25. package/core-auth-adapter.d.cts +1 -1
  26. package/core-auth-adapter.d.mts +1 -1
  27. package/core-auth-adapter.mjs +3 -5
  28. package/core-drizzle.cjs +3 -4
  29. package/core-drizzle.d.cts +1 -1
  30. package/core-drizzle.d.mts +1 -1
  31. package/core-drizzle.mjs +3 -5
  32. package/core-entity-config.cjs +3 -4
  33. package/core-entity-config.d.cts +1 -1
  34. package/core-entity-config.d.mts +1 -1
  35. package/core-entity-config.mjs +3 -5
  36. package/core-entity-heuristics.cjs +18 -18
  37. package/core-entity-heuristics.d.cts +3 -3
  38. package/core-entity-heuristics.d.mts +3 -3
  39. package/core-entity-heuristics.mjs +3 -5
  40. package/core-mapping-form.cjs +3 -4
  41. package/core-mapping-form.d.cts +1 -1
  42. package/core-mapping-form.d.mts +1 -1
  43. package/core-mapping-form.mjs +3 -5
  44. package/core-mapping-score.cjs +3 -4
  45. package/core-mapping-score.d.cts +1 -1
  46. package/core-mapping-score.d.mts +1 -1
  47. package/core-mapping-score.mjs +3 -5
  48. package/core-mappings-config.cjs +3 -4
  49. package/core-mappings-config.d.cts +1 -1
  50. package/core-mappings-config.d.mts +1 -1
  51. package/core-mappings-config.mjs +3 -5
  52. package/core-sync-engine.cjs +3 -4
  53. package/core-sync-engine.d.cts +1 -1
  54. package/core-sync-engine.d.mts +1 -1
  55. package/core-sync-engine.mjs +3 -5
  56. package/core-types.cjs +3 -4
  57. package/core-types.d.cts +1 -1
  58. package/core-types.d.mts +1 -1
  59. package/core-types.mjs +3 -5
  60. package/core-view-compiler.cjs +3 -4
  61. package/core-view-compiler.d.cts +1 -1
  62. package/core-view-compiler.d.mts +1 -1
  63. package/core-view-compiler.mjs +3 -5
  64. package/core.cjs +13 -13
  65. package/core.d.cts +11 -11
  66. package/core.d.mts +11 -11
  67. package/core.mjs +13 -14
  68. package/{deprecate-subpath-CmvZtCpE.mjs → deprecate-subpath-CK37DKXH.mjs} +1 -2
  69. package/{deprecate-subpath-B9ngvizt.cjs → deprecate-subpath-dGwDiHKV.cjs} +1 -2
  70. package/{drizzle-CiK37zJm.d.cts → drizzle-B9cjBavj.d.cts} +1 -3
  71. package/{drizzle-DcB7OfBp.cjs → drizzle-C0bfX-6a.cjs} +1 -2
  72. package/{drizzle-wbcuG-cy.mjs → drizzle-CZuOzIu4.mjs} +1 -2
  73. package/{drizzle-ehVWLSrN.d.mts → drizzle-L5FOGe_-.d.mts} +1 -3
  74. package/{drizzle-meta-Bb1JWYqf.cjs → drizzle-meta-BPnRLpsB.cjs} +1 -2
  75. package/{drizzle-meta-D-5k3n0i.mjs → drizzle-meta-D00lFvAk.mjs} +1 -2
  76. package/drizzle.cjs +7 -10
  77. package/drizzle.d.cts +3 -7
  78. package/drizzle.d.mts +3 -7
  79. package/drizzle.mjs +7 -10
  80. package/{entity-config-BI4RYNKL.cjs → entity-config-DiCJ6mhI.cjs} +8 -11
  81. package/entity-config-X-KlnYXX.d.mts +632 -0
  82. package/entity-config-dNclLyBM.d.cts +632 -0
  83. package/{entity-config-Ccfb2IL9.mjs → entity-config-g_oMPXlN.mjs} +8 -11
  84. package/entity-heuristics-CIParuQe.cjs +655 -0
  85. package/entity-heuristics-DE5ujoHw.mjs +566 -0
  86. package/index.cjs +65 -111
  87. package/index.d.cts +1 -12
  88. package/index.d.mts +1 -12
  89. package/index.mjs +53 -99
  90. package/{integration-state-BA4c0RbD.d.mts → integration-state-xK4PLm5T.d.cts} +0 -2
  91. package/{integration-state-BA4c0RbD.d.cts → integration-state-xK4PLm5T.d.mts} +0 -2
  92. package/{internal-CLvZdVj5.mjs → internal-9oDwwbNg.mjs} +37 -9
  93. package/{internal-DsArcqkP.cjs → internal-BKYt5j0l.cjs} +42 -8
  94. package/{internal-C7NlPM3M.d.mts → internal-COALpgov.d.cts} +1 -17
  95. package/{internal-D2J4VQWT.d.cts → internal-D3q4FPcA.d.mts} +1 -17
  96. package/internal-adapter.d.cts +1 -1
  97. package/internal-adapter.d.mts +1 -1
  98. package/internal-auth-adapter.cjs +1 -1
  99. package/internal-auth-adapter.d.cts +1 -1
  100. package/internal-auth-adapter.d.mts +1 -1
  101. package/internal-auth-adapter.mjs +1 -2
  102. package/internal-drizzle.cjs +1 -1
  103. package/internal-drizzle.d.cts +1 -1
  104. package/internal-drizzle.d.mts +1 -1
  105. package/internal-drizzle.mjs +1 -2
  106. package/internal-entity-config.cjs +1 -1
  107. package/internal-entity-config.d.cts +1 -1
  108. package/internal-entity-config.d.mts +1 -1
  109. package/internal-entity-config.mjs +1 -2
  110. package/internal-entity-heuristics.cjs +16 -576
  111. package/internal-entity-heuristics.d.cts +4 -4
  112. package/internal-entity-heuristics.d.mts +4 -4
  113. package/internal-entity-heuristics.mjs +1 -563
  114. package/internal-mapping-form.cjs +1 -1
  115. package/internal-mapping-form.d.cts +1 -1
  116. package/internal-mapping-form.d.mts +1 -1
  117. package/internal-mapping-form.mjs +1 -2
  118. package/internal-mapping-score.cjs +1 -1
  119. package/internal-mapping-score.d.cts +1 -1
  120. package/internal-mapping-score.d.mts +1 -1
  121. package/internal-mapping-score.mjs +1 -2
  122. package/internal-mappings-config.cjs +1 -1
  123. package/internal-mappings-config.d.cts +1 -1
  124. package/internal-mappings-config.d.mts +1 -1
  125. package/internal-mappings-config.mjs +1 -2
  126. package/internal-sync-engine.cjs +1 -1
  127. package/internal-sync-engine.d.cts +1 -1
  128. package/internal-sync-engine.d.mts +1 -1
  129. package/internal-sync-engine.mjs +1 -2
  130. package/internal-types.cjs +1 -1
  131. package/internal-types.d.cts +1 -1
  132. package/internal-types.d.mts +1 -1
  133. package/internal-types.mjs +1 -2
  134. package/internal-view-compiler.cjs +1 -1
  135. package/internal-view-compiler.d.cts +1 -1
  136. package/internal-view-compiler.d.mts +1 -1
  137. package/internal-view-compiler.mjs +1 -2
  138. package/internal.cjs +11 -10
  139. package/internal.d.cts +11 -11
  140. package/internal.d.mts +11 -11
  141. package/internal.mjs +11 -11
  142. package/{mapping-form-XsLLCqW_.d.cts → mapping-form-Bpvgf5b8.d.mts} +1 -3
  143. package/{mapping-form-BpfON_ME.cjs → mapping-form-Bs6JQurC.cjs} +1 -2
  144. package/{mapping-form-DigkuvFc.mjs → mapping-form-C7kDMWzp.mjs} +1 -2
  145. package/{mapping-form-Btn-7gzv.d.mts → mapping-form-CV7y6qox.d.cts} +1 -3
  146. package/{mapping-score-D7Gzg7Ii.d.cts → mapping-score-BKrxddz0.d.cts} +0 -2
  147. package/{mapping-score-D7Gzg7Ii.d.mts → mapping-score-BKrxddz0.d.mts} +0 -2
  148. package/{mapping-score-C68uAqGB.mjs → mapping-score-CS-MTDL9.mjs} +1 -2
  149. package/{mapping-score-CaB3F4Uu.cjs → mapping-score-D2TCQiOr.cjs} +1 -2
  150. package/{mappings-config-D6_oCi2Q.d.mts → mappings-config-BBppW9fp.d.cts} +1 -3
  151. package/{mappings-config-BCsRLohT.cjs → mappings-config-CNxBrbt9.cjs} +3 -4
  152. package/{mappings-config-CwQNQ6bA.mjs → mappings-config-D_g20PyS.mjs} +3 -4
  153. package/{mappings-config-iJzbcUMp.d.cts → mappings-config-Dmm0H6p_.d.mts} +1 -3
  154. package/{namespace-probe-DykR0kgh.d.mts → namespace-probe-BHk3NcyI.d.cts} +32 -9
  155. package/{namespace-probe-H7yWc0JV.d.cts → namespace-probe-Dt_HXcI-.d.mts} +32 -9
  156. package/package.json +1 -7
  157. package/{projection-DvNewmI1.mjs → projection-BkYXvjTr.mjs} +2444 -1166
  158. package/{projection-BELgANG2.cjs → projection-By63gMC-.cjs} +2447 -1163
  159. package/{projection-sql-DweUaWRc.mjs → projection-sql-C3gZE3GS.mjs} +2 -3
  160. package/{projection-sql-DuCtFE9t.cjs → projection-sql-CHz7KzNS.cjs} +2 -3
  161. package/schemas-BSuo_eZQ.d.cts +2160 -0
  162. package/schemas-BSuo_eZQ.d.mts +2160 -0
  163. package/{sdk-ZMy4C4VK.cjs → sdk-BZSTXPyK.cjs} +185 -74
  164. package/{sdk-DLoVPlGB.mjs → sdk-KzHpSf7F.mjs} +185 -74
  165. package/sdk.cjs +2 -2
  166. package/sdk.d.cts +4 -12
  167. package/sdk.d.mts +4 -12
  168. package/sdk.mjs +2 -2
  169. package/{sync-engine-C_5TpvfX.d.mts → sync-engine-C7W0Gkq0.d.cts} +2 -4
  170. package/{sync-engine-CYsWOujz.d.cts → sync-engine-C9Q2FkR9.d.mts} +2 -4
  171. package/{sync-engine-DH058G3w.mjs → sync-engine-CwdLkmch.mjs} +2 -3
  172. package/{sync-engine-BGVDsrOQ.cjs → sync-engine-Di-vF26b.cjs} +2 -3
  173. package/{types-YJTkXKzU.mjs → types-8KSw2AWg.mjs} +1 -2
  174. package/{types-Cq5gHCTq.cjs → types-B8m39L1s.cjs} +1 -2
  175. package/{types-CpAtAtxd.d.cts → types-C9_2vW5a.d.mts} +30 -3
  176. package/{types-CpAtAtxd.d.mts → types-CQ2DgEH7.d.cts} +30 -3
  177. package/{view-compiler-C-6RydKK.mjs → view-compiler-CLTi1VL-.mjs} +3 -4
  178. package/{view-compiler-xiwm5iar.cjs → view-compiler-DaOz5QVl.cjs} +3 -4
  179. package/{view-compiler-CwKVoK1w.d.mts → view-compiler-M23WiVGG.d.mts} +1 -3
  180. package/{view-compiler-Cq8apvZ4.d.cts → view-compiler-cXqt4X-c.d.cts} +1 -3
  181. package/vite.cjs +1 -2
  182. package/vite.d.cts +2 -4
  183. package/vite.d.mts +2 -4
  184. package/vite.mjs +1 -2
  185. package/entity-config-ApnT5j3X.d.cts +0 -4472
  186. package/entity-config-CKcj4-M_.d.mts +0 -4473
package/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_entity_config = require("./entity-config-BI4RYNKL.cjs");
4
- require("./mapping-score-CaB3F4Uu.cjs");
5
- const require_internal_entity_heuristics = require("./internal-entity-heuristics.cjs");
6
- const require_sdk = require("./sdk-ZMy4C4VK.cjs");
3
+ const require_entity_config = require("./entity-config-DiCJ6mhI.cjs");
4
+ require("./mapping-score-D2TCQiOr.cjs");
5
+ const require_entity_heuristics = require("./entity-heuristics-CIParuQe.cjs");
6
+ const require_sdk = require("./sdk-BZSTXPyK.cjs");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_fs = require("node:fs");
9
9
  let node_module = require("node:module");
@@ -13,7 +13,7 @@ let node_readline_promises = require("node:readline/promises");
13
13
  let jiti = require("jiti");
14
14
  let node_url = require("node:url");
15
15
  let node_net = require("node:net");
16
- //#region ../core/src/env-file.ts
16
+ // ../core/src/env-file.ts
17
17
  const ENV_FILES = {
18
18
  next: ".env.local",
19
19
  "tanstack-start": ".env",
@@ -58,8 +58,7 @@ function resolveEnvFile(input) {
58
58
  if (input.existing.includes(conventional)) return conventional;
59
59
  return input.existing[0] ?? conventional;
60
60
  }
61
- //#endregion
62
- //#region src/app-layout.ts
61
+ // src/app-layout.ts
63
62
  function resolveAppLayout(cwd, fileExists = node_fs.existsSync) {
64
63
  if (fileExists((0, node_path.join)(cwd, "src", "app"))) return "src/app";
65
64
  if (fileExists((0, node_path.join)(cwd, "app"))) return "app";
@@ -78,8 +77,7 @@ Nothing was written. Please report this at https://github.com/amani-joseph/clivl
78
77
  — Clivly should have detected the src/app layout automatically.
79
78
  `;
80
79
  }
81
- //#endregion
82
- //#region src/load-config.ts
80
+ // src/load-config.ts
83
81
  const CONFIG_HINT = "Expected clivly.config.ts at your app root exporting `createClivlySDK({...})`.";
84
82
  function resolveConfigPath(cwd, configPath) {
85
83
  return (0, node_path.resolve)(cwd, configPath ?? "clivly.config.ts");
@@ -131,8 +129,7 @@ async function loadConfigSdk(path, requiredMethod) {
131
129
  if (typeof sdk?.[requiredMethod] !== "function") throw new Error("default export is not a Clivly SDK instance");
132
130
  return sdk;
133
131
  }
134
- //#endregion
135
- //#region src/cli-config.ts
132
+ // src/cli-config.ts
136
133
  const CLI_CONFIG_NAMES = [
137
134
  "clivly.cli.ts",
138
135
  "clivly.cli.js",
@@ -175,16 +172,14 @@ async function loadCliConfig(cwd) {
175
172
  const envFiles = readEnvFiles(config);
176
173
  return envFiles ? { envFiles } : {};
177
174
  }
178
- //#endregion
179
- //#region src/dashboard-locations.ts
175
+ // src/dashboard-locations.ts
180
176
  /** Secret + publishable keys. The Connect dialog mints them and shows the secret once. */
181
177
  const CREDENTIALS_LOCATION = "Clivly dashboard → Connect app (or Settings → API keys)";
182
178
  /** The signing secret Clivly Cloud uses on sync-trigger callbacks. */
183
179
  const SYNC_SECRET_LOCATION = "Clivly dashboard → Integrations → Remote sync";
184
180
  /** Chat widget records and their allowed origins. */
185
181
  const WIDGET_LOCATION = "Clivly dashboard → Settings → Chat widget";
186
- //#endregion
187
- //#region src/detect.ts
182
+ // src/detect.ts
188
183
  const FRAMEWORK_MARKERS = [
189
184
  {
190
185
  framework: "nextjs",
@@ -292,8 +287,7 @@ function addCommand(pm, packages) {
292
287
  args: [pm === "npm" ? "install" : "add", ...packages]
293
288
  };
294
289
  }
295
- //#endregion
296
- //#region src/detect-workspace.ts
290
+ // src/detect-workspace.ts
297
291
  const SELECTABLE_FRAMEWORKS = [
298
292
  "nextjs",
299
293
  "tanstack-start",
@@ -410,8 +404,7 @@ function detectAcrossWorkspace(appDeps, packages) {
410
404
  sources
411
405
  };
412
406
  }
413
- //#endregion
414
- //#region src/tick-route.ts
407
+ // src/tick-route.ts
415
408
  /**
416
409
  * The tick route's public URL path, and the template `clivly login` writes for
417
410
  * it.
@@ -448,8 +441,7 @@ const CLIVLY_TICK_PATH = "/api/clivly/tick";
448
441
  * auto-detected, and `clivly dev` handles local development.
449
442
  */
450
443
  const TRIGGER_URL_PLACEHOLDER = `https://<yourDomain.com>${CLIVLY_TICK_PATH}`;
451
- //#endregion
452
- //#region src/dev-tunnel.ts
444
+ // src/dev-tunnel.ts
453
445
  const CLOUDFLARE_QUICK_TUNNEL_REGEX = /https:\/\/[a-z0-9-]+\.trycloudflare\.com/;
454
446
  const DEFAULT_PORT = "3000";
455
447
  /**
@@ -568,8 +560,7 @@ function cloudflaredMissingMessage() {
568
560
  "Your app will still run locally; only dashboard-triggered sync is unavailable."
569
561
  ].join("\n");
570
562
  }
571
- //#endregion
572
- //#region src/tunnel-identity.ts
563
+ // src/tunnel-identity.ts
573
564
  /**
574
565
  * Whether the published tunnel actually reaches *this* app's Clivly route.
575
566
  *
@@ -687,8 +678,7 @@ function tunnelMismatchMessage(port) {
687
678
  " Until then, dashboard-triggered syncs will not reach this app."
688
679
  ].join("\n");
689
680
  }
690
- //#endregion
691
- //#region src/dev.ts
681
+ // src/dev.ts
692
682
  const UNREACHABLE_RESULT = {
693
683
  ok: false,
694
684
  kind: "unreachable"
@@ -770,8 +760,7 @@ async function runDev(options) {
770
760
  });
771
761
  });
772
762
  }
773
- //#endregion
774
- //#region src/dev-override.ts
763
+ // src/dev-override.ts
775
764
  const TRIGGER_URL_PATH = "/clivly/sdk/trigger-url";
776
765
  const HTTP_UNAUTHORIZED = 401;
777
766
  const HTTP_NOT_FOUND = 404;
@@ -811,8 +800,7 @@ async function clearTunnelOverride(deps) {
811
800
  if (res.ok) return { ok: true };
812
801
  return failureFor(res.status);
813
802
  }
814
- //#endregion
815
- //#region src/probe-module.ts
803
+ // src/probe-module.ts
816
804
  async function probeModule(opts) {
817
805
  for (const candidate of opts.candidates) {
818
806
  let mod;
@@ -828,8 +816,7 @@ async function probeModule(opts) {
828
816
  }
829
817
  return null;
830
818
  }
831
- //#endregion
832
- //#region src/workspace-graph.ts
819
+ // src/workspace-graph.ts
833
820
  const WINDOWS_SEP$3 = /\\/g;
834
821
  const MODULE_EXT$1 = /\.(ts|tsx|js|jsx|mjs|cjs|cts|mts)$/;
835
822
  const BRACE_GROUP = /\{([^{}]*)\}/;
@@ -1065,8 +1052,7 @@ function toPackageSpecifier(pkg, absPath) {
1065
1052
  if (subpath.length === 0) return pkg.name;
1066
1053
  return exportsAllowSubpath(pkg.dir, subpath) ? `${pkg.name}/${subpath}` : null;
1067
1054
  }
1068
- //#endregion
1069
- //#region src/discover-schema.ts
1055
+ // src/discover-schema.ts
1070
1056
  const WINDOWS_SEP$2 = /\\/g;
1071
1057
  const MODULE_EXT = /\.(ts|js|mjs|cts|mts)$/;
1072
1058
  /**
@@ -1241,8 +1227,7 @@ async function discoverSchema(opts) {
1241
1227
  db
1242
1228
  };
1243
1229
  }
1244
- //#endregion
1245
- //#region src/engine-check.ts
1230
+ // src/engine-check.ts
1246
1231
  const MAJOR = /^v?(\d+)/;
1247
1232
  const FIRST_NUMBER = /(\d+)/;
1248
1233
  function currentMajor(version) {
@@ -1264,8 +1249,7 @@ Upgrade with \`nvm install ${need}\` (or your version manager of choice), then r
1264
1249
  Set CLIVLY_SKIP_ENGINE_CHECK=1 to run anyway — expect unrelated-looking failures.
1265
1250
  `;
1266
1251
  }
1267
- //#endregion
1268
- //#region src/env-file.ts
1252
+ // src/env-file.ts
1269
1253
  const REGEX_METACHARACTERS = /[.*+?^${}()|[\]\\]/g;
1270
1254
  function escapeForRegExp(key) {
1271
1255
  return key.replace(REGEX_METACHARACTERS, "\\$&");
@@ -1348,8 +1332,7 @@ function upsertEnvValues(existing, entries, options = {}) {
1348
1332
  written
1349
1333
  };
1350
1334
  }
1351
- //#endregion
1352
- //#region src/help.ts
1335
+ // src/help.ts
1353
1336
  const ROOT_HELP = `clivly — embed a CRM in your app
1354
1337
 
1355
1338
  Usage:
@@ -1478,10 +1461,9 @@ function isHelpRequest(argv) {
1478
1461
  }
1479
1462
  function helpFor(command) {
1480
1463
  if (!command) return ROOT_HELP;
1481
- return COMMAND_HELP[command] ?? ROOT_HELP;
1464
+ return COMMAND_HELP[command] ?? "clivly — embed a CRM in your app\n\nUsage:\n clivly init [options] Scaffold Clivly (config, routes, env file) for your app\n clivly add widget [options] Scaffold the chat-session route\n clivly status [options] Check your setup, step by step\n clivly push-schema [options] Push schema, custom objects and mappings to Clivly\n clivly dev [options] Tunnel localhost so remote sync can reach you\n clivly login [options] Pair this machine and write credentials to your env file\n clivly --version Print the installed clivly version\n\nDeprecated aliases — each runs part of `clivly status` and still works:\n clivly ping credential + reachability\n clivly connect the above, plus config and trigger URL\n clivly doctor config, setup checks and edge safety\n\nPrefer `clivly status`: it runs the whole ladder and tells you which step you\nare on. The aliases are kept because output and docs have recommended them.\n\nRun `clivly <command> --help` for details on a command.\n";
1482
1465
  }
1483
- //#endregion
1484
- //#region src/install.ts
1466
+ // src/install.ts
1485
1467
  const defaultRun = (command, args, cwd) => new Promise((resolvePromise, reject) => {
1486
1468
  const child = (0, node_child_process.spawn)(command, args, {
1487
1469
  cwd,
@@ -1522,8 +1504,7 @@ async function installPackages(options) {
1522
1504
  };
1523
1505
  }
1524
1506
  }
1525
- //#endregion
1526
- //#region src/install-needed.ts
1507
+ // src/install-needed.ts
1527
1508
  /** Exact `name@version` only. Anything else is left for the package manager. */
1528
1509
  const EXACT_VERSION = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
1529
1510
  /**
@@ -1562,8 +1543,7 @@ function packagesNeedingInstall(packages, installedVersion) {
1562
1543
  return present !== version;
1563
1544
  });
1564
1545
  }
1565
- //#endregion
1566
- //#region src/is-entry.ts
1546
+ // src/is-entry.ts
1567
1547
  function isEntrypoint(argv1, moduleUrl, realpath = node_fs.realpathSync) {
1568
1548
  if (!argv1) return false;
1569
1549
  const modulePath = (0, node_url.fileURLToPath)(moduleUrl);
@@ -1576,8 +1556,7 @@ function isEntrypoint(argv1, moduleUrl, realpath = node_fs.realpathSync) {
1576
1556
  };
1577
1557
  return resolve(argv1) === resolve(modulePath);
1578
1558
  }
1579
- //#endregion
1580
- //#region src/load-env.ts
1559
+ // src/load-env.ts
1581
1560
  const LINE = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=(.*)$/;
1582
1561
  const NEWLINE$1 = /\r?\n/;
1583
1562
  const ESCAPED_NEWLINE = /\\n/g;
@@ -1652,8 +1631,7 @@ function loadEnv(cwd, env = process.env, options = {}) {
1652
1631
  files
1653
1632
  };
1654
1633
  }
1655
- //#endregion
1656
- //#region src/secret-key-env.ts
1634
+ // src/secret-key-env.ts
1657
1635
  const SECRET_KEY_ENV = "CLIVLY_SECRET_KEY";
1658
1636
  const LEGACY_SECRET_KEY_ENV = "CLIVLY_API_KEY";
1659
1637
  function readSecretKeyEnv(env) {
@@ -1661,8 +1639,7 @@ function readSecretKeyEnv(env) {
1661
1639
  if (next && next.length > 0) return next;
1662
1640
  return env[LEGACY_SECRET_KEY_ENV];
1663
1641
  }
1664
- //#endregion
1665
- //#region src/login.ts
1642
+ // src/login.ts
1666
1643
  const POLL_INTERVAL_MS = 2e3;
1667
1644
  const POLL_BACKOFF_MULTIPLIER = 1.5;
1668
1645
  const POLL_INTERVAL_MAX_MS = 1e4;
@@ -1794,6 +1771,7 @@ async function runLogin(options) {
1794
1771
  const session = await createPairingSession(options.apiUrl, deps, options.rotate);
1795
1772
  if ("exitCode" in session) return session.exitCode;
1796
1773
  deps.out(`\nApprove this login in your browser:\n ${session.approveUrl}\n`);
1774
+ if (session.userCode) deps.out(`When asked, enter this code: ${session.userCode}\nOnly enter it on a page you opened from this terminal. Never share it.\n`);
1797
1775
  if (options.openBrowser) deps.open(session.approveUrl);
1798
1776
  deps.out("Waiting for approval…");
1799
1777
  const outcome = await pollForApproval(options.apiUrl, deps, session);
@@ -1805,8 +1783,7 @@ async function runLogin(options) {
1805
1783
  writeCredentials(options, outcome);
1806
1784
  return 0;
1807
1785
  }
1808
- //#endregion
1809
- //#region src/plan-init.ts
1786
+ // src/plan-init.ts
1810
1787
  function toScoredTable(table) {
1811
1788
  return {
1812
1789
  name: table.tableName,
@@ -1853,27 +1830,27 @@ function fkPromotedCompanies(tables, contact) {
1853
1830
  const targets = /* @__PURE__ */ new Set();
1854
1831
  for (const column of contact.columns) {
1855
1832
  const table = column.references?.table;
1856
- if (table && !require_internal_entity_heuristics.isFrameworkTable(table)) targets.add(table.toLowerCase());
1833
+ if (table && !require_entity_heuristics.isFrameworkTable(table)) targets.add(table.toLowerCase());
1857
1834
  }
1858
- return tables.filter((t) => targets.has(t.tableName.toLowerCase()) && t.tableName !== contact.tableName && require_internal_entity_heuristics.hasDefiningColumn("company", columnNames(t)));
1835
+ return tables.filter((t) => targets.has(t.tableName.toLowerCase()) && t.tableName !== contact.tableName && require_entity_heuristics.hasDefiningColumn("company", columnNames(t)));
1859
1836
  }
1860
1837
  function rankCandidates$1(tables, concept, contact = null) {
1861
1838
  const promoted = concept === "company" ? fkPromotedCompanies(tables, contact) : [];
1862
1839
  const promotedNames = new Set(promoted.map((t) => t.tableName));
1863
1840
  return tables.map((t) => ({
1864
1841
  t,
1865
- m: require_internal_entity_heuristics.matchesConcept(t.tableName, concept) ?? (promotedNames.has(t.tableName) ? { exact: false } : null)
1842
+ m: require_entity_heuristics.matchesConcept(t.tableName, concept) ?? (promotedNames.has(t.tableName) ? { exact: false } : null)
1866
1843
  })).filter((c) => Boolean(c.m)).sort((a, b) => {
1867
- const usable = Number(require_internal_entity_heuristics.hasDefiningColumn(concept, columnNames(b.t))) - Number(require_internal_entity_heuristics.hasDefiningColumn(concept, columnNames(a.t)));
1844
+ const usable = Number(require_entity_heuristics.hasDefiningColumn(concept, columnNames(b.t))) - Number(require_entity_heuristics.hasDefiningColumn(concept, columnNames(a.t)));
1868
1845
  if (usable !== 0) return usable;
1869
1846
  const aPromoted = promotedNames.has(a.t.tableName);
1870
1847
  if (aPromoted !== promotedNames.has(b.t.tableName)) {
1871
1848
  const loser = aPromoted ? b.t : a.t;
1872
- if (require_internal_entity_heuristics.isFrameworkTable(loser.tableName)) return aPromoted ? -1 : 1;
1849
+ if (require_entity_heuristics.isFrameworkTable(loser.tableName)) return aPromoted ? -1 : 1;
1873
1850
  }
1874
1851
  const exact = Number(b.m.exact) - Number(a.m.exact);
1875
1852
  if (exact !== 0) return exact;
1876
- return Number(require_internal_entity_heuristics.isFrameworkTable(a.t.tableName)) - Number(require_internal_entity_heuristics.isFrameworkTable(b.t.tableName));
1853
+ return Number(require_entity_heuristics.isFrameworkTable(a.t.tableName)) - Number(require_entity_heuristics.isFrameworkTable(b.t.tableName));
1877
1854
  }).map((c) => c.t);
1878
1855
  }
1879
1856
  function selectEntities(tables) {
@@ -1892,7 +1869,7 @@ function selectEntities(tables) {
1892
1869
  }
1893
1870
  function chooseSyncFields(table, todos) {
1894
1871
  const columnKeys = table.columns.map((c) => c.key);
1895
- let cursorField = require_internal_entity_heuristics.suggestCursorField(columnKeys);
1872
+ let cursorField = require_entity_heuristics.suggestCursorField(columnKeys);
1896
1873
  if (!cursorField) {
1897
1874
  cursorField = table.columns.find((c) => c.isPrimary)?.key ?? columnKeys[0] ?? "id";
1898
1875
  todos.push(`No updated_at-like column on "${table.tableName}" — using "${cursorField}" as the sync cursor. Confirm it is monotonic.`);
@@ -1916,10 +1893,10 @@ const SPLIT_NAME_COLUMNS = /* @__PURE__ */ new Set([
1916
1893
  ]);
1917
1894
  function buildEntity(table, concept, todos) {
1918
1895
  const canonical = require_entity_config.CANONICAL_FIELDS[concept];
1919
- const suggested = require_internal_entity_heuristics.toFieldMap(require_internal_entity_heuristics.scoreFieldMap(concept, toScoredTable(table)));
1896
+ const suggested = require_entity_heuristics.toFieldMap(require_entity_heuristics.scoreFieldMap(concept, toScoredTable(table)));
1920
1897
  const fields = {};
1921
1898
  for (const [key, column] of Object.entries(suggested)) if (canonical.includes(key)) fields[key] = column;
1922
- for (const required of require_internal_entity_heuristics.requiredFieldsFor(concept)) if (!fields[required]) todos.push(`Could not map required ${concept} field "${required}" on "${table.tableName}" — add it manually.`);
1899
+ for (const required of require_entity_heuristics.requiredFieldsFor(concept)) if (!fields[required]) todos.push(`Could not map required ${concept} field "${required}" on "${table.tableName}" — add it manually.`);
1923
1900
  const nameColumn = fields.name?.toLowerCase();
1924
1901
  if (nameColumn && SPLIT_NAME_COLUMNS.has(nameColumn)) todos.push(`Mapped ${concept} "name" to "${fields.name}" on "${table.tableName}" — that is the given name only. Clivly mirrors one column per field, so add a full-name column if you want surnames.`);
1925
1902
  const { cursorField, idField } = chooseSyncFields(table, todos);
@@ -1975,11 +1952,11 @@ function planInit(schema, overrides = {}) {
1975
1952
  if (hasMappedFields(candidate)) {
1976
1953
  todos.push(...candidateTodos);
1977
1954
  company = candidate;
1978
- if (require_internal_entity_heuristics.matchesConcept(companyTable.tableName, "contact")) todos.push(`"${companyTable.tableName}" matches both contact and company naming — assigned to company. Swap it to your contact entity if that's wrong.`);
1955
+ if (require_entity_heuristics.matchesConcept(companyTable.tableName, "contact")) todos.push(`"${companyTable.tableName}" matches both contact and company naming — assigned to company. Swap it to your contact entity if that's wrong.`);
1979
1956
  } else todos.push(`"${companyTable.tableName}" looked like a company but no fields could be mapped — left it out. Add it to \`entities\` once you know which columns map to name/domain, or build a derived object from it in Clivly (Integrations → Map as custom object) if the fields live in a joined table.`);
1980
1957
  }
1981
1958
  if (contactTable && contact) {
1982
- const scored = require_internal_entity_heuristics.scoreRelationships(toScoredTable(contactTable), schema.tables.map(toScoredTable));
1959
+ const scored = require_entity_heuristics.scoreRelationships(toScoredTable(contactTable), schema.tables.map(toScoredTable));
1983
1960
  const top = scored[0];
1984
1961
  const runnerUp = scored[1];
1985
1962
  const isClearWinner = top !== void 0 && (runnerUp === void 0 || top.score - runnerUp.score >= 15);
@@ -2060,7 +2037,7 @@ function rankContactCandidates(tables) {
2060
2037
  const columns = new Set(table.columns.flatMap((c) => [c.dbName.toLowerCase(), c.key.toLowerCase()]));
2061
2038
  const reasons = [];
2062
2039
  let score = 0;
2063
- if (require_internal_entity_heuristics.matchesConcept(table.tableName, "contact")) {
2040
+ if (require_entity_heuristics.matchesConcept(table.tableName, "contact")) {
2064
2041
  score += NAME_MATCH_WEIGHT;
2065
2042
  reasons.push("the name looks like a people table");
2066
2043
  }
@@ -2081,15 +2058,13 @@ function rankContactCandidates(tables) {
2081
2058
  table
2082
2059
  }));
2083
2060
  }
2084
- //#endregion
2085
- //#region src/config-import.ts
2061
+ // src/config-import.ts
2086
2062
  const WINDOWS_SEP$1 = /\\/g;
2087
2063
  function configImport(generatedFilePath) {
2088
2064
  const rel = (0, node_path.relative)((0, node_path.dirname)(generatedFilePath), "clivly.config").replace(WINDOWS_SEP$1, "/");
2089
2065
  return rel.startsWith(".") ? rel : `./${rel}`;
2090
2066
  }
2091
- //#endregion
2092
- //#region src/boot-hook.ts
2067
+ // src/boot-hook.ts
2093
2068
  const BOOT_HOOK_PATHS = {
2094
2069
  nextjs: "instrumentation.ts",
2095
2070
  nuxt: "server/plugins/clivly.ts",
@@ -2238,8 +2213,7 @@ function planBootHook(framework, layout) {
2238
2213
  owned: true
2239
2214
  };
2240
2215
  }
2241
- //#endregion
2242
- //#region src/render-config.ts
2216
+ // src/render-config.ts
2243
2217
  const CLIVLY_ENV_KEYS = [
2244
2218
  {
2245
2219
  key: "CLIVLY_SECRET_KEY",
@@ -2364,8 +2338,7 @@ ${sources.join(",\n")},
2364
2338
  });
2365
2339
  `;
2366
2340
  }
2367
- //#endregion
2368
- //#region src/render-auth.ts
2341
+ // src/render-auth.ts
2369
2342
  const RESOLVE_USER = "const resolveUser = (req: Request) => adapter.getUser(req);";
2370
2343
  const STUB = {
2371
2344
  complete: false,
@@ -2439,8 +2412,7 @@ function renderAuthWiring(auth, authInstance = null) {
2439
2412
  default: return STUB;
2440
2413
  }
2441
2414
  }
2442
- //#endregion
2443
- //#region src/tsconfig-alias.ts
2415
+ // src/tsconfig-alias.ts
2444
2416
  const LEADING_DOT_SLASH$1 = /^\.\//;
2445
2417
  const TRAILING_WILDCARD = /\/?\*$/;
2446
2418
  const TRAILING_SLASH = /\/$/;
@@ -2516,8 +2488,7 @@ function baseReaching(mapped, target) {
2516
2488
  if (base === "") return target === "" ? null : "";
2517
2489
  return target.startsWith(`${base}/`) ? base : null;
2518
2490
  }
2519
- //#endregion
2520
- //#region src/scaffold.ts
2491
+ // src/scaffold.ts
2521
2492
  const TANSTACK_ROUTE_PREFIX = /^src\/routes\//;
2522
2493
  const TS_EXTENSION = /\.ts$/;
2523
2494
  const ROUTE_PATHS = {
@@ -2689,8 +2660,7 @@ function planWidgetScaffold(framework, layout = "app") {
2689
2660
  owned: true
2690
2661
  }];
2691
2662
  }
2692
- //#endregion
2693
- //#region src/vite-boot-patch.ts
2663
+ // src/vite-boot-patch.ts
2694
2664
  /** Config filenames to look for, in precedence order. */
2695
2665
  const VITE_CONFIG_CANDIDATES = [
2696
2666
  "vite.config.ts",
@@ -2728,8 +2698,7 @@ function patchViteConfig(source) {
2728
2698
  const separator = rest.startsWith("\n") ? "" : " ";
2729
2699
  return insertImports(`${source.slice(0, openBracketEnd)}${PLUGIN_CALL},${separator}${rest}`);
2730
2700
  }
2731
- //#endregion
2732
- //#region src/plan-mutations.ts
2701
+ // src/plan-mutations.ts
2733
2702
  function fileAction(existing, next, force) {
2734
2703
  if (existing === null) return "create";
2735
2704
  if (existing === next) return "unchanged";
@@ -2855,8 +2824,7 @@ function planWidgetMutations(args) {
2855
2824
  };
2856
2825
  });
2857
2826
  }
2858
- //#endregion
2859
- //#region src/port-probe.ts
2827
+ // src/port-probe.ts
2860
2828
  const PORT_PROBE_TIMEOUT_MS = 1500;
2861
2829
  /** One connect attempt against a single address family. */
2862
2830
  function connectsOn(port, host) {
@@ -2892,8 +2860,7 @@ function connectsOn(port, host) {
2892
2860
  function isLocalPortListening(port) {
2893
2861
  return Promise.all([connectsOn(port, "127.0.0.1"), connectsOn(port, "::1")]).then((results) => results.some(Boolean));
2894
2862
  }
2895
- //#endregion
2896
- //#region src/quiet-host-output.ts
2863
+ // src/quiet-host-output.ts
2897
2864
  /**
2898
2865
  * Run `fn` with the process's stdout/stderr captured. Always restores the
2899
2866
  * original writers, including when `fn` throws — a leaked patch would silence
@@ -2935,8 +2902,7 @@ async function quietly(fn) {
2935
2902
  const { result } = await captureHostOutput(fn);
2936
2903
  return result;
2937
2904
  }
2938
- //#endregion
2939
- //#region src/probe-auth.ts
2905
+ // src/probe-auth.ts
2940
2906
  const AUTH_MODULE_PATHS = [
2941
2907
  "auth",
2942
2908
  "lib/auth",
@@ -2970,8 +2936,7 @@ function probeAuthInstance(cwd, load) {
2970
2936
  match: isBetterAuthInstance
2971
2937
  }));
2972
2938
  }
2973
- //#endregion
2974
- //#region src/push-schema.ts
2939
+ // src/push-schema.ts
2975
2940
  /**
2976
2941
  * "1 mapping" / "3 mappings" — a count nobody has to decode. The plural is
2977
2942
  * explicit because appending "s" turns "entity" into "entitys".
@@ -3049,8 +3014,7 @@ async function runPushSchema(options) {
3049
3014
  out(" Open Integrations → Mapping to map your tables.\n");
3050
3015
  return 0;
3051
3016
  }
3052
- //#endregion
3053
- //#region src/resolve-schema-path.ts
3017
+ // src/resolve-schema-path.ts
3054
3018
  const COMMON_PATHS = [
3055
3019
  "src/db/schema.ts",
3056
3020
  "src/db/schema",
@@ -3128,8 +3092,7 @@ function resolveSchemaPath(opts) {
3128
3092
  }
3129
3093
  return null;
3130
3094
  }
3131
- //#endregion
3132
- //#region src/resolve-target-app.ts
3095
+ // src/resolve-target-app.ts
3133
3096
  function packageDeps(dir) {
3134
3097
  const pkg = readPackageManifest(dir);
3135
3098
  return {
@@ -3208,8 +3171,7 @@ function resolveTargetApp(start, boundary = (0, node_os.homedir)()) {
3208
3171
  candidates: ranked
3209
3172
  };
3210
3173
  }
3211
- //#endregion
3212
- //#region src/status-ladder.ts
3174
+ // src/status-ladder.ts
3213
3175
  const SATISFYING = /* @__PURE__ */ new Set(["pass", "warn"]);
3214
3176
  function unmetPrerequisites(stage, satisfied) {
3215
3177
  return (stage.needs ?? []).filter((id) => !satisfied.has(id));
@@ -3259,8 +3221,7 @@ async function runLadder(stages, ctx) {
3259
3221
  function ladderExitCode(results) {
3260
3222
  return results.every((result) => result.state !== "fail" && result.state !== "pending") ? 0 : 1;
3261
3223
  }
3262
- //#endregion
3263
- //#region src/boot-hook-check.ts
3224
+ // src/boot-hook-check.ts
3264
3225
  const REMIX_ENTRY_CANDIDATES = [
3265
3226
  "app/entry.server.tsx",
3266
3227
  "app/entry.server.ts",
@@ -3356,8 +3317,7 @@ function checkBootHook(readFile) {
3356
3317
  detail: site
3357
3318
  };
3358
3319
  }
3359
- //#endregion
3360
- //#region src/cursor-store-check.ts
3320
+ // src/cursor-store-check.ts
3361
3321
  /**
3362
3322
  * Whether a config that will run on a serverless runtime persists its sync
3363
3323
  * cursor.
@@ -3437,8 +3397,7 @@ function cursorStoreDetail(verdict) {
3437
3397
  if (verdict.edgeRuntime === null) return "in-memory (fine on a long-lived host)";
3438
3398
  return `No \`cursorStore\` on ${verdict.edgeRuntime} — memory does not survive between invocations, so every delta sync re-reads your entire source tables.`;
3439
3399
  }
3440
- //#endregion
3441
- //#region src/edge-safety.ts
3400
+ // src/edge-safety.ts
3442
3401
  const NODE_BUILTINS = /* @__PURE__ */ new Set([
3443
3402
  "assert",
3444
3403
  "buffer",
@@ -3592,8 +3551,7 @@ function analyzeConfigTree(input) {
3592
3551
  }
3593
3552
  return issues;
3594
3553
  }
3595
- //#endregion
3596
- //#region src/status-stages.ts
3554
+ // src/status-stages.ts
3597
3555
  const MODULE_CANDIDATES = [
3598
3556
  ".ts",
3599
3557
  ".tsx",
@@ -3851,8 +3809,7 @@ const STATUS_STAGES = [
3851
3809
  function defaultLoadSdk(path) {
3852
3810
  return loadConfigSdk(path, "doctor");
3853
3811
  }
3854
- //#endregion
3855
- //#region src/workspace-section.ts
3812
+ // src/workspace-section.ts
3856
3813
  const MARK$1 = {
3857
3814
  active: "⏳",
3858
3815
  blocked: "🔒",
@@ -3889,8 +3846,7 @@ function workspaceSection(result) {
3889
3846
  lines: result.workspace.steps.map((step) => ` ${MARK$1[step.state]} ${step.label}${step.evidence ? ` ${step.evidence}` : ""}`)
3890
3847
  };
3891
3848
  }
3892
- //#endregion
3893
- //#region src/status.ts
3849
+ // src/status.ts
3894
3850
  /** Stage ids each legacy command maps onto. */
3895
3851
  const ALIAS_STAGE_IDS = {
3896
3852
  status: STATUS_STAGES.map((stage) => stage.id),
@@ -3972,8 +3928,7 @@ async function runStatus(options) {
3972
3928
  if (code !== 0 && results.some((result) => result.state === "pending")) out("\nSetup is incomplete — finish the steps above and re-run.\n");
3973
3929
  return code;
3974
3930
  }
3975
- //#endregion
3976
- //#region src/index.ts
3931
+ // src/index.ts
3977
3932
  const ENV_FILE_CANDIDATES = [
3978
3933
  ".env",
3979
3934
  ".env.local",
@@ -4814,7 +4769,6 @@ async function main(argv) {
4814
4769
  if (isEntrypoint(process.argv[1], require("url").pathToFileURL(__filename).href)) main(process.argv.slice(2)).then((code) => {
4815
4770
  process.exitCode = code;
4816
4771
  });
4817
- //#endregion
4818
4772
  exports.KNOWN_COMMANDS = KNOWN_COMMANDS;
4819
4773
  exports.credentialsMissing = credentialsMissing;
4820
4774
  exports.main = main;
package/index.d.cts CHANGED
@@ -1,11 +1,6 @@
1
- //#region src/detect.d.ts
2
1
  type Framework = "nextjs" | "tanstack-start" | "sveltekit" | "remix" | "nuxt" | "unknown";
3
2
  type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
4
- //#endregion
5
- //#region src/app-layout.d.ts
6
3
  type AppLayout = "app" | "src/app";
7
- //#endregion
8
- //#region src/workspace-graph.d.ts
9
4
  interface WorkspacePackage {
10
5
  /** Absolute path to the package directory. */
11
6
  dir: string;
@@ -17,8 +12,6 @@ interface WorkspaceGraph {
17
12
  /** Absolute path to the workspace root (where the globs are declared). */
18
13
  root: string;
19
14
  }
20
- //#endregion
21
- //#region src/discover-schema.d.ts
22
15
  interface DiscoveredColumn {
23
16
  dbName: string;
24
17
  isPrimary: boolean;
@@ -49,16 +42,12 @@ interface DiscoveredSchema {
49
42
  importPath: string;
50
43
  tables: DiscoveredTable[];
51
44
  }
52
- //#endregion
53
- //#region src/probe-module.d.ts
54
45
  interface ProbeHit {
55
46
  /** Config-relative specifier to import it from, e.g. "./lib/db". */
56
47
  importPath: string;
57
48
  /** The name the matching value is exported under. */
58
49
  moduleKey: string;
59
50
  }
60
- //#endregion
61
- //#region src/index.d.ts
62
51
  export declare const KNOWN_COMMANDS: readonly ["init", "status", "push-schema", "add", "dev", "login", "help", "ping", "doctor", "connect"];
63
52
  export declare function nearestCommand(input: string): string | undefined;
64
53
  export interface AddDeps {
@@ -119,4 +108,4 @@ export declare function credentialsMissing(envContents: string): boolean;
119
108
  export declare function runInit(options: RunInitOptions): Promise<number>;
120
109
  export declare function runInitFromArgv(argv: string[], cwd: string): Promise<number>;
121
110
  export declare function main(argv: string[]): Promise<number>;
122
- //#endregion
111
+ export {};
package/index.d.mts CHANGED
@@ -1,11 +1,6 @@
1
- //#region src/detect.d.ts
2
1
  type Framework = "nextjs" | "tanstack-start" | "sveltekit" | "remix" | "nuxt" | "unknown";
3
2
  type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
4
- //#endregion
5
- //#region src/app-layout.d.ts
6
3
  type AppLayout = "app" | "src/app";
7
- //#endregion
8
- //#region src/workspace-graph.d.ts
9
4
  interface WorkspacePackage {
10
5
  /** Absolute path to the package directory. */
11
6
  dir: string;
@@ -17,8 +12,6 @@ interface WorkspaceGraph {
17
12
  /** Absolute path to the workspace root (where the globs are declared). */
18
13
  root: string;
19
14
  }
20
- //#endregion
21
- //#region src/discover-schema.d.ts
22
15
  interface DiscoveredColumn {
23
16
  dbName: string;
24
17
  isPrimary: boolean;
@@ -49,16 +42,12 @@ interface DiscoveredSchema {
49
42
  importPath: string;
50
43
  tables: DiscoveredTable[];
51
44
  }
52
- //#endregion
53
- //#region src/probe-module.d.ts
54
45
  interface ProbeHit {
55
46
  /** Config-relative specifier to import it from, e.g. "./lib/db". */
56
47
  importPath: string;
57
48
  /** The name the matching value is exported under. */
58
49
  moduleKey: string;
59
50
  }
60
- //#endregion
61
- //#region src/index.d.ts
62
51
  export declare const KNOWN_COMMANDS: readonly ["init", "status", "push-schema", "add", "dev", "login", "help", "ping", "doctor", "connect"];
63
52
  export declare function nearestCommand(input: string): string | undefined;
64
53
  export interface AddDeps {
@@ -119,4 +108,4 @@ export declare function credentialsMissing(envContents: string): boolean;
119
108
  export declare function runInit(options: RunInitOptions): Promise<number>;
120
109
  export declare function runInitFromArgv(argv: string[], cwd: string): Promise<number>;
121
110
  export declare function main(argv: string[]): Promise<number>;
122
- //#endregion
111
+ export {};