cubejs-cli 0.33.12 → 0.33.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/templates.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,MAAM,CAAC,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/templates.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,MAAM,CAAC,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA4VF,QAAA,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAiEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/src/templates.js
CHANGED
|
@@ -194,8 +194,8 @@ const ordersJs = `cube(\`orders\`, {
|
|
|
194
194
|
\`,
|
|
195
195
|
|
|
196
196
|
pre_aggregations: {
|
|
197
|
-
// Pre-aggregation definitions go here
|
|
198
|
-
// Learn more
|
|
197
|
+
// Pre-aggregation definitions go here.
|
|
198
|
+
// Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started
|
|
199
199
|
},
|
|
200
200
|
|
|
201
201
|
measures: {
|
|
@@ -217,6 +217,37 @@ const ordersJs = `cube(\`orders\`, {
|
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
`;
|
|
220
|
+
const exampleViewJs = `// In Cube, views are used to expose slices of your data graph and act as data marts.
|
|
221
|
+
// You can control which measures and dimensions are exposed to BIs or data apps,
|
|
222
|
+
// as well as the direction of joins between the exposed cubes.
|
|
223
|
+
// You can learn more about views in documentation here - https://cube.dev/docs/schema/reference/view
|
|
224
|
+
|
|
225
|
+
// The following example shows a view defined on top of orders and customers cubes.
|
|
226
|
+
// Both orders and customers cubes are exposed using the "includes" parameter to
|
|
227
|
+
// control which measures and dimensions are exposed.
|
|
228
|
+
// Prefixes can also be applied when exposing measures or dimensions.
|
|
229
|
+
// In this case, the customers' city dimension is prefixed with the cube name,
|
|
230
|
+
// resulting in "customers_city" when querying the view.
|
|
231
|
+
|
|
232
|
+
// view(\`example_view\`, {
|
|
233
|
+
// cubes: [
|
|
234
|
+
// {
|
|
235
|
+
// join_path: orders,
|
|
236
|
+
// includes: [
|
|
237
|
+
// 'status',
|
|
238
|
+
// 'created_date',
|
|
239
|
+
// ],
|
|
240
|
+
// },
|
|
241
|
+
// {
|
|
242
|
+
// join_path: orders.customers,
|
|
243
|
+
// prefix: true,
|
|
244
|
+
// includes: [
|
|
245
|
+
// 'city',
|
|
246
|
+
// ],
|
|
247
|
+
// },
|
|
248
|
+
// ]
|
|
249
|
+
// });
|
|
250
|
+
`;
|
|
220
251
|
const ordersYml = `cubes:
|
|
221
252
|
- name: orders
|
|
222
253
|
sql: >
|
|
@@ -230,8 +261,8 @@ const ordersYml = `cubes:
|
|
|
230
261
|
UNION ALL
|
|
231
262
|
SELECT 5 AS id, 600 AS amount, 'shipped' status
|
|
232
263
|
|
|
233
|
-
# Pre-aggregation definitions go here
|
|
234
|
-
# Learn more
|
|
264
|
+
# Pre-aggregation definitions go here.
|
|
265
|
+
# Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started
|
|
235
266
|
# pre_aggregations:
|
|
236
267
|
|
|
237
268
|
measures:
|
|
@@ -247,6 +278,35 @@ const ordersYml = `cubes:
|
|
|
247
278
|
sql: status
|
|
248
279
|
type: string
|
|
249
280
|
`;
|
|
281
|
+
const exampleViewYml = `# In Cube, views are used to expose slices of your data graph and act as data marts.
|
|
282
|
+
# You can control which measures and dimensions are exposed to BIs or data apps,
|
|
283
|
+
# as well as the direction of joins between the exposed cubes.
|
|
284
|
+
# You can learn more about views in documentation here - https://cube.dev/docs/schema/reference/view
|
|
285
|
+
|
|
286
|
+
# The following example shows a view defined on top of orders and customers cubes.
|
|
287
|
+
# Both orders and customers cubes are exposed using the "includes" parameter to
|
|
288
|
+
# control which measures and dimensions are exposed.
|
|
289
|
+
# Prefixes can also be applied when exposing measures or dimensions.
|
|
290
|
+
# In this case, the customers' city dimension is prefixed with the cube name,
|
|
291
|
+
# resulting in "customers_city" when querying the view.
|
|
292
|
+
|
|
293
|
+
# views:
|
|
294
|
+
# - name: example_view
|
|
295
|
+
#
|
|
296
|
+
# cubes:
|
|
297
|
+
# - join_path: orders
|
|
298
|
+
# includes:
|
|
299
|
+
# - status
|
|
300
|
+
# - created_date
|
|
301
|
+
#
|
|
302
|
+
# - total_amount
|
|
303
|
+
# - count
|
|
304
|
+
#
|
|
305
|
+
# - join_path: orders.customers
|
|
306
|
+
# prefix: true
|
|
307
|
+
# includes:
|
|
308
|
+
# - city
|
|
309
|
+
`;
|
|
250
310
|
const cubeJs = `// Cube configuration options: https://cube.dev/docs/config
|
|
251
311
|
/** @type{ import('@cubejs-backend/server-core').CreateOptions } */
|
|
252
312
|
module.exports = {
|
|
@@ -279,7 +339,8 @@ const templates = {
|
|
|
279
339
|
'docker-compose.yml': dockerCompose,
|
|
280
340
|
'.env': dotEnv,
|
|
281
341
|
'.gitignore': () => gitIgnore,
|
|
282
|
-
'model/cubes/orders.js': () => ordersJs
|
|
342
|
+
'model/cubes/orders.js': () => ordersJs,
|
|
343
|
+
'model/views/example_view.js': () => exampleViewJs,
|
|
283
344
|
}
|
|
284
345
|
},
|
|
285
346
|
docker: {
|
|
@@ -291,7 +352,8 @@ const templates = {
|
|
|
291
352
|
'docker-compose.yml': dockerCompose,
|
|
292
353
|
'.env': dotEnv,
|
|
293
354
|
'.gitignore': () => gitIgnore,
|
|
294
|
-
'model/cubes/orders.yml': () => ordersYml
|
|
355
|
+
'model/cubes/orders.yml': () => ordersYml,
|
|
356
|
+
'model/views/example_view.yml': () => exampleViewYml,
|
|
295
357
|
}
|
|
296
358
|
},
|
|
297
359
|
express: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/templates.ts"],"names":[],"mappings":";;AAeA;;GAEG;AACH,MAAM,OAAO,GAAG;;;;;;;;;;CAUf,CAAC;AAEF;;GAEG;AACH,MAAM,SAAS,GAAG;CACjB,CAAC;AAEF,oDAAoD;AACpD,MAAM,gBAAgB,GAAG,GAAG,CAAC,EAAE,CAAC;iBACf,GAAG,CAAC,MAAM;oBACP,GAAG,CAAC,SAAS;;;yBAGR,CAAC;AAE1B,MAAM,iBAAiB,GAAG,GAAG,CAAC,EAAE,CAAC;EAC/B,gBAAgB,CAAC,GAAG,CAAC;wBACC,CAAC;AAEzB,MAAM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3B,gBAAgB,EAAE,aAAa;YAC/B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;YAC7B,uBAAuB,EAAE,GAAG,EAAE,CAAC,QAAQ;SACxC;QACD,YAAY,EAAE,CAAC,4BAA4B,EAAE,gCAAgC,CAAC;KAC/E;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE;YACP,GAAG,EAAE,mBAAmB;SACzB;QACD,KAAK,EAAE;YACL,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS;YAC3B,gBAAgB,EAAE,mBAAmB;YACrC,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;YAC7B,kBAAkB,EAAE,GAAG,EAAE,CAAC,QAAQ;SACnC;QACD,YAAY,EAAE,CAAC,4BAA4B,EAAE,mCAAmC,CAAC;QACjF,eAAe,EAAE,CAAC,kCAAkC,CAAC;KACtD;CACF,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "cubejs-cli",
|
|
3
3
|
"description": "Cube.js Command Line Interface",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "0.33.
|
|
5
|
+
"version": "0.33.14",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@cubejs-backend/dotenv": "^9.0.2",
|
|
34
|
-
"@cubejs-backend/schema-compiler": "^0.33.
|
|
34
|
+
"@cubejs-backend/schema-compiler": "^0.33.13",
|
|
35
35
|
"@cubejs-backend/shared": "^0.33.11",
|
|
36
36
|
"chalk": "^2.4.2",
|
|
37
37
|
"cli-progress": "^3.10",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@cubejs-backend/linter": "^0.33.0",
|
|
53
|
-
"@cubejs-backend/server": "^0.33.
|
|
53
|
+
"@cubejs-backend/server": "^0.33.14",
|
|
54
54
|
"@oclif/command": "^1.8.0",
|
|
55
55
|
"@types/cli-progress": "^3.8.0",
|
|
56
56
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"eslintConfig": {
|
|
70
70
|
"extends": "../cubejs-linter"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "8382ea5945d52d49f3e485cf6082218a37aa9a28"
|
|
73
73
|
}
|