clivly 0.9.1 → 0.9.2
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 +19 -7
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- 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 +1 -1
- package/core-entity-heuristics.d.mts +1 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mappings-config.cjs +2 -1
- package/core-mappings-config.d.cts +2 -2
- package/core-mappings-config.d.mts +2 -2
- package/core-mappings-config.mjs +2 -2
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-view-compiler.d.cts +1 -1
- package/core-view-compiler.d.mts +1 -1
- package/core.cjs +3 -3
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +3 -3
- package/{drizzle-DooDUGqO.d.mts → drizzle-CiK8MMEZ.d.mts} +1 -1
- package/{drizzle-jz0lrAgl.d.cts → drizzle-DEtRrqtc.d.cts} +1 -1
- package/drizzle.d.cts +2 -2
- package/drizzle.d.mts +2 -2
- package/{entity-config-fKQhimtD.d.mts → entity-config-B2RA53nw.d.cts} +25 -1
- package/{entity-config-fKQhimtD.d.cts → entity-config-B2RA53nw.d.mts} +25 -1
- package/{entity-config-nuXge6rY.cjs → entity-config-DtBsl2MQ.cjs} +36 -12
- package/{entity-config-D08zAeFY.mjs → entity-config-kUHri9yA.mjs} +31 -13
- package/index.cjs +371 -27
- package/index.d.cts +1 -0
- package/index.d.mts +1 -0
- package/index.mjs +371 -27
- package/{internal-C-YBW2DB.d.cts → internal-CDY8g9Ic.d.mts} +1 -1
- package/{internal-D4HDi2GC.cjs → internal-CwnEG6Wl.cjs} +1 -1
- package/{internal-BLCK81kB.d.mts → internal-Da_dlcQ_.d.cts} +1 -1
- package/{internal-BGVUG312.mjs → internal-Df-PtOH_.mjs} +1 -1
- package/internal-drizzle.d.cts +1 -1
- package/internal-drizzle.d.mts +1 -1
- 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 +1 -1
- package/internal-entity-heuristics.d.cts +1 -1
- package/internal-entity-heuristics.d.mts +1 -1
- package/internal-entity-heuristics.mjs +1 -1
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +2 -1
- package/internal-mappings-config.d.cts +2 -2
- package/internal-mappings-config.d.mts +2 -2
- package/internal-mappings-config.mjs +2 -2
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-view-compiler.d.cts +1 -1
- package/internal-view-compiler.d.mts +1 -1
- package/internal.cjs +3 -3
- package/internal.d.cts +6 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +3 -3
- package/{mapping-form-Du36VZr1.d.mts → mapping-form-DH77BXLv.d.mts} +1 -1
- package/{mapping-form-DhY0iFmN.d.cts → mapping-form-J0aU6O7l.d.cts} +1 -1
- package/{mappings-config-C8ynKmDK.cjs → mappings-config-B0RqFLxu.cjs} +30 -1
- package/{mappings-config-DNaYGyKN.mjs → mappings-config-B1b1HVBg.mjs} +25 -2
- package/{mappings-config-B1qNM8VL.d.cts → mappings-config-D9dsonoi.d.mts} +40 -2
- package/{mappings-config-BChZsany.d.mts → mappings-config-RQLGx8ub.d.cts} +40 -2
- package/{namespace-probe-BkUs8raG.d.mts → namespace-probe-C6aHjedO.d.cts} +65 -3
- package/{namespace-probe-aRFmpU85.d.cts → namespace-probe-Dj-0Q3Hb.d.mts} +65 -3
- package/package.json +1 -1
- package/{sdk-Bj-ZDf4u.cjs → sdk-D4Wp_uxb.cjs} +754 -44
- package/{sdk-BvRD2jAp.mjs → sdk-DXV8M_Io.mjs} +754 -44
- package/sdk.cjs +4 -2
- package/sdk.d.cts +3 -3
- package/sdk.d.mts +3 -3
- package/sdk.mjs +3 -3
- package/{sync-engine-DHQ7rXZe.d.mts → sync-engine-BG2O1an2.d.cts} +2 -2
- package/{sync-engine-DiPjH53O.d.cts → sync-engine-DgQbrJON.d.mts} +2 -2
- package/{view-compiler-CcUwzZut.d.mts → view-compiler-Bo7pqXW3.d.mts} +1 -1
- package/{view-compiler-DqAdVxLq.d.cts → view-compiler-CmEdAMwj.d.cts} +1 -1
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
package/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as CANONICAL_FIELDS } from "./entity-config-
|
|
2
|
+
import { t as CANONICAL_FIELDS } from "./entity-config-kUHri9yA.mjs";
|
|
3
3
|
import "./mapping-score-C68uAqGB.mjs";
|
|
4
4
|
import { matchesConcept, requiredFieldsFor, scoreFieldMap, scoreRelationships, suggestCursorField, toFieldMap } from "./internal-entity-heuristics.mjs";
|
|
5
|
-
import { t as createClivlySDK } from "./sdk-
|
|
5
|
+
import { t as createClivlySDK } from "./sdk-DXV8M_Io.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import { accessSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, watch, writeFileSync } from "node:fs";
|
|
@@ -477,7 +477,7 @@ async function probeModule(opts) {
|
|
|
477
477
|
}
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/workspace-graph.ts
|
|
480
|
-
const WINDOWS_SEP$
|
|
480
|
+
const WINDOWS_SEP$3 = /\\/g;
|
|
481
481
|
const MODULE_EXT$1 = /\.(ts|tsx|js|jsx|mjs|cjs|cts|mts)$/;
|
|
482
482
|
const BRACE_GROUP = /\{([^{}]*)\}/;
|
|
483
483
|
const MAX_GLOB_DEPTH = 8;
|
|
@@ -708,13 +708,13 @@ function exportsAllowSubpath(packageDir, subpath) {
|
|
|
708
708
|
function toPackageSpecifier(pkg, absPath) {
|
|
709
709
|
const target = resolve(absPath);
|
|
710
710
|
if (resolvePackageEntry(pkg.dir) === target) return pkg.name;
|
|
711
|
-
const subpath = relative(pkg.dir, target).replace(WINDOWS_SEP$
|
|
711
|
+
const subpath = relative(pkg.dir, target).replace(WINDOWS_SEP$3, "/").replace(MODULE_EXT$1, "");
|
|
712
712
|
if (subpath.length === 0) return pkg.name;
|
|
713
713
|
return exportsAllowSubpath(pkg.dir, subpath) ? `${pkg.name}/${subpath}` : null;
|
|
714
714
|
}
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region src/discover-schema.ts
|
|
717
|
-
const WINDOWS_SEP$
|
|
717
|
+
const WINDOWS_SEP$2 = /\\/g;
|
|
718
718
|
const MODULE_EXT = /\.(ts|js|mjs|cts|mts)$/;
|
|
719
719
|
/**
|
|
720
720
|
* Turn an absolute module path into the specifier the generated config imports
|
|
@@ -739,7 +739,7 @@ function toImportPath(schemaPath, cwd, graph) {
|
|
|
739
739
|
const specifier = toPackageSpecifier(owner, schemaPath);
|
|
740
740
|
if (specifier) return specifier;
|
|
741
741
|
}
|
|
742
|
-
const rel = relative(cwd, schemaPath).replace(WINDOWS_SEP$
|
|
742
|
+
const rel = relative(cwd, schemaPath).replace(WINDOWS_SEP$2, "/").replace(MODULE_EXT, "");
|
|
743
743
|
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
744
744
|
}
|
|
745
745
|
function isDirectory(path) {
|
|
@@ -1153,6 +1153,46 @@ async function installPackages(options) {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
//#endregion
|
|
1156
|
+
//#region src/install-needed.ts
|
|
1157
|
+
/** Exact `name@version` only. Anything else is left for the package manager. */
|
|
1158
|
+
const EXACT_VERSION = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
|
|
1159
|
+
/**
|
|
1160
|
+
* Split `name@version`, tolerating scoped names where the leading `@` is part
|
|
1161
|
+
* of the name rather than a separator. Returns a null version for a bare name.
|
|
1162
|
+
*/
|
|
1163
|
+
function parseSpec(spec) {
|
|
1164
|
+
const at = spec.lastIndexOf("@");
|
|
1165
|
+
if (at <= 0) return {
|
|
1166
|
+
name: spec,
|
|
1167
|
+
version: null
|
|
1168
|
+
};
|
|
1169
|
+
return {
|
|
1170
|
+
name: spec.slice(0, at),
|
|
1171
|
+
version: spec.slice(at + 1)
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* Which of `packages` still need installing.
|
|
1176
|
+
*
|
|
1177
|
+
* Deliberately conservative — a spec is only dropped when it is provably
|
|
1178
|
+
* satisfied. Tarball paths, `file:` specs and semver ranges are always kept:
|
|
1179
|
+
* the first two name no version to compare, and resolving the third needs a
|
|
1180
|
+
* semver implementation the CLI does not ship. Erring toward installing costs
|
|
1181
|
+
* a redundant install; erring the other way silently skips one the developer
|
|
1182
|
+
* asked for.
|
|
1183
|
+
*/
|
|
1184
|
+
function packagesNeedingInstall(packages, installedVersion) {
|
|
1185
|
+
return packages.filter((spec) => {
|
|
1186
|
+
if (spec.startsWith(".") || spec.startsWith("/") || spec.includes(":") || spec.includes("/") && !spec.startsWith("@")) return true;
|
|
1187
|
+
const { name, version } = parseSpec(spec);
|
|
1188
|
+
const present = installedVersion(name);
|
|
1189
|
+
if (present === null) return true;
|
|
1190
|
+
if (version === null) return false;
|
|
1191
|
+
if (!EXACT_VERSION.test(version)) return true;
|
|
1192
|
+
return present !== version;
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
//#endregion
|
|
1156
1196
|
//#region src/is-entry.ts
|
|
1157
1197
|
function isEntrypoint(argv1, moduleUrl, realpath = realpathSync) {
|
|
1158
1198
|
if (!argv1) return false;
|
|
@@ -1614,6 +1654,106 @@ function rankContactCandidates(tables) {
|
|
|
1614
1654
|
}));
|
|
1615
1655
|
}
|
|
1616
1656
|
//#endregion
|
|
1657
|
+
//#region src/config-import.ts
|
|
1658
|
+
const WINDOWS_SEP$1 = /\\/g;
|
|
1659
|
+
function configImport(generatedFilePath) {
|
|
1660
|
+
const rel = relative(dirname(generatedFilePath), "clivly.config").replace(WINDOWS_SEP$1, "/");
|
|
1661
|
+
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
1662
|
+
}
|
|
1663
|
+
//#endregion
|
|
1664
|
+
//#region src/boot-hook.ts
|
|
1665
|
+
const BOOT_HOOK_PATHS = {
|
|
1666
|
+
nextjs: "instrumentation.ts",
|
|
1667
|
+
nuxt: "server/plugins/clivly.ts",
|
|
1668
|
+
sveltekit: "src/hooks.server.ts",
|
|
1669
|
+
"tanstack-start": null,
|
|
1670
|
+
remix: null,
|
|
1671
|
+
unknown: null
|
|
1672
|
+
};
|
|
1673
|
+
function bootHookPath(framework, layout) {
|
|
1674
|
+
const path = BOOT_HOOK_PATHS[framework];
|
|
1675
|
+
if (path === null) return null;
|
|
1676
|
+
if (framework === "nextjs" && layout === "src/app") return `src/${path}`;
|
|
1677
|
+
return path;
|
|
1678
|
+
}
|
|
1679
|
+
const FAILURE_NOTE = "Clivly never blocks your app from starting: a failed check-in is logged and retried on the next tick.";
|
|
1680
|
+
function nextjsHook(importPath) {
|
|
1681
|
+
return `// Clivly boot hook. Next.js calls register() once when the server starts.
|
|
1682
|
+
// ${FAILURE_NOTE}
|
|
1683
|
+
export async function register() {
|
|
1684
|
+
// The keep-alive loop is a setInterval, which does not survive on the edge
|
|
1685
|
+
// runtime — it would stop ticking after the first response and the dashboard
|
|
1686
|
+
// would show an app that checked in once and then went stale forever.
|
|
1687
|
+
if (process.env.NEXT_RUNTIME !== "nodejs") {
|
|
1688
|
+
return;
|
|
1689
|
+
}
|
|
1690
|
+
try {
|
|
1691
|
+
const { default: clivly } = await import("${importPath}");
|
|
1692
|
+
await clivly.start();
|
|
1693
|
+
} catch (error) {
|
|
1694
|
+
console.warn("[clivly] could not check in:", error);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
`;
|
|
1698
|
+
}
|
|
1699
|
+
function nuxtHook(importPath) {
|
|
1700
|
+
return `import clivly from "${importPath}";
|
|
1701
|
+
|
|
1702
|
+
// Clivly boot hook. Nitro runs this once when the server starts.
|
|
1703
|
+
// ${FAILURE_NOTE}
|
|
1704
|
+
export default defineNitroPlugin(() => {
|
|
1705
|
+
clivly.start().catch((error: unknown) => {
|
|
1706
|
+
console.warn("[clivly] could not check in:", error);
|
|
1707
|
+
});
|
|
1708
|
+
});
|
|
1709
|
+
`;
|
|
1710
|
+
}
|
|
1711
|
+
function sveltekitHook(importPath) {
|
|
1712
|
+
return `import clivly from "${importPath}";
|
|
1713
|
+
|
|
1714
|
+
// Clivly boot hook. This module is evaluated once when the server starts.
|
|
1715
|
+
// ${FAILURE_NOTE}
|
|
1716
|
+
clivly.start().catch((error: unknown) => {
|
|
1717
|
+
console.warn("[clivly] could not check in:", error);
|
|
1718
|
+
});
|
|
1719
|
+
`;
|
|
1720
|
+
}
|
|
1721
|
+
const RENDERERS = {
|
|
1722
|
+
nextjs: nextjsHook,
|
|
1723
|
+
nuxt: nuxtHook,
|
|
1724
|
+
sveltekit: sveltekitHook
|
|
1725
|
+
};
|
|
1726
|
+
function renderBootHook(framework, layout) {
|
|
1727
|
+
const path = bootHookPath(framework, layout);
|
|
1728
|
+
const render = RENDERERS[framework];
|
|
1729
|
+
if (!(path && render)) throw new Error(`No standalone boot hook for framework: ${framework}`);
|
|
1730
|
+
return render(configImport(path));
|
|
1731
|
+
}
|
|
1732
|
+
const NEXT_INSTRUMENTATION_STABLE_MAJOR = 15;
|
|
1733
|
+
const LEADING_MAJOR = /(\d+)/;
|
|
1734
|
+
/** Does this Next.js version range need the experimental flag to run our hook? */
|
|
1735
|
+
function nextNeedsInstrumentationFlag(versionRange) {
|
|
1736
|
+
if (!versionRange) return false;
|
|
1737
|
+
const major = LEADING_MAJOR.exec(versionRange);
|
|
1738
|
+
if (!major?.[1]) return false;
|
|
1739
|
+
return Number(major[1]) < NEXT_INSTRUMENTATION_STABLE_MAJOR;
|
|
1740
|
+
}
|
|
1741
|
+
const NEXT_INSTRUMENTATION_FLAG_STEP = `Your Next.js version reads instrumentation.ts only when it is switched on. Add this to next.config, or Clivly will never be told your app started:
|
|
1742
|
+
experimental: { instrumentationHook: true }`;
|
|
1743
|
+
const REMIX_BOOT_STEP = `Start Clivly when your app boots. Add this near the top of app/entry.server.tsx:
|
|
1744
|
+
import clivly from "./clivly.config";
|
|
1745
|
+
clivly.start().catch((error) => console.warn("[clivly] could not check in:", error));`;
|
|
1746
|
+
/** The boot hook as a scaffold entry, or null when this framework is patched. */
|
|
1747
|
+
function planBootHook(framework, layout) {
|
|
1748
|
+
const path = bootHookPath(framework, layout);
|
|
1749
|
+
if (!path) return null;
|
|
1750
|
+
return {
|
|
1751
|
+
path,
|
|
1752
|
+
description: "Clivly boot hook — starts check-in when your app runs",
|
|
1753
|
+
owned: true
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
//#endregion
|
|
1617
1757
|
//#region src/render-config.ts
|
|
1618
1758
|
const CLIVLY_ENV_KEYS = [
|
|
1619
1759
|
{
|
|
@@ -1924,10 +2064,6 @@ function routePath(framework, kind, layout = "app") {
|
|
|
1924
2064
|
}
|
|
1925
2065
|
const WINDOWS_SEP = /\\/g;
|
|
1926
2066
|
const LEADING_DOT_SLASH = /^\.\//;
|
|
1927
|
-
function configImport(routeFilePath) {
|
|
1928
|
-
const rel = relative(dirname(routeFilePath), "clivly.config").replace(WINDOWS_SEP, "/");
|
|
1929
|
-
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
1930
|
-
}
|
|
1931
2067
|
function hostImportPath(routeFilePath, appRelative, paths) {
|
|
1932
2068
|
const fromRoot = appRelative.replace(LEADING_DOT_SLASH, "");
|
|
1933
2069
|
const alias = aliasFor({
|
|
@@ -2015,6 +2151,7 @@ const COMMON_FILES = [{
|
|
|
2015
2151
|
function planScaffold(framework, layout = "app") {
|
|
2016
2152
|
const paths = ROUTE_PATHS[framework];
|
|
2017
2153
|
if (!paths) return [];
|
|
2154
|
+
const boot = planBootHook(framework, layout);
|
|
2018
2155
|
return [
|
|
2019
2156
|
{
|
|
2020
2157
|
path: applyLayout(framework, paths.tick, layout),
|
|
@@ -2026,6 +2163,7 @@ function planScaffold(framework, layout = "app") {
|
|
|
2026
2163
|
description: "Clivly auth-verify route (createAuthVerifyHandler) — finish resolveUser",
|
|
2027
2164
|
owned: true
|
|
2028
2165
|
},
|
|
2166
|
+
...boot ? [boot] : [],
|
|
2029
2167
|
...COMMON_FILES
|
|
2030
2168
|
];
|
|
2031
2169
|
}
|
|
@@ -2039,6 +2177,45 @@ function planWidgetScaffold(framework, layout = "app") {
|
|
|
2039
2177
|
}];
|
|
2040
2178
|
}
|
|
2041
2179
|
//#endregion
|
|
2180
|
+
//#region src/vite-boot-patch.ts
|
|
2181
|
+
/** Config filenames to look for, in precedence order. */
|
|
2182
|
+
const VITE_CONFIG_CANDIDATES = [
|
|
2183
|
+
"vite.config.ts",
|
|
2184
|
+
"vite.config.mts",
|
|
2185
|
+
"vite.config.js",
|
|
2186
|
+
"vite.config.mjs"
|
|
2187
|
+
];
|
|
2188
|
+
const PLUGIN_IMPORT = "import { clivlyVite } from \"clivly/vite\";";
|
|
2189
|
+
const CONFIG_IMPORT = "import clivly from \"./clivly.config\";";
|
|
2190
|
+
const PLUGIN_CALL = "clivlyVite(clivly)";
|
|
2191
|
+
const PLUGINS_ARRAY = /(^|[\s{,])plugins\s*:\s*\[/g;
|
|
2192
|
+
/** The last import line's end offset, so new imports land after the existing ones. */
|
|
2193
|
+
const IMPORT_LINE = /^\s*import\s.+?from\s+["'].+?["'];?\s*$/gm;
|
|
2194
|
+
function insertImports(source) {
|
|
2195
|
+
const last = [...source.matchAll(IMPORT_LINE)].at(-1);
|
|
2196
|
+
const block = `${PLUGIN_IMPORT}\n${CONFIG_IMPORT}`;
|
|
2197
|
+
if (!last) return `${block}\n\n${source}`;
|
|
2198
|
+
const at = (last.index ?? 0) + last[0].length;
|
|
2199
|
+
return `${source.slice(0, at)}\n${block}${source.slice(at)}`;
|
|
2200
|
+
}
|
|
2201
|
+
/**
|
|
2202
|
+
* Add the Clivly Vite plugin to an existing config.
|
|
2203
|
+
*
|
|
2204
|
+
* Returns the patched source, or `null` when the config is already patched or
|
|
2205
|
+
* is not a shape we can edit safely.
|
|
2206
|
+
*/
|
|
2207
|
+
function patchViteConfig(source) {
|
|
2208
|
+
if (source.includes(PLUGIN_CALL)) return null;
|
|
2209
|
+
const matches = [...source.matchAll(PLUGINS_ARRAY)];
|
|
2210
|
+
if (matches.length !== 1) return null;
|
|
2211
|
+
const match = matches[0];
|
|
2212
|
+
if (!match) return null;
|
|
2213
|
+
const openBracketEnd = (match.index ?? 0) + match[0].length;
|
|
2214
|
+
const rest = source.slice(openBracketEnd);
|
|
2215
|
+
const separator = rest.startsWith("\n") ? "" : " ";
|
|
2216
|
+
return insertImports(`${source.slice(0, openBracketEnd)}${PLUGIN_CALL},${separator}${rest}`);
|
|
2217
|
+
}
|
|
2218
|
+
//#endregion
|
|
2042
2219
|
//#region src/plan-mutations.ts
|
|
2043
2220
|
function fileAction(existing, next, force) {
|
|
2044
2221
|
if (existing === null) return "create";
|
|
@@ -2050,8 +2227,10 @@ function hasKey(content, key) {
|
|
|
2050
2227
|
}
|
|
2051
2228
|
function planFiles(args) {
|
|
2052
2229
|
const mutations = [];
|
|
2230
|
+
const bootPath = bootHookPath(args.framework, args.layout);
|
|
2053
2231
|
const render = (path) => {
|
|
2054
2232
|
if (path === "clivly.config.ts") return renderInitConfig(args.plan);
|
|
2233
|
+
if (bootPath !== null && path === bootPath) return renderBootHook(args.framework, args.layout);
|
|
2055
2234
|
const kind = path.includes("verify") ? "verify" : "tick";
|
|
2056
2235
|
return renderRouteFile(args.framework, kind, args.authWiring, args.layout, parseTsconfig(args.readFile(join(args.cwd, "tsconfig.json")) ?? "")?.paths);
|
|
2057
2236
|
};
|
|
@@ -2079,10 +2258,67 @@ function planEnv(args) {
|
|
|
2079
2258
|
action: envAction(addedKeys.length, existing.length)
|
|
2080
2259
|
};
|
|
2081
2260
|
}
|
|
2261
|
+
function declaredNextVersion(args) {
|
|
2262
|
+
const raw = args.readFile(join(args.cwd, "package.json"));
|
|
2263
|
+
if (!raw) return;
|
|
2264
|
+
let pkg = {};
|
|
2265
|
+
try {
|
|
2266
|
+
pkg = JSON.parse(raw);
|
|
2267
|
+
} catch {
|
|
2268
|
+
pkg = {};
|
|
2269
|
+
}
|
|
2270
|
+
return pkg.dependencies?.next ?? pkg.devDependencies?.next;
|
|
2271
|
+
}
|
|
2272
|
+
function planBootPatch(args) {
|
|
2273
|
+
if (bootHookPath(args.framework, args.layout) !== null) return {
|
|
2274
|
+
file: null,
|
|
2275
|
+
manual: args.framework === "nextjs" && nextNeedsInstrumentationFlag(declaredNextVersion(args)) ? NEXT_INSTRUMENTATION_FLAG_STEP : null
|
|
2276
|
+
};
|
|
2277
|
+
if (args.framework === "remix") return {
|
|
2278
|
+
file: null,
|
|
2279
|
+
manual: REMIX_BOOT_STEP
|
|
2280
|
+
};
|
|
2281
|
+
if (args.framework !== "tanstack-start") return {
|
|
2282
|
+
file: null,
|
|
2283
|
+
manual: null
|
|
2284
|
+
};
|
|
2285
|
+
for (const candidate of VITE_CONFIG_CANDIDATES) {
|
|
2286
|
+
const existing = args.readFile(join(args.cwd, candidate));
|
|
2287
|
+
if (existing === null) continue;
|
|
2288
|
+
const patched = patchViteConfig(existing);
|
|
2289
|
+
if (patched === null) return existing.includes("clivlyVite(clivly)") ? {
|
|
2290
|
+
file: {
|
|
2291
|
+
path: candidate,
|
|
2292
|
+
contents: existing,
|
|
2293
|
+
action: "unchanged"
|
|
2294
|
+
},
|
|
2295
|
+
manual: null
|
|
2296
|
+
} : {
|
|
2297
|
+
file: null,
|
|
2298
|
+
manual: `Add the Clivly plugin to ${candidate} so your app checks in when it runs:\n import { clivlyVite } from "clivly/vite";\n import clivly from "./clivly.config";\n // then, inside defineConfig: plugins: [clivlyVite(clivly), …]`
|
|
2299
|
+
};
|
|
2300
|
+
return {
|
|
2301
|
+
file: {
|
|
2302
|
+
path: candidate,
|
|
2303
|
+
contents: patched,
|
|
2304
|
+
action: "patch"
|
|
2305
|
+
},
|
|
2306
|
+
manual: null
|
|
2307
|
+
};
|
|
2308
|
+
}
|
|
2309
|
+
return {
|
|
2310
|
+
file: null,
|
|
2311
|
+
manual: null
|
|
2312
|
+
};
|
|
2313
|
+
}
|
|
2082
2314
|
function planMutations(args) {
|
|
2315
|
+
const files = planFiles(args);
|
|
2316
|
+
const boot = planBootPatch(args);
|
|
2317
|
+
if (boot.file) files.push(boot.file);
|
|
2083
2318
|
return {
|
|
2084
|
-
files
|
|
2085
|
-
env: planEnv(args)
|
|
2319
|
+
files,
|
|
2320
|
+
env: planEnv(args),
|
|
2321
|
+
manualSteps: boot.manual ? [boot.manual] : []
|
|
2086
2322
|
};
|
|
2087
2323
|
}
|
|
2088
2324
|
function planWidgetMutations(args) {
|
|
@@ -2096,6 +2332,49 @@ function planWidgetMutations(args) {
|
|
|
2096
2332
|
});
|
|
2097
2333
|
}
|
|
2098
2334
|
//#endregion
|
|
2335
|
+
//#region src/quiet-host-output.ts
|
|
2336
|
+
/**
|
|
2337
|
+
* Run `fn` with the process's stdout/stderr captured. Always restores the
|
|
2338
|
+
* original writers, including when `fn` throws — a leaked patch would silence
|
|
2339
|
+
* the whole CLI for the rest of the run.
|
|
2340
|
+
*/
|
|
2341
|
+
async function captureHostOutput(fn) {
|
|
2342
|
+
const originals = {
|
|
2343
|
+
stdout: process.stdout.write,
|
|
2344
|
+
stderr: process.stderr.write
|
|
2345
|
+
};
|
|
2346
|
+
let output = "";
|
|
2347
|
+
const capture = (chunk, encoding, callback) => {
|
|
2348
|
+
output += typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8");
|
|
2349
|
+
const done = typeof encoding === "function" ? encoding : callback;
|
|
2350
|
+
if (typeof done === "function") done();
|
|
2351
|
+
return true;
|
|
2352
|
+
};
|
|
2353
|
+
process.stdout.write = capture;
|
|
2354
|
+
process.stderr.write = capture;
|
|
2355
|
+
try {
|
|
2356
|
+
return {
|
|
2357
|
+
result: await fn(),
|
|
2358
|
+
output
|
|
2359
|
+
};
|
|
2360
|
+
} catch (error) {
|
|
2361
|
+
if (output.trim().length > 0 && error instanceof Error) error.message = `${error.message}\n${output.trim()}`;
|
|
2362
|
+
throw error;
|
|
2363
|
+
} finally {
|
|
2364
|
+
process.stdout.write = originals.stdout;
|
|
2365
|
+
process.stderr.write = originals.stderr;
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
/**
|
|
2369
|
+
* Run `fn` quietly, discarding whatever the host printed on success. On failure
|
|
2370
|
+
* the captured output is attached to the error's message, so the host's own
|
|
2371
|
+
* explanation is not lost.
|
|
2372
|
+
*/
|
|
2373
|
+
async function quietly(fn) {
|
|
2374
|
+
const { result } = await captureHostOutput(fn);
|
|
2375
|
+
return result;
|
|
2376
|
+
}
|
|
2377
|
+
//#endregion
|
|
2099
2378
|
//#region src/probe-auth.ts
|
|
2100
2379
|
const AUTH_MODULE_PATHS = [
|
|
2101
2380
|
"auth",
|
|
@@ -2118,15 +2397,32 @@ function defaultLoader(cwd) {
|
|
|
2118
2397
|
return (specifier) => jiti.import(specifier);
|
|
2119
2398
|
}
|
|
2120
2399
|
function probeAuthInstance(cwd, load) {
|
|
2121
|
-
return probeModule({
|
|
2400
|
+
return quietly(() => probeModule({
|
|
2122
2401
|
candidates: authInstanceCandidates(cwd),
|
|
2123
2402
|
cwd,
|
|
2124
2403
|
load: load ?? defaultLoader(cwd),
|
|
2125
2404
|
match: isBetterAuthInstance
|
|
2126
|
-
});
|
|
2405
|
+
}));
|
|
2127
2406
|
}
|
|
2128
2407
|
//#endregion
|
|
2129
2408
|
//#region src/push-schema.ts
|
|
2409
|
+
/**
|
|
2410
|
+
* "1 mapping" / "3 mappings" — a count nobody has to decode. The plural is
|
|
2411
|
+
* explicit because appending "s" turns "entity" into "entitys".
|
|
2412
|
+
*/
|
|
2413
|
+
function countOf(n, singular, plural = `${singular}s`) {
|
|
2414
|
+
return `${n} ${n === 1 ? singular : plural}`;
|
|
2415
|
+
}
|
|
2416
|
+
function reportSchema(report, out) {
|
|
2417
|
+
const createdObjects = report.objectTypes.filter((o) => o.created);
|
|
2418
|
+
if (createdObjects.length > 0) out(` ✅ Created ${countOf(createdObjects.length, "custom object")}: ${createdObjects.map((o) => o.slug).join(", ")}.\n`);
|
|
2419
|
+
else if (report.objectTypes.length > 0) out(` ✅ ${countOf(report.objectTypes.length, "custom object")} already present.\n`);
|
|
2420
|
+
const created = report.mappings.filter((m) => m.created);
|
|
2421
|
+
const updated = report.mappings.filter((m) => m.updated);
|
|
2422
|
+
if (created.length > 0) out(` ✅ Mapped ${countOf(created.length, "entity", "entities")}: ${created.map((m) => m.entityKey).join(", ")}.\n`);
|
|
2423
|
+
if (updated.length > 0) out(` ✅ Updated ${countOf(updated.length, "mapping")}: ${updated.map((m) => m.entityKey).join(", ")}.\n`);
|
|
2424
|
+
if (report.mappings.length > 0 && created.length === 0 && updated.length === 0) out(` ✅ ${countOf(report.mappings.length, "mapping")} already match your config.\n`);
|
|
2425
|
+
}
|
|
2130
2426
|
async function runPushSchema(options) {
|
|
2131
2427
|
const out = options.out ?? ((line) => process.stdout.write(line));
|
|
2132
2428
|
const path = resolveConfigPath(options.cwd, options.configPath);
|
|
@@ -2154,6 +2450,29 @@ async function runPushSchema(options) {
|
|
|
2154
2450
|
}
|
|
2155
2451
|
out(" ✅ Schema reported to Clivly.\n");
|
|
2156
2452
|
out(" Integration liveness and trigger URL were refreshed too.\n");
|
|
2453
|
+
if (sdk.ensureSchema) {
|
|
2454
|
+
let report;
|
|
2455
|
+
try {
|
|
2456
|
+
report = await sdk.ensureSchema();
|
|
2457
|
+
} catch (error) {
|
|
2458
|
+
out(` ❌ Clivly refused your schema — ${error.message}\n`);
|
|
2459
|
+
return 1;
|
|
2460
|
+
}
|
|
2461
|
+
if (report === null) {
|
|
2462
|
+
out(" ⚠️ Could not declare the objects and mappings in your config.\n");
|
|
2463
|
+
out(" Run `clivly status`, then `clivly push-schema` again.\n");
|
|
2464
|
+
} else reportSchema(report, out);
|
|
2465
|
+
out(" Open Integrations → Mapping to review them.\n");
|
|
2466
|
+
return 0;
|
|
2467
|
+
}
|
|
2468
|
+
const ensured = await sdk.ensureCustomObjects?.();
|
|
2469
|
+
if (ensured === null) {
|
|
2470
|
+
out(" ⚠️ Could not create the custom objects your config declares.\n");
|
|
2471
|
+
out(" Run `clivly status`, then `clivly push-schema` again.\n");
|
|
2472
|
+
} else if (ensured && ensured.length > 0) {
|
|
2473
|
+
const created = ensured.filter((o) => o.created);
|
|
2474
|
+
out(created.length > 0 ? ` ✅ Created ${created.length} custom object(s): ${created.map((o) => o.slug).join(", ")}.\n` : ` ✅ ${ensured.length} custom object(s) already present.\n`);
|
|
2475
|
+
}
|
|
2157
2476
|
out(" Open Integrations → Mapping to map your tables.\n");
|
|
2158
2477
|
return 0;
|
|
2159
2478
|
}
|
|
@@ -2734,8 +3053,19 @@ const defaultConnect = (apiKey, apiUrl) => createClivlySDK({
|
|
|
2734
3053
|
apiUrl,
|
|
2735
3054
|
retry: { maxAttempts: 1 }
|
|
2736
3055
|
}).ping();
|
|
3056
|
+
/**
|
|
3057
|
+
* Exported for tests only — the rule it encodes is the point.
|
|
3058
|
+
*
|
|
3059
|
+
* A skipped check was never evaluated (nothing to check yet), which is not the
|
|
3060
|
+
* same as a warning: a warning is a working setup carrying real risk. Marking
|
|
3061
|
+
* "not applicable" with ⚠️ put a warning on every fresh install for something
|
|
3062
|
+
* the developer had not done wrong, which is exactly how people are trained to
|
|
3063
|
+
* stop reading warnings — the same reasoning `status-stages.ts` gives for
|
|
3064
|
+
* refusing to turn a stage red on a setup that works.
|
|
3065
|
+
*/
|
|
2737
3066
|
function subMark(sub) {
|
|
2738
|
-
if (sub.skipped
|
|
3067
|
+
if (sub.skipped) return "⏭️ ";
|
|
3068
|
+
if (sub.warn) return "⚠️ ";
|
|
2739
3069
|
return sub.ok ? "✅" : "❌";
|
|
2740
3070
|
}
|
|
2741
3071
|
function renderStage(result, verbose, out) {
|
|
@@ -2898,6 +3228,14 @@ function runAdd(argv, cwd, deps = defaultAddDeps) {
|
|
|
2898
3228
|
}
|
|
2899
3229
|
return 0;
|
|
2900
3230
|
}
|
|
3231
|
+
function readInstalledVersion(cwd, name) {
|
|
3232
|
+
try {
|
|
3233
|
+
const manifest = join(cwd, "node_modules", ...name.split("/"), "package.json");
|
|
3234
|
+
return JSON.parse(readFileSync(manifest, "utf8")).version ?? null;
|
|
3235
|
+
} catch {
|
|
3236
|
+
return null;
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
2901
3239
|
function readOwnVersion() {
|
|
2902
3240
|
const req = createRequire(import.meta.url);
|
|
2903
3241
|
for (const rel of ["./package.json", "../package.json"]) try {
|
|
@@ -2995,6 +3333,7 @@ function resolveInitDeps(options) {
|
|
|
2995
3333
|
install: options.installPackages ?? installPackages,
|
|
2996
3334
|
probeAuth: options.probeAuthInstance ?? probeAuthInstance,
|
|
2997
3335
|
readEnv: options.readEnv ?? defaultReadEnv,
|
|
3336
|
+
readInstalledVersion: options.readInstalledVersion ?? readInstalledVersion,
|
|
2998
3337
|
readOwnVersion: options.readOwnVersion ?? readOwnVersion,
|
|
2999
3338
|
writeEnv: options.writeEnv ?? defaultWriteEnv,
|
|
3000
3339
|
isInteractive: options.yes ? () => false : options.isInteractive ?? defaultIsInteractive,
|
|
@@ -3094,12 +3433,12 @@ function applyMutations(options, deps, mutations) {
|
|
|
3094
3433
|
deps.writeConfig(join(options.cwd, file.path), file.contents);
|
|
3095
3434
|
deps.out(` ✓ ${file.path}\n`);
|
|
3096
3435
|
}
|
|
3097
|
-
if (mutations.env.action === "skip")
|
|
3098
|
-
|
|
3099
|
-
|
|
3436
|
+
if (mutations.env.action === "skip") deps.out(" • .env already has every CLIVLY_* key — skipped\n");
|
|
3437
|
+
else {
|
|
3438
|
+
deps.writeEnv(options.cwd, mutations.env.contents);
|
|
3439
|
+
deps.out(" ✓ .env placeholders\n");
|
|
3100
3440
|
}
|
|
3101
|
-
|
|
3102
|
-
deps.out(" ✓ .env placeholders\n");
|
|
3441
|
+
for (const step of mutations.manualSteps) deps.out(`\n ! ${step}\n`);
|
|
3103
3442
|
}
|
|
3104
3443
|
const DIFF_CONTEXT_LIMIT = 40;
|
|
3105
3444
|
function renderDiff(existing, next) {
|
|
@@ -3119,6 +3458,7 @@ function previewMutations(deps, mutations, options) {
|
|
|
3119
3458
|
conflict: " (differs — --diff to see, --force to overwrite)",
|
|
3120
3459
|
create: ` (${lines} lines)`,
|
|
3121
3460
|
overwrite: ` (${lines} lines)`,
|
|
3461
|
+
patch: " (your file, plus the Clivly plugin)",
|
|
3122
3462
|
unchanged: " (already up to date)"
|
|
3123
3463
|
}[file.action];
|
|
3124
3464
|
out(` ${file.action.padEnd(9)} ${file.path}${suffix}\n`);
|
|
@@ -3176,13 +3516,17 @@ async function scaffold(options, deps, plan) {
|
|
|
3176
3516
|
});
|
|
3177
3517
|
return 0;
|
|
3178
3518
|
}
|
|
3179
|
-
const
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3519
|
+
const missing = packagesNeedingInstall(packages, (name) => deps.readInstalledVersion(options.cwd, name));
|
|
3520
|
+
if (missing.length === 0) out(`Already installed (${pm}) — nothing to fetch\n`);
|
|
3521
|
+
else {
|
|
3522
|
+
const result = await deps.install({
|
|
3523
|
+
cwd: options.cwd,
|
|
3524
|
+
pm,
|
|
3525
|
+
packages: missing
|
|
3526
|
+
});
|
|
3527
|
+
if (result.ok) out(`Installed clivly (${pm})\n`);
|
|
3528
|
+
else out(`Could not install automatically — run:\n ${result.command}\n`);
|
|
3529
|
+
}
|
|
3186
3530
|
applyMutations(options, deps, mutations);
|
|
3187
3531
|
let loginRan = false;
|
|
3188
3532
|
if (credentialsMissing(mutations.env.contents)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as ProjectionIdentity, N as ProjectionJoin, P as ProjectionMapping, j as ProjectionFieldBinding, l as ConfigValidationError, m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.mjs";
|
|
2
2
|
//#region ../core/src/projection-cardinality.d.ts
|
|
3
3
|
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
4
4
|
/** Every join in the projection that can multiply rows. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_projection = require("./projection-C5244vGa.cjs");
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
2
|
+
const require_entity_config = require("./entity-config-DtBsl2MQ.cjs");
|
|
3
3
|
//#region ../core/src/projection-draft.ts
|
|
4
4
|
function emptyProjectionDraft(baseTable) {
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as ProjectionIdentity, N as ProjectionJoin, P as ProjectionMapping, j as ProjectionFieldBinding, l as ConfigValidationError, m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.cjs";
|
|
2
2
|
//#region ../core/src/projection-cardinality.d.ts
|
|
3
3
|
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
4
4
|
/** Every join in the projection that can multiply rows. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as PROJECTION_KEY_PATTERN, t as BASE_REF } from "./projection-D7xmQP4S.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { h as fanOutJoins, m as validateProjection } from "./entity-config-kUHri9yA.mjs";
|
|
3
3
|
//#region ../core/src/projection-draft.ts
|
|
4
4
|
function emptyProjectionDraft(baseTable) {
|
|
5
5
|
return {
|
package/internal-drizzle.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-DEtRrqtc.cjs";
|
|
2
2
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
package/internal-drizzle.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-CiK8MMEZ.mjs";
|
|
2
2
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
2
|
+
const require_entity_config = require("./entity-config-DtBsl2MQ.cjs");
|
|
3
3
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
4
4
|
exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
5
5
|
exports.CUSTOM_CONCEPT = require_entity_config.CUSTOM_CONCEPT;
|
|
6
6
|
exports.ClivlyConfigError = require_entity_config.ClivlyConfigError;
|
|
7
7
|
exports.MATERIALIZING_CONCEPTS = require_entity_config.MATERIALIZING_CONCEPTS;
|
|
8
|
+
exports.customObjectDeclarations = require_entity_config.customObjectDeclarations;
|
|
8
9
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
9
10
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
10
11
|
exports.filterSchema = require_entity_config.filterSchema;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.cjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.mjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, i as ClivlyConfigError, l as filterSchema, n as CRM_CONCEPTS, o as customObjectDeclarations, p as validateEntitiesConfig, r as CUSTOM_CONCEPT, s as defineClivlyConfig, t as CANONICAL_FIELDS, u as projectionFields } from "./entity-config-kUHri9yA.mjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
2
|
+
const require_entity_config = require("./entity-config-DtBsl2MQ.cjs");
|
|
3
3
|
const require_mapping_score = require("./mapping-score-CaB3F4Uu.cjs");
|
|
4
4
|
//#region ../core/src/entity-heuristics.ts
|
|
5
5
|
const TARGET_CONCEPTS = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.cjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-D7Gzg7Ii.cjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.d.ts
|
|
4
4
|
declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.mjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-D7Gzg7Ii.mjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.d.ts
|
|
4
4
|
declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|