@feathersjs/client 4.5.11 → 4.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.js CHANGED
@@ -12,7 +12,7 @@ return /******/ (function() { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
14
  /***/ "../../node_modules/debug/src/browser.js":
15
- /*!***********************************************!*
15
+ /*!***********************************************!*\
16
16
  !*** ../../node_modules/debug/src/browser.js ***!
17
17
  \***********************************************/
18
18
  /***/ (function(module, exports, __webpack_require__) {
@@ -202,7 +202,7 @@ formatters.j = function (v) {
202
202
  /***/ }),
203
203
 
204
204
  /***/ "../../node_modules/debug/src/common.js":
205
- /*!**********************************************!*
205
+ /*!**********************************************!*\
206
206
  !*** ../../node_modules/debug/src/common.js ***!
207
207
  \**********************************************/
208
208
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
@@ -213,7 +213,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
213
213
 
214
214
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
215
215
 
216
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
216
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
217
217
 
218
218
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
219
219
 
@@ -250,7 +250,7 @@ function setup(env) {
250
250
  createDebug.formatters = {};
251
251
  /**
252
252
  * Selects a color for a debug namespace
253
- * @param {String} namespace The namespace string for the for the debug instance to be colored
253
+ * @param {String} namespace The namespace string for the debug instance to be colored
254
254
  * @return {Number|String} An ANSI color code for the given namespace
255
255
  * @api private
256
256
  */
@@ -278,6 +278,8 @@ function setup(env) {
278
278
  function createDebug(namespace) {
279
279
  var prevTime;
280
280
  var enableOverride = null;
281
+ var namespacesCache;
282
+ var enabledCache;
281
283
 
282
284
  function debug() {
283
285
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -341,7 +343,16 @@ function setup(env) {
341
343
  enumerable: true,
342
344
  configurable: false,
343
345
  get: function get() {
344
- return enableOverride === null ? createDebug.enabled(namespace) : enableOverride;
346
+ if (enableOverride !== null) {
347
+ return enableOverride;
348
+ }
349
+
350
+ if (namespacesCache !== createDebug.namespaces) {
351
+ namespacesCache = createDebug.namespaces;
352
+ enabledCache = createDebug.enabled(namespace);
353
+ }
354
+
355
+ return enabledCache;
345
356
  },
346
357
  set: function set(v) {
347
358
  enableOverride = v;
@@ -371,6 +382,7 @@ function setup(env) {
371
382
 
372
383
  function enable(namespaces) {
373
384
  createDebug.save(namespaces);
385
+ createDebug.namespaces = namespaces;
374
386
  createDebug.names = [];
375
387
  createDebug.skips = [];
376
388
  var i;
@@ -485,7 +497,7 @@ module.exports = setup;
485
497
  /***/ }),
486
498
 
487
499
  /***/ "./src/core.js":
488
- /*!*********************!*
500
+ /*!*********************!*\
489
501
  !*** ./src/core.js ***!
490
502
  \*********************/
491
503
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
@@ -495,7 +507,7 @@ module.exports = __webpack_require__(/*! @feathersjs/feathers */ "../feathers/li
495
507
  /***/ }),
496
508
 
497
509
  /***/ "../commons/lib/hooks.js":
498
- /*!*******************************!*
510
+ /*!*******************************!*\
499
511
  !*** ../commons/lib/hooks.js ***!
500
512
  \*******************************/
501
513
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
@@ -503,7 +515,7 @@ module.exports = __webpack_require__(/*! @feathersjs/feathers */ "../feathers/li
503
515
  "use strict";
504
516
 
505
517
 
506
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
518
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
507
519
 
508
520
  Object.defineProperty(exports, "__esModule", ({
509
521
  value: true
@@ -515,7 +527,7 @@ var utils_1 = __webpack_require__(/*! ./utils */ "../commons/lib/utils.js");
515
527
  var _utils_1$_ = utils_1._,
516
528
  each = _utils_1$_.each,
517
529
  pick = _utils_1$_.pick;
518
- exports.ACTIVATE_HOOKS = utils_1.createSymbol('__feathersActivateHooks');
530
+ exports.ACTIVATE_HOOKS = (0, utils_1.createSymbol)('__feathersActivateHooks');
519
531
 
520
532
  function createHookObject(method) {
521
533
  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -728,7 +740,7 @@ exports.enableHooks = enableHooks;
728
740
  /***/ }),
729
741
 
730
742
  /***/ "../commons/lib/index.js":
731
- /*!*******************************!*
743
+ /*!*******************************!*\
732
744
  !*** ../commons/lib/index.js ***!
733
745
  \*******************************/
734
746
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
@@ -738,12 +750,18 @@ exports.enableHooks = enableHooks;
738
750
 
739
751
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
740
752
  if (k2 === undefined) k2 = k;
741
- Object.defineProperty(o, k2, {
742
- enumerable: true,
743
- get: function get() {
744
- return m[k];
745
- }
746
- });
753
+ var desc = Object.getOwnPropertyDescriptor(m, k);
754
+
755
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
756
+ desc = {
757
+ enumerable: true,
758
+ get: function get() {
759
+ return m[k];
760
+ }
761
+ };
762
+ }
763
+
764
+ Object.defineProperty(o, k2, desc);
747
765
  } : function (o, m, k, k2) {
748
766
  if (k2 === undefined) k2 = k;
749
767
  o[k2] = m[k];
@@ -790,7 +808,7 @@ exports.hooks = hookUtils;
790
808
  /***/ }),
791
809
 
792
810
  /***/ "../commons/lib/utils.js":
793
- /*!*******************************!*
811
+ /*!*******************************!*\
794
812
  !*** ../commons/lib/utils.js ***!
795
813
  \*******************************/
796
814
  /***/ (function(__unused_webpack_module, exports) {
@@ -800,7 +818,7 @@ exports.hooks = hookUtils;
800
818
 
801
819
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
802
820
 
803
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
821
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
804
822
 
805
823
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
806
824
 
@@ -810,7 +828,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
810
828
 
811
829
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
812
830
 
813
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
831
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
814
832
 
815
833
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
816
834
 
@@ -960,7 +978,7 @@ exports.createSymbol = createSymbol;
960
978
  /***/ }),
961
979
 
962
980
  /***/ "../feathers/lib/application.js":
963
- /*!**************************************!*
981
+ /*!**************************************!*\
964
982
  !*** ../feathers/lib/application.js ***!
965
983
  \**************************************/
966
984
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
@@ -1107,7 +1125,7 @@ module.exports = application;
1107
1125
  /***/ }),
1108
1126
 
1109
1127
  /***/ "../feathers/lib/events.js":
1110
- /*!*********************************!*
1128
+ /*!*********************************!*\
1111
1129
  !*** ../feathers/lib/events.js ***!
1112
1130
  \*********************************/
1113
1131
  /***/ (function(module, exports, __webpack_require__) {
@@ -1199,7 +1217,7 @@ module.exports = function () {
1199
1217
  /***/ }),
1200
1218
 
1201
1219
  /***/ "../feathers/lib/hooks/base.js":
1202
- /*!*************************************!*
1220
+ /*!*************************************!*\
1203
1221
  !*** ../feathers/lib/hooks/base.js ***!
1204
1222
  \*************************************/
1205
1223
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
@@ -1244,7 +1262,7 @@ module.exports = [assignArguments, validate];
1244
1262
  /***/ }),
1245
1263
 
1246
1264
  /***/ "../feathers/lib/hooks/index.js":
1247
- /*!**************************************!*
1265
+ /*!**************************************!*\
1248
1266
  !*** ../feathers/lib/hooks/index.js ***!
1249
1267
  \**************************************/
1250
1268
  /***/ (function(module, exports, __webpack_require__) {
@@ -1255,7 +1273,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
1255
1273
 
1256
1274
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1257
1275
 
1258
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
1276
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1259
1277
 
1260
1278
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1261
1279
 
@@ -1455,7 +1473,7 @@ module.exports.activateHooks = function activateHooks(args) {
1455
1473
  /***/ }),
1456
1474
 
1457
1475
  /***/ "../feathers/lib/index.js":
1458
- /*!********************************!*
1476
+ /*!********************************!*\
1459
1477
  !*** ../feathers/lib/index.js ***!
1460
1478
  \********************************/
1461
1479
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
@@ -1487,22 +1505,22 @@ createApplication.ACTIVATE_HOOKS = ACTIVATE_HOOKS;
1487
1505
  createApplication.activateHooks = activateHooks;
1488
1506
  module.exports = createApplication; // For better ES module (TypeScript) compatibility
1489
1507
 
1490
- module.exports.default = createApplication;
1508
+ module.exports["default"] = createApplication;
1491
1509
 
1492
1510
  /***/ }),
1493
1511
 
1494
1512
  /***/ "../feathers/lib/version.js":
1495
- /*!**********************************!*
1513
+ /*!**********************************!*\
1496
1514
  !*** ../feathers/lib/version.js ***!
1497
1515
  \**********************************/
1498
1516
  /***/ (function(module) {
1499
1517
 
1500
- module.exports = '4.5.11';
1518
+ module.exports = 'development';
1501
1519
 
1502
1520
  /***/ }),
1503
1521
 
1504
1522
  /***/ "../../node_modules/events/events.js":
1505
- /*!*******************************************!*
1523
+ /*!*******************************************!*\
1506
1524
  !*** ../../node_modules/events/events.js ***!
1507
1525
  \*******************************************/
1508
1526
  /***/ (function(module) {
@@ -1958,38 +1976,59 @@ function unwrapListeners(arr) {
1958
1976
 
1959
1977
  function once(emitter, name) {
1960
1978
  return new Promise(function (resolve, reject) {
1961
- function eventListener() {
1962
- if (errorListener !== undefined) {
1979
+ function errorListener(err) {
1980
+ emitter.removeListener(name, resolver);
1981
+ reject(err);
1982
+ }
1983
+
1984
+ function resolver() {
1985
+ if (typeof emitter.removeListener === 'function') {
1963
1986
  emitter.removeListener('error', errorListener);
1964
1987
  }
1965
1988
  resolve([].slice.call(arguments));
1966
1989
  };
1967
- var errorListener;
1968
-
1969
- // Adding an error listener is not optional because
1970
- // if an error is thrown on an event emitter we cannot
1971
- // guarantee that the actual event we are waiting will
1972
- // be fired. The result could be a silent way to create
1973
- // memory or file descriptor leaks, which is something
1974
- // we should avoid.
1975
- if (name !== 'error') {
1976
- errorListener = function errorListener(err) {
1977
- emitter.removeListener(name, eventListener);
1978
- reject(err);
1979
- };
1980
1990
 
1981
- emitter.once('error', errorListener);
1991
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
1992
+ if (name !== 'error') {
1993
+ addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
1982
1994
  }
1983
-
1984
- emitter.once(name, eventListener);
1985
1995
  });
1986
1996
  }
1987
1997
 
1998
+ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
1999
+ if (typeof emitter.on === 'function') {
2000
+ eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
2001
+ }
2002
+ }
2003
+
2004
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
2005
+ if (typeof emitter.on === 'function') {
2006
+ if (flags.once) {
2007
+ emitter.once(name, listener);
2008
+ } else {
2009
+ emitter.on(name, listener);
2010
+ }
2011
+ } else if (typeof emitter.addEventListener === 'function') {
2012
+ // EventTarget does not have `error` event semantics like Node
2013
+ // EventEmitters, we do not listen for `error` events here.
2014
+ emitter.addEventListener(name, function wrapListener(arg) {
2015
+ // IE does not have builtin `{ once: true }` support so we
2016
+ // have to do it manually.
2017
+ if (flags.once) {
2018
+ emitter.removeEventListener(name, wrapListener);
2019
+ }
2020
+ listener(arg);
2021
+ });
2022
+ } else {
2023
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
2024
+ }
2025
+ }
2026
+
1988
2027
 
1989
2028
  /***/ }),
1990
2029
 
1991
2030
  /***/ "../../node_modules/ms/index.js":
1992
- /*!**************************************!*
2031
+ /*!**************************************!*\
1993
2032
  !*** ../../node_modules/ms/index.js ***!
1994
2033
  \**************************************/
1995
2034
  /***/ (function(module) {
@@ -2161,7 +2200,7 @@ function plural(ms, msAbs, n, name) {
2161
2200
  /***/ }),
2162
2201
 
2163
2202
  /***/ "../../node_modules/uberproto/lib/proto.js":
2164
- /*!*************************************************!*
2203
+ /*!*************************************************!*\
2165
2204
  !*** ../../node_modules/uberproto/lib/proto.js ***!
2166
2205
  \*************************************************/
2167
2206
  /***/ (function(module, exports) {
@@ -2317,8 +2356,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2317
2356
  /******/ // The require function
2318
2357
  /******/ function __webpack_require__(moduleId) {
2319
2358
  /******/ // Check if module is in cache
2320
- /******/ if(__webpack_module_cache__[moduleId]) {
2321
- /******/ return __webpack_module_cache__[moduleId].exports;
2359
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
2360
+ /******/ if (cachedModule !== undefined) {
2361
+ /******/ return cachedModule.exports;
2322
2362
  /******/ }
2323
2363
  /******/ // Create a new module (and put it into the cache)
2324
2364
  /******/ var module = __webpack_module_cache__[moduleId] = {
@@ -2335,10 +2375,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2335
2375
  /******/ }
2336
2376
  /******/
2337
2377
  /************************************************************************/
2338
- /******/ // module exports must be returned from runtime so entry inlining is disabled
2378
+ /******/
2339
2379
  /******/ // startup
2340
2380
  /******/ // Load entry module and return exports
2341
- /******/ return __webpack_require__("./src/core.js");
2381
+ /******/ // This entry module used 'module' so it can't be inlined
2382
+ /******/ var __webpack_exports__ = __webpack_require__("./src/core.js");
2383
+ /******/
2384
+ /******/ return __webpack_exports__;
2342
2385
  /******/ })()
2343
2386
  ;
2344
2387
  });