Skip to content

Commit 8bef3b2

Browse files
committed
fix: corejs version
1 parent a3e1366 commit 8bef3b2

11 files changed

+28838
-22323
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
"no-console": 0,
1212
"arrow-parens": 0,
1313
"import/extensions": 0,
14-
"quotes": 0,
14+
"quotes": ['warn', 'single'],
1515
"no-prototype-builtins": 0,
1616
"class-methods-use-this": 0,
1717
"no-param-reassign": 0,

packages/cubejs-client-core/dist/cubejs-client-core.esm.js

+64-31
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
1+
import 'core-js/modules/es.object.to-string';
2+
import 'core-js/modules/es.promise';
3+
import 'core-js/modules/web.timers';
14
import _regeneratorRuntime from '@babel/runtime/regenerator';
25
import 'regenerator-runtime/runtime';
36
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
47
import _objectSpread2 from '@babel/runtime/helpers/objectSpread';
58
import _typeof from '@babel/runtime/helpers/typeof';
69
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
710
import _createClass from '@babel/runtime/helpers/createClass';
8-
import 'core-js/modules/es6.promise';
9-
import 'core-js/modules/es6.object.to-string';
1011
import uuid from 'uuid/v4';
11-
import 'core-js/modules/es6.number.parse-float';
12-
import 'core-js/modules/es6.number.constructor';
13-
import 'core-js/modules/es6.number.is-nan';
14-
import 'core-js/modules/web.dom.iterable';
15-
import 'core-js/modules/es6.array.iterator';
16-
import 'core-js/modules/es6.object.keys';
12+
import 'core-js/modules/es.array.concat';
13+
import 'core-js/modules/es.array.filter';
14+
import 'core-js/modules/es.array.find';
15+
import 'core-js/modules/es.array.from';
16+
import 'core-js/modules/es.array.index-of';
17+
import 'core-js/modules/es.array.join';
18+
import 'core-js/modules/es.array.map';
19+
import 'core-js/modules/es.array.reduce';
20+
import 'core-js/modules/es.date.to-string';
21+
import 'core-js/modules/es.number.constructor';
22+
import 'core-js/modules/es.number.is-nan';
23+
import 'core-js/modules/es.number.parse-float';
24+
import 'core-js/modules/es.object.assign';
25+
import 'core-js/modules/es.object.keys';
26+
import 'core-js/modules/es.regexp.exec';
27+
import 'core-js/modules/es.string.iterator';
28+
import 'core-js/modules/es.string.match';
1729
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
18-
import 'core-js/modules/es6.object.assign';
1930
import _defineProperty from '@babel/runtime/helpers/defineProperty';
20-
import 'core-js/modules/es6.array.reduce';
21-
import 'core-js/modules/es6.regexp.match';
22-
import 'core-js/modules/es6.array.index-of';
23-
import 'core-js/modules/es6.array.find';
24-
import 'core-js/modules/es6.array.filter';
2531
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
26-
import 'core-js/modules/es6.string.iterator';
27-
import 'core-js/modules/es6.array.from';
28-
import 'core-js/modules/es6.array.map';
2932
import { pipe, map, filter, reduce, minBy, maxBy, groupBy, equals, unnest, toPairs, uniq, dropLast, fromPairs } from 'ramda';
3033
import Moment from 'moment';
3134
import momentRange from 'moment-range';
32-
import 'core-js/modules/es6.array.is-array';
33-
import 'core-js/modules/es6.regexp.split';
34-
import 'core-js/modules/es6.function.name';
35-
import 'core-js/modules/es6.regexp.to-string';
36-
import 'core-js/modules/es6.date.to-string';
35+
import 'core-js/modules/es.array.is-array';
36+
import 'core-js/modules/es.function.name';
37+
import 'core-js/modules/es.string.split';
38+
import 'core-js/modules/es.array.iterator';
39+
import 'core-js/modules/es.regexp.to-string';
40+
import 'core-js/modules/web.dom-collections.iterator';
41+
import 'core-js/modules/web.url';
3742
import fetch from 'cross-fetch';
3843
import 'url-search-params-polyfill';
3944

@@ -926,9 +931,19 @@ function () {
926931
return ProgressResult;
927932
}();
928933

934+
/**
935+
* Default transport implementation.
936+
*/
937+
929938
var HttpTransport =
930939
/*#__PURE__*/
931940
function () {
941+
/**
942+
* @param options - mandatory options object
943+
* @param options.authorization - [jwt auth token](security)
944+
* @param options.apiUrl - path to `/cubejs-api/v1`
945+
* @param [options.headers] - object of custom headers
946+
*/
932947
function HttpTransport(_ref) {
933948
var authorization = _ref.authorization,
934949
apiUrl = _ref.apiUrl,
@@ -1053,6 +1068,23 @@ function () {
10531068
baseRequestId: uuid()
10541069
}, params));
10551070
}
1071+
/**
1072+
* Base method used to perform all API calls.
1073+
* Shouldn't be used directly.
1074+
* @param request - function that invoked to perform actual request using `transport.request()` method.
1075+
* @param toResult - function that maps results of invocation to method return result
1076+
* @param [options] - options object
1077+
* @param options.mutexObj - object to use to store MUTEX
1078+
* @param [options.mutexKey='default'] - key to use to store current request MUTEX inside `mutexObj`.
1079+
* MUTEX object is used to reject orphaned queries results when new queries are sent.
1080+
* For example if two queries are sent with same `mutexKey` only last one will return results.
1081+
* @param options.subscribe - pass `true` to use continuous fetch behavior.
1082+
* @param {Function} options.progressCallback - function that receives `ProgressResult` on each
1083+
* `Continue wait` message.
1084+
* @param [callback] - if passed `callback` function will be called instead of `Promise` returned
1085+
* @return {{unsubscribe: function()}}
1086+
*/
1087+
10561088
}, {
10571089
key: "loadMethod",
10581090
value: function loadMethod(request, toResult, options, callback) {
@@ -1468,8 +1500,8 @@ function () {
14681500
* new Chart(context, chartjsConfig(resultSet));
14691501
* ```
14701502
* @param query - [Query object](query-format)
1471-
* @param options
1472-
* @param callback
1503+
* @param [options] - See {@link CubejsApi#loadMethod}
1504+
* @param [callback] - See {@link CubejsApi#loadMethod}
14731505
* @returns {Promise} for {@link ResultSet} if `callback` isn't passed
14741506
*/
14751507

@@ -1491,8 +1523,8 @@ function () {
14911523
/**
14921524
* Get generated SQL string for given `query`.
14931525
* @param query - [Query object](query-format)
1494-
* @param options
1495-
* @param callback
1526+
* @param [options] - See {@link CubejsApi#loadMethod}
1527+
* @param [callback] - See {@link CubejsApi#loadMethod}
14961528
* @return {Promise} for {@link SqlQuery} if `callback` isn't passed
14971529
*/
14981530

@@ -1511,8 +1543,8 @@ function () {
15111543
}
15121544
/**
15131545
* Get meta description of cubes available for querying.
1514-
* @param options
1515-
* @param callback
1546+
* @param [options] - See {@link CubejsApi#loadMethod}
1547+
* @param [callback] - See {@link CubejsApi#loadMethod}
15161548
* @return {Promise} for {@link Meta} if `callback` isn't passed
15171549
*/
15181550

@@ -1561,12 +1593,13 @@ function () {
15611593
);
15621594
```
15631595
* @name cubejs
1564-
* @param apiToken - [API token](security) is used to authorize requests and determine SQL database you're accessing.
1596+
* @param [apiToken] - [API token](security) is used to authorize requests and determine SQL database you're accessing.
15651597
* In the development mode, Cube.js Backend will print the API token to the console on on startup.
1566-
* Can be an async function without arguments that returns API token. Optional.
1567-
* @param options - options object.
1598+
* Can be an async function without arguments that returns API token.
1599+
* @param [options] - options object.
15681600
* @param options.apiUrl - URL of your Cube.js Backend.
15691601
* By default, in the development environment it is `http://localhost:4000/cubejs-api/v1`.
1602+
* @param options.transport - transport implementation to use. {@link HttpTransport} will be used by default.
15701603
* @returns {CubejsApi}
15711604
* @order -10
15721605
*/

packages/cubejs-client-core/dist/cubejs-client-core.js

+64-31
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,47 @@ Object.defineProperty(exports, '__esModule', { value: true });
44

55
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
66

7+
require('core-js/modules/es.object.to-string');
8+
require('core-js/modules/es.promise');
9+
require('core-js/modules/web.timers');
710
var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
811
require('regenerator-runtime/runtime');
912
var _asyncToGenerator = _interopDefault(require('@babel/runtime/helpers/asyncToGenerator'));
1013
var _objectSpread2 = _interopDefault(require('@babel/runtime/helpers/objectSpread'));
1114
var _typeof = _interopDefault(require('@babel/runtime/helpers/typeof'));
1215
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck'));
1316
var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass'));
14-
require('core-js/modules/es6.promise');
15-
require('core-js/modules/es6.object.to-string');
1617
var uuid = _interopDefault(require('uuid/v4'));
17-
require('core-js/modules/es6.number.parse-float');
18-
require('core-js/modules/es6.number.constructor');
19-
require('core-js/modules/es6.number.is-nan');
20-
require('core-js/modules/web.dom.iterable');
21-
require('core-js/modules/es6.array.iterator');
22-
require('core-js/modules/es6.object.keys');
18+
require('core-js/modules/es.array.concat');
19+
require('core-js/modules/es.array.filter');
20+
require('core-js/modules/es.array.find');
21+
require('core-js/modules/es.array.from');
22+
require('core-js/modules/es.array.index-of');
23+
require('core-js/modules/es.array.join');
24+
require('core-js/modules/es.array.map');
25+
require('core-js/modules/es.array.reduce');
26+
require('core-js/modules/es.date.to-string');
27+
require('core-js/modules/es.number.constructor');
28+
require('core-js/modules/es.number.is-nan');
29+
require('core-js/modules/es.number.parse-float');
30+
require('core-js/modules/es.object.assign');
31+
require('core-js/modules/es.object.keys');
32+
require('core-js/modules/es.regexp.exec');
33+
require('core-js/modules/es.string.iterator');
34+
require('core-js/modules/es.string.match');
2335
var _slicedToArray = _interopDefault(require('@babel/runtime/helpers/slicedToArray'));
24-
require('core-js/modules/es6.object.assign');
2536
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
26-
require('core-js/modules/es6.array.reduce');
27-
require('core-js/modules/es6.regexp.match');
28-
require('core-js/modules/es6.array.index-of');
29-
require('core-js/modules/es6.array.find');
30-
require('core-js/modules/es6.array.filter');
3137
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));
32-
require('core-js/modules/es6.string.iterator');
33-
require('core-js/modules/es6.array.from');
34-
require('core-js/modules/es6.array.map');
3538
var ramda = require('ramda');
3639
var Moment = _interopDefault(require('moment'));
3740
var momentRange = _interopDefault(require('moment-range'));
38-
require('core-js/modules/es6.array.is-array');
39-
require('core-js/modules/es6.regexp.split');
40-
require('core-js/modules/es6.function.name');
41-
require('core-js/modules/es6.regexp.to-string');
42-
require('core-js/modules/es6.date.to-string');
41+
require('core-js/modules/es.array.is-array');
42+
require('core-js/modules/es.function.name');
43+
require('core-js/modules/es.string.split');
44+
require('core-js/modules/es.array.iterator');
45+
require('core-js/modules/es.regexp.to-string');
46+
require('core-js/modules/web.dom-collections.iterator');
47+
require('core-js/modules/web.url');
4348
var fetch = _interopDefault(require('cross-fetch'));
4449
require('url-search-params-polyfill');
4550

@@ -932,9 +937,19 @@ function () {
932937
return ProgressResult;
933938
}();
934939

940+
/**
941+
* Default transport implementation.
942+
*/
943+
935944
var HttpTransport =
936945
/*#__PURE__*/
937946
function () {
947+
/**
948+
* @param options - mandatory options object
949+
* @param options.authorization - [jwt auth token](security)
950+
* @param options.apiUrl - path to `/cubejs-api/v1`
951+
* @param [options.headers] - object of custom headers
952+
*/
938953
function HttpTransport(_ref) {
939954
var authorization = _ref.authorization,
940955
apiUrl = _ref.apiUrl,
@@ -1059,6 +1074,23 @@ function () {
10591074
baseRequestId: uuid()
10601075
}, params));
10611076
}
1077+
/**
1078+
* Base method used to perform all API calls.
1079+
* Shouldn't be used directly.
1080+
* @param request - function that invoked to perform actual request using `transport.request()` method.
1081+
* @param toResult - function that maps results of invocation to method return result
1082+
* @param [options] - options object
1083+
* @param options.mutexObj - object to use to store MUTEX
1084+
* @param [options.mutexKey='default'] - key to use to store current request MUTEX inside `mutexObj`.
1085+
* MUTEX object is used to reject orphaned queries results when new queries are sent.
1086+
* For example if two queries are sent with same `mutexKey` only last one will return results.
1087+
* @param options.subscribe - pass `true` to use continuous fetch behavior.
1088+
* @param {Function} options.progressCallback - function that receives `ProgressResult` on each
1089+
* `Continue wait` message.
1090+
* @param [callback] - if passed `callback` function will be called instead of `Promise` returned
1091+
* @return {{unsubscribe: function()}}
1092+
*/
1093+
10621094
}, {
10631095
key: "loadMethod",
10641096
value: function loadMethod(request, toResult, options, callback) {
@@ -1474,8 +1506,8 @@ function () {
14741506
* new Chart(context, chartjsConfig(resultSet));
14751507
* ```
14761508
* @param query - [Query object](query-format)
1477-
* @param options
1478-
* @param callback
1509+
* @param [options] - See {@link CubejsApi#loadMethod}
1510+
* @param [callback] - See {@link CubejsApi#loadMethod}
14791511
* @returns {Promise} for {@link ResultSet} if `callback` isn't passed
14801512
*/
14811513

@@ -1497,8 +1529,8 @@ function () {
14971529
/**
14981530
* Get generated SQL string for given `query`.
14991531
* @param query - [Query object](query-format)
1500-
* @param options
1501-
* @param callback
1532+
* @param [options] - See {@link CubejsApi#loadMethod}
1533+
* @param [callback] - See {@link CubejsApi#loadMethod}
15021534
* @return {Promise} for {@link SqlQuery} if `callback` isn't passed
15031535
*/
15041536

@@ -1517,8 +1549,8 @@ function () {
15171549
}
15181550
/**
15191551
* Get meta description of cubes available for querying.
1520-
* @param options
1521-
* @param callback
1552+
* @param [options] - See {@link CubejsApi#loadMethod}
1553+
* @param [callback] - See {@link CubejsApi#loadMethod}
15221554
* @return {Promise} for {@link Meta} if `callback` isn't passed
15231555
*/
15241556

@@ -1567,12 +1599,13 @@ function () {
15671599
);
15681600
```
15691601
* @name cubejs
1570-
* @param apiToken - [API token](security) is used to authorize requests and determine SQL database you're accessing.
1602+
* @param [apiToken] - [API token](security) is used to authorize requests and determine SQL database you're accessing.
15711603
* In the development mode, Cube.js Backend will print the API token to the console on on startup.
1572-
* Can be an async function without arguments that returns API token. Optional.
1573-
* @param options - options object.
1604+
* Can be an async function without arguments that returns API token.
1605+
* @param [options] - options object.
15741606
* @param options.apiUrl - URL of your Cube.js Backend.
15751607
* By default, in the development environment it is `http://localhost:4000/cubejs-api/v1`.
1608+
* @param options.transport - transport implementation to use. {@link HttpTransport} will be used by default.
15761609
* @returns {CubejsApi}
15771610
* @order -10
15781611
*/

0 commit comments

Comments
 (0)