@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.
@@ -3616,14 +3616,28 @@
3616
3616
  value:
3617
3617
  /**
3618
3618
  * Get meta description of cubes available for querying.
3619
+ *
3620
+ * Pass `onlyViews: true` to request views only — the response's `cubes` array
3621
+ * then contains only entries whose `type` is `view`.
3622
+ *
3623
+ * ```js
3624
+ * const meta = await cubeApi.meta({ onlyViews: true });
3625
+ * ```
3626
+ *
3627
+ * Compatibility note: over HTTP, servers predating the flag ignore it and return
3628
+ * the full model, so callers should not assume the response is filtered. Over
3629
+ * `WebSocketTransport` such servers reject the message with a 400 instead, since
3630
+ * they validate `meta` params strictly.
3619
3631
  */
3620
3632
  function meta(options, callback) {
3621
3633
  var _this8 = this;
3622
3634
  return this.loadMethod(function () {
3623
- return _this8.request('meta', {
3635
+ return _this8.request('meta', _objectSpread2({
3624
3636
  signal: options === null || options === void 0 ? void 0 : options.signal,
3625
3637
  baseRequestId: options === null || options === void 0 ? void 0 : options.baseRequestId
3626
- });
3638
+ }, options !== null && options !== void 0 && options.onlyViews ? {
3639
+ onlyViews: true
3640
+ } : {}));
3627
3641
  }, function (body) {
3628
3642
  return new Meta(body);
3629
3643
  }, options, callback);
@@ -3718,7 +3732,13 @@
3718
3732
  throw new Error(parsed.error);
3719
3733
  }
3720
3734
  if (parsed.data) {
3721
- rows.push.apply(rows, _toConsumableArray(parsed.data));
3735
+ // Append rows one at a time instead of spreading the whole chunk as
3736
+ // call arguments (`rows.push(...parsed.data)`). A large single-chunk
3737
+ // result (e.g. 130k+ rows) otherwise exceeds V8's argument-count
3738
+ // limit and throws "RangeError: Maximum call stack size exceeded".
3739
+ for (var i = 0; i < parsed.data.length; i++) {
3740
+ rows.push(parsed.data[i]);
3741
+ }
3722
3742
  }
3723
3743
  }
3724
3744
  }