clivly 0.9.0 → 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 +3 -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.cjs +1 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-view-compiler.cjs +2 -1
- package/core-view-compiler.d.cts +2 -2
- package/core-view-compiler.d.mts +2 -2
- package/core-view-compiler.mjs +2 -2
- package/core.cjs +5 -5
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +5 -5
- package/{drizzle-BhN5M9zt.d.cts → drizzle-CiK8MMEZ.d.mts} +1 -1
- package/{drizzle-kBULBAOa.d.mts → drizzle-DEtRrqtc.d.cts} +1 -1
- package/drizzle.d.cts +2 -2
- package/drizzle.d.mts +2 -2
- package/{entity-config-C4Yf_fPj.d.cts → entity-config-B2RA53nw.d.cts} +168 -2
- package/{entity-config-C4Yf_fPj.d.mts → entity-config-B2RA53nw.d.mts} +168 -2
- package/{entity-config-CsLl-ftC.cjs → entity-config-DtBsl2MQ.cjs} +88 -13
- package/{entity-config-D3LmzgLb.mjs → entity-config-kUHri9yA.mjs} +77 -14
- package/index.cjs +375 -29
- package/index.d.cts +1 -0
- package/index.d.mts +1 -0
- package/index.mjs +375 -29
- package/{internal-MBkNo3bw.d.mts → internal-CDY8g9Ic.d.mts} +1 -2
- package/{internal-BARjyN4n.cjs → internal-CwnEG6Wl.cjs} +1 -1
- package/{internal-B8ydhsKd.d.cts → internal-Da_dlcQ_.d.cts} +1 -2
- package/{internal-DMySVbM0.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 +3 -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.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-view-compiler.cjs +2 -1
- package/internal-view-compiler.d.cts +2 -2
- package/internal-view-compiler.d.mts +2 -2
- package/internal-view-compiler.mjs +2 -2
- package/internal.cjs +5 -5
- package/internal.d.cts +6 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +5 -5
- package/{mapping-form-43bwOTat.d.cts → mapping-form-DH77BXLv.d.mts} +1 -1
- package/{mapping-form-DUvWUYCo.d.mts → mapping-form-J0aU6O7l.d.cts} +1 -1
- package/{mappings-config-BSSwdHiq.cjs → mappings-config-B0RqFLxu.cjs} +30 -1
- package/{mappings-config-bJQT_gSa.mjs → mappings-config-B1b1HVBg.mjs} +25 -2
- package/mappings-config-D9dsonoi.d.mts +85 -0
- package/mappings-config-RQLGx8ub.d.cts +85 -0
- package/{namespace-probe-BSH_p9TK.d.cts → namespace-probe-C6aHjedO.d.cts} +65 -3
- package/{namespace-probe-Dsp5uNkS.d.mts → 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-GNqRB8eS.d.cts → sync-engine-BG2O1an2.d.cts} +2 -2
- package/{sync-engine-ZsusW-q_.d.mts → sync-engine-DgQbrJON.d.mts} +2 -2
- package/{sync-engine-Bg6-SznL.mjs → sync-engine-SuxSzbZ4.mjs} +1 -1
- package/{sync-engine-DEJvKw6E.cjs → sync-engine-abE94g6X.cjs} +1 -1
- package/{view-compiler-DplczSjF.cjs → view-compiler-Blu4OXJ7.cjs} +22 -0
- package/{view-compiler-Cin0neDO.d.mts → view-compiler-Bo7pqXW3.d.mts} +12 -2
- package/{view-compiler-DlTpOfZi.mjs → view-compiler-CQx8TRrW.mjs} +17 -1
- package/{view-compiler-Ll9cbIJz.d.cts → view-compiler-CmEdAMwj.d.cts} +12 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/mappings-config-BpcR8bBo.d.mts +0 -167
- package/mappings-config-xsLMn3I-.d.cts +0 -167
package/README.md
CHANGED
|
@@ -31,16 +31,23 @@ Published on npm's `latest` tag. Once installed, `npx clivly …` uses your loca
|
|
|
31
31
|
copy rather than re-fetching. Use `@next` only when deliberately testing a
|
|
32
32
|
prerelease cut.
|
|
33
33
|
|
|
34
|
+
> **If `npm audit` reports vulnerabilities after this install**, check what it
|
|
35
|
+
> actually names. `clivly` ships exactly one runtime dependency (`jiti`);
|
|
36
|
+
> `better-auth`, `drizzle-orm`, `vite` and the auth SDKs are *optional* peers,
|
|
37
|
+
> so npm attributes advisories from your app's existing copies of them through
|
|
38
|
+
> Clivly's dependency chain. Installing Clivly does not add them.
|
|
39
|
+
|
|
34
40
|
## Five-minute quick start
|
|
35
41
|
|
|
36
42
|
```bash
|
|
37
43
|
npm install clivly
|
|
38
44
|
npx clivly init # scaffold config + routes + .env, then pair this machine
|
|
39
|
-
|
|
45
|
+
npm run dev # starting the app runs the generated boot hook
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
`clivly init` writes
|
|
43
|
-
|
|
48
|
+
`clivly init` writes a `clivly.config.ts` you own, two route files Clivly
|
|
49
|
+
owns, and a framework boot hook where it can safely do so. Starting the app is
|
|
50
|
+
what connects it; `clivly status` is a read-only diagnostic. It creates no
|
|
44
51
|
database tables and does not modify your ORM schema.
|
|
45
52
|
|
|
46
53
|
---
|
|
@@ -401,6 +408,11 @@ resolves, and emits a one-time `process.emitWarning` naming the replacement (so
|
|
|
401
408
|
it stays off stdout and cannot corrupt machine-readable CLI output). See
|
|
402
409
|
[STABILITY.md](https://github.com/amani-joseph/clivly.com/blob/master/STABILITY.md).
|
|
403
410
|
|
|
411
|
+
For a long-lived Node host, the runtime can opt into WebSocket presence with
|
|
412
|
+
`presence: { transport: "websocket" }` in `clivly.config.ts`. It keeps
|
|
413
|
+
sync scheduling unchanged and resumes HTTP heartbeat automatically during a
|
|
414
|
+
socket reconnect. The CLI does not enable this setting on your behalf.
|
|
415
|
+
|
|
404
416
|
---
|
|
405
417
|
|
|
406
418
|
## Common errors
|
|
@@ -422,10 +434,10 @@ The full troubleshooting table is in the
|
|
|
422
434
|
|
|
423
435
|
## Telemetry
|
|
424
436
|
|
|
425
|
-
|
|
426
|
-
Clivly API you point it at, and only to do what you asked:
|
|
427
|
-
schema pushes, and status checks.
|
|
428
|
-
|
|
437
|
+
The CLI itself emits no usage analytics or crash reports. It makes network
|
|
438
|
+
requests only to the Clivly API you point it at, and only to do what you asked:
|
|
439
|
+
pairing, heartbeats, schema pushes, and status checks. Opt-in SDK WebSocket
|
|
440
|
+
presence records bounded reliability metrics; see
|
|
429
441
|
[SECURITY.md](https://github.com/amani-joseph/clivly.com/blob/master/SECURITY.md#telemetry).
|
|
430
442
|
|
|
431
443
|
## Related documentation
|
package/core-drizzle.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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
|
import "./internal-drizzle.cjs";
|
|
3
3
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
package/core-drizzle.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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
|
import "./internal-drizzle.mjs";
|
|
3
3
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
package/core-entity-config.cjs
CHANGED
|
@@ -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
|
//#region src/core-entity-config.ts
|
|
4
4
|
require("./deprecate-subpath-B9ngvizt.cjs").warnDeprecatedSubpath("clivly/core/entity-config", "clivly/internal/entity-config");
|
|
5
5
|
//#endregion
|
|
@@ -8,9 +8,11 @@ exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
|
8
8
|
exports.CUSTOM_CONCEPT = require_entity_config.CUSTOM_CONCEPT;
|
|
9
9
|
exports.ClivlyConfigError = require_entity_config.ClivlyConfigError;
|
|
10
10
|
exports.MATERIALIZING_CONCEPTS = require_entity_config.MATERIALIZING_CONCEPTS;
|
|
11
|
+
exports.customObjectDeclarations = require_entity_config.customObjectDeclarations;
|
|
11
12
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
12
13
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
13
14
|
exports.filterSchema = require_entity_config.filterSchema;
|
|
15
|
+
exports.projectionFields = require_entity_config.projectionFields;
|
|
14
16
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
15
17
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|
|
16
18
|
exports.validateEntitiesConfig = require_entity_config.validateEntitiesConfig;
|
package/core-entity-config.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as relationshipsSchema, S as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, 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 };
|
package/core-entity-config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as relationshipsSchema, S as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, 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 };
|
package/core-entity-config.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as
|
|
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
2
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
3
3
|
//#region src/core-entity-config.ts
|
|
4
4
|
warnDeprecatedSubpath("clivly/core/entity-config", "clivly/internal/entity-config");
|
|
5
5
|
//#endregion
|
|
6
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
6
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.cjs";
|
|
2
2
|
import { FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping } from "./internal-entity-heuristics.cjs";
|
|
3
3
|
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.mjs";
|
|
2
2
|
import { FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping } from "./internal-entity-heuristics.mjs";
|
|
3
3
|
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
package/core-mapping-form.d.cts
CHANGED
|
@@ -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-J0aU6O7l.cjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
package/core-mapping-form.d.mts
CHANGED
|
@@ -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-DH77BXLv.mjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
package/core-mappings-config.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_mappings_config = require("./mappings-config-B0RqFLxu.cjs");
|
|
2
3
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
3
|
-
const require_mappings_config = require("./mappings-config-BSSwdHiq.cjs");
|
|
4
4
|
require("./internal-mappings-config.cjs");
|
|
5
5
|
//#region src/core-mappings-config.ts
|
|
6
6
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/mappings-config", "clivly/internal/mappings-config");
|
|
7
7
|
//#endregion
|
|
8
|
+
exports.entitiesToMappings = require_mappings_config.entitiesToMappings;
|
|
8
9
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { EntityMappingRow, mappingsToEntitiesConfig };
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-RQLGx8ub.cjs";
|
|
2
|
+
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { EntityMappingRow, mappingsToEntitiesConfig };
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-D9dsonoi.mjs";
|
|
2
|
+
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
package/core-mappings-config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { n as mappingsToEntitiesConfig, t as entitiesToMappings } from "./mappings-config-B1b1HVBg.mjs";
|
|
1
2
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
2
|
-
import { t as mappingsToEntitiesConfig } from "./mappings-config-bJQT_gSa.mjs";
|
|
3
3
|
import "./internal-mappings-config.mjs";
|
|
4
4
|
//#region src/core-mappings-config.ts
|
|
5
5
|
warnDeprecatedSubpath("clivly/core/mappings-config", "clivly/internal/mappings-config");
|
|
6
6
|
//#endregion
|
|
7
|
-
export { mappingsToEntitiesConfig };
|
|
7
|
+
export { entitiesToMappings, mappingsToEntitiesConfig };
|
package/core-sync-engine.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
3
|
-
const require_sync_engine = require("./sync-engine-
|
|
3
|
+
const require_sync_engine = require("./sync-engine-abE94g6X.cjs");
|
|
4
4
|
require("./internal-sync-engine.cjs");
|
|
5
5
|
//#region src/core-sync-engine.ts
|
|
6
6
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/sync-engine", "clivly/internal/sync-engine");
|
package/core-sync-engine.d.cts
CHANGED
|
@@ -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-BG2O1an2.cjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
package/core-sync-engine.d.mts
CHANGED
|
@@ -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-DgQbrJON.mjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
package/core-sync-engine.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
2
|
-
import { i as runSync, n as previewSync, r as reconcile, t as computeSampleWarnings } from "./sync-engine-
|
|
2
|
+
import { i as runSync, n as previewSync, r as reconcile, t as computeSampleWarnings } from "./sync-engine-SuxSzbZ4.mjs";
|
|
3
3
|
import "./internal-sync-engine.mjs";
|
|
4
4
|
//#region src/core-sync-engine.ts
|
|
5
5
|
warnDeprecatedSubpath("clivly/core/sync-engine", "clivly/internal/sync-engine");
|
package/core-view-compiler.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
3
|
-
const require_view_compiler = require("./view-compiler-
|
|
3
|
+
const require_view_compiler = require("./view-compiler-Blu4OXJ7.cjs");
|
|
4
4
|
require("./internal-view-compiler.cjs");
|
|
5
5
|
//#region src/core-view-compiler.ts
|
|
6
6
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/view-compiler", "clivly/internal/view-compiler");
|
|
@@ -9,3 +9,4 @@ exports.DEFAULT_VIEW_PREFIX = require_view_compiler.DEFAULT_VIEW_PREFIX;
|
|
|
9
9
|
exports.compileEntityView = require_view_compiler.compileEntityView;
|
|
10
10
|
exports.compileEntityViews = require_view_compiler.compileEntityViews;
|
|
11
11
|
exports.explainEntitiesConfig = require_view_compiler.explainEntitiesConfig;
|
|
12
|
+
exports.explainViewExecutionError = require_view_compiler.explainViewExecutionError;
|
package/core-view-compiler.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
2
|
-
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig };
|
|
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-CmEdAMwj.cjs";
|
|
2
|
+
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core-view-compiler.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
2
|
-
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig };
|
|
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-Bo7pqXW3.mjs";
|
|
2
|
+
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core-view-compiler.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
2
|
-
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-
|
|
2
|
+
import { a as explainViewExecutionError, i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CQx8TRrW.mjs";
|
|
3
3
|
import "./internal-view-compiler.mjs";
|
|
4
4
|
//#region src/core-view-compiler.ts
|
|
5
5
|
warnDeprecatedSubpath("clivly/core/view-compiler", "clivly/internal/view-compiler");
|
|
6
6
|
//#endregion
|
|
7
|
-
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig };
|
|
7
|
+
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_projection = require("./projection-C5244vGa.cjs");
|
|
3
|
-
const require_entity_config = require("./entity-config-
|
|
3
|
+
const require_entity_config = require("./entity-config-DtBsl2MQ.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-B0RqFLxu.cjs");
|
|
4
5
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
5
6
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
7
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const require_sync_engine = require("./sync-engine-DEJvKw6E.cjs");
|
|
8
|
+
const require_internal = require("./internal-CwnEG6Wl.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-Blu4OXJ7.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-abE94g6X.cjs");
|
|
11
11
|
//#region src/core.ts
|
|
12
12
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core", "clivly/sdk", "Import \"defineClivlyConfig\" and its config types from \"clivly/sdk\"; import everything else from \"clivly/internal\" (no stability guarantee — see STABILITY.md).");
|
|
13
13
|
//#endregion
|
package/core.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, b as TaskPriority, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as RecordSource, h as Note, i as Contact, 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 TaskEntityType, w as UpdateTaskInput, x as TaskStatus, y as TaskFilters } from "./types-B1oRXdNP.cjs";
|
|
2
2
|
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
|
|
3
3
|
import { t as CRMAdapter } from "./adapter-C2eRbBfo.cjs";
|
|
4
|
-
import { C as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import {
|
|
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 validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-
|
|
4
|
+
import { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as ProjectionRef, I as identityRefs, L as projectionSchema, M as ProjectionIdentity, N as ProjectionJoin, O as relationshipsSchema, P as ProjectionMapping, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as ProjectionFieldBinding, k as validateEntitiesConfig, 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 entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-J0aU6O7l.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-RQLGx8ub.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-CmEdAMwj.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-BG2O1an2.cjs";
|
|
9
|
+
import { a as validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-Da_dlcQ_.cjs";
|
|
10
10
|
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 ConfigValidationError, type ConfigValidationResult, 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 ExplainResult, type FilterExpr, type FilterValue, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type Note, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
package/core.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, b as TaskPriority, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as RecordSource, h as Note, i as Contact, 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 TaskEntityType, w as UpdateTaskInput, x as TaskStatus, y as TaskFilters } from "./types-B1oRXdNP.mjs";
|
|
2
2
|
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
|
|
3
3
|
import { t as CRMAdapter } from "./adapter-D5LRa-NA.mjs";
|
|
4
|
-
import { C as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import {
|
|
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 validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-
|
|
4
|
+
import { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as ProjectionRef, I as identityRefs, L as projectionSchema, M as ProjectionIdentity, N as ProjectionJoin, O as relationshipsSchema, P as ProjectionMapping, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as ProjectionFieldBinding, k as validateEntitiesConfig, 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 entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.mjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-DH77BXLv.mjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-D9dsonoi.mjs";
|
|
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-Bo7pqXW3.mjs";
|
|
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-DgQbrJON.mjs";
|
|
9
|
+
import { a as validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-CDY8g9Ic.mjs";
|
|
10
10
|
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 ConfigValidationError, type ConfigValidationResult, 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 ExplainResult, type FilterExpr, type FilterValue, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type Note, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
package/core.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as projectionSchema, r as identityRefs, t as BASE_REF } from "./projection-D7xmQP4S.mjs";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as columnMetaFor, a as MATERIALIZING_CONCEPTS, b as primaryKeyColumns, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, g as joinFansOut, h as fanOutJoins, i as ClivlyConfigError, l as filterSchema, m as validateProjection, n as CRM_CONCEPTS, p as validateEntitiesConfig, s as defineClivlyConfig, t as CANONICAL_FIELDS, v as coversUniqueKey, y as hasRichMeta } from "./entity-config-kUHri9yA.mjs";
|
|
3
|
+
import { n as mappingsToEntitiesConfig } from "./mappings-config-B1b1HVBg.mjs";
|
|
3
4
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
4
5
|
import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
|
|
5
6
|
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-DigkuvFc.mjs";
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
import { i as runSync, r as reconcile } from "./sync-engine-Bg6-SznL.mjs";
|
|
7
|
+
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-Df-PtOH_.mjs";
|
|
8
|
+
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CQx8TRrW.mjs";
|
|
9
|
+
import { i as runSync, r as reconcile } from "./sync-engine-SuxSzbZ4.mjs";
|
|
10
10
|
//#region src/core.ts
|
|
11
11
|
warnDeprecatedSubpath("clivly/core", "clivly/sdk", "Import \"defineClivlyConfig\" and its config types from \"clivly/sdk\"; import everything else from \"clivly/internal\" (no stability guarantee — see STABILITY.md).");
|
|
12
12
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.mjs";
|
|
2
2
|
import { Table } from "drizzle-orm";
|
|
3
3
|
//#region ../core/src/drizzle.d.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.cjs";
|
|
2
2
|
import { Table } from "drizzle-orm";
|
|
3
3
|
//#region ../core/src/drizzle.d.ts
|
|
4
4
|
/**
|
package/drizzle.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-
|
|
2
|
-
import {
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-DEtRrqtc.cjs";
|
|
2
|
+
import { _ as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-C6aHjedO.cjs";
|
|
3
3
|
import { Table } from "drizzle-orm";
|
|
4
4
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
5
|
interface DrizzleDb {
|
package/drizzle.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-
|
|
2
|
-
import {
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-CiK8MMEZ.mjs";
|
|
2
|
+
import { _ as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-Dj-0Q3Hb.mjs";
|
|
3
3
|
import { Table } from "drizzle-orm";
|
|
4
4
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
5
|
interface DrizzleDb {
|
|
@@ -2120,6 +2120,126 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
|
|
|
2120
2120
|
}
|
|
2121
2121
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2122
2122
|
//#endregion
|
|
2123
|
+
//#region ../core/src/projection.d.ts
|
|
2124
|
+
/**
|
|
2125
|
+
* Projection-backed custom mappings — one custom object derived from a base
|
|
2126
|
+
* table plus explicit joins.
|
|
2127
|
+
*
|
|
2128
|
+
* A projection is deliberately narrow: equality joins only, direct column
|
|
2129
|
+
* bindings only, no expressions and no aggregation. Everything a user can
|
|
2130
|
+
* express here compiles to a single read-only view whose `id` column is
|
|
2131
|
+
* provably unique per row, which is what lets the sync engine consume it
|
|
2132
|
+
* unchanged.
|
|
2133
|
+
*
|
|
2134
|
+
* Refs address tables symbolically: `"base"` for the base table, or a join's
|
|
2135
|
+
* `key`. Raw table names are never accepted in a ref, so a projection can
|
|
2136
|
+
* never reach a table it did not declare.
|
|
2137
|
+
*/
|
|
2138
|
+
/** The reserved ref name for the projection's base table. */
|
|
2139
|
+
declare const BASE_REF = "base";
|
|
2140
|
+
declare const projectionRefSchema: ZodObject<{
|
|
2141
|
+
table: ZodString;
|
|
2142
|
+
column: ZodString;
|
|
2143
|
+
}, $strict>;
|
|
2144
|
+
type ProjectionRef = output<typeof projectionRefSchema>;
|
|
2145
|
+
declare const projectionJoinSchema: ZodObject<{
|
|
2146
|
+
key: ZodString;
|
|
2147
|
+
table: ZodString;
|
|
2148
|
+
type: ZodEnum<{
|
|
2149
|
+
inner: "inner";
|
|
2150
|
+
left: "left";
|
|
2151
|
+
}>;
|
|
2152
|
+
on: ZodArray<ZodObject<{
|
|
2153
|
+
left: ZodObject<{
|
|
2154
|
+
table: ZodString;
|
|
2155
|
+
column: ZodString;
|
|
2156
|
+
}, $strict>;
|
|
2157
|
+
op: ZodLiteral<"eq">;
|
|
2158
|
+
right: ZodObject<{
|
|
2159
|
+
table: ZodString;
|
|
2160
|
+
column: ZodString;
|
|
2161
|
+
}, $strict>;
|
|
2162
|
+
}, $strict>>;
|
|
2163
|
+
}, $strict>;
|
|
2164
|
+
type ProjectionJoin = output<typeof projectionJoinSchema>;
|
|
2165
|
+
declare const projectionFieldBindingSchema: ZodObject<{
|
|
2166
|
+
from: ZodObject<{
|
|
2167
|
+
table: ZodString;
|
|
2168
|
+
column: ZodString;
|
|
2169
|
+
}, $strict>;
|
|
2170
|
+
}, $strict>;
|
|
2171
|
+
type ProjectionFieldBinding = output<typeof projectionFieldBindingSchema>;
|
|
2172
|
+
declare const projectionIdentitySchema: ZodUnion<readonly [ZodObject<{
|
|
2173
|
+
kind: ZodLiteral<"base_pk">;
|
|
2174
|
+
column: ZodOptional<ZodString>;
|
|
2175
|
+
}, $strict>, ZodObject<{
|
|
2176
|
+
kind: ZodLiteral<"column">;
|
|
2177
|
+
from: ZodObject<{
|
|
2178
|
+
table: ZodString;
|
|
2179
|
+
column: ZodString;
|
|
2180
|
+
}, $strict>;
|
|
2181
|
+
}, $strict>, ZodObject<{
|
|
2182
|
+
kind: ZodLiteral<"composite">;
|
|
2183
|
+
parts: ZodArray<ZodObject<{
|
|
2184
|
+
table: ZodString;
|
|
2185
|
+
column: ZodString;
|
|
2186
|
+
}, $strict>>;
|
|
2187
|
+
}, $strict>]>;
|
|
2188
|
+
type ProjectionIdentity = output<typeof projectionIdentitySchema>;
|
|
2189
|
+
declare const projectionSchema: ZodObject<{
|
|
2190
|
+
version: ZodLiteral<1>;
|
|
2191
|
+
kind: ZodLiteral<"projection">;
|
|
2192
|
+
entityKey: ZodString;
|
|
2193
|
+
baseTable: ZodString;
|
|
2194
|
+
joins: ZodArray<ZodObject<{
|
|
2195
|
+
key: ZodString;
|
|
2196
|
+
table: ZodString;
|
|
2197
|
+
type: ZodEnum<{
|
|
2198
|
+
inner: "inner";
|
|
2199
|
+
left: "left";
|
|
2200
|
+
}>;
|
|
2201
|
+
on: ZodArray<ZodObject<{
|
|
2202
|
+
left: ZodObject<{
|
|
2203
|
+
table: ZodString;
|
|
2204
|
+
column: ZodString;
|
|
2205
|
+
}, $strict>;
|
|
2206
|
+
op: ZodLiteral<"eq">;
|
|
2207
|
+
right: ZodObject<{
|
|
2208
|
+
table: ZodString;
|
|
2209
|
+
column: ZodString;
|
|
2210
|
+
}, $strict>;
|
|
2211
|
+
}, $strict>>;
|
|
2212
|
+
}, $strict>>;
|
|
2213
|
+
fieldBindings: ZodRecord<ZodString, ZodObject<{
|
|
2214
|
+
from: ZodObject<{
|
|
2215
|
+
table: ZodString;
|
|
2216
|
+
column: ZodString;
|
|
2217
|
+
}, $strict>;
|
|
2218
|
+
}, $strict>>;
|
|
2219
|
+
identity: ZodUnion<readonly [ZodObject<{
|
|
2220
|
+
kind: ZodLiteral<"base_pk">;
|
|
2221
|
+
column: ZodOptional<ZodString>;
|
|
2222
|
+
}, $strict>, ZodObject<{
|
|
2223
|
+
kind: ZodLiteral<"column">;
|
|
2224
|
+
from: ZodObject<{
|
|
2225
|
+
table: ZodString;
|
|
2226
|
+
column: ZodString;
|
|
2227
|
+
}, $strict>;
|
|
2228
|
+
}, $strict>, ZodObject<{
|
|
2229
|
+
kind: ZodLiteral<"composite">;
|
|
2230
|
+
parts: ZodArray<ZodObject<{
|
|
2231
|
+
table: ZodString;
|
|
2232
|
+
column: ZodString;
|
|
2233
|
+
}, $strict>>;
|
|
2234
|
+
}, $strict>]>;
|
|
2235
|
+
}, $strict>;
|
|
2236
|
+
type ProjectionMapping = output<typeof projectionSchema>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Every column ref an identity depends on. `basePkColumn` is the base table's
|
|
2239
|
+
* discovered PK, used only when a `base_pk` identity omits an explicit column.
|
|
2240
|
+
*/
|
|
2241
|
+
declare function identityRefs(identity: ProjectionIdentity, basePkColumn: string): ProjectionRef[];
|
|
2242
|
+
//#endregion
|
|
2123
2243
|
//#region ../core/src/entity-config.d.ts
|
|
2124
2244
|
/**
|
|
2125
2245
|
* Entity Config v2 — the declarative contract that turns Clivly's "schema-aware"
|
|
@@ -2312,6 +2432,11 @@ declare const entitySchema: ZodObject<{
|
|
|
2312
2432
|
}, $strict>]>;
|
|
2313
2433
|
}, $strict>>>;
|
|
2314
2434
|
targetObjectTypeId: ZodOptional<ZodString>;
|
|
2435
|
+
objectType: ZodOptional<ZodObject<{
|
|
2436
|
+
name: ZodString;
|
|
2437
|
+
pluralName: ZodOptional<ZodString>;
|
|
2438
|
+
iconKey: ZodOptional<ZodString>;
|
|
2439
|
+
}, $strict>>;
|
|
2315
2440
|
projection: ZodOptional<ZodObject<{
|
|
2316
2441
|
version: ZodLiteral<1>;
|
|
2317
2442
|
kind: ZodLiteral<"projection">;
|
|
@@ -2407,6 +2532,11 @@ declare const entitiesConfigSchema: ZodObject<{
|
|
|
2407
2532
|
}, $strict>]>;
|
|
2408
2533
|
}, $strict>>>;
|
|
2409
2534
|
targetObjectTypeId: ZodOptional<ZodString>;
|
|
2535
|
+
objectType: ZodOptional<ZodObject<{
|
|
2536
|
+
name: ZodString;
|
|
2537
|
+
pluralName: ZodOptional<ZodString>;
|
|
2538
|
+
iconKey: ZodOptional<ZodString>;
|
|
2539
|
+
}, $strict>>;
|
|
2410
2540
|
projection: ZodOptional<ZodObject<{
|
|
2411
2541
|
version: ZodLiteral<1>;
|
|
2412
2542
|
kind: ZodLiteral<"projection">;
|
|
@@ -2457,6 +2587,21 @@ declare const entitiesConfigSchema: ZodObject<{
|
|
|
2457
2587
|
}, $strict>>;
|
|
2458
2588
|
}, $strict>;
|
|
2459
2589
|
type ClivlyEntitiesConfig = output<typeof entitiesConfigSchema>;
|
|
2590
|
+
/**
|
|
2591
|
+
* What an author may hand to `defineClivlyConfig`. Identical to
|
|
2592
|
+
* `ClivlyEntityConfig` except that a projection entity may omit `fields` —
|
|
2593
|
+
* it is derived from `projection.fieldBindings`. Without a projection `fields`
|
|
2594
|
+
* stays required, so the looser input never weakens the ordinary case.
|
|
2595
|
+
*/
|
|
2596
|
+
type ClivlyEntityConfigInput = (ClivlyEntityConfig & {
|
|
2597
|
+
projection?: undefined;
|
|
2598
|
+
}) | (Omit<ClivlyEntityConfig, "fields"> & {
|
|
2599
|
+
fields?: Record<string, string>;
|
|
2600
|
+
projection: ProjectionMapping;
|
|
2601
|
+
});
|
|
2602
|
+
type ClivlyEntitiesConfigInput = Omit<ClivlyEntitiesConfig, "entities"> & {
|
|
2603
|
+
entities: Record<string, ClivlyEntityConfigInput>;
|
|
2604
|
+
};
|
|
2460
2605
|
/** Thrown by `defineClivlyConfig({ strict: true })` on non-canonical field keys. */
|
|
2461
2606
|
declare class ClivlyConfigError extends Error {
|
|
2462
2607
|
readonly issues: ConfigValidationError[];
|
|
@@ -2474,7 +2619,28 @@ declare class ClivlyConfigError extends Error {
|
|
|
2474
2619
|
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
2475
2620
|
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
2476
2621
|
*/
|
|
2477
|
-
|
|
2622
|
+
/** A custom object the host declares in config, for `push-schema` to ensure. */
|
|
2623
|
+
interface CustomObjectDeclaration {
|
|
2624
|
+
iconKey?: string;
|
|
2625
|
+
name: string;
|
|
2626
|
+
pluralName?: string;
|
|
2627
|
+
/** Unique per org and immutable — the entity key. */
|
|
2628
|
+
slug: string;
|
|
2629
|
+
}
|
|
2630
|
+
/**
|
|
2631
|
+
* The custom objects a config declares, keyed by entity slug. Entities that
|
|
2632
|
+
* already carry an explicit `targetObjectTypeId` are omitted: their object type
|
|
2633
|
+
* exists server-side and re-declaring it would be a no-op at best.
|
|
2634
|
+
*/
|
|
2635
|
+
declare function customObjectDeclarations(config: ClivlyEntitiesConfig): CustomObjectDeclaration[];
|
|
2636
|
+
/**
|
|
2637
|
+
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
2638
|
+
* Qualified rather than bare: two bindings can pull the same column name from
|
|
2639
|
+
* different tables (`cl.full_name` and `adv.full_name`), which a bare column
|
|
2640
|
+
* name cannot tell apart.
|
|
2641
|
+
*/
|
|
2642
|
+
declare function projectionFields(projection: ProjectionMapping): Record<string, string>;
|
|
2643
|
+
declare function defineClivlyConfig(config: ClivlyEntitiesConfigInput, options?: {
|
|
2478
2644
|
strict?: boolean;
|
|
2479
2645
|
onWarn?: (message: string) => void;
|
|
2480
2646
|
}): ClivlyEntitiesConfig;
|
|
@@ -2532,4 +2698,4 @@ interface ConfigValidationResult {
|
|
|
2532
2698
|
*/
|
|
2533
2699
|
declare function validateEntitiesConfig(config: ClivlyEntitiesConfig, schema: DiscoveredSchemaTable[]): ConfigValidationResult;
|
|
2534
2700
|
//#endregion
|
|
2535
|
-
export {
|
|
2701
|
+
export { BASE_REF as A, defineClivlyConfig as C, relationshipSchema as D, projectionFields as E, ProjectionRef as F, identityRefs as I, projectionSchema as L, ProjectionIdentity as M, ProjectionJoin as N, relationshipsSchema as O, ProjectionMapping as P, customObjectDeclarations as S, filterSchema as T, MATERIALIZING_CONCEPTS as _, ClivlyEntitiesConfig as a, RelationshipVia as b, ClivlyEntityConfigInput as c, CrmConcept as d, CustomObjectDeclaration as f, FilterValue as g, FilterExpr as h, ClivlyConfigError as i, ProjectionFieldBinding as j, validateEntitiesConfig as k, ConfigValidationError as l, DiscoveredSchemaTable as m, CRM_CONCEPTS as n, ClivlyEntitiesConfigInput as o, DiscoveredColumnMeta as p, CUSTOM_CONCEPT as r, ClivlyEntityConfig as s, CANONICAL_FIELDS as t, ConfigValidationResult as u, MaterializingConcept as v, entitiesConfigSchema as w, RelationshipsMap as x, RelationshipSpec as y };
|