@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/CHANGELOG.md +27 -0
- package/dist/authentication.js +82 -54
- package/dist/authentication.js.map +1 -1
- package/dist/authentication.min.js +1 -1
- package/dist/core.js +96 -53
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/feathers.js +1540 -173
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -1
- package/dist/primus.js +36 -20
- package/dist/primus.js.map +1 -1
- package/dist/primus.min.js +1 -1
- package/dist/rest.js +1448 -108
- package/dist/rest.js.map +1 -1
- package/dist/rest.min.js +1 -1
- package/dist/socketio.js +36 -20
- package/dist/socketio.js.map +1 -1
- package/dist/socketio.min.js +1 -1
- package/package.json +21 -21
package/dist/primus.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
|
|
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
|
|
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
|
-
|
|
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/primus.js":
|
|
488
|
-
|
|
500
|
+
/*!***********************!*\
|
|
489
501
|
!*** ./src/primus.js ***!
|
|
490
502
|
\***********************/
|
|
491
503
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
@@ -495,12 +507,12 @@ module.exports = __webpack_require__(/*! @feathersjs/primus-client */ "../primus
|
|
|
495
507
|
/***/ }),
|
|
496
508
|
|
|
497
509
|
/***/ "../errors/lib/index.js":
|
|
498
|
-
|
|
510
|
+
/*!******************************!*\
|
|
499
511
|
!*** ../errors/lib/index.js ***!
|
|
500
512
|
\******************************/
|
|
501
513
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
502
514
|
|
|
503
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
515
|
+
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); }
|
|
504
516
|
|
|
505
517
|
var debug = __webpack_require__(/*! debug */ "../../node_modules/debug/src/browser.js")('@feathersjs/errors');
|
|
506
518
|
|
|
@@ -744,7 +756,7 @@ module.exports = Object.assign({
|
|
|
744
756
|
/***/ }),
|
|
745
757
|
|
|
746
758
|
/***/ "../primus-client/lib/index.js":
|
|
747
|
-
|
|
759
|
+
/*!*************************************!*\
|
|
748
760
|
!*** ../primus-client/lib/index.js ***!
|
|
749
761
|
\*************************************/
|
|
750
762
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
@@ -779,12 +791,12 @@ function primusClient(connection, options) {
|
|
|
779
791
|
}
|
|
780
792
|
|
|
781
793
|
module.exports = primusClient;
|
|
782
|
-
module.exports
|
|
794
|
+
module.exports["default"] = primusClient;
|
|
783
795
|
|
|
784
796
|
/***/ }),
|
|
785
797
|
|
|
786
798
|
/***/ "../transport-commons/client.js":
|
|
787
|
-
|
|
799
|
+
/*!**************************************!*\
|
|
788
800
|
!*** ../transport-commons/client.js ***!
|
|
789
801
|
\**************************************/
|
|
790
802
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
@@ -794,7 +806,7 @@ module.exports = __webpack_require__(/*! ./lib/client */ "../transport-commons/l
|
|
|
794
806
|
/***/ }),
|
|
795
807
|
|
|
796
808
|
/***/ "../transport-commons/lib/client.js":
|
|
797
|
-
|
|
809
|
+
/*!******************************************!*\
|
|
798
810
|
!*** ../transport-commons/lib/client.js ***!
|
|
799
811
|
\******************************************/
|
|
800
812
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
@@ -806,7 +818,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
806
818
|
|
|
807
819
|
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, descriptor.key, descriptor); } }
|
|
808
820
|
|
|
809
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
821
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
810
822
|
|
|
811
823
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
812
824
|
return mod && mod.__esModule ? mod : {
|
|
@@ -823,7 +835,7 @@ var debug_1 = __importDefault(__webpack_require__(/*! debug */ "../../node_modul
|
|
|
823
835
|
|
|
824
836
|
var errors_1 = __webpack_require__(/*! @feathersjs/errors */ "../errors/lib/index.js");
|
|
825
837
|
|
|
826
|
-
var debug = debug_1.default('@feathersjs/transport-commons/client');
|
|
838
|
+
var debug = (0, debug_1.default)('@feathersjs/transport-commons/client');
|
|
827
839
|
var namespacedEmitterMethods = ['addListener', 'emit', 'listenerCount', 'listeners', 'on', 'once', 'prependListener', 'prependOnceListener', 'removeAllListeners', 'removeListener'];
|
|
828
840
|
var otherEmitterMethods = ['eventNames', 'getMaxListeners', 'setMaxListeners'];
|
|
829
841
|
|
|
@@ -895,7 +907,7 @@ var Service = /*#__PURE__*/function () {
|
|
|
895
907
|
}, _this.timeout);
|
|
896
908
|
args.unshift(method, _this.path);
|
|
897
909
|
args.push(function (error, data) {
|
|
898
|
-
error = errors_1.convert(error);
|
|
910
|
+
error = (0, errors_1.convert)(error);
|
|
899
911
|
clearTimeout(timeoutId);
|
|
900
912
|
return error ? reject(error) : resolve(data);
|
|
901
913
|
});
|
|
@@ -974,7 +986,7 @@ exports.Service = Service;
|
|
|
974
986
|
/***/ }),
|
|
975
987
|
|
|
976
988
|
/***/ "../../node_modules/ms/index.js":
|
|
977
|
-
|
|
989
|
+
/*!**************************************!*\
|
|
978
990
|
!*** ../../node_modules/ms/index.js ***!
|
|
979
991
|
\**************************************/
|
|
980
992
|
/***/ (function(module) {
|
|
@@ -1153,8 +1165,9 @@ function plural(ms, msAbs, n, name) {
|
|
|
1153
1165
|
/******/ // The require function
|
|
1154
1166
|
/******/ function __webpack_require__(moduleId) {
|
|
1155
1167
|
/******/ // Check if module is in cache
|
|
1156
|
-
/******/
|
|
1157
|
-
/******/
|
|
1168
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
1169
|
+
/******/ if (cachedModule !== undefined) {
|
|
1170
|
+
/******/ return cachedModule.exports;
|
|
1158
1171
|
/******/ }
|
|
1159
1172
|
/******/ // Create a new module (and put it into the cache)
|
|
1160
1173
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
@@ -1171,10 +1184,13 @@ function plural(ms, msAbs, n, name) {
|
|
|
1171
1184
|
/******/ }
|
|
1172
1185
|
/******/
|
|
1173
1186
|
/************************************************************************/
|
|
1174
|
-
/******/
|
|
1187
|
+
/******/
|
|
1175
1188
|
/******/ // startup
|
|
1176
1189
|
/******/ // Load entry module and return exports
|
|
1177
|
-
/******/
|
|
1190
|
+
/******/ // This entry module used 'module' so it can't be inlined
|
|
1191
|
+
/******/ var __webpack_exports__ = __webpack_require__("./src/primus.js");
|
|
1192
|
+
/******/
|
|
1193
|
+
/******/ return __webpack_exports__;
|
|
1178
1194
|
/******/ })()
|
|
1179
1195
|
;
|
|
1180
1196
|
});
|
package/dist/primus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://feathers/webpack/universalModuleDefinition","webpack://feathers/../node_modules/debug/src/browser.js","webpack://feathers/../node_modules/debug/src/common.js","webpack://feathers/./src/primus.js","webpack://feathers/../errors/lib/index.js","webpack://feathers/../primus-client/lib/index.js","webpack://feathers/../transport-commons/client.js","webpack://feathers/../src/client.ts","webpack://feathers/../node_modules/ms/index.js","webpack://feathers/webpack/bootstrap","webpack://feathers/webpack/startup"],"names":["exports","formatArgs","save","load","useColors","localstorage","warned","console","warn","window","process","type","__nwjs","navigator","userAgent","toLowerCase","match","document","documentElement","style","WebkitAppearance","firebug","exception","table","parseInt","RegExp","$1","args","namespace","module","humanize","diff","c","color","splice","index","lastC","replace","debug","log","namespaces","storage","setItem","removeItem","error","r","getItem","env","DEBUG","localStorage","require","formatters","j","v","JSON","stringify","message","setup","createDebug","default","coerce","disable","enable","enabled","destroy","Object","keys","forEach","key","names","skips","selectColor","hash","i","length","charCodeAt","colors","Math","abs","prevTime","enableOverride","self","curr","Number","Date","ms","prev","unshift","format","formatter","val","call","logFn","apply","extend","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","split","len","push","substr","map","toNamespace","join","name","test","regexp","toString","substring","Error","stack","FeathersError","msg","code","className","data","errors","newData","parse","captureStackTrace","inheritsFrom","Child","Parent","prototype","create","constructor","value","BadRequest","NotAuthenticated","PaymentError","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","Timeout","Conflict","Gone","LengthRequired","Unprocessable","TooManyRequests","GeneralError","NotImplemented","BadGateway","Unavailable","convert","result","assign","Service","primusClient","connection","options","defaultService","method","initialize","app","primus","service"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA;;AAEA;AACA;AACA;AAEAA,kBAAA,GAAqBC,UAArB;AACAD,YAAA,GAAeE,IAAf;AACAF,YAAA,GAAeG,IAAf;AACAH,iBAAA,GAAoBI,SAApB;AACAJ,eAAA,GAAkBK,YAAY,EAA9B;;AACAL,eAAA,GAAmB,YAAM;AACxB,MAAIM,MAAM,GAAG,KAAb;AAEA,SAAO,YAAM;AACZ,QAAI,CAACA,MAAL,EAAa;AACZA,YAAM,GAAG,IAAT;AACAC,aAAO,CAACC,IAAR,CAAa,uIAAb;AACA;AACD,GALD;AAMA,CATiB,EAAlB;AAWA;AACA;AACA;;;AAEAR,cAAA,GAAiB,CAChB,SADgB,EAEhB,SAFgB,EAGhB,SAHgB,EAIhB,SAJgB,EAKhB,SALgB,EAMhB,SANgB,EAOhB,SAPgB,EAQhB,SARgB,EAShB,SATgB,EAUhB,SAVgB,EAWhB,SAXgB,EAYhB,SAZgB,EAahB,SAbgB,EAchB,SAdgB,EAehB,SAfgB,EAgBhB,SAhBgB,EAiBhB,SAjBgB,EAkBhB,SAl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AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;UCjKA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;UCrBA;UACA;UACA;UACA","file":"primus.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"feathers\"] = factory();\n\telse\n\t\troot[\"feathers\"] = factory();\n})(this, function() {\nreturn ","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","module.exports = require('@feathersjs/primus-client');\n","const debug = require('debug')('@feathersjs/errors');\n\nfunction FeathersError (msg, name, code, className, data) {\n msg = msg || 'Error';\n\n let errors;\n let message;\n let newData;\n\n if (msg instanceof Error) {\n message = msg.message || 'Error';\n\n // NOTE (EK): This is typically to handle validation errors\n if (msg.errors) {\n errors = msg.errors;\n }\n } else if (typeof msg === 'object') { // Support plain old objects\n message = msg.message || 'Error';\n data = msg;\n } else { // message is just a string\n message = msg;\n }\n\n if (data) {\n // NOTE(EK): To make sure that we are not messing\n // with immutable data, just make a copy.\n // https://github.com/feathersjs/errors/issues/19\n newData = JSON.parse(JSON.stringify(data));\n\n if (newData.errors) {\n errors = newData.errors;\n delete newData.errors;\n } else if (data.errors) {\n // The errors property from data could be\n // stripped away while cloning resulting newData not to have it\n // For example: when cloning arrays this property\n errors = JSON.parse(JSON.stringify(data.errors));\n }\n }\n\n // NOTE (EK): Babel doesn't support this so\n // we have to pass in the class name manually.\n // this.name = this.constructor.name;\n this.type = 'FeathersError';\n this.name = name;\n this.message = message;\n this.code = code;\n this.className = className;\n this.data = newData;\n this.errors = errors || {};\n\n debug(`${this.name}(${this.code}): ${this.message}`);\n debug(this.errors);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FeathersError);\n } else {\n this.stack = (new Error()).stack;\n }\n}\n\nfunction inheritsFrom (Child, Parent) {\n Child.prototype = Object.create(Parent.prototype);\n Child.prototype.constructor = Child;\n}\n\ninheritsFrom(FeathersError, Error);\n\n// NOTE (EK): A little hack to get around `message` not\n// being included in the default toJSON call.\nObject.defineProperty(FeathersError.prototype, 'toJSON', {\n value: function () {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n className: this.className,\n data: this.data,\n errors: this.errors\n };\n }\n});\n\n// 400 - Bad Request\nfunction BadRequest (message, data) {\n FeathersError.call(this, message, 'BadRequest', 400, 'bad-request', data);\n}\n\ninheritsFrom(BadRequest, FeathersError);\n\n// 401 - Not Authenticated\nfunction NotAuthenticated (message, data) {\n FeathersError.call(this, message, 'NotAuthenticated', 401, 'not-authenticated', data);\n}\n\ninheritsFrom(NotAuthenticated, FeathersError);\n\n// 402 - Payment Error\nfunction PaymentError (message, data) {\n FeathersError.call(this, message, 'PaymentError', 402, 'payment-error', data);\n}\n\ninheritsFrom(PaymentError, FeathersError);\n\n// 403 - Forbidden\nfunction Forbidden (message, data) {\n FeathersError.call(this, message, 'Forbidden', 403, 'forbidden', data);\n}\n\ninheritsFrom(Forbidden, FeathersError);\n\n// 404 - Not Found\nfunction NotFound (message, data) {\n FeathersError.call(this, message, 'NotFound', 404, 'not-found', data);\n}\n\ninheritsFrom(NotFound, FeathersError);\n\n// 405 - Method Not Allowed\nfunction MethodNotAllowed (message, data) {\n FeathersError.call(this, message, 'MethodNotAllowed', 405, 'method-not-allowed', data);\n}\n\ninheritsFrom(MethodNotAllowed, FeathersError);\n\n// 406 - Not Acceptable\nfunction NotAcceptable (message, data) {\n FeathersError.call(this, message, 'NotAcceptable', 406, 'not-acceptable', data);\n}\n\ninheritsFrom(NotAcceptable, FeathersError);\n\n// 408 - Timeout\nfunction Timeout (message, data) {\n FeathersError.call(this, message, 'Timeout', 408, 'timeout', data);\n}\n\ninheritsFrom(Timeout, FeathersError);\n\n// 409 - Conflict\nfunction Conflict (message, data) {\n FeathersError.call(this, message, 'Conflict', 409, 'conflict', data);\n}\n\ninheritsFrom(Conflict, FeathersError);\n\n// 410 - Gone\nfunction Gone (message, data) {\n FeathersError(this, message, 'Gone', 410, 'gone', data);\n}\n\ninheritsFrom(Gone, FeathersError);\n\n// 411 - Length Required\nfunction LengthRequired (message, data) {\n FeathersError.call(this, message, 'LengthRequired', 411, 'length-required', data);\n}\n\ninheritsFrom(LengthRequired, FeathersError);\n\n// 422 Unprocessable\nfunction Unprocessable (message, data) {\n FeathersError.call(this, message, 'Unprocessable', 422, 'unprocessable', data);\n}\n\ninheritsFrom(Unprocessable, FeathersError);\n\n// 429 Too Many Requests\nfunction TooManyRequests (message, data) {\n FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);\n}\n\ninheritsFrom(TooManyRequests, FeathersError);\n\n// 500 - General Error\nfunction GeneralError (message, data) {\n FeathersError.call(this, message, 'GeneralError', 500, 'general-error', data);\n}\n\ninheritsFrom(GeneralError, FeathersError);\n\n// 501 - Not Implemented\nfunction NotImplemented (message, data) {\n FeathersError.call(this, message, 'NotImplemented', 501, 'not-implemented', data);\n}\n\ninheritsFrom(NotImplemented, FeathersError);\n\n// 502 - Bad Gateway\nfunction BadGateway (message, data) {\n FeathersError.call(this, message, 'BadGateway', 502, 'bad-gateway', data);\n}\n\ninheritsFrom(BadGateway, FeathersError);\n\n// 503 - Unavailable\nfunction Unavailable (message, data) {\n FeathersError.call(this, message, 'Unavailable', 503, 'unavailable', data);\n}\n\ninheritsFrom(Unavailable, FeathersError);\n\nconst errors = {\n FeathersError,\n BadRequest,\n NotAuthenticated,\n PaymentError,\n Forbidden,\n NotFound,\n MethodNotAllowed,\n NotAcceptable,\n Timeout,\n Conflict,\n Gone,\n LengthRequired,\n Unprocessable,\n TooManyRequests,\n GeneralError,\n NotImplemented,\n BadGateway,\n Unavailable,\n 400: BadRequest,\n 401: NotAuthenticated,\n 402: PaymentError,\n 403: Forbidden,\n 404: NotFound,\n 405: MethodNotAllowed,\n 406: NotAcceptable,\n 408: Timeout,\n 409: Conflict,\n 410: Gone,\n 411: LengthRequired,\n 422: Unprocessable,\n 429: TooManyRequests,\n 500: GeneralError,\n 501: NotImplemented,\n 502: BadGateway,\n 503: Unavailable\n};\n\nfunction convert (error) {\n if (!error) {\n return error;\n }\n\n const FeathersError = errors[error.name];\n const result = FeathersError\n ? new FeathersError(error.message, error.data)\n : new Error(error.message || error);\n\n if (typeof error === 'object') {\n Object.assign(result, error);\n }\n\n return result;\n}\n\nmodule.exports = Object.assign({ convert }, errors);\n","const Service = require('@feathersjs/transport-commons/client');\n\nfunction primusClient (connection, options) {\n if (!connection) {\n throw new Error('Primus connection needs to be provided');\n }\n\n const defaultService = function (name) {\n return new Service(Object.assign({}, options, {\n name,\n connection,\n method: 'send'\n }));\n };\n\n const initialize = function (app) {\n if (typeof app.defaultService === 'function') {\n throw new Error('Only one default client provider can be configured');\n }\n\n app.primus = connection;\n app.defaultService = defaultService;\n };\n\n initialize.Service = Service;\n initialize.service = defaultService;\n\n return initialize;\n}\n\nmodule.exports = primusClient;\nmodule.exports.default = primusClient;\n","module.exports = require('./lib/client').Service;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Service = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst errors_1 = require(\"@feathersjs/errors\");\nconst debug = debug_1.default('@feathersjs/transport-commons/client');\nconst namespacedEmitterMethods = [\n 'addListener',\n 'emit',\n 'listenerCount',\n 'listeners',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n 'removeAllListeners',\n 'removeListener'\n];\nconst otherEmitterMethods = [\n 'eventNames',\n 'getMaxListeners',\n 'setMaxListeners'\n];\nconst addEmitterMethods = (service) => {\n otherEmitterMethods.forEach(method => {\n service[method] = function (...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n return this.connection[method](...args);\n };\n });\n // Methods that should add the namespace (service path)\n namespacedEmitterMethods.forEach(method => {\n service[method] = function (name, ...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n const eventName = `${this.path} ${name}`;\n debug(`Calling emitter method ${method} with ` +\n `namespaced event '${eventName}'`);\n const result = this.connection[method](eventName, ...args);\n return result === this.connection ? this : result;\n };\n });\n};\nclass Service {\n constructor(options) {\n this.events = options.events;\n this.path = options.name;\n this.connection = options.connection;\n this.method = options.method;\n this.timeout = options.timeout || 5000;\n addEmitterMethods(this);\n }\n send(method, ...args) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => reject(new errors_1.Timeout(`Timeout of ${this.timeout}ms exceeded calling ${method} on ${this.path}`, {\n timeout: this.timeout,\n method,\n path: this.path\n })), this.timeout);\n args.unshift(method, this.path);\n args.push(function (error, data) {\n error = errors_1.convert(error);\n clearTimeout(timeoutId);\n return error ? reject(error) : resolve(data);\n });\n debug(`Sending socket.${this.method}`, args);\n this.connection[this.method](...args);\n });\n }\n find(params = {}) {\n return this.send('find', params.query || {});\n }\n get(id, params = {}) {\n return this.send('get', id, params.query || {});\n }\n create(data, params = {}) {\n return this.send('create', data, params.query || {});\n }\n update(id, data, params = {}) {\n return this.send('update', id, data, params.query || {});\n }\n patch(id, data, params = {}) {\n return this.send('patch', id, data, params.query || {});\n }\n remove(id, params = {}) {\n return this.send('remove', id, params.query || {});\n }\n // `off` is actually not part of the Node event emitter spec\n // but we are adding it since everybody is expecting it because\n // of the emitter-component Socket.io is using\n off(name, ...args) {\n if (typeof this.connection.off === 'function') {\n const result = this.connection.off(`${this.path} ${name}`, ...args);\n return result === this.connection ? this : result;\n }\n else if (args.length === 0) {\n // @ts-ignore\n return this.removeAllListeners(name);\n }\n // @ts-ignore\n return this.removeListener(name, ...args);\n }\n}\nexports.Service = Service;\n//# sourceMappingURL=client.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./src/primus.js\");\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"primus.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA;;AAEA;AACA;AACA;AAEAA,kBAAA,GAAqBC,UAArB;AACAD,YAAA,GAAeE,IAAf;AACAF,YAAA,GAAeG,IAAf;AACAH,iBAAA,GAAoBI,SAApB;AACAJ,eAAA,GAAkBM,YAAY,EAA9B;;AACAN,eAAA,GAAmB,YAAM;AACxB,MAAIQ,MAAM,GAAG,KAAb;AAEA,SAAO,YAAM;AACZ,QAAI,CAACA,MAAL,EAAa;AACZA,MAAAA,MAAM,GAAG,IAAT;AACAC,MAAAA,OAAO,CAACC,IAAR,CAAa,uIAAb;AACA;AACD,GALD;AAMA,CATiB,EAAlB;AAWA;AACA;AACA;;;AAEAV,cAAA,GAAiB,CAChB,SADgB,EAEhB,SAFgB,EAGhB,SAHgB,EAIhB,SAJgB,EAKhB,SALgB,EAMhB,SANgB,EAOhB,SAPgB,EAQhB,SARgB,EAShB,SATgB,EAUhB,SAVgB,EAWhB,SAXgB,EAYhB,SAZgB,EAahB,SAbgB,EAchB,SAdgB,EAehB,SAfgB,EAgBhB,SAhBgB,EAiBhB,SAjBgB,EAkBhB,SAlBgB,EAmBhB,SAnBgB,EAoBhB,SApBgB,EAqBhB,SArBgB,EAsBhB,SAtBgB,EAuBhB,SAvBgB,EAwBhB,SAxBgB,EAyBhB,SAzBgB,EA0BhB,SA1BgB,EA2BhB,SA3BgB,EA4BhB,SA5BgB,EA6BhB,SA7BgB,EA8BhB,SA9BgB,EA+BhB,SA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;UCjKA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://feathers/webpack/universalModuleDefinition","webpack://feathers/../../node_modules/debug/src/browser.js","webpack://feathers/../../node_modules/debug/src/common.js","webpack://feathers/./src/primus.js","webpack://feathers/../errors/lib/index.js","webpack://feathers/../primus-client/lib/index.js","webpack://feathers/../transport-commons/client.js","webpack://feathers/../src/client.ts","webpack://feathers/../../node_modules/ms/index.js","webpack://feathers/webpack/bootstrap","webpack://feathers/webpack/before-startup","webpack://feathers/webpack/startup","webpack://feathers/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"feathers\"] = factory();\n\telse\n\t\troot[\"feathers\"] = factory();\n})(this, function() {\nreturn ","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","module.exports = require('@feathersjs/primus-client');\n","const debug = require('debug')('@feathersjs/errors');\n\nfunction FeathersError (msg, name, code, className, data) {\n msg = msg || 'Error';\n\n let errors;\n let message;\n let newData;\n\n if (msg instanceof Error) {\n message = msg.message || 'Error';\n\n // NOTE (EK): This is typically to handle validation errors\n if (msg.errors) {\n errors = msg.errors;\n }\n } else if (typeof msg === 'object') { // Support plain old objects\n message = msg.message || 'Error';\n data = msg;\n } else { // message is just a string\n message = msg;\n }\n\n if (data) {\n // NOTE(EK): To make sure that we are not messing\n // with immutable data, just make a copy.\n // https://github.com/feathersjs/errors/issues/19\n newData = JSON.parse(JSON.stringify(data));\n\n if (newData.errors) {\n errors = newData.errors;\n delete newData.errors;\n } else if (data.errors) {\n // The errors property from data could be\n // stripped away while cloning resulting newData not to have it\n // For example: when cloning arrays this property\n errors = JSON.parse(JSON.stringify(data.errors));\n }\n }\n\n // NOTE (EK): Babel doesn't support this so\n // we have to pass in the class name manually.\n // this.name = this.constructor.name;\n this.type = 'FeathersError';\n this.name = name;\n this.message = message;\n this.code = code;\n this.className = className;\n this.data = newData;\n this.errors = errors || {};\n\n debug(`${this.name}(${this.code}): ${this.message}`);\n debug(this.errors);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FeathersError);\n } else {\n this.stack = (new Error()).stack;\n }\n}\n\nfunction inheritsFrom (Child, Parent) {\n Child.prototype = Object.create(Parent.prototype);\n Child.prototype.constructor = Child;\n}\n\ninheritsFrom(FeathersError, Error);\n\n// NOTE (EK): A little hack to get around `message` not\n// being included in the default toJSON call.\nObject.defineProperty(FeathersError.prototype, 'toJSON', {\n value: function () {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n className: this.className,\n data: this.data,\n errors: this.errors\n };\n }\n});\n\n// 400 - Bad Request\nfunction BadRequest (message, data) {\n FeathersError.call(this, message, 'BadRequest', 400, 'bad-request', data);\n}\n\ninheritsFrom(BadRequest, FeathersError);\n\n// 401 - Not Authenticated\nfunction NotAuthenticated (message, data) {\n FeathersError.call(this, message, 'NotAuthenticated', 401, 'not-authenticated', data);\n}\n\ninheritsFrom(NotAuthenticated, FeathersError);\n\n// 402 - Payment Error\nfunction PaymentError (message, data) {\n FeathersError.call(this, message, 'PaymentError', 402, 'payment-error', data);\n}\n\ninheritsFrom(PaymentError, FeathersError);\n\n// 403 - Forbidden\nfunction Forbidden (message, data) {\n FeathersError.call(this, message, 'Forbidden', 403, 'forbidden', data);\n}\n\ninheritsFrom(Forbidden, FeathersError);\n\n// 404 - Not Found\nfunction NotFound (message, data) {\n FeathersError.call(this, message, 'NotFound', 404, 'not-found', data);\n}\n\ninheritsFrom(NotFound, FeathersError);\n\n// 405 - Method Not Allowed\nfunction MethodNotAllowed (message, data) {\n FeathersError.call(this, message, 'MethodNotAllowed', 405, 'method-not-allowed', data);\n}\n\ninheritsFrom(MethodNotAllowed, FeathersError);\n\n// 406 - Not Acceptable\nfunction NotAcceptable (message, data) {\n FeathersError.call(this, message, 'NotAcceptable', 406, 'not-acceptable', data);\n}\n\ninheritsFrom(NotAcceptable, FeathersError);\n\n// 408 - Timeout\nfunction Timeout (message, data) {\n FeathersError.call(this, message, 'Timeout', 408, 'timeout', data);\n}\n\ninheritsFrom(Timeout, FeathersError);\n\n// 409 - Conflict\nfunction Conflict (message, data) {\n FeathersError.call(this, message, 'Conflict', 409, 'conflict', data);\n}\n\ninheritsFrom(Conflict, FeathersError);\n\n// 410 - Gone\nfunction Gone (message, data) {\n FeathersError(this, message, 'Gone', 410, 'gone', data);\n}\n\ninheritsFrom(Gone, FeathersError);\n\n// 411 - Length Required\nfunction LengthRequired (message, data) {\n FeathersError.call(this, message, 'LengthRequired', 411, 'length-required', data);\n}\n\ninheritsFrom(LengthRequired, FeathersError);\n\n// 422 Unprocessable\nfunction Unprocessable (message, data) {\n FeathersError.call(this, message, 'Unprocessable', 422, 'unprocessable', data);\n}\n\ninheritsFrom(Unprocessable, FeathersError);\n\n// 429 Too Many Requests\nfunction TooManyRequests (message, data) {\n FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);\n}\n\ninheritsFrom(TooManyRequests, FeathersError);\n\n// 500 - General Error\nfunction GeneralError (message, data) {\n FeathersError.call(this, message, 'GeneralError', 500, 'general-error', data);\n}\n\ninheritsFrom(GeneralError, FeathersError);\n\n// 501 - Not Implemented\nfunction NotImplemented (message, data) {\n FeathersError.call(this, message, 'NotImplemented', 501, 'not-implemented', data);\n}\n\ninheritsFrom(NotImplemented, FeathersError);\n\n// 502 - Bad Gateway\nfunction BadGateway (message, data) {\n FeathersError.call(this, message, 'BadGateway', 502, 'bad-gateway', data);\n}\n\ninheritsFrom(BadGateway, FeathersError);\n\n// 503 - Unavailable\nfunction Unavailable (message, data) {\n FeathersError.call(this, message, 'Unavailable', 503, 'unavailable', data);\n}\n\ninheritsFrom(Unavailable, FeathersError);\n\nconst errors = {\n FeathersError,\n BadRequest,\n NotAuthenticated,\n PaymentError,\n Forbidden,\n NotFound,\n MethodNotAllowed,\n NotAcceptable,\n Timeout,\n Conflict,\n Gone,\n LengthRequired,\n Unprocessable,\n TooManyRequests,\n GeneralError,\n NotImplemented,\n BadGateway,\n Unavailable,\n 400: BadRequest,\n 401: NotAuthenticated,\n 402: PaymentError,\n 403: Forbidden,\n 404: NotFound,\n 405: MethodNotAllowed,\n 406: NotAcceptable,\n 408: Timeout,\n 409: Conflict,\n 410: Gone,\n 411: LengthRequired,\n 422: Unprocessable,\n 429: TooManyRequests,\n 500: GeneralError,\n 501: NotImplemented,\n 502: BadGateway,\n 503: Unavailable\n};\n\nfunction convert (error) {\n if (!error) {\n return error;\n }\n\n const FeathersError = errors[error.name];\n const result = FeathersError\n ? new FeathersError(error.message, error.data)\n : new Error(error.message || error);\n\n if (typeof error === 'object') {\n Object.assign(result, error);\n }\n\n return result;\n}\n\nmodule.exports = Object.assign({ convert }, errors);\n","const Service = require('@feathersjs/transport-commons/client');\n\nfunction primusClient (connection, options) {\n if (!connection) {\n throw new Error('Primus connection needs to be provided');\n }\n\n const defaultService = function (name) {\n return new Service(Object.assign({}, options, {\n name,\n connection,\n method: 'send'\n }));\n };\n\n const initialize = function (app) {\n if (typeof app.defaultService === 'function') {\n throw new Error('Only one default client provider can be configured');\n }\n\n app.primus = connection;\n app.defaultService = defaultService;\n };\n\n initialize.Service = Service;\n initialize.service = defaultService;\n\n return initialize;\n}\n\nmodule.exports = primusClient;\nmodule.exports.default = primusClient;\n","module.exports = require('./lib/client').Service;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Service = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst errors_1 = require(\"@feathersjs/errors\");\nconst debug = (0, debug_1.default)('@feathersjs/transport-commons/client');\nconst namespacedEmitterMethods = [\n 'addListener',\n 'emit',\n 'listenerCount',\n 'listeners',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n 'removeAllListeners',\n 'removeListener'\n];\nconst otherEmitterMethods = [\n 'eventNames',\n 'getMaxListeners',\n 'setMaxListeners'\n];\nconst addEmitterMethods = (service) => {\n otherEmitterMethods.forEach(method => {\n service[method] = function (...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n return this.connection[method](...args);\n };\n });\n // Methods that should add the namespace (service path)\n namespacedEmitterMethods.forEach(method => {\n service[method] = function (name, ...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n const eventName = `${this.path} ${name}`;\n debug(`Calling emitter method ${method} with ` +\n `namespaced event '${eventName}'`);\n const result = this.connection[method](eventName, ...args);\n return result === this.connection ? this : result;\n };\n });\n};\nclass Service {\n constructor(options) {\n this.events = options.events;\n this.path = options.name;\n this.connection = options.connection;\n this.method = options.method;\n this.timeout = options.timeout || 5000;\n addEmitterMethods(this);\n }\n send(method, ...args) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => reject(new errors_1.Timeout(`Timeout of ${this.timeout}ms exceeded calling ${method} on ${this.path}`, {\n timeout: this.timeout,\n method,\n path: this.path\n })), this.timeout);\n args.unshift(method, this.path);\n args.push(function (error, data) {\n error = (0, errors_1.convert)(error);\n clearTimeout(timeoutId);\n return error ? reject(error) : resolve(data);\n });\n debug(`Sending socket.${this.method}`, args);\n this.connection[this.method](...args);\n });\n }\n find(params = {}) {\n return this.send('find', params.query || {});\n }\n get(id, params = {}) {\n return this.send('get', id, params.query || {});\n }\n create(data, params = {}) {\n return this.send('create', data, params.query || {});\n }\n update(id, data, params = {}) {\n return this.send('update', id, data, params.query || {});\n }\n patch(id, data, params = {}) {\n return this.send('patch', id, data, params.query || {});\n }\n remove(id, params = {}) {\n return this.send('remove', id, params.query || {});\n }\n // `off` is actually not part of the Node event emitter spec\n // but we are adding it since everybody is expecting it because\n // of the emitter-component Socket.io is using\n off(name, ...args) {\n if (typeof this.connection.off === 'function') {\n const result = this.connection.off(`${this.path} ${name}`, ...args);\n return result === this.connection ? this : result;\n }\n else if (args.length === 0) {\n // @ts-ignore\n return this.removeAllListeners(name);\n }\n // @ts-ignore\n return this.removeListener(name, ...args);\n }\n}\nexports.Service = Service;\n//# sourceMappingURL=client.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module used 'module' so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/primus.js\");\n",""],"names":["exports","formatArgs","save","load","useColors","storage","localstorage","destroy","warned","console","warn","colors","window","process","type","__nwjs","navigator","userAgent","toLowerCase","match","document","documentElement","style","WebkitAppearance","firebug","exception","table","parseInt","RegExp","$1","args","namespace","module","humanize","diff","c","color","splice","index","lastC","replace","log","debug","namespaces","setItem","removeItem","error","r","getItem","env","DEBUG","localStorage","require","formatters","j","v","JSON","stringify","message","setup","createDebug","default","coerce","disable","enable","enabled","Object","keys","forEach","key","names","skips","selectColor","hash","i","length","charCodeAt","Math","abs","prevTime","enableOverride","namespacesCache","enabledCache","self","curr","Number","Date","ms","prev","unshift","format","formatter","val","call","logFn","apply","extend","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","split","len","push","substr","map","toNamespace","join","name","test","regexp","toString","substring","Error","stack","FeathersError","msg","code","className","data","errors","newData","parse","captureStackTrace","inheritsFrom","Child","Parent","prototype","create","constructor","value","BadRequest","NotAuthenticated","PaymentError","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","Timeout","Conflict","Gone","LengthRequired","Unprocessable","TooManyRequests","GeneralError","NotImplemented","BadGateway","Unavailable","convert","result","assign","Service","primusClient","connection","options","defaultService","method","initialize","app","primus","service"],"sourceRoot":""}
|
package/dist/primus.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return e={898:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(604)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},604:function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){function t(e){var n,r=null;function s(){for(var e,r,o,i,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];s.enabled&&(e=s,o=(r=Number(new Date))-(n||r),e.diff=o,e.prev=n,e.curr=r,n=r,c[0]=t.coerce(c[0]),"string"!=typeof c[0]&&c.unshift("%O"),c[i=0]=c[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return"%";i++;var o=t.formatters[r];return"function"==typeof o&&(r=c[i],n=o.call(e,r),c.splice(i,1),i--),n})),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=o,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null===r?t.enabled(e):r},set:function(e){r=e}}),"function"==typeof t.init&&t.init(s),s}function o(e,n){return(e=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,e}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(r(t.names.map(s)),r(t.skips.map(s).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},285:function(e,t,n){e.exports=n(849)},441:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(898)("@feathersjs/errors");function s(e,t,n,i,a){var c,u,l;(e=e||"Error")instanceof Error?(u=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(u=e.message||"Error",a=e):u=e,a&&((l=JSON.parse(JSON.stringify(a))).errors?(c=l.errors,delete l.errors):a.errors&&(c=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=u,this.code=n,this.className=i,this.data=l,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,s):this.stack=(new Error).stack}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(e,t){s.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){s.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function u(e,t){s.call(this,e,"PaymentError",402,"payment-error",t)}function l(e,t){s.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){s.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){s.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){s.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function p(e,t){s.call(this,e,"Timeout",408,"timeout",t)}function m(e,t){s.call(this,e,"Conflict",409,"conflict",t)}function C(e,t){s(this,e,"Gone",410,"gone")}function y(e,t){s.call(this,e,"LengthRequired",411,"length-required",t)}function g(e,t){s.call(this,e,"Unprocessable",422,"unprocessable",t)}function v(e,t){s.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){s.call(this,e,"GeneralError",500,"general-error",t)}function F(e,t){s.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){s.call(this,e,"BadGateway",502,"bad-gateway",t)}function E(e,t){s.call(this,e,"Unavailable",503,"unavailable",t)}i(s,Error),Object.defineProperty(s.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),i(a,s),i(c,s),i(u,s),i(l,s),i(f,s),i(d,s),i(h,s),i(p,s),i(m,s),i(C,s),i(y,s),i(g,s),i(v,s),i(b,s),i(F,s),i(w,s),i(E,s);var x={FeathersError:s,BadRequest:a,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:p,Conflict:m,Gone:C,LengthRequired:y,Unprocessable:g,TooManyRequests:v,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:E,400:a,401:c,402:u,403:l,404:f,405:d,406:h,408:p,409:m,410:C,411:y,422:g,429:v,500:b,501:F,502:w,503:E};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=(t=x[e.name])?new t(e.message,e.data):new Error(e.message||e);return"object"===r(e)&&Object.assign(t,e),t}},x)},849:function(e,t,n){var r=n(910);function o(e,t){if(!e)throw new Error("Primus connection needs to be provided");function n(n){return new r(Object.assign({},t,{name:n,connection:e,method:"send"}))}function o(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.primus=e,t.defaultService=n}return o.Service=r,o.service=n,o}e.exports=o,e.exports.default=o},910:function(e,t,n){e.exports=n(4).Service},4:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,r=r(n(898));var o=n(441),s=r.default("@feathersjs/transport-commons/client"),i=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],a=["eventNames","getMaxListeners","setMaxListeners"];r=function(){function e(t){!function(t){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,function(e){a.forEach((function(t){e[t]=function(){var e;if("function"!=typeof this.connection[t])throw new Error("Can not call '".concat(t,"' on the client service connection"));return(e=this.connection)[t].apply(e,arguments)}})),i.forEach((function(t){e[t]=function(e){if("function"!=typeof this.connection[t])throw new Error("Can not call '".concat(t,"' on the client service connection"));var n="".concat(this.path," ").concat(e);s("Calling emitter method ".concat(t," with ")+"namespaced event '".concat(n,"'"));for(var r=arguments.length,o=new Array(1<r?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return(n=(e=this.connection)[t].apply(e,[n].concat(o)))===this.connection?this:n}}))}(this)}var t;return(t=[{key:"send",value:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new Promise((function(n,i){var a,c=setTimeout((function(){return i(new o.Timeout("Timeout of ".concat(t.timeout,"ms exceeded calling ").concat(e," on ").concat(t.path),{timeout:t.timeout,method:e,path:t.path}))}),t.timeout);r.unshift(e,t.path),r.push((function(e,t){return e=o.convert(e),clearTimeout(c),e?i(e):n(t)})),s("Sending socket.".concat(t.method),r),(a=t.connection)[t.method].apply(a,r)}))}},{key:"find",value:function(e){return e=0<arguments.length&&void 0!==e?e:{},this.send("find",e.query||{})}},{key:"get",value:function(e,t){return t=1<arguments.length&&void 0!==t?t:{},this.send("get",e,t.query||{})}},{key:"create",value:function(e,t){return t=1<arguments.length&&void 0!==t?t:{},this.send("create",e,t.query||{})}},{key:"update",value:function(e,t,n){return n=2<arguments.length&&void 0!==n?n:{},this.send("update",e,t,n.query||{})}},{key:"patch",value:function(e,t,n){return n=2<arguments.length&&void 0!==n?n:{},this.send("patch",e,t,n.query||{})}},{key:"remove",value:function(e,t){return t=1<arguments.length&&void 0!==t?t:{},this.send("remove",e,t.query||{})}},{key:"off",value:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"!=typeof this.connection.off?0===n.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(n)):(e=(o=this.connection).off.apply(o,["".concat(this.path," ").concat(e)].concat(n)))===this.connection?this:e;var o}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),t.Service=r},378:function(e){var t=36e5,n=864e5;function r(e,t,n,r){return t=1.5*n<=t,Math.round(e/n)+" "+r+(t?"s":"")}e.exports=function(e,o){o=o||{};var s=typeof e;if("string"==s&&0<e.length)return function(e){if(!(100<(e=String(e)).length)&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e))){var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*n;case"hours":case"hour":case"hrs":case"hr":case"h":return r*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}(e);if("number"==s&&isFinite(e))return(o.long?function(e){var o=Math.abs(e);return n<=o?r(e,o,n,"day"):t<=o?r(e,o,t,"hour"):6e4<=o?r(e,o,6e4,"minute"):1e3<=o?r(e,o,1e3,"second"):e+" ms"}:function(e){var r=Math.abs(e);return n<=r?Math.round(e/n)+"d":t<=r?Math.round(e/t)+"h":6e4<=r?Math.round(e/6e4)+"m":1e3<=r?Math.round(e/1e3)+"s":e+"ms"})(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={},function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(285);var e,t}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return e={898:function(e,t,n){var r;t.formatArgs=function(t){var n,r,o;t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors&&(n="color: "+this.color,t.splice(1,0,n,"color: inherit"),t[o=r=0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n))},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(604)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},604:function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){function t(e){var n,r,s,a=null;function i(){for(var e,r,o,s,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];i.enabled&&(e=i,o=(r=Number(new Date))-(n||r),e.diff=o,e.prev=n,e.curr=r,n=r,c[0]=t.coerce(c[0]),"string"!=typeof c[0]&&c.unshift("%O"),c[s=0]=c[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return"%";s++;var o=t.formatters[r];return"function"==typeof o&&(r=c[s],n=o.call(e,r),c.splice(s,1),s--),n})),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=o,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,s=t.enabled(e)),s)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(i),i}function o(e,n){return(e=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,e}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(r(t.names.map(s)),r(t.skips.map(s).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},285:function(e,t,n){e.exports=n(849)},441:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(898)("@feathersjs/errors");function s(e,t,n,a,i){var c,u,l;(e=e||"Error")instanceof Error?(u=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(u=e.message||"Error",i=e):u=e,i&&((l=JSON.parse(JSON.stringify(i))).errors?(c=l.errors,delete l.errors):i.errors&&(c=JSON.parse(JSON.stringify(i.errors)))),this.type="FeathersError",this.name=t,this.message=u,this.code=n,this.className=a,this.data=l,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,s):this.stack=(new Error).stack}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function i(e,t){s.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){s.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function u(e,t){s.call(this,e,"PaymentError",402,"payment-error",t)}function l(e,t){s.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){s.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){s.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){s.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function p(e,t){s.call(this,e,"Timeout",408,"timeout",t)}function m(e,t){s.call(this,e,"Conflict",409,"conflict",t)}function C(e,t){s(this,e,"Gone",410,"gone")}function y(e,t){s.call(this,e,"LengthRequired",411,"length-required",t)}function g(e,t){s.call(this,e,"Unprocessable",422,"unprocessable",t)}function v(e,t){s.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){s.call(this,e,"GeneralError",500,"general-error",t)}function F(e,t){s.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){s.call(this,e,"BadGateway",502,"bad-gateway",t)}function E(e,t){s.call(this,e,"Unavailable",503,"unavailable",t)}a(s,Error),Object.defineProperty(s.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),a(i,s),a(c,s),a(u,s),a(l,s),a(f,s),a(d,s),a(h,s),a(p,s),a(m,s),a(C,s),a(y,s),a(g,s),a(v,s),a(b,s),a(F,s),a(w,s),a(E,s);var x={FeathersError:s,BadRequest:i,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:p,Conflict:m,Gone:C,LengthRequired:y,Unprocessable:g,TooManyRequests:v,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:E,400:i,401:c,402:u,403:l,404:f,405:d,406:h,408:p,409:m,410:C,411:y,422:g,429:v,500:b,501:F,502:w,503:E};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=(t=x[e.name])?new t(e.message,e.data):new Error(e.message||e);return"object"===r(e)&&Object.assign(t,e),t}},x)},849:function(e,t,n){var r=n(910);function o(e,t){if(!e)throw new Error("Primus connection needs to be provided");function n(n){return new r(Object.assign({},t,{name:n,connection:e,method:"send"}))}function o(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.primus=e,t.defaultService=n}return o.Service=r,o.service=n,o}e.exports=o,e.exports.default=o},910:function(e,t,n){e.exports=n(4).Service},4:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,r=r(n(898));var o=n(441),s=(0,r.default)("@feathersjs/transport-commons/client"),a=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],i=["eventNames","getMaxListeners","setMaxListeners"];r=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,n=this,i.forEach((function(e){n[e]=function(){var t;if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));return(t=this.connection)[e].apply(t,arguments)}})),a.forEach((function(e){n[e]=function(t){if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));var n="".concat(this.path," ").concat(t);s("Calling emitter method ".concat(e," with ")+"namespaced event '".concat(n,"'"));for(var r=arguments.length,o=new Array(1<r?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return(n=(t=this.connection)[e].apply(t,[n].concat(o)))===this.connection?this:n}}))}var t,n;return t=e,(n=[{key:"send",value:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new Promise((function(n,a){var i,c=setTimeout((function(){return a(new o.Timeout("Timeout of ".concat(t.timeout,"ms exceeded calling ").concat(e," on ").concat(t.path),{timeout:t.timeout,method:e,path:t.path}))}),t.timeout);r.unshift(e,t.path),r.push((function(e,t){return e=(0,o.convert)(e),clearTimeout(c),e?a(e):n(t)})),s("Sending socket.".concat(t.method),r),(i=t.connection)[t.method].apply(i,r)}))}},{key:"find",value:function(){return this.send("find",(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).query||{})}},{key:"get",value:function(e){return this.send("get",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"create",value:function(e){return this.send("create",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"update",value:function(e,t){return this.send("update",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"patch",value:function(e,t){return this.send("patch",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"remove",value:function(e){return this.send("remove",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"off",value:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"!=typeof this.connection.off?0===n.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(n)):(e=(o=this.connection).off.apply(o,["".concat(this.path," ").concat(e)].concat(n)))===this.connection?this:e;var o}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),t.Service=r},378:function(e){var t=36e5,n=864e5;function r(e,t,n,r){return t=1.5*n<=t,Math.round(e/n)+" "+r+(t?"s":"")}e.exports=function(e,o){o=o||{};var s=typeof e;if("string"==s&&0<e.length)return function(e){if(!(100<(e=String(e)).length)&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e))){var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*n;case"hours":case"hour":case"hrs":case"hr":case"h":return r*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}(e);if("number"==s&&isFinite(e))return(o.long?function(e){var o=Math.abs(e);return n<=o?r(e,o,n,"day"):t<=o?r(e,o,t,"hour"):6e4<=o?r(e,o,6e4,"minute"):1e3<=o?r(e,o,1e3,"second"):e+" ms"}:function(e){var r=Math.abs(e);return n<=r?Math.round(e/n)+"d":t<=r?Math.round(e/t)+"h":6e4<=r?Math.round(e/6e4)+"m":1e3<=r?Math.round(e/1e3)+"s":e+"ms"})(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={},function n(r){var o=t[r];return void 0!==o||(o=t[r]={exports:{}},e[r].call(o.exports,o,o.exports,n)),o.exports}(285);var e,t}));
|