@cubejs-client/core 0.29.43 → 0.29.53
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/CHANGELOG.md +40 -0
- package/dist/cubejs-client-core.esm.js +28 -14
- package/dist/cubejs-client-core.esm.js.map +1 -1
- package/dist/cubejs-client-core.js +28 -14
- package/dist/cubejs-client-core.js.map +1 -1
- package/dist/cubejs-client-core.umd.js +41 -27
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/index.d.ts +24 -16
- package/package.json +2 -2
- package/src/HttpTransport.js +9 -2
- package/src/RequestError.js +2 -1
- package/src/index.js +17 -16
|
@@ -3298,6 +3298,20 @@
|
|
|
3298
3298
|
setInterval: wrap(global$1.setInterval)
|
|
3299
3299
|
});
|
|
3300
3300
|
|
|
3301
|
+
var $map = arrayIteration.map;
|
|
3302
|
+
|
|
3303
|
+
|
|
3304
|
+
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
|
|
3305
|
+
|
|
3306
|
+
// `Array.prototype.map` method
|
|
3307
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
3308
|
+
// with adding support of @@species
|
|
3309
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
|
|
3310
|
+
map: function map(callbackfn /* , thisArg */) {
|
|
3311
|
+
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
3312
|
+
}
|
|
3313
|
+
});
|
|
3314
|
+
|
|
3301
3315
|
var Function$1 = global$1.Function;
|
|
3302
3316
|
var concat = functionUncurryThis([].concat);
|
|
3303
3317
|
var join$1 = functionUncurryThis([].join);
|
|
@@ -3330,20 +3344,6 @@
|
|
|
3330
3344
|
bind: functionBind
|
|
3331
3345
|
});
|
|
3332
3346
|
|
|
3333
|
-
var $map = arrayIteration.map;
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
|
|
3337
|
-
|
|
3338
|
-
// `Array.prototype.map` method
|
|
3339
|
-
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
3340
|
-
// with adding support of @@species
|
|
3341
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
|
|
3342
|
-
map: function map(callbackfn /* , thisArg */) {
|
|
3343
|
-
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
3344
|
-
}
|
|
3345
|
-
});
|
|
3346
|
-
|
|
3347
3347
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
3348
3348
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
3349
3349
|
// generators (like Math.random()).
|
|
@@ -10988,6 +10988,7 @@
|
|
|
10988
10988
|
};
|
|
10989
10989
|
|
|
10990
10990
|
return {
|
|
10991
|
+
/* eslint no-unsafe-finally: off */
|
|
10991
10992
|
subscribe: function subscribe(callback) {
|
|
10992
10993
|
var _this2 = this;
|
|
10993
10994
|
|
|
@@ -10997,21 +10998,29 @@
|
|
|
10997
10998
|
while (1) {
|
|
10998
10999
|
switch (_context.prev = _context.next) {
|
|
10999
11000
|
case 0:
|
|
11000
|
-
|
|
11001
|
+
result = {
|
|
11002
|
+
error: 'network Error' // add default error message
|
|
11003
|
+
|
|
11004
|
+
};
|
|
11005
|
+
_context.prev = 1;
|
|
11006
|
+
_context.next = 4;
|
|
11001
11007
|
return runRequest();
|
|
11002
11008
|
|
|
11003
|
-
case
|
|
11009
|
+
case 4:
|
|
11004
11010
|
result = _context.sent;
|
|
11011
|
+
|
|
11012
|
+
case 5:
|
|
11013
|
+
_context.prev = 5;
|
|
11005
11014
|
return _context.abrupt("return", callback(result, function () {
|
|
11006
11015
|
return _this2.subscribe(callback);
|
|
11007
11016
|
}));
|
|
11008
11017
|
|
|
11009
|
-
case
|
|
11018
|
+
case 8:
|
|
11010
11019
|
case "end":
|
|
11011
11020
|
return _context.stop();
|
|
11012
11021
|
}
|
|
11013
11022
|
}
|
|
11014
|
-
}, _callee);
|
|
11023
|
+
}, _callee, null, [[1,, 5, 8]]);
|
|
11015
11024
|
}))();
|
|
11016
11025
|
}
|
|
11017
11026
|
};
|
|
@@ -11197,13 +11206,14 @@
|
|
|
11197
11206
|
|
|
11198
11207
|
var _super = _createSuper(RequestError);
|
|
11199
11208
|
|
|
11200
|
-
function RequestError(message, response) {
|
|
11209
|
+
function RequestError(message, response, status) {
|
|
11201
11210
|
var _this;
|
|
11202
11211
|
|
|
11203
11212
|
_classCallCheck(this, RequestError);
|
|
11204
11213
|
|
|
11205
11214
|
_this = _super.call(this, message);
|
|
11206
11215
|
_this.response = response;
|
|
11216
|
+
_this.status = status;
|
|
11207
11217
|
return _this;
|
|
11208
11218
|
}
|
|
11209
11219
|
|
|
@@ -11547,7 +11557,7 @@
|
|
|
11547
11557
|
return requestInstance.unsubscribe();
|
|
11548
11558
|
|
|
11549
11559
|
case 36:
|
|
11550
|
-
error = new RequestError(body.error, body); // TODO error class
|
|
11560
|
+
error = new RequestError(body.error, body, response.status); // TODO error class
|
|
11551
11561
|
|
|
11552
11562
|
if (!callback) {
|
|
11553
11563
|
_context5.next = 41;
|
|
@@ -11757,7 +11767,11 @@
|
|
|
11757
11767
|
key: "patchQueryInternal",
|
|
11758
11768
|
value: function patchQueryInternal(query, responseFormat) {
|
|
11759
11769
|
if (responseFormat === ResultType.COMPACT && query.responseFormat !== ResultType.COMPACT) {
|
|
11760
|
-
query
|
|
11770
|
+
return _objectSpread(_objectSpread({}, query), {}, {
|
|
11771
|
+
responseFormat: ResultType.COMPACT
|
|
11772
|
+
});
|
|
11773
|
+
} else {
|
|
11774
|
+
return query;
|
|
11761
11775
|
}
|
|
11762
11776
|
}
|
|
11763
11777
|
/**
|
|
@@ -11808,11 +11822,11 @@
|
|
|
11808
11822
|
|
|
11809
11823
|
if (responseFormat === ResultType.COMPACT) {
|
|
11810
11824
|
if (Array.isArray(query)) {
|
|
11811
|
-
query.
|
|
11812
|
-
_this3.patchQueryInternal(q, ResultType.COMPACT);
|
|
11825
|
+
query = query.map(function (q) {
|
|
11826
|
+
return _this3.patchQueryInternal(q, ResultType.COMPACT);
|
|
11813
11827
|
});
|
|
11814
11828
|
} else {
|
|
11815
|
-
this.patchQueryInternal(query, ResultType.COMPACT);
|
|
11829
|
+
query = this.patchQueryInternal(query, ResultType.COMPACT);
|
|
11816
11830
|
}
|
|
11817
11831
|
}
|
|
11818
11832
|
|
|
@@ -11843,11 +11857,11 @@
|
|
|
11843
11857
|
|
|
11844
11858
|
if (responseFormat === ResultType.COMPACT) {
|
|
11845
11859
|
if (Array.isArray(query)) {
|
|
11846
|
-
query.
|
|
11847
|
-
_this4.patchQueryInternal(q, ResultType.COMPACT);
|
|
11860
|
+
query = query.map(function (q) {
|
|
11861
|
+
return _this4.patchQueryInternal(q, ResultType.COMPACT);
|
|
11848
11862
|
});
|
|
11849
11863
|
} else {
|
|
11850
|
-
this.patchQueryInternal(query, ResultType.COMPACT);
|
|
11864
|
+
query = this.patchQueryInternal(query, ResultType.COMPACT);
|
|
11851
11865
|
}
|
|
11852
11866
|
}
|
|
11853
11867
|
|