@feathersjs/client 5.0.24 → 5.0.26
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 +8 -0
- package/dist/core.js +16 -20
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/feathers.js +117 -109
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -1
- package/package.json +18 -18
package/dist/feathers.js
CHANGED
|
@@ -29,7 +29,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
29
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
30
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
31
31
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
32
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
33
33
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
34
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
35
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -46,11 +46,11 @@ exports.AuthenticationClient = void 0;
|
|
|
46
46
|
var errors_1 = __webpack_require__(/*! @feathersjs/errors */ "../errors/lib/index.js");
|
|
47
47
|
var storage_1 = __webpack_require__(/*! ./storage */ "../authentication-client/lib/storage.js");
|
|
48
48
|
var OauthError = /*#__PURE__*/function (_errors_1$FeathersErr) {
|
|
49
|
-
_inherits(OauthError, _errors_1$FeathersErr);
|
|
50
49
|
function OauthError(message, data) {
|
|
51
50
|
_classCallCheck(this, OauthError);
|
|
52
51
|
return _callSuper(this, OauthError, [message, 'OauthError', 401, 'oauth-error', data]);
|
|
53
52
|
}
|
|
53
|
+
_inherits(OauthError, _errors_1$FeathersErr);
|
|
54
54
|
return _createClass(OauthError);
|
|
55
55
|
}(errors_1.FeathersError);
|
|
56
56
|
var getMatch = function getMatch(location, key) {
|
|
@@ -76,7 +76,7 @@ var AuthenticationClient = /*#__PURE__*/function () {
|
|
|
76
76
|
this.handleSocket(socket);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
_createClass(AuthenticationClient, [{
|
|
79
|
+
return _createClass(AuthenticationClient, [{
|
|
80
80
|
key: "service",
|
|
81
81
|
get: function get() {
|
|
82
82
|
return this.app.service(this.options.path);
|
|
@@ -277,7 +277,6 @@ var AuthenticationClient = /*#__PURE__*/function () {
|
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
}]);
|
|
280
|
-
return AuthenticationClient;
|
|
281
280
|
}();
|
|
282
281
|
exports.AuthenticationClient = AuthenticationClient;
|
|
283
282
|
|
|
@@ -359,7 +358,7 @@ Object.defineProperty(exports, "populateHeader", ({
|
|
|
359
358
|
|
|
360
359
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
361
360
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
362
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
361
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
363
362
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
364
363
|
Object.defineProperty(exports, "__esModule", ({
|
|
365
364
|
value: true
|
|
@@ -497,7 +496,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
497
496
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
498
497
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
499
498
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
500
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
499
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
501
500
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
502
501
|
Object.defineProperty(exports, "__esModule", ({
|
|
503
502
|
value: true
|
|
@@ -508,7 +507,7 @@ var MemoryStorage = /*#__PURE__*/function () {
|
|
|
508
507
|
_classCallCheck(this, MemoryStorage);
|
|
509
508
|
this.store = {};
|
|
510
509
|
}
|
|
511
|
-
_createClass(MemoryStorage, [{
|
|
510
|
+
return _createClass(MemoryStorage, [{
|
|
512
511
|
key: "getItem",
|
|
513
512
|
value: function getItem(key) {
|
|
514
513
|
return Promise.resolve(this.store[key]);
|
|
@@ -526,7 +525,6 @@ var MemoryStorage = /*#__PURE__*/function () {
|
|
|
526
525
|
return Promise.resolve(value);
|
|
527
526
|
}
|
|
528
527
|
}]);
|
|
529
|
-
return MemoryStorage;
|
|
530
528
|
}();
|
|
531
529
|
exports.MemoryStorage = MemoryStorage;
|
|
532
530
|
var StorageWrapper = /*#__PURE__*/function () {
|
|
@@ -534,7 +532,7 @@ var StorageWrapper = /*#__PURE__*/function () {
|
|
|
534
532
|
_classCallCheck(this, StorageWrapper);
|
|
535
533
|
this.storage = storage;
|
|
536
534
|
}
|
|
537
|
-
_createClass(StorageWrapper, [{
|
|
535
|
+
return _createClass(StorageWrapper, [{
|
|
538
536
|
key: "getItem",
|
|
539
537
|
value: function getItem(key) {
|
|
540
538
|
var _a;
|
|
@@ -553,7 +551,6 @@ var StorageWrapper = /*#__PURE__*/function () {
|
|
|
553
551
|
return Promise.resolve((_a = this.storage) === null || _a === void 0 ? void 0 : _a.removeItem(key));
|
|
554
552
|
}
|
|
555
553
|
}]);
|
|
556
|
-
return StorageWrapper;
|
|
557
554
|
}();
|
|
558
555
|
exports.StorageWrapper = StorageWrapper;
|
|
559
556
|
|
|
@@ -607,7 +604,7 @@ exports.createDebug = createDebug;
|
|
|
607
604
|
|
|
608
605
|
|
|
609
606
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
610
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
607
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
611
608
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
612
609
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
613
610
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -765,12 +762,12 @@ __exportStar(__webpack_require__(/*! ./debug */ "../commons/lib/debug.js"), expo
|
|
|
765
762
|
|
|
766
763
|
var _excluded = ["message", "errors"];
|
|
767
764
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
768
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
765
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
769
766
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
770
767
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
771
768
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
772
769
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
773
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
770
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
774
771
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
775
772
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
776
773
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -787,7 +784,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
787
784
|
}));
|
|
788
785
|
exports.convert = exports.errors = exports.Unavailable = exports.BadGateway = exports.NotImplemented = exports.GeneralError = exports.TooManyRequests = exports.Unprocessable = exports.LengthRequired = exports.Gone = exports.Conflict = exports.Timeout = exports.NotAcceptable = exports.MethodNotAllowed = exports.NotFound = exports.Forbidden = exports.PaymentError = exports.NotAuthenticated = exports.BadRequest = exports.FeathersError = void 0;
|
|
789
786
|
var FeathersError = /*#__PURE__*/function (_Error) {
|
|
790
|
-
_inherits(FeathersError, _Error);
|
|
791
787
|
function FeathersError(err, name, code, className, _data) {
|
|
792
788
|
var _this;
|
|
793
789
|
_classCallCheck(this, FeathersError);
|
|
@@ -810,10 +806,11 @@ var FeathersError = /*#__PURE__*/function (_Error) {
|
|
|
810
806
|
properties.data = rest;
|
|
811
807
|
}
|
|
812
808
|
_this = _callSuper(this, FeathersError, [msg]);
|
|
813
|
-
Object.assign(
|
|
809
|
+
Object.assign(_this, properties);
|
|
814
810
|
return _this;
|
|
815
811
|
}
|
|
816
|
-
|
|
812
|
+
_inherits(FeathersError, _Error);
|
|
813
|
+
return _createClass(FeathersError, [{
|
|
817
814
|
key: "toJSON",
|
|
818
815
|
value: function toJSON() {
|
|
819
816
|
var result = {
|
|
@@ -831,175 +828,174 @@ var FeathersError = /*#__PURE__*/function (_Error) {
|
|
|
831
828
|
return result;
|
|
832
829
|
}
|
|
833
830
|
}]);
|
|
834
|
-
return FeathersError;
|
|
835
831
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
836
832
|
exports.FeathersError = FeathersError;
|
|
837
833
|
var BadRequest = /*#__PURE__*/function (_FeathersError) {
|
|
838
|
-
_inherits(BadRequest, _FeathersError);
|
|
839
834
|
function BadRequest(message, data) {
|
|
840
835
|
_classCallCheck(this, BadRequest);
|
|
841
836
|
return _callSuper(this, BadRequest, [message, 'BadRequest', 400, 'bad-request', data]);
|
|
842
837
|
}
|
|
838
|
+
_inherits(BadRequest, _FeathersError);
|
|
843
839
|
return _createClass(BadRequest);
|
|
844
840
|
}(FeathersError);
|
|
845
841
|
exports.BadRequest = BadRequest;
|
|
846
842
|
// 401 - Not Authenticated
|
|
847
843
|
var NotAuthenticated = /*#__PURE__*/function (_FeathersError2) {
|
|
848
|
-
_inherits(NotAuthenticated, _FeathersError2);
|
|
849
844
|
function NotAuthenticated(message, data) {
|
|
850
845
|
_classCallCheck(this, NotAuthenticated);
|
|
851
846
|
return _callSuper(this, NotAuthenticated, [message, 'NotAuthenticated', 401, 'not-authenticated', data]);
|
|
852
847
|
}
|
|
848
|
+
_inherits(NotAuthenticated, _FeathersError2);
|
|
853
849
|
return _createClass(NotAuthenticated);
|
|
854
850
|
}(FeathersError);
|
|
855
851
|
exports.NotAuthenticated = NotAuthenticated;
|
|
856
852
|
// 402 - Payment Error
|
|
857
853
|
var PaymentError = /*#__PURE__*/function (_FeathersError3) {
|
|
858
|
-
_inherits(PaymentError, _FeathersError3);
|
|
859
854
|
function PaymentError(message, data) {
|
|
860
855
|
_classCallCheck(this, PaymentError);
|
|
861
856
|
return _callSuper(this, PaymentError, [message, 'PaymentError', 402, 'payment-error', data]);
|
|
862
857
|
}
|
|
858
|
+
_inherits(PaymentError, _FeathersError3);
|
|
863
859
|
return _createClass(PaymentError);
|
|
864
860
|
}(FeathersError);
|
|
865
861
|
exports.PaymentError = PaymentError;
|
|
866
862
|
// 403 - Forbidden
|
|
867
863
|
var Forbidden = /*#__PURE__*/function (_FeathersError4) {
|
|
868
|
-
_inherits(Forbidden, _FeathersError4);
|
|
869
864
|
function Forbidden(message, data) {
|
|
870
865
|
_classCallCheck(this, Forbidden);
|
|
871
866
|
return _callSuper(this, Forbidden, [message, 'Forbidden', 403, 'forbidden', data]);
|
|
872
867
|
}
|
|
868
|
+
_inherits(Forbidden, _FeathersError4);
|
|
873
869
|
return _createClass(Forbidden);
|
|
874
870
|
}(FeathersError);
|
|
875
871
|
exports.Forbidden = Forbidden;
|
|
876
872
|
// 404 - Not Found
|
|
877
873
|
var NotFound = /*#__PURE__*/function (_FeathersError5) {
|
|
878
|
-
_inherits(NotFound, _FeathersError5);
|
|
879
874
|
function NotFound(message, data) {
|
|
880
875
|
_classCallCheck(this, NotFound);
|
|
881
876
|
return _callSuper(this, NotFound, [message, 'NotFound', 404, 'not-found', data]);
|
|
882
877
|
}
|
|
878
|
+
_inherits(NotFound, _FeathersError5);
|
|
883
879
|
return _createClass(NotFound);
|
|
884
880
|
}(FeathersError);
|
|
885
881
|
exports.NotFound = NotFound;
|
|
886
882
|
// 405 - Method Not Allowed
|
|
887
883
|
var MethodNotAllowed = /*#__PURE__*/function (_FeathersError6) {
|
|
888
|
-
_inherits(MethodNotAllowed, _FeathersError6);
|
|
889
884
|
function MethodNotAllowed(message, data) {
|
|
890
885
|
_classCallCheck(this, MethodNotAllowed);
|
|
891
886
|
return _callSuper(this, MethodNotAllowed, [message, 'MethodNotAllowed', 405, 'method-not-allowed', data]);
|
|
892
887
|
}
|
|
888
|
+
_inherits(MethodNotAllowed, _FeathersError6);
|
|
893
889
|
return _createClass(MethodNotAllowed);
|
|
894
890
|
}(FeathersError);
|
|
895
891
|
exports.MethodNotAllowed = MethodNotAllowed;
|
|
896
892
|
// 406 - Not Acceptable
|
|
897
893
|
var NotAcceptable = /*#__PURE__*/function (_FeathersError7) {
|
|
898
|
-
_inherits(NotAcceptable, _FeathersError7);
|
|
899
894
|
function NotAcceptable(message, data) {
|
|
900
895
|
_classCallCheck(this, NotAcceptable);
|
|
901
896
|
return _callSuper(this, NotAcceptable, [message, 'NotAcceptable', 406, 'not-acceptable', data]);
|
|
902
897
|
}
|
|
898
|
+
_inherits(NotAcceptable, _FeathersError7);
|
|
903
899
|
return _createClass(NotAcceptable);
|
|
904
900
|
}(FeathersError);
|
|
905
901
|
exports.NotAcceptable = NotAcceptable;
|
|
906
902
|
// 408 - Timeout
|
|
907
903
|
var Timeout = /*#__PURE__*/function (_FeathersError8) {
|
|
908
|
-
_inherits(Timeout, _FeathersError8);
|
|
909
904
|
function Timeout(message, data) {
|
|
910
905
|
_classCallCheck(this, Timeout);
|
|
911
906
|
return _callSuper(this, Timeout, [message, 'Timeout', 408, 'timeout', data]);
|
|
912
907
|
}
|
|
908
|
+
_inherits(Timeout, _FeathersError8);
|
|
913
909
|
return _createClass(Timeout);
|
|
914
910
|
}(FeathersError);
|
|
915
911
|
exports.Timeout = Timeout;
|
|
916
912
|
// 409 - Conflict
|
|
917
913
|
var Conflict = /*#__PURE__*/function (_FeathersError9) {
|
|
918
|
-
_inherits(Conflict, _FeathersError9);
|
|
919
914
|
function Conflict(message, data) {
|
|
920
915
|
_classCallCheck(this, Conflict);
|
|
921
916
|
return _callSuper(this, Conflict, [message, 'Conflict', 409, 'conflict', data]);
|
|
922
917
|
}
|
|
918
|
+
_inherits(Conflict, _FeathersError9);
|
|
923
919
|
return _createClass(Conflict);
|
|
924
920
|
}(FeathersError);
|
|
925
921
|
exports.Conflict = Conflict;
|
|
926
922
|
// 410 - Gone
|
|
927
923
|
var Gone = /*#__PURE__*/function (_FeathersError10) {
|
|
928
|
-
_inherits(Gone, _FeathersError10);
|
|
929
924
|
function Gone(message, data) {
|
|
930
925
|
_classCallCheck(this, Gone);
|
|
931
926
|
return _callSuper(this, Gone, [message, 'Gone', 410, 'gone', data]);
|
|
932
927
|
}
|
|
928
|
+
_inherits(Gone, _FeathersError10);
|
|
933
929
|
return _createClass(Gone);
|
|
934
930
|
}(FeathersError);
|
|
935
931
|
exports.Gone = Gone;
|
|
936
932
|
// 411 - Length Required
|
|
937
933
|
var LengthRequired = /*#__PURE__*/function (_FeathersError11) {
|
|
938
|
-
_inherits(LengthRequired, _FeathersError11);
|
|
939
934
|
function LengthRequired(message, data) {
|
|
940
935
|
_classCallCheck(this, LengthRequired);
|
|
941
936
|
return _callSuper(this, LengthRequired, [message, 'LengthRequired', 411, 'length-required', data]);
|
|
942
937
|
}
|
|
938
|
+
_inherits(LengthRequired, _FeathersError11);
|
|
943
939
|
return _createClass(LengthRequired);
|
|
944
940
|
}(FeathersError);
|
|
945
941
|
exports.LengthRequired = LengthRequired;
|
|
946
942
|
// 422 Unprocessable
|
|
947
943
|
var Unprocessable = /*#__PURE__*/function (_FeathersError12) {
|
|
948
|
-
_inherits(Unprocessable, _FeathersError12);
|
|
949
944
|
function Unprocessable(message, data) {
|
|
950
945
|
_classCallCheck(this, Unprocessable);
|
|
951
946
|
return _callSuper(this, Unprocessable, [message, 'Unprocessable', 422, 'unprocessable', data]);
|
|
952
947
|
}
|
|
948
|
+
_inherits(Unprocessable, _FeathersError12);
|
|
953
949
|
return _createClass(Unprocessable);
|
|
954
950
|
}(FeathersError);
|
|
955
951
|
exports.Unprocessable = Unprocessable;
|
|
956
952
|
// 429 Too Many Requests
|
|
957
953
|
var TooManyRequests = /*#__PURE__*/function (_FeathersError13) {
|
|
958
|
-
_inherits(TooManyRequests, _FeathersError13);
|
|
959
954
|
function TooManyRequests(message, data) {
|
|
960
955
|
_classCallCheck(this, TooManyRequests);
|
|
961
956
|
return _callSuper(this, TooManyRequests, [message, 'TooManyRequests', 429, 'too-many-requests', data]);
|
|
962
957
|
}
|
|
958
|
+
_inherits(TooManyRequests, _FeathersError13);
|
|
963
959
|
return _createClass(TooManyRequests);
|
|
964
960
|
}(FeathersError);
|
|
965
961
|
exports.TooManyRequests = TooManyRequests;
|
|
966
962
|
// 500 - General Error
|
|
967
963
|
var GeneralError = /*#__PURE__*/function (_FeathersError14) {
|
|
968
|
-
_inherits(GeneralError, _FeathersError14);
|
|
969
964
|
function GeneralError(message, data) {
|
|
970
965
|
_classCallCheck(this, GeneralError);
|
|
971
966
|
return _callSuper(this, GeneralError, [message, 'GeneralError', 500, 'general-error', data]);
|
|
972
967
|
}
|
|
968
|
+
_inherits(GeneralError, _FeathersError14);
|
|
973
969
|
return _createClass(GeneralError);
|
|
974
970
|
}(FeathersError);
|
|
975
971
|
exports.GeneralError = GeneralError;
|
|
976
972
|
// 501 - Not Implemented
|
|
977
973
|
var NotImplemented = /*#__PURE__*/function (_FeathersError15) {
|
|
978
|
-
_inherits(NotImplemented, _FeathersError15);
|
|
979
974
|
function NotImplemented(message, data) {
|
|
980
975
|
_classCallCheck(this, NotImplemented);
|
|
981
976
|
return _callSuper(this, NotImplemented, [message, 'NotImplemented', 501, 'not-implemented', data]);
|
|
982
977
|
}
|
|
978
|
+
_inherits(NotImplemented, _FeathersError15);
|
|
983
979
|
return _createClass(NotImplemented);
|
|
984
980
|
}(FeathersError);
|
|
985
981
|
exports.NotImplemented = NotImplemented;
|
|
986
982
|
// 502 - Bad Gateway
|
|
987
983
|
var BadGateway = /*#__PURE__*/function (_FeathersError16) {
|
|
988
|
-
_inherits(BadGateway, _FeathersError16);
|
|
989
984
|
function BadGateway(message, data) {
|
|
990
985
|
_classCallCheck(this, BadGateway);
|
|
991
986
|
return _callSuper(this, BadGateway, [message, 'BadGateway', 502, 'bad-gateway', data]);
|
|
992
987
|
}
|
|
988
|
+
_inherits(BadGateway, _FeathersError16);
|
|
993
989
|
return _createClass(BadGateway);
|
|
994
990
|
}(FeathersError);
|
|
995
991
|
exports.BadGateway = BadGateway;
|
|
996
992
|
// 503 - Unavailable
|
|
997
993
|
var Unavailable = /*#__PURE__*/function (_FeathersError17) {
|
|
998
|
-
_inherits(Unavailable, _FeathersError17);
|
|
999
994
|
function Unavailable(message, data) {
|
|
1000
995
|
_classCallCheck(this, Unavailable);
|
|
1001
996
|
return _callSuper(this, Unavailable, [message, 'Unavailable', 503, 'unavailable', data]);
|
|
1002
997
|
}
|
|
998
|
+
_inherits(Unavailable, _FeathersError17);
|
|
1003
999
|
return _createClass(Unavailable);
|
|
1004
1000
|
}(FeathersError);
|
|
1005
1001
|
exports.Unavailable = Unavailable;
|
|
@@ -1064,7 +1060,7 @@ exports.convert = convert;
|
|
|
1064
1060
|
|
|
1065
1061
|
|
|
1066
1062
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1067
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw
|
|
1063
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1068
1064
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
1069
1065
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
1070
1066
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -1073,13 +1069,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
1073
1069
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1074
1070
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
1075
1071
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1076
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
1072
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1077
1073
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1078
1074
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1079
1075
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
1076
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1080
1077
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1081
1078
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1082
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1083
1079
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
1084
1080
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1085
1081
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
@@ -1101,7 +1097,6 @@ var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js
|
|
|
1101
1097
|
var hooks_3 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
1102
1098
|
var debug = (0, commons_1.createDebug)('@feathersjs/feathers');
|
|
1103
1099
|
var Feathers = /*#__PURE__*/function (_events_1$EventEmitte) {
|
|
1104
|
-
_inherits(Feathers, _events_1$EventEmitte);
|
|
1105
1100
|
function Feathers() {
|
|
1106
1101
|
var _this;
|
|
1107
1102
|
_classCallCheck(this, Feathers);
|
|
@@ -1111,13 +1106,14 @@ var Feathers = /*#__PURE__*/function (_events_1$EventEmitte) {
|
|
|
1111
1106
|
_this.mixins = [hooks_2.hookMixin, events_2.eventMixin];
|
|
1112
1107
|
_this.version = version_1.default;
|
|
1113
1108
|
_this._isSetup = false;
|
|
1114
|
-
_this.registerHooks = (0, hooks_3.enableHooks)(
|
|
1109
|
+
_this.registerHooks = (0, hooks_3.enableHooks)(_this);
|
|
1115
1110
|
_this.registerHooks({
|
|
1116
1111
|
around: [events_2.eventHook]
|
|
1117
1112
|
});
|
|
1118
1113
|
return _this;
|
|
1119
1114
|
}
|
|
1120
|
-
|
|
1115
|
+
_inherits(Feathers, _events_1$EventEmitte);
|
|
1116
|
+
return _createClass(Feathers, [{
|
|
1121
1117
|
key: "get",
|
|
1122
1118
|
value: function get(name) {
|
|
1123
1119
|
return this.settings[name];
|
|
@@ -1298,7 +1294,6 @@ var Feathers = /*#__PURE__*/function (_events_1$EventEmitte) {
|
|
|
1298
1294
|
return this;
|
|
1299
1295
|
}
|
|
1300
1296
|
}]);
|
|
1301
|
-
return Feathers;
|
|
1302
1297
|
}(events_1.EventEmitter);
|
|
1303
1298
|
exports.Feathers = Feathers;
|
|
1304
1299
|
|
|
@@ -1374,7 +1369,7 @@ exports.eventMixin = eventMixin;
|
|
|
1374
1369
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1375
1370
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
1376
1371
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1377
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
1372
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1378
1373
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1379
1374
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1380
1375
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -1499,7 +1494,6 @@ function createContext(service, method) {
|
|
|
1499
1494
|
}
|
|
1500
1495
|
exports.createContext = createContext;
|
|
1501
1496
|
var FeathersHookManager = /*#__PURE__*/function (_hooks_1$HookManager) {
|
|
1502
|
-
_inherits(FeathersHookManager, _hooks_1$HookManager);
|
|
1503
1497
|
function FeathersHookManager(app, method) {
|
|
1504
1498
|
var _this;
|
|
1505
1499
|
_classCallCheck(this, FeathersHookManager);
|
|
@@ -1509,7 +1503,8 @@ var FeathersHookManager = /*#__PURE__*/function (_hooks_1$HookManager) {
|
|
|
1509
1503
|
_this._middleware = [];
|
|
1510
1504
|
return _this;
|
|
1511
1505
|
}
|
|
1512
|
-
|
|
1506
|
+
_inherits(FeathersHookManager, _hooks_1$HookManager);
|
|
1507
|
+
return _createClass(FeathersHookManager, [{
|
|
1513
1508
|
key: "collectMiddleware",
|
|
1514
1509
|
value: function collectMiddleware(self, args) {
|
|
1515
1510
|
var appHooks = collectHooks(this.app, this.method);
|
|
@@ -1532,7 +1527,6 @@ var FeathersHookManager = /*#__PURE__*/function (_hooks_1$HookManager) {
|
|
|
1532
1527
|
return this;
|
|
1533
1528
|
}
|
|
1534
1529
|
}]);
|
|
1535
|
-
return FeathersHookManager;
|
|
1536
1530
|
}(hooks_1.HookManager);
|
|
1537
1531
|
exports.FeathersHookManager = FeathersHookManager;
|
|
1538
1532
|
function hookMixin(service, path, options) {
|
|
@@ -1667,7 +1661,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
1667
1661
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1668
1662
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1669
1663
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1670
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
1664
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1671
1665
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1672
1666
|
Object.defineProperty(exports, "__esModule", ({
|
|
1673
1667
|
value: true
|
|
@@ -1770,7 +1764,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1770
1764
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1771
1765
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
1772
1766
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1773
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
1767
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1774
1768
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1775
1769
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1776
1770
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -1785,12 +1779,12 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1785
1779
|
exports.AxiosClient = void 0;
|
|
1786
1780
|
var base_1 = __webpack_require__(/*! ./base */ "../rest-client/lib/base.js");
|
|
1787
1781
|
var AxiosClient = /*#__PURE__*/function (_base_1$Base) {
|
|
1788
|
-
_inherits(AxiosClient, _base_1$Base);
|
|
1789
1782
|
function AxiosClient() {
|
|
1790
1783
|
_classCallCheck(this, AxiosClient);
|
|
1791
1784
|
return _callSuper(this, AxiosClient, arguments);
|
|
1792
1785
|
}
|
|
1793
|
-
|
|
1786
|
+
_inherits(AxiosClient, _base_1$Base);
|
|
1787
|
+
return _createClass(AxiosClient, [{
|
|
1794
1788
|
key: "request",
|
|
1795
1789
|
value: function request(options, params) {
|
|
1796
1790
|
var config = Object.assign({
|
|
@@ -1809,7 +1803,6 @@ var AxiosClient = /*#__PURE__*/function (_base_1$Base) {
|
|
|
1809
1803
|
});
|
|
1810
1804
|
}
|
|
1811
1805
|
}]);
|
|
1812
|
-
return AxiosClient;
|
|
1813
1806
|
}(base_1.Base);
|
|
1814
1807
|
exports.AxiosClient = AxiosClient;
|
|
1815
1808
|
|
|
@@ -1828,7 +1821,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1828
1821
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1829
1822
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
1830
1823
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1831
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
1824
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1832
1825
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1833
1826
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
1834
1827
|
return mod && mod.__esModule ? mod : {
|
|
@@ -1856,7 +1849,7 @@ var Base = /*#__PURE__*/function () {
|
|
|
1856
1849
|
this.connection = settings.connection;
|
|
1857
1850
|
this.base = "".concat(settings.base, "/").concat(this.name);
|
|
1858
1851
|
}
|
|
1859
|
-
_createClass(Base, [{
|
|
1852
|
+
return _createClass(Base, [{
|
|
1860
1853
|
key: "makeUrl",
|
|
1861
1854
|
value: function makeUrl(query, id, route) {
|
|
1862
1855
|
var url = this.base;
|
|
@@ -2014,7 +2007,6 @@ var Base = /*#__PURE__*/function () {
|
|
|
2014
2007
|
return this._remove(id, params);
|
|
2015
2008
|
}
|
|
2016
2009
|
}]);
|
|
2017
|
-
return Base;
|
|
2018
2010
|
}();
|
|
2019
2011
|
exports.Base = Base;
|
|
2020
2012
|
|
|
@@ -2033,7 +2025,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2033
2025
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2034
2026
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
2035
2027
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
2036
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
2028
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
2037
2029
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2038
2030
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
2039
2031
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -2049,12 +2041,12 @@ exports.FetchClient = void 0;
|
|
|
2049
2041
|
var errors_1 = __webpack_require__(/*! @feathersjs/errors */ "../errors/lib/index.js");
|
|
2050
2042
|
var base_1 = __webpack_require__(/*! ./base */ "../rest-client/lib/base.js");
|
|
2051
2043
|
var FetchClient = /*#__PURE__*/function (_base_1$Base) {
|
|
2052
|
-
_inherits(FetchClient, _base_1$Base);
|
|
2053
2044
|
function FetchClient() {
|
|
2054
2045
|
_classCallCheck(this, FetchClient);
|
|
2055
2046
|
return _callSuper(this, FetchClient, arguments);
|
|
2056
2047
|
}
|
|
2057
|
-
|
|
2048
|
+
_inherits(FetchClient, _base_1$Base);
|
|
2049
|
+
return _createClass(FetchClient, [{
|
|
2058
2050
|
key: "request",
|
|
2059
2051
|
value: function request(options, params) {
|
|
2060
2052
|
var fetchOptions = Object.assign({}, options, params.connection);
|
|
@@ -2086,7 +2078,6 @@ var FetchClient = /*#__PURE__*/function (_base_1$Base) {
|
|
|
2086
2078
|
});
|
|
2087
2079
|
}
|
|
2088
2080
|
}]);
|
|
2089
|
-
return FetchClient;
|
|
2090
2081
|
}(base_1.Base);
|
|
2091
2082
|
exports.FetchClient = FetchClient;
|
|
2092
2083
|
|
|
@@ -2205,7 +2196,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2205
2196
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2206
2197
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
2207
2198
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
2208
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
2199
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
2209
2200
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2210
2201
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
2211
2202
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -2220,12 +2211,12 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2220
2211
|
exports.SuperagentClient = void 0;
|
|
2221
2212
|
var base_1 = __webpack_require__(/*! ./base */ "../rest-client/lib/base.js");
|
|
2222
2213
|
var SuperagentClient = /*#__PURE__*/function (_base_1$Base) {
|
|
2223
|
-
_inherits(SuperagentClient, _base_1$Base);
|
|
2224
2214
|
function SuperagentClient() {
|
|
2225
2215
|
_classCallCheck(this, SuperagentClient);
|
|
2226
2216
|
return _callSuper(this, SuperagentClient, arguments);
|
|
2227
2217
|
}
|
|
2228
|
-
|
|
2218
|
+
_inherits(SuperagentClient, _base_1$Base);
|
|
2219
|
+
return _createClass(SuperagentClient, [{
|
|
2229
2220
|
key: "request",
|
|
2230
2221
|
value: function request(options, params) {
|
|
2231
2222
|
var superagent = this.connection(options.method, options.url).set(this.options.headers || {}).set('Accept', 'application/json').set(params.connection || {}).set(options.headers || {}).type(options.type || 'json');
|
|
@@ -2248,7 +2239,6 @@ var SuperagentClient = /*#__PURE__*/function (_base_1$Base) {
|
|
|
2248
2239
|
});
|
|
2249
2240
|
}
|
|
2250
2241
|
}]);
|
|
2251
|
-
return SuperagentClient;
|
|
2252
2242
|
}(base_1.Base);
|
|
2253
2243
|
exports.SuperagentClient = SuperagentClient;
|
|
2254
2244
|
|
|
@@ -2337,7 +2327,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2337
2327
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2338
2328
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
2339
2329
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
2340
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
2330
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
2341
2331
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2342
2332
|
Object.defineProperty(exports, "__esModule", ({
|
|
2343
2333
|
value: true
|
|
@@ -2385,7 +2375,7 @@ var Service = /*#__PURE__*/function () {
|
|
|
2385
2375
|
this.method = options.method;
|
|
2386
2376
|
addEmitterMethods(this);
|
|
2387
2377
|
}
|
|
2388
|
-
_createClass(Service, [{
|
|
2378
|
+
return _createClass(Service, [{
|
|
2389
2379
|
key: "send",
|
|
2390
2380
|
value: function send(method) {
|
|
2391
2381
|
var _this = this;
|
|
@@ -2394,6 +2384,7 @@ var Service = /*#__PURE__*/function () {
|
|
|
2394
2384
|
}
|
|
2395
2385
|
return new Promise(function (resolve, reject) {
|
|
2396
2386
|
var _this$connection3;
|
|
2387
|
+
var _a, _b;
|
|
2397
2388
|
var route = args.pop();
|
|
2398
2389
|
var path = _this.path;
|
|
2399
2390
|
if (route) {
|
|
@@ -2402,9 +2393,16 @@ var Service = /*#__PURE__*/function () {
|
|
|
2402
2393
|
});
|
|
2403
2394
|
}
|
|
2404
2395
|
args.unshift(method, path);
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2396
|
+
var socketTimeout = ((_a = _this.connection.flags) === null || _a === void 0 ? void 0 : _a.timeout) || ((_b = _this.connection._opts) === null || _b === void 0 ? void 0 : _b.ackTimeout);
|
|
2397
|
+
if (socketTimeout !== undefined) {
|
|
2398
|
+
args.push(function (timeoutError, error, data) {
|
|
2399
|
+
return timeoutError || error ? reject((0, errors_1.convert)(timeoutError || error)) : resolve(data);
|
|
2400
|
+
});
|
|
2401
|
+
} else {
|
|
2402
|
+
args.push(function (error, data) {
|
|
2403
|
+
return error ? reject((0, errors_1.convert)(error)) : resolve(data);
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2408
2406
|
debug("Sending socket.".concat(_this.method), args);
|
|
2409
2407
|
(_this$connection3 = _this.connection)[_this.method].apply(_this$connection3, args);
|
|
2410
2408
|
});
|
|
@@ -2525,7 +2523,6 @@ var Service = /*#__PURE__*/function () {
|
|
|
2525
2523
|
return this.removeListener.apply(this, [name].concat(args));
|
|
2526
2524
|
}
|
|
2527
2525
|
}]);
|
|
2528
|
-
return Service;
|
|
2529
2526
|
}();
|
|
2530
2527
|
exports.Service = Service;
|
|
2531
2528
|
|
|
@@ -4586,7 +4583,7 @@ var defaults = {
|
|
|
4586
4583
|
charset: 'utf-8',
|
|
4587
4584
|
charsetSentinel: false,
|
|
4588
4585
|
comma: false,
|
|
4589
|
-
decodeDotInKeys:
|
|
4586
|
+
decodeDotInKeys: false,
|
|
4590
4587
|
decoder: utils.decode,
|
|
4591
4588
|
delimiter: '&',
|
|
4592
4589
|
depth: 5,
|
|
@@ -5355,6 +5352,10 @@ var decode = function (str, decoder, charset) {
|
|
|
5355
5352
|
}
|
|
5356
5353
|
};
|
|
5357
5354
|
|
|
5355
|
+
var limit = 1024;
|
|
5356
|
+
|
|
5357
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
5358
|
+
|
|
5358
5359
|
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
5359
5360
|
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
5360
5361
|
// It has been adapted here for stricter adherence to RFC 3986
|
|
@@ -5376,45 +5377,54 @@ var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
|
5376
5377
|
}
|
|
5377
5378
|
|
|
5378
5379
|
var out = '';
|
|
5379
|
-
for (var
|
|
5380
|
-
var
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5380
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
5381
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
5382
|
+
var arr = [];
|
|
5383
|
+
|
|
5384
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
5385
|
+
var c = segment.charCodeAt(i);
|
|
5386
|
+
if (
|
|
5387
|
+
c === 0x2D // -
|
|
5388
|
+
|| c === 0x2E // .
|
|
5389
|
+
|| c === 0x5F // _
|
|
5390
|
+
|| c === 0x7E // ~
|
|
5391
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
5392
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
5393
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
5394
|
+
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
5395
|
+
) {
|
|
5396
|
+
arr[arr.length] = segment.charAt(i);
|
|
5397
|
+
continue;
|
|
5398
|
+
}
|
|
5395
5399
|
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
+
if (c < 0x80) {
|
|
5401
|
+
arr[arr.length] = hexTable[c];
|
|
5402
|
+
continue;
|
|
5403
|
+
}
|
|
5400
5404
|
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
+
if (c < 0x800) {
|
|
5406
|
+
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
5407
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
5408
|
+
continue;
|
|
5409
|
+
}
|
|
5405
5410
|
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5411
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
5412
|
+
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
|
|
5413
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
5414
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
5415
|
+
continue;
|
|
5416
|
+
}
|
|
5417
|
+
|
|
5418
|
+
i += 1;
|
|
5419
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
|
|
5420
|
+
|
|
5421
|
+
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
|
|
5422
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
5423
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
5424
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
5409
5425
|
}
|
|
5410
5426
|
|
|
5411
|
-
|
|
5412
|
-
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
5413
|
-
/* eslint operator-linebreak: [2, "before"] */
|
|
5414
|
-
out += hexTable[0xF0 | (c >> 18)]
|
|
5415
|
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
5416
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
5417
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
5427
|
+
out += arr.join('');
|
|
5418
5428
|
}
|
|
5419
5429
|
|
|
5420
5430
|
return out;
|
|
@@ -5772,7 +5782,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5772
5782
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5773
5783
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5774
5784
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5775
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
5785
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5776
5786
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5777
5787
|
Object.defineProperty(exports, "__esModule", ({
|
|
5778
5788
|
value: true
|
|
@@ -5795,7 +5805,7 @@ var BaseHookContext = /*#__PURE__*/function () {
|
|
|
5795
5805
|
});
|
|
5796
5806
|
Object.assign(this, data);
|
|
5797
5807
|
}
|
|
5798
|
-
_createClass(BaseHookContext, [{
|
|
5808
|
+
return _createClass(BaseHookContext, [{
|
|
5799
5809
|
key: "toJSON",
|
|
5800
5810
|
value: function toJSON() {
|
|
5801
5811
|
var _this = this;
|
|
@@ -5811,7 +5821,6 @@ var BaseHookContext = /*#__PURE__*/function () {
|
|
|
5811
5821
|
}, {});
|
|
5812
5822
|
}
|
|
5813
5823
|
}]);
|
|
5814
|
-
return BaseHookContext;
|
|
5815
5824
|
}();
|
|
5816
5825
|
exports.BaseHookContext = BaseHookContext;
|
|
5817
5826
|
var HookManager = /*#__PURE__*/function () {
|
|
@@ -5848,7 +5857,7 @@ var HookManager = /*#__PURE__*/function () {
|
|
|
5848
5857
|
value: void 0
|
|
5849
5858
|
});
|
|
5850
5859
|
}
|
|
5851
|
-
_createClass(HookManager, [{
|
|
5860
|
+
return _createClass(HookManager, [{
|
|
5852
5861
|
key: "parent",
|
|
5853
5862
|
value: function parent(_parent) {
|
|
5854
5863
|
this._parent = _parent;
|
|
@@ -5940,11 +5949,11 @@ var HookManager = /*#__PURE__*/function () {
|
|
|
5940
5949
|
value: function getContextClass() {
|
|
5941
5950
|
var Base = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : BaseHookContext;
|
|
5942
5951
|
var ContextClass = /*#__PURE__*/function (_Base) {
|
|
5943
|
-
_inherits(ContextClass, _Base);
|
|
5944
5952
|
function ContextClass(data) {
|
|
5945
5953
|
_classCallCheck(this, ContextClass);
|
|
5946
5954
|
return _callSuper(this, ContextClass, [data]);
|
|
5947
5955
|
}
|
|
5956
|
+
_inherits(ContextClass, _Base);
|
|
5948
5957
|
return _createClass(ContextClass);
|
|
5949
5958
|
}(Base);
|
|
5950
5959
|
var params = this.getParams();
|
|
@@ -5990,7 +5999,6 @@ var HookManager = /*#__PURE__*/function () {
|
|
|
5990
5999
|
return ctx;
|
|
5991
6000
|
}
|
|
5992
6001
|
}]);
|
|
5993
|
-
return HookManager;
|
|
5994
6002
|
}();
|
|
5995
6003
|
exports.HookManager = HookManager;
|
|
5996
6004
|
function convertOptions() {
|
|
@@ -6322,7 +6330,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
6322
6330
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6323
6331
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6324
6332
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6325
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
6333
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6326
6334
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6327
6335
|
Object.defineProperty(exports, "__esModule", ({
|
|
6328
6336
|
value: true
|