@feathersjs/client 5.0.0-pre.0 → 5.0.0-pre.15
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 +229 -0
- package/README.md +2 -2
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1861 -3627
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/feathers.d.ts +8 -0
- package/dist/feathers.js +5106 -5755
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -1
- package/package.json +44 -38
- package/src/core.ts +1 -0
- package/src/feathers.ts +13 -0
- package/.babelrc +0 -8
- package/.cache/lasso/default/6a3076a5/dependencyFingerprints/cache +0 -0
- package/.cache/lasso/default/6a3076a5/key +0 -1
- package/.cache/lasso/default/6a3076a5/lasso-require/inspect-/5d47a286cdceb98f64bf9128488dd355fde40e81/cache +0 -0
- package/.cache/lasso/default/7be4a25c/dependencyFingerprints/cache +0 -0
- package/.cache/lasso/default/7be4a25c/key +0 -1
- package/.cache/lasso/default/7be4a25c/lasso-require/inspect/cache +0 -0
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/filter-query.js +0 -1998
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/index.js +0 -694
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/service.js +0 -1636
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/sort.js +0 -2259
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/filter-query.js +0 -98
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/index.js +0 -37
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/service.js +0 -94
- package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/sort.js +0 -112
- package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.0/browser/test-run.js +0 -1
- package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.0/browser/test.js +0 -1037
- package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.0/dist/feathers.js +0 -78377
- package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.1/browser/test-run.js +0 -1
- package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.1/browser/test.js +0 -102
- package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.1/dist/feathers.js +0 -5231
- package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.0/lib/hooks.js +0 -2626
- package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.0/lib/index.js +0 -540
- package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.0/lib/utils.js +0 -1991
- package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.1/lib/hooks.js +0 -170
- package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.1/lib/index.js +0 -17
- package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.1/lib/utils.js +0 -102
- package/.mocha-puppeteer/test-page/@feathersjs/errors$4.5.0/lib/index.js +0 -2262
- package/.mocha-puppeteer/test-page/@feathersjs/errors$4.5.1/lib/index.js +0 -251
- package/.mocha-puppeteer/test-page/@feathersjs/tests$4.5.0/lib/client.js +0 -1506
- package/.mocha-puppeteer/test-page/@feathersjs/tests$4.5.1/lib/client.js +0 -83
- package/.mocha-puppeteer/test-page/assert$1.5.0/assert.js +0 -508
- package/.mocha-puppeteer/test-page/debug$4.1.1/src/browser.js +0 -266
- package/.mocha-puppeteer/test-page/debug$4.1.1/src/common.js +0 -268
- package/.mocha-puppeteer/test-page/feathers-memory$4.1.0/lib/index.js +0 -143
- package/.mocha-puppeteer/test-page/inherits$2.0.1/inherits_browser.js +0 -25
- package/.mocha-puppeteer/test-page/lasso-modules-client$2.0.5/src/index.js +0 -592
- package/.mocha-puppeteer/test-page/lasso-modules-meta.js +0 -28
- package/.mocha-puppeteer/test-page/marko$4.18.35/src/runtime/components/boot-run.js +0 -1
- package/.mocha-puppeteer/test-page/marko$4.18.35/src/runtime/components/boot.js +0 -95
- package/.mocha-puppeteer/test-page/marko$4.18.42/src/runtime/components/boot-run.js +0 -1
- package/.mocha-puppeteer/test-page/marko$4.18.42/src/runtime/components/boot.js +0 -95
- package/.mocha-puppeteer/test-page/marko$4.19.0/src/runtime/components/boot-run.js +0 -1
- package/.mocha-puppeteer/test-page/marko$4.19.0/src/runtime/components/boot.js +0 -3
- package/.mocha-puppeteer/test-page/mocha$3.5.3/mocha.css +0 -326
- package/.mocha-puppeteer/test-page/mocha$3.5.3/mocha.js +0 -16590
- package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/run-tests-run.js +0 -1
- package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/run-tests.js +0 -53
- package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/setup-run.js +0 -1
- package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/setup.js +0 -10
- package/.mocha-puppeteer/test-page/ms$2.1.2/index.js +0 -164
- package/.mocha-puppeteer/test-page/object-assign$4.1.1/index.js +0 -92
- package/.mocha-puppeteer/test-page/process$0.11.10/browser.js +0 -186
- package/.mocha-puppeteer/test-page/sift$8.5.1/lib/index.js +0 -738
- package/.mocha-puppeteer/test-page/superagent$3.8.3/superagent.js +0 -2035
- package/.mocha-puppeteer/test-page/util$0.10.3/support/isBufferBrowser.js +0 -7
- package/.mocha-puppeteer/test-page/util$0.10.3/util.js +0 -588
- package/.nyc_output/coverage.json +0 -1
- package/authentication.js +0 -1
- package/dist/authentication.js +0 -2242
- package/dist/authentication.js.map +0 -1
- package/dist/authentication.min.js +0 -1
- package/dist/rest.js +0 -3287
- package/dist/rest.js.map +0 -1
- package/dist/rest.min.js +0 -1
- package/dist/socketio.js +0 -2384
- package/dist/socketio.js.map +0 -1
- package/dist/socketio.min.js +0 -1
- package/index.d.ts +0 -23
- package/index.js +0 -1
- package/rest.js +0 -1
- package/socketio.js +0 -1
- package/webpack.config.js +0 -69
package/dist/socketio.js
DELETED
|
@@ -1,2384 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["feathers"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["feathers"] = factory();
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return /******/ (function(modules) { // webpackBootstrap
|
|
12
|
-
/******/ // The module cache
|
|
13
|
-
/******/ var installedModules = {};
|
|
14
|
-
/******/
|
|
15
|
-
/******/ // The require function
|
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/ }
|
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/ i: moduleId,
|
|
25
|
-
/******/ l: false,
|
|
26
|
-
/******/ exports: {}
|
|
27
|
-
/******/ };
|
|
28
|
-
/******/
|
|
29
|
-
/******/ // Execute the module function
|
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.l = true;
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Return the exports of the module
|
|
36
|
-
/******/ return module.exports;
|
|
37
|
-
/******/ }
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
-
/******/ __webpack_require__.m = modules;
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the module cache
|
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // define getter function for harmony exports
|
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
-
/******/ }
|
|
51
|
-
/******/ };
|
|
52
|
-
/******/
|
|
53
|
-
/******/ // define __esModule on exports
|
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
-
/******/ }
|
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
-
/******/ };
|
|
60
|
-
/******/
|
|
61
|
-
/******/ // create a fake namespace object
|
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
|
65
|
-
/******/ // mode & 8|1: behave like require
|
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
-
/******/ if(mode & 8) return value;
|
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
-
/******/ var ns = Object.create(null);
|
|
71
|
-
/******/ __webpack_require__.r(ns);
|
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
-
/******/ return ns;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
|
81
|
-
/******/ function getModuleExports() { return module; };
|
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
-
/******/ return getter;
|
|
84
|
-
/******/ };
|
|
85
|
-
/******/
|
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // __webpack_public_path__
|
|
90
|
-
/******/ __webpack_require__.p = "";
|
|
91
|
-
/******/
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
|
95
|
-
/******/ })
|
|
96
|
-
/************************************************************************/
|
|
97
|
-
/******/ ({
|
|
98
|
-
|
|
99
|
-
/***/ "../../node_modules/debug/src/browser.js":
|
|
100
|
-
/*!**************************************************************************************!*\
|
|
101
|
-
!*** /Users/daffl/Development/feathersjs/feathers/node_modules/debug/src/browser.js ***!
|
|
102
|
-
\**************************************************************************************/
|
|
103
|
-
/*! no static exports found */
|
|
104
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
105
|
-
|
|
106
|
-
/* WEBPACK VAR INJECTION */(function(process) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
107
|
-
|
|
108
|
-
/* eslint-env browser */
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* This is the web browser implementation of `debug()`.
|
|
112
|
-
*/
|
|
113
|
-
exports.log = log;
|
|
114
|
-
exports.formatArgs = formatArgs;
|
|
115
|
-
exports.save = save;
|
|
116
|
-
exports.load = load;
|
|
117
|
-
exports.useColors = useColors;
|
|
118
|
-
exports.storage = localstorage();
|
|
119
|
-
/**
|
|
120
|
-
* Colors.
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
exports.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'];
|
|
124
|
-
/**
|
|
125
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
126
|
-
* and the Firebug extension (any Firefox version) are known
|
|
127
|
-
* to support "%c" CSS customizations.
|
|
128
|
-
*
|
|
129
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
130
|
-
*/
|
|
131
|
-
// eslint-disable-next-line complexity
|
|
132
|
-
|
|
133
|
-
function useColors() {
|
|
134
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
|
135
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
136
|
-
// explicitly
|
|
137
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
138
|
-
return true;
|
|
139
|
-
} // Internet Explorer and Edge do not support colors.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
143
|
-
return false;
|
|
144
|
-
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
145
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
149
|
-
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
150
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
151
|
-
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
152
|
-
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Colorize log arguments if enabled.
|
|
156
|
-
*
|
|
157
|
-
* @api public
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
function formatArgs(args) {
|
|
162
|
-
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
|
163
|
-
|
|
164
|
-
if (!this.useColors) {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
var c = 'color: ' + this.color;
|
|
169
|
-
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
|
170
|
-
// arguments passed either before or after the %c, so we need to
|
|
171
|
-
// figure out the correct index to insert the CSS into
|
|
172
|
-
|
|
173
|
-
var index = 0;
|
|
174
|
-
var lastC = 0;
|
|
175
|
-
args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
|
176
|
-
if (match === '%%') {
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
index++;
|
|
181
|
-
|
|
182
|
-
if (match === '%c') {
|
|
183
|
-
// We only are interested in the *last* %c
|
|
184
|
-
// (the user may have provided their own)
|
|
185
|
-
lastC = index;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
args.splice(lastC, 0, c);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Invokes `console.log()` when available.
|
|
192
|
-
* No-op when `console.log` is not a "function".
|
|
193
|
-
*
|
|
194
|
-
* @api public
|
|
195
|
-
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
function log() {
|
|
199
|
-
var _console;
|
|
200
|
-
|
|
201
|
-
// This hackery is required for IE8/9, where
|
|
202
|
-
// the `console.log` function doesn't have 'apply'
|
|
203
|
-
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Save `namespaces`.
|
|
207
|
-
*
|
|
208
|
-
* @param {String} namespaces
|
|
209
|
-
* @api private
|
|
210
|
-
*/
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
function save(namespaces) {
|
|
214
|
-
try {
|
|
215
|
-
if (namespaces) {
|
|
216
|
-
exports.storage.setItem('debug', namespaces);
|
|
217
|
-
} else {
|
|
218
|
-
exports.storage.removeItem('debug');
|
|
219
|
-
}
|
|
220
|
-
} catch (error) {// Swallow
|
|
221
|
-
// XXX (@Qix-) should we be logging these?
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Load `namespaces`.
|
|
226
|
-
*
|
|
227
|
-
* @return {String} returns the previously persisted debug modes
|
|
228
|
-
* @api private
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
function load() {
|
|
233
|
-
var r;
|
|
234
|
-
|
|
235
|
-
try {
|
|
236
|
-
r = exports.storage.getItem('debug');
|
|
237
|
-
} catch (error) {} // Swallow
|
|
238
|
-
// XXX (@Qix-) should we be logging these?
|
|
239
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
243
|
-
r = process.env.DEBUG;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return r;
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Localstorage attempts to return the localstorage.
|
|
250
|
-
*
|
|
251
|
-
* This is necessary because safari throws
|
|
252
|
-
* when a user disables cookies/localstorage
|
|
253
|
-
* and you attempt to access it.
|
|
254
|
-
*
|
|
255
|
-
* @return {LocalStorage}
|
|
256
|
-
* @api private
|
|
257
|
-
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
function localstorage() {
|
|
261
|
-
try {
|
|
262
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
263
|
-
// The Browser also has localStorage in the global context.
|
|
264
|
-
return localStorage;
|
|
265
|
-
} catch (error) {// Swallow
|
|
266
|
-
// XXX (@Qix-) should we be logging these?
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
module.exports = __webpack_require__(/*! ./common */ "../../node_modules/debug/src/common.js")(exports);
|
|
271
|
-
var formatters = module.exports.formatters;
|
|
272
|
-
/**
|
|
273
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
formatters.j = function (v) {
|
|
277
|
-
try {
|
|
278
|
-
return JSON.stringify(v);
|
|
279
|
-
} catch (error) {
|
|
280
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
284
|
-
|
|
285
|
-
/***/ }),
|
|
286
|
-
|
|
287
|
-
/***/ "../../node_modules/debug/src/common.js":
|
|
288
|
-
/*!*************************************************************************************!*\
|
|
289
|
-
!*** /Users/daffl/Development/feathersjs/feathers/node_modules/debug/src/common.js ***!
|
|
290
|
-
\*************************************************************************************/
|
|
291
|
-
/*! no static exports found */
|
|
292
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
293
|
-
|
|
294
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
295
|
-
|
|
296
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
297
|
-
|
|
298
|
-
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); }
|
|
299
|
-
|
|
300
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
301
|
-
|
|
302
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
303
|
-
|
|
304
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* This is the common logic for both the Node.js and web browser
|
|
308
|
-
* implementations of `debug()`.
|
|
309
|
-
*/
|
|
310
|
-
function setup(env) {
|
|
311
|
-
createDebug.debug = createDebug;
|
|
312
|
-
createDebug.default = createDebug;
|
|
313
|
-
createDebug.coerce = coerce;
|
|
314
|
-
createDebug.disable = disable;
|
|
315
|
-
createDebug.enable = enable;
|
|
316
|
-
createDebug.enabled = enabled;
|
|
317
|
-
createDebug.humanize = __webpack_require__(/*! ms */ "../../node_modules/ms/index.js");
|
|
318
|
-
Object.keys(env).forEach(function (key) {
|
|
319
|
-
createDebug[key] = env[key];
|
|
320
|
-
});
|
|
321
|
-
/**
|
|
322
|
-
* Active `debug` instances.
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
|
-
createDebug.instances = [];
|
|
326
|
-
/**
|
|
327
|
-
* The currently active debug mode names, and names to skip.
|
|
328
|
-
*/
|
|
329
|
-
|
|
330
|
-
createDebug.names = [];
|
|
331
|
-
createDebug.skips = [];
|
|
332
|
-
/**
|
|
333
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
334
|
-
*
|
|
335
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
336
|
-
*/
|
|
337
|
-
|
|
338
|
-
createDebug.formatters = {};
|
|
339
|
-
/**
|
|
340
|
-
* Selects a color for a debug namespace
|
|
341
|
-
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
|
342
|
-
* @return {Number|String} An ANSI color code for the given namespace
|
|
343
|
-
* @api private
|
|
344
|
-
*/
|
|
345
|
-
|
|
346
|
-
function selectColor(namespace) {
|
|
347
|
-
var hash = 0;
|
|
348
|
-
|
|
349
|
-
for (var i = 0; i < namespace.length; i++) {
|
|
350
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
351
|
-
hash |= 0; // Convert to 32bit integer
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
createDebug.selectColor = selectColor;
|
|
358
|
-
/**
|
|
359
|
-
* Create a debugger with the given `namespace`.
|
|
360
|
-
*
|
|
361
|
-
* @param {String} namespace
|
|
362
|
-
* @return {Function}
|
|
363
|
-
* @api public
|
|
364
|
-
*/
|
|
365
|
-
|
|
366
|
-
function createDebug(namespace) {
|
|
367
|
-
var prevTime;
|
|
368
|
-
|
|
369
|
-
function debug() {
|
|
370
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
371
|
-
args[_key] = arguments[_key];
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Disabled?
|
|
375
|
-
if (!debug.enabled) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
var self = debug; // Set `diff` timestamp
|
|
380
|
-
|
|
381
|
-
var curr = Number(new Date());
|
|
382
|
-
var ms = curr - (prevTime || curr);
|
|
383
|
-
self.diff = ms;
|
|
384
|
-
self.prev = prevTime;
|
|
385
|
-
self.curr = curr;
|
|
386
|
-
prevTime = curr;
|
|
387
|
-
args[0] = createDebug.coerce(args[0]);
|
|
388
|
-
|
|
389
|
-
if (typeof args[0] !== 'string') {
|
|
390
|
-
// Anything else let's inspect with %O
|
|
391
|
-
args.unshift('%O');
|
|
392
|
-
} // Apply any `formatters` transformations
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
var index = 0;
|
|
396
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
|
397
|
-
// If we encounter an escaped % then don't increase the array index
|
|
398
|
-
if (match === '%%') {
|
|
399
|
-
return match;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
index++;
|
|
403
|
-
var formatter = createDebug.formatters[format];
|
|
404
|
-
|
|
405
|
-
if (typeof formatter === 'function') {
|
|
406
|
-
var val = args[index];
|
|
407
|
-
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
|
408
|
-
|
|
409
|
-
args.splice(index, 1);
|
|
410
|
-
index--;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
return match;
|
|
414
|
-
}); // Apply env-specific formatting (colors, etc.)
|
|
415
|
-
|
|
416
|
-
createDebug.formatArgs.call(self, args);
|
|
417
|
-
var logFn = self.log || createDebug.log;
|
|
418
|
-
logFn.apply(self, args);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
debug.namespace = namespace;
|
|
422
|
-
debug.enabled = createDebug.enabled(namespace);
|
|
423
|
-
debug.useColors = createDebug.useColors();
|
|
424
|
-
debug.color = selectColor(namespace);
|
|
425
|
-
debug.destroy = destroy;
|
|
426
|
-
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
|
427
|
-
// debug.rawLog = rawLog;
|
|
428
|
-
// env-specific initialization logic for debug instances
|
|
429
|
-
|
|
430
|
-
if (typeof createDebug.init === 'function') {
|
|
431
|
-
createDebug.init(debug);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
createDebug.instances.push(debug);
|
|
435
|
-
return debug;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
function destroy() {
|
|
439
|
-
var index = createDebug.instances.indexOf(this);
|
|
440
|
-
|
|
441
|
-
if (index !== -1) {
|
|
442
|
-
createDebug.instances.splice(index, 1);
|
|
443
|
-
return true;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
return false;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
function extend(namespace, delimiter) {
|
|
450
|
-
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
451
|
-
newDebug.log = this.log;
|
|
452
|
-
return newDebug;
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
456
|
-
* separated by a colon and wildcards.
|
|
457
|
-
*
|
|
458
|
-
* @param {String} namespaces
|
|
459
|
-
* @api public
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
function enable(namespaces) {
|
|
464
|
-
createDebug.save(namespaces);
|
|
465
|
-
createDebug.names = [];
|
|
466
|
-
createDebug.skips = [];
|
|
467
|
-
var i;
|
|
468
|
-
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
469
|
-
var len = split.length;
|
|
470
|
-
|
|
471
|
-
for (i = 0; i < len; i++) {
|
|
472
|
-
if (!split[i]) {
|
|
473
|
-
// ignore empty strings
|
|
474
|
-
continue;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
namespaces = split[i].replace(/\*/g, '.*?');
|
|
478
|
-
|
|
479
|
-
if (namespaces[0] === '-') {
|
|
480
|
-
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
481
|
-
} else {
|
|
482
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
for (i = 0; i < createDebug.instances.length; i++) {
|
|
487
|
-
var instance = createDebug.instances[i];
|
|
488
|
-
instance.enabled = createDebug.enabled(instance.namespace);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Disable debug output.
|
|
493
|
-
*
|
|
494
|
-
* @return {String} namespaces
|
|
495
|
-
* @api public
|
|
496
|
-
*/
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
function disable() {
|
|
500
|
-
var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
|
|
501
|
-
return '-' + namespace;
|
|
502
|
-
}))).join(',');
|
|
503
|
-
createDebug.enable('');
|
|
504
|
-
return namespaces;
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Returns true if the given mode name is enabled, false otherwise.
|
|
508
|
-
*
|
|
509
|
-
* @param {String} name
|
|
510
|
-
* @return {Boolean}
|
|
511
|
-
* @api public
|
|
512
|
-
*/
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
function enabled(name) {
|
|
516
|
-
if (name[name.length - 1] === '*') {
|
|
517
|
-
return true;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
var i;
|
|
521
|
-
var len;
|
|
522
|
-
|
|
523
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
524
|
-
if (createDebug.skips[i].test(name)) {
|
|
525
|
-
return false;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
530
|
-
if (createDebug.names[i].test(name)) {
|
|
531
|
-
return true;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
return false;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* Convert regexp to namespace
|
|
539
|
-
*
|
|
540
|
-
* @param {RegExp} regxep
|
|
541
|
-
* @return {String} namespace
|
|
542
|
-
* @api private
|
|
543
|
-
*/
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
function toNamespace(regexp) {
|
|
547
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Coerce `val`.
|
|
551
|
-
*
|
|
552
|
-
* @param {Mixed} val
|
|
553
|
-
* @return {Mixed}
|
|
554
|
-
* @api private
|
|
555
|
-
*/
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
function coerce(val) {
|
|
559
|
-
if (val instanceof Error) {
|
|
560
|
-
return val.stack || val.message;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
return val;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
createDebug.enable(createDebug.load());
|
|
567
|
-
return createDebug;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
module.exports = setup;
|
|
571
|
-
|
|
572
|
-
/***/ }),
|
|
573
|
-
|
|
574
|
-
/***/ "../../node_modules/ms/index.js":
|
|
575
|
-
/*!*****************************************************************************!*\
|
|
576
|
-
!*** /Users/daffl/Development/feathersjs/feathers/node_modules/ms/index.js ***!
|
|
577
|
-
\*****************************************************************************/
|
|
578
|
-
/*! no static exports found */
|
|
579
|
-
/***/ (function(module, exports) {
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Helpers.
|
|
583
|
-
*/
|
|
584
|
-
|
|
585
|
-
var s = 1000;
|
|
586
|
-
var m = s * 60;
|
|
587
|
-
var h = m * 60;
|
|
588
|
-
var d = h * 24;
|
|
589
|
-
var w = d * 7;
|
|
590
|
-
var y = d * 365.25;
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Parse or format the given `val`.
|
|
594
|
-
*
|
|
595
|
-
* Options:
|
|
596
|
-
*
|
|
597
|
-
* - `long` verbose formatting [false]
|
|
598
|
-
*
|
|
599
|
-
* @param {String|Number} val
|
|
600
|
-
* @param {Object} [options]
|
|
601
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
602
|
-
* @return {String|Number}
|
|
603
|
-
* @api public
|
|
604
|
-
*/
|
|
605
|
-
|
|
606
|
-
module.exports = function(val, options) {
|
|
607
|
-
options = options || {};
|
|
608
|
-
var type = typeof val;
|
|
609
|
-
if (type === 'string' && val.length > 0) {
|
|
610
|
-
return parse(val);
|
|
611
|
-
} else if (type === 'number' && isFinite(val)) {
|
|
612
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
613
|
-
}
|
|
614
|
-
throw new Error(
|
|
615
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
616
|
-
JSON.stringify(val)
|
|
617
|
-
);
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* Parse the given `str` and return milliseconds.
|
|
622
|
-
*
|
|
623
|
-
* @param {String} str
|
|
624
|
-
* @return {Number}
|
|
625
|
-
* @api private
|
|
626
|
-
*/
|
|
627
|
-
|
|
628
|
-
function parse(str) {
|
|
629
|
-
str = String(str);
|
|
630
|
-
if (str.length > 100) {
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
|
-
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(
|
|
634
|
-
str
|
|
635
|
-
);
|
|
636
|
-
if (!match) {
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
var n = parseFloat(match[1]);
|
|
640
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
641
|
-
switch (type) {
|
|
642
|
-
case 'years':
|
|
643
|
-
case 'year':
|
|
644
|
-
case 'yrs':
|
|
645
|
-
case 'yr':
|
|
646
|
-
case 'y':
|
|
647
|
-
return n * y;
|
|
648
|
-
case 'weeks':
|
|
649
|
-
case 'week':
|
|
650
|
-
case 'w':
|
|
651
|
-
return n * w;
|
|
652
|
-
case 'days':
|
|
653
|
-
case 'day':
|
|
654
|
-
case 'd':
|
|
655
|
-
return n * d;
|
|
656
|
-
case 'hours':
|
|
657
|
-
case 'hour':
|
|
658
|
-
case 'hrs':
|
|
659
|
-
case 'hr':
|
|
660
|
-
case 'h':
|
|
661
|
-
return n * h;
|
|
662
|
-
case 'minutes':
|
|
663
|
-
case 'minute':
|
|
664
|
-
case 'mins':
|
|
665
|
-
case 'min':
|
|
666
|
-
case 'm':
|
|
667
|
-
return n * m;
|
|
668
|
-
case 'seconds':
|
|
669
|
-
case 'second':
|
|
670
|
-
case 'secs':
|
|
671
|
-
case 'sec':
|
|
672
|
-
case 's':
|
|
673
|
-
return n * s;
|
|
674
|
-
case 'milliseconds':
|
|
675
|
-
case 'millisecond':
|
|
676
|
-
case 'msecs':
|
|
677
|
-
case 'msec':
|
|
678
|
-
case 'ms':
|
|
679
|
-
return n;
|
|
680
|
-
default:
|
|
681
|
-
return undefined;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* Short format for `ms`.
|
|
687
|
-
*
|
|
688
|
-
* @param {Number} ms
|
|
689
|
-
* @return {String}
|
|
690
|
-
* @api private
|
|
691
|
-
*/
|
|
692
|
-
|
|
693
|
-
function fmtShort(ms) {
|
|
694
|
-
var msAbs = Math.abs(ms);
|
|
695
|
-
if (msAbs >= d) {
|
|
696
|
-
return Math.round(ms / d) + 'd';
|
|
697
|
-
}
|
|
698
|
-
if (msAbs >= h) {
|
|
699
|
-
return Math.round(ms / h) + 'h';
|
|
700
|
-
}
|
|
701
|
-
if (msAbs >= m) {
|
|
702
|
-
return Math.round(ms / m) + 'm';
|
|
703
|
-
}
|
|
704
|
-
if (msAbs >= s) {
|
|
705
|
-
return Math.round(ms / s) + 's';
|
|
706
|
-
}
|
|
707
|
-
return ms + 'ms';
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Long format for `ms`.
|
|
712
|
-
*
|
|
713
|
-
* @param {Number} ms
|
|
714
|
-
* @return {String}
|
|
715
|
-
* @api private
|
|
716
|
-
*/
|
|
717
|
-
|
|
718
|
-
function fmtLong(ms) {
|
|
719
|
-
var msAbs = Math.abs(ms);
|
|
720
|
-
if (msAbs >= d) {
|
|
721
|
-
return plural(ms, msAbs, d, 'day');
|
|
722
|
-
}
|
|
723
|
-
if (msAbs >= h) {
|
|
724
|
-
return plural(ms, msAbs, h, 'hour');
|
|
725
|
-
}
|
|
726
|
-
if (msAbs >= m) {
|
|
727
|
-
return plural(ms, msAbs, m, 'minute');
|
|
728
|
-
}
|
|
729
|
-
if (msAbs >= s) {
|
|
730
|
-
return plural(ms, msAbs, s, 'second');
|
|
731
|
-
}
|
|
732
|
-
return ms + ' ms';
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* Pluralization helper.
|
|
737
|
-
*/
|
|
738
|
-
|
|
739
|
-
function plural(ms, msAbs, n, name) {
|
|
740
|
-
var isPlural = msAbs >= n * 1.5;
|
|
741
|
-
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
/***/ }),
|
|
746
|
-
|
|
747
|
-
/***/ "../../node_modules/process/browser.js":
|
|
748
|
-
/*!************************************************************************************!*\
|
|
749
|
-
!*** /Users/daffl/Development/feathersjs/feathers/node_modules/process/browser.js ***!
|
|
750
|
-
\************************************************************************************/
|
|
751
|
-
/*! no static exports found */
|
|
752
|
-
/***/ (function(module, exports) {
|
|
753
|
-
|
|
754
|
-
// shim for using process in browser
|
|
755
|
-
var process = module.exports = {};
|
|
756
|
-
|
|
757
|
-
// cached from whatever global is present so that test runners that stub it
|
|
758
|
-
// don't break things. But we need to wrap it in a try catch in case it is
|
|
759
|
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
760
|
-
// function because try/catches deoptimize in certain engines.
|
|
761
|
-
|
|
762
|
-
var cachedSetTimeout;
|
|
763
|
-
var cachedClearTimeout;
|
|
764
|
-
|
|
765
|
-
function defaultSetTimout() {
|
|
766
|
-
throw new Error('setTimeout has not been defined');
|
|
767
|
-
}
|
|
768
|
-
function defaultClearTimeout () {
|
|
769
|
-
throw new Error('clearTimeout has not been defined');
|
|
770
|
-
}
|
|
771
|
-
(function () {
|
|
772
|
-
try {
|
|
773
|
-
if (typeof setTimeout === 'function') {
|
|
774
|
-
cachedSetTimeout = setTimeout;
|
|
775
|
-
} else {
|
|
776
|
-
cachedSetTimeout = defaultSetTimout;
|
|
777
|
-
}
|
|
778
|
-
} catch (e) {
|
|
779
|
-
cachedSetTimeout = defaultSetTimout;
|
|
780
|
-
}
|
|
781
|
-
try {
|
|
782
|
-
if (typeof clearTimeout === 'function') {
|
|
783
|
-
cachedClearTimeout = clearTimeout;
|
|
784
|
-
} else {
|
|
785
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
786
|
-
}
|
|
787
|
-
} catch (e) {
|
|
788
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
789
|
-
}
|
|
790
|
-
} ())
|
|
791
|
-
function runTimeout(fun) {
|
|
792
|
-
if (cachedSetTimeout === setTimeout) {
|
|
793
|
-
//normal enviroments in sane situations
|
|
794
|
-
return setTimeout(fun, 0);
|
|
795
|
-
}
|
|
796
|
-
// if setTimeout wasn't available but was latter defined
|
|
797
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
798
|
-
cachedSetTimeout = setTimeout;
|
|
799
|
-
return setTimeout(fun, 0);
|
|
800
|
-
}
|
|
801
|
-
try {
|
|
802
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
803
|
-
return cachedSetTimeout(fun, 0);
|
|
804
|
-
} catch(e){
|
|
805
|
-
try {
|
|
806
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
807
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
808
|
-
} catch(e){
|
|
809
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
810
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
function runClearTimeout(marker) {
|
|
817
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
818
|
-
//normal enviroments in sane situations
|
|
819
|
-
return clearTimeout(marker);
|
|
820
|
-
}
|
|
821
|
-
// if clearTimeout wasn't available but was latter defined
|
|
822
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
823
|
-
cachedClearTimeout = clearTimeout;
|
|
824
|
-
return clearTimeout(marker);
|
|
825
|
-
}
|
|
826
|
-
try {
|
|
827
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
828
|
-
return cachedClearTimeout(marker);
|
|
829
|
-
} catch (e){
|
|
830
|
-
try {
|
|
831
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
832
|
-
return cachedClearTimeout.call(null, marker);
|
|
833
|
-
} catch (e){
|
|
834
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
835
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
836
|
-
return cachedClearTimeout.call(this, marker);
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
}
|
|
843
|
-
var queue = [];
|
|
844
|
-
var draining = false;
|
|
845
|
-
var currentQueue;
|
|
846
|
-
var queueIndex = -1;
|
|
847
|
-
|
|
848
|
-
function cleanUpNextTick() {
|
|
849
|
-
if (!draining || !currentQueue) {
|
|
850
|
-
return;
|
|
851
|
-
}
|
|
852
|
-
draining = false;
|
|
853
|
-
if (currentQueue.length) {
|
|
854
|
-
queue = currentQueue.concat(queue);
|
|
855
|
-
} else {
|
|
856
|
-
queueIndex = -1;
|
|
857
|
-
}
|
|
858
|
-
if (queue.length) {
|
|
859
|
-
drainQueue();
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
function drainQueue() {
|
|
864
|
-
if (draining) {
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
868
|
-
draining = true;
|
|
869
|
-
|
|
870
|
-
var len = queue.length;
|
|
871
|
-
while(len) {
|
|
872
|
-
currentQueue = queue;
|
|
873
|
-
queue = [];
|
|
874
|
-
while (++queueIndex < len) {
|
|
875
|
-
if (currentQueue) {
|
|
876
|
-
currentQueue[queueIndex].run();
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
queueIndex = -1;
|
|
880
|
-
len = queue.length;
|
|
881
|
-
}
|
|
882
|
-
currentQueue = null;
|
|
883
|
-
draining = false;
|
|
884
|
-
runClearTimeout(timeout);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
process.nextTick = function (fun) {
|
|
888
|
-
var args = new Array(arguments.length - 1);
|
|
889
|
-
if (arguments.length > 1) {
|
|
890
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
891
|
-
args[i - 1] = arguments[i];
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
queue.push(new Item(fun, args));
|
|
895
|
-
if (queue.length === 1 && !draining) {
|
|
896
|
-
runTimeout(drainQueue);
|
|
897
|
-
}
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
// v8 likes predictible objects
|
|
901
|
-
function Item(fun, array) {
|
|
902
|
-
this.fun = fun;
|
|
903
|
-
this.array = array;
|
|
904
|
-
}
|
|
905
|
-
Item.prototype.run = function () {
|
|
906
|
-
this.fun.apply(null, this.array);
|
|
907
|
-
};
|
|
908
|
-
process.title = 'browser';
|
|
909
|
-
process.browser = true;
|
|
910
|
-
process.env = {};
|
|
911
|
-
process.argv = [];
|
|
912
|
-
process.version = ''; // empty string to avoid regexp issues
|
|
913
|
-
process.versions = {};
|
|
914
|
-
|
|
915
|
-
function noop() {}
|
|
916
|
-
|
|
917
|
-
process.on = noop;
|
|
918
|
-
process.addListener = noop;
|
|
919
|
-
process.once = noop;
|
|
920
|
-
process.off = noop;
|
|
921
|
-
process.removeListener = noop;
|
|
922
|
-
process.removeAllListeners = noop;
|
|
923
|
-
process.emit = noop;
|
|
924
|
-
process.prependListener = noop;
|
|
925
|
-
process.prependOnceListener = noop;
|
|
926
|
-
|
|
927
|
-
process.listeners = function (name) { return [] }
|
|
928
|
-
|
|
929
|
-
process.binding = function (name) {
|
|
930
|
-
throw new Error('process.binding is not supported');
|
|
931
|
-
};
|
|
932
|
-
|
|
933
|
-
process.cwd = function () { return '/' };
|
|
934
|
-
process.chdir = function (dir) {
|
|
935
|
-
throw new Error('process.chdir is not supported');
|
|
936
|
-
};
|
|
937
|
-
process.umask = function() { return 0; };
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
/***/ }),
|
|
941
|
-
|
|
942
|
-
/***/ "../../node_modules/regenerator-runtime/runtime.js":
|
|
943
|
-
/*!************************************************************************************************!*\
|
|
944
|
-
!*** /Users/daffl/Development/feathersjs/feathers/node_modules/regenerator-runtime/runtime.js ***!
|
|
945
|
-
\************************************************************************************************/
|
|
946
|
-
/*! no static exports found */
|
|
947
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
951
|
-
*
|
|
952
|
-
* This source code is licensed under the MIT license found in the
|
|
953
|
-
* LICENSE file in the root directory of this source tree.
|
|
954
|
-
*/
|
|
955
|
-
|
|
956
|
-
var runtime = (function (exports) {
|
|
957
|
-
"use strict";
|
|
958
|
-
|
|
959
|
-
var Op = Object.prototype;
|
|
960
|
-
var hasOwn = Op.hasOwnProperty;
|
|
961
|
-
var undefined; // More compressible than void 0.
|
|
962
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
963
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
964
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
965
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
966
|
-
|
|
967
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
968
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
969
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
970
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
971
|
-
var context = new Context(tryLocsList || []);
|
|
972
|
-
|
|
973
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
974
|
-
// .throw, and .return methods.
|
|
975
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
976
|
-
|
|
977
|
-
return generator;
|
|
978
|
-
}
|
|
979
|
-
exports.wrap = wrap;
|
|
980
|
-
|
|
981
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
982
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
983
|
-
// have been (and was previously) designed to take a closure to be
|
|
984
|
-
// invoked without arguments, but in all the cases we care about we
|
|
985
|
-
// already have an existing method we want to call, so there's no need
|
|
986
|
-
// to create a new function object. We can even get away with assuming
|
|
987
|
-
// the method takes exactly one argument, since that happens to be true
|
|
988
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
989
|
-
// only additional allocation required is the completion record, which
|
|
990
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
991
|
-
function tryCatch(fn, obj, arg) {
|
|
992
|
-
try {
|
|
993
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
994
|
-
} catch (err) {
|
|
995
|
-
return { type: "throw", arg: err };
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
1000
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
1001
|
-
var GenStateExecuting = "executing";
|
|
1002
|
-
var GenStateCompleted = "completed";
|
|
1003
|
-
|
|
1004
|
-
// Returning this object from the innerFn has the same effect as
|
|
1005
|
-
// breaking out of the dispatch switch statement.
|
|
1006
|
-
var ContinueSentinel = {};
|
|
1007
|
-
|
|
1008
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
1009
|
-
// .constructor.prototype properties for functions that return Generator
|
|
1010
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
1011
|
-
// minifier not to mangle the names of these two functions.
|
|
1012
|
-
function Generator() {}
|
|
1013
|
-
function GeneratorFunction() {}
|
|
1014
|
-
function GeneratorFunctionPrototype() {}
|
|
1015
|
-
|
|
1016
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1017
|
-
// don't natively support it.
|
|
1018
|
-
var IteratorPrototype = {};
|
|
1019
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
1020
|
-
return this;
|
|
1021
|
-
};
|
|
1022
|
-
|
|
1023
|
-
var getProto = Object.getPrototypeOf;
|
|
1024
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1025
|
-
if (NativeIteratorPrototype &&
|
|
1026
|
-
NativeIteratorPrototype !== Op &&
|
|
1027
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1028
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
1029
|
-
// of the polyfill.
|
|
1030
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1034
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
1035
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
1036
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
1037
|
-
GeneratorFunctionPrototype[toStringTagSymbol] =
|
|
1038
|
-
GeneratorFunction.displayName = "GeneratorFunction";
|
|
1039
|
-
|
|
1040
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
1041
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
1042
|
-
function defineIteratorMethods(prototype) {
|
|
1043
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
1044
|
-
prototype[method] = function(arg) {
|
|
1045
|
-
return this._invoke(method, arg);
|
|
1046
|
-
};
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
1051
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1052
|
-
return ctor
|
|
1053
|
-
? ctor === GeneratorFunction ||
|
|
1054
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
1055
|
-
// do is to check its .name property.
|
|
1056
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1057
|
-
: false;
|
|
1058
|
-
};
|
|
1059
|
-
|
|
1060
|
-
exports.mark = function(genFun) {
|
|
1061
|
-
if (Object.setPrototypeOf) {
|
|
1062
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1063
|
-
} else {
|
|
1064
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1065
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
1066
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
genFun.prototype = Object.create(Gp);
|
|
1070
|
-
return genFun;
|
|
1071
|
-
};
|
|
1072
|
-
|
|
1073
|
-
// Within the body of any async function, `await x` is transformed to
|
|
1074
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1075
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1076
|
-
// meant to be awaited.
|
|
1077
|
-
exports.awrap = function(arg) {
|
|
1078
|
-
return { __await: arg };
|
|
1079
|
-
};
|
|
1080
|
-
|
|
1081
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1082
|
-
function invoke(method, arg, resolve, reject) {
|
|
1083
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
1084
|
-
if (record.type === "throw") {
|
|
1085
|
-
reject(record.arg);
|
|
1086
|
-
} else {
|
|
1087
|
-
var result = record.arg;
|
|
1088
|
-
var value = result.value;
|
|
1089
|
-
if (value &&
|
|
1090
|
-
typeof value === "object" &&
|
|
1091
|
-
hasOwn.call(value, "__await")) {
|
|
1092
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
1093
|
-
invoke("next", value, resolve, reject);
|
|
1094
|
-
}, function(err) {
|
|
1095
|
-
invoke("throw", err, resolve, reject);
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
1100
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
1101
|
-
// the .value of the Promise<{value,done}> result for the
|
|
1102
|
-
// current iteration.
|
|
1103
|
-
result.value = unwrapped;
|
|
1104
|
-
resolve(result);
|
|
1105
|
-
}, function(error) {
|
|
1106
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
1107
|
-
// into the async generator function so it can be handled there.
|
|
1108
|
-
return invoke("throw", error, resolve, reject);
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
var previousPromise;
|
|
1114
|
-
|
|
1115
|
-
function enqueue(method, arg) {
|
|
1116
|
-
function callInvokeWithMethodAndArg() {
|
|
1117
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
1118
|
-
invoke(method, arg, resolve, reject);
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
return previousPromise =
|
|
1123
|
-
// If enqueue has been called before, then we want to wait until
|
|
1124
|
-
// all previous Promises have been resolved before calling invoke,
|
|
1125
|
-
// so that results are always delivered in the correct order. If
|
|
1126
|
-
// enqueue has not been called before, then it is important to
|
|
1127
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
1128
|
-
// so that the async generator function has the opportunity to do
|
|
1129
|
-
// any necessary setup in a predictable way. This predictability
|
|
1130
|
-
// is why the Promise constructor synchronously invokes its
|
|
1131
|
-
// executor callback, and why async functions synchronously
|
|
1132
|
-
// execute code before the first await. Since we implement simple
|
|
1133
|
-
// async functions in terms of async generators, it is especially
|
|
1134
|
-
// important to get this right, even though it requires care.
|
|
1135
|
-
previousPromise ? previousPromise.then(
|
|
1136
|
-
callInvokeWithMethodAndArg,
|
|
1137
|
-
// Avoid propagating failures to Promises returned by later
|
|
1138
|
-
// invocations of the iterator.
|
|
1139
|
-
callInvokeWithMethodAndArg
|
|
1140
|
-
) : callInvokeWithMethodAndArg();
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
// Define the unified helper method that is used to implement .next,
|
|
1144
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
1145
|
-
this._invoke = enqueue;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
1149
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
1150
|
-
return this;
|
|
1151
|
-
};
|
|
1152
|
-
exports.AsyncIterator = AsyncIterator;
|
|
1153
|
-
|
|
1154
|
-
// Note that simple async functions are implemented on top of
|
|
1155
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
1156
|
-
// the final result produced by the iterator.
|
|
1157
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1158
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1159
|
-
|
|
1160
|
-
var iter = new AsyncIterator(
|
|
1161
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
1162
|
-
PromiseImpl
|
|
1163
|
-
);
|
|
1164
|
-
|
|
1165
|
-
return exports.isGeneratorFunction(outerFn)
|
|
1166
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
1167
|
-
: iter.next().then(function(result) {
|
|
1168
|
-
return result.done ? result.value : iter.next();
|
|
1169
|
-
});
|
|
1170
|
-
};
|
|
1171
|
-
|
|
1172
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
1173
|
-
var state = GenStateSuspendedStart;
|
|
1174
|
-
|
|
1175
|
-
return function invoke(method, arg) {
|
|
1176
|
-
if (state === GenStateExecuting) {
|
|
1177
|
-
throw new Error("Generator is already running");
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
if (state === GenStateCompleted) {
|
|
1181
|
-
if (method === "throw") {
|
|
1182
|
-
throw arg;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1186
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1187
|
-
return doneResult();
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
context.method = method;
|
|
1191
|
-
context.arg = arg;
|
|
1192
|
-
|
|
1193
|
-
while (true) {
|
|
1194
|
-
var delegate = context.delegate;
|
|
1195
|
-
if (delegate) {
|
|
1196
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
1197
|
-
if (delegateResult) {
|
|
1198
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
1199
|
-
return delegateResult;
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
if (context.method === "next") {
|
|
1204
|
-
// Setting context._sent for legacy support of Babel's
|
|
1205
|
-
// function.sent implementation.
|
|
1206
|
-
context.sent = context._sent = context.arg;
|
|
1207
|
-
|
|
1208
|
-
} else if (context.method === "throw") {
|
|
1209
|
-
if (state === GenStateSuspendedStart) {
|
|
1210
|
-
state = GenStateCompleted;
|
|
1211
|
-
throw context.arg;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
context.dispatchException(context.arg);
|
|
1215
|
-
|
|
1216
|
-
} else if (context.method === "return") {
|
|
1217
|
-
context.abrupt("return", context.arg);
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
state = GenStateExecuting;
|
|
1221
|
-
|
|
1222
|
-
var record = tryCatch(innerFn, self, context);
|
|
1223
|
-
if (record.type === "normal") {
|
|
1224
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
1225
|
-
// GenStateExecuting and loop back for another invocation.
|
|
1226
|
-
state = context.done
|
|
1227
|
-
? GenStateCompleted
|
|
1228
|
-
: GenStateSuspendedYield;
|
|
1229
|
-
|
|
1230
|
-
if (record.arg === ContinueSentinel) {
|
|
1231
|
-
continue;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
return {
|
|
1235
|
-
value: record.arg,
|
|
1236
|
-
done: context.done
|
|
1237
|
-
};
|
|
1238
|
-
|
|
1239
|
-
} else if (record.type === "throw") {
|
|
1240
|
-
state = GenStateCompleted;
|
|
1241
|
-
// Dispatch the exception by looping back around to the
|
|
1242
|
-
// context.dispatchException(context.arg) call above.
|
|
1243
|
-
context.method = "throw";
|
|
1244
|
-
context.arg = record.arg;
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
};
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
1251
|
-
// result, either by returning a { value, done } result from the
|
|
1252
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
1253
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1254
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
1255
|
-
var method = delegate.iterator[context.method];
|
|
1256
|
-
if (method === undefined) {
|
|
1257
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
1258
|
-
// method always terminates the yield* loop.
|
|
1259
|
-
context.delegate = null;
|
|
1260
|
-
|
|
1261
|
-
if (context.method === "throw") {
|
|
1262
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1263
|
-
if (delegate.iterator["return"]) {
|
|
1264
|
-
// If the delegate iterator has a return method, give it a
|
|
1265
|
-
// chance to clean up.
|
|
1266
|
-
context.method = "return";
|
|
1267
|
-
context.arg = undefined;
|
|
1268
|
-
maybeInvokeDelegate(delegate, context);
|
|
1269
|
-
|
|
1270
|
-
if (context.method === "throw") {
|
|
1271
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
1272
|
-
// "return" to "throw", let that override the TypeError below.
|
|
1273
|
-
return ContinueSentinel;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
context.method = "throw";
|
|
1278
|
-
context.arg = new TypeError(
|
|
1279
|
-
"The iterator does not provide a 'throw' method");
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
return ContinueSentinel;
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
1286
|
-
|
|
1287
|
-
if (record.type === "throw") {
|
|
1288
|
-
context.method = "throw";
|
|
1289
|
-
context.arg = record.arg;
|
|
1290
|
-
context.delegate = null;
|
|
1291
|
-
return ContinueSentinel;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
var info = record.arg;
|
|
1295
|
-
|
|
1296
|
-
if (! info) {
|
|
1297
|
-
context.method = "throw";
|
|
1298
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
1299
|
-
context.delegate = null;
|
|
1300
|
-
return ContinueSentinel;
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
if (info.done) {
|
|
1304
|
-
// Assign the result of the finished delegate to the temporary
|
|
1305
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
1306
|
-
context[delegate.resultName] = info.value;
|
|
1307
|
-
|
|
1308
|
-
// Resume execution at the desired location (see delegateYield).
|
|
1309
|
-
context.next = delegate.nextLoc;
|
|
1310
|
-
|
|
1311
|
-
// If context.method was "throw" but the delegate handled the
|
|
1312
|
-
// exception, let the outer generator proceed normally. If
|
|
1313
|
-
// context.method was "next", forget context.arg since it has been
|
|
1314
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
1315
|
-
// "return", allow the original .return call to continue in the
|
|
1316
|
-
// outer generator.
|
|
1317
|
-
if (context.method !== "return") {
|
|
1318
|
-
context.method = "next";
|
|
1319
|
-
context.arg = undefined;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
} else {
|
|
1323
|
-
// Re-yield the result returned by the delegate method.
|
|
1324
|
-
return info;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
1328
|
-
// the outer generator.
|
|
1329
|
-
context.delegate = null;
|
|
1330
|
-
return ContinueSentinel;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
1334
|
-
// unified ._invoke helper method.
|
|
1335
|
-
defineIteratorMethods(Gp);
|
|
1336
|
-
|
|
1337
|
-
Gp[toStringTagSymbol] = "Generator";
|
|
1338
|
-
|
|
1339
|
-
// A Generator should always return itself as the iterator object when the
|
|
1340
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
1341
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
1342
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1343
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1344
|
-
Gp[iteratorSymbol] = function() {
|
|
1345
|
-
return this;
|
|
1346
|
-
};
|
|
1347
|
-
|
|
1348
|
-
Gp.toString = function() {
|
|
1349
|
-
return "[object Generator]";
|
|
1350
|
-
};
|
|
1351
|
-
|
|
1352
|
-
function pushTryEntry(locs) {
|
|
1353
|
-
var entry = { tryLoc: locs[0] };
|
|
1354
|
-
|
|
1355
|
-
if (1 in locs) {
|
|
1356
|
-
entry.catchLoc = locs[1];
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
if (2 in locs) {
|
|
1360
|
-
entry.finallyLoc = locs[2];
|
|
1361
|
-
entry.afterLoc = locs[3];
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
this.tryEntries.push(entry);
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
function resetTryEntry(entry) {
|
|
1368
|
-
var record = entry.completion || {};
|
|
1369
|
-
record.type = "normal";
|
|
1370
|
-
delete record.arg;
|
|
1371
|
-
entry.completion = record;
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
function Context(tryLocsList) {
|
|
1375
|
-
// The root entry object (effectively a try statement without a catch
|
|
1376
|
-
// or a finally block) gives us a place to store values thrown from
|
|
1377
|
-
// locations where there is no enclosing try statement.
|
|
1378
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
1379
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
1380
|
-
this.reset(true);
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
exports.keys = function(object) {
|
|
1384
|
-
var keys = [];
|
|
1385
|
-
for (var key in object) {
|
|
1386
|
-
keys.push(key);
|
|
1387
|
-
}
|
|
1388
|
-
keys.reverse();
|
|
1389
|
-
|
|
1390
|
-
// Rather than returning an object with a next method, we keep
|
|
1391
|
-
// things simple and return the next function itself.
|
|
1392
|
-
return function next() {
|
|
1393
|
-
while (keys.length) {
|
|
1394
|
-
var key = keys.pop();
|
|
1395
|
-
if (key in object) {
|
|
1396
|
-
next.value = key;
|
|
1397
|
-
next.done = false;
|
|
1398
|
-
return next;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
// To avoid creating an additional object, we just hang the .value
|
|
1403
|
-
// and .done properties off the next function object itself. This
|
|
1404
|
-
// also ensures that the minifier will not anonymize the function.
|
|
1405
|
-
next.done = true;
|
|
1406
|
-
return next;
|
|
1407
|
-
};
|
|
1408
|
-
};
|
|
1409
|
-
|
|
1410
|
-
function values(iterable) {
|
|
1411
|
-
if (iterable) {
|
|
1412
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
1413
|
-
if (iteratorMethod) {
|
|
1414
|
-
return iteratorMethod.call(iterable);
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
if (typeof iterable.next === "function") {
|
|
1418
|
-
return iterable;
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
if (!isNaN(iterable.length)) {
|
|
1422
|
-
var i = -1, next = function next() {
|
|
1423
|
-
while (++i < iterable.length) {
|
|
1424
|
-
if (hasOwn.call(iterable, i)) {
|
|
1425
|
-
next.value = iterable[i];
|
|
1426
|
-
next.done = false;
|
|
1427
|
-
return next;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
next.value = undefined;
|
|
1432
|
-
next.done = true;
|
|
1433
|
-
|
|
1434
|
-
return next;
|
|
1435
|
-
};
|
|
1436
|
-
|
|
1437
|
-
return next.next = next;
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
// Return an iterator with no values.
|
|
1442
|
-
return { next: doneResult };
|
|
1443
|
-
}
|
|
1444
|
-
exports.values = values;
|
|
1445
|
-
|
|
1446
|
-
function doneResult() {
|
|
1447
|
-
return { value: undefined, done: true };
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
Context.prototype = {
|
|
1451
|
-
constructor: Context,
|
|
1452
|
-
|
|
1453
|
-
reset: function(skipTempReset) {
|
|
1454
|
-
this.prev = 0;
|
|
1455
|
-
this.next = 0;
|
|
1456
|
-
// Resetting context._sent for legacy support of Babel's
|
|
1457
|
-
// function.sent implementation.
|
|
1458
|
-
this.sent = this._sent = undefined;
|
|
1459
|
-
this.done = false;
|
|
1460
|
-
this.delegate = null;
|
|
1461
|
-
|
|
1462
|
-
this.method = "next";
|
|
1463
|
-
this.arg = undefined;
|
|
1464
|
-
|
|
1465
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
1466
|
-
|
|
1467
|
-
if (!skipTempReset) {
|
|
1468
|
-
for (var name in this) {
|
|
1469
|
-
// Not sure about the optimal order of these conditions:
|
|
1470
|
-
if (name.charAt(0) === "t" &&
|
|
1471
|
-
hasOwn.call(this, name) &&
|
|
1472
|
-
!isNaN(+name.slice(1))) {
|
|
1473
|
-
this[name] = undefined;
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
},
|
|
1478
|
-
|
|
1479
|
-
stop: function() {
|
|
1480
|
-
this.done = true;
|
|
1481
|
-
|
|
1482
|
-
var rootEntry = this.tryEntries[0];
|
|
1483
|
-
var rootRecord = rootEntry.completion;
|
|
1484
|
-
if (rootRecord.type === "throw") {
|
|
1485
|
-
throw rootRecord.arg;
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
return this.rval;
|
|
1489
|
-
},
|
|
1490
|
-
|
|
1491
|
-
dispatchException: function(exception) {
|
|
1492
|
-
if (this.done) {
|
|
1493
|
-
throw exception;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
var context = this;
|
|
1497
|
-
function handle(loc, caught) {
|
|
1498
|
-
record.type = "throw";
|
|
1499
|
-
record.arg = exception;
|
|
1500
|
-
context.next = loc;
|
|
1501
|
-
|
|
1502
|
-
if (caught) {
|
|
1503
|
-
// If the dispatched exception was caught by a catch block,
|
|
1504
|
-
// then let that catch block handle the exception normally.
|
|
1505
|
-
context.method = "next";
|
|
1506
|
-
context.arg = undefined;
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
return !! caught;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1513
|
-
var entry = this.tryEntries[i];
|
|
1514
|
-
var record = entry.completion;
|
|
1515
|
-
|
|
1516
|
-
if (entry.tryLoc === "root") {
|
|
1517
|
-
// Exception thrown outside of any try block that could handle
|
|
1518
|
-
// it, so set the completion value of the entire function to
|
|
1519
|
-
// throw the exception.
|
|
1520
|
-
return handle("end");
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
if (entry.tryLoc <= this.prev) {
|
|
1524
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1525
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1526
|
-
|
|
1527
|
-
if (hasCatch && hasFinally) {
|
|
1528
|
-
if (this.prev < entry.catchLoc) {
|
|
1529
|
-
return handle(entry.catchLoc, true);
|
|
1530
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
1531
|
-
return handle(entry.finallyLoc);
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
} else if (hasCatch) {
|
|
1535
|
-
if (this.prev < entry.catchLoc) {
|
|
1536
|
-
return handle(entry.catchLoc, true);
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
} else if (hasFinally) {
|
|
1540
|
-
if (this.prev < entry.finallyLoc) {
|
|
1541
|
-
return handle(entry.finallyLoc);
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
} else {
|
|
1545
|
-
throw new Error("try statement without catch or finally");
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1551
|
-
abrupt: function(type, arg) {
|
|
1552
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1553
|
-
var entry = this.tryEntries[i];
|
|
1554
|
-
if (entry.tryLoc <= this.prev &&
|
|
1555
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
1556
|
-
this.prev < entry.finallyLoc) {
|
|
1557
|
-
var finallyEntry = entry;
|
|
1558
|
-
break;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
if (finallyEntry &&
|
|
1563
|
-
(type === "break" ||
|
|
1564
|
-
type === "continue") &&
|
|
1565
|
-
finallyEntry.tryLoc <= arg &&
|
|
1566
|
-
arg <= finallyEntry.finallyLoc) {
|
|
1567
|
-
// Ignore the finally entry if control is not jumping to a
|
|
1568
|
-
// location outside the try/catch block.
|
|
1569
|
-
finallyEntry = null;
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
1573
|
-
record.type = type;
|
|
1574
|
-
record.arg = arg;
|
|
1575
|
-
|
|
1576
|
-
if (finallyEntry) {
|
|
1577
|
-
this.method = "next";
|
|
1578
|
-
this.next = finallyEntry.finallyLoc;
|
|
1579
|
-
return ContinueSentinel;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
return this.complete(record);
|
|
1583
|
-
},
|
|
1584
|
-
|
|
1585
|
-
complete: function(record, afterLoc) {
|
|
1586
|
-
if (record.type === "throw") {
|
|
1587
|
-
throw record.arg;
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
if (record.type === "break" ||
|
|
1591
|
-
record.type === "continue") {
|
|
1592
|
-
this.next = record.arg;
|
|
1593
|
-
} else if (record.type === "return") {
|
|
1594
|
-
this.rval = this.arg = record.arg;
|
|
1595
|
-
this.method = "return";
|
|
1596
|
-
this.next = "end";
|
|
1597
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
1598
|
-
this.next = afterLoc;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
return ContinueSentinel;
|
|
1602
|
-
},
|
|
1603
|
-
|
|
1604
|
-
finish: function(finallyLoc) {
|
|
1605
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1606
|
-
var entry = this.tryEntries[i];
|
|
1607
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
1608
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
1609
|
-
resetTryEntry(entry);
|
|
1610
|
-
return ContinueSentinel;
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
},
|
|
1614
|
-
|
|
1615
|
-
"catch": function(tryLoc) {
|
|
1616
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1617
|
-
var entry = this.tryEntries[i];
|
|
1618
|
-
if (entry.tryLoc === tryLoc) {
|
|
1619
|
-
var record = entry.completion;
|
|
1620
|
-
if (record.type === "throw") {
|
|
1621
|
-
var thrown = record.arg;
|
|
1622
|
-
resetTryEntry(entry);
|
|
1623
|
-
}
|
|
1624
|
-
return thrown;
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
// The context.catch method must only be called with a location
|
|
1629
|
-
// argument that corresponds to a known catch block.
|
|
1630
|
-
throw new Error("illegal catch attempt");
|
|
1631
|
-
},
|
|
1632
|
-
|
|
1633
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
1634
|
-
this.delegate = {
|
|
1635
|
-
iterator: values(iterable),
|
|
1636
|
-
resultName: resultName,
|
|
1637
|
-
nextLoc: nextLoc
|
|
1638
|
-
};
|
|
1639
|
-
|
|
1640
|
-
if (this.method === "next") {
|
|
1641
|
-
// Deliberately forget the last sent value so that we don't
|
|
1642
|
-
// accidentally pass it on to the delegate.
|
|
1643
|
-
this.arg = undefined;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
return ContinueSentinel;
|
|
1647
|
-
}
|
|
1648
|
-
};
|
|
1649
|
-
|
|
1650
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
1651
|
-
// or not, return the runtime object so that we can declare the variable
|
|
1652
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
1653
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
1654
|
-
return exports;
|
|
1655
|
-
|
|
1656
|
-
}(
|
|
1657
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
1658
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
1659
|
-
// object. Either way, the resulting object will be used to initialize
|
|
1660
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
1661
|
-
true ? module.exports : undefined
|
|
1662
|
-
));
|
|
1663
|
-
|
|
1664
|
-
try {
|
|
1665
|
-
regeneratorRuntime = runtime;
|
|
1666
|
-
} catch (accidentalStrictMode) {
|
|
1667
|
-
// This module should not be running in strict mode, so the above
|
|
1668
|
-
// assignment should always work unless something is misconfigured. Just
|
|
1669
|
-
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
1670
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
1671
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
1672
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
1673
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
1674
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1675
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
1676
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
/***/ }),
|
|
1681
|
-
|
|
1682
|
-
/***/ "../errors/lib/index.js":
|
|
1683
|
-
/*!******************************!*\
|
|
1684
|
-
!*** ../errors/lib/index.js ***!
|
|
1685
|
-
\******************************/
|
|
1686
|
-
/*! no static exports found */
|
|
1687
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1688
|
-
|
|
1689
|
-
"use strict";
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
1693
|
-
|
|
1694
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1695
|
-
|
|
1696
|
-
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); } }
|
|
1697
|
-
|
|
1698
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1699
|
-
|
|
1700
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
1701
|
-
|
|
1702
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1703
|
-
|
|
1704
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1705
|
-
|
|
1706
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1707
|
-
|
|
1708
|
-
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
1709
|
-
|
|
1710
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
1711
|
-
|
|
1712
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
1713
|
-
|
|
1714
|
-
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
1715
|
-
|
|
1716
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1717
|
-
|
|
1718
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1719
|
-
|
|
1720
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
1721
|
-
var t = {};
|
|
1722
|
-
|
|
1723
|
-
for (var p in s) {
|
|
1724
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1728
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1729
|
-
}
|
|
1730
|
-
return t;
|
|
1731
|
-
};
|
|
1732
|
-
|
|
1733
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1734
|
-
value: true
|
|
1735
|
-
});
|
|
1736
|
-
exports.convert = exports.errors = exports.Unavailable = exports.BadGateway = exports.NotImplemented = exports.GeneralError = exports.TooManyRequests = exports.Unprocessable = exports.LengthRequired = exports.Gone = exports.Conflict = exports.Timeout = exports.NotAcceptable = exports.MethodNotAllowed = exports.NotFound = exports.Forbidden = exports.PaymentError = exports.NotAuthenticated = exports.BadRequest = exports.FeathersError = void 0;
|
|
1737
|
-
|
|
1738
|
-
var FeathersError = /*#__PURE__*/function (_Error) {
|
|
1739
|
-
_inherits(FeathersError, _Error);
|
|
1740
|
-
|
|
1741
|
-
var _super = _createSuper(FeathersError);
|
|
1742
|
-
|
|
1743
|
-
function FeathersError(err, name, code, className, _data) {
|
|
1744
|
-
var _this;
|
|
1745
|
-
|
|
1746
|
-
_classCallCheck(this, FeathersError);
|
|
1747
|
-
|
|
1748
|
-
var msg = typeof err === 'string' ? err : 'Error';
|
|
1749
|
-
var properties = {
|
|
1750
|
-
name: name,
|
|
1751
|
-
code: code,
|
|
1752
|
-
className: className,
|
|
1753
|
-
type: 'FeathersError'
|
|
1754
|
-
};
|
|
1755
|
-
|
|
1756
|
-
if (Array.isArray(_data)) {
|
|
1757
|
-
properties.data = _data;
|
|
1758
|
-
} else if (_typeof(err) === 'object' || _data !== undefined) {
|
|
1759
|
-
var _a = _typeof(err) === 'object' ? err : _data,
|
|
1760
|
-
message = _a.message,
|
|
1761
|
-
errors = _a.errors,
|
|
1762
|
-
rest = __rest(_a, ["message", "errors"]);
|
|
1763
|
-
|
|
1764
|
-
msg = message || msg;
|
|
1765
|
-
properties.errors = errors;
|
|
1766
|
-
properties.data = rest;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
_this = _super.call(this, msg);
|
|
1770
|
-
Object.assign(_assertThisInitialized(_this), properties);
|
|
1771
|
-
return _this;
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
_createClass(FeathersError, [{
|
|
1775
|
-
key: "toJSON",
|
|
1776
|
-
value: function toJSON() {
|
|
1777
|
-
var result = {
|
|
1778
|
-
name: this.name,
|
|
1779
|
-
message: this.message,
|
|
1780
|
-
code: this.code,
|
|
1781
|
-
className: this.className
|
|
1782
|
-
};
|
|
1783
|
-
|
|
1784
|
-
if (this.data !== undefined) {
|
|
1785
|
-
result.data = this.data;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
if (this.errors !== undefined) {
|
|
1789
|
-
result.errors = this.errors;
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
return result;
|
|
1793
|
-
}
|
|
1794
|
-
}]);
|
|
1795
|
-
|
|
1796
|
-
return FeathersError;
|
|
1797
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1798
|
-
|
|
1799
|
-
exports.FeathersError = FeathersError;
|
|
1800
|
-
|
|
1801
|
-
var BadRequest = /*#__PURE__*/function (_FeathersError) {
|
|
1802
|
-
_inherits(BadRequest, _FeathersError);
|
|
1803
|
-
|
|
1804
|
-
var _super2 = _createSuper(BadRequest);
|
|
1805
|
-
|
|
1806
|
-
function BadRequest(message, data) {
|
|
1807
|
-
_classCallCheck(this, BadRequest);
|
|
1808
|
-
|
|
1809
|
-
return _super2.call(this, message, 'BadRequest', 400, 'bad-request', data);
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
return BadRequest;
|
|
1813
|
-
}(FeathersError);
|
|
1814
|
-
|
|
1815
|
-
exports.BadRequest = BadRequest; // 401 - Not Authenticated
|
|
1816
|
-
|
|
1817
|
-
var NotAuthenticated = /*#__PURE__*/function (_FeathersError2) {
|
|
1818
|
-
_inherits(NotAuthenticated, _FeathersError2);
|
|
1819
|
-
|
|
1820
|
-
var _super3 = _createSuper(NotAuthenticated);
|
|
1821
|
-
|
|
1822
|
-
function NotAuthenticated(message, data) {
|
|
1823
|
-
_classCallCheck(this, NotAuthenticated);
|
|
1824
|
-
|
|
1825
|
-
return _super3.call(this, message, 'NotAuthenticated', 401, 'not-authenticated', data);
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
return NotAuthenticated;
|
|
1829
|
-
}(FeathersError);
|
|
1830
|
-
|
|
1831
|
-
exports.NotAuthenticated = NotAuthenticated; // 402 - Payment Error
|
|
1832
|
-
|
|
1833
|
-
var PaymentError = /*#__PURE__*/function (_FeathersError3) {
|
|
1834
|
-
_inherits(PaymentError, _FeathersError3);
|
|
1835
|
-
|
|
1836
|
-
var _super4 = _createSuper(PaymentError);
|
|
1837
|
-
|
|
1838
|
-
function PaymentError(message, data) {
|
|
1839
|
-
_classCallCheck(this, PaymentError);
|
|
1840
|
-
|
|
1841
|
-
return _super4.call(this, message, 'PaymentError', 402, 'payment-error', data);
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
return PaymentError;
|
|
1845
|
-
}(FeathersError);
|
|
1846
|
-
|
|
1847
|
-
exports.PaymentError = PaymentError; // 403 - Forbidden
|
|
1848
|
-
|
|
1849
|
-
var Forbidden = /*#__PURE__*/function (_FeathersError4) {
|
|
1850
|
-
_inherits(Forbidden, _FeathersError4);
|
|
1851
|
-
|
|
1852
|
-
var _super5 = _createSuper(Forbidden);
|
|
1853
|
-
|
|
1854
|
-
function Forbidden(message, data) {
|
|
1855
|
-
_classCallCheck(this, Forbidden);
|
|
1856
|
-
|
|
1857
|
-
return _super5.call(this, message, 'Forbidden', 403, 'forbidden', data);
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
return Forbidden;
|
|
1861
|
-
}(FeathersError);
|
|
1862
|
-
|
|
1863
|
-
exports.Forbidden = Forbidden; // 404 - Not Found
|
|
1864
|
-
|
|
1865
|
-
var NotFound = /*#__PURE__*/function (_FeathersError5) {
|
|
1866
|
-
_inherits(NotFound, _FeathersError5);
|
|
1867
|
-
|
|
1868
|
-
var _super6 = _createSuper(NotFound);
|
|
1869
|
-
|
|
1870
|
-
function NotFound(message, data) {
|
|
1871
|
-
_classCallCheck(this, NotFound);
|
|
1872
|
-
|
|
1873
|
-
return _super6.call(this, message, 'NotFound', 404, 'not-found', data);
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
return NotFound;
|
|
1877
|
-
}(FeathersError);
|
|
1878
|
-
|
|
1879
|
-
exports.NotFound = NotFound; // 405 - Method Not Allowed
|
|
1880
|
-
|
|
1881
|
-
var MethodNotAllowed = /*#__PURE__*/function (_FeathersError6) {
|
|
1882
|
-
_inherits(MethodNotAllowed, _FeathersError6);
|
|
1883
|
-
|
|
1884
|
-
var _super7 = _createSuper(MethodNotAllowed);
|
|
1885
|
-
|
|
1886
|
-
function MethodNotAllowed(message, data) {
|
|
1887
|
-
_classCallCheck(this, MethodNotAllowed);
|
|
1888
|
-
|
|
1889
|
-
return _super7.call(this, message, 'MethodNotAllowed', 405, 'method-not-allowed', data);
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
return MethodNotAllowed;
|
|
1893
|
-
}(FeathersError);
|
|
1894
|
-
|
|
1895
|
-
exports.MethodNotAllowed = MethodNotAllowed; // 406 - Not Acceptable
|
|
1896
|
-
|
|
1897
|
-
var NotAcceptable = /*#__PURE__*/function (_FeathersError7) {
|
|
1898
|
-
_inherits(NotAcceptable, _FeathersError7);
|
|
1899
|
-
|
|
1900
|
-
var _super8 = _createSuper(NotAcceptable);
|
|
1901
|
-
|
|
1902
|
-
function NotAcceptable(message, data) {
|
|
1903
|
-
_classCallCheck(this, NotAcceptable);
|
|
1904
|
-
|
|
1905
|
-
return _super8.call(this, message, 'NotAcceptable', 406, 'not-acceptable', data);
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
return NotAcceptable;
|
|
1909
|
-
}(FeathersError);
|
|
1910
|
-
|
|
1911
|
-
exports.NotAcceptable = NotAcceptable; // 408 - Timeout
|
|
1912
|
-
|
|
1913
|
-
var Timeout = /*#__PURE__*/function (_FeathersError8) {
|
|
1914
|
-
_inherits(Timeout, _FeathersError8);
|
|
1915
|
-
|
|
1916
|
-
var _super9 = _createSuper(Timeout);
|
|
1917
|
-
|
|
1918
|
-
function Timeout(message, data) {
|
|
1919
|
-
_classCallCheck(this, Timeout);
|
|
1920
|
-
|
|
1921
|
-
return _super9.call(this, message, 'Timeout', 408, 'timeout', data);
|
|
1922
|
-
}
|
|
1923
|
-
|
|
1924
|
-
return Timeout;
|
|
1925
|
-
}(FeathersError);
|
|
1926
|
-
|
|
1927
|
-
exports.Timeout = Timeout; // 409 - Conflict
|
|
1928
|
-
|
|
1929
|
-
var Conflict = /*#__PURE__*/function (_FeathersError9) {
|
|
1930
|
-
_inherits(Conflict, _FeathersError9);
|
|
1931
|
-
|
|
1932
|
-
var _super10 = _createSuper(Conflict);
|
|
1933
|
-
|
|
1934
|
-
function Conflict(message, data) {
|
|
1935
|
-
_classCallCheck(this, Conflict);
|
|
1936
|
-
|
|
1937
|
-
return _super10.call(this, message, 'Conflict', 409, 'conflict', data);
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
return Conflict;
|
|
1941
|
-
}(FeathersError);
|
|
1942
|
-
|
|
1943
|
-
exports.Conflict = Conflict; // 410 - Gone
|
|
1944
|
-
|
|
1945
|
-
var Gone = /*#__PURE__*/function (_FeathersError10) {
|
|
1946
|
-
_inherits(Gone, _FeathersError10);
|
|
1947
|
-
|
|
1948
|
-
var _super11 = _createSuper(Gone);
|
|
1949
|
-
|
|
1950
|
-
function Gone(message, data) {
|
|
1951
|
-
_classCallCheck(this, Gone);
|
|
1952
|
-
|
|
1953
|
-
return _super11.call(this, message, 'Gone', 410, 'gone', data);
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
return Gone;
|
|
1957
|
-
}(FeathersError);
|
|
1958
|
-
|
|
1959
|
-
exports.Gone = Gone; // 411 - Length Required
|
|
1960
|
-
|
|
1961
|
-
var LengthRequired = /*#__PURE__*/function (_FeathersError11) {
|
|
1962
|
-
_inherits(LengthRequired, _FeathersError11);
|
|
1963
|
-
|
|
1964
|
-
var _super12 = _createSuper(LengthRequired);
|
|
1965
|
-
|
|
1966
|
-
function LengthRequired(message, data) {
|
|
1967
|
-
_classCallCheck(this, LengthRequired);
|
|
1968
|
-
|
|
1969
|
-
return _super12.call(this, message, 'LengthRequired', 411, 'length-required', data);
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
return LengthRequired;
|
|
1973
|
-
}(FeathersError);
|
|
1974
|
-
|
|
1975
|
-
exports.LengthRequired = LengthRequired; // 422 Unprocessable
|
|
1976
|
-
|
|
1977
|
-
var Unprocessable = /*#__PURE__*/function (_FeathersError12) {
|
|
1978
|
-
_inherits(Unprocessable, _FeathersError12);
|
|
1979
|
-
|
|
1980
|
-
var _super13 = _createSuper(Unprocessable);
|
|
1981
|
-
|
|
1982
|
-
function Unprocessable(message, data) {
|
|
1983
|
-
_classCallCheck(this, Unprocessable);
|
|
1984
|
-
|
|
1985
|
-
return _super13.call(this, message, 'Unprocessable', 422, 'unprocessable', data);
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
return Unprocessable;
|
|
1989
|
-
}(FeathersError);
|
|
1990
|
-
|
|
1991
|
-
exports.Unprocessable = Unprocessable; // 429 Too Many Requests
|
|
1992
|
-
|
|
1993
|
-
var TooManyRequests = /*#__PURE__*/function (_FeathersError13) {
|
|
1994
|
-
_inherits(TooManyRequests, _FeathersError13);
|
|
1995
|
-
|
|
1996
|
-
var _super14 = _createSuper(TooManyRequests);
|
|
1997
|
-
|
|
1998
|
-
function TooManyRequests(message, data) {
|
|
1999
|
-
_classCallCheck(this, TooManyRequests);
|
|
2000
|
-
|
|
2001
|
-
return _super14.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
return TooManyRequests;
|
|
2005
|
-
}(FeathersError);
|
|
2006
|
-
|
|
2007
|
-
exports.TooManyRequests = TooManyRequests; // 500 - General Error
|
|
2008
|
-
|
|
2009
|
-
var GeneralError = /*#__PURE__*/function (_FeathersError14) {
|
|
2010
|
-
_inherits(GeneralError, _FeathersError14);
|
|
2011
|
-
|
|
2012
|
-
var _super15 = _createSuper(GeneralError);
|
|
2013
|
-
|
|
2014
|
-
function GeneralError(message, data) {
|
|
2015
|
-
_classCallCheck(this, GeneralError);
|
|
2016
|
-
|
|
2017
|
-
return _super15.call(this, message, 'GeneralError', 500, 'general-error', data);
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
return GeneralError;
|
|
2021
|
-
}(FeathersError);
|
|
2022
|
-
|
|
2023
|
-
exports.GeneralError = GeneralError; // 501 - Not Implemented
|
|
2024
|
-
|
|
2025
|
-
var NotImplemented = /*#__PURE__*/function (_FeathersError15) {
|
|
2026
|
-
_inherits(NotImplemented, _FeathersError15);
|
|
2027
|
-
|
|
2028
|
-
var _super16 = _createSuper(NotImplemented);
|
|
2029
|
-
|
|
2030
|
-
function NotImplemented(message, data) {
|
|
2031
|
-
_classCallCheck(this, NotImplemented);
|
|
2032
|
-
|
|
2033
|
-
return _super16.call(this, message, 'NotImplemented', 501, 'not-implemented', data);
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
return NotImplemented;
|
|
2037
|
-
}(FeathersError);
|
|
2038
|
-
|
|
2039
|
-
exports.NotImplemented = NotImplemented; // 502 - Bad Gateway
|
|
2040
|
-
|
|
2041
|
-
var BadGateway = /*#__PURE__*/function (_FeathersError16) {
|
|
2042
|
-
_inherits(BadGateway, _FeathersError16);
|
|
2043
|
-
|
|
2044
|
-
var _super17 = _createSuper(BadGateway);
|
|
2045
|
-
|
|
2046
|
-
function BadGateway(message, data) {
|
|
2047
|
-
_classCallCheck(this, BadGateway);
|
|
2048
|
-
|
|
2049
|
-
return _super17.call(this, message, 'BadGateway', 502, 'bad-gateway', data);
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
return BadGateway;
|
|
2053
|
-
}(FeathersError);
|
|
2054
|
-
|
|
2055
|
-
exports.BadGateway = BadGateway; // 503 - Unavailable
|
|
2056
|
-
|
|
2057
|
-
var Unavailable = /*#__PURE__*/function (_FeathersError17) {
|
|
2058
|
-
_inherits(Unavailable, _FeathersError17);
|
|
2059
|
-
|
|
2060
|
-
var _super18 = _createSuper(Unavailable);
|
|
2061
|
-
|
|
2062
|
-
function Unavailable(message, data) {
|
|
2063
|
-
_classCallCheck(this, Unavailable);
|
|
2064
|
-
|
|
2065
|
-
return _super18.call(this, message, 'Unavailable', 503, 'unavailable', data);
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
return Unavailable;
|
|
2069
|
-
}(FeathersError);
|
|
2070
|
-
|
|
2071
|
-
exports.Unavailable = Unavailable;
|
|
2072
|
-
exports.errors = {
|
|
2073
|
-
FeathersError: FeathersError,
|
|
2074
|
-
BadRequest: BadRequest,
|
|
2075
|
-
NotAuthenticated: NotAuthenticated,
|
|
2076
|
-
PaymentError: PaymentError,
|
|
2077
|
-
Forbidden: Forbidden,
|
|
2078
|
-
NotFound: NotFound,
|
|
2079
|
-
MethodNotAllowed: MethodNotAllowed,
|
|
2080
|
-
NotAcceptable: NotAcceptable,
|
|
2081
|
-
Timeout: Timeout,
|
|
2082
|
-
Conflict: Conflict,
|
|
2083
|
-
LengthRequired: LengthRequired,
|
|
2084
|
-
Unprocessable: Unprocessable,
|
|
2085
|
-
TooManyRequests: TooManyRequests,
|
|
2086
|
-
GeneralError: GeneralError,
|
|
2087
|
-
NotImplemented: NotImplemented,
|
|
2088
|
-
BadGateway: BadGateway,
|
|
2089
|
-
Unavailable: Unavailable,
|
|
2090
|
-
400: BadRequest,
|
|
2091
|
-
401: NotAuthenticated,
|
|
2092
|
-
402: PaymentError,
|
|
2093
|
-
403: Forbidden,
|
|
2094
|
-
404: NotFound,
|
|
2095
|
-
405: MethodNotAllowed,
|
|
2096
|
-
406: NotAcceptable,
|
|
2097
|
-
408: Timeout,
|
|
2098
|
-
409: Conflict,
|
|
2099
|
-
410: Gone,
|
|
2100
|
-
411: LengthRequired,
|
|
2101
|
-
422: Unprocessable,
|
|
2102
|
-
429: TooManyRequests,
|
|
2103
|
-
500: GeneralError,
|
|
2104
|
-
501: NotImplemented,
|
|
2105
|
-
502: BadGateway,
|
|
2106
|
-
503: Unavailable
|
|
2107
|
-
};
|
|
2108
|
-
|
|
2109
|
-
function convert(error) {
|
|
2110
|
-
if (!error) {
|
|
2111
|
-
return error;
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
var FeathersError = exports.errors[error.name];
|
|
2115
|
-
var result = FeathersError ? new FeathersError(error.message, error.data) : new Error(error.message || error);
|
|
2116
|
-
|
|
2117
|
-
if (_typeof(error) === 'object') {
|
|
2118
|
-
Object.assign(result, error);
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
return result;
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
exports.convert = convert;
|
|
2125
|
-
|
|
2126
|
-
/***/ }),
|
|
2127
|
-
|
|
2128
|
-
/***/ "../socketio-client/lib/index.js":
|
|
2129
|
-
/*!***************************************!*\
|
|
2130
|
-
!*** ../socketio-client/lib/index.js ***!
|
|
2131
|
-
\***************************************/
|
|
2132
|
-
/*! no static exports found */
|
|
2133
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2134
|
-
|
|
2135
|
-
var Service = __webpack_require__(/*! @feathersjs/transport-commons/client */ "../transport-commons/client.js");
|
|
2136
|
-
|
|
2137
|
-
function socketioClient(connection, options) {
|
|
2138
|
-
if (!connection) {
|
|
2139
|
-
throw new Error('Socket.io connection needs to be provided');
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
var defaultService = function defaultService(name) {
|
|
2143
|
-
var _this = this;
|
|
2144
|
-
|
|
2145
|
-
var events = Object.keys(this.eventMappings || {}).map(function (method) {
|
|
2146
|
-
return _this.eventMappings[method];
|
|
2147
|
-
});
|
|
2148
|
-
var settings = Object.assign({}, options, {
|
|
2149
|
-
events: events,
|
|
2150
|
-
name: name,
|
|
2151
|
-
connection: connection,
|
|
2152
|
-
method: 'emit'
|
|
2153
|
-
});
|
|
2154
|
-
return new Service(settings);
|
|
2155
|
-
};
|
|
2156
|
-
|
|
2157
|
-
var initialize = function initialize(app) {
|
|
2158
|
-
if (typeof app.defaultService === 'function') {
|
|
2159
|
-
throw new Error('Only one default client provider can be configured');
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
app.io = connection;
|
|
2163
|
-
app.defaultService = defaultService;
|
|
2164
|
-
};
|
|
2165
|
-
|
|
2166
|
-
initialize.Service = Service;
|
|
2167
|
-
initialize.service = defaultService;
|
|
2168
|
-
return initialize;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
module.exports = socketioClient;
|
|
2172
|
-
module.exports.default = socketioClient;
|
|
2173
|
-
|
|
2174
|
-
/***/ }),
|
|
2175
|
-
|
|
2176
|
-
/***/ "../transport-commons/client.js":
|
|
2177
|
-
/*!**************************************!*\
|
|
2178
|
-
!*** ../transport-commons/client.js ***!
|
|
2179
|
-
\**************************************/
|
|
2180
|
-
/*! no static exports found */
|
|
2181
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2182
|
-
|
|
2183
|
-
module.exports = __webpack_require__(/*! ./lib/client */ "../transport-commons/lib/client.js").Service;
|
|
2184
|
-
|
|
2185
|
-
/***/ }),
|
|
2186
|
-
|
|
2187
|
-
/***/ "../transport-commons/lib/client.js":
|
|
2188
|
-
/*!******************************************!*\
|
|
2189
|
-
!*** ../transport-commons/lib/client.js ***!
|
|
2190
|
-
\******************************************/
|
|
2191
|
-
/*! no static exports found */
|
|
2192
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2193
|
-
|
|
2194
|
-
"use strict";
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2198
|
-
|
|
2199
|
-
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); } }
|
|
2200
|
-
|
|
2201
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2202
|
-
|
|
2203
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
2204
|
-
return mod && mod.__esModule ? mod : {
|
|
2205
|
-
"default": mod
|
|
2206
|
-
};
|
|
2207
|
-
};
|
|
2208
|
-
|
|
2209
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2210
|
-
value: true
|
|
2211
|
-
});
|
|
2212
|
-
exports.Service = void 0;
|
|
2213
|
-
|
|
2214
|
-
var debug_1 = __importDefault(__webpack_require__(/*! debug */ "../../node_modules/debug/src/browser.js"));
|
|
2215
|
-
|
|
2216
|
-
var errors_1 = __webpack_require__(/*! @feathersjs/errors */ "../errors/lib/index.js");
|
|
2217
|
-
|
|
2218
|
-
var debug = debug_1.default('@feathersjs/transport-commons/client');
|
|
2219
|
-
var namespacedEmitterMethods = ['addListener', 'emit', 'listenerCount', 'listeners', 'on', 'once', 'prependListener', 'prependOnceListener', 'removeAllListeners', 'removeListener'];
|
|
2220
|
-
var otherEmitterMethods = ['eventNames', 'getMaxListeners', 'setMaxListeners'];
|
|
2221
|
-
|
|
2222
|
-
var addEmitterMethods = function addEmitterMethods(service) {
|
|
2223
|
-
otherEmitterMethods.forEach(function (method) {
|
|
2224
|
-
service[method] = function () {
|
|
2225
|
-
var _this$connection;
|
|
2226
|
-
|
|
2227
|
-
if (typeof this.connection[method] !== 'function') {
|
|
2228
|
-
throw new Error("Can not call '".concat(method, "' on the client service connection"));
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
return (_this$connection = this.connection)[method].apply(_this$connection, arguments);
|
|
2232
|
-
};
|
|
2233
|
-
}); // Methods that should add the namespace (service path)
|
|
2234
|
-
|
|
2235
|
-
namespacedEmitterMethods.forEach(function (method) {
|
|
2236
|
-
service[method] = function (name) {
|
|
2237
|
-
var _this$connection2;
|
|
2238
|
-
|
|
2239
|
-
if (typeof this.connection[method] !== 'function') {
|
|
2240
|
-
throw new Error("Can not call '".concat(method, "' on the client service connection"));
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
var eventName = "".concat(this.path, " ").concat(name);
|
|
2244
|
-
debug("Calling emitter method ".concat(method, " with ") + "namespaced event '".concat(eventName, "'"));
|
|
2245
|
-
|
|
2246
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2247
|
-
args[_key - 1] = arguments[_key];
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
var result = (_this$connection2 = this.connection)[method].apply(_this$connection2, [eventName].concat(args));
|
|
2251
|
-
|
|
2252
|
-
return result === this.connection ? this : result;
|
|
2253
|
-
};
|
|
2254
|
-
});
|
|
2255
|
-
};
|
|
2256
|
-
|
|
2257
|
-
var Service = /*#__PURE__*/function () {
|
|
2258
|
-
function Service(options) {
|
|
2259
|
-
_classCallCheck(this, Service);
|
|
2260
|
-
|
|
2261
|
-
this.events = options.events;
|
|
2262
|
-
this.path = options.name;
|
|
2263
|
-
this.connection = options.connection;
|
|
2264
|
-
this.method = options.method;
|
|
2265
|
-
addEmitterMethods(this);
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
_createClass(Service, [{
|
|
2269
|
-
key: "send",
|
|
2270
|
-
value: function send(method) {
|
|
2271
|
-
var _this = this;
|
|
2272
|
-
|
|
2273
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
2274
|
-
args[_key2 - 1] = arguments[_key2];
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
return new Promise(function (resolve, reject) {
|
|
2278
|
-
var _this$connection3;
|
|
2279
|
-
|
|
2280
|
-
args.unshift(method, _this.path);
|
|
2281
|
-
args.push(function (error, data) {
|
|
2282
|
-
return error ? reject(errors_1.convert(error)) : resolve(data);
|
|
2283
|
-
});
|
|
2284
|
-
debug("Sending socket.".concat(_this.method), args);
|
|
2285
|
-
|
|
2286
|
-
(_this$connection3 = _this.connection)[_this.method].apply(_this$connection3, args);
|
|
2287
|
-
});
|
|
2288
|
-
}
|
|
2289
|
-
}, {
|
|
2290
|
-
key: "find",
|
|
2291
|
-
value: function find() {
|
|
2292
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2293
|
-
return this.send('find', params.query || {});
|
|
2294
|
-
}
|
|
2295
|
-
}, {
|
|
2296
|
-
key: "get",
|
|
2297
|
-
value: function get(id) {
|
|
2298
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2299
|
-
return this.send('get', id, params.query || {});
|
|
2300
|
-
}
|
|
2301
|
-
}, {
|
|
2302
|
-
key: "create",
|
|
2303
|
-
value: function create(data) {
|
|
2304
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2305
|
-
return this.send('create', data, params.query || {});
|
|
2306
|
-
}
|
|
2307
|
-
}, {
|
|
2308
|
-
key: "update",
|
|
2309
|
-
value: function update(id, data) {
|
|
2310
|
-
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
2311
|
-
return this.send('update', id, data, params.query || {});
|
|
2312
|
-
}
|
|
2313
|
-
}, {
|
|
2314
|
-
key: "patch",
|
|
2315
|
-
value: function patch(id, data) {
|
|
2316
|
-
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
2317
|
-
return this.send('patch', id, data, params.query || {});
|
|
2318
|
-
}
|
|
2319
|
-
}, {
|
|
2320
|
-
key: "remove",
|
|
2321
|
-
value: function remove(id) {
|
|
2322
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2323
|
-
return this.send('remove', id, params.query || {});
|
|
2324
|
-
} // `off` is actually not part of the Node event emitter spec
|
|
2325
|
-
// but we are adding it since everybody is expecting it because
|
|
2326
|
-
// of the emitter-component Socket.io is using
|
|
2327
|
-
|
|
2328
|
-
}, {
|
|
2329
|
-
key: "off",
|
|
2330
|
-
value: function off(name) {
|
|
2331
|
-
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
2332
|
-
args[_key3 - 1] = arguments[_key3];
|
|
2333
|
-
}
|
|
2334
|
-
|
|
2335
|
-
if (typeof this.connection.off === 'function') {
|
|
2336
|
-
var _this$connection4;
|
|
2337
|
-
|
|
2338
|
-
var result = (_this$connection4 = this.connection).off.apply(_this$connection4, ["".concat(this.path, " ").concat(name)].concat(args));
|
|
2339
|
-
|
|
2340
|
-
return result === this.connection ? this : result;
|
|
2341
|
-
} else if (args.length === 0) {
|
|
2342
|
-
// @ts-ignore
|
|
2343
|
-
return this.removeAllListeners(name);
|
|
2344
|
-
} // @ts-ignore
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
return this.removeListener.apply(this, [name].concat(args));
|
|
2348
|
-
}
|
|
2349
|
-
}]);
|
|
2350
|
-
|
|
2351
|
-
return Service;
|
|
2352
|
-
}();
|
|
2353
|
-
|
|
2354
|
-
exports.Service = Service;
|
|
2355
|
-
|
|
2356
|
-
/***/ }),
|
|
2357
|
-
|
|
2358
|
-
/***/ "./src/socketio.js":
|
|
2359
|
-
/*!*************************!*\
|
|
2360
|
-
!*** ./src/socketio.js ***!
|
|
2361
|
-
\*************************/
|
|
2362
|
-
/*! no static exports found */
|
|
2363
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2364
|
-
|
|
2365
|
-
module.exports = __webpack_require__(/*! @feathersjs/socketio-client */ "../socketio-client/lib/index.js");
|
|
2366
|
-
|
|
2367
|
-
/***/ }),
|
|
2368
|
-
|
|
2369
|
-
/***/ 0:
|
|
2370
|
-
/*!***********************************************************!*\
|
|
2371
|
-
!*** multi regenerator-runtime/runtime ./src/socketio.js ***!
|
|
2372
|
-
\***********************************************************/
|
|
2373
|
-
/*! no static exports found */
|
|
2374
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2375
|
-
|
|
2376
|
-
__webpack_require__(/*! regenerator-runtime/runtime */"../../node_modules/regenerator-runtime/runtime.js");
|
|
2377
|
-
module.exports = __webpack_require__(/*! ./src/socketio.js */"./src/socketio.js");
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
/***/ })
|
|
2381
|
-
|
|
2382
|
-
/******/ });
|
|
2383
|
-
});
|
|
2384
|
-
//# sourceMappingURL=socketio.js.map
|