@cubejs-client/core 1.7.12 → 1.7.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.
- package/dist/cubejs-client-core.cjs +23 -3
- package/dist/cubejs-client-core.cjs.map +1 -1
- package/dist/cubejs-client-core.umd.js +23 -3
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/dist/src/index.d.ts +11 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +20 -1
- package/dist/test/CubeApi.test.js +92 -0
- package/dist/test/HttpTransport.test.js +22 -0
- package/package.json +5 -4
|
@@ -3696,14 +3696,28 @@ var CubeApi = /*#__PURE__*/function () {
|
|
|
3696
3696
|
value:
|
|
3697
3697
|
/**
|
|
3698
3698
|
* Get meta description of cubes available for querying.
|
|
3699
|
+
*
|
|
3700
|
+
* Pass `onlyViews: true` to request views only — the response's `cubes` array
|
|
3701
|
+
* then contains only entries whose `type` is `view`.
|
|
3702
|
+
*
|
|
3703
|
+
* ```js
|
|
3704
|
+
* const meta = await cubeApi.meta({ onlyViews: true });
|
|
3705
|
+
* ```
|
|
3706
|
+
*
|
|
3707
|
+
* Compatibility note: over HTTP, servers predating the flag ignore it and return
|
|
3708
|
+
* the full model, so callers should not assume the response is filtered. Over
|
|
3709
|
+
* `WebSocketTransport` such servers reject the message with a 400 instead, since
|
|
3710
|
+
* they validate `meta` params strictly.
|
|
3699
3711
|
*/
|
|
3700
3712
|
function meta(options, callback) {
|
|
3701
3713
|
var _this8 = this;
|
|
3702
3714
|
return this.loadMethod(function () {
|
|
3703
|
-
return _this8.request('meta', {
|
|
3715
|
+
return _this8.request('meta', _objectSpread2({
|
|
3704
3716
|
signal: options === null || options === void 0 ? void 0 : options.signal,
|
|
3705
3717
|
baseRequestId: options === null || options === void 0 ? void 0 : options.baseRequestId
|
|
3706
|
-
}
|
|
3718
|
+
}, options !== null && options !== void 0 && options.onlyViews ? {
|
|
3719
|
+
onlyViews: true
|
|
3720
|
+
} : {}));
|
|
3707
3721
|
}, function (body) {
|
|
3708
3722
|
return new Meta(body);
|
|
3709
3723
|
}, options, callback);
|
|
@@ -3798,7 +3812,13 @@ var CubeApi = /*#__PURE__*/function () {
|
|
|
3798
3812
|
throw new Error(parsed.error);
|
|
3799
3813
|
}
|
|
3800
3814
|
if (parsed.data) {
|
|
3801
|
-
rows
|
|
3815
|
+
// Append rows one at a time instead of spreading the whole chunk as
|
|
3816
|
+
// call arguments (`rows.push(...parsed.data)`). A large single-chunk
|
|
3817
|
+
// result (e.g. 130k+ rows) otherwise exceeds V8's argument-count
|
|
3818
|
+
// limit and throws "RangeError: Maximum call stack size exceeded".
|
|
3819
|
+
for (var i = 0; i < parsed.data.length; i++) {
|
|
3820
|
+
rows.push(parsed.data[i]);
|
|
3821
|
+
}
|
|
3802
3822
|
}
|
|
3803
3823
|
}
|
|
3804
3824
|
}
|