@feathersjs/client 5.0.44 → 5.0.45
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 +4 -0
- package/dist/core.js +1417 -1413
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/feathers.js +4476 -4507
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -1
- package/package.json +11 -11
package/dist/core.js
CHANGED
|
@@ -12,462 +12,346 @@ return /******/ (function() { // webpackBootstrap
|
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/ "
|
|
16
|
-
|
|
17
|
-
!***
|
|
18
|
-
|
|
19
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
24
|
-
value: true
|
|
25
|
-
}));
|
|
26
|
-
exports.noopDebug = noopDebug;
|
|
27
|
-
exports.setDebug = setDebug;
|
|
28
|
-
exports.createDebug = createDebug;
|
|
29
|
-
var debuggers = {};
|
|
30
|
-
function noopDebug() {
|
|
31
|
-
return function () {};
|
|
32
|
-
}
|
|
33
|
-
var defaultInitializer = noopDebug;
|
|
34
|
-
function setDebug(debug) {
|
|
35
|
-
defaultInitializer = debug;
|
|
36
|
-
Object.keys(debuggers).forEach(function (name) {
|
|
37
|
-
debuggers[name] = debug(name);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function createDebug(name) {
|
|
41
|
-
if (!debuggers[name]) {
|
|
42
|
-
debuggers[name] = defaultInitializer(name);
|
|
43
|
-
}
|
|
44
|
-
return function () {
|
|
45
|
-
return debuggers[name].apply(debuggers, arguments);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/***/ }),
|
|
50
|
-
|
|
51
|
-
/***/ "../commons/lib/index.js":
|
|
52
|
-
/*!*******************************!*\
|
|
53
|
-
!*** ../commons/lib/index.js ***!
|
|
54
|
-
\*******************************/
|
|
15
|
+
/***/ "../../node_modules/@feathersjs/hooks/script/base.js":
|
|
16
|
+
/*!***********************************************************!*\
|
|
17
|
+
!*** ../../node_modules/@feathersjs/hooks/script/base.js ***!
|
|
18
|
+
\***********************************************************/
|
|
55
19
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
56
20
|
|
|
57
21
|
|
|
58
22
|
|
|
59
|
-
function
|
|
60
|
-
function
|
|
61
|
-
function
|
|
23
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
24
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
25
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
28
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
29
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
62
30
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
63
|
-
function
|
|
64
|
-
function
|
|
31
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
32
|
+
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."); }
|
|
65
33
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
34
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
35
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
66
36
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
67
|
-
function
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
73
|
-
desc = {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function get() {
|
|
76
|
-
return m[k];
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
Object.defineProperty(o, k2, desc);
|
|
81
|
-
} : function (o, m, k, k2) {
|
|
82
|
-
if (k2 === undefined) k2 = k;
|
|
83
|
-
o[k2] = m[k];
|
|
84
|
-
});
|
|
85
|
-
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
86
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
87
|
-
};
|
|
37
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
38
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
39
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
40
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
41
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
88
42
|
Object.defineProperty(exports, "__esModule", ({
|
|
89
43
|
value: true
|
|
90
44
|
}));
|
|
91
|
-
exports.
|
|
92
|
-
|
|
93
|
-
exports.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
45
|
+
exports.setMiddleware = exports.getMiddleware = exports.setManager = exports.getManager = exports.convertOptions = exports.HookManager = exports.BaseHookContext = exports.HOOKS = void 0;
|
|
46
|
+
var utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@feathersjs/hooks/script/utils.js");
|
|
47
|
+
exports.HOOKS = Symbol.for('@feathersjs/hooks');
|
|
48
|
+
/**
|
|
49
|
+
* The base hook context.
|
|
50
|
+
*/
|
|
51
|
+
var BaseHookContext = /*#__PURE__*/function () {
|
|
52
|
+
function BaseHookContext() {
|
|
53
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
54
|
+
_classCallCheck(this, BaseHookContext);
|
|
55
|
+
Object.defineProperty(this, "self", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
value: void 0
|
|
60
|
+
});
|
|
61
|
+
Object.assign(this, data);
|
|
62
|
+
}
|
|
63
|
+
return _createClass(BaseHookContext, [{
|
|
64
|
+
key: "toJSON",
|
|
65
|
+
value: function toJSON() {
|
|
66
|
+
var _this = this;
|
|
67
|
+
var keys = Object.keys(this);
|
|
68
|
+
var proto = Object.getPrototypeOf(this);
|
|
69
|
+
while (proto) {
|
|
70
|
+
keys.push.apply(keys, _toConsumableArray(Object.keys(proto)));
|
|
71
|
+
proto = Object.getPrototypeOf(proto);
|
|
72
|
+
}
|
|
73
|
+
return keys.reduce(function (result, key) {
|
|
74
|
+
result[key] = _this[key];
|
|
75
|
+
return result;
|
|
76
|
+
}, {});
|
|
108
77
|
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
78
|
+
}]);
|
|
79
|
+
}();
|
|
80
|
+
exports.BaseHookContext = BaseHookContext;
|
|
81
|
+
var HookManager = /*#__PURE__*/function () {
|
|
82
|
+
function HookManager() {
|
|
83
|
+
_classCallCheck(this, HookManager);
|
|
84
|
+
Object.defineProperty(this, "_parent", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
value: null
|
|
118
89
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
125
|
-
val = _ref4[0],
|
|
126
|
-
key = _ref4[1];
|
|
127
|
-
return callback(val, key);
|
|
90
|
+
Object.defineProperty(this, "_params", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
configurable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
value: null
|
|
128
95
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return exports._.keys(obj).map(function (key) {
|
|
135
|
-
return obj[key];
|
|
96
|
+
Object.defineProperty(this, "_middleware", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
configurable: true,
|
|
99
|
+
writable: true,
|
|
100
|
+
value: null
|
|
136
101
|
});
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
102
|
+
Object.defineProperty(this, "_props", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
configurable: true,
|
|
105
|
+
writable: true,
|
|
106
|
+
value: null
|
|
141
107
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
rest[_key - 1] = arguments[_key];
|
|
108
|
+
Object.defineProperty(this, "_defaults", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
configurable: true,
|
|
111
|
+
writable: true,
|
|
112
|
+
value: void 0
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return _createClass(HookManager, [{
|
|
116
|
+
key: "parent",
|
|
117
|
+
value: function parent(_parent) {
|
|
118
|
+
this._parent = _parent;
|
|
119
|
+
return this;
|
|
155
120
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
keys[_key2 - 1] = arguments[_key2];
|
|
121
|
+
}, {
|
|
122
|
+
key: "middleware",
|
|
123
|
+
value: function middleware(_middleware) {
|
|
124
|
+
this._middleware = _middleware !== null && _middleware !== void 0 && _middleware.length ? _middleware : null;
|
|
125
|
+
return this;
|
|
162
126
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
127
|
+
}, {
|
|
128
|
+
key: "getMiddleware",
|
|
129
|
+
value: function getMiddleware() {
|
|
130
|
+
var _this$_parent;
|
|
131
|
+
var previous = (_this$_parent = this._parent) === null || _this$_parent === void 0 ? void 0 : _this$_parent.getMiddleware();
|
|
132
|
+
if (previous && this._middleware) {
|
|
133
|
+
return previous.concat(this._middleware);
|
|
134
|
+
}
|
|
135
|
+
return previous || this._middleware;
|
|
171
136
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
137
|
+
}, {
|
|
138
|
+
key: "collectMiddleware",
|
|
139
|
+
value: function collectMiddleware(self, _args) {
|
|
140
|
+
var otherMiddleware = getMiddleware(self);
|
|
141
|
+
var middleware = this.getMiddleware();
|
|
142
|
+
if (otherMiddleware && middleware) {
|
|
143
|
+
return otherMiddleware.concat(middleware);
|
|
175
144
|
}
|
|
176
|
-
return
|
|
177
|
-
}, {});
|
|
178
|
-
},
|
|
179
|
-
// Recursively merge the source object into the target object
|
|
180
|
-
merge: function merge(target, source) {
|
|
181
|
-
if (exports._.isObject(target) && exports._.isObject(source)) {
|
|
182
|
-
Object.keys(source).forEach(function (key) {
|
|
183
|
-
if (exports._.isObject(source[key])) {
|
|
184
|
-
if (!target[key]) {
|
|
185
|
-
Object.assign(target, _defineProperty({}, key, {}));
|
|
186
|
-
}
|
|
187
|
-
exports._.merge(target[key], source[key]);
|
|
188
|
-
} else {
|
|
189
|
-
Object.assign(target, _defineProperty({}, key, source[key]));
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
return target;
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
// Duck-checks if an object looks like a promise
|
|
197
|
-
function isPromise(result) {
|
|
198
|
-
return exports._.isObject(result) && typeof result.then === 'function';
|
|
199
|
-
}
|
|
200
|
-
function createSymbol(name) {
|
|
201
|
-
return typeof Symbol !== 'undefined' ? Symbol.for(name) : name;
|
|
202
|
-
}
|
|
203
|
-
__exportStar(__webpack_require__(/*! ./debug */ "../commons/lib/debug.js"), exports);
|
|
204
|
-
|
|
205
|
-
/***/ }),
|
|
206
|
-
|
|
207
|
-
/***/ "../feathers/lib/application.js":
|
|
208
|
-
/*!**************************************!*\
|
|
209
|
-
!*** ../feathers/lib/application.js ***!
|
|
210
|
-
\**************************************/
|
|
211
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
216
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
217
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
218
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
219
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
220
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
221
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
222
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
223
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
224
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
225
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
226
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
227
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
228
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
229
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
230
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
231
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
232
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
233
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
234
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
235
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
236
|
-
return mod && mod.__esModule ? mod : {
|
|
237
|
-
"default": mod
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
241
|
-
value: true
|
|
242
|
-
}));
|
|
243
|
-
exports.Feathers = void 0;
|
|
244
|
-
var version_1 = __importDefault(__webpack_require__(/*! ./version */ "../feathers/lib/version.js"));
|
|
245
|
-
var events_1 = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
246
|
-
var commons_1 = __webpack_require__(/*! @feathersjs/commons */ "../commons/lib/index.js");
|
|
247
|
-
var hooks_1 = __webpack_require__(/*! @feathersjs/hooks */ "../../node_modules/@feathersjs/hooks/script/index.js");
|
|
248
|
-
var events_2 = __webpack_require__(/*! ./events */ "../feathers/lib/events.js");
|
|
249
|
-
var hooks_2 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
250
|
-
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
251
|
-
var hooks_3 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
252
|
-
var debug = (0, commons_1.createDebug)('@feathersjs/feathers');
|
|
253
|
-
var Feathers = /*#__PURE__*/function (_events_1$EventEmitte) {
|
|
254
|
-
function Feathers() {
|
|
255
|
-
var _this;
|
|
256
|
-
_classCallCheck(this, Feathers);
|
|
257
|
-
_this = _callSuper(this, Feathers);
|
|
258
|
-
_this.services = {};
|
|
259
|
-
_this.settings = {};
|
|
260
|
-
_this.mixins = [hooks_2.hookMixin, events_2.eventMixin];
|
|
261
|
-
_this.version = version_1.default;
|
|
262
|
-
_this._isSetup = false;
|
|
263
|
-
_this.registerHooks = (0, hooks_3.enableHooks)(_this);
|
|
264
|
-
_this.registerHooks({
|
|
265
|
-
around: [events_2.eventHook]
|
|
266
|
-
});
|
|
267
|
-
return _this;
|
|
268
|
-
}
|
|
269
|
-
_inherits(Feathers, _events_1$EventEmitte);
|
|
270
|
-
return _createClass(Feathers, [{
|
|
271
|
-
key: "get",
|
|
272
|
-
value: function get(name) {
|
|
273
|
-
return this.settings[name];
|
|
145
|
+
return otherMiddleware || middleware || [];
|
|
274
146
|
}
|
|
275
147
|
}, {
|
|
276
|
-
key: "
|
|
277
|
-
value: function
|
|
278
|
-
this.
|
|
148
|
+
key: "props",
|
|
149
|
+
value: function props(_props) {
|
|
150
|
+
if (!this._props) {
|
|
151
|
+
this._props = {};
|
|
152
|
+
}
|
|
153
|
+
(0, utils_js_1.copyProperties)(this._props, _props);
|
|
279
154
|
return this;
|
|
280
155
|
}
|
|
281
156
|
}, {
|
|
282
|
-
key: "
|
|
283
|
-
value: function
|
|
284
|
-
|
|
285
|
-
|
|
157
|
+
key: "getProps",
|
|
158
|
+
value: function getProps() {
|
|
159
|
+
var _this$_parent2;
|
|
160
|
+
var previous = (_this$_parent2 = this._parent) === null || _this$_parent2 === void 0 ? void 0 : _this$_parent2.getProps();
|
|
161
|
+
if (previous && this._props) {
|
|
162
|
+
return (0, utils_js_1.copyProperties)({}, previous, this._props);
|
|
163
|
+
}
|
|
164
|
+
return previous || this._props || null;
|
|
286
165
|
}
|
|
287
166
|
}, {
|
|
288
|
-
key: "
|
|
289
|
-
value: function
|
|
290
|
-
|
|
167
|
+
key: "params",
|
|
168
|
+
value: function params() {
|
|
169
|
+
for (var _len = arguments.length, _params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
170
|
+
_params[_key] = arguments[_key];
|
|
171
|
+
}
|
|
172
|
+
this._params = _params;
|
|
173
|
+
return this;
|
|
291
174
|
}
|
|
292
175
|
}, {
|
|
293
|
-
key: "
|
|
294
|
-
value: function
|
|
295
|
-
var
|
|
296
|
-
var
|
|
297
|
-
if (
|
|
298
|
-
|
|
299
|
-
return this.service(path);
|
|
176
|
+
key: "getParams",
|
|
177
|
+
value: function getParams() {
|
|
178
|
+
var _this$_parent3;
|
|
179
|
+
var previous = (_this$_parent3 = this._parent) === null || _this$_parent3 === void 0 ? void 0 : _this$_parent3.getParams();
|
|
180
|
+
if (previous && this._params) {
|
|
181
|
+
return previous.concat(this._params);
|
|
300
182
|
}
|
|
301
|
-
return
|
|
183
|
+
return previous || this._params;
|
|
302
184
|
}
|
|
303
185
|
}, {
|
|
304
|
-
key: "
|
|
305
|
-
value: function
|
|
306
|
-
|
|
307
|
-
this
|
|
308
|
-
return Object.keys(this.services).reduce(function (current, path) {
|
|
309
|
-
return current.then(function () {
|
|
310
|
-
var service = _this2.service(path);
|
|
311
|
-
if (typeof service.setup === 'function') {
|
|
312
|
-
debug("Setting up service for `".concat(path, "`"));
|
|
313
|
-
return service.setup(_this2, path);
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}, Promise.resolve()).then(function () {
|
|
317
|
-
return _this2;
|
|
318
|
-
});
|
|
186
|
+
key: "defaults",
|
|
187
|
+
value: function defaults(_defaults) {
|
|
188
|
+
this._defaults = _defaults;
|
|
189
|
+
return this;
|
|
319
190
|
}
|
|
320
191
|
}, {
|
|
321
|
-
key: "
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
192
|
+
key: "getDefaults",
|
|
193
|
+
value: function getDefaults(self, args, context) {
|
|
194
|
+
var _this$_parent4;
|
|
195
|
+
var defaults = typeof this._defaults === 'function' ? this._defaults(self, args, context) : null;
|
|
196
|
+
var previous = (_this$_parent4 = this._parent) === null || _this$_parent4 === void 0 ? void 0 : _this$_parent4.getDefaults(self, args, context);
|
|
197
|
+
if (previous && defaults) {
|
|
198
|
+
return Object.assign({}, previous, defaults);
|
|
199
|
+
}
|
|
200
|
+
return previous || defaults;
|
|
329
201
|
}
|
|
330
202
|
}, {
|
|
331
|
-
key: "
|
|
332
|
-
value: function
|
|
333
|
-
var
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
203
|
+
key: "getContextClass",
|
|
204
|
+
value: function getContextClass() {
|
|
205
|
+
var Base = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : BaseHookContext;
|
|
206
|
+
var ContextClass = /*#__PURE__*/function (_Base) {
|
|
207
|
+
function ContextClass(data) {
|
|
208
|
+
_classCallCheck(this, ContextClass);
|
|
209
|
+
return _callSuper(this, ContextClass, [data]);
|
|
210
|
+
}
|
|
211
|
+
_inherits(ContextClass, _Base);
|
|
212
|
+
return _createClass(ContextClass);
|
|
213
|
+
}(Base);
|
|
214
|
+
var params = this.getParams();
|
|
215
|
+
var props = this.getProps();
|
|
216
|
+
if (params) {
|
|
217
|
+
params.forEach(function (name, index) {
|
|
218
|
+
if ((props === null || props === void 0 ? void 0 : props[name]) !== undefined) {
|
|
219
|
+
throw new Error("Hooks can not have a property and param named '".concat(name, "'. Use .defaults instead."));
|
|
341
220
|
}
|
|
221
|
+
Object.defineProperty(ContextClass.prototype, name, {
|
|
222
|
+
enumerable: true,
|
|
223
|
+
get: function get() {
|
|
224
|
+
return this === null || this === void 0 ? void 0 : this.arguments[index];
|
|
225
|
+
},
|
|
226
|
+
set: function set(value) {
|
|
227
|
+
this.arguments[index] = value;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
342
230
|
});
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
key: "teardown",
|
|
349
|
-
get: function get() {
|
|
350
|
-
return this._teardown;
|
|
351
|
-
},
|
|
352
|
-
set: function set(value) {
|
|
353
|
-
this._teardown = value[hooks_1.HOOKS] ? value : (0, hooks_1.hooks)(value, (0, hooks_1.middleware)().params('server').props({
|
|
354
|
-
app: this
|
|
355
|
-
}));
|
|
231
|
+
}
|
|
232
|
+
if (props) {
|
|
233
|
+
(0, utils_js_1.copyProperties)(ContextClass.prototype, props);
|
|
234
|
+
}
|
|
235
|
+
return ContextClass;
|
|
356
236
|
}
|
|
357
237
|
}, {
|
|
358
|
-
key: "
|
|
359
|
-
value: function
|
|
360
|
-
var
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
var location = (0, commons_1.stripSlashes)(path) || '/';
|
|
365
|
-
var subApp = service;
|
|
366
|
-
var isSubApp = typeof subApp.service === 'function' && subApp.services;
|
|
367
|
-
if (isSubApp) {
|
|
368
|
-
Object.keys(subApp.services).forEach(function (subPath) {
|
|
369
|
-
return _this4.use("".concat(location, "/").concat(subPath), subApp.service(subPath));
|
|
370
|
-
});
|
|
371
|
-
return this;
|
|
238
|
+
key: "initializeContext",
|
|
239
|
+
value: function initializeContext(self, args, context) {
|
|
240
|
+
var ctx = this._parent ? this._parent.initializeContext(self, args, context) : context;
|
|
241
|
+
var defaults = this.getDefaults(self, args, ctx);
|
|
242
|
+
if (self) {
|
|
243
|
+
ctx.self = self;
|
|
372
244
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
var name = _step.value;
|
|
380
|
-
if (serviceOptions.methods.includes(name)) {
|
|
381
|
-
throw new Error("'".concat(name, "' on service '").concat(location, "' is not allowed as a custom method name"));
|
|
245
|
+
ctx.arguments = args;
|
|
246
|
+
if (defaults) {
|
|
247
|
+
for (var _i = 0, _Object$keys = Object.keys(defaults); _i < _Object$keys.length; _i++) {
|
|
248
|
+
var name = _Object$keys[_i];
|
|
249
|
+
if (ctx[name] === undefined) {
|
|
250
|
+
ctx[name] = defaults[name];
|
|
382
251
|
}
|
|
383
252
|
}
|
|
384
|
-
} catch (err) {
|
|
385
|
-
_iterator.e(err);
|
|
386
|
-
} finally {
|
|
387
|
-
_iterator.f();
|
|
388
|
-
}
|
|
389
|
-
debug("Registering new service at `".concat(location, "`"));
|
|
390
|
-
// Add all the mixins
|
|
391
|
-
this.mixins.forEach(function (fn) {
|
|
392
|
-
return fn.call(_this4, protoService, location, serviceOptions);
|
|
393
|
-
});
|
|
394
|
-
this.services[location] = protoService;
|
|
395
|
-
// If we ran setup already, set this service up explicitly, this will not `await`
|
|
396
|
-
if (this._isSetup && typeof protoService.setup === 'function') {
|
|
397
|
-
debug("Setting up service for `".concat(location, "`"));
|
|
398
|
-
protoService.setup(this, location);
|
|
399
|
-
}
|
|
400
|
-
return this;
|
|
401
|
-
}
|
|
402
|
-
}, {
|
|
403
|
-
key: "unuse",
|
|
404
|
-
value: function () {
|
|
405
|
-
var _unuse = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(location) {
|
|
406
|
-
var path, service;
|
|
407
|
-
return _regenerator().w(function (_context) {
|
|
408
|
-
while (1) switch (_context.n) {
|
|
409
|
-
case 0:
|
|
410
|
-
path = (0, commons_1.stripSlashes)(location) || '/';
|
|
411
|
-
service = this.services[path];
|
|
412
|
-
if (!(service && typeof service.teardown === 'function')) {
|
|
413
|
-
_context.n = 1;
|
|
414
|
-
break;
|
|
415
|
-
}
|
|
416
|
-
_context.n = 1;
|
|
417
|
-
return service.teardown(this, path);
|
|
418
|
-
case 1:
|
|
419
|
-
delete this.services[path];
|
|
420
|
-
return _context.a(2, service);
|
|
421
|
-
}
|
|
422
|
-
}, _callee, this);
|
|
423
|
-
}));
|
|
424
|
-
function unuse(_x) {
|
|
425
|
-
return _unuse.apply(this, arguments);
|
|
426
|
-
}
|
|
427
|
-
return unuse;
|
|
428
|
-
}()
|
|
429
|
-
}, {
|
|
430
|
-
key: "hooks",
|
|
431
|
-
value: function hooks(hookMap) {
|
|
432
|
-
var untypedMap = hookMap;
|
|
433
|
-
if (untypedMap.before || untypedMap.after || untypedMap.error || untypedMap.around) {
|
|
434
|
-
// regular hooks for all service methods
|
|
435
|
-
this.registerHooks(untypedMap);
|
|
436
|
-
} else if (untypedMap.setup || untypedMap.teardown) {
|
|
437
|
-
// .setup and .teardown application hooks
|
|
438
|
-
(0, hooks_1.hooks)(this, untypedMap);
|
|
439
|
-
} else {
|
|
440
|
-
// Other registration formats are just `around` hooks
|
|
441
|
-
this.registerHooks({
|
|
442
|
-
around: untypedMap
|
|
443
|
-
});
|
|
444
253
|
}
|
|
445
|
-
return
|
|
254
|
+
return ctx;
|
|
446
255
|
}
|
|
447
256
|
}]);
|
|
448
|
-
}(
|
|
449
|
-
exports.
|
|
257
|
+
}();
|
|
258
|
+
exports.HookManager = HookManager;
|
|
259
|
+
function convertOptions() {
|
|
260
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
261
|
+
if (!options) {
|
|
262
|
+
return new HookManager();
|
|
263
|
+
}
|
|
264
|
+
return Array.isArray(options) ? new HookManager().middleware(options) : options;
|
|
265
|
+
}
|
|
266
|
+
exports.convertOptions = convertOptions;
|
|
267
|
+
function getManager(target) {
|
|
268
|
+
return target && target[exports.HOOKS] || null;
|
|
269
|
+
}
|
|
270
|
+
exports.getManager = getManager;
|
|
271
|
+
function setManager(target, manager) {
|
|
272
|
+
var parent = getManager(target);
|
|
273
|
+
target[exports.HOOKS] = manager.parent(parent);
|
|
274
|
+
return target;
|
|
275
|
+
}
|
|
276
|
+
exports.setManager = setManager;
|
|
277
|
+
function getMiddleware(target) {
|
|
278
|
+
var manager = getManager(target);
|
|
279
|
+
return manager ? manager.getMiddleware() : null;
|
|
280
|
+
}
|
|
281
|
+
exports.getMiddleware = getMiddleware;
|
|
282
|
+
function setMiddleware(target, middleware) {
|
|
283
|
+
var manager = new HookManager().middleware(middleware);
|
|
284
|
+
return setManager(target, manager);
|
|
285
|
+
}
|
|
286
|
+
exports.setMiddleware = setMiddleware;
|
|
450
287
|
|
|
451
288
|
/***/ }),
|
|
452
289
|
|
|
453
|
-
/***/ "
|
|
454
|
-
|
|
455
|
-
!***
|
|
456
|
-
|
|
290
|
+
/***/ "../../node_modules/@feathersjs/hooks/script/compose.js":
|
|
291
|
+
/*!**************************************************************!*\
|
|
292
|
+
!*** ../../node_modules/@feathersjs/hooks/script/compose.js ***!
|
|
293
|
+
\**************************************************************/
|
|
457
294
|
/***/ (function(__unused_webpack_module, exports) {
|
|
458
295
|
|
|
459
296
|
|
|
460
297
|
|
|
298
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
299
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
300
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
461
301
|
Object.defineProperty(exports, "__esModule", ({
|
|
462
302
|
value: true
|
|
463
303
|
}));
|
|
304
|
+
exports.compose = void 0;
|
|
305
|
+
function compose(middleware) {
|
|
306
|
+
if (!Array.isArray(middleware)) {
|
|
307
|
+
throw new TypeError('Middleware stack must be an array!');
|
|
308
|
+
}
|
|
309
|
+
var _iterator = _createForOfIteratorHelper(middleware),
|
|
310
|
+
_step;
|
|
311
|
+
try {
|
|
312
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
313
|
+
var fn = _step.value;
|
|
314
|
+
if (typeof fn !== 'function') {
|
|
315
|
+
throw new TypeError('Middleware must be composed of functions!');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
} catch (err) {
|
|
319
|
+
_iterator.e(err);
|
|
320
|
+
} finally {
|
|
321
|
+
_iterator.f();
|
|
322
|
+
}
|
|
323
|
+
return function (context, next) {
|
|
324
|
+
// last called middleware #
|
|
325
|
+
var index = -1;
|
|
326
|
+
return dispatch.call(this, 0);
|
|
327
|
+
function dispatch(i) {
|
|
328
|
+
if (i <= index) {
|
|
329
|
+
return Promise.reject(new Error('next() called multiple times'));
|
|
330
|
+
}
|
|
331
|
+
index = i;
|
|
332
|
+
var fn = middleware[i];
|
|
333
|
+
if (i === middleware.length) {
|
|
334
|
+
fn = next;
|
|
335
|
+
}
|
|
336
|
+
if (!fn) {
|
|
337
|
+
return Promise.resolve();
|
|
338
|
+
}
|
|
339
|
+
try {
|
|
340
|
+
return Promise.resolve(fn.call(this, context, dispatch.bind(this, i + 1)));
|
|
341
|
+
} catch (err) {
|
|
342
|
+
return Promise.reject(err);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
exports.compose = compose;
|
|
464
348
|
|
|
465
349
|
/***/ }),
|
|
466
350
|
|
|
467
|
-
/***/ "
|
|
468
|
-
|
|
469
|
-
!***
|
|
470
|
-
|
|
351
|
+
/***/ "../../node_modules/@feathersjs/hooks/script/hooks.js":
|
|
352
|
+
/*!************************************************************!*\
|
|
353
|
+
!*** ../../node_modules/@feathersjs/hooks/script/hooks.js ***!
|
|
354
|
+
\************************************************************/
|
|
471
355
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
472
356
|
|
|
473
357
|
|
|
@@ -475,268 +359,141 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
475
359
|
Object.defineProperty(exports, "__esModule", ({
|
|
476
360
|
value: true
|
|
477
361
|
}));
|
|
478
|
-
exports.
|
|
479
|
-
|
|
480
|
-
var
|
|
481
|
-
var
|
|
482
|
-
function
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
362
|
+
exports.legacyDecorator = exports.hookDecorator = exports.objectHooks = exports.functionHooks = exports.getOriginal = void 0;
|
|
363
|
+
var compose_js_1 = __webpack_require__(/*! ./compose.js */ "../../node_modules/@feathersjs/hooks/script/compose.js");
|
|
364
|
+
var base_js_1 = __webpack_require__(/*! ./base.js */ "../../node_modules/@feathersjs/hooks/script/base.js");
|
|
365
|
+
var utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@feathersjs/hooks/script/utils.js");
|
|
366
|
+
function getOriginal(fn) {
|
|
367
|
+
return typeof fn.original === 'function' ? getOriginal(fn.original) : fn;
|
|
368
|
+
}
|
|
369
|
+
exports.getOriginal = getOriginal;
|
|
370
|
+
function functionHooks(fn, managerOrMiddleware) {
|
|
371
|
+
if (typeof fn !== 'function') {
|
|
372
|
+
throw new Error('Can not apply hooks to non-function');
|
|
373
|
+
}
|
|
374
|
+
var manager = (0, base_js_1.convertOptions)(managerOrMiddleware);
|
|
375
|
+
var _wrapper = function wrapper() {
|
|
376
|
+
var _this = this;
|
|
377
|
+
var Context = _wrapper.Context,
|
|
378
|
+
original = _wrapper.original;
|
|
379
|
+
// If we got passed an existing HookContext instance, we want to return it as well
|
|
380
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
381
|
+
args[_key] = arguments[_key];
|
|
382
|
+
}
|
|
383
|
+
var returnContext = args[args.length - 1] instanceof Context;
|
|
384
|
+
// Use existing context or default
|
|
385
|
+
var base = returnContext ? args.pop() : new Context();
|
|
386
|
+
// Initialize the context
|
|
387
|
+
var context = manager.initializeContext(this, args, base);
|
|
388
|
+
// Assemble the hook chain
|
|
389
|
+
var hookChain = [
|
|
390
|
+
// Return `ctx.result` or the context
|
|
391
|
+
function (ctx, next) {
|
|
392
|
+
return next().then(function () {
|
|
393
|
+
return returnContext ? ctx : ctx.result;
|
|
494
394
|
});
|
|
395
|
+
}];
|
|
396
|
+
// Create the hook chain by calling the `collectMiddleware function
|
|
397
|
+
var mw = manager.collectMiddleware(this, args);
|
|
398
|
+
if (mw) {
|
|
399
|
+
Array.prototype.push.apply(hookChain, mw);
|
|
400
|
+
}
|
|
401
|
+
// Runs the actual original method if `ctx.result` is not already set
|
|
402
|
+
hookChain.push(function (ctx, next) {
|
|
403
|
+
if (!Object.prototype.hasOwnProperty.call(context, 'result')) {
|
|
404
|
+
return Promise.resolve(original.apply(_this, ctx.arguments)).then(function (result) {
|
|
405
|
+
ctx.result = result;
|
|
406
|
+
return next();
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
return next();
|
|
410
|
+
});
|
|
411
|
+
return (0, compose_js_1.compose)(hookChain).call(this, context);
|
|
412
|
+
};
|
|
413
|
+
(0, utils_js_1.copyFnProperties)(_wrapper, fn);
|
|
414
|
+
(0, utils_js_1.copyProperties)(_wrapper, fn);
|
|
415
|
+
(0, base_js_1.setManager)(_wrapper, manager);
|
|
416
|
+
return Object.assign(_wrapper, {
|
|
417
|
+
original: getOriginal(fn),
|
|
418
|
+
Context: manager.getContextClass(),
|
|
419
|
+
createContext: function createContext() {
|
|
420
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
421
|
+
return new _wrapper.Context(data);
|
|
495
422
|
}
|
|
496
423
|
});
|
|
497
424
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
if (
|
|
501
|
-
|
|
425
|
+
exports.functionHooks = functionHooks;
|
|
426
|
+
function objectHooks(obj, hooks) {
|
|
427
|
+
if (Array.isArray(hooks)) {
|
|
428
|
+
return (0, base_js_1.setMiddleware)(obj, hooks);
|
|
502
429
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
/*!********************************!*\
|
|
510
|
-
!*** ../feathers/lib/hooks.js ***!
|
|
511
|
-
\********************************/
|
|
512
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
517
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
518
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
519
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
520
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
521
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
522
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
523
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
524
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
525
|
-
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
526
|
-
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
527
|
-
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
528
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
529
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
530
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
531
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
532
|
-
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."); }
|
|
533
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
534
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
535
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
536
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
537
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
538
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
539
|
-
value: true
|
|
540
|
-
}));
|
|
541
|
-
exports.FeathersHookManager = void 0;
|
|
542
|
-
exports.convertHookData = convertHookData;
|
|
543
|
-
exports.collectHooks = collectHooks;
|
|
544
|
-
exports.enableHooks = enableHooks;
|
|
545
|
-
exports.createContext = createContext;
|
|
546
|
-
exports.hookMixin = hookMixin;
|
|
547
|
-
var hooks_1 = __webpack_require__(/*! @feathersjs/hooks */ "../../node_modules/@feathersjs/hooks/script/index.js");
|
|
548
|
-
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
549
|
-
var types = ['before', 'after', 'error', 'around'];
|
|
550
|
-
var isType = function isType(value) {
|
|
551
|
-
return types.includes(value);
|
|
552
|
-
};
|
|
553
|
-
// Converts different hook registration formats into the
|
|
554
|
-
// same internal format
|
|
555
|
-
function convertHookData(input) {
|
|
556
|
-
var result = {};
|
|
557
|
-
if (Array.isArray(input)) {
|
|
558
|
-
result.all = input;
|
|
559
|
-
} else if (_typeof(input) !== 'object') {
|
|
560
|
-
result.all = [input];
|
|
561
|
-
} else {
|
|
562
|
-
for (var _i = 0, _Object$keys = Object.keys(input); _i < _Object$keys.length; _i++) {
|
|
563
|
-
var key = _Object$keys[_i];
|
|
564
|
-
var value = input[key];
|
|
565
|
-
result[key] = Array.isArray(value) ? value : [value];
|
|
430
|
+
for (var _i = 0, _Object$keys = Object.keys(hooks); _i < _Object$keys.length; _i++) {
|
|
431
|
+
var method = _Object$keys[_i];
|
|
432
|
+
var target = typeof obj[method] === 'function' ? obj : obj.prototype;
|
|
433
|
+
var fn = target && target[method];
|
|
434
|
+
if (typeof fn !== 'function') {
|
|
435
|
+
throw new Error("Can not apply hooks. '".concat(method, "' is not a function"));
|
|
566
436
|
}
|
|
437
|
+
var manager = (0, base_js_1.convertOptions)(hooks[method]);
|
|
438
|
+
target[method] = functionHooks(fn, manager.props({
|
|
439
|
+
method: method
|
|
440
|
+
}));
|
|
567
441
|
}
|
|
568
|
-
return
|
|
569
|
-
}
|
|
570
|
-
function collectHooks(target, method) {
|
|
571
|
-
var _target$__hooks = target.__hooks,
|
|
572
|
-
collected = _target$__hooks.collected,
|
|
573
|
-
collectedAll = _target$__hooks.collectedAll,
|
|
574
|
-
around = _target$__hooks.around;
|
|
575
|
-
return [].concat(_toConsumableArray(around.all || []), _toConsumableArray(around[method] || []), _toConsumableArray(collectedAll.before || []), _toConsumableArray(collected[method] || []), _toConsumableArray(collectedAll.after || []));
|
|
576
|
-
}
|
|
577
|
-
// Add `.hooks` functionality to an object
|
|
578
|
-
function enableHooks(object) {
|
|
579
|
-
var store = {
|
|
580
|
-
around: {},
|
|
581
|
-
before: {},
|
|
582
|
-
after: {},
|
|
583
|
-
error: {},
|
|
584
|
-
collected: {},
|
|
585
|
-
collectedAll: {}
|
|
586
|
-
};
|
|
587
|
-
Object.defineProperty(object, '__hooks', {
|
|
588
|
-
configurable: true,
|
|
589
|
-
value: store,
|
|
590
|
-
writable: true
|
|
591
|
-
});
|
|
592
|
-
return function registerHooks(input) {
|
|
593
|
-
var store = this.__hooks;
|
|
594
|
-
var map = Object.keys(input).reduce(function (map, type) {
|
|
595
|
-
if (!isType(type)) {
|
|
596
|
-
throw new Error("'".concat(type, "' is not a valid hook type"));
|
|
597
|
-
}
|
|
598
|
-
map[type] = convertHookData(input[type]);
|
|
599
|
-
return map;
|
|
600
|
-
}, {});
|
|
601
|
-
var types = Object.keys(map);
|
|
602
|
-
types.forEach(function (type) {
|
|
603
|
-
return Object.keys(map[type]).forEach(function (method) {
|
|
604
|
-
var _a;
|
|
605
|
-
var mapHooks = map[type][method];
|
|
606
|
-
var storeHooks = (_a = store[type])[method] || (_a[method] = []);
|
|
607
|
-
storeHooks.push.apply(storeHooks, _toConsumableArray(mapHooks));
|
|
608
|
-
if (method === 'all') {
|
|
609
|
-
if (store.before[method] || store.error[method]) {
|
|
610
|
-
var beforeAll = (0, hooks_1.collect)({
|
|
611
|
-
before: store.before[method] || [],
|
|
612
|
-
error: store.error[method] || []
|
|
613
|
-
});
|
|
614
|
-
store.collectedAll.before = [beforeAll];
|
|
615
|
-
}
|
|
616
|
-
if (store.after[method]) {
|
|
617
|
-
var afterAll = (0, hooks_1.collect)({
|
|
618
|
-
after: store.after[method] || []
|
|
619
|
-
});
|
|
620
|
-
store.collectedAll.after = [afterAll];
|
|
621
|
-
}
|
|
622
|
-
} else {
|
|
623
|
-
if (store.before[method] || store.after[method] || store.error[method]) {
|
|
624
|
-
var collected = (0, hooks_1.collect)({
|
|
625
|
-
before: store.before[method] || [],
|
|
626
|
-
after: store.after[method] || [],
|
|
627
|
-
error: store.error[method] || []
|
|
628
|
-
});
|
|
629
|
-
store.collected[method] = [collected];
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
});
|
|
633
|
-
});
|
|
634
|
-
return this;
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
function createContext(service, method) {
|
|
638
|
-
var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
639
|
-
var createContext = service[method].createContext;
|
|
640
|
-
if (typeof createContext !== 'function') {
|
|
641
|
-
throw new Error("Can not create context for method ".concat(method));
|
|
642
|
-
}
|
|
643
|
-
return createContext(data);
|
|
442
|
+
return obj;
|
|
644
443
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
key: "collectMiddleware",
|
|
658
|
-
value: function collectMiddleware(self, args) {
|
|
659
|
-
var appHooks = collectHooks(this.app, this.method);
|
|
660
|
-
var middleware = _superPropGet(FeathersHookManager, "collectMiddleware", this, 3)([self, args]);
|
|
661
|
-
var methodHooks = collectHooks(self, this.method);
|
|
662
|
-
return [].concat(_toConsumableArray(appHooks), _toConsumableArray(middleware), _toConsumableArray(methodHooks));
|
|
663
|
-
}
|
|
664
|
-
}, {
|
|
665
|
-
key: "initializeContext",
|
|
666
|
-
value: function initializeContext(self, args, context) {
|
|
667
|
-
var ctx = _superPropGet(FeathersHookManager, "initializeContext", this, 3)([self, args, context]);
|
|
668
|
-
ctx.params = ctx.params || {};
|
|
669
|
-
return ctx;
|
|
670
|
-
}
|
|
671
|
-
}, {
|
|
672
|
-
key: "middleware",
|
|
673
|
-
value: function middleware(mw) {
|
|
674
|
-
var _this$_middleware;
|
|
675
|
-
(_this$_middleware = this._middleware).push.apply(_this$_middleware, _toConsumableArray(mw));
|
|
676
|
-
return this;
|
|
444
|
+
exports.objectHooks = objectHooks;
|
|
445
|
+
var hookDecorator = function hookDecorator(managerOrMiddleware) {
|
|
446
|
+
return function (target, context) {
|
|
447
|
+
var manager = (0, base_js_1.convertOptions)(managerOrMiddleware);
|
|
448
|
+
if (context.kind === 'class') {
|
|
449
|
+
(0, base_js_1.setManager)(target.prototype, manager);
|
|
450
|
+
return target;
|
|
451
|
+
} else if (context.kind === 'method') {
|
|
452
|
+
var method = String(context.name);
|
|
453
|
+
return functionHooks(target, manager.props({
|
|
454
|
+
method: method
|
|
455
|
+
}));
|
|
677
456
|
}
|
|
678
|
-
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
var _FeathersHookManager;
|
|
689
|
-
var params = service_1.defaultServiceArguments[method] || ['data', 'params'];
|
|
690
|
-
res[method] = (_FeathersHookManager = new FeathersHookManager(_this2, method)).params.apply(_FeathersHookManager, _toConsumableArray(params)).props({
|
|
691
|
-
app: _this2,
|
|
692
|
-
path: path,
|
|
693
|
-
method: method,
|
|
694
|
-
service: service,
|
|
695
|
-
event: null,
|
|
696
|
-
type: 'around',
|
|
697
|
-
get statusCode() {
|
|
698
|
-
var _a;
|
|
699
|
-
return (_a = this.http) === null || _a === void 0 ? void 0 : _a.status;
|
|
700
|
-
},
|
|
701
|
-
set statusCode(value) {
|
|
702
|
-
this.http = this.http || {};
|
|
703
|
-
this.http.status = value;
|
|
704
|
-
}
|
|
705
|
-
});
|
|
706
|
-
return res;
|
|
707
|
-
}, {});
|
|
708
|
-
var registerHooks = enableHooks(service);
|
|
709
|
-
(0, hooks_1.hooks)(service, serviceMethodHooks);
|
|
710
|
-
service.hooks = function (hookOptions) {
|
|
711
|
-
var _this3 = this;
|
|
712
|
-
if (hookOptions.before || hookOptions.after || hookOptions.error || hookOptions.around) {
|
|
713
|
-
return registerHooks.call(this, hookOptions);
|
|
457
|
+
throw new Error('Can not apply hooks.');
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
exports.hookDecorator = hookDecorator;
|
|
461
|
+
var legacyDecorator = function legacyDecorator(managerOrMiddleware) {
|
|
462
|
+
var wrapper = function wrapper(_target, method, descriptor) {
|
|
463
|
+
var manager = (0, base_js_1.convertOptions)(managerOrMiddleware);
|
|
464
|
+
if (!descriptor) {
|
|
465
|
+
(0, base_js_1.setManager)(_target.prototype, manager);
|
|
466
|
+
return _target;
|
|
714
467
|
}
|
|
715
|
-
|
|
716
|
-
|
|
468
|
+
var fn = descriptor.value;
|
|
469
|
+
if (typeof fn !== 'function') {
|
|
470
|
+
throw new Error("Can not apply hooks. '".concat(method, "' is not a function"));
|
|
717
471
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
manager.middleware(hookOptions[method]);
|
|
724
|
-
});
|
|
725
|
-
return this;
|
|
472
|
+
descriptor.value = functionHooks(fn, manager.props({
|
|
473
|
+
method: method
|
|
474
|
+
}));
|
|
475
|
+
return descriptor;
|
|
726
476
|
};
|
|
727
|
-
return
|
|
728
|
-
}
|
|
477
|
+
return wrapper;
|
|
478
|
+
};
|
|
479
|
+
exports.legacyDecorator = legacyDecorator;
|
|
729
480
|
|
|
730
481
|
/***/ }),
|
|
731
482
|
|
|
732
|
-
/***/ "
|
|
733
|
-
|
|
734
|
-
!***
|
|
735
|
-
|
|
736
|
-
/***/ (function(
|
|
737
|
-
|
|
483
|
+
/***/ "../../node_modules/@feathersjs/hooks/script/index.js":
|
|
484
|
+
/*!************************************************************!*\
|
|
485
|
+
!*** ../../node_modules/@feathersjs/hooks/script/index.js ***!
|
|
486
|
+
\************************************************************/
|
|
487
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
488
|
+
|
|
738
489
|
|
|
739
490
|
|
|
491
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
492
|
+
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."); }
|
|
493
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
494
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
495
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
496
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
740
497
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
741
498
|
if (k2 === undefined) k2 = k;
|
|
742
499
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -756,43 +513,60 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
756
513
|
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
757
514
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
758
515
|
};
|
|
759
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
760
|
-
return mod && mod.__esModule ? mod : {
|
|
761
|
-
"default": mod
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
516
|
Object.defineProperty(exports, "__esModule", ({
|
|
765
517
|
value: true
|
|
766
518
|
}));
|
|
767
|
-
exports.
|
|
768
|
-
|
|
769
|
-
var
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
519
|
+
exports.hooks = exports.middleware = void 0;
|
|
520
|
+
var base_js_1 = __webpack_require__(/*! ./base.js */ "../../node_modules/@feathersjs/hooks/script/base.js");
|
|
521
|
+
var hooks_js_1 = __webpack_require__(/*! ./hooks.js */ "../../node_modules/@feathersjs/hooks/script/hooks.js");
|
|
522
|
+
__exportStar(__webpack_require__(/*! ./hooks.js */ "../../node_modules/@feathersjs/hooks/script/hooks.js"), exports);
|
|
523
|
+
__exportStar(__webpack_require__(/*! ./compose.js */ "../../node_modules/@feathersjs/hooks/script/compose.js"), exports);
|
|
524
|
+
__exportStar(__webpack_require__(/*! ./base.js */ "../../node_modules/@feathersjs/hooks/script/base.js"), exports);
|
|
525
|
+
__exportStar(__webpack_require__(/*! ./regular.js */ "../../node_modules/@feathersjs/hooks/script/regular.js"), exports);
|
|
526
|
+
/**
|
|
527
|
+
* Initializes a hook settings object with the given middleware.
|
|
528
|
+
* @param mw The list of middleware
|
|
529
|
+
* @param options Middleware options (params, default, props)
|
|
530
|
+
*/
|
|
531
|
+
function middleware(mw, options) {
|
|
532
|
+
var manager = new base_js_1.HookManager().middleware(mw);
|
|
533
|
+
if (options) {
|
|
534
|
+
if (options.params) {
|
|
535
|
+
manager.params.apply(manager, _toConsumableArray(options.params));
|
|
536
|
+
}
|
|
537
|
+
if (options.defaults) {
|
|
538
|
+
manager.defaults(options.defaults);
|
|
539
|
+
}
|
|
540
|
+
if (options.props) {
|
|
541
|
+
manager.props(options.props);
|
|
542
|
+
}
|
|
777
543
|
}
|
|
778
|
-
|
|
779
|
-
function feathers() {
|
|
780
|
-
return new application_1.Feathers();
|
|
544
|
+
return manager;
|
|
781
545
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
546
|
+
exports.middleware = middleware;
|
|
547
|
+
// Fallthrough to actual implementation
|
|
548
|
+
function hooks() {
|
|
549
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
550
|
+
args[_key] = arguments[_key];
|
|
551
|
+
}
|
|
552
|
+
var target = args[0],
|
|
553
|
+
_hooks = args[1];
|
|
554
|
+
if (typeof target === 'function' && (_hooks instanceof base_js_1.HookManager || Array.isArray(_hooks) || args.length === 1)) {
|
|
555
|
+
return (0, hooks_js_1.functionHooks)(target, _hooks);
|
|
556
|
+
}
|
|
557
|
+
if (args.length === 2) {
|
|
558
|
+
return (0, hooks_js_1.objectHooks)(target, _hooks);
|
|
559
|
+
}
|
|
560
|
+
return (0, hooks_js_1.hookDecorator)(target);
|
|
788
561
|
}
|
|
562
|
+
exports.hooks = hooks;
|
|
789
563
|
|
|
790
564
|
/***/ }),
|
|
791
565
|
|
|
792
|
-
/***/ "
|
|
793
|
-
|
|
794
|
-
!***
|
|
795
|
-
|
|
566
|
+
/***/ "../../node_modules/@feathersjs/hooks/script/regular.js":
|
|
567
|
+
/*!**************************************************************!*\
|
|
568
|
+
!*** ../../node_modules/@feathersjs/hooks/script/regular.js ***!
|
|
569
|
+
\**************************************************************/
|
|
796
570
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
797
571
|
|
|
798
572
|
|
|
@@ -812,87 +586,136 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
812
586
|
Object.defineProperty(exports, "__esModule", ({
|
|
813
587
|
value: true
|
|
814
588
|
}));
|
|
815
|
-
exports.
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
update: ['id', 'data', 'params'],
|
|
827
|
-
patch: ['id', 'data', 'params'],
|
|
828
|
-
remove: ['id', 'params']
|
|
589
|
+
exports.collect = exports.fromErrorHook = exports.fromAfterHook = exports.fromBeforeHook = exports.runHooks = exports.runHook = void 0;
|
|
590
|
+
var compose_js_1 = __webpack_require__(/*! ./compose.js */ "../../node_modules/@feathersjs/hooks/script/compose.js");
|
|
591
|
+
var runHook = function runHook(hook, context, type) {
|
|
592
|
+
var typeBefore = context.type;
|
|
593
|
+
if (type) context.type = type;
|
|
594
|
+
return Promise.resolve(hook.call(context.self, context)).then(function (res) {
|
|
595
|
+
if (type) context.type = typeBefore;
|
|
596
|
+
if (res && res !== context) {
|
|
597
|
+
Object.assign(context, res);
|
|
598
|
+
}
|
|
599
|
+
});
|
|
829
600
|
};
|
|
830
|
-
exports.
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
601
|
+
exports.runHook = runHook;
|
|
602
|
+
var runHooks = function runHooks(hooks) {
|
|
603
|
+
return function (context) {
|
|
604
|
+
return hooks.reduce(function (promise, hook) {
|
|
605
|
+
return promise.then(function () {
|
|
606
|
+
return (0, exports.runHook)(hook, context);
|
|
607
|
+
});
|
|
608
|
+
}, Promise.resolve(context));
|
|
609
|
+
};
|
|
836
610
|
};
|
|
837
|
-
exports.
|
|
838
|
-
|
|
839
|
-
function
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
return typeof service[m] === 'function' && !methods.includes(m);
|
|
843
|
-
}).concat(methods);
|
|
611
|
+
exports.runHooks = runHooks;
|
|
612
|
+
function fromBeforeHook(hook) {
|
|
613
|
+
return function (context, next) {
|
|
614
|
+
return (0, exports.runHook)(hook, context, 'before').then(next);
|
|
615
|
+
};
|
|
844
616
|
}
|
|
845
|
-
|
|
846
|
-
|
|
617
|
+
exports.fromBeforeHook = fromBeforeHook;
|
|
618
|
+
function fromAfterHook(hook) {
|
|
619
|
+
return function (context, next) {
|
|
620
|
+
return next().then(function () {
|
|
621
|
+
return (0, exports.runHook)(hook, context, 'after');
|
|
622
|
+
});
|
|
623
|
+
};
|
|
847
624
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
625
|
+
exports.fromAfterHook = fromAfterHook;
|
|
626
|
+
function fromErrorHook(hook) {
|
|
627
|
+
return function (context, next) {
|
|
628
|
+
return next().catch(function (error) {
|
|
629
|
+
if (context.error !== error || context.result !== undefined) {
|
|
630
|
+
context.original = _objectSpread({}, context);
|
|
631
|
+
context.error = error;
|
|
632
|
+
delete context.result;
|
|
633
|
+
}
|
|
634
|
+
return (0, exports.runHook)(hook, context, 'error').then(function () {
|
|
635
|
+
if (context.result === undefined && context.error !== undefined) {
|
|
636
|
+
throw context.error;
|
|
637
|
+
}
|
|
638
|
+
}).catch(function (error) {
|
|
639
|
+
context.error = error;
|
|
640
|
+
throw context.error;
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
exports.fromErrorHook = fromErrorHook;
|
|
646
|
+
function collect(_ref) {
|
|
647
|
+
var _ref$before = _ref.before,
|
|
648
|
+
before = _ref$before === void 0 ? [] : _ref$before,
|
|
649
|
+
_ref$after = _ref.after,
|
|
650
|
+
after = _ref$after === void 0 ? [] : _ref$after,
|
|
651
|
+
_ref$error = _ref.error,
|
|
652
|
+
error = _ref$error === void 0 ? [] : _ref$error;
|
|
653
|
+
var beforeHooks = before.map(fromBeforeHook);
|
|
654
|
+
var afterHooks = _toConsumableArray(after).reverse().map(fromAfterHook);
|
|
655
|
+
var errorHooks = error.length ? [fromErrorHook((0, exports.runHooks)(error))] : [];
|
|
656
|
+
return (0, compose_js_1.compose)([].concat(errorHooks, _toConsumableArray(beforeHooks), _toConsumableArray(afterHooks)));
|
|
657
|
+
}
|
|
658
|
+
exports.collect = collect;
|
|
659
|
+
|
|
660
|
+
/***/ }),
|
|
661
|
+
|
|
662
|
+
/***/ "../../node_modules/@feathersjs/hooks/script/utils.js":
|
|
663
|
+
/*!************************************************************!*\
|
|
664
|
+
!*** ../../node_modules/@feathersjs/hooks/script/utils.js ***!
|
|
665
|
+
\************************************************************/
|
|
666
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
671
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
672
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
673
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
674
|
+
value: true
|
|
675
|
+
}));
|
|
676
|
+
exports.copyFnProperties = exports.copyProperties = void 0;
|
|
677
|
+
function copyProperties(target) {
|
|
678
|
+
for (var _len = arguments.length, originals = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
679
|
+
originals[_key - 1] = arguments[_key];
|
|
868
680
|
}
|
|
869
|
-
var
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
681
|
+
for (var _i = 0, _originals = originals; _i < _originals.length; _i++) {
|
|
682
|
+
var original = _originals[_i];
|
|
683
|
+
var originalProps = Object.keys(original).concat(Object.getOwnPropertySymbols(original));
|
|
684
|
+
var _iterator = _createForOfIteratorHelper(originalProps),
|
|
685
|
+
_step;
|
|
686
|
+
try {
|
|
687
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
688
|
+
var prop = _step.value;
|
|
689
|
+
var propDescriptor = Object.getOwnPropertyDescriptor(original, prop);
|
|
690
|
+
if (propDescriptor && !Object.prototype.hasOwnProperty.call(target, prop)) {
|
|
691
|
+
Object.defineProperty(target, prop, propDescriptor);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
} catch (err) {
|
|
695
|
+
_iterator.e(err);
|
|
696
|
+
} finally {
|
|
697
|
+
_iterator.f();
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return target;
|
|
701
|
+
}
|
|
702
|
+
exports.copyProperties = copyProperties;
|
|
703
|
+
function copyFnProperties(target, original) {
|
|
704
|
+
var internalProps = ['name', 'length'];
|
|
705
|
+
try {
|
|
706
|
+
for (var _i2 = 0, _internalProps = internalProps; _i2 < _internalProps.length; _i2++) {
|
|
707
|
+
var prop = _internalProps[_i2];
|
|
708
|
+
var value = original[prop];
|
|
709
|
+
Object.defineProperty(target, prop, {
|
|
710
|
+
value: value
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
} catch (_e) {
|
|
714
|
+
// Avoid IE error
|
|
875
715
|
}
|
|
876
|
-
|
|
877
|
-
value: serviceOptions
|
|
878
|
-
});
|
|
879
|
-
return protoService;
|
|
716
|
+
return target;
|
|
880
717
|
}
|
|
881
|
-
|
|
882
|
-
/***/ }),
|
|
883
|
-
|
|
884
|
-
/***/ "../feathers/lib/version.js":
|
|
885
|
-
/*!**********************************!*\
|
|
886
|
-
!*** ../feathers/lib/version.js ***!
|
|
887
|
-
\**********************************/
|
|
888
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
893
|
-
value: true
|
|
894
|
-
}));
|
|
895
|
-
exports["default"] = 'development';
|
|
718
|
+
exports.copyFnProperties = copyFnProperties;
|
|
896
719
|
|
|
897
720
|
/***/ }),
|
|
898
721
|
|
|
@@ -1320,598 +1143,818 @@ function listenerCount(type) {
|
|
|
1320
1143
|
} else if (evlistener !== undefined) {
|
|
1321
1144
|
return evlistener.length;
|
|
1322
1145
|
}
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
return 0;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
1329
|
-
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
1330
|
-
};
|
|
1331
|
-
|
|
1332
|
-
function arrayClone(arr, n) {
|
|
1333
|
-
var copy = new Array(n);
|
|
1334
|
-
for (var i = 0; i < n; ++i)
|
|
1335
|
-
copy[i] = arr[i];
|
|
1336
|
-
return copy;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
function spliceOne(list, index) {
|
|
1340
|
-
for (; index + 1 < list.length; index++)
|
|
1341
|
-
list[index] = list[index + 1];
|
|
1342
|
-
list.pop();
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
function unwrapListeners(arr) {
|
|
1346
|
-
var ret = new Array(arr.length);
|
|
1347
|
-
for (var i = 0; i < ret.length; ++i) {
|
|
1348
|
-
ret[i] = arr[i].listener || arr[i];
|
|
1349
|
-
}
|
|
1350
|
-
return ret;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
function once(emitter, name) {
|
|
1354
|
-
return new Promise(function (resolve, reject) {
|
|
1355
|
-
function errorListener(err) {
|
|
1356
|
-
emitter.removeListener(name, resolver);
|
|
1357
|
-
reject(err);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
return 0;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
1152
|
+
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
function arrayClone(arr, n) {
|
|
1156
|
+
var copy = new Array(n);
|
|
1157
|
+
for (var i = 0; i < n; ++i)
|
|
1158
|
+
copy[i] = arr[i];
|
|
1159
|
+
return copy;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
function spliceOne(list, index) {
|
|
1163
|
+
for (; index + 1 < list.length; index++)
|
|
1164
|
+
list[index] = list[index + 1];
|
|
1165
|
+
list.pop();
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
function unwrapListeners(arr) {
|
|
1169
|
+
var ret = new Array(arr.length);
|
|
1170
|
+
for (var i = 0; i < ret.length; ++i) {
|
|
1171
|
+
ret[i] = arr[i].listener || arr[i];
|
|
1172
|
+
}
|
|
1173
|
+
return ret;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
function once(emitter, name) {
|
|
1177
|
+
return new Promise(function (resolve, reject) {
|
|
1178
|
+
function errorListener(err) {
|
|
1179
|
+
emitter.removeListener(name, resolver);
|
|
1180
|
+
reject(err);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
function resolver() {
|
|
1184
|
+
if (typeof emitter.removeListener === 'function') {
|
|
1185
|
+
emitter.removeListener('error', errorListener);
|
|
1186
|
+
}
|
|
1187
|
+
resolve([].slice.call(arguments));
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1190
|
+
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
1191
|
+
if (name !== 'error') {
|
|
1192
|
+
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
1198
|
+
if (typeof emitter.on === 'function') {
|
|
1199
|
+
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
1204
|
+
if (typeof emitter.on === 'function') {
|
|
1205
|
+
if (flags.once) {
|
|
1206
|
+
emitter.once(name, listener);
|
|
1207
|
+
} else {
|
|
1208
|
+
emitter.on(name, listener);
|
|
1209
|
+
}
|
|
1210
|
+
} else if (typeof emitter.addEventListener === 'function') {
|
|
1211
|
+
// EventTarget does not have `error` event semantics like Node
|
|
1212
|
+
// EventEmitters, we do not listen for `error` events here.
|
|
1213
|
+
emitter.addEventListener(name, function wrapListener(arg) {
|
|
1214
|
+
// IE does not have builtin `{ once: true }` support so we
|
|
1215
|
+
// have to do it manually.
|
|
1216
|
+
if (flags.once) {
|
|
1217
|
+
emitter.removeEventListener(name, wrapListener);
|
|
1218
|
+
}
|
|
1219
|
+
listener(arg);
|
|
1220
|
+
});
|
|
1221
|
+
} else {
|
|
1222
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
/***/ }),
|
|
1228
|
+
|
|
1229
|
+
/***/ "../commons/lib/debug.js":
|
|
1230
|
+
/*!*******************************!*\
|
|
1231
|
+
!*** ../commons/lib/debug.js ***!
|
|
1232
|
+
\*******************************/
|
|
1233
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
1238
|
+
value: true
|
|
1239
|
+
}));
|
|
1240
|
+
exports.noopDebug = noopDebug;
|
|
1241
|
+
exports.setDebug = setDebug;
|
|
1242
|
+
exports.createDebug = createDebug;
|
|
1243
|
+
var debuggers = {};
|
|
1244
|
+
function noopDebug() {
|
|
1245
|
+
return function () {};
|
|
1246
|
+
}
|
|
1247
|
+
var defaultInitializer = noopDebug;
|
|
1248
|
+
function setDebug(debug) {
|
|
1249
|
+
defaultInitializer = debug;
|
|
1250
|
+
Object.keys(debuggers).forEach(function (name) {
|
|
1251
|
+
debuggers[name] = debug(name);
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
function createDebug(name) {
|
|
1255
|
+
if (!debuggers[name]) {
|
|
1256
|
+
debuggers[name] = defaultInitializer(name);
|
|
1257
|
+
}
|
|
1258
|
+
return function () {
|
|
1259
|
+
return debuggers[name].apply(debuggers, arguments);
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
/***/ }),
|
|
1264
|
+
|
|
1265
|
+
/***/ "../commons/lib/index.js":
|
|
1266
|
+
/*!*******************************!*\
|
|
1267
|
+
!*** ../commons/lib/index.js ***!
|
|
1268
|
+
\*******************************/
|
|
1269
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
1274
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1275
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1276
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1277
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
1278
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1279
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
1280
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1281
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
1282
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
1283
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1284
|
+
if (k2 === undefined) k2 = k;
|
|
1285
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1286
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1287
|
+
desc = {
|
|
1288
|
+
enumerable: true,
|
|
1289
|
+
get: function get() {
|
|
1290
|
+
return m[k];
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
Object.defineProperty(o, k2, desc);
|
|
1295
|
+
} : function (o, m, k, k2) {
|
|
1296
|
+
if (k2 === undefined) k2 = k;
|
|
1297
|
+
o[k2] = m[k];
|
|
1298
|
+
});
|
|
1299
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1300
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1301
|
+
};
|
|
1302
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
1303
|
+
value: true
|
|
1304
|
+
}));
|
|
1305
|
+
exports._ = void 0;
|
|
1306
|
+
exports.stripSlashes = stripSlashes;
|
|
1307
|
+
exports.isPromise = isPromise;
|
|
1308
|
+
exports.createSymbol = createSymbol;
|
|
1309
|
+
// Removes all leading and trailing slashes from a path
|
|
1310
|
+
function stripSlashes(name) {
|
|
1311
|
+
return name.replace(/^(\/+)|(\/+)$/g, '');
|
|
1312
|
+
}
|
|
1313
|
+
// A set of lodash-y utility functions that use ES6
|
|
1314
|
+
exports._ = {
|
|
1315
|
+
each: function each(obj, callback) {
|
|
1316
|
+
if (obj && typeof obj.forEach === 'function') {
|
|
1317
|
+
obj.forEach(callback);
|
|
1318
|
+
} else if (exports._.isObject(obj)) {
|
|
1319
|
+
Object.keys(obj).forEach(function (key) {
|
|
1320
|
+
return callback(obj[key], key);
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
some: function some(value, callback) {
|
|
1325
|
+
return Object.keys(value).map(function (key) {
|
|
1326
|
+
return [value[key], key];
|
|
1327
|
+
}).some(function (_ref) {
|
|
1328
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1329
|
+
val = _ref2[0],
|
|
1330
|
+
key = _ref2[1];
|
|
1331
|
+
return callback(val, key);
|
|
1332
|
+
});
|
|
1333
|
+
},
|
|
1334
|
+
every: function every(value, callback) {
|
|
1335
|
+
return Object.keys(value).map(function (key) {
|
|
1336
|
+
return [value[key], key];
|
|
1337
|
+
}).every(function (_ref3) {
|
|
1338
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1339
|
+
val = _ref4[0],
|
|
1340
|
+
key = _ref4[1];
|
|
1341
|
+
return callback(val, key);
|
|
1342
|
+
});
|
|
1343
|
+
},
|
|
1344
|
+
keys: function keys(obj) {
|
|
1345
|
+
return Object.keys(obj);
|
|
1346
|
+
},
|
|
1347
|
+
values: function values(obj) {
|
|
1348
|
+
return exports._.keys(obj).map(function (key) {
|
|
1349
|
+
return obj[key];
|
|
1350
|
+
});
|
|
1351
|
+
},
|
|
1352
|
+
isMatch: function isMatch(obj, item) {
|
|
1353
|
+
return exports._.keys(item).every(function (key) {
|
|
1354
|
+
return obj[key] === item[key];
|
|
1355
|
+
});
|
|
1356
|
+
},
|
|
1357
|
+
isEmpty: function isEmpty(obj) {
|
|
1358
|
+
return exports._.keys(obj).length === 0;
|
|
1359
|
+
},
|
|
1360
|
+
isObject: function isObject(item) {
|
|
1361
|
+
return _typeof(item) === 'object' && !Array.isArray(item) && item !== null;
|
|
1362
|
+
},
|
|
1363
|
+
isObjectOrArray: function isObjectOrArray(value) {
|
|
1364
|
+
return _typeof(value) === 'object' && value !== null;
|
|
1365
|
+
},
|
|
1366
|
+
extend: function extend(first) {
|
|
1367
|
+
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1368
|
+
rest[_key - 1] = arguments[_key];
|
|
1369
|
+
}
|
|
1370
|
+
return Object.assign.apply(Object, [first].concat(rest));
|
|
1371
|
+
},
|
|
1372
|
+
omit: function omit(obj) {
|
|
1373
|
+
var result = exports._.extend({}, obj);
|
|
1374
|
+
for (var _len2 = arguments.length, keys = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1375
|
+
keys[_key2 - 1] = arguments[_key2];
|
|
1376
|
+
}
|
|
1377
|
+
keys.forEach(function (key) {
|
|
1378
|
+
return delete result[key];
|
|
1379
|
+
});
|
|
1380
|
+
return result;
|
|
1381
|
+
},
|
|
1382
|
+
pick: function pick(source) {
|
|
1383
|
+
for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
1384
|
+
keys[_key3 - 1] = arguments[_key3];
|
|
1358
1385
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
emitter.removeListener('error', errorListener);
|
|
1386
|
+
return keys.reduce(function (result, key) {
|
|
1387
|
+
if (source[key] !== undefined) {
|
|
1388
|
+
result[key] = source[key];
|
|
1363
1389
|
}
|
|
1364
|
-
|
|
1365
|
-
};
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1390
|
+
return result;
|
|
1391
|
+
}, {});
|
|
1392
|
+
},
|
|
1393
|
+
// Recursively merge the source object into the target object
|
|
1394
|
+
merge: function merge(target, source) {
|
|
1395
|
+
if (exports._.isObject(target) && exports._.isObject(source)) {
|
|
1396
|
+
Object.keys(source).forEach(function (key) {
|
|
1397
|
+
// Skip prototype-polluting keys (e.g. JSON-parsed `__proto__`)
|
|
1398
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
if (exports._.isObject(source[key])) {
|
|
1402
|
+
if (!target[key]) {
|
|
1403
|
+
Object.assign(target, _defineProperty({}, key, {}));
|
|
1404
|
+
}
|
|
1405
|
+
exports._.merge(target[key], source[key]);
|
|
1406
|
+
} else {
|
|
1407
|
+
Object.assign(target, _defineProperty({}, key, source[key]));
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1370
1410
|
}
|
|
1371
|
-
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
1375
|
-
if (typeof emitter.on === 'function') {
|
|
1376
|
-
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
|
|
1411
|
+
return target;
|
|
1377
1412
|
}
|
|
1413
|
+
};
|
|
1414
|
+
// Duck-checks if an object looks like a promise
|
|
1415
|
+
function isPromise(result) {
|
|
1416
|
+
return exports._.isObject(result) && typeof result.then === 'function';
|
|
1378
1417
|
}
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
if (typeof emitter.on === 'function') {
|
|
1382
|
-
if (flags.once) {
|
|
1383
|
-
emitter.once(name, listener);
|
|
1384
|
-
} else {
|
|
1385
|
-
emitter.on(name, listener);
|
|
1386
|
-
}
|
|
1387
|
-
} else if (typeof emitter.addEventListener === 'function') {
|
|
1388
|
-
// EventTarget does not have `error` event semantics like Node
|
|
1389
|
-
// EventEmitters, we do not listen for `error` events here.
|
|
1390
|
-
emitter.addEventListener(name, function wrapListener(arg) {
|
|
1391
|
-
// IE does not have builtin `{ once: true }` support so we
|
|
1392
|
-
// have to do it manually.
|
|
1393
|
-
if (flags.once) {
|
|
1394
|
-
emitter.removeEventListener(name, wrapListener);
|
|
1395
|
-
}
|
|
1396
|
-
listener(arg);
|
|
1397
|
-
});
|
|
1398
|
-
} else {
|
|
1399
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
1400
|
-
}
|
|
1418
|
+
function createSymbol(name) {
|
|
1419
|
+
return typeof Symbol !== 'undefined' ? Symbol.for(name) : name;
|
|
1401
1420
|
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
/***/ }),
|
|
1405
|
-
|
|
1406
|
-
/***/ "./src/core.ts":
|
|
1407
|
-
/*!*********************!*\
|
|
1408
|
-
!*** ./src/core.ts ***!
|
|
1409
|
-
\*********************/
|
|
1410
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1414
|
-
if (k2 === undefined) k2 = k;
|
|
1415
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1416
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1417
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
1418
|
-
}
|
|
1419
|
-
Object.defineProperty(o, k2, desc);
|
|
1420
|
-
}) : (function(o, m, k, k2) {
|
|
1421
|
-
if (k2 === undefined) k2 = k;
|
|
1422
|
-
o[k2] = m[k];
|
|
1423
|
-
}));
|
|
1424
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
1425
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1426
|
-
};
|
|
1427
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1428
|
-
__exportStar(__webpack_require__(/*! @feathersjs/feathers */ "../feathers/lib/index.js"), exports);
|
|
1429
|
-
|
|
1421
|
+
__exportStar(__webpack_require__(/*! ./debug */ "../commons/lib/debug.js"), exports);
|
|
1430
1422
|
|
|
1431
1423
|
/***/ }),
|
|
1432
1424
|
|
|
1433
|
-
/***/ "
|
|
1434
|
-
|
|
1435
|
-
!***
|
|
1436
|
-
|
|
1425
|
+
/***/ "../feathers/lib/application.js":
|
|
1426
|
+
/*!**************************************!*\
|
|
1427
|
+
!*** ../feathers/lib/application.js ***!
|
|
1428
|
+
\**************************************/
|
|
1437
1429
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1438
1430
|
|
|
1439
1431
|
|
|
1440
1432
|
|
|
1441
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1442
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
1443
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
1444
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1445
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
1446
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
1447
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
1448
1433
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1449
|
-
function
|
|
1450
|
-
function
|
|
1434
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
1435
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
1436
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
1437
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
1438
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
1451
1439
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
1452
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
1453
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
1454
1440
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1455
1441
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
1456
1442
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
1457
1443
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
1458
1444
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1459
1445
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1446
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1447
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
1448
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
1449
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1450
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
1451
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
1452
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
1453
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
1454
|
+
return mod && mod.__esModule ? mod : {
|
|
1455
|
+
"default": mod
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1460
1458
|
Object.defineProperty(exports, "__esModule", ({
|
|
1461
1459
|
value: true
|
|
1462
1460
|
}));
|
|
1463
|
-
exports.
|
|
1464
|
-
var
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
*/
|
|
1469
|
-
var
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
var proto = Object.getPrototypeOf(this);
|
|
1487
|
-
while (proto) {
|
|
1488
|
-
keys.push.apply(keys, _toConsumableArray(Object.keys(proto)));
|
|
1489
|
-
proto = Object.getPrototypeOf(proto);
|
|
1490
|
-
}
|
|
1491
|
-
return keys.reduce(function (result, key) {
|
|
1492
|
-
result[key] = _this[key];
|
|
1493
|
-
return result;
|
|
1494
|
-
}, {});
|
|
1495
|
-
}
|
|
1496
|
-
}]);
|
|
1497
|
-
}();
|
|
1498
|
-
exports.BaseHookContext = BaseHookContext;
|
|
1499
|
-
var HookManager = /*#__PURE__*/function () {
|
|
1500
|
-
function HookManager() {
|
|
1501
|
-
_classCallCheck(this, HookManager);
|
|
1502
|
-
Object.defineProperty(this, "_parent", {
|
|
1503
|
-
enumerable: true,
|
|
1504
|
-
configurable: true,
|
|
1505
|
-
writable: true,
|
|
1506
|
-
value: null
|
|
1507
|
-
});
|
|
1508
|
-
Object.defineProperty(this, "_params", {
|
|
1509
|
-
enumerable: true,
|
|
1510
|
-
configurable: true,
|
|
1511
|
-
writable: true,
|
|
1512
|
-
value: null
|
|
1513
|
-
});
|
|
1514
|
-
Object.defineProperty(this, "_middleware", {
|
|
1515
|
-
enumerable: true,
|
|
1516
|
-
configurable: true,
|
|
1517
|
-
writable: true,
|
|
1518
|
-
value: null
|
|
1519
|
-
});
|
|
1520
|
-
Object.defineProperty(this, "_props", {
|
|
1521
|
-
enumerable: true,
|
|
1522
|
-
configurable: true,
|
|
1523
|
-
writable: true,
|
|
1524
|
-
value: null
|
|
1525
|
-
});
|
|
1526
|
-
Object.defineProperty(this, "_defaults", {
|
|
1527
|
-
enumerable: true,
|
|
1528
|
-
configurable: true,
|
|
1529
|
-
writable: true,
|
|
1530
|
-
value: void 0
|
|
1461
|
+
exports.Feathers = void 0;
|
|
1462
|
+
var version_1 = __importDefault(__webpack_require__(/*! ./version */ "../feathers/lib/version.js"));
|
|
1463
|
+
var events_1 = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
1464
|
+
var commons_1 = __webpack_require__(/*! @feathersjs/commons */ "../commons/lib/index.js");
|
|
1465
|
+
var hooks_1 = __webpack_require__(/*! @feathersjs/hooks */ "../../node_modules/@feathersjs/hooks/script/index.js");
|
|
1466
|
+
var events_2 = __webpack_require__(/*! ./events */ "../feathers/lib/events.js");
|
|
1467
|
+
var hooks_2 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
1468
|
+
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
1469
|
+
var hooks_3 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
1470
|
+
var debug = (0, commons_1.createDebug)('@feathersjs/feathers');
|
|
1471
|
+
var Feathers = /*#__PURE__*/function (_events_1$EventEmitte) {
|
|
1472
|
+
function Feathers() {
|
|
1473
|
+
var _this;
|
|
1474
|
+
_classCallCheck(this, Feathers);
|
|
1475
|
+
_this = _callSuper(this, Feathers);
|
|
1476
|
+
_this.services = {};
|
|
1477
|
+
_this.settings = {};
|
|
1478
|
+
_this.mixins = [hooks_2.hookMixin, events_2.eventMixin];
|
|
1479
|
+
_this.version = version_1.default;
|
|
1480
|
+
_this._isSetup = false;
|
|
1481
|
+
_this.registerHooks = (0, hooks_3.enableHooks)(_this);
|
|
1482
|
+
_this.registerHooks({
|
|
1483
|
+
around: [events_2.eventHook]
|
|
1531
1484
|
});
|
|
1485
|
+
return _this;
|
|
1532
1486
|
}
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
return this;
|
|
1487
|
+
_inherits(Feathers, _events_1$EventEmitte);
|
|
1488
|
+
return _createClass(Feathers, [{
|
|
1489
|
+
key: "get",
|
|
1490
|
+
value: function get(name) {
|
|
1491
|
+
return this.settings[name];
|
|
1538
1492
|
}
|
|
1539
1493
|
}, {
|
|
1540
|
-
key: "
|
|
1541
|
-
value: function
|
|
1542
|
-
this.
|
|
1494
|
+
key: "set",
|
|
1495
|
+
value: function set(name, value) {
|
|
1496
|
+
this.settings[name] = value;
|
|
1543
1497
|
return this;
|
|
1544
1498
|
}
|
|
1545
1499
|
}, {
|
|
1546
|
-
key: "
|
|
1547
|
-
value: function
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
if (previous && this._middleware) {
|
|
1551
|
-
return previous.concat(this._middleware);
|
|
1552
|
-
}
|
|
1553
|
-
return previous || this._middleware;
|
|
1500
|
+
key: "configure",
|
|
1501
|
+
value: function configure(callback) {
|
|
1502
|
+
callback.call(this, this);
|
|
1503
|
+
return this;
|
|
1554
1504
|
}
|
|
1555
1505
|
}, {
|
|
1556
|
-
key: "
|
|
1557
|
-
value: function
|
|
1558
|
-
|
|
1559
|
-
var middleware = this.getMiddleware();
|
|
1560
|
-
if (otherMiddleware && middleware) {
|
|
1561
|
-
return otherMiddleware.concat(middleware);
|
|
1562
|
-
}
|
|
1563
|
-
return otherMiddleware || middleware || [];
|
|
1506
|
+
key: "defaultService",
|
|
1507
|
+
value: function defaultService(location) {
|
|
1508
|
+
throw new Error("Can not find service '".concat(location, "'"));
|
|
1564
1509
|
}
|
|
1565
1510
|
}, {
|
|
1566
|
-
key: "
|
|
1567
|
-
value: function
|
|
1568
|
-
|
|
1569
|
-
|
|
1511
|
+
key: "service",
|
|
1512
|
+
value: function service(location) {
|
|
1513
|
+
var path = (0, commons_1.stripSlashes)(location) || '/';
|
|
1514
|
+
var current = this.services.hasOwnProperty(path) ? this.services[path] : undefined;
|
|
1515
|
+
if (typeof current === 'undefined') {
|
|
1516
|
+
this.use(path, this.defaultService(path));
|
|
1517
|
+
return this.service(path);
|
|
1570
1518
|
}
|
|
1571
|
-
|
|
1572
|
-
return this;
|
|
1519
|
+
return current;
|
|
1573
1520
|
}
|
|
1574
1521
|
}, {
|
|
1575
|
-
key: "
|
|
1576
|
-
value: function
|
|
1577
|
-
var
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
return (
|
|
1581
|
-
|
|
1582
|
-
|
|
1522
|
+
key: "_setup",
|
|
1523
|
+
value: function _setup() {
|
|
1524
|
+
var _this2 = this;
|
|
1525
|
+
this._isSetup = true;
|
|
1526
|
+
return Object.keys(this.services).reduce(function (current, path) {
|
|
1527
|
+
return current.then(function () {
|
|
1528
|
+
var service = _this2.service(path);
|
|
1529
|
+
if (typeof service.setup === 'function') {
|
|
1530
|
+
debug("Setting up service for `".concat(path, "`"));
|
|
1531
|
+
return service.setup(_this2, path);
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
}, Promise.resolve()).then(function () {
|
|
1535
|
+
return _this2;
|
|
1536
|
+
});
|
|
1583
1537
|
}
|
|
1584
1538
|
}, {
|
|
1585
|
-
key: "
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
this.
|
|
1591
|
-
|
|
1539
|
+
key: "setup",
|
|
1540
|
+
get: function get() {
|
|
1541
|
+
return this._setup;
|
|
1542
|
+
},
|
|
1543
|
+
set: function set(value) {
|
|
1544
|
+
this._setup = value[hooks_1.HOOKS] ? value : (0, hooks_1.hooks)(value, (0, hooks_1.middleware)().params('server').props({
|
|
1545
|
+
app: this
|
|
1546
|
+
}));
|
|
1592
1547
|
}
|
|
1593
1548
|
}, {
|
|
1594
|
-
key: "
|
|
1595
|
-
value: function
|
|
1596
|
-
var
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
return
|
|
1600
|
-
|
|
1601
|
-
|
|
1549
|
+
key: "_teardown",
|
|
1550
|
+
value: function _teardown() {
|
|
1551
|
+
var _this3 = this;
|
|
1552
|
+
this._isSetup = false;
|
|
1553
|
+
return Object.keys(this.services).reduce(function (current, path) {
|
|
1554
|
+
return current.then(function () {
|
|
1555
|
+
var service = _this3.service(path);
|
|
1556
|
+
if (typeof service.teardown === 'function') {
|
|
1557
|
+
debug("Tearing down service for `".concat(path, "`"));
|
|
1558
|
+
return service.teardown(_this3, path);
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
}, Promise.resolve()).then(function () {
|
|
1562
|
+
return _this3;
|
|
1563
|
+
});
|
|
1602
1564
|
}
|
|
1603
1565
|
}, {
|
|
1604
|
-
key: "
|
|
1605
|
-
|
|
1606
|
-
this.
|
|
1607
|
-
|
|
1566
|
+
key: "teardown",
|
|
1567
|
+
get: function get() {
|
|
1568
|
+
return this._teardown;
|
|
1569
|
+
},
|
|
1570
|
+
set: function set(value) {
|
|
1571
|
+
this._teardown = value[hooks_1.HOOKS] ? value : (0, hooks_1.hooks)(value, (0, hooks_1.middleware)().params('server').props({
|
|
1572
|
+
app: this
|
|
1573
|
+
}));
|
|
1608
1574
|
}
|
|
1609
1575
|
}, {
|
|
1610
|
-
key: "
|
|
1611
|
-
value: function
|
|
1612
|
-
var
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
if (previous && defaults) {
|
|
1616
|
-
return Object.assign({}, previous, defaults);
|
|
1576
|
+
key: "use",
|
|
1577
|
+
value: function use(path, service, options) {
|
|
1578
|
+
var _this4 = this;
|
|
1579
|
+
if (typeof path !== 'string') {
|
|
1580
|
+
throw new Error("'".concat(path, "' is not a valid service path."));
|
|
1617
1581
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
var ContextClass = /*#__PURE__*/function (_Base) {
|
|
1625
|
-
function ContextClass(data) {
|
|
1626
|
-
_classCallCheck(this, ContextClass);
|
|
1627
|
-
return _callSuper(this, ContextClass, [data]);
|
|
1628
|
-
}
|
|
1629
|
-
_inherits(ContextClass, _Base);
|
|
1630
|
-
return _createClass(ContextClass);
|
|
1631
|
-
}(Base);
|
|
1632
|
-
var params = this.getParams();
|
|
1633
|
-
var props = this.getProps();
|
|
1634
|
-
if (params) {
|
|
1635
|
-
params.forEach(function (name, index) {
|
|
1636
|
-
if ((props === null || props === void 0 ? void 0 : props[name]) !== undefined) {
|
|
1637
|
-
throw new Error("Hooks can not have a property and param named '".concat(name, "'. Use .defaults instead."));
|
|
1638
|
-
}
|
|
1639
|
-
Object.defineProperty(ContextClass.prototype, name, {
|
|
1640
|
-
enumerable: true,
|
|
1641
|
-
get: function get() {
|
|
1642
|
-
return this === null || this === void 0 ? void 0 : this.arguments[index];
|
|
1643
|
-
},
|
|
1644
|
-
set: function set(value) {
|
|
1645
|
-
this.arguments[index] = value;
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1582
|
+
var location = (0, commons_1.stripSlashes)(path) || '/';
|
|
1583
|
+
var subApp = service;
|
|
1584
|
+
var isSubApp = typeof subApp.service === 'function' && subApp.services;
|
|
1585
|
+
if (isSubApp) {
|
|
1586
|
+
Object.keys(subApp.services).forEach(function (subPath) {
|
|
1587
|
+
return _this4.use("".concat(location, "/").concat(subPath), subApp.service(subPath));
|
|
1648
1588
|
});
|
|
1589
|
+
return this;
|
|
1649
1590
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1591
|
+
var protoService = (0, service_1.wrapService)(location, service, options);
|
|
1592
|
+
var serviceOptions = (0, service_1.getServiceOptions)(protoService);
|
|
1593
|
+
var _iterator = _createForOfIteratorHelper(service_1.protectedMethods),
|
|
1594
|
+
_step;
|
|
1595
|
+
try {
|
|
1596
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1597
|
+
var name = _step.value;
|
|
1598
|
+
if (serviceOptions.methods.includes(name)) {
|
|
1599
|
+
throw new Error("'".concat(name, "' on service '").concat(location, "' is not allowed as a custom method name"));
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
} catch (err) {
|
|
1603
|
+
_iterator.e(err);
|
|
1604
|
+
} finally {
|
|
1605
|
+
_iterator.f();
|
|
1652
1606
|
}
|
|
1653
|
-
|
|
1607
|
+
debug("Registering new service at `".concat(location, "`"));
|
|
1608
|
+
// Add all the mixins
|
|
1609
|
+
this.mixins.forEach(function (fn) {
|
|
1610
|
+
return fn.call(_this4, protoService, location, serviceOptions);
|
|
1611
|
+
});
|
|
1612
|
+
this.services[location] = protoService;
|
|
1613
|
+
// If we ran setup already, set this service up explicitly, this will not `await`
|
|
1614
|
+
if (this._isSetup && typeof protoService.setup === 'function') {
|
|
1615
|
+
debug("Setting up service for `".concat(location, "`"));
|
|
1616
|
+
protoService.setup(this, location);
|
|
1617
|
+
}
|
|
1618
|
+
return this;
|
|
1654
1619
|
}
|
|
1655
1620
|
}, {
|
|
1656
|
-
key: "
|
|
1657
|
-
value: function
|
|
1658
|
-
var
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1621
|
+
key: "unuse",
|
|
1622
|
+
value: function () {
|
|
1623
|
+
var _unuse = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(location) {
|
|
1624
|
+
var path, service;
|
|
1625
|
+
return _regenerator().w(function (_context) {
|
|
1626
|
+
while (1) switch (_context.n) {
|
|
1627
|
+
case 0:
|
|
1628
|
+
path = (0, commons_1.stripSlashes)(location) || '/';
|
|
1629
|
+
service = this.services[path];
|
|
1630
|
+
if (!(service && typeof service.teardown === 'function')) {
|
|
1631
|
+
_context.n = 1;
|
|
1632
|
+
break;
|
|
1633
|
+
}
|
|
1634
|
+
_context.n = 1;
|
|
1635
|
+
return service.teardown(this, path);
|
|
1636
|
+
case 1:
|
|
1637
|
+
delete this.services[path];
|
|
1638
|
+
return _context.a(2, service);
|
|
1669
1639
|
}
|
|
1670
|
-
}
|
|
1640
|
+
}, _callee, this);
|
|
1641
|
+
}));
|
|
1642
|
+
function unuse(_x) {
|
|
1643
|
+
return _unuse.apply(this, arguments);
|
|
1644
|
+
}
|
|
1645
|
+
return unuse;
|
|
1646
|
+
}()
|
|
1647
|
+
}, {
|
|
1648
|
+
key: "hooks",
|
|
1649
|
+
value: function hooks(hookMap) {
|
|
1650
|
+
var untypedMap = hookMap;
|
|
1651
|
+
if (untypedMap.before || untypedMap.after || untypedMap.error || untypedMap.around) {
|
|
1652
|
+
// regular hooks for all service methods
|
|
1653
|
+
this.registerHooks(untypedMap);
|
|
1654
|
+
} else if (untypedMap.setup || untypedMap.teardown) {
|
|
1655
|
+
// .setup and .teardown application hooks
|
|
1656
|
+
(0, hooks_1.hooks)(this, untypedMap);
|
|
1657
|
+
} else {
|
|
1658
|
+
// Other registration formats are just `around` hooks
|
|
1659
|
+
this.registerHooks({
|
|
1660
|
+
around: untypedMap
|
|
1661
|
+
});
|
|
1671
1662
|
}
|
|
1672
|
-
return
|
|
1663
|
+
return this;
|
|
1673
1664
|
}
|
|
1674
1665
|
}]);
|
|
1675
|
-
}();
|
|
1676
|
-
exports.
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
exports
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
exports
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1666
|
+
}(events_1.EventEmitter);
|
|
1667
|
+
exports.Feathers = Feathers;
|
|
1668
|
+
|
|
1669
|
+
/***/ }),
|
|
1670
|
+
|
|
1671
|
+
/***/ "../feathers/lib/declarations.js":
|
|
1672
|
+
/*!***************************************!*\
|
|
1673
|
+
!*** ../feathers/lib/declarations.js ***!
|
|
1674
|
+
\***************************************/
|
|
1675
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
1680
|
+
value: true
|
|
1681
|
+
}));
|
|
1682
|
+
|
|
1683
|
+
/***/ }),
|
|
1684
|
+
|
|
1685
|
+
/***/ "../feathers/lib/events.js":
|
|
1686
|
+
/*!*********************************!*\
|
|
1687
|
+
!*** ../feathers/lib/events.js ***!
|
|
1688
|
+
\*********************************/
|
|
1689
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1690
|
+
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
1694
|
+
value: true
|
|
1695
|
+
}));
|
|
1696
|
+
exports.eventHook = eventHook;
|
|
1697
|
+
exports.eventMixin = eventMixin;
|
|
1698
|
+
var events_1 = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
1699
|
+
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
1700
|
+
function eventHook(context, next) {
|
|
1701
|
+
var _ref = (0, service_1.getServiceOptions)(context.self),
|
|
1702
|
+
events = _ref.events;
|
|
1703
|
+
var defaultEvent = service_1.defaultEventMap[context.method] || null;
|
|
1704
|
+
context.event = defaultEvent;
|
|
1705
|
+
return next().then(function () {
|
|
1706
|
+
// Send the event only if the service does not do so already (indicated in the `events` option)
|
|
1707
|
+
// This is used for custom events and for client services receiving event from the server
|
|
1708
|
+
if (typeof context.event === 'string' && !events.includes(context.event)) {
|
|
1709
|
+
var results = Array.isArray(context.result) ? context.result : [context.result];
|
|
1710
|
+
results.forEach(function (element) {
|
|
1711
|
+
return context.self.emit(context.event, element, context);
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1698
1715
|
}
|
|
1699
|
-
|
|
1700
|
-
function
|
|
1701
|
-
|
|
1702
|
-
|
|
1716
|
+
function eventMixin(service) {
|
|
1717
|
+
var isEmitter = typeof service.on === 'function' && typeof service.emit === 'function';
|
|
1718
|
+
if (!isEmitter) {
|
|
1719
|
+
Object.assign(service, events_1.EventEmitter.prototype);
|
|
1720
|
+
}
|
|
1721
|
+
return service;
|
|
1703
1722
|
}
|
|
1704
|
-
exports.setMiddleware = setMiddleware;
|
|
1705
1723
|
|
|
1706
1724
|
/***/ }),
|
|
1707
1725
|
|
|
1708
|
-
/***/ "
|
|
1709
|
-
|
|
1710
|
-
!***
|
|
1711
|
-
|
|
1712
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
1726
|
+
/***/ "../feathers/lib/hooks.js":
|
|
1727
|
+
/*!********************************!*\
|
|
1728
|
+
!*** ../feathers/lib/hooks.js ***!
|
|
1729
|
+
\********************************/
|
|
1730
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1713
1731
|
|
|
1714
1732
|
|
|
1715
1733
|
|
|
1716
|
-
function
|
|
1734
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
1735
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
1736
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
1737
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1738
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1739
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1740
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
1741
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
1742
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1743
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
1744
|
+
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
1745
|
+
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
1746
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
1747
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
1748
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
1749
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
1750
|
+
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."); }
|
|
1717
1751
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
1752
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
1753
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
1718
1754
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1755
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1719
1756
|
Object.defineProperty(exports, "__esModule", ({
|
|
1720
1757
|
value: true
|
|
1721
1758
|
}));
|
|
1722
|
-
exports.
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1759
|
+
exports.FeathersHookManager = void 0;
|
|
1760
|
+
exports.convertHookData = convertHookData;
|
|
1761
|
+
exports.collectHooks = collectHooks;
|
|
1762
|
+
exports.enableHooks = enableHooks;
|
|
1763
|
+
exports.createContext = createContext;
|
|
1764
|
+
exports.hookMixin = hookMixin;
|
|
1765
|
+
var hooks_1 = __webpack_require__(/*! @feathersjs/hooks */ "../../node_modules/@feathersjs/hooks/script/index.js");
|
|
1766
|
+
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
1767
|
+
var types = ['before', 'after', 'error', 'around'];
|
|
1768
|
+
var isType = function isType(value) {
|
|
1769
|
+
return types.includes(value);
|
|
1770
|
+
};
|
|
1771
|
+
// Converts different hook registration formats into the
|
|
1772
|
+
// same internal format
|
|
1773
|
+
function convertHookData(input) {
|
|
1774
|
+
var result = {};
|
|
1775
|
+
if (Array.isArray(input)) {
|
|
1776
|
+
result.all = input;
|
|
1777
|
+
} else if (_typeof(input) !== 'object') {
|
|
1778
|
+
result.all = [input];
|
|
1779
|
+
} else {
|
|
1780
|
+
for (var _i = 0, _Object$keys = Object.keys(input); _i < _Object$keys.length; _i++) {
|
|
1781
|
+
var key = _Object$keys[_i];
|
|
1782
|
+
var value = input[key];
|
|
1783
|
+
result[key] = Array.isArray(value) ? value : [value];
|
|
1735
1784
|
}
|
|
1736
|
-
} catch (err) {
|
|
1737
|
-
_iterator.e(err);
|
|
1738
|
-
} finally {
|
|
1739
|
-
_iterator.f();
|
|
1740
1785
|
}
|
|
1741
|
-
return
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1786
|
+
return result;
|
|
1787
|
+
}
|
|
1788
|
+
function collectHooks(target, method) {
|
|
1789
|
+
var _target$__hooks = target.__hooks,
|
|
1790
|
+
collected = _target$__hooks.collected,
|
|
1791
|
+
collectedAll = _target$__hooks.collectedAll,
|
|
1792
|
+
around = _target$__hooks.around;
|
|
1793
|
+
return [].concat(_toConsumableArray(around.all || []), _toConsumableArray(around[method] || []), _toConsumableArray(collectedAll.before || []), _toConsumableArray(collected[method] || []), _toConsumableArray(collectedAll.after || []));
|
|
1794
|
+
}
|
|
1795
|
+
// Add `.hooks` functionality to an object
|
|
1796
|
+
function enableHooks(object) {
|
|
1797
|
+
var store = {
|
|
1798
|
+
around: {},
|
|
1799
|
+
before: {},
|
|
1800
|
+
after: {},
|
|
1801
|
+
error: {},
|
|
1802
|
+
collected: {},
|
|
1803
|
+
collectedAll: {}
|
|
1804
|
+
};
|
|
1805
|
+
Object.defineProperty(object, '__hooks', {
|
|
1806
|
+
configurable: true,
|
|
1807
|
+
value: store,
|
|
1808
|
+
writable: true
|
|
1809
|
+
});
|
|
1810
|
+
return function registerHooks(input) {
|
|
1811
|
+
var store = this.__hooks;
|
|
1812
|
+
var map = Object.keys(input).reduce(function (map, type) {
|
|
1813
|
+
if (!isType(type)) {
|
|
1814
|
+
throw new Error("'".concat(type, "' is not a valid hook type"));
|
|
1761
1815
|
}
|
|
1762
|
-
|
|
1816
|
+
map[type] = convertHookData(input[type]);
|
|
1817
|
+
return map;
|
|
1818
|
+
}, {});
|
|
1819
|
+
var types = Object.keys(map);
|
|
1820
|
+
types.forEach(function (type) {
|
|
1821
|
+
return Object.keys(map[type]).forEach(function (method) {
|
|
1822
|
+
var _a;
|
|
1823
|
+
var mapHooks = map[type][method];
|
|
1824
|
+
var storeHooks = (_a = store[type])[method] || (_a[method] = []);
|
|
1825
|
+
storeHooks.push.apply(storeHooks, _toConsumableArray(mapHooks));
|
|
1826
|
+
if (method === 'all') {
|
|
1827
|
+
if (store.before[method] || store.error[method]) {
|
|
1828
|
+
var beforeAll = (0, hooks_1.collect)({
|
|
1829
|
+
before: store.before[method] || [],
|
|
1830
|
+
error: store.error[method] || []
|
|
1831
|
+
});
|
|
1832
|
+
store.collectedAll.before = [beforeAll];
|
|
1833
|
+
}
|
|
1834
|
+
if (store.after[method]) {
|
|
1835
|
+
var afterAll = (0, hooks_1.collect)({
|
|
1836
|
+
after: store.after[method] || []
|
|
1837
|
+
});
|
|
1838
|
+
store.collectedAll.after = [afterAll];
|
|
1839
|
+
}
|
|
1840
|
+
} else {
|
|
1841
|
+
if (store.before[method] || store.after[method] || store.error[method]) {
|
|
1842
|
+
var collected = (0, hooks_1.collect)({
|
|
1843
|
+
before: store.before[method] || [],
|
|
1844
|
+
after: store.after[method] || [],
|
|
1845
|
+
error: store.error[method] || []
|
|
1846
|
+
});
|
|
1847
|
+
store.collected[method] = [collected];
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
});
|
|
1852
|
+
return this;
|
|
1763
1853
|
};
|
|
1764
1854
|
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
\************************************************************/
|
|
1773
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
1778
|
-
value: true
|
|
1779
|
-
}));
|
|
1780
|
-
exports.legacyDecorator = exports.hookDecorator = exports.objectHooks = exports.functionHooks = exports.getOriginal = void 0;
|
|
1781
|
-
var compose_js_1 = __webpack_require__(/*! ./compose.js */ "../../node_modules/@feathersjs/hooks/script/compose.js");
|
|
1782
|
-
var base_js_1 = __webpack_require__(/*! ./base.js */ "../../node_modules/@feathersjs/hooks/script/base.js");
|
|
1783
|
-
var utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@feathersjs/hooks/script/utils.js");
|
|
1784
|
-
function getOriginal(fn) {
|
|
1785
|
-
return typeof fn.original === 'function' ? getOriginal(fn.original) : fn;
|
|
1855
|
+
function createContext(service, method) {
|
|
1856
|
+
var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1857
|
+
var createContext = service[method].createContext;
|
|
1858
|
+
if (typeof createContext !== 'function') {
|
|
1859
|
+
throw new Error("Can not create context for method ".concat(method));
|
|
1860
|
+
}
|
|
1861
|
+
return createContext(data);
|
|
1786
1862
|
}
|
|
1787
|
-
|
|
1788
|
-
function
|
|
1789
|
-
|
|
1790
|
-
|
|
1863
|
+
var FeathersHookManager = /*#__PURE__*/function (_hooks_1$HookManager) {
|
|
1864
|
+
function FeathersHookManager(app, method) {
|
|
1865
|
+
var _this;
|
|
1866
|
+
_classCallCheck(this, FeathersHookManager);
|
|
1867
|
+
_this = _callSuper(this, FeathersHookManager);
|
|
1868
|
+
_this.app = app;
|
|
1869
|
+
_this.method = method;
|
|
1870
|
+
_this._middleware = [];
|
|
1871
|
+
return _this;
|
|
1791
1872
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
}
|
|
1801
|
-
var returnContext = args[args.length - 1] instanceof Context;
|
|
1802
|
-
// Use existing context or default
|
|
1803
|
-
var base = returnContext ? args.pop() : new Context();
|
|
1804
|
-
// Initialize the context
|
|
1805
|
-
var context = manager.initializeContext(this, args, base);
|
|
1806
|
-
// Assemble the hook chain
|
|
1807
|
-
var hookChain = [
|
|
1808
|
-
// Return `ctx.result` or the context
|
|
1809
|
-
function (ctx, next) {
|
|
1810
|
-
return next().then(function () {
|
|
1811
|
-
return returnContext ? ctx : ctx.result;
|
|
1812
|
-
});
|
|
1813
|
-
}];
|
|
1814
|
-
// Create the hook chain by calling the `collectMiddleware function
|
|
1815
|
-
var mw = manager.collectMiddleware(this, args);
|
|
1816
|
-
if (mw) {
|
|
1817
|
-
Array.prototype.push.apply(hookChain, mw);
|
|
1873
|
+
_inherits(FeathersHookManager, _hooks_1$HookManager);
|
|
1874
|
+
return _createClass(FeathersHookManager, [{
|
|
1875
|
+
key: "collectMiddleware",
|
|
1876
|
+
value: function collectMiddleware(self, args) {
|
|
1877
|
+
var appHooks = collectHooks(this.app, this.method);
|
|
1878
|
+
var middleware = _superPropGet(FeathersHookManager, "collectMiddleware", this, 3)([self, args]);
|
|
1879
|
+
var methodHooks = collectHooks(self, this.method);
|
|
1880
|
+
return [].concat(_toConsumableArray(appHooks), _toConsumableArray(middleware), _toConsumableArray(methodHooks));
|
|
1818
1881
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
});
|
|
1826
|
-
}
|
|
1827
|
-
return next();
|
|
1828
|
-
});
|
|
1829
|
-
return (0, compose_js_1.compose)(hookChain).call(this, context);
|
|
1830
|
-
};
|
|
1831
|
-
(0, utils_js_1.copyFnProperties)(_wrapper, fn);
|
|
1832
|
-
(0, utils_js_1.copyProperties)(_wrapper, fn);
|
|
1833
|
-
(0, base_js_1.setManager)(_wrapper, manager);
|
|
1834
|
-
return Object.assign(_wrapper, {
|
|
1835
|
-
original: getOriginal(fn),
|
|
1836
|
-
Context: manager.getContextClass(),
|
|
1837
|
-
createContext: function createContext() {
|
|
1838
|
-
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1839
|
-
return new _wrapper.Context(data);
|
|
1882
|
+
}, {
|
|
1883
|
+
key: "initializeContext",
|
|
1884
|
+
value: function initializeContext(self, args, context) {
|
|
1885
|
+
var ctx = _superPropGet(FeathersHookManager, "initializeContext", this, 3)([self, args, context]);
|
|
1886
|
+
ctx.params = ctx.params || {};
|
|
1887
|
+
return ctx;
|
|
1840
1888
|
}
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
}
|
|
1848
|
-
for (var _i = 0, _Object$keys = Object.keys(hooks); _i < _Object$keys.length; _i++) {
|
|
1849
|
-
var method = _Object$keys[_i];
|
|
1850
|
-
var target = typeof obj[method] === 'function' ? obj : obj.prototype;
|
|
1851
|
-
var fn = target && target[method];
|
|
1852
|
-
if (typeof fn !== 'function') {
|
|
1853
|
-
throw new Error("Can not apply hooks. '".concat(method, "' is not a function"));
|
|
1889
|
+
}, {
|
|
1890
|
+
key: "middleware",
|
|
1891
|
+
value: function middleware(mw) {
|
|
1892
|
+
var _this$_middleware;
|
|
1893
|
+
(_this$_middleware = this._middleware).push.apply(_this$_middleware, _toConsumableArray(mw));
|
|
1894
|
+
return this;
|
|
1854
1895
|
}
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1896
|
+
}]);
|
|
1897
|
+
}(hooks_1.HookManager);
|
|
1898
|
+
exports.FeathersHookManager = FeathersHookManager;
|
|
1899
|
+
function hookMixin(service, path, options) {
|
|
1900
|
+
var _this2 = this;
|
|
1901
|
+
if (typeof service.hooks === 'function') {
|
|
1902
|
+
return service;
|
|
1859
1903
|
}
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
var
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1904
|
+
var hookMethods = (0, service_1.getHookMethods)(service, options);
|
|
1905
|
+
var serviceMethodHooks = hookMethods.reduce(function (res, method) {
|
|
1906
|
+
var _FeathersHookManager;
|
|
1907
|
+
var params = service_1.defaultServiceArguments[method] || ['data', 'params'];
|
|
1908
|
+
res[method] = (_FeathersHookManager = new FeathersHookManager(_this2, method)).params.apply(_FeathersHookManager, _toConsumableArray(params)).props({
|
|
1909
|
+
app: _this2,
|
|
1910
|
+
path: path,
|
|
1911
|
+
method: method,
|
|
1912
|
+
service: service,
|
|
1913
|
+
event: null,
|
|
1914
|
+
type: 'around',
|
|
1915
|
+
get statusCode() {
|
|
1916
|
+
var _a;
|
|
1917
|
+
return (_a = this.http) === null || _a === void 0 ? void 0 : _a.status;
|
|
1918
|
+
},
|
|
1919
|
+
set statusCode(value) {
|
|
1920
|
+
this.http = this.http || {};
|
|
1921
|
+
this.http.status = value;
|
|
1922
|
+
}
|
|
1923
|
+
});
|
|
1924
|
+
return res;
|
|
1925
|
+
}, {});
|
|
1926
|
+
var registerHooks = enableHooks(service);
|
|
1927
|
+
(0, hooks_1.hooks)(service, serviceMethodHooks);
|
|
1928
|
+
service.hooks = function (hookOptions) {
|
|
1929
|
+
var _this3 = this;
|
|
1930
|
+
if (hookOptions.before || hookOptions.after || hookOptions.error || hookOptions.around) {
|
|
1931
|
+
return registerHooks.call(this, hookOptions);
|
|
1885
1932
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
throw new Error("Can not apply hooks. '".concat(method, "' is not a function"));
|
|
1933
|
+
if (Array.isArray(hookOptions)) {
|
|
1934
|
+
return (0, hooks_1.hooks)(this, hookOptions);
|
|
1889
1935
|
}
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1936
|
+
Object.keys(hookOptions).forEach(function (method) {
|
|
1937
|
+
var manager = (0, hooks_1.getManager)(_this3[method]);
|
|
1938
|
+
if (!(manager instanceof FeathersHookManager)) {
|
|
1939
|
+
throw new Error("Method ".concat(method, " is not a Feathers hooks enabled service method"));
|
|
1940
|
+
}
|
|
1941
|
+
manager.middleware(hookOptions[method]);
|
|
1942
|
+
});
|
|
1943
|
+
return this;
|
|
1894
1944
|
};
|
|
1895
|
-
return
|
|
1896
|
-
}
|
|
1897
|
-
exports.legacyDecorator = legacyDecorator;
|
|
1945
|
+
return service;
|
|
1946
|
+
}
|
|
1898
1947
|
|
|
1899
1948
|
/***/ }),
|
|
1900
1949
|
|
|
1901
|
-
/***/ "
|
|
1902
|
-
|
|
1903
|
-
!***
|
|
1904
|
-
|
|
1905
|
-
/***/ (function(
|
|
1950
|
+
/***/ "../feathers/lib/index.js":
|
|
1951
|
+
/*!********************************!*\
|
|
1952
|
+
!*** ../feathers/lib/index.js ***!
|
|
1953
|
+
\********************************/
|
|
1954
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1906
1955
|
|
|
1907
1956
|
|
|
1908
1957
|
|
|
1909
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
1910
|
-
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."); }
|
|
1911
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
1912
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
1913
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
1914
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1915
1958
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1916
1959
|
if (k2 === undefined) k2 = k;
|
|
1917
1960
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1931,60 +1974,43 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
1931
1974
|
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1932
1975
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1933
1976
|
};
|
|
1977
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
1978
|
+
return mod && mod.__esModule ? mod : {
|
|
1979
|
+
"default": mod
|
|
1980
|
+
};
|
|
1981
|
+
};
|
|
1934
1982
|
Object.defineProperty(exports, "__esModule", ({
|
|
1935
1983
|
value: true
|
|
1936
1984
|
}));
|
|
1937
|
-
exports.
|
|
1938
|
-
|
|
1939
|
-
var
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
* @param options Middleware options (params, default, props)
|
|
1948
|
-
*/
|
|
1949
|
-
function middleware(mw, options) {
|
|
1950
|
-
var manager = new base_js_1.HookManager().middleware(mw);
|
|
1951
|
-
if (options) {
|
|
1952
|
-
if (options.params) {
|
|
1953
|
-
manager.params.apply(manager, _toConsumableArray(options.params));
|
|
1954
|
-
}
|
|
1955
|
-
if (options.defaults) {
|
|
1956
|
-
manager.defaults(options.defaults);
|
|
1957
|
-
}
|
|
1958
|
-
if (options.props) {
|
|
1959
|
-
manager.props(options.props);
|
|
1960
|
-
}
|
|
1985
|
+
exports.Feathers = exports.version = void 0;
|
|
1986
|
+
exports.feathers = feathers;
|
|
1987
|
+
var commons_1 = __webpack_require__(/*! @feathersjs/commons */ "../commons/lib/index.js");
|
|
1988
|
+
var version_1 = __importDefault(__webpack_require__(/*! ./version */ "../feathers/lib/version.js"));
|
|
1989
|
+
exports.version = version_1.default;
|
|
1990
|
+
var application_1 = __webpack_require__(/*! ./application */ "../feathers/lib/application.js");
|
|
1991
|
+
Object.defineProperty(exports, "Feathers", ({
|
|
1992
|
+
enumerable: true,
|
|
1993
|
+
get: function get() {
|
|
1994
|
+
return application_1.Feathers;
|
|
1961
1995
|
}
|
|
1962
|
-
|
|
1996
|
+
}));
|
|
1997
|
+
function feathers() {
|
|
1998
|
+
return new application_1.Feathers();
|
|
1963
1999
|
}
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
var target = args[0],
|
|
1971
|
-
_hooks = args[1];
|
|
1972
|
-
if (typeof target === 'function' && (_hooks instanceof base_js_1.HookManager || Array.isArray(_hooks) || args.length === 1)) {
|
|
1973
|
-
return (0, hooks_js_1.functionHooks)(target, _hooks);
|
|
1974
|
-
}
|
|
1975
|
-
if (args.length === 2) {
|
|
1976
|
-
return (0, hooks_js_1.objectHooks)(target, _hooks);
|
|
1977
|
-
}
|
|
1978
|
-
return (0, hooks_js_1.hookDecorator)(target);
|
|
2000
|
+
feathers.setDebug = commons_1.setDebug;
|
|
2001
|
+
__exportStar(__webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js"), exports);
|
|
2002
|
+
__exportStar(__webpack_require__(/*! ./declarations */ "../feathers/lib/declarations.js"), exports);
|
|
2003
|
+
__exportStar(__webpack_require__(/*! ./service */ "../feathers/lib/service.js"), exports);
|
|
2004
|
+
if (true) {
|
|
2005
|
+
module.exports = Object.assign(feathers, module.exports);
|
|
1979
2006
|
}
|
|
1980
|
-
exports.hooks = hooks;
|
|
1981
2007
|
|
|
1982
2008
|
/***/ }),
|
|
1983
2009
|
|
|
1984
|
-
/***/ "
|
|
1985
|
-
|
|
1986
|
-
!***
|
|
1987
|
-
|
|
2010
|
+
/***/ "../feathers/lib/service.js":
|
|
2011
|
+
/*!**********************************!*\
|
|
2012
|
+
!*** ../feathers/lib/service.js ***!
|
|
2013
|
+
\**********************************/
|
|
1988
2014
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1989
2015
|
|
|
1990
2016
|
|
|
@@ -2004,136 +2030,114 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
2004
2030
|
Object.defineProperty(exports, "__esModule", ({
|
|
2005
2031
|
value: true
|
|
2006
2032
|
}));
|
|
2007
|
-
exports.
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2033
|
+
exports.normalizeServiceOptions = exports.protectedMethods = exports.defaultServiceEvents = exports.defaultEventMap = exports.defaultServiceMethods = exports.defaultServiceArguments = exports.SERVICE = void 0;
|
|
2034
|
+
exports.getHookMethods = getHookMethods;
|
|
2035
|
+
exports.getServiceOptions = getServiceOptions;
|
|
2036
|
+
exports.wrapService = wrapService;
|
|
2037
|
+
var events_1 = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
2038
|
+
var commons_1 = __webpack_require__(/*! @feathersjs/commons */ "../commons/lib/index.js");
|
|
2039
|
+
exports.SERVICE = (0, commons_1.createSymbol)('@feathersjs/service');
|
|
2040
|
+
exports.defaultServiceArguments = {
|
|
2041
|
+
find: ['params'],
|
|
2042
|
+
get: ['id', 'params'],
|
|
2043
|
+
create: ['data', 'params'],
|
|
2044
|
+
update: ['id', 'data', 'params'],
|
|
2045
|
+
patch: ['id', 'data', 'params'],
|
|
2046
|
+
remove: ['id', 'params']
|
|
2018
2047
|
};
|
|
2019
|
-
exports.
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
});
|
|
2026
|
-
}, Promise.resolve(context));
|
|
2027
|
-
};
|
|
2048
|
+
exports.defaultServiceMethods = ['find', 'get', 'create', 'update', 'patch', 'remove'];
|
|
2049
|
+
exports.defaultEventMap = {
|
|
2050
|
+
create: 'created',
|
|
2051
|
+
update: 'updated',
|
|
2052
|
+
patch: 'patched',
|
|
2053
|
+
remove: 'removed'
|
|
2028
2054
|
};
|
|
2029
|
-
exports.
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
function fromAfterHook(hook) {
|
|
2037
|
-
return function (context, next) {
|
|
2038
|
-
return next().then(function () {
|
|
2039
|
-
return (0, exports.runHook)(hook, context, 'after');
|
|
2040
|
-
});
|
|
2041
|
-
};
|
|
2055
|
+
exports.defaultServiceEvents = Object.values(exports.defaultEventMap);
|
|
2056
|
+
exports.protectedMethods = Object.keys(Object.prototype).concat(Object.keys(events_1.EventEmitter.prototype)).concat(['all', 'around', 'before', 'after', 'error', 'hooks', 'setup', 'teardown', 'publish']);
|
|
2057
|
+
function getHookMethods(service, options) {
|
|
2058
|
+
var methods = options.methods;
|
|
2059
|
+
return exports.defaultServiceMethods.filter(function (m) {
|
|
2060
|
+
return typeof service[m] === 'function' && !methods.includes(m);
|
|
2061
|
+
}).concat(methods);
|
|
2042
2062
|
}
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
return function (context, next) {
|
|
2046
|
-
return next().catch(function (error) {
|
|
2047
|
-
if (context.error !== error || context.result !== undefined) {
|
|
2048
|
-
context.original = _objectSpread({}, context);
|
|
2049
|
-
context.error = error;
|
|
2050
|
-
delete context.result;
|
|
2051
|
-
}
|
|
2052
|
-
return (0, exports.runHook)(hook, context, 'error').then(function () {
|
|
2053
|
-
if (context.result === undefined && context.error !== undefined) {
|
|
2054
|
-
throw context.error;
|
|
2055
|
-
}
|
|
2056
|
-
}).catch(function (error) {
|
|
2057
|
-
context.error = error;
|
|
2058
|
-
throw context.error;
|
|
2059
|
-
});
|
|
2060
|
-
});
|
|
2061
|
-
};
|
|
2063
|
+
function getServiceOptions(service) {
|
|
2064
|
+
return service[exports.SERVICE];
|
|
2062
2065
|
}
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
var
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
var
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2066
|
+
var normalizeServiceOptions = function normalizeServiceOptions(service) {
|
|
2067
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2068
|
+
var _options$methods = options.methods,
|
|
2069
|
+
methods = _options$methods === void 0 ? exports.defaultServiceMethods.filter(function (method) {
|
|
2070
|
+
return typeof service[method] === 'function';
|
|
2071
|
+
}) : _options$methods,
|
|
2072
|
+
_options$events = options.events,
|
|
2073
|
+
events = _options$events === void 0 ? service.events || [] : _options$events;
|
|
2074
|
+
var serviceEvents = options.serviceEvents || exports.defaultServiceEvents.concat(events);
|
|
2075
|
+
return _objectSpread(_objectSpread({}, options), {}, {
|
|
2076
|
+
events: events,
|
|
2077
|
+
methods: methods,
|
|
2078
|
+
serviceEvents: serviceEvents
|
|
2079
|
+
});
|
|
2080
|
+
};
|
|
2081
|
+
exports.normalizeServiceOptions = normalizeServiceOptions;
|
|
2082
|
+
function wrapService(location, service, options) {
|
|
2083
|
+
// Do nothing if this is already an initialized
|
|
2084
|
+
if (service[exports.SERVICE]) {
|
|
2085
|
+
return service;
|
|
2086
|
+
}
|
|
2087
|
+
var protoService = Object.create(service);
|
|
2088
|
+
var serviceOptions = (0, exports.normalizeServiceOptions)(service, options);
|
|
2089
|
+
if (Object.keys(serviceOptions.methods).length === 0 && ![].concat(_toConsumableArray(exports.defaultServiceMethods), ['setup', 'teardown']).some(function (method) {
|
|
2090
|
+
return typeof service[method] === 'function';
|
|
2091
|
+
})) {
|
|
2092
|
+
throw new Error("Invalid service object passed for path `".concat(location, "`"));
|
|
2093
|
+
}
|
|
2094
|
+
Object.defineProperty(protoService, exports.SERVICE, {
|
|
2095
|
+
value: serviceOptions
|
|
2096
|
+
});
|
|
2097
|
+
return protoService;
|
|
2075
2098
|
}
|
|
2076
|
-
exports.collect = collect;
|
|
2077
2099
|
|
|
2078
2100
|
/***/ }),
|
|
2079
2101
|
|
|
2080
|
-
/***/ "
|
|
2081
|
-
|
|
2082
|
-
!***
|
|
2083
|
-
|
|
2102
|
+
/***/ "../feathers/lib/version.js":
|
|
2103
|
+
/*!**********************************!*\
|
|
2104
|
+
!*** ../feathers/lib/version.js ***!
|
|
2105
|
+
\**********************************/
|
|
2084
2106
|
/***/ (function(__unused_webpack_module, exports) {
|
|
2085
2107
|
|
|
2086
2108
|
|
|
2087
2109
|
|
|
2088
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2089
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
2090
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
2091
2110
|
Object.defineProperty(exports, "__esModule", ({
|
|
2092
2111
|
value: true
|
|
2093
2112
|
}));
|
|
2094
|
-
exports
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
} catch (err) {
|
|
2113
|
-
_iterator.e(err);
|
|
2114
|
-
} finally {
|
|
2115
|
-
_iterator.f();
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
return target;
|
|
2119
|
-
}
|
|
2120
|
-
exports.copyProperties = copyProperties;
|
|
2121
|
-
function copyFnProperties(target, original) {
|
|
2122
|
-
var internalProps = ['name', 'length'];
|
|
2123
|
-
try {
|
|
2124
|
-
for (var _i2 = 0, _internalProps = internalProps; _i2 < _internalProps.length; _i2++) {
|
|
2125
|
-
var prop = _internalProps[_i2];
|
|
2126
|
-
var value = original[prop];
|
|
2127
|
-
Object.defineProperty(target, prop, {
|
|
2128
|
-
value: value
|
|
2129
|
-
});
|
|
2113
|
+
exports["default"] = 'development';
|
|
2114
|
+
|
|
2115
|
+
/***/ }),
|
|
2116
|
+
|
|
2117
|
+
/***/ "./src/core.ts":
|
|
2118
|
+
/*!*********************!*\
|
|
2119
|
+
!*** ./src/core.ts ***!
|
|
2120
|
+
\*********************/
|
|
2121
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2125
|
+
if (k2 === undefined) k2 = k;
|
|
2126
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2127
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2128
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
2130
2129
|
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2130
|
+
Object.defineProperty(o, k2, desc);
|
|
2131
|
+
}) : (function(o, m, k, k2) {
|
|
2132
|
+
if (k2 === undefined) k2 = k;
|
|
2133
|
+
o[k2] = m[k];
|
|
2134
|
+
}));
|
|
2135
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
2136
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2137
|
+
};
|
|
2138
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2139
|
+
__exportStar(__webpack_require__(/*! @feathersjs/feathers */ "../feathers/lib/index.js"), exports);
|
|
2140
|
+
|
|
2137
2141
|
|
|
2138
2142
|
/***/ })
|
|
2139
2143
|
|
|
@@ -2149,6 +2153,12 @@ exports.copyFnProperties = copyFnProperties;
|
|
|
2149
2153
|
/******/ if (cachedModule !== undefined) {
|
|
2150
2154
|
/******/ return cachedModule.exports;
|
|
2151
2155
|
/******/ }
|
|
2156
|
+
/******/ // Check if module exists (development only)
|
|
2157
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
2158
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
2159
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
2160
|
+
/******/ throw e;
|
|
2161
|
+
/******/ }
|
|
2152
2162
|
/******/ // Create a new module (and put it into the cache)
|
|
2153
2163
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2154
2164
|
/******/ // no module.id needed
|
|
@@ -2157,12 +2167,6 @@ exports.copyFnProperties = copyFnProperties;
|
|
|
2157
2167
|
/******/ };
|
|
2158
2168
|
/******/
|
|
2159
2169
|
/******/ // Execute the module function
|
|
2160
|
-
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
2161
|
-
/******/ delete __webpack_module_cache__[moduleId];
|
|
2162
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
2163
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
2164
|
-
/******/ throw e;
|
|
2165
|
-
/******/ }
|
|
2166
2170
|
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2167
2171
|
/******/
|
|
2168
2172
|
/******/ // Return the exports of the module
|