clivly 0.10.4 → 0.10.6
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 +28 -0
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- package/core-entity-config.cjs +4 -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 +1 -1
- package/core-mappings-config.d.cts +1 -1
- package/core-mappings-config.d.mts +1 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.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 +5 -2
- package/core.d.cts +8 -8
- package/core.d.mts +8 -8
- package/core.mjs +3 -3
- package/{drizzle-DTOuGXEn.d.cts → drizzle-SD8WCvYj.d.cts} +1 -1
- package/{drizzle-SGapoly2.d.mts → drizzle-axugRJ0u.d.mts} +1 -1
- package/drizzle.d.cts +3 -3
- package/drizzle.d.mts +3 -3
- package/{entity-config-DgAe0_YD.cjs → entity-config-C2MfIDL2.cjs} +49 -0
- package/{entity-config-C4d3K9CP.mjs → entity-config-bC3DX9f1.mjs} +32 -1
- package/{entity-config-DNQAMbMS.d.mts → entity-config-w8oMBWf8.d.cts} +28 -1
- package/{entity-config-DNQAMbMS.d.cts → entity-config-w8oMBWf8.d.mts} +28 -1
- package/index.cjs +133 -3
- package/index.mjs +133 -3
- package/{integration-state-DfqRSdTn.d.cts → integration-state-BA4c0RbD.d.cts} +7 -0
- package/{integration-state-DfqRSdTn.d.mts → integration-state-BA4c0RbD.d.mts} +7 -0
- package/{internal-BAOG5eE4.d.mts → internal-CHvZMvxC.d.cts} +1 -1
- package/{internal-BHJ0X3fC.d.cts → internal-WximMGmH.d.mts} +1 -1
- package/internal-drizzle.d.cts +1 -1
- package/internal-drizzle.d.mts +1 -1
- package/internal-entity-config.cjs +4 -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 +1 -1
- package/internal-mappings-config.d.cts +1 -1
- package/internal-mappings-config.d.mts +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/internal-sync-engine.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 +5 -2
- package/internal.d.cts +8 -8
- package/internal.d.mts +8 -8
- package/internal.mjs +3 -3
- package/{mapping-form-Cc7Ewv8c.d.mts → mapping-form-BsTxv8w3.d.cts} +1 -1
- package/{mapping-form-DwdbYAfR.d.cts → mapping-form-OTFwr1sN.d.mts} +1 -1
- package/{mappings-config-MoXBeI8p.mjs → mappings-config-CRSL9dzw.mjs} +1 -1
- package/{mappings-config-Be9D43Np.d.mts → mappings-config-DbznSjTX.d.cts} +1 -1
- package/{mappings-config-Dx9ldgdf.cjs → mappings-config-Dpv08-x4.cjs} +1 -1
- package/{mappings-config-DUt4-9iO.d.cts → mappings-config-SXu_zlmp.d.mts} +1 -1
- package/{namespace-probe-BZuLxW3r.d.mts → namespace-probe-lj_0bJrc.d.cts} +2 -2
- package/{namespace-probe-DXN20mds.d.cts → namespace-probe-ouHKZas2.d.mts} +2 -2
- package/package.json +1 -1
- package/{sdk-D6gX0TXS.mjs → sdk-BTzaM8bF.mjs} +2 -2
- package/{sdk-B1vX4kUJ.cjs → sdk-DbvqXNSh.cjs} +2 -2
- package/sdk.cjs +2 -2
- package/sdk.d.cts +2 -2
- package/sdk.d.mts +2 -2
- package/sdk.mjs +2 -2
- package/{sync-engine-Df0kHAoJ.d.cts → sync-engine-CUKWXUv7.d.mts} +2 -2
- package/{sync-engine-ugFacJ6G.d.mts → sync-engine-D2YlIHZB.d.cts} +2 -2
- package/{view-compiler-D3zp9S3K.d.cts → view-compiler-BO4CKamn.d.cts} +1 -1
- package/{view-compiler-TpzDTu7z.d.mts → view-compiler-iEwUOuba.d.mts} +1 -1
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
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-
|
|
3
|
+
const require_entity_config = require("./entity-config-C2MfIDL2.cjs");
|
|
4
4
|
require("./mapping-score-CaB3F4Uu.cjs");
|
|
5
5
|
const require_internal_entity_heuristics = require("./internal-entity-heuristics.cjs");
|
|
6
|
-
const require_sdk = require("./sdk-
|
|
6
|
+
const require_sdk = require("./sdk-DbvqXNSh.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");
|
|
@@ -373,6 +373,7 @@ function resolveDevTarget(flags) {
|
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
375
|
const VITE_FRAMEWORKS = /* @__PURE__ */ new Set([
|
|
376
|
+
"nuxt",
|
|
376
377
|
"remix",
|
|
377
378
|
"sveltekit",
|
|
378
379
|
"tanstack-start"
|
|
@@ -450,11 +451,136 @@ function cloudflaredMissingMessage() {
|
|
|
450
451
|
].join("\n");
|
|
451
452
|
}
|
|
452
453
|
//#endregion
|
|
454
|
+
//#region src/tunnel-identity.ts
|
|
455
|
+
/**
|
|
456
|
+
* Whether the published tunnel actually reaches *this* app's Clivly route.
|
|
457
|
+
*
|
|
458
|
+
* `isLocalPortListening` answers a different question — "is anything accepting
|
|
459
|
+
* connections on this port?" — and that is exactly the gap this closes. On a
|
|
460
|
+
* machine running more than one project (which is what `clivly dev` is for),
|
|
461
|
+
* a framework that finds its default port taken silently moves to the next one:
|
|
462
|
+
*
|
|
463
|
+
* ⚠ Port 3000 is in use by process 92495, using available port 3001 instead
|
|
464
|
+
*
|
|
465
|
+
* The tunnel is still pointed at 3000, where a *different application* is
|
|
466
|
+
* listening. The port probe sees a healthy socket and says nothing, and the CLI
|
|
467
|
+
* goes on to promise "Dashboard-triggered sync now points at this local
|
|
468
|
+
* session" — which is false. Signed triggers for this workspace are delivered
|
|
469
|
+
* to somebody else's app, and the resulting failure is reported against the
|
|
470
|
+
* innocent one. Liveness is not identity.
|
|
471
|
+
*
|
|
472
|
+
* The check: POST to the trigger path with no signature. A Clivly-mounted route
|
|
473
|
+
* rejects that with **401** — it read the request, found no valid signature and
|
|
474
|
+
* refused. Anything else on that port answers some other way (a framework's
|
|
475
|
+
* 500 error page, a 404, an unrelated 200). We are not testing authentication
|
|
476
|
+
* here; the 401 *is* the fingerprint, and it is one no unrelated service
|
|
477
|
+
* produces at this exact path by accident.
|
|
478
|
+
*
|
|
479
|
+
* Deliberately tolerant: a network hiccup returns `unknown`, never `mismatch`.
|
|
480
|
+
* Warning someone away from a tunnel that was fine is worse than staying quiet,
|
|
481
|
+
* for the same reason the port probe defaults to assuming the port is alive.
|
|
482
|
+
*/
|
|
483
|
+
/** How long any single probe attempt may take. */
|
|
484
|
+
const IDENTITY_PROBE_TIMEOUT_MS = 8e3;
|
|
485
|
+
/**
|
|
486
|
+
* How long to keep retrying before giving up.
|
|
487
|
+
*
|
|
488
|
+
* The probe fires the moment `cloudflared` publishes a URL, which on a
|
|
489
|
+
* Vite/Nuxt app is *before* the dev server has finished building its route
|
|
490
|
+
* table. The first attempt therefore reaches a server that is up but does not
|
|
491
|
+
* yet serve the tick route — a cold start, not a wrong port. The condition
|
|
492
|
+
* being detected (a tunnel aimed at the wrong process) does not resolve
|
|
493
|
+
* itself, so waiting costs nothing and a premature verdict costs a lot.
|
|
494
|
+
*/
|
|
495
|
+
const IDENTITY_RETRY_BUDGET_MS = 2e4;
|
|
496
|
+
const IDENTITY_RETRY_DELAY_MS = 2e3;
|
|
497
|
+
const sleep = (ms) => new Promise((resolve) => {
|
|
498
|
+
setTimeout(resolve, ms);
|
|
499
|
+
});
|
|
500
|
+
/** One attempt. Separated so the retry loop stays readable. */
|
|
501
|
+
async function attempt(triggerUrl, fetchImpl) {
|
|
502
|
+
const controller = new AbortController();
|
|
503
|
+
const timer = setTimeout(() => controller.abort(), IDENTITY_PROBE_TIMEOUT_MS);
|
|
504
|
+
try {
|
|
505
|
+
const response = await fetchImpl(triggerUrl, {
|
|
506
|
+
method: "POST",
|
|
507
|
+
headers: { "content-type": "application/json" },
|
|
508
|
+
body: "{}",
|
|
509
|
+
signal: controller.signal
|
|
510
|
+
});
|
|
511
|
+
if (response.status === 401) return "clivly";
|
|
512
|
+
if (response.status === 403) return "host-rejected";
|
|
513
|
+
if (response.status === 404 || response.status >= 500) return "unknown";
|
|
514
|
+
return "mismatch";
|
|
515
|
+
} catch {
|
|
516
|
+
return "unknown";
|
|
517
|
+
} finally {
|
|
518
|
+
clearTimeout(timer);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Probe the published tunnel URL and report who is on the other end.
|
|
523
|
+
*
|
|
524
|
+
* Retries while the answer is inconclusive, because the first attempt lands
|
|
525
|
+
* during the dev server's boot. Only a confident contradiction is reported.
|
|
526
|
+
*
|
|
527
|
+
* `fetchImpl` and `now` are injectable so tests need no network or clock.
|
|
528
|
+
*/
|
|
529
|
+
async function probeTunnelIdentity(triggerUrl, fetchImpl = fetch, now = Date.now) {
|
|
530
|
+
const deadline = now() + IDENTITY_RETRY_BUDGET_MS;
|
|
531
|
+
let last = "unknown";
|
|
532
|
+
do {
|
|
533
|
+
last = await attempt(triggerUrl, fetchImpl);
|
|
534
|
+
if (last !== "unknown") return last;
|
|
535
|
+
if (now() >= deadline) break;
|
|
536
|
+
await sleep(IDENTITY_RETRY_DELAY_MS);
|
|
537
|
+
} while (now() < deadline);
|
|
538
|
+
return last;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* What to tell someone whose dev server refused the tunnel's Host header.
|
|
542
|
+
*
|
|
543
|
+
* `clivly dev` already prints the allowedHosts hint for Vite frameworks before
|
|
544
|
+
* the tunnel opens; this fires when the tunnel proves it was not applied.
|
|
545
|
+
*/
|
|
546
|
+
function hostRejectedMessage() {
|
|
547
|
+
return [
|
|
548
|
+
"Warning: your dev server refused the tunnel's Host header (403).",
|
|
549
|
+
" Vite rejects hostnames it does not recognise, so Clivly's request never",
|
|
550
|
+
" reaches your tick route. Add the tunnel domain to your Vite config:",
|
|
551
|
+
" server: { allowedHosts: ['.trycloudflare.com'] }",
|
|
552
|
+
" (in nuxt.config.ts, nest it under `vite:`), then restart the dev server."
|
|
553
|
+
].join("\n");
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* What to tell someone whose tunnel reaches the wrong process.
|
|
557
|
+
*
|
|
558
|
+
* Names the likely cause rather than only the symptom: the overwhelmingly
|
|
559
|
+
* common reason is the port fallback above, and the remedy is to say which
|
|
560
|
+
* port the app really bound.
|
|
561
|
+
*/
|
|
562
|
+
function tunnelMismatchMessage(port) {
|
|
563
|
+
return [
|
|
564
|
+
`Warning: the tunnel reaches something on port ${port}, but it is not this app's Clivly route.`,
|
|
565
|
+
` The usual cause is a port fallback. If your dev server printed "Port ${port} is in use,`,
|
|
566
|
+
` using available port …", it moved and the tunnel stayed on ${port} — where another`,
|
|
567
|
+
" project is still listening.",
|
|
568
|
+
" Re-run with the port it actually bound: npx clivly dev --port <port>",
|
|
569
|
+
" Until then, dashboard-triggered syncs will not reach this app."
|
|
570
|
+
].join("\n");
|
|
571
|
+
}
|
|
572
|
+
//#endregion
|
|
453
573
|
//#region src/dev.ts
|
|
454
574
|
const UNREACHABLE_RESULT = {
|
|
455
575
|
ok: false,
|
|
456
576
|
kind: "unreachable"
|
|
457
577
|
};
|
|
578
|
+
/** The line to print for a probe verdict, or null when there is nothing to say. */
|
|
579
|
+
function tunnelWarning(identity, port) {
|
|
580
|
+
if (identity === "mismatch") return tunnelMismatchMessage(port);
|
|
581
|
+
if (identity === "host-rejected") return hostRejectedMessage();
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
458
584
|
function flagValue$1(argv, flag) {
|
|
459
585
|
const i = argv.indexOf(flag);
|
|
460
586
|
return i >= 0 ? argv[i + 1] : void 0;
|
|
@@ -498,8 +624,11 @@ async function runDev(options) {
|
|
|
498
624
|
if (deps.isPortListening && !flagValue$1(options.argv, "--url")) {
|
|
499
625
|
if (!await deps.isPortListening(port).catch(() => true)) deps.out(deadPortMessage(port, framework));
|
|
500
626
|
}
|
|
627
|
+
const identity = deps.probeTunnel && !flagValue$1(options.argv, "--url") ? await deps.probeTunnel(triggerUrl).catch(() => "unknown") : "unknown";
|
|
628
|
+
const warning = tunnelWarning(identity, port);
|
|
629
|
+
if (warning) deps.out(warning);
|
|
501
630
|
const result = await deps.register(triggerUrl).catch(() => UNREACHABLE_RESULT);
|
|
502
|
-
if (result.ok) deps.out("Dashboard-triggered sync now points at this local session.");
|
|
631
|
+
if (result.ok) deps.out(identity === "mismatch" || identity === "host-rejected" ? "Trigger URL registered, but see the warning above before relying on it." : "Dashboard-triggered sync now points at this local session.");
|
|
503
632
|
else deps.out(overrideFailureMessage(result.kind, result.status));
|
|
504
633
|
});
|
|
505
634
|
const stopWatching = deps.watchConfig?.(options.cwd, () => {
|
|
@@ -4115,6 +4244,7 @@ function defaultDevDeps(options) {
|
|
|
4115
4244
|
readScripts: readPackageScripts,
|
|
4116
4245
|
detectFramework: (cwd) => detectFramework(readDeps(cwd)),
|
|
4117
4246
|
isPortListening: isLocalPortListening,
|
|
4247
|
+
probeTunnel: (triggerUrl) => probeTunnelIdentity(triggerUrl),
|
|
4118
4248
|
register: (triggerUrl) => registerTunnelOverride({
|
|
4119
4249
|
apiKey: options.apiKey ?? "",
|
|
4120
4250
|
apiUrl: options.apiUrl,
|
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-bC3DX9f1.mjs";
|
|
3
3
|
import "./mapping-score-C68uAqGB.mjs";
|
|
4
4
|
import { hasDefiningColumn, matchesConcept, requiredFieldsFor, scoreFieldMap, scoreRelationships, suggestCursorField, toFieldMap } from "./internal-entity-heuristics.mjs";
|
|
5
|
-
import { s as isPlaceholderUrl, t as createClivlySDK } from "./sdk-
|
|
5
|
+
import { s as isPlaceholderUrl, t as createClivlySDK } from "./sdk-BTzaM8bF.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";
|
|
@@ -372,6 +372,7 @@ function resolveDevTarget(flags) {
|
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
374
|
const VITE_FRAMEWORKS = /* @__PURE__ */ new Set([
|
|
375
|
+
"nuxt",
|
|
375
376
|
"remix",
|
|
376
377
|
"sveltekit",
|
|
377
378
|
"tanstack-start"
|
|
@@ -449,11 +450,136 @@ function cloudflaredMissingMessage() {
|
|
|
449
450
|
].join("\n");
|
|
450
451
|
}
|
|
451
452
|
//#endregion
|
|
453
|
+
//#region src/tunnel-identity.ts
|
|
454
|
+
/**
|
|
455
|
+
* Whether the published tunnel actually reaches *this* app's Clivly route.
|
|
456
|
+
*
|
|
457
|
+
* `isLocalPortListening` answers a different question — "is anything accepting
|
|
458
|
+
* connections on this port?" — and that is exactly the gap this closes. On a
|
|
459
|
+
* machine running more than one project (which is what `clivly dev` is for),
|
|
460
|
+
* a framework that finds its default port taken silently moves to the next one:
|
|
461
|
+
*
|
|
462
|
+
* ⚠ Port 3000 is in use by process 92495, using available port 3001 instead
|
|
463
|
+
*
|
|
464
|
+
* The tunnel is still pointed at 3000, where a *different application* is
|
|
465
|
+
* listening. The port probe sees a healthy socket and says nothing, and the CLI
|
|
466
|
+
* goes on to promise "Dashboard-triggered sync now points at this local
|
|
467
|
+
* session" — which is false. Signed triggers for this workspace are delivered
|
|
468
|
+
* to somebody else's app, and the resulting failure is reported against the
|
|
469
|
+
* innocent one. Liveness is not identity.
|
|
470
|
+
*
|
|
471
|
+
* The check: POST to the trigger path with no signature. A Clivly-mounted route
|
|
472
|
+
* rejects that with **401** — it read the request, found no valid signature and
|
|
473
|
+
* refused. Anything else on that port answers some other way (a framework's
|
|
474
|
+
* 500 error page, a 404, an unrelated 200). We are not testing authentication
|
|
475
|
+
* here; the 401 *is* the fingerprint, and it is one no unrelated service
|
|
476
|
+
* produces at this exact path by accident.
|
|
477
|
+
*
|
|
478
|
+
* Deliberately tolerant: a network hiccup returns `unknown`, never `mismatch`.
|
|
479
|
+
* Warning someone away from a tunnel that was fine is worse than staying quiet,
|
|
480
|
+
* for the same reason the port probe defaults to assuming the port is alive.
|
|
481
|
+
*/
|
|
482
|
+
/** How long any single probe attempt may take. */
|
|
483
|
+
const IDENTITY_PROBE_TIMEOUT_MS = 8e3;
|
|
484
|
+
/**
|
|
485
|
+
* How long to keep retrying before giving up.
|
|
486
|
+
*
|
|
487
|
+
* The probe fires the moment `cloudflared` publishes a URL, which on a
|
|
488
|
+
* Vite/Nuxt app is *before* the dev server has finished building its route
|
|
489
|
+
* table. The first attempt therefore reaches a server that is up but does not
|
|
490
|
+
* yet serve the tick route — a cold start, not a wrong port. The condition
|
|
491
|
+
* being detected (a tunnel aimed at the wrong process) does not resolve
|
|
492
|
+
* itself, so waiting costs nothing and a premature verdict costs a lot.
|
|
493
|
+
*/
|
|
494
|
+
const IDENTITY_RETRY_BUDGET_MS = 2e4;
|
|
495
|
+
const IDENTITY_RETRY_DELAY_MS = 2e3;
|
|
496
|
+
const sleep = (ms) => new Promise((resolve) => {
|
|
497
|
+
setTimeout(resolve, ms);
|
|
498
|
+
});
|
|
499
|
+
/** One attempt. Separated so the retry loop stays readable. */
|
|
500
|
+
async function attempt(triggerUrl, fetchImpl) {
|
|
501
|
+
const controller = new AbortController();
|
|
502
|
+
const timer = setTimeout(() => controller.abort(), IDENTITY_PROBE_TIMEOUT_MS);
|
|
503
|
+
try {
|
|
504
|
+
const response = await fetchImpl(triggerUrl, {
|
|
505
|
+
method: "POST",
|
|
506
|
+
headers: { "content-type": "application/json" },
|
|
507
|
+
body: "{}",
|
|
508
|
+
signal: controller.signal
|
|
509
|
+
});
|
|
510
|
+
if (response.status === 401) return "clivly";
|
|
511
|
+
if (response.status === 403) return "host-rejected";
|
|
512
|
+
if (response.status === 404 || response.status >= 500) return "unknown";
|
|
513
|
+
return "mismatch";
|
|
514
|
+
} catch {
|
|
515
|
+
return "unknown";
|
|
516
|
+
} finally {
|
|
517
|
+
clearTimeout(timer);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Probe the published tunnel URL and report who is on the other end.
|
|
522
|
+
*
|
|
523
|
+
* Retries while the answer is inconclusive, because the first attempt lands
|
|
524
|
+
* during the dev server's boot. Only a confident contradiction is reported.
|
|
525
|
+
*
|
|
526
|
+
* `fetchImpl` and `now` are injectable so tests need no network or clock.
|
|
527
|
+
*/
|
|
528
|
+
async function probeTunnelIdentity(triggerUrl, fetchImpl = fetch, now = Date.now) {
|
|
529
|
+
const deadline = now() + IDENTITY_RETRY_BUDGET_MS;
|
|
530
|
+
let last = "unknown";
|
|
531
|
+
do {
|
|
532
|
+
last = await attempt(triggerUrl, fetchImpl);
|
|
533
|
+
if (last !== "unknown") return last;
|
|
534
|
+
if (now() >= deadline) break;
|
|
535
|
+
await sleep(IDENTITY_RETRY_DELAY_MS);
|
|
536
|
+
} while (now() < deadline);
|
|
537
|
+
return last;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* What to tell someone whose dev server refused the tunnel's Host header.
|
|
541
|
+
*
|
|
542
|
+
* `clivly dev` already prints the allowedHosts hint for Vite frameworks before
|
|
543
|
+
* the tunnel opens; this fires when the tunnel proves it was not applied.
|
|
544
|
+
*/
|
|
545
|
+
function hostRejectedMessage() {
|
|
546
|
+
return [
|
|
547
|
+
"Warning: your dev server refused the tunnel's Host header (403).",
|
|
548
|
+
" Vite rejects hostnames it does not recognise, so Clivly's request never",
|
|
549
|
+
" reaches your tick route. Add the tunnel domain to your Vite config:",
|
|
550
|
+
" server: { allowedHosts: ['.trycloudflare.com'] }",
|
|
551
|
+
" (in nuxt.config.ts, nest it under `vite:`), then restart the dev server."
|
|
552
|
+
].join("\n");
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* What to tell someone whose tunnel reaches the wrong process.
|
|
556
|
+
*
|
|
557
|
+
* Names the likely cause rather than only the symptom: the overwhelmingly
|
|
558
|
+
* common reason is the port fallback above, and the remedy is to say which
|
|
559
|
+
* port the app really bound.
|
|
560
|
+
*/
|
|
561
|
+
function tunnelMismatchMessage(port) {
|
|
562
|
+
return [
|
|
563
|
+
`Warning: the tunnel reaches something on port ${port}, but it is not this app's Clivly route.`,
|
|
564
|
+
` The usual cause is a port fallback. If your dev server printed "Port ${port} is in use,`,
|
|
565
|
+
` using available port …", it moved and the tunnel stayed on ${port} — where another`,
|
|
566
|
+
" project is still listening.",
|
|
567
|
+
" Re-run with the port it actually bound: npx clivly dev --port <port>",
|
|
568
|
+
" Until then, dashboard-triggered syncs will not reach this app."
|
|
569
|
+
].join("\n");
|
|
570
|
+
}
|
|
571
|
+
//#endregion
|
|
452
572
|
//#region src/dev.ts
|
|
453
573
|
const UNREACHABLE_RESULT = {
|
|
454
574
|
ok: false,
|
|
455
575
|
kind: "unreachable"
|
|
456
576
|
};
|
|
577
|
+
/** The line to print for a probe verdict, or null when there is nothing to say. */
|
|
578
|
+
function tunnelWarning(identity, port) {
|
|
579
|
+
if (identity === "mismatch") return tunnelMismatchMessage(port);
|
|
580
|
+
if (identity === "host-rejected") return hostRejectedMessage();
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
457
583
|
function flagValue$1(argv, flag) {
|
|
458
584
|
const i = argv.indexOf(flag);
|
|
459
585
|
return i >= 0 ? argv[i + 1] : void 0;
|
|
@@ -497,8 +623,11 @@ async function runDev(options) {
|
|
|
497
623
|
if (deps.isPortListening && !flagValue$1(options.argv, "--url")) {
|
|
498
624
|
if (!await deps.isPortListening(port).catch(() => true)) deps.out(deadPortMessage(port, framework));
|
|
499
625
|
}
|
|
626
|
+
const identity = deps.probeTunnel && !flagValue$1(options.argv, "--url") ? await deps.probeTunnel(triggerUrl).catch(() => "unknown") : "unknown";
|
|
627
|
+
const warning = tunnelWarning(identity, port);
|
|
628
|
+
if (warning) deps.out(warning);
|
|
500
629
|
const result = await deps.register(triggerUrl).catch(() => UNREACHABLE_RESULT);
|
|
501
|
-
if (result.ok) deps.out("Dashboard-triggered sync now points at this local session.");
|
|
630
|
+
if (result.ok) deps.out(identity === "mismatch" || identity === "host-rejected" ? "Trigger URL registered, but see the warning above before relying on it." : "Dashboard-triggered sync now points at this local session.");
|
|
502
631
|
else deps.out(overrideFailureMessage(result.kind, result.status));
|
|
503
632
|
});
|
|
504
633
|
const stopWatching = deps.watchConfig?.(options.cwd, () => {
|
|
@@ -4114,6 +4243,7 @@ function defaultDevDeps(options) {
|
|
|
4114
4243
|
readScripts: readPackageScripts,
|
|
4115
4244
|
detectFramework: (cwd) => detectFramework(readDeps(cwd)),
|
|
4116
4245
|
isPortListening: isLocalPortListening,
|
|
4246
|
+
probeTunnel: (triggerUrl) => probeTunnelIdentity(triggerUrl),
|
|
4117
4247
|
register: (triggerUrl) => registerTunnelOverride({
|
|
4118
4248
|
apiKey: options.apiKey ?? "",
|
|
4119
4249
|
apiUrl: options.apiUrl,
|
|
@@ -52,6 +52,13 @@ interface IntegrationFacts {
|
|
|
52
52
|
heartbeatIntervalMs?: number | null;
|
|
53
53
|
lastHeartbeatAt: number | null;
|
|
54
54
|
lastRun: RunFact | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether any entity is mapped, expressed as a number for historical
|
|
57
|
+
* reasons — every producer sets it to 0 or 1, never a real total. Read it as
|
|
58
|
+
* a flag (`> 0`) and never render it as a quantity: doing so reported "1
|
|
59
|
+
* entity mapped" to a workspace with three. The true count lives on the
|
|
60
|
+
* mappings list, which the What syncs tab reads directly.
|
|
61
|
+
*/
|
|
55
62
|
mappedEntityCount: number;
|
|
56
63
|
now: number;
|
|
57
64
|
/**
|
|
@@ -52,6 +52,13 @@ interface IntegrationFacts {
|
|
|
52
52
|
heartbeatIntervalMs?: number | null;
|
|
53
53
|
lastHeartbeatAt: number | null;
|
|
54
54
|
lastRun: RunFact | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether any entity is mapped, expressed as a number for historical
|
|
57
|
+
* reasons — every producer sets it to 0 or 1, never a real total. Read it as
|
|
58
|
+
* a flag (`> 0`) and never render it as a quantity: doing so reported "1
|
|
59
|
+
* entity mapped" to a workspace with three. The true count lives on the
|
|
60
|
+
* mappings list, which the What syncs tab reads directly.
|
|
61
|
+
*/
|
|
55
62
|
mappedEntityCount: number;
|
|
56
63
|
now: number;
|
|
57
64
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ProjectionJoin, R as ProjectionMapping, h as FilterExpr, l as ConfigValidationError, m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-w8oMBWf8.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ProjectionJoin, R as ProjectionMapping, h as FilterExpr, l as ConfigValidationError, m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-w8oMBWf8.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. */
|
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-SD8WCvYj.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-axugRJ0u.mjs";
|
|
2
2
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
|
@@ -1,15 +1,18 @@
|
|
|
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-C2MfIDL2.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.REQUIRED_FIELDS = require_entity_config.REQUIRED_FIELDS;
|
|
8
9
|
exports.customObjectDeclarations = require_entity_config.customObjectDeclarations;
|
|
9
10
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
10
11
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
11
12
|
exports.filterSchema = require_entity_config.filterSchema;
|
|
13
|
+
exports.missingRequiredFields = require_entity_config.missingRequiredFields;
|
|
12
14
|
exports.projectionFields = require_entity_config.projectionFields;
|
|
13
15
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
14
16
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|
|
17
|
+
exports.requiredFieldsFor = require_entity_config.requiredFieldsFor;
|
|
15
18
|
exports.validateEntitiesConfig = require_entity_config.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, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, 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 defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-w8oMBWf8.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, REQUIRED_FIELDS, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, 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, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, 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 defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-w8oMBWf8.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, REQUIRED_FIELDS, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as defineClivlyConfig, d as missingRequiredFields, f as projectionFields, g as validateEntitiesConfig, h as requiredFieldsFor, i as ClivlyConfigError, l as entitiesConfigSchema, m as relationshipsSchema, n as CRM_CONCEPTS, o as REQUIRED_FIELDS, p as relationshipSchema, r as CUSTOM_CONCEPT, s as customObjectDeclarations, t as CANONICAL_FIELDS, u as filterSchema } from "./entity-config-bC3DX9f1.mjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, REQUIRED_FIELDS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, 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-C2MfIDL2.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 { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-w8oMBWf8.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 { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-w8oMBWf8.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"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-bC3DX9f1.mjs";
|
|
2
2
|
import { a as W, c as isTextLike, i as RELATIONSHIP_TIERS, l as isTimestampLike, n as CONCEPT_TIERS, o as isAmbiguous, r as FIELD_TIERS, s as isNumericLike, u as tierFor } from "./mapping-score-C68uAqGB.mjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.ts
|
|
4
4
|
const TARGET_CONCEPTS = [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
1
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-BsTxv8w3.cjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
1
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-OTFwr1sN.mjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_mappings_config = require("./mappings-config-
|
|
2
|
+
const require_mappings_config = require("./mappings-config-Dpv08-x4.cjs");
|
|
3
3
|
exports.entitiesToMappings = require_mappings_config.entitiesToMappings;
|
|
4
4
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-DbznSjTX.cjs";
|
|
2
2
|
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-SXu_zlmp.mjs";
|
|
2
2
|
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mappingsToEntitiesConfig, t as entitiesToMappings } from "./mappings-config-
|
|
1
|
+
import { n as mappingsToEntitiesConfig, t as entitiesToMappings } from "./mappings-config-CRSL9dzw.mjs";
|
|
2
2
|
export { entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-D2YlIHZB.cjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-CUKWXUv7.mjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
1
|
+
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-BO4CKamn.cjs";
|
|
2
2
|
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
1
|
+
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-iEwUOuba.mjs";
|
|
2
2
|
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/internal.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_projection = require("./projection-Dz6_i1-w.cjs");
|
|
3
|
-
const require_entity_config = require("./entity-config-
|
|
4
|
-
const require_mappings_config = require("./mappings-config-
|
|
3
|
+
const require_entity_config = require("./entity-config-C2MfIDL2.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-Dpv08-x4.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
6
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
7
7
|
const require_projection_sql = require("./projection-sql-CbXCKt3s.cjs");
|
|
@@ -18,6 +18,7 @@ exports.MATERIALIZING_CONCEPTS = require_entity_config.MATERIALIZING_CONCEPTS;
|
|
|
18
18
|
exports.OPEN_STAGE_TYPE = require_types.OPEN_STAGE_TYPE;
|
|
19
19
|
exports.PREVIEW_MAX_ROWS = require_projection_sql.PREVIEW_MAX_ROWS;
|
|
20
20
|
exports.PROJECTION_KEY_PATTERN = require_projection.PROJECTION_KEY_PATTERN;
|
|
21
|
+
exports.REQUIRED_FIELDS = require_entity_config.REQUIRED_FIELDS;
|
|
21
22
|
exports.authCustom = require_auth_adapter.authCustom;
|
|
22
23
|
exports.buildFilterFromDiscriminator = require_mapping_form.buildFilterFromDiscriminator;
|
|
23
24
|
exports.buildRelationships = require_mapping_form.buildRelationships;
|
|
@@ -42,6 +43,7 @@ exports.isClosedStageType = require_types.isClosedStageType;
|
|
|
42
43
|
exports.joinFansOut = require_entity_config.joinFansOut;
|
|
43
44
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
44
45
|
exports.matchesCondition = require_internal.matchesCondition;
|
|
46
|
+
exports.missingRequiredFields = require_entity_config.missingRequiredFields;
|
|
45
47
|
exports.primaryKeyColumns = require_entity_config.primaryKeyColumns;
|
|
46
48
|
exports.projectionFields = require_entity_config.projectionFields;
|
|
47
49
|
exports.projectionSchema = require_projection.projectionSchema;
|
|
@@ -50,6 +52,7 @@ exports.reconcile = require_sync_engine.reconcile;
|
|
|
50
52
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
51
53
|
exports.relationshipViaSignature = require_mapping_form.relationshipViaSignature;
|
|
52
54
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|
|
55
|
+
exports.requiredFieldsFor = require_entity_config.requiredFieldsFor;
|
|
53
56
|
exports.runSync = require_sync_engine.runSync;
|
|
54
57
|
exports.slugify = require_internal.slugify;
|
|
55
58
|
exports.toObjectTypeSlug = require_internal.toObjectTypeSlug;
|
package/internal.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { A as ValueInterval, C as TaskEntityType, D as UpdateContactInput, E as TaskStatus, O as UpdateDealInput, S as Task, T as TaskPriority, _ as PipelineConfig, a as ContactFilters, b as RecordSource, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as OPEN_STAGE_TYPE, h as Note, i as Contact, j as isClosedStageType, k as UpdateTaskInput, l as CreateContactInput, m as DealStage, n as ActivityType, o as ContactStatus, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, v as PipelineKind, w as TaskFilters, x as StageType, y as PipelineStageConfig } from "./types-Cq1uHUKp.cjs";
|
|
2
2
|
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-CXTiW3Mb.cjs";
|
|
3
3
|
import { t as CRMAdapter } from "./adapter-1TN0zohk.cjs";
|
|
4
|
-
import { A as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-
|
|
7
|
-
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
8
|
-
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-
|
|
9
|
-
import { a as IntegrationStep, c as StepProblem, i as IntegrationStatus, l as StepState, n as IntegrationFacts, o as NextAction, r as IntegrationState, s as StepId, t as ConnectionLiveness } from "./integration-state-
|
|
10
|
-
import { S as joinFansOut, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, x as fanOutJoins, y as compileProjectionSelect } from "./internal-
|
|
11
|
-
export { type Activity, type ActivityType, BASE_REF, CANONICAL_FIELDS, type CRMAdapter, CRM_CONCEPTS, type ClivlyAuthAdapter, ClivlyConfigError, type ClivlyEntitiesConfig, type ClivlyEntityConfig, type ClivlyUser, type Company, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, isClosedStageType, joinFansOut, mappingsToEntitiesConfig, matchesCondition, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
4
|
+
import { A as relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, p as DiscoveredColumnMeta, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-w8oMBWf8.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-BsTxv8w3.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-DbznSjTX.cjs";
|
|
7
|
+
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-BO4CKamn.cjs";
|
|
8
|
+
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-D2YlIHZB.cjs";
|
|
9
|
+
import { a as IntegrationStep, c as StepProblem, i as IntegrationStatus, l as StepState, n as IntegrationFacts, o as NextAction, r as IntegrationState, s as StepId, t as ConnectionLiveness } from "./integration-state-BA4c0RbD.cjs";
|
|
10
|
+
import { S as joinFansOut, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, x as fanOutJoins, y as compileProjectionSelect } from "./internal-CHvZMvxC.cjs";
|
|
11
|
+
export { type Activity, type ActivityType, BASE_REF, CANONICAL_FIELDS, type CRMAdapter, CRM_CONCEPTS, type ClivlyAuthAdapter, ClivlyConfigError, type ClivlyEntitiesConfig, type ClivlyEntityConfig, type ClivlyUser, type Company, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, isClosedStageType, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|