@embeddable.com/sdk-core 3.14.2-next.1 → 3.14.2-next.3
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/lib/dev.d.ts +8 -0
- package/lib/index.esm.js +18 -33
- package/lib/index.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/buildGlobalHooks.int.test.ts +3 -0
- package/src/buildGlobalHooks.ts +2 -1
- package/src/buildGlobalHooks.unit.test.ts +4 -0
- package/src/cleanup.ts +5 -0
- package/src/dev.test.ts +177 -7
- package/src/dev.ts +38 -29
- package/src/push.test.ts +8 -9
- package/src/push.ts +11 -2
- package/src/validate.ts +3 -24
- package/lib/index.js +0 -22492
- package/lib/index.js.map +0 -1
package/src/validate.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as fs from "node:fs/promises";
|
|
2
2
|
import * as YAML from "yaml";
|
|
3
3
|
import { errorFormatter, findFiles } from "@embeddable.com/sdk-utils";
|
|
4
|
+
import { DIMENSION_TYPES, MEASURE_TYPES } from "@embeddable.com/core";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
import ora from "ora";
|
|
6
7
|
import { checkNodeVersion } from "./utils";
|
|
@@ -170,28 +171,6 @@ export async function clientContextValidation(filesList: [string, string][]) {
|
|
|
170
171
|
return errors;
|
|
171
172
|
}
|
|
172
173
|
|
|
173
|
-
enum MeasureTypeEnum {
|
|
174
|
-
string = "string",
|
|
175
|
-
time = "time",
|
|
176
|
-
boolean = "boolean",
|
|
177
|
-
number = "number",
|
|
178
|
-
count = "count",
|
|
179
|
-
count_distinct = "count_distinct",
|
|
180
|
-
count_distinct_approx = "count_distinct_approx",
|
|
181
|
-
sum = "sum",
|
|
182
|
-
avg = "avg",
|
|
183
|
-
min = "min",
|
|
184
|
-
max = "max",
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
enum DimensionTypeEnum {
|
|
188
|
-
string = "string",
|
|
189
|
-
time = "time",
|
|
190
|
-
boolean = "boolean",
|
|
191
|
-
number = "number",
|
|
192
|
-
geo = "geo",
|
|
193
|
-
}
|
|
194
|
-
|
|
195
174
|
const cubeModelSchema = z
|
|
196
175
|
.object({
|
|
197
176
|
cubes: z
|
|
@@ -200,14 +179,14 @@ const cubeModelSchema = z
|
|
|
200
179
|
dimensions: z
|
|
201
180
|
.object({
|
|
202
181
|
name: z.string(),
|
|
203
|
-
type: z.
|
|
182
|
+
type: z.enum(DIMENSION_TYPES),
|
|
204
183
|
})
|
|
205
184
|
.array()
|
|
206
185
|
.optional(),
|
|
207
186
|
measures: z
|
|
208
187
|
.object({
|
|
209
188
|
name: z.string(),
|
|
210
|
-
type: z.
|
|
189
|
+
type: z.enum(MEASURE_TYPES),
|
|
211
190
|
})
|
|
212
191
|
.array()
|
|
213
192
|
.optional(),
|