@cargo-ai/cdk 1.0.11 → 1.0.12
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/build/src/cli/commands/deploy.d.ts.map +1 -1
- package/build/src/cli/commands/deploy.js +105 -1
- package/build/src/deploy/executors.live.d.ts.map +1 -1
- package/build/src/deploy/executors.live.js +56 -2
- package/build/src/deploy/import.d.ts +12 -0
- package/build/src/deploy/import.d.ts.map +1 -1
- package/build/src/deploy/import.js +79 -9
- package/build/src/deploy/index.d.ts +2 -0
- package/build/src/deploy/index.d.ts.map +1 -1
- package/build/src/deploy/index.js +1 -0
- package/build/src/deploy/pull/enumerate.d.ts +8 -0
- package/build/src/deploy/pull/enumerate.d.ts.map +1 -0
- package/build/src/deploy/pull/enumerate.js +258 -0
- package/build/src/deploy/pull/index.d.ts +28 -0
- package/build/src/deploy/pull/index.d.ts.map +1 -0
- package/build/src/deploy/pull/index.js +152 -0
- package/build/src/deploy/pull/ir.d.ts +45 -0
- package/build/src/deploy/pull/ir.d.ts.map +1 -0
- package/build/src/deploy/pull/ir.js +72 -0
- package/build/src/deploy/pull/mappers.d.ts +10 -0
- package/build/src/deploy/pull/mappers.d.ts.map +1 -0
- package/build/src/deploy/pull/mappers.js +689 -0
- package/build/src/deploy/pull/print.d.ts +9 -0
- package/build/src/deploy/pull/print.d.ts.map +1 -0
- package/build/src/deploy/pull/print.js +59 -0
- package/build/src/deploy/pull/resolve.d.ts +24 -0
- package/build/src/deploy/pull/resolve.d.ts.map +1 -0
- package/build/src/deploy/pull/resolve.js +113 -0
- package/build/src/deploy/pull/untar.d.ts +6 -0
- package/build/src/deploy/pull/untar.d.ts.map +1 -0
- package/build/src/deploy/pull/untar.js +84 -0
- package/build/src/deploy/readers.live.d.ts +3 -0
- package/build/src/deploy/readers.live.d.ts.map +1 -1
- package/build/src/deploy/readers.live.js +12 -6
- package/build/src/index.d.ts +3 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +1 -1
- package/build/src/refs.d.ts +7 -1
- package/build/src/refs.d.ts.map +1 -1
- package/build/src/refs.js +10 -0
- package/build/src/resources/customIntegration.d.ts +3 -2
- package/build/src/resources/customIntegration.d.ts.map +1 -1
- package/build/src/resources/model.d.ts +56 -8
- package/build/src/resources/model.d.ts.map +1 -1
- package/build/src/resources/model.js +48 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -34,6 +34,9 @@ export function defineModel(slug, spec) {
|
|
|
34
34
|
unification: spec.unification === undefined
|
|
35
35
|
? undefined
|
|
36
36
|
: compileUnification(spec.unification),
|
|
37
|
+
additionalColumns: spec.additionalColumns === undefined
|
|
38
|
+
? undefined
|
|
39
|
+
: spec.additionalColumns.map(compileAdditionalColumn),
|
|
37
40
|
},
|
|
38
41
|
});
|
|
39
42
|
// A small Proxy mirroring `connector.actions`: `model.columns.<columnSlug>`
|
|
@@ -49,7 +52,51 @@ export function defineModel(slug, spec) {
|
|
|
49
52
|
});
|
|
50
53
|
return { slug, uuid: token(id, "uuid"), resource: "model", columns };
|
|
51
54
|
}
|
|
52
|
-
// Lower
|
|
55
|
+
// Lower an `ModelAdditionalColumnSpec` to the wire `ModelAdditionalColumn` shape: the
|
|
56
|
+
// metric's relationship and the lookup's join model carry handles/refs in code
|
|
57
|
+
// (so the dependency shows up in the graph), which become uuid tokens resolved
|
|
58
|
+
// at apply time.
|
|
59
|
+
function compileAdditionalColumn(column) {
|
|
60
|
+
const base = {
|
|
61
|
+
slug: column.slug,
|
|
62
|
+
type: column.type,
|
|
63
|
+
label: column.label === undefined ? toTitle(column.slug) : column.label,
|
|
64
|
+
description: column.description,
|
|
65
|
+
properties: column.properties,
|
|
66
|
+
};
|
|
67
|
+
switch (column.kind) {
|
|
68
|
+
case "custom":
|
|
69
|
+
return { ...base, kind: "custom" };
|
|
70
|
+
case "computed":
|
|
71
|
+
return {
|
|
72
|
+
...base,
|
|
73
|
+
kind: "computed",
|
|
74
|
+
expression: column.expression,
|
|
75
|
+
columnsUsed: column.columnsUsed,
|
|
76
|
+
};
|
|
77
|
+
case "metric":
|
|
78
|
+
return {
|
|
79
|
+
...base,
|
|
80
|
+
kind: "metric",
|
|
81
|
+
relationshipUuid: refUuid(column.relationship),
|
|
82
|
+
aggregation: column.aggregation,
|
|
83
|
+
filter: column.filter,
|
|
84
|
+
};
|
|
85
|
+
case "lookup":
|
|
86
|
+
return {
|
|
87
|
+
...base,
|
|
88
|
+
kind: "lookup",
|
|
89
|
+
join: {
|
|
90
|
+
toModelUuid: refUuid(column.join.model),
|
|
91
|
+
fromColumnSlug: column.join.fromColumnSlug,
|
|
92
|
+
toColumnSlug: column.join.toColumnSlug,
|
|
93
|
+
},
|
|
94
|
+
extractColumnSlug: column.extractColumnSlug,
|
|
95
|
+
filter: column.filter,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Lower a `ModelUnificationSpec` to the wire shape `StorageTypes.ModelUnification`.
|
|
53
100
|
// The only reshaping is the parent link: a `model` parent carries a handle/ref
|
|
54
101
|
// in code (so the dependency shows up in the graph), which becomes a
|
|
55
102
|
// `parentModelUuid` token resolved at apply time.
|