@feathersjs/client 5.0.37 → 6.0.0-pre.0
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 +58 -0
- package/README.md +1 -1
- package/core.js +1 -1
- package/dist/core.js +1731 -1577
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -2
- package/dist/feathers.js +4993 -4957
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -2
- package/package.json +18 -18
- package/src/feathers.ts +0 -4
- package/dist/core.min.js.LICENSE.txt +0 -1
- package/dist/feathers.min.js.LICENSE.txt +0 -1
package/dist/core.js
CHANGED
|
@@ -1,723 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["feathers"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["feathers"] = factory();
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return /******/ (function() { // webpackBootstrap
|
|
12
|
-
/******/ "use strict";
|
|
13
|
-
/******/ var __webpack_modules__ = ({
|
|
14
|
-
|
|
15
|
-
/***/ "../../node_modules/@feathersjs/hooks/script/base.js":
|
|
16
|
-
/*!***********************************************************!*\
|
|
17
|
-
!*** ../../node_modules/@feathersjs/hooks/script/base.js ***!
|
|
18
|
-
\***********************************************************/
|
|
19
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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); }
|
|
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); }
|
|
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."); }
|
|
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); }
|
|
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; }
|
|
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); }
|
|
42
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
43
|
-
value: true
|
|
44
|
-
}));
|
|
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
|
-
}, {});
|
|
77
|
-
}
|
|
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
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(this, "_params", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
configurable: true,
|
|
93
|
-
writable: true,
|
|
94
|
-
value: null
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(this, "_middleware", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
configurable: true,
|
|
99
|
-
writable: true,
|
|
100
|
-
value: null
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(this, "_props", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
configurable: true,
|
|
105
|
-
writable: true,
|
|
106
|
-
value: null
|
|
107
|
-
});
|
|
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;
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
key: "middleware",
|
|
123
|
-
value: function middleware(_middleware) {
|
|
124
|
-
this._middleware = _middleware !== null && _middleware !== void 0 && _middleware.length ? _middleware : null;
|
|
125
|
-
return this;
|
|
126
|
-
}
|
|
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;
|
|
136
|
-
}
|
|
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);
|
|
144
|
-
}
|
|
145
|
-
return otherMiddleware || middleware || [];
|
|
146
|
-
}
|
|
147
|
-
}, {
|
|
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);
|
|
154
|
-
return this;
|
|
155
|
-
}
|
|
156
|
-
}, {
|
|
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;
|
|
165
|
-
}
|
|
166
|
-
}, {
|
|
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;
|
|
174
|
-
}
|
|
175
|
-
}, {
|
|
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);
|
|
182
|
-
}
|
|
183
|
-
return previous || this._params;
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
key: "defaults",
|
|
187
|
-
value: function defaults(_defaults) {
|
|
188
|
-
this._defaults = _defaults;
|
|
189
|
-
return this;
|
|
190
|
-
}
|
|
191
|
-
}, {
|
|
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;
|
|
201
|
-
}
|
|
202
|
-
}, {
|
|
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."));
|
|
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
|
-
});
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
if (props) {
|
|
233
|
-
(0, utils_js_1.copyProperties)(ContextClass.prototype, props);
|
|
234
|
-
}
|
|
235
|
-
return ContextClass;
|
|
236
|
-
}
|
|
237
|
-
}, {
|
|
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;
|
|
244
|
-
}
|
|
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];
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return ctx;
|
|
255
|
-
}
|
|
256
|
-
}]);
|
|
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;
|
|
287
|
-
|
|
288
|
-
/***/ }),
|
|
289
|
-
|
|
290
|
-
/***/ "../../node_modules/@feathersjs/hooks/script/compose.js":
|
|
291
|
-
/*!**************************************************************!*\
|
|
292
|
-
!*** ../../node_modules/@feathersjs/hooks/script/compose.js ***!
|
|
293
|
-
\**************************************************************/
|
|
294
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
295
|
-
|
|
296
|
-
|
|
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; }
|
|
301
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
302
|
-
value: true
|
|
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;
|
|
348
|
-
|
|
349
|
-
/***/ }),
|
|
350
|
-
|
|
351
|
-
/***/ "../../node_modules/@feathersjs/hooks/script/hooks.js":
|
|
352
|
-
/*!************************************************************!*\
|
|
353
|
-
!*** ../../node_modules/@feathersjs/hooks/script/hooks.js ***!
|
|
354
|
-
\************************************************************/
|
|
355
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
360
|
-
value: true
|
|
361
|
-
}));
|
|
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;
|
|
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);
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
exports.functionHooks = functionHooks;
|
|
426
|
-
function objectHooks(obj, hooks) {
|
|
427
|
-
if (Array.isArray(hooks)) {
|
|
428
|
-
return (0, base_js_1.setMiddleware)(obj, hooks);
|
|
429
|
-
}
|
|
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"));
|
|
436
|
-
}
|
|
437
|
-
var manager = (0, base_js_1.convertOptions)(hooks[method]);
|
|
438
|
-
target[method] = functionHooks(fn, manager.props({
|
|
439
|
-
method: method
|
|
440
|
-
}));
|
|
441
|
-
}
|
|
442
|
-
return obj;
|
|
443
|
-
}
|
|
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
|
-
}));
|
|
456
|
-
}
|
|
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;
|
|
467
|
-
}
|
|
468
|
-
var fn = descriptor.value;
|
|
469
|
-
if (typeof fn !== 'function') {
|
|
470
|
-
throw new Error("Can not apply hooks. '".concat(method, "' is not a function"));
|
|
471
|
-
}
|
|
472
|
-
descriptor.value = functionHooks(fn, manager.props({
|
|
473
|
-
method: method
|
|
474
|
-
}));
|
|
475
|
-
return descriptor;
|
|
476
|
-
};
|
|
477
|
-
return wrapper;
|
|
478
|
-
};
|
|
479
|
-
exports.legacyDecorator = legacyDecorator;
|
|
480
|
-
|
|
481
|
-
/***/ }),
|
|
482
|
-
|
|
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
|
-
|
|
489
|
-
|
|
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; }
|
|
497
|
-
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
498
|
-
if (k2 === undefined) k2 = k;
|
|
499
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
500
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
501
|
-
desc = {
|
|
502
|
-
enumerable: true,
|
|
503
|
-
get: function get() {
|
|
504
|
-
return m[k];
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
Object.defineProperty(o, k2, desc);
|
|
509
|
-
} : function (o, m, k, k2) {
|
|
510
|
-
if (k2 === undefined) k2 = k;
|
|
511
|
-
o[k2] = m[k];
|
|
512
|
-
});
|
|
513
|
-
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
514
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
515
|
-
};
|
|
516
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
517
|
-
value: true
|
|
518
|
-
}));
|
|
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
|
-
}
|
|
543
|
-
}
|
|
544
|
-
return manager;
|
|
545
|
-
}
|
|
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);
|
|
561
|
-
}
|
|
562
|
-
exports.hooks = hooks;
|
|
563
|
-
|
|
564
|
-
/***/ }),
|
|
565
|
-
|
|
566
|
-
/***/ "../../node_modules/@feathersjs/hooks/script/regular.js":
|
|
567
|
-
/*!**************************************************************!*\
|
|
568
|
-
!*** ../../node_modules/@feathersjs/hooks/script/regular.js ***!
|
|
569
|
-
\**************************************************************/
|
|
570
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
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); }
|
|
575
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
576
|
-
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."); }
|
|
577
|
-
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; } }
|
|
578
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
579
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
580
|
-
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; }
|
|
581
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
582
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
583
|
-
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; }
|
|
584
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
585
|
-
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); }
|
|
586
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
587
|
-
value: true
|
|
588
|
-
}));
|
|
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
|
-
});
|
|
600
|
-
};
|
|
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
|
-
};
|
|
610
|
-
};
|
|
611
|
-
exports.runHooks = runHooks;
|
|
612
|
-
function fromBeforeHook(hook) {
|
|
613
|
-
return function (context, next) {
|
|
614
|
-
return (0, exports.runHook)(hook, context, 'before').then(next);
|
|
615
|
-
};
|
|
616
|
-
}
|
|
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
|
-
};
|
|
624
|
-
}
|
|
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];
|
|
680
|
-
}
|
|
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
|
|
715
|
-
}
|
|
716
|
-
return target;
|
|
717
|
-
}
|
|
718
|
-
exports.copyFnProperties = copyFnProperties;
|
|
719
|
-
|
|
720
|
-
/***/ }),
|
|
1
|
+
/******/ var __webpack_modules__ = ({
|
|
721
2
|
|
|
722
3
|
/***/ "../../node_modules/events/events.js":
|
|
723
4
|
/*!*******************************************!*\
|
|
@@ -1226,952 +507,1825 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
1226
507
|
|
|
1227
508
|
/***/ }),
|
|
1228
509
|
|
|
1229
|
-
/***/ "
|
|
1230
|
-
|
|
1231
|
-
!***
|
|
1232
|
-
|
|
1233
|
-
/***/ (function(
|
|
510
|
+
/***/ "../../node_modules/feathers/lib/application.js":
|
|
511
|
+
/*!******************************************************!*\
|
|
512
|
+
!*** ../../node_modules/feathers/lib/application.js ***!
|
|
513
|
+
\******************************************************/
|
|
514
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1234
515
|
|
|
516
|
+
__webpack_require__.r(__webpack_exports__);
|
|
517
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
518
|
+
/* harmony export */ Feathers: function() { return /* binding */ Feathers; }
|
|
519
|
+
/* harmony export */ });
|
|
520
|
+
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
521
|
+
/* harmony import */ var _hooks_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hooks/index.js */ "../../node_modules/feathers/lib/hooks/index.js");
|
|
522
|
+
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commons.js */ "../../node_modules/feathers/lib/commons.js");
|
|
523
|
+
/* harmony import */ var _debug_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./debug.js */ "../../node_modules/feathers/lib/debug.js");
|
|
524
|
+
/* harmony import */ var _version_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./version.js */ "../../node_modules/feathers/lib/version.js");
|
|
525
|
+
/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./events.js */ "../../node_modules/feathers/lib/events.js");
|
|
526
|
+
/* harmony import */ var _hooks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hooks.js */ "../../node_modules/feathers/lib/hooks.js");
|
|
527
|
+
/* harmony import */ var _service_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./service.js */ "../../node_modules/feathers/lib/service.js");
|
|
528
|
+
/* harmony import */ var _router_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./router.js */ "../../node_modules/feathers/lib/router.js");
|
|
529
|
+
/* harmony import */ var _channel_base_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./channel/base.js */ "../../node_modules/feathers/lib/channel/base.js");
|
|
530
|
+
/* harmony import */ var _channel_combined_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./channel/combined.js */ "../../node_modules/feathers/lib/channel/combined.js");
|
|
531
|
+
/* harmony import */ var _channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./channel/mixin.js */ "../../node_modules/feathers/lib/channel/mixin.js");
|
|
532
|
+
var _a, _b;
|
|
1235
533
|
|
|
1236
534
|
|
|
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
535
|
|
|
1263
|
-
/***/ }),
|
|
1264
536
|
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
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
|
-
});
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
const debug = (0,_debug_js__WEBPACK_IMPORTED_MODULE_3__.createDebug)('@feathersjs/feathers');
|
|
547
|
+
const channelDebug = (0,_debug_js__WEBPACK_IMPORTED_MODULE_3__.createDebug)('@feathersjs/transport-commons/channels');
|
|
548
|
+
class Feathers extends events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {
|
|
549
|
+
constructor() {
|
|
550
|
+
super();
|
|
551
|
+
this.services = {};
|
|
552
|
+
this.settings = {};
|
|
553
|
+
this.mixins = [_hooks_js__WEBPACK_IMPORTED_MODULE_6__.hookMixin, _events_js__WEBPACK_IMPORTED_MODULE_5__.eventMixin];
|
|
554
|
+
this.version = _version_js__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
555
|
+
this.routes = new _router_js__WEBPACK_IMPORTED_MODULE_8__.Router();
|
|
556
|
+
this._isSetup = false;
|
|
557
|
+
// Channel-related properties
|
|
558
|
+
this[_a] = {};
|
|
559
|
+
this[_b] = {};
|
|
560
|
+
this.registerHooks = (0,_hooks_js__WEBPACK_IMPORTED_MODULE_6__.enableHooks)(this);
|
|
561
|
+
this.registerHooks({
|
|
562
|
+
around: [_events_js__WEBPACK_IMPORTED_MODULE_5__.eventHook]
|
|
563
|
+
});
|
|
1322
564
|
}
|
|
1323
|
-
|
|
1324
|
-
|
|
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];
|
|
565
|
+
get channels() {
|
|
566
|
+
return Object.keys(this[_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.CHANNELS]);
|
|
1369
567
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
568
|
+
channel(...names) {
|
|
569
|
+
channelDebug('Returning channels', names);
|
|
570
|
+
if (names.length === 0) {
|
|
571
|
+
throw new Error('app.channel needs at least one channel name');
|
|
572
|
+
}
|
|
573
|
+
if (names.length === 1) {
|
|
574
|
+
const [name] = names;
|
|
575
|
+
if (Array.isArray(name)) {
|
|
576
|
+
return this.channel(...name);
|
|
577
|
+
}
|
|
578
|
+
if (!this[_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.CHANNELS][name]) {
|
|
579
|
+
const channel = new _channel_base_js__WEBPACK_IMPORTED_MODULE_9__.Channel();
|
|
580
|
+
channel.once('empty', () => {
|
|
581
|
+
channel.removeAllListeners();
|
|
582
|
+
delete this[_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.CHANNELS][name];
|
|
583
|
+
});
|
|
584
|
+
this[_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.CHANNELS][name] = channel;
|
|
585
|
+
}
|
|
586
|
+
return this[_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.CHANNELS][name];
|
|
587
|
+
}
|
|
588
|
+
const channels = names.map((name) => this.channel(name));
|
|
589
|
+
return new _channel_combined_js__WEBPACK_IMPORTED_MODULE_10__.CombinedChannel(channels);
|
|
1376
590
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
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];
|
|
591
|
+
publish(event, publisher) {
|
|
592
|
+
return this.registerPublisher(event, publisher);
|
|
1385
593
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
if (exports._.isObject(target) && exports._.isObject(source)) {
|
|
1396
|
-
Object.keys(source).forEach(function (key) {
|
|
1397
|
-
if (exports._.isObject(source[key])) {
|
|
1398
|
-
if (!target[key]) {
|
|
1399
|
-
Object.assign(target, _defineProperty({}, key, {}));
|
|
1400
|
-
}
|
|
1401
|
-
exports._.merge(target[key], source[key]);
|
|
1402
|
-
} else {
|
|
1403
|
-
Object.assign(target, _defineProperty({}, key, source[key]));
|
|
594
|
+
registerPublisher(event, publisher) {
|
|
595
|
+
channelDebug('Registering publisher', event);
|
|
596
|
+
if (!publisher && typeof event === 'function') {
|
|
597
|
+
publisher = event;
|
|
598
|
+
event = _channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.ALL_EVENTS;
|
|
599
|
+
}
|
|
600
|
+
const { serviceEvents = _service_js__WEBPACK_IMPORTED_MODULE_7__.defaultServiceEvents } = (0,_service_js__WEBPACK_IMPORTED_MODULE_7__.getServiceOptions)(this) || {};
|
|
601
|
+
if (event !== _channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.ALL_EVENTS && !serviceEvents.includes(event)) {
|
|
602
|
+
throw new Error(`'${event.toString()}' is not a valid service event`);
|
|
1404
603
|
}
|
|
1405
|
-
|
|
604
|
+
const publishers = this[_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.PUBLISHERS];
|
|
605
|
+
publishers[event] = publisher;
|
|
606
|
+
return this;
|
|
1406
607
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
};
|
|
1410
|
-
// Duck-checks if an object looks like a promise
|
|
1411
|
-
function isPromise(result) {
|
|
1412
|
-
return exports._.isObject(result) && typeof result.then === 'function';
|
|
1413
|
-
}
|
|
1414
|
-
function createSymbol(name) {
|
|
1415
|
-
return typeof Symbol !== 'undefined' ? Symbol.for(name) : name;
|
|
1416
|
-
}
|
|
1417
|
-
__exportStar(__webpack_require__(/*! ./debug */ "../commons/lib/debug.js"), exports);
|
|
1418
|
-
|
|
1419
|
-
/***/ }),
|
|
1420
|
-
|
|
1421
|
-
/***/ "../feathers/lib/application.js":
|
|
1422
|
-
/*!**************************************!*\
|
|
1423
|
-
!*** ../feathers/lib/application.js ***!
|
|
1424
|
-
\**************************************/
|
|
1425
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
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); }
|
|
1430
|
-
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 }; })(); }
|
|
1431
|
-
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); }
|
|
1432
|
-
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); }
|
|
1433
|
-
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); }); }; }
|
|
1434
|
-
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; } } }; }
|
|
1435
|
-
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; } }
|
|
1436
|
-
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; }
|
|
1437
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
1438
|
-
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); } }
|
|
1439
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
1440
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1441
|
-
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); }
|
|
1442
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1443
|
-
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); }
|
|
1444
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
1445
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1446
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
1447
|
-
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); }
|
|
1448
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
1449
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
1450
|
-
return mod && mod.__esModule ? mod : {
|
|
1451
|
-
"default": mod
|
|
1452
|
-
};
|
|
1453
|
-
};
|
|
1454
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
1455
|
-
value: true
|
|
1456
|
-
}));
|
|
1457
|
-
exports.Feathers = void 0;
|
|
1458
|
-
var version_1 = __importDefault(__webpack_require__(/*! ./version */ "../feathers/lib/version.js"));
|
|
1459
|
-
var events_1 = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
1460
|
-
var commons_1 = __webpack_require__(/*! @feathersjs/commons */ "../commons/lib/index.js");
|
|
1461
|
-
var hooks_1 = __webpack_require__(/*! @feathersjs/hooks */ "../../node_modules/@feathersjs/hooks/script/index.js");
|
|
1462
|
-
var events_2 = __webpack_require__(/*! ./events */ "../feathers/lib/events.js");
|
|
1463
|
-
var hooks_2 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
1464
|
-
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
1465
|
-
var hooks_3 = __webpack_require__(/*! ./hooks */ "../feathers/lib/hooks.js");
|
|
1466
|
-
var debug = (0, commons_1.createDebug)('@feathersjs/feathers');
|
|
1467
|
-
var Feathers = /*#__PURE__*/function (_events_1$EventEmitte) {
|
|
1468
|
-
function Feathers() {
|
|
1469
|
-
var _this;
|
|
1470
|
-
_classCallCheck(this, Feathers);
|
|
1471
|
-
_this = _callSuper(this, Feathers);
|
|
1472
|
-
_this.services = {};
|
|
1473
|
-
_this.settings = {};
|
|
1474
|
-
_this.mixins = [hooks_2.hookMixin, events_2.eventMixin];
|
|
1475
|
-
_this.version = version_1.default;
|
|
1476
|
-
_this._isSetup = false;
|
|
1477
|
-
_this.registerHooks = (0, hooks_3.enableHooks)(_this);
|
|
1478
|
-
_this.registerHooks({
|
|
1479
|
-
around: [events_2.eventHook]
|
|
1480
|
-
});
|
|
1481
|
-
return _this;
|
|
1482
|
-
}
|
|
1483
|
-
_inherits(Feathers, _events_1$EventEmitte);
|
|
1484
|
-
return _createClass(Feathers, [{
|
|
1485
|
-
key: "get",
|
|
1486
|
-
value: function get(name) {
|
|
1487
|
-
return this.settings[name];
|
|
1488
|
-
}
|
|
1489
|
-
}, {
|
|
1490
|
-
key: "set",
|
|
1491
|
-
value: function set(name, value) {
|
|
1492
|
-
this.settings[name] = value;
|
|
1493
|
-
return this;
|
|
608
|
+
get(name) {
|
|
609
|
+
return this.settings[name];
|
|
1494
610
|
}
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
callback.call(this, this);
|
|
1499
|
-
return this;
|
|
611
|
+
set(name, value) {
|
|
612
|
+
this.settings[name] = value;
|
|
613
|
+
return this;
|
|
1500
614
|
}
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
value: function defaultService(location) {
|
|
1504
|
-
throw new Error("Can not find service '".concat(location, "'"));
|
|
1505
|
-
}
|
|
1506
|
-
}, {
|
|
1507
|
-
key: "service",
|
|
1508
|
-
value: function service(location) {
|
|
1509
|
-
var path = (0, commons_1.stripSlashes)(location) || '/';
|
|
1510
|
-
var current = this.services.hasOwnProperty(path) ? this.services[path] : undefined;
|
|
1511
|
-
if (typeof current === 'undefined') {
|
|
1512
|
-
this.use(path, this.defaultService(path));
|
|
1513
|
-
return this.service(path);
|
|
1514
|
-
}
|
|
1515
|
-
return current;
|
|
1516
|
-
}
|
|
1517
|
-
}, {
|
|
1518
|
-
key: "_setup",
|
|
1519
|
-
value: function _setup() {
|
|
1520
|
-
var _this2 = this;
|
|
1521
|
-
this._isSetup = true;
|
|
1522
|
-
return Object.keys(this.services).reduce(function (current, path) {
|
|
1523
|
-
return current.then(function () {
|
|
1524
|
-
var service = _this2.service(path);
|
|
1525
|
-
if (typeof service.setup === 'function') {
|
|
1526
|
-
debug("Setting up service for `".concat(path, "`"));
|
|
1527
|
-
return service.setup(_this2, path);
|
|
1528
|
-
}
|
|
1529
|
-
});
|
|
1530
|
-
}, Promise.resolve()).then(function () {
|
|
1531
|
-
return _this2;
|
|
1532
|
-
});
|
|
1533
|
-
}
|
|
1534
|
-
}, {
|
|
1535
|
-
key: "setup",
|
|
1536
|
-
get: function get() {
|
|
1537
|
-
return this._setup;
|
|
1538
|
-
},
|
|
1539
|
-
set: function set(value) {
|
|
1540
|
-
this._setup = value[hooks_1.HOOKS] ? value : (0, hooks_1.hooks)(value, (0, hooks_1.middleware)().params('server').props({
|
|
1541
|
-
app: this
|
|
1542
|
-
}));
|
|
1543
|
-
}
|
|
1544
|
-
}, {
|
|
1545
|
-
key: "_teardown",
|
|
1546
|
-
value: function _teardown() {
|
|
1547
|
-
var _this3 = this;
|
|
1548
|
-
this._isSetup = false;
|
|
1549
|
-
return Object.keys(this.services).reduce(function (current, path) {
|
|
1550
|
-
return current.then(function () {
|
|
1551
|
-
var service = _this3.service(path);
|
|
1552
|
-
if (typeof service.teardown === 'function') {
|
|
1553
|
-
debug("Tearing down service for `".concat(path, "`"));
|
|
1554
|
-
return service.teardown(_this3, path);
|
|
1555
|
-
}
|
|
1556
|
-
});
|
|
1557
|
-
}, Promise.resolve()).then(function () {
|
|
1558
|
-
return _this3;
|
|
1559
|
-
});
|
|
1560
|
-
}
|
|
1561
|
-
}, {
|
|
1562
|
-
key: "teardown",
|
|
1563
|
-
get: function get() {
|
|
1564
|
-
return this._teardown;
|
|
1565
|
-
},
|
|
1566
|
-
set: function set(value) {
|
|
1567
|
-
this._teardown = value[hooks_1.HOOKS] ? value : (0, hooks_1.hooks)(value, (0, hooks_1.middleware)().params('server').props({
|
|
1568
|
-
app: this
|
|
1569
|
-
}));
|
|
1570
|
-
}
|
|
1571
|
-
}, {
|
|
1572
|
-
key: "use",
|
|
1573
|
-
value: function use(path, service, options) {
|
|
1574
|
-
var _this4 = this;
|
|
1575
|
-
if (typeof path !== 'string') {
|
|
1576
|
-
throw new Error("'".concat(path, "' is not a valid service path."));
|
|
1577
|
-
}
|
|
1578
|
-
var location = (0, commons_1.stripSlashes)(path) || '/';
|
|
1579
|
-
var subApp = service;
|
|
1580
|
-
var isSubApp = typeof subApp.service === 'function' && subApp.services;
|
|
1581
|
-
if (isSubApp) {
|
|
1582
|
-
Object.keys(subApp.services).forEach(function (subPath) {
|
|
1583
|
-
return _this4.use("".concat(location, "/").concat(subPath), subApp.service(subPath));
|
|
1584
|
-
});
|
|
615
|
+
configure(callback) {
|
|
616
|
+
callback.call(this, this);
|
|
1585
617
|
return this;
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
}
|
|
618
|
+
}
|
|
619
|
+
defaultService(location) {
|
|
620
|
+
throw new Error(`Can not find service '${location}'`);
|
|
621
|
+
}
|
|
622
|
+
service(location) {
|
|
623
|
+
const path = ((0,_commons_js__WEBPACK_IMPORTED_MODULE_2__.stripSlashes)(location) || '/');
|
|
624
|
+
const current = this.services.hasOwnProperty(path) ? this.services[path] : undefined;
|
|
625
|
+
if (typeof current === 'undefined') {
|
|
626
|
+
this.use(path, this.defaultService(path));
|
|
627
|
+
return this.service(path);
|
|
1597
628
|
}
|
|
1598
|
-
|
|
1599
|
-
_iterator.e(err);
|
|
1600
|
-
} finally {
|
|
1601
|
-
_iterator.f();
|
|
1602
|
-
}
|
|
1603
|
-
debug("Registering new service at `".concat(location, "`"));
|
|
1604
|
-
// Add all the mixins
|
|
1605
|
-
this.mixins.forEach(function (fn) {
|
|
1606
|
-
return fn.call(_this4, protoService, location, serviceOptions);
|
|
1607
|
-
});
|
|
1608
|
-
this.services[location] = protoService;
|
|
1609
|
-
// If we ran setup already, set this service up explicitly, this will not `await`
|
|
1610
|
-
if (this._isSetup && typeof protoService.setup === 'function') {
|
|
1611
|
-
debug("Setting up service for `".concat(location, "`"));
|
|
1612
|
-
protoService.setup(this, location);
|
|
1613
|
-
}
|
|
1614
|
-
return this;
|
|
629
|
+
return current;
|
|
1615
630
|
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
this.
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
631
|
+
lookup(path) {
|
|
632
|
+
const result = this.routes.lookup(path);
|
|
633
|
+
if (result === null) {
|
|
634
|
+
return null;
|
|
635
|
+
}
|
|
636
|
+
const { params: colonParams, data: { service, params: dataParams } } = result;
|
|
637
|
+
const params = dataParams ? { ...dataParams, ...colonParams } : colonParams;
|
|
638
|
+
return { service, params };
|
|
639
|
+
}
|
|
640
|
+
_setup() {
|
|
641
|
+
this._isSetup = true;
|
|
642
|
+
return Object.keys(this.services)
|
|
643
|
+
.reduce((current, path) => current.then(() => {
|
|
644
|
+
const service = this.service(path);
|
|
645
|
+
if (typeof service.setup === 'function') {
|
|
646
|
+
debug(`Setting up service for \`${path}\``);
|
|
647
|
+
return service.setup(this, path);
|
|
648
|
+
}
|
|
649
|
+
}), Promise.resolve())
|
|
650
|
+
.then(() => this);
|
|
651
|
+
}
|
|
652
|
+
get setup() {
|
|
653
|
+
return this._setup;
|
|
654
|
+
}
|
|
655
|
+
set setup(value) {
|
|
656
|
+
this._setup = value[_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.HOOKS]
|
|
657
|
+
? value
|
|
658
|
+
: (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.hooks)(value, (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.middleware)().params('server').props({
|
|
659
|
+
app: this
|
|
660
|
+
}));
|
|
661
|
+
}
|
|
662
|
+
_teardown() {
|
|
663
|
+
this._isSetup = false;
|
|
664
|
+
return Object.keys(this.services)
|
|
665
|
+
.reduce((current, path) => current.then(() => {
|
|
666
|
+
const service = this.service(path);
|
|
667
|
+
if (typeof service.teardown === 'function') {
|
|
668
|
+
debug(`Tearing down service for \`${path}\``);
|
|
669
|
+
return service.teardown(this, path);
|
|
670
|
+
}
|
|
671
|
+
}), Promise.resolve())
|
|
672
|
+
.then(() => this);
|
|
673
|
+
}
|
|
674
|
+
get teardown() {
|
|
675
|
+
return this._teardown;
|
|
676
|
+
}
|
|
677
|
+
set teardown(value) {
|
|
678
|
+
this._teardown = value[_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.HOOKS]
|
|
679
|
+
? value
|
|
680
|
+
: (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.hooks)(value, (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.middleware)().params('server').props({
|
|
681
|
+
app: this
|
|
682
|
+
}));
|
|
683
|
+
}
|
|
684
|
+
use(path, service, options) {
|
|
685
|
+
if (typeof path !== 'string') {
|
|
686
|
+
throw new Error(`'${path}' is not a valid service path.`);
|
|
687
|
+
}
|
|
688
|
+
const location = ((0,_commons_js__WEBPACK_IMPORTED_MODULE_2__.stripSlashes)(path) || '/');
|
|
689
|
+
const subApp = service;
|
|
690
|
+
const isSubApp = typeof subApp.service === 'function' && subApp.services;
|
|
691
|
+
if (isSubApp) {
|
|
692
|
+
Object.keys(subApp.services).forEach((subPath) => this.use(`${location}/${subPath}`, subApp.service(subPath)));
|
|
693
|
+
return this;
|
|
694
|
+
}
|
|
695
|
+
const protoService = (0,_service_js__WEBPACK_IMPORTED_MODULE_7__.wrapService)(location, service, options);
|
|
696
|
+
const serviceOptions = (0,_service_js__WEBPACK_IMPORTED_MODULE_7__.getServiceOptions)(protoService);
|
|
697
|
+
const routerParams = {
|
|
698
|
+
service: protoService,
|
|
699
|
+
params: serviceOptions.routeParams || {}
|
|
700
|
+
};
|
|
701
|
+
for (const name of _service_js__WEBPACK_IMPORTED_MODULE_7__.protectedMethods) {
|
|
702
|
+
if (serviceOptions.methods.includes(name)) {
|
|
703
|
+
throw new Error(`'${name}' on service '${location}' is not allowed as a custom method name`);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
debug(`Registering new service at \`${location}\``);
|
|
707
|
+
// Add all the mixins
|
|
708
|
+
this.mixins.forEach((fn) => fn.call(this, protoService, location, serviceOptions));
|
|
709
|
+
// Add channel publishing functionality to the service
|
|
710
|
+
(0,_channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.channelServiceMixin)(this)(protoService, location, serviceOptions);
|
|
711
|
+
this.routes.insert(path, routerParams);
|
|
712
|
+
this.routes.insert(`${path}/:__id`, routerParams);
|
|
713
|
+
this.services[location] = protoService;
|
|
714
|
+
// If we ran setup already, set this service up explicitly, this will not `await`
|
|
715
|
+
if (this._isSetup && typeof protoService.setup === 'function') {
|
|
716
|
+
debug(`Setting up service for \`${location}\``);
|
|
717
|
+
protoService.setup(this, location);
|
|
718
|
+
}
|
|
719
|
+
return this;
|
|
720
|
+
}
|
|
721
|
+
async unuse(location) {
|
|
722
|
+
const path = ((0,_commons_js__WEBPACK_IMPORTED_MODULE_2__.stripSlashes)(location) || '/');
|
|
723
|
+
const service = this.services[path];
|
|
724
|
+
if (service && typeof service.teardown === 'function') {
|
|
725
|
+
await service.teardown(this, path);
|
|
726
|
+
}
|
|
727
|
+
delete this.services[path];
|
|
728
|
+
this.routes.remove(path);
|
|
729
|
+
this.routes.remove(`${path}/:__id`);
|
|
730
|
+
return service;
|
|
731
|
+
}
|
|
732
|
+
hooks(hookMap) {
|
|
733
|
+
const untypedMap = hookMap;
|
|
734
|
+
if (untypedMap.before || untypedMap.after || untypedMap.error || untypedMap.around) {
|
|
735
|
+
// regular hooks for all service methods
|
|
736
|
+
this.registerHooks(untypedMap);
|
|
737
|
+
}
|
|
738
|
+
else if (untypedMap.setup || untypedMap.teardown) {
|
|
739
|
+
// .setup and .teardown application hooks
|
|
740
|
+
(0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_1__.hooks)(this, untypedMap);
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
// Other registration formats are just `around` hooks
|
|
744
|
+
this.registerHooks({
|
|
745
|
+
around: untypedMap
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
return this;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
_a = _channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.CHANNELS, _b = _channel_mixin_js__WEBPACK_IMPORTED_MODULE_11__.PUBLISHERS;
|
|
752
|
+
//# sourceMappingURL=application.js.map
|
|
753
|
+
|
|
754
|
+
/***/ }),
|
|
755
|
+
|
|
756
|
+
/***/ "../../node_modules/feathers/lib/channel/base.js":
|
|
757
|
+
/*!*******************************************************!*\
|
|
758
|
+
!*** ../../node_modules/feathers/lib/channel/base.js ***!
|
|
759
|
+
\*******************************************************/
|
|
760
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
761
|
+
|
|
762
|
+
__webpack_require__.r(__webpack_exports__);
|
|
763
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
764
|
+
/* harmony export */ Channel: function() { return /* binding */ Channel; }
|
|
765
|
+
/* harmony export */ });
|
|
766
|
+
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
767
|
+
|
|
768
|
+
class Channel extends events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {
|
|
769
|
+
constructor(connections = [], data = null) {
|
|
770
|
+
super();
|
|
771
|
+
this.connections = connections;
|
|
772
|
+
this.data = data;
|
|
773
|
+
}
|
|
774
|
+
get length() {
|
|
775
|
+
return this.connections.length;
|
|
776
|
+
}
|
|
777
|
+
leave(...connections) {
|
|
778
|
+
connections.forEach((current) => {
|
|
779
|
+
if (typeof current === 'function') {
|
|
780
|
+
const callback = current;
|
|
781
|
+
this.leave(...this.connections.filter(callback));
|
|
782
|
+
}
|
|
783
|
+
else {
|
|
784
|
+
const index = this.connections.indexOf(current);
|
|
785
|
+
if (index !== -1) {
|
|
786
|
+
this.connections.splice(index, 1);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
1657
789
|
});
|
|
1658
|
-
|
|
1659
|
-
|
|
790
|
+
if (this.length === 0) {
|
|
791
|
+
this.emit('empty');
|
|
792
|
+
}
|
|
793
|
+
return this;
|
|
794
|
+
}
|
|
795
|
+
join(...connections) {
|
|
796
|
+
connections.forEach((connection) => {
|
|
797
|
+
if (connection && this.connections.indexOf(connection) === -1) {
|
|
798
|
+
this.connections.push(connection);
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
return this;
|
|
802
|
+
}
|
|
803
|
+
filter(fn) {
|
|
804
|
+
return new Channel(this.connections.filter(fn), this.data);
|
|
805
|
+
}
|
|
806
|
+
send(data) {
|
|
807
|
+
return new Channel(this.connections, data);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
//# sourceMappingURL=base.js.map
|
|
811
|
+
|
|
812
|
+
/***/ }),
|
|
813
|
+
|
|
814
|
+
/***/ "../../node_modules/feathers/lib/channel/combined.js":
|
|
815
|
+
/*!***********************************************************!*\
|
|
816
|
+
!*** ../../node_modules/feathers/lib/channel/combined.js ***!
|
|
817
|
+
\***********************************************************/
|
|
818
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
819
|
+
|
|
820
|
+
__webpack_require__.r(__webpack_exports__);
|
|
821
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
822
|
+
/* harmony export */ CombinedChannel: function() { return /* binding */ CombinedChannel; }
|
|
823
|
+
/* harmony export */ });
|
|
824
|
+
/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ "../../node_modules/feathers/lib/channel/base.js");
|
|
825
|
+
|
|
826
|
+
function collectConnections(children) {
|
|
827
|
+
const mappings = new WeakMap();
|
|
828
|
+
const connections = [];
|
|
829
|
+
children.forEach((channel) => {
|
|
830
|
+
channel.connections.forEach((connection) => {
|
|
831
|
+
if (!mappings.has(connection)) {
|
|
832
|
+
connections.push(connection);
|
|
833
|
+
mappings.set(connection, channel.data);
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
});
|
|
837
|
+
return { connections, mappings };
|
|
838
|
+
}
|
|
839
|
+
class CombinedChannel extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Channel {
|
|
840
|
+
constructor(children, data = null) {
|
|
841
|
+
const { mappings, connections } = collectConnections(children);
|
|
842
|
+
super(connections, data);
|
|
843
|
+
this.children = children;
|
|
844
|
+
this.mappings = mappings;
|
|
845
|
+
}
|
|
846
|
+
refresh() {
|
|
847
|
+
const collected = collectConnections(this.children);
|
|
848
|
+
return Object.assign(this, collected);
|
|
849
|
+
}
|
|
850
|
+
leave(...connections) {
|
|
851
|
+
return this.callChildren('leave', connections);
|
|
852
|
+
}
|
|
853
|
+
join(...connections) {
|
|
854
|
+
return this.callChildren('join', connections);
|
|
855
|
+
}
|
|
856
|
+
dataFor(connection) {
|
|
857
|
+
return this.mappings.get(connection);
|
|
858
|
+
}
|
|
859
|
+
callChildren(method, connections) {
|
|
860
|
+
this.children.forEach((child) => child[method](...connections));
|
|
861
|
+
this.refresh();
|
|
862
|
+
return this;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
//# sourceMappingURL=combined.js.map
|
|
866
|
+
|
|
867
|
+
/***/ }),
|
|
868
|
+
|
|
869
|
+
/***/ "../../node_modules/feathers/lib/channel/mixin.js":
|
|
870
|
+
/*!********************************************************!*\
|
|
871
|
+
!*** ../../node_modules/feathers/lib/channel/mixin.js ***!
|
|
872
|
+
\********************************************************/
|
|
873
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
874
|
+
|
|
875
|
+
__webpack_require__.r(__webpack_exports__);
|
|
876
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
877
|
+
/* harmony export */ ALL_EVENTS: function() { return /* binding */ ALL_EVENTS; },
|
|
878
|
+
/* harmony export */ CHANNELS: function() { return /* binding */ CHANNELS; },
|
|
879
|
+
/* harmony export */ PUBLISHERS: function() { return /* binding */ PUBLISHERS; },
|
|
880
|
+
/* harmony export */ channelServiceMixin: function() { return /* binding */ channelServiceMixin; }
|
|
881
|
+
/* harmony export */ });
|
|
882
|
+
/* harmony import */ var _debug_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../debug.js */ "../../node_modules/feathers/lib/debug.js");
|
|
883
|
+
/* harmony import */ var _combined_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./combined.js */ "../../node_modules/feathers/lib/channel/combined.js");
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
const debug = (0,_debug_js__WEBPACK_IMPORTED_MODULE_0__.createDebug)('@feathersjs/transport-commons/channels');
|
|
887
|
+
const CHANNELS = Symbol.for('@feathersjs/transport-commons/channels');
|
|
888
|
+
const PUBLISHERS = Symbol.for('@feathersjs/transport-commons/publishers');
|
|
889
|
+
const ALL_EVENTS = Symbol.for('@feathersjs/transport-commons/all-events');
|
|
890
|
+
function flattenDeep(arr) {
|
|
891
|
+
return arr.reduce((flat, toFlatten) => {
|
|
892
|
+
return flat.concat(Array.isArray(toFlatten) ? flattenDeep(toFlatten) : toFlatten);
|
|
893
|
+
}, []);
|
|
894
|
+
}
|
|
895
|
+
function channelServiceMixin(app) {
|
|
896
|
+
return (service, path, serviceOptions) => {
|
|
897
|
+
const { serviceEvents } = serviceOptions;
|
|
898
|
+
if (typeof service.publish === 'function') {
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
// Add publish methods to service
|
|
902
|
+
service[PUBLISHERS] = {};
|
|
903
|
+
service.publish = function (event, publisher) {
|
|
904
|
+
return service.registerPublisher(event, publisher);
|
|
905
|
+
};
|
|
906
|
+
service.registerPublisher = function (event, publisher) {
|
|
907
|
+
debug('Registering service publisher', event);
|
|
908
|
+
if (!publisher && typeof event === 'function') {
|
|
909
|
+
publisher = event;
|
|
910
|
+
event = ALL_EVENTS;
|
|
911
|
+
}
|
|
912
|
+
if (event !== ALL_EVENTS && !serviceEvents.includes(event)) {
|
|
913
|
+
throw new Error(`'${event.toString()}' is not a valid service event`);
|
|
914
|
+
}
|
|
915
|
+
const publishers = service[PUBLISHERS];
|
|
916
|
+
publishers[event] = publisher;
|
|
917
|
+
return service;
|
|
918
|
+
};
|
|
919
|
+
serviceEvents.forEach((event) => {
|
|
920
|
+
service.on(event, (data, hook) => {
|
|
921
|
+
if (!hook) {
|
|
922
|
+
hook = { path, service, app, result: data };
|
|
923
|
+
}
|
|
924
|
+
debug('Publishing event', event, hook.path);
|
|
925
|
+
const logError = (error) => debug(`Error in '${hook.path} ${event}' publisher`, error);
|
|
926
|
+
const servicePublishers = service[PUBLISHERS];
|
|
927
|
+
const appPublishers = app[PUBLISHERS];
|
|
928
|
+
const publisher = servicePublishers[event] ||
|
|
929
|
+
servicePublishers[ALL_EVENTS] ||
|
|
930
|
+
appPublishers[event] ||
|
|
931
|
+
appPublishers[ALL_EVENTS] ||
|
|
932
|
+
(() => { });
|
|
933
|
+
try {
|
|
934
|
+
Promise.resolve(publisher(data, hook))
|
|
935
|
+
.then((result) => {
|
|
936
|
+
if (!result) {
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
const results = Array.isArray(result)
|
|
940
|
+
? flattenDeep(result).filter(Boolean)
|
|
941
|
+
: [result];
|
|
942
|
+
const channel = new _combined_js__WEBPACK_IMPORTED_MODULE_1__.CombinedChannel(results);
|
|
943
|
+
if (channel && channel.length > 0) {
|
|
944
|
+
app.emit('publish', event, channel, hook, data);
|
|
945
|
+
}
|
|
946
|
+
else {
|
|
947
|
+
debug('No connections to publish to');
|
|
948
|
+
}
|
|
949
|
+
})
|
|
950
|
+
.catch(logError);
|
|
951
|
+
}
|
|
952
|
+
catch (error) {
|
|
953
|
+
logError(error);
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
});
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
//# sourceMappingURL=mixin.js.map
|
|
961
|
+
|
|
962
|
+
/***/ }),
|
|
963
|
+
|
|
964
|
+
/***/ "../../node_modules/feathers/lib/commons.js":
|
|
965
|
+
/*!**************************************************!*\
|
|
966
|
+
!*** ../../node_modules/feathers/lib/commons.js ***!
|
|
967
|
+
\**************************************************/
|
|
968
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
969
|
+
|
|
970
|
+
__webpack_require__.r(__webpack_exports__);
|
|
971
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
972
|
+
/* harmony export */ _: function() { return /* binding */ _; },
|
|
973
|
+
/* harmony export */ createDebug: function() { return /* reexport safe */ _debug_js__WEBPACK_IMPORTED_MODULE_0__.createDebug; },
|
|
974
|
+
/* harmony export */ createSymbol: function() { return /* binding */ createSymbol; },
|
|
975
|
+
/* harmony export */ isPromise: function() { return /* binding */ isPromise; },
|
|
976
|
+
/* harmony export */ noopDebug: function() { return /* reexport safe */ _debug_js__WEBPACK_IMPORTED_MODULE_0__.noopDebug; },
|
|
977
|
+
/* harmony export */ setDebug: function() { return /* reexport safe */ _debug_js__WEBPACK_IMPORTED_MODULE_0__.setDebug; },
|
|
978
|
+
/* harmony export */ stripSlashes: function() { return /* binding */ stripSlashes; }
|
|
979
|
+
/* harmony export */ });
|
|
980
|
+
/* harmony import */ var _debug_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./debug.js */ "../../node_modules/feathers/lib/debug.js");
|
|
981
|
+
// Removes all leading and trailing slashes from a path
|
|
982
|
+
function stripSlashes(name) {
|
|
983
|
+
return name.replace(/^(\/+)|(\/+)$/g, '');
|
|
984
|
+
}
|
|
985
|
+
// A set of lodash-y utility functions that use ES6
|
|
986
|
+
const _ = {
|
|
987
|
+
each(obj, callback) {
|
|
988
|
+
if (obj && typeof obj.forEach === 'function') {
|
|
989
|
+
obj.forEach(callback);
|
|
990
|
+
}
|
|
991
|
+
else if (_.isObject(obj)) {
|
|
992
|
+
Object.keys(obj).forEach((key) => callback(obj[key], key));
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
some(value, callback) {
|
|
996
|
+
return Object.keys(value)
|
|
997
|
+
.map((key) => [value[key], key])
|
|
998
|
+
.some(([val, key]) => callback(val, key));
|
|
999
|
+
},
|
|
1000
|
+
every(value, callback) {
|
|
1001
|
+
return Object.keys(value)
|
|
1002
|
+
.map((key) => [value[key], key])
|
|
1003
|
+
.every(([val, key]) => callback(val, key));
|
|
1004
|
+
},
|
|
1005
|
+
keys(obj) {
|
|
1006
|
+
return Object.keys(obj);
|
|
1007
|
+
},
|
|
1008
|
+
values(obj) {
|
|
1009
|
+
return _.keys(obj).map((key) => obj[key]);
|
|
1010
|
+
},
|
|
1011
|
+
isMatch(obj, item) {
|
|
1012
|
+
return _.keys(item).every((key) => obj[key] === item[key]);
|
|
1013
|
+
},
|
|
1014
|
+
isEmpty(obj) {
|
|
1015
|
+
return _.keys(obj).length === 0;
|
|
1016
|
+
},
|
|
1017
|
+
isObject(item) {
|
|
1018
|
+
return typeof item === 'object' && !Array.isArray(item) && item !== null;
|
|
1019
|
+
},
|
|
1020
|
+
isObjectOrArray(value) {
|
|
1021
|
+
return typeof value === 'object' && value !== null;
|
|
1022
|
+
},
|
|
1023
|
+
extend(first, ...rest) {
|
|
1024
|
+
return Object.assign(first, ...rest);
|
|
1025
|
+
},
|
|
1026
|
+
omit(obj, ...keys) {
|
|
1027
|
+
const result = _.extend({}, obj);
|
|
1028
|
+
keys.forEach((key) => delete result[key]);
|
|
1029
|
+
return result;
|
|
1030
|
+
},
|
|
1031
|
+
pick(source, ...keys) {
|
|
1032
|
+
return keys.reduce((result, key) => {
|
|
1033
|
+
if (source[key] !== undefined) {
|
|
1034
|
+
result[key] = source[key];
|
|
1035
|
+
}
|
|
1036
|
+
return result;
|
|
1037
|
+
}, {});
|
|
1038
|
+
},
|
|
1039
|
+
// Recursively merge the source object into the target object
|
|
1040
|
+
merge(target, source) {
|
|
1041
|
+
if (_.isObject(target) && _.isObject(source)) {
|
|
1042
|
+
Object.keys(source).forEach((key) => {
|
|
1043
|
+
if (_.isObject(source[key])) {
|
|
1044
|
+
if (!target[key]) {
|
|
1045
|
+
Object.assign(target, { [key]: {} });
|
|
1046
|
+
}
|
|
1047
|
+
_.merge(target[key], source[key]);
|
|
1048
|
+
}
|
|
1049
|
+
else {
|
|
1050
|
+
Object.assign(target, { [key]: source[key] });
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
return target;
|
|
1660
1055
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1056
|
+
};
|
|
1057
|
+
// Duck-checks if an object looks like a promise
|
|
1058
|
+
function isPromise(result) {
|
|
1059
|
+
return _.isObject(result) && typeof result.then === 'function';
|
|
1060
|
+
}
|
|
1061
|
+
function createSymbol(name) {
|
|
1062
|
+
return typeof Symbol !== 'undefined' ? Symbol.for(name) : name;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
//# sourceMappingURL=commons.js.map
|
|
1664
1066
|
|
|
1665
1067
|
/***/ }),
|
|
1666
1068
|
|
|
1667
|
-
/***/ "
|
|
1668
|
-
|
|
1669
|
-
!***
|
|
1670
|
-
|
|
1671
|
-
/***/ (function(
|
|
1069
|
+
/***/ "../../node_modules/feathers/lib/debug.js":
|
|
1070
|
+
/*!************************************************!*\
|
|
1071
|
+
!*** ../../node_modules/feathers/lib/debug.js ***!
|
|
1072
|
+
\************************************************/
|
|
1073
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1074
|
+
|
|
1075
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1076
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1077
|
+
/* harmony export */ createDebug: function() { return /* binding */ createDebug; },
|
|
1078
|
+
/* harmony export */ noopDebug: function() { return /* binding */ noopDebug; },
|
|
1079
|
+
/* harmony export */ setDebug: function() { return /* binding */ setDebug; }
|
|
1080
|
+
/* harmony export */ });
|
|
1081
|
+
const debuggers = {};
|
|
1082
|
+
function noopDebug() {
|
|
1083
|
+
return function () { };
|
|
1084
|
+
}
|
|
1085
|
+
let defaultInitializer = noopDebug;
|
|
1086
|
+
function setDebug(debug) {
|
|
1087
|
+
defaultInitializer = debug;
|
|
1088
|
+
Object.keys(debuggers).forEach((name) => {
|
|
1089
|
+
debuggers[name] = debug(name);
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
function createDebug(name) {
|
|
1093
|
+
if (!debuggers[name]) {
|
|
1094
|
+
debuggers[name] = defaultInitializer(name);
|
|
1095
|
+
}
|
|
1096
|
+
return (...args) => debuggers[name](...args);
|
|
1097
|
+
}
|
|
1098
|
+
//# sourceMappingURL=debug.js.map
|
|
1099
|
+
|
|
1100
|
+
/***/ }),
|
|
1672
1101
|
|
|
1102
|
+
/***/ "../../node_modules/feathers/lib/declarations.js":
|
|
1103
|
+
/*!*******************************************************!*\
|
|
1104
|
+
!*** ../../node_modules/feathers/lib/declarations.js ***!
|
|
1105
|
+
\*******************************************************/
|
|
1106
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1673
1107
|
|
|
1108
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1674
1109
|
|
|
1675
|
-
|
|
1676
|
-
value: true
|
|
1677
|
-
}));
|
|
1110
|
+
//# sourceMappingURL=declarations.js.map
|
|
1678
1111
|
|
|
1679
1112
|
/***/ }),
|
|
1680
1113
|
|
|
1681
|
-
/***/ "
|
|
1682
|
-
|
|
1683
|
-
!***
|
|
1684
|
-
|
|
1685
|
-
/***/ (function(
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
})
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
function eventHook(context, next) {
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
return next().then(function () {
|
|
1114
|
+
/***/ "../../node_modules/feathers/lib/events.js":
|
|
1115
|
+
/*!*************************************************!*\
|
|
1116
|
+
!*** ../../node_modules/feathers/lib/events.js ***!
|
|
1117
|
+
\*************************************************/
|
|
1118
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1119
|
+
|
|
1120
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1121
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1122
|
+
/* harmony export */ eventHook: function() { return /* binding */ eventHook; },
|
|
1123
|
+
/* harmony export */ eventMixin: function() { return /* binding */ eventMixin; }
|
|
1124
|
+
/* harmony export */ });
|
|
1125
|
+
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
1126
|
+
/* harmony import */ var _service_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./service.js */ "../../node_modules/feathers/lib/service.js");
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
async function eventHook(context, next) {
|
|
1130
|
+
const { events } = (0,_service_js__WEBPACK_IMPORTED_MODULE_1__.getServiceOptions)(context.self);
|
|
1131
|
+
const defaultEvent = _service_js__WEBPACK_IMPORTED_MODULE_1__.defaultEventMap[context.method] || null;
|
|
1132
|
+
context.event = defaultEvent;
|
|
1133
|
+
await next();
|
|
1702
1134
|
// Send the event only if the service does not do so already (indicated in the `events` option)
|
|
1703
1135
|
// This is used for custom events and for client services receiving event from the server
|
|
1704
1136
|
if (typeof context.event === 'string' && !events.includes(context.event)) {
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
return context.self.emit(context.event, element, context);
|
|
1708
|
-
});
|
|
1137
|
+
const results = Array.isArray(context.result) ? context.result : [context.result];
|
|
1138
|
+
results.forEach((element) => context.self.emit(context.event, element, context));
|
|
1709
1139
|
}
|
|
1710
|
-
});
|
|
1711
1140
|
}
|
|
1712
1141
|
function eventMixin(service) {
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1142
|
+
const isEmitter = typeof service.on === 'function' && typeof service.emit === 'function';
|
|
1143
|
+
if (!isEmitter) {
|
|
1144
|
+
Object.assign(service, events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter.prototype);
|
|
1145
|
+
}
|
|
1146
|
+
return service;
|
|
1718
1147
|
}
|
|
1148
|
+
//# sourceMappingURL=events.js.map
|
|
1719
1149
|
|
|
1720
1150
|
/***/ }),
|
|
1721
1151
|
|
|
1722
|
-
/***/ "
|
|
1723
|
-
|
|
1724
|
-
!***
|
|
1725
|
-
|
|
1726
|
-
/***/ (function(
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
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); }
|
|
1744
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
1745
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
1746
|
-
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."); }
|
|
1747
|
-
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; } }
|
|
1748
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
1749
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
1750
|
-
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; }
|
|
1751
|
-
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); }
|
|
1752
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
1753
|
-
value: true
|
|
1754
|
-
}));
|
|
1755
|
-
exports.FeathersHookManager = void 0;
|
|
1756
|
-
exports.convertHookData = convertHookData;
|
|
1757
|
-
exports.collectHooks = collectHooks;
|
|
1758
|
-
exports.enableHooks = enableHooks;
|
|
1759
|
-
exports.createContext = createContext;
|
|
1760
|
-
exports.hookMixin = hookMixin;
|
|
1761
|
-
var hooks_1 = __webpack_require__(/*! @feathersjs/hooks */ "../../node_modules/@feathersjs/hooks/script/index.js");
|
|
1762
|
-
var service_1 = __webpack_require__(/*! ./service */ "../feathers/lib/service.js");
|
|
1763
|
-
var types = ['before', 'after', 'error', 'around'];
|
|
1764
|
-
var isType = function isType(value) {
|
|
1765
|
-
return types.includes(value);
|
|
1766
|
-
};
|
|
1152
|
+
/***/ "../../node_modules/feathers/lib/hooks.js":
|
|
1153
|
+
/*!************************************************!*\
|
|
1154
|
+
!*** ../../node_modules/feathers/lib/hooks.js ***!
|
|
1155
|
+
\************************************************/
|
|
1156
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1157
|
+
|
|
1158
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1159
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1160
|
+
/* harmony export */ FeathersHookManager: function() { return /* binding */ FeathersHookManager; },
|
|
1161
|
+
/* harmony export */ collectHooks: function() { return /* binding */ collectHooks; },
|
|
1162
|
+
/* harmony export */ convertHookData: function() { return /* binding */ convertHookData; },
|
|
1163
|
+
/* harmony export */ createContext: function() { return /* binding */ createContext; },
|
|
1164
|
+
/* harmony export */ enableHooks: function() { return /* binding */ enableHooks; },
|
|
1165
|
+
/* harmony export */ hookMixin: function() { return /* binding */ hookMixin; }
|
|
1166
|
+
/* harmony export */ });
|
|
1167
|
+
/* harmony import */ var _hooks_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hooks/index.js */ "../../node_modules/feathers/lib/hooks/index.js");
|
|
1168
|
+
/* harmony import */ var _service_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./service.js */ "../../node_modules/feathers/lib/service.js");
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
const types = ['before', 'after', 'error', 'around'];
|
|
1172
|
+
const isType = (value) => types.includes(value);
|
|
1767
1173
|
// Converts different hook registration formats into the
|
|
1768
1174
|
// same internal format
|
|
1769
1175
|
function convertHookData(input) {
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
} else if (_typeof(input) !== 'object') {
|
|
1774
|
-
result.all = [input];
|
|
1775
|
-
} else {
|
|
1776
|
-
for (var _i = 0, _Object$keys = Object.keys(input); _i < _Object$keys.length; _i++) {
|
|
1777
|
-
var key = _Object$keys[_i];
|
|
1778
|
-
var value = input[key];
|
|
1779
|
-
result[key] = Array.isArray(value) ? value : [value];
|
|
1176
|
+
const result = {};
|
|
1177
|
+
if (Array.isArray(input)) {
|
|
1178
|
+
result.all = input;
|
|
1780
1179
|
}
|
|
1781
|
-
|
|
1782
|
-
|
|
1180
|
+
else if (typeof input !== 'object') {
|
|
1181
|
+
result.all = [input];
|
|
1182
|
+
}
|
|
1183
|
+
else {
|
|
1184
|
+
for (const key of Object.keys(input)) {
|
|
1185
|
+
const value = input[key];
|
|
1186
|
+
result[key] = Array.isArray(value) ? value : [value];
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
return result;
|
|
1783
1190
|
}
|
|
1784
1191
|
function collectHooks(target, method) {
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1192
|
+
const { collected, collectedAll, around } = target.__hooks;
|
|
1193
|
+
return [
|
|
1194
|
+
...(around.all || []),
|
|
1195
|
+
...(around[method] || []),
|
|
1196
|
+
...(collectedAll.before || []),
|
|
1197
|
+
...(collected[method] || []),
|
|
1198
|
+
...(collectedAll.after || [])
|
|
1199
|
+
];
|
|
1790
1200
|
}
|
|
1791
1201
|
// Add `.hooks` functionality to an object
|
|
1792
1202
|
function enableHooks(object) {
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
});
|
|
1806
|
-
return function registerHooks(input) {
|
|
1807
|
-
var store = this.__hooks;
|
|
1808
|
-
var map = Object.keys(input).reduce(function (map, type) {
|
|
1809
|
-
if (!isType(type)) {
|
|
1810
|
-
throw new Error("'".concat(type, "' is not a valid hook type"));
|
|
1811
|
-
}
|
|
1812
|
-
map[type] = convertHookData(input[type]);
|
|
1813
|
-
return map;
|
|
1814
|
-
}, {});
|
|
1815
|
-
var types = Object.keys(map);
|
|
1816
|
-
types.forEach(function (type) {
|
|
1817
|
-
return Object.keys(map[type]).forEach(function (method) {
|
|
1818
|
-
var _a;
|
|
1819
|
-
var mapHooks = map[type][method];
|
|
1820
|
-
var storeHooks = (_a = store[type])[method] || (_a[method] = []);
|
|
1821
|
-
storeHooks.push.apply(storeHooks, _toConsumableArray(mapHooks));
|
|
1822
|
-
if (method === 'all') {
|
|
1823
|
-
if (store.before[method] || store.error[method]) {
|
|
1824
|
-
var beforeAll = (0, hooks_1.collect)({
|
|
1825
|
-
before: store.before[method] || [],
|
|
1826
|
-
error: store.error[method] || []
|
|
1827
|
-
});
|
|
1828
|
-
store.collectedAll.before = [beforeAll];
|
|
1829
|
-
}
|
|
1830
|
-
if (store.after[method]) {
|
|
1831
|
-
var afterAll = (0, hooks_1.collect)({
|
|
1832
|
-
after: store.after[method] || []
|
|
1833
|
-
});
|
|
1834
|
-
store.collectedAll.after = [afterAll];
|
|
1835
|
-
}
|
|
1836
|
-
} else {
|
|
1837
|
-
if (store.before[method] || store.after[method] || store.error[method]) {
|
|
1838
|
-
var collected = (0, hooks_1.collect)({
|
|
1839
|
-
before: store.before[method] || [],
|
|
1840
|
-
after: store.after[method] || [],
|
|
1841
|
-
error: store.error[method] || []
|
|
1842
|
-
});
|
|
1843
|
-
store.collected[method] = [collected];
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
});
|
|
1203
|
+
const store = {
|
|
1204
|
+
around: {},
|
|
1205
|
+
before: {},
|
|
1206
|
+
after: {},
|
|
1207
|
+
error: {},
|
|
1208
|
+
collected: {},
|
|
1209
|
+
collectedAll: {}
|
|
1210
|
+
};
|
|
1211
|
+
Object.defineProperty(object, '__hooks', {
|
|
1212
|
+
configurable: true,
|
|
1213
|
+
value: store,
|
|
1214
|
+
writable: true
|
|
1847
1215
|
});
|
|
1848
|
-
return
|
|
1849
|
-
|
|
1216
|
+
return function registerHooks(input) {
|
|
1217
|
+
const store = this.__hooks;
|
|
1218
|
+
const map = Object.keys(input).reduce((map, type) => {
|
|
1219
|
+
if (!isType(type)) {
|
|
1220
|
+
throw new Error(`'${type}' is not a valid hook type`);
|
|
1221
|
+
}
|
|
1222
|
+
map[type] = convertHookData(input[type]);
|
|
1223
|
+
return map;
|
|
1224
|
+
}, {});
|
|
1225
|
+
const types = Object.keys(map);
|
|
1226
|
+
types.forEach((type) => Object.keys(map[type]).forEach((method) => {
|
|
1227
|
+
var _a;
|
|
1228
|
+
const mapHooks = map[type][method];
|
|
1229
|
+
const storeHooks = ((_a = store[type])[method] || (_a[method] = []));
|
|
1230
|
+
storeHooks.push(...mapHooks);
|
|
1231
|
+
if (method === 'all') {
|
|
1232
|
+
if (store.before[method] || store.error[method]) {
|
|
1233
|
+
const beforeAll = (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.collect)({
|
|
1234
|
+
before: store.before[method] || [],
|
|
1235
|
+
error: store.error[method] || []
|
|
1236
|
+
});
|
|
1237
|
+
store.collectedAll.before = [beforeAll];
|
|
1238
|
+
}
|
|
1239
|
+
if (store.after[method]) {
|
|
1240
|
+
const afterAll = (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.collect)({
|
|
1241
|
+
after: store.after[method] || []
|
|
1242
|
+
});
|
|
1243
|
+
store.collectedAll.after = [afterAll];
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
else {
|
|
1247
|
+
if (store.before[method] || store.after[method] || store.error[method]) {
|
|
1248
|
+
const collected = (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.collect)({
|
|
1249
|
+
before: store.before[method] || [],
|
|
1250
|
+
after: store.after[method] || [],
|
|
1251
|
+
error: store.error[method] || []
|
|
1252
|
+
});
|
|
1253
|
+
store.collected[method] = [collected];
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}));
|
|
1257
|
+
return this;
|
|
1258
|
+
};
|
|
1850
1259
|
}
|
|
1851
|
-
function createContext(service, method) {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
return createContext(data);
|
|
1260
|
+
function createContext(service, method, data = {}) {
|
|
1261
|
+
const createContext = service[method].createContext;
|
|
1262
|
+
if (typeof createContext !== 'function') {
|
|
1263
|
+
throw new Error(`Can not create context for method ${method}`);
|
|
1264
|
+
}
|
|
1265
|
+
return createContext(data);
|
|
1858
1266
|
}
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
key: "collectMiddleware",
|
|
1872
|
-
value: function collectMiddleware(self, args) {
|
|
1873
|
-
var appHooks = collectHooks(this.app, this.method);
|
|
1874
|
-
var middleware = _superPropGet(FeathersHookManager, "collectMiddleware", this, 3)([self, args]);
|
|
1875
|
-
var methodHooks = collectHooks(self, this.method);
|
|
1876
|
-
return [].concat(_toConsumableArray(appHooks), _toConsumableArray(middleware), _toConsumableArray(methodHooks));
|
|
1877
|
-
}
|
|
1878
|
-
}, {
|
|
1879
|
-
key: "initializeContext",
|
|
1880
|
-
value: function initializeContext(self, args, context) {
|
|
1881
|
-
var ctx = _superPropGet(FeathersHookManager, "initializeContext", this, 3)([self, args, context]);
|
|
1882
|
-
ctx.params = ctx.params || {};
|
|
1883
|
-
return ctx;
|
|
1884
|
-
}
|
|
1885
|
-
}, {
|
|
1886
|
-
key: "middleware",
|
|
1887
|
-
value: function middleware(mw) {
|
|
1888
|
-
var _this$_middleware;
|
|
1889
|
-
(_this$_middleware = this._middleware).push.apply(_this$_middleware, _toConsumableArray(mw));
|
|
1890
|
-
return this;
|
|
1267
|
+
class FeathersHookManager extends _hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.HookManager {
|
|
1268
|
+
constructor(app, method) {
|
|
1269
|
+
super();
|
|
1270
|
+
this.app = app;
|
|
1271
|
+
this.method = method;
|
|
1272
|
+
this._middleware = [];
|
|
1273
|
+
}
|
|
1274
|
+
collectMiddleware(self, args) {
|
|
1275
|
+
const appHooks = collectHooks(this.app, this.method);
|
|
1276
|
+
const middleware = super.collectMiddleware(self, args);
|
|
1277
|
+
const methodHooks = collectHooks(self, this.method);
|
|
1278
|
+
return [...appHooks, ...middleware, ...methodHooks];
|
|
1891
1279
|
}
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1280
|
+
initializeContext(self, args, context) {
|
|
1281
|
+
const ctx = super.initializeContext(self, args, context);
|
|
1282
|
+
ctx.params = ctx.params || {};
|
|
1283
|
+
return ctx;
|
|
1284
|
+
}
|
|
1285
|
+
middleware(mw) {
|
|
1286
|
+
this._middleware.push(...mw);
|
|
1287
|
+
return this;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1895
1290
|
function hookMixin(service, path, options) {
|
|
1896
|
-
|
|
1897
|
-
|
|
1291
|
+
if (typeof service.hooks === 'function') {
|
|
1292
|
+
return service;
|
|
1293
|
+
}
|
|
1294
|
+
const hookMethods = (0,_service_js__WEBPACK_IMPORTED_MODULE_1__.getHookMethods)(service, options);
|
|
1295
|
+
const serviceMethodHooks = hookMethods.reduce((res, method) => {
|
|
1296
|
+
const params = _service_js__WEBPACK_IMPORTED_MODULE_1__.defaultServiceArguments[method] || ['data', 'params'];
|
|
1297
|
+
res[method] = new FeathersHookManager(this, method).params(...params).props({
|
|
1298
|
+
app: this,
|
|
1299
|
+
path,
|
|
1300
|
+
method,
|
|
1301
|
+
service,
|
|
1302
|
+
event: null,
|
|
1303
|
+
type: 'around',
|
|
1304
|
+
get statusCode() {
|
|
1305
|
+
return this.http?.status;
|
|
1306
|
+
},
|
|
1307
|
+
set statusCode(value) {
|
|
1308
|
+
this.http = this.http || {};
|
|
1309
|
+
this.http.status = value;
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
return res;
|
|
1313
|
+
}, {});
|
|
1314
|
+
const registerHooks = enableHooks(service);
|
|
1315
|
+
(0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.hooks)(service, serviceMethodHooks);
|
|
1316
|
+
service.hooks = function (hookOptions) {
|
|
1317
|
+
if (hookOptions.before || hookOptions.after || hookOptions.error || hookOptions.around) {
|
|
1318
|
+
return registerHooks.call(this, hookOptions);
|
|
1319
|
+
}
|
|
1320
|
+
if (Array.isArray(hookOptions)) {
|
|
1321
|
+
return (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.hooks)(this, hookOptions);
|
|
1322
|
+
}
|
|
1323
|
+
Object.keys(hookOptions).forEach((method) => {
|
|
1324
|
+
const manager = (0,_hooks_index_js__WEBPACK_IMPORTED_MODULE_0__.getManager)(this[method]);
|
|
1325
|
+
if (!(manager instanceof FeathersHookManager)) {
|
|
1326
|
+
throw new Error(`Method ${method} is not a Feathers hooks enabled service method`);
|
|
1327
|
+
}
|
|
1328
|
+
manager.middleware(hookOptions[method]);
|
|
1329
|
+
});
|
|
1330
|
+
return this;
|
|
1331
|
+
};
|
|
1898
1332
|
return service;
|
|
1899
|
-
}
|
|
1900
|
-
var hookMethods = (0, service_1.getHookMethods)(service, options);
|
|
1901
|
-
var serviceMethodHooks = hookMethods.reduce(function (res, method) {
|
|
1902
|
-
var _FeathersHookManager;
|
|
1903
|
-
var params = service_1.defaultServiceArguments[method] || ['data', 'params'];
|
|
1904
|
-
res[method] = (_FeathersHookManager = new FeathersHookManager(_this2, method)).params.apply(_FeathersHookManager, _toConsumableArray(params)).props({
|
|
1905
|
-
app: _this2,
|
|
1906
|
-
path: path,
|
|
1907
|
-
method: method,
|
|
1908
|
-
service: service,
|
|
1909
|
-
event: null,
|
|
1910
|
-
type: 'around',
|
|
1911
|
-
get statusCode() {
|
|
1912
|
-
var _a;
|
|
1913
|
-
return (_a = this.http) === null || _a === void 0 ? void 0 : _a.status;
|
|
1914
|
-
},
|
|
1915
|
-
set statusCode(value) {
|
|
1916
|
-
this.http = this.http || {};
|
|
1917
|
-
this.http.status = value;
|
|
1918
|
-
}
|
|
1919
|
-
});
|
|
1920
|
-
return res;
|
|
1921
|
-
}, {});
|
|
1922
|
-
var registerHooks = enableHooks(service);
|
|
1923
|
-
(0, hooks_1.hooks)(service, serviceMethodHooks);
|
|
1924
|
-
service.hooks = function (hookOptions) {
|
|
1925
|
-
var _this3 = this;
|
|
1926
|
-
if (hookOptions.before || hookOptions.after || hookOptions.error || hookOptions.around) {
|
|
1927
|
-
return registerHooks.call(this, hookOptions);
|
|
1928
|
-
}
|
|
1929
|
-
if (Array.isArray(hookOptions)) {
|
|
1930
|
-
return (0, hooks_1.hooks)(this, hookOptions);
|
|
1931
|
-
}
|
|
1932
|
-
Object.keys(hookOptions).forEach(function (method) {
|
|
1933
|
-
var manager = (0, hooks_1.getManager)(_this3[method]);
|
|
1934
|
-
if (!(manager instanceof FeathersHookManager)) {
|
|
1935
|
-
throw new Error("Method ".concat(method, " is not a Feathers hooks enabled service method"));
|
|
1936
|
-
}
|
|
1937
|
-
manager.middleware(hookOptions[method]);
|
|
1938
|
-
});
|
|
1939
|
-
return this;
|
|
1940
|
-
};
|
|
1941
|
-
return service;
|
|
1942
1333
|
}
|
|
1334
|
+
//# sourceMappingURL=hooks.js.map
|
|
1943
1335
|
|
|
1944
1336
|
/***/ }),
|
|
1945
1337
|
|
|
1946
|
-
/***/ "
|
|
1947
|
-
|
|
1948
|
-
!***
|
|
1949
|
-
|
|
1950
|
-
/***/ (function(
|
|
1338
|
+
/***/ "../../node_modules/feathers/lib/hooks/base.js":
|
|
1339
|
+
/*!*****************************************************!*\
|
|
1340
|
+
!*** ../../node_modules/feathers/lib/hooks/base.js ***!
|
|
1341
|
+
\*****************************************************/
|
|
1342
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1343
|
+
|
|
1344
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1345
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1346
|
+
/* harmony export */ BaseHookContext: function() { return /* binding */ BaseHookContext; },
|
|
1347
|
+
/* harmony export */ HOOKS: function() { return /* binding */ HOOKS; },
|
|
1348
|
+
/* harmony export */ HookManager: function() { return /* binding */ HookManager; },
|
|
1349
|
+
/* harmony export */ convertOptions: function() { return /* binding */ convertOptions; },
|
|
1350
|
+
/* harmony export */ getManager: function() { return /* binding */ getManager; },
|
|
1351
|
+
/* harmony export */ getMiddleware: function() { return /* binding */ getMiddleware; },
|
|
1352
|
+
/* harmony export */ setManager: function() { return /* binding */ setManager; },
|
|
1353
|
+
/* harmony export */ setMiddleware: function() { return /* binding */ setMiddleware; }
|
|
1354
|
+
/* harmony export */ });
|
|
1355
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../node_modules/feathers/lib/hooks/utils.js");
|
|
1356
|
+
|
|
1357
|
+
const HOOKS = Symbol.for('@feathersjs/hooks');
|
|
1358
|
+
/**
|
|
1359
|
+
* The base hook context.
|
|
1360
|
+
*/
|
|
1361
|
+
class BaseHookContext {
|
|
1362
|
+
constructor(data = {}) {
|
|
1363
|
+
Object.assign(this, data);
|
|
1364
|
+
}
|
|
1365
|
+
toJSON() {
|
|
1366
|
+
const keys = Object.keys(this);
|
|
1367
|
+
let proto = Object.getPrototypeOf(this);
|
|
1368
|
+
while (proto) {
|
|
1369
|
+
keys.push(...Object.keys(proto));
|
|
1370
|
+
proto = Object.getPrototypeOf(proto);
|
|
1371
|
+
}
|
|
1372
|
+
return keys.reduce((result, key) => {
|
|
1373
|
+
result[key] = this[key];
|
|
1374
|
+
return result;
|
|
1375
|
+
}, {});
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
class HookManager {
|
|
1379
|
+
constructor() {
|
|
1380
|
+
this._parent = null;
|
|
1381
|
+
this._params = null;
|
|
1382
|
+
this._middleware = null;
|
|
1383
|
+
this._props = null;
|
|
1384
|
+
}
|
|
1385
|
+
parent(parent) {
|
|
1386
|
+
this._parent = parent;
|
|
1387
|
+
return this;
|
|
1388
|
+
}
|
|
1389
|
+
middleware(middleware) {
|
|
1390
|
+
this._middleware = middleware?.length ? middleware : null;
|
|
1391
|
+
return this;
|
|
1392
|
+
}
|
|
1393
|
+
getMiddleware() {
|
|
1394
|
+
const previous = this._parent?.getMiddleware();
|
|
1395
|
+
if (previous && this._middleware) {
|
|
1396
|
+
return previous.concat(this._middleware);
|
|
1397
|
+
}
|
|
1398
|
+
return previous || this._middleware;
|
|
1399
|
+
}
|
|
1400
|
+
collectMiddleware(self, _args) {
|
|
1401
|
+
const otherMiddleware = getMiddleware(self);
|
|
1402
|
+
const middleware = this.getMiddleware();
|
|
1403
|
+
if (otherMiddleware && middleware) {
|
|
1404
|
+
return otherMiddleware.concat(middleware);
|
|
1405
|
+
}
|
|
1406
|
+
return otherMiddleware || middleware || [];
|
|
1407
|
+
}
|
|
1408
|
+
props(props) {
|
|
1409
|
+
if (!this._props) {
|
|
1410
|
+
this._props = {};
|
|
1411
|
+
}
|
|
1412
|
+
(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.copyProperties)(this._props, props);
|
|
1413
|
+
return this;
|
|
1414
|
+
}
|
|
1415
|
+
getProps() {
|
|
1416
|
+
const previous = this._parent?.getProps();
|
|
1417
|
+
if (previous && this._props) {
|
|
1418
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.copyProperties)({}, previous, this._props);
|
|
1419
|
+
}
|
|
1420
|
+
return previous || this._props || null;
|
|
1421
|
+
}
|
|
1422
|
+
params(...params) {
|
|
1423
|
+
this._params = params;
|
|
1424
|
+
return this;
|
|
1425
|
+
}
|
|
1426
|
+
getParams() {
|
|
1427
|
+
const previous = this._parent?.getParams();
|
|
1428
|
+
if (previous && this._params) {
|
|
1429
|
+
return previous.concat(this._params);
|
|
1430
|
+
}
|
|
1431
|
+
return previous || this._params;
|
|
1432
|
+
}
|
|
1433
|
+
defaults(defaults) {
|
|
1434
|
+
this._defaults = defaults;
|
|
1435
|
+
return this;
|
|
1436
|
+
}
|
|
1437
|
+
getDefaults(self, args, context) {
|
|
1438
|
+
const defaults = typeof this._defaults === 'function' ? this._defaults(self, args, context) : null;
|
|
1439
|
+
const previous = this._parent?.getDefaults(self, args, context);
|
|
1440
|
+
if (previous && defaults) {
|
|
1441
|
+
return Object.assign({}, previous, defaults);
|
|
1442
|
+
}
|
|
1443
|
+
return previous || defaults;
|
|
1444
|
+
}
|
|
1445
|
+
getContextClass(Base = BaseHookContext) {
|
|
1446
|
+
const ContextClass = class ContextClass extends Base {
|
|
1447
|
+
constructor(data) {
|
|
1448
|
+
super(data);
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
const params = this.getParams();
|
|
1452
|
+
const props = this.getProps();
|
|
1453
|
+
if (params) {
|
|
1454
|
+
params.forEach((name, index) => {
|
|
1455
|
+
if (props?.[name] !== undefined) {
|
|
1456
|
+
throw new Error(`Hooks can not have a property and param named '${name}'. Use .defaults instead.`);
|
|
1457
|
+
}
|
|
1458
|
+
Object.defineProperty(ContextClass.prototype, name, {
|
|
1459
|
+
enumerable: true,
|
|
1460
|
+
get() {
|
|
1461
|
+
return this?.arguments[index];
|
|
1462
|
+
},
|
|
1463
|
+
set(value) {
|
|
1464
|
+
this.arguments[index] = value;
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
if (props) {
|
|
1470
|
+
(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.copyProperties)(ContextClass.prototype, props);
|
|
1471
|
+
}
|
|
1472
|
+
return ContextClass;
|
|
1473
|
+
}
|
|
1474
|
+
initializeContext(self, args, context) {
|
|
1475
|
+
const ctx = this._parent ? this._parent.initializeContext(self, args, context) : context;
|
|
1476
|
+
const defaults = this.getDefaults(self, args, ctx);
|
|
1477
|
+
if (self) {
|
|
1478
|
+
ctx.self = self;
|
|
1479
|
+
}
|
|
1480
|
+
ctx.arguments = args;
|
|
1481
|
+
if (defaults) {
|
|
1482
|
+
for (const name of Object.keys(defaults)) {
|
|
1483
|
+
if (ctx[name] === undefined) {
|
|
1484
|
+
ctx[name] = defaults[name];
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
return ctx;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
function convertOptions(options = null) {
|
|
1492
|
+
if (!options) {
|
|
1493
|
+
return new HookManager();
|
|
1494
|
+
}
|
|
1495
|
+
return Array.isArray(options) ? new HookManager().middleware(options) : options;
|
|
1496
|
+
}
|
|
1497
|
+
function getManager(target) {
|
|
1498
|
+
return (target && target[HOOKS]) || null;
|
|
1499
|
+
}
|
|
1500
|
+
function setManager(target, manager) {
|
|
1501
|
+
const parent = getManager(target);
|
|
1502
|
+
target[HOOKS] = manager.parent(parent);
|
|
1503
|
+
return target;
|
|
1504
|
+
}
|
|
1505
|
+
function getMiddleware(target) {
|
|
1506
|
+
const manager = getManager(target);
|
|
1507
|
+
return manager ? manager.getMiddleware() : null;
|
|
1508
|
+
}
|
|
1509
|
+
function setMiddleware(target, middleware) {
|
|
1510
|
+
const manager = new HookManager().middleware(middleware);
|
|
1511
|
+
return setManager(target, manager);
|
|
1512
|
+
}
|
|
1513
|
+
//# sourceMappingURL=base.js.map
|
|
1951
1514
|
|
|
1515
|
+
/***/ }),
|
|
1952
1516
|
|
|
1517
|
+
/***/ "../../node_modules/feathers/lib/hooks/compose.js":
|
|
1518
|
+
/*!********************************************************!*\
|
|
1519
|
+
!*** ../../node_modules/feathers/lib/hooks/compose.js ***!
|
|
1520
|
+
\********************************************************/
|
|
1521
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1953
1522
|
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1523
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1524
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1525
|
+
/* harmony export */ compose: function() { return /* binding */ compose; }
|
|
1526
|
+
/* harmony export */ });
|
|
1527
|
+
function compose(middleware) {
|
|
1528
|
+
if (!Array.isArray(middleware)) {
|
|
1529
|
+
throw new TypeError('Middleware stack must be an array!');
|
|
1530
|
+
}
|
|
1531
|
+
for (const fn of middleware) {
|
|
1532
|
+
if (typeof fn !== 'function') {
|
|
1533
|
+
throw new TypeError('Middleware must be composed of functions!');
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
return function (context, next) {
|
|
1537
|
+
// last called middleware #
|
|
1538
|
+
let index = -1;
|
|
1539
|
+
return dispatch.call(this, 0);
|
|
1540
|
+
function dispatch(i) {
|
|
1541
|
+
if (i <= index) {
|
|
1542
|
+
return Promise.reject(new Error('next() called multiple times'));
|
|
1543
|
+
}
|
|
1544
|
+
index = i;
|
|
1545
|
+
let fn = middleware[i];
|
|
1546
|
+
if (i === middleware.length) {
|
|
1547
|
+
fn = next;
|
|
1548
|
+
}
|
|
1549
|
+
if (!fn) {
|
|
1550
|
+
return Promise.resolve();
|
|
1551
|
+
}
|
|
1552
|
+
try {
|
|
1553
|
+
return Promise.resolve(fn.call(this, context, dispatch.bind(this, i + 1)));
|
|
1554
|
+
}
|
|
1555
|
+
catch (err) {
|
|
1556
|
+
return Promise.reject(err);
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
};
|
|
1560
|
+
}
|
|
1561
|
+
//# sourceMappingURL=compose.js.map
|
|
1562
|
+
|
|
1563
|
+
/***/ }),
|
|
1564
|
+
|
|
1565
|
+
/***/ "../../node_modules/feathers/lib/hooks/hooks.js":
|
|
1566
|
+
/*!******************************************************!*\
|
|
1567
|
+
!*** ../../node_modules/feathers/lib/hooks/hooks.js ***!
|
|
1568
|
+
\******************************************************/
|
|
1569
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1570
|
+
|
|
1571
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1572
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1573
|
+
/* harmony export */ functionHooks: function() { return /* binding */ functionHooks; },
|
|
1574
|
+
/* harmony export */ getOriginal: function() { return /* binding */ getOriginal; },
|
|
1575
|
+
/* harmony export */ hookDecorator: function() { return /* binding */ hookDecorator; },
|
|
1576
|
+
/* harmony export */ objectHooks: function() { return /* binding */ objectHooks; }
|
|
1577
|
+
/* harmony export */ });
|
|
1578
|
+
/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "../../node_modules/feathers/lib/hooks/compose.js");
|
|
1579
|
+
/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base.js */ "../../node_modules/feathers/lib/hooks/base.js");
|
|
1580
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "../../node_modules/feathers/lib/hooks/utils.js");
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
function getOriginal(fn) {
|
|
1585
|
+
return typeof fn.original === 'function' ? getOriginal(fn.original) : fn;
|
|
1586
|
+
}
|
|
1587
|
+
function functionHooks(fn, managerOrMiddleware) {
|
|
1588
|
+
if (typeof fn !== 'function') {
|
|
1589
|
+
throw new Error('Can not apply hooks to non-function');
|
|
1590
|
+
}
|
|
1591
|
+
const manager = (0,_base_js__WEBPACK_IMPORTED_MODULE_1__.convertOptions)(managerOrMiddleware);
|
|
1592
|
+
const wrapper = function (...args) {
|
|
1593
|
+
const { Context, original } = wrapper;
|
|
1594
|
+
// If we got passed an existing HookContext instance, we want to return it as well
|
|
1595
|
+
const returnContext = args[args.length - 1] instanceof Context;
|
|
1596
|
+
// Use existing context or default
|
|
1597
|
+
const base = returnContext ? args.pop() : new Context();
|
|
1598
|
+
// Initialize the context
|
|
1599
|
+
const context = manager.initializeContext(this, args, base);
|
|
1600
|
+
// Assemble the hook chain
|
|
1601
|
+
const hookChain = [
|
|
1602
|
+
// Return `ctx.result` or the context
|
|
1603
|
+
(ctx, next) => next().then(() => (returnContext ? ctx : ctx.result))
|
|
1604
|
+
];
|
|
1605
|
+
// Create the hook chain by calling the `collectMiddleware function
|
|
1606
|
+
const mw = manager.collectMiddleware(this, args);
|
|
1607
|
+
if (mw) {
|
|
1608
|
+
Array.prototype.push.apply(hookChain, mw);
|
|
1609
|
+
}
|
|
1610
|
+
// Runs the actual original method if `ctx.result` is not already set
|
|
1611
|
+
hookChain.push((ctx, next) => {
|
|
1612
|
+
if (!Object.prototype.hasOwnProperty.call(context, 'result')) {
|
|
1613
|
+
const returnValue = original.apply(this, ctx.arguments);
|
|
1614
|
+
if (returnValue[Symbol.asyncIterator]) {
|
|
1615
|
+
throw new Error('Function must return a Promise that resolves to an async iterable, not the iterable directly');
|
|
1616
|
+
}
|
|
1617
|
+
return Promise.resolve(returnValue).then((result) => {
|
|
1618
|
+
ctx.result = result;
|
|
1619
|
+
return next();
|
|
1620
|
+
});
|
|
1621
|
+
}
|
|
1622
|
+
return next();
|
|
1623
|
+
});
|
|
1624
|
+
return (0,_compose_js__WEBPACK_IMPORTED_MODULE_0__.compose)(hookChain).call(this, context);
|
|
1625
|
+
};
|
|
1626
|
+
(0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.copyFnProperties)(wrapper, fn);
|
|
1627
|
+
(0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.copyProperties)(wrapper, fn);
|
|
1628
|
+
(0,_base_js__WEBPACK_IMPORTED_MODULE_1__.setManager)(wrapper, manager);
|
|
1629
|
+
return Object.assign(wrapper, {
|
|
1630
|
+
original: getOriginal(fn),
|
|
1631
|
+
Context: manager.getContextClass(),
|
|
1632
|
+
createContext: (data = {}) => {
|
|
1633
|
+
return new wrapper.Context(data);
|
|
1634
|
+
}
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
function objectHooks(obj, hooks) {
|
|
1638
|
+
if (Array.isArray(hooks)) {
|
|
1639
|
+
return (0,_base_js__WEBPACK_IMPORTED_MODULE_1__.setMiddleware)(obj, hooks);
|
|
1640
|
+
}
|
|
1641
|
+
for (const method of Object.keys(hooks)) {
|
|
1642
|
+
const target = typeof obj[method] === 'function' ? obj : obj.prototype;
|
|
1643
|
+
const fn = target && target[method];
|
|
1644
|
+
if (typeof fn !== 'function') {
|
|
1645
|
+
throw new Error(`Can not apply hooks. '${method}' is not a function`);
|
|
1646
|
+
}
|
|
1647
|
+
const manager = (0,_base_js__WEBPACK_IMPORTED_MODULE_1__.convertOptions)(hooks[method]);
|
|
1648
|
+
target[method] = functionHooks(fn, manager.props({ method }));
|
|
1649
|
+
}
|
|
1650
|
+
return obj;
|
|
1651
|
+
}
|
|
1652
|
+
const hookDecorator = (managerOrMiddleware) => {
|
|
1653
|
+
return (target, context) => {
|
|
1654
|
+
const manager = (0,_base_js__WEBPACK_IMPORTED_MODULE_1__.convertOptions)(managerOrMiddleware);
|
|
1655
|
+
if (context.kind === 'class') {
|
|
1656
|
+
(0,_base_js__WEBPACK_IMPORTED_MODULE_1__.setManager)(target.prototype, manager);
|
|
1657
|
+
return target;
|
|
1658
|
+
}
|
|
1659
|
+
else if (context.kind === 'method') {
|
|
1660
|
+
const method = String(context.name);
|
|
1661
|
+
return functionHooks(target, manager.props({ method }));
|
|
1662
|
+
}
|
|
1663
|
+
throw new Error('Can not apply hooks.');
|
|
1963
1664
|
};
|
|
1964
|
-
}
|
|
1965
|
-
Object.defineProperty(o, k2, desc);
|
|
1966
|
-
} : function (o, m, k, k2) {
|
|
1967
|
-
if (k2 === undefined) k2 = k;
|
|
1968
|
-
o[k2] = m[k];
|
|
1969
|
-
});
|
|
1970
|
-
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1971
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1972
1665
|
};
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1666
|
+
//# sourceMappingURL=hooks.js.map
|
|
1667
|
+
|
|
1668
|
+
/***/ }),
|
|
1669
|
+
|
|
1670
|
+
/***/ "../../node_modules/feathers/lib/hooks/index.js":
|
|
1671
|
+
/*!******************************************************!*\
|
|
1672
|
+
!*** ../../node_modules/feathers/lib/hooks/index.js ***!
|
|
1673
|
+
\******************************************************/
|
|
1674
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1675
|
+
|
|
1676
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1677
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1678
|
+
/* harmony export */ BaseHookContext: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.BaseHookContext; },
|
|
1679
|
+
/* harmony export */ HOOKS: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.HOOKS; },
|
|
1680
|
+
/* harmony export */ HookManager: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.HookManager; },
|
|
1681
|
+
/* harmony export */ collect: function() { return /* reexport safe */ _regular_js__WEBPACK_IMPORTED_MODULE_3__.collect; },
|
|
1682
|
+
/* harmony export */ compose: function() { return /* reexport safe */ _compose_js__WEBPACK_IMPORTED_MODULE_2__.compose; },
|
|
1683
|
+
/* harmony export */ convertOptions: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.convertOptions; },
|
|
1684
|
+
/* harmony export */ fromAfterHook: function() { return /* reexport safe */ _regular_js__WEBPACK_IMPORTED_MODULE_3__.fromAfterHook; },
|
|
1685
|
+
/* harmony export */ fromBeforeHook: function() { return /* reexport safe */ _regular_js__WEBPACK_IMPORTED_MODULE_3__.fromBeforeHook; },
|
|
1686
|
+
/* harmony export */ fromErrorHook: function() { return /* reexport safe */ _regular_js__WEBPACK_IMPORTED_MODULE_3__.fromErrorHook; },
|
|
1687
|
+
/* harmony export */ functionHooks: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_1__.functionHooks; },
|
|
1688
|
+
/* harmony export */ getManager: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.getManager; },
|
|
1689
|
+
/* harmony export */ getMiddleware: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.getMiddleware; },
|
|
1690
|
+
/* harmony export */ getOriginal: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_1__.getOriginal; },
|
|
1691
|
+
/* harmony export */ hookDecorator: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_1__.hookDecorator; },
|
|
1692
|
+
/* harmony export */ hooks: function() { return /* binding */ hooks; },
|
|
1693
|
+
/* harmony export */ middleware: function() { return /* binding */ middleware; },
|
|
1694
|
+
/* harmony export */ objectHooks: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_1__.objectHooks; },
|
|
1695
|
+
/* harmony export */ runHook: function() { return /* reexport safe */ _regular_js__WEBPACK_IMPORTED_MODULE_3__.runHook; },
|
|
1696
|
+
/* harmony export */ runHooks: function() { return /* reexport safe */ _regular_js__WEBPACK_IMPORTED_MODULE_3__.runHooks; },
|
|
1697
|
+
/* harmony export */ setManager: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.setManager; },
|
|
1698
|
+
/* harmony export */ setMiddleware: function() { return /* reexport safe */ _base_js__WEBPACK_IMPORTED_MODULE_0__.setMiddleware; }
|
|
1699
|
+
/* harmony export */ });
|
|
1700
|
+
/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ "../../node_modules/feathers/lib/hooks/base.js");
|
|
1701
|
+
/* harmony import */ var _hooks_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hooks.js */ "../../node_modules/feathers/lib/hooks/hooks.js");
|
|
1702
|
+
/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose.js */ "../../node_modules/feathers/lib/hooks/compose.js");
|
|
1703
|
+
/* harmony import */ var _regular_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./regular.js */ "../../node_modules/feathers/lib/hooks/regular.js");
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Initializes a hook settings object with the given middleware.
|
|
1712
|
+
* @param mw The list of middleware
|
|
1713
|
+
* @param options Middleware options (params, default, props)
|
|
1714
|
+
*/
|
|
1715
|
+
function middleware(mw, options) {
|
|
1716
|
+
const manager = new _base_js__WEBPACK_IMPORTED_MODULE_0__.HookManager().middleware(mw);
|
|
1717
|
+
if (options) {
|
|
1718
|
+
if (options.params) {
|
|
1719
|
+
manager.params(...options.params);
|
|
1720
|
+
}
|
|
1721
|
+
if (options.defaults) {
|
|
1722
|
+
manager.defaults(options.defaults);
|
|
1723
|
+
}
|
|
1724
|
+
if (options.props) {
|
|
1725
|
+
manager.props(options.props);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
return manager;
|
|
1729
|
+
}
|
|
1730
|
+
// Fallthrough to actual implementation
|
|
1731
|
+
function hooks(...args) {
|
|
1732
|
+
const [target, _hooks] = args;
|
|
1733
|
+
if (typeof target === 'function' &&
|
|
1734
|
+
(_hooks instanceof _base_js__WEBPACK_IMPORTED_MODULE_0__.HookManager || Array.isArray(_hooks) || args.length === 1)) {
|
|
1735
|
+
return (0,_hooks_js__WEBPACK_IMPORTED_MODULE_1__.functionHooks)(target, _hooks);
|
|
1736
|
+
}
|
|
1737
|
+
if (args.length === 2) {
|
|
1738
|
+
return (0,_hooks_js__WEBPACK_IMPORTED_MODULE_1__.objectHooks)(target, _hooks);
|
|
1739
|
+
}
|
|
1740
|
+
return (0,_hooks_js__WEBPACK_IMPORTED_MODULE_1__.hookDecorator)(target);
|
|
1741
|
+
}
|
|
1742
|
+
//# sourceMappingURL=index.js.map
|
|
1743
|
+
|
|
1744
|
+
/***/ }),
|
|
1745
|
+
|
|
1746
|
+
/***/ "../../node_modules/feathers/lib/hooks/regular.js":
|
|
1747
|
+
/*!********************************************************!*\
|
|
1748
|
+
!*** ../../node_modules/feathers/lib/hooks/regular.js ***!
|
|
1749
|
+
\********************************************************/
|
|
1750
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1751
|
+
|
|
1752
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1753
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1754
|
+
/* harmony export */ collect: function() { return /* binding */ collect; },
|
|
1755
|
+
/* harmony export */ fromAfterHook: function() { return /* binding */ fromAfterHook; },
|
|
1756
|
+
/* harmony export */ fromBeforeHook: function() { return /* binding */ fromBeforeHook; },
|
|
1757
|
+
/* harmony export */ fromErrorHook: function() { return /* binding */ fromErrorHook; },
|
|
1758
|
+
/* harmony export */ runHook: function() { return /* binding */ runHook; },
|
|
1759
|
+
/* harmony export */ runHooks: function() { return /* binding */ runHooks; }
|
|
1760
|
+
/* harmony export */ });
|
|
1761
|
+
/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "../../node_modules/feathers/lib/hooks/compose.js");
|
|
1762
|
+
|
|
1763
|
+
const runHook = (hook, context, type) => {
|
|
1764
|
+
const typeBefore = context.type;
|
|
1765
|
+
if (type)
|
|
1766
|
+
context.type = type;
|
|
1767
|
+
return Promise.resolve(hook.call(context.self, context)).then((res) => {
|
|
1768
|
+
if (type)
|
|
1769
|
+
context.type = typeBefore;
|
|
1770
|
+
if (res && res !== context) {
|
|
1771
|
+
Object.assign(context, res);
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1977
1774
|
};
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
return
|
|
1991
|
-
|
|
1992
|
-
|
|
1775
|
+
const runHooks = (hooks) => (context) => hooks.reduce((promise, hook) => promise.then(() => runHook(hook, context)), Promise.resolve(context));
|
|
1776
|
+
function fromBeforeHook(hook) {
|
|
1777
|
+
return (context, next) => {
|
|
1778
|
+
return runHook(hook, context, 'before').then(next);
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1781
|
+
function fromAfterHook(hook) {
|
|
1782
|
+
return (context, next) => {
|
|
1783
|
+
return next().then(() => runHook(hook, context, 'after'));
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
1786
|
+
function fromErrorHook(hook) {
|
|
1787
|
+
return (context, next) => {
|
|
1788
|
+
return next().catch((error) => {
|
|
1789
|
+
if (context.error !== error || context.result !== undefined) {
|
|
1790
|
+
;
|
|
1791
|
+
context.original = { ...context };
|
|
1792
|
+
context.error = error;
|
|
1793
|
+
delete context.result;
|
|
1794
|
+
}
|
|
1795
|
+
return runHook(hook, context, 'error')
|
|
1796
|
+
.then(() => {
|
|
1797
|
+
if (context.result === undefined && context.error !== undefined) {
|
|
1798
|
+
throw context.error;
|
|
1799
|
+
}
|
|
1800
|
+
})
|
|
1801
|
+
.catch((error) => {
|
|
1802
|
+
context.error = error;
|
|
1803
|
+
throw context.error;
|
|
1804
|
+
});
|
|
1805
|
+
});
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
function collect({ before = [], after = [], error = [] }) {
|
|
1809
|
+
const beforeHooks = before.map(fromBeforeHook);
|
|
1810
|
+
const afterHooks = [...after].reverse().map(fromAfterHook);
|
|
1811
|
+
const errorHooks = error.length ? [fromErrorHook(runHooks(error))] : [];
|
|
1812
|
+
return (0,_compose_js__WEBPACK_IMPORTED_MODULE_0__.compose)([...errorHooks, ...beforeHooks, ...afterHooks]);
|
|
1813
|
+
}
|
|
1814
|
+
//# sourceMappingURL=regular.js.map
|
|
1815
|
+
|
|
1816
|
+
/***/ }),
|
|
1817
|
+
|
|
1818
|
+
/***/ "../../node_modules/feathers/lib/hooks/utils.js":
|
|
1819
|
+
/*!******************************************************!*\
|
|
1820
|
+
!*** ../../node_modules/feathers/lib/hooks/utils.js ***!
|
|
1821
|
+
\******************************************************/
|
|
1822
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1823
|
+
|
|
1824
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1825
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1826
|
+
/* harmony export */ copyFnProperties: function() { return /* binding */ copyFnProperties; },
|
|
1827
|
+
/* harmony export */ copyProperties: function() { return /* binding */ copyProperties; }
|
|
1828
|
+
/* harmony export */ });
|
|
1829
|
+
function copyProperties(target, ...originals) {
|
|
1830
|
+
for (const original of originals) {
|
|
1831
|
+
const originalProps = Object.keys(original).concat(Object.getOwnPropertySymbols(original));
|
|
1832
|
+
for (const prop of originalProps) {
|
|
1833
|
+
const propDescriptor = Object.getOwnPropertyDescriptor(original, prop);
|
|
1834
|
+
if (propDescriptor && !Object.prototype.hasOwnProperty.call(target, prop)) {
|
|
1835
|
+
Object.defineProperty(target, prop, propDescriptor);
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
return target;
|
|
1840
|
+
}
|
|
1841
|
+
function copyFnProperties(target, original) {
|
|
1842
|
+
const internalProps = ['name', 'length'];
|
|
1843
|
+
try {
|
|
1844
|
+
for (const prop of internalProps) {
|
|
1845
|
+
const value = original[prop];
|
|
1846
|
+
Object.defineProperty(target, prop, { value });
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
catch (_e) {
|
|
1850
|
+
// Avoid IE error
|
|
1851
|
+
}
|
|
1852
|
+
return target;
|
|
1853
|
+
}
|
|
1854
|
+
//# sourceMappingURL=utils.js.map
|
|
1855
|
+
|
|
1856
|
+
/***/ }),
|
|
1857
|
+
|
|
1858
|
+
/***/ "../../node_modules/feathers/lib/index.js":
|
|
1859
|
+
/*!************************************************!*\
|
|
1860
|
+
!*** ../../node_modules/feathers/lib/index.js ***!
|
|
1861
|
+
\************************************************/
|
|
1862
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1863
|
+
|
|
1864
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1865
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1866
|
+
/* harmony export */ Channel: function() { return /* reexport safe */ _channel_base_js__WEBPACK_IMPORTED_MODULE_3__.Channel; },
|
|
1867
|
+
/* harmony export */ CombinedChannel: function() { return /* reexport safe */ _channel_combined_js__WEBPACK_IMPORTED_MODULE_4__.CombinedChannel; },
|
|
1868
|
+
/* harmony export */ Feathers: function() { return /* reexport safe */ _application_js__WEBPACK_IMPORTED_MODULE_2__.Feathers; },
|
|
1869
|
+
/* harmony export */ FeathersHookManager: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_6__.FeathersHookManager; },
|
|
1870
|
+
/* harmony export */ RouteNode: function() { return /* reexport safe */ _router_js__WEBPACK_IMPORTED_MODULE_9__.RouteNode; },
|
|
1871
|
+
/* harmony export */ Router: function() { return /* reexport safe */ _router_js__WEBPACK_IMPORTED_MODULE_9__.Router; },
|
|
1872
|
+
/* harmony export */ SERVICE: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.SERVICE; },
|
|
1873
|
+
/* harmony export */ channelUtils: function() { return /* reexport module object */ _channel_mixin_js__WEBPACK_IMPORTED_MODULE_5__; },
|
|
1874
|
+
/* harmony export */ collectHooks: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_6__.collectHooks; },
|
|
1875
|
+
/* harmony export */ convertHookData: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_6__.convertHookData; },
|
|
1876
|
+
/* harmony export */ createContext: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_6__.createContext; },
|
|
1877
|
+
/* harmony export */ createDebug: function() { return /* reexport safe */ _debug_js__WEBPACK_IMPORTED_MODULE_0__.createDebug; },
|
|
1878
|
+
/* harmony export */ defaultEventMap: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.defaultEventMap; },
|
|
1879
|
+
/* harmony export */ defaultServiceArguments: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.defaultServiceArguments; },
|
|
1880
|
+
/* harmony export */ defaultServiceEvents: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.defaultServiceEvents; },
|
|
1881
|
+
/* harmony export */ defaultServiceMethods: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.defaultServiceMethods; },
|
|
1882
|
+
/* harmony export */ enableHooks: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_6__.enableHooks; },
|
|
1883
|
+
/* harmony export */ feathers: function() { return /* binding */ feathers; },
|
|
1884
|
+
/* harmony export */ getHookMethods: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.getHookMethods; },
|
|
1885
|
+
/* harmony export */ getServiceOptions: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.getServiceOptions; },
|
|
1886
|
+
/* harmony export */ hookMixin: function() { return /* reexport safe */ _hooks_js__WEBPACK_IMPORTED_MODULE_6__.hookMixin; },
|
|
1887
|
+
/* harmony export */ noopDebug: function() { return /* reexport safe */ _debug_js__WEBPACK_IMPORTED_MODULE_0__.noopDebug; },
|
|
1888
|
+
/* harmony export */ normalizeServiceOptions: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.normalizeServiceOptions; },
|
|
1889
|
+
/* harmony export */ protectedMethods: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.protectedMethods; },
|
|
1890
|
+
/* harmony export */ protectedProperties: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.protectedProperties; },
|
|
1891
|
+
/* harmony export */ setDebug: function() { return /* reexport safe */ _debug_js__WEBPACK_IMPORTED_MODULE_0__.setDebug; },
|
|
1892
|
+
/* harmony export */ version: function() { return /* reexport safe */ _version_js__WEBPACK_IMPORTED_MODULE_1__["default"]; },
|
|
1893
|
+
/* harmony export */ wrapService: function() { return /* reexport safe */ _service_js__WEBPACK_IMPORTED_MODULE_8__.wrapService; }
|
|
1894
|
+
/* harmony export */ });
|
|
1895
|
+
/* harmony import */ var _debug_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./debug.js */ "../../node_modules/feathers/lib/debug.js");
|
|
1896
|
+
/* harmony import */ var _version_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./version.js */ "../../node_modules/feathers/lib/version.js");
|
|
1897
|
+
/* harmony import */ var _application_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./application.js */ "../../node_modules/feathers/lib/application.js");
|
|
1898
|
+
/* harmony import */ var _channel_base_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./channel/base.js */ "../../node_modules/feathers/lib/channel/base.js");
|
|
1899
|
+
/* harmony import */ var _channel_combined_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./channel/combined.js */ "../../node_modules/feathers/lib/channel/combined.js");
|
|
1900
|
+
/* harmony import */ var _channel_mixin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./channel/mixin.js */ "../../node_modules/feathers/lib/channel/mixin.js");
|
|
1901
|
+
/* harmony import */ var _hooks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hooks.js */ "../../node_modules/feathers/lib/hooks.js");
|
|
1902
|
+
/* harmony import */ var _declarations_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./declarations.js */ "../../node_modules/feathers/lib/declarations.js");
|
|
1903
|
+
/* harmony import */ var _service_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./service.js */ "../../node_modules/feathers/lib/service.js");
|
|
1904
|
+
/* harmony import */ var _router_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./router.js */ "../../node_modules/feathers/lib/router.js");
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
|
|
1993
1908
|
function feathers() {
|
|
1994
|
-
|
|
1909
|
+
return new _application_js__WEBPACK_IMPORTED_MODULE_2__.Feathers();
|
|
1910
|
+
}
|
|
1911
|
+
feathers.setDebug = _debug_js__WEBPACK_IMPORTED_MODULE_0__.setDebug;
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
//# sourceMappingURL=index.js.map
|
|
1922
|
+
|
|
1923
|
+
/***/ }),
|
|
1924
|
+
|
|
1925
|
+
/***/ "../../node_modules/feathers/lib/router.js":
|
|
1926
|
+
/*!*************************************************!*\
|
|
1927
|
+
!*** ../../node_modules/feathers/lib/router.js ***!
|
|
1928
|
+
\*************************************************/
|
|
1929
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1930
|
+
|
|
1931
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1932
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1933
|
+
/* harmony export */ RouteNode: function() { return /* binding */ RouteNode; },
|
|
1934
|
+
/* harmony export */ Router: function() { return /* binding */ Router; }
|
|
1935
|
+
/* harmony export */ });
|
|
1936
|
+
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commons.js */ "../../node_modules/feathers/lib/commons.js");
|
|
1937
|
+
|
|
1938
|
+
class RouteNode {
|
|
1939
|
+
constructor(name, depth) {
|
|
1940
|
+
this.name = name;
|
|
1941
|
+
this.depth = depth;
|
|
1942
|
+
this.children = {};
|
|
1943
|
+
this.placeholders = [];
|
|
1944
|
+
}
|
|
1945
|
+
get hasChildren() {
|
|
1946
|
+
return Object.keys(this.children).length !== 0 || this.placeholders.length !== 0;
|
|
1947
|
+
}
|
|
1948
|
+
insert(path, data) {
|
|
1949
|
+
if (this.depth === path.length) {
|
|
1950
|
+
if (this.data !== undefined) {
|
|
1951
|
+
throw new Error(`Path ${path.join('/')} already exists`);
|
|
1952
|
+
}
|
|
1953
|
+
this.data = data;
|
|
1954
|
+
return this;
|
|
1955
|
+
}
|
|
1956
|
+
const current = path[this.depth];
|
|
1957
|
+
const nextDepth = this.depth + 1;
|
|
1958
|
+
if (current.startsWith(':')) {
|
|
1959
|
+
// Insert a placeholder node like /messages/:id
|
|
1960
|
+
const placeholderName = current.substring(1);
|
|
1961
|
+
let placeholder = this.placeholders.find((p) => p.name === placeholderName);
|
|
1962
|
+
if (!placeholder) {
|
|
1963
|
+
placeholder = new RouteNode(placeholderName, nextDepth);
|
|
1964
|
+
this.placeholders.push(placeholder);
|
|
1965
|
+
}
|
|
1966
|
+
return placeholder.insert(path, data);
|
|
1967
|
+
}
|
|
1968
|
+
const child = this.children[current] || new RouteNode(current, nextDepth);
|
|
1969
|
+
this.children[current] = child;
|
|
1970
|
+
return child.insert(path, data);
|
|
1971
|
+
}
|
|
1972
|
+
remove(path) {
|
|
1973
|
+
if (path.length === this.depth) {
|
|
1974
|
+
delete this.data;
|
|
1975
|
+
return;
|
|
1976
|
+
}
|
|
1977
|
+
const current = path[this.depth];
|
|
1978
|
+
if (current.startsWith(':')) {
|
|
1979
|
+
const placeholderName = current.substring(1);
|
|
1980
|
+
const placeholder = this.placeholders.find((p) => p.name === placeholderName);
|
|
1981
|
+
placeholder.remove(path);
|
|
1982
|
+
this.placeholders = this.placeholders.filter((p) => p !== placeholder);
|
|
1983
|
+
}
|
|
1984
|
+
else if (this.children[current]) {
|
|
1985
|
+
const child = this.children[current];
|
|
1986
|
+
child.remove(path);
|
|
1987
|
+
if (!child.hasChildren) {
|
|
1988
|
+
delete this.children[current];
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
lookup(path, info) {
|
|
1993
|
+
if (path.length === this.depth) {
|
|
1994
|
+
return this.data === undefined
|
|
1995
|
+
? null
|
|
1996
|
+
: {
|
|
1997
|
+
...info,
|
|
1998
|
+
data: this.data
|
|
1999
|
+
};
|
|
2000
|
+
}
|
|
2001
|
+
const current = path[this.depth];
|
|
2002
|
+
const child = this.children[current];
|
|
2003
|
+
if (child) {
|
|
2004
|
+
const lookup = child.lookup(path, info);
|
|
2005
|
+
if (lookup !== null) {
|
|
2006
|
+
return lookup;
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
// This will return the first placeholder that matches early
|
|
2010
|
+
for (const placeholder of this.placeholders) {
|
|
2011
|
+
const result = placeholder.lookup(path, info);
|
|
2012
|
+
if (result !== null) {
|
|
2013
|
+
result.params[placeholder.name] = current;
|
|
2014
|
+
return result;
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
return null;
|
|
2018
|
+
}
|
|
1995
2019
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2020
|
+
class Router {
|
|
2021
|
+
constructor(root = new RouteNode('', 0)) {
|
|
2022
|
+
this.root = root;
|
|
2023
|
+
this.caseSensitive = true;
|
|
2024
|
+
}
|
|
2025
|
+
getPath(path) {
|
|
2026
|
+
const result = (0,_commons_js__WEBPACK_IMPORTED_MODULE_0__.stripSlashes)(path).split('/');
|
|
2027
|
+
if (!this.caseSensitive) {
|
|
2028
|
+
return result.map((p) => (p.startsWith(':') ? p : p.toLowerCase()));
|
|
2029
|
+
}
|
|
2030
|
+
return result;
|
|
2031
|
+
}
|
|
2032
|
+
insert(path, data) {
|
|
2033
|
+
return this.root.insert(this.getPath(path), data);
|
|
2034
|
+
}
|
|
2035
|
+
remove(path) {
|
|
2036
|
+
return this.root.remove(this.getPath(path));
|
|
2037
|
+
}
|
|
2038
|
+
lookup(path) {
|
|
2039
|
+
if (typeof path !== 'string') {
|
|
2040
|
+
return null;
|
|
2041
|
+
}
|
|
2042
|
+
return this.root.lookup(this.getPath(path), { params: {} });
|
|
2043
|
+
}
|
|
2002
2044
|
}
|
|
2045
|
+
//# sourceMappingURL=router.js.map
|
|
2003
2046
|
|
|
2004
2047
|
/***/ }),
|
|
2005
2048
|
|
|
2006
|
-
/***/ "
|
|
2007
|
-
|
|
2008
|
-
!***
|
|
2009
|
-
|
|
2010
|
-
/***/ (function(
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
get: ['id', 'params'],
|
|
2039
|
-
create: ['data', 'params'],
|
|
2040
|
-
update: ['id', 'data', 'params'],
|
|
2041
|
-
patch: ['id', 'data', 'params'],
|
|
2042
|
-
remove: ['id', 'params']
|
|
2049
|
+
/***/ "../../node_modules/feathers/lib/service.js":
|
|
2050
|
+
/*!**************************************************!*\
|
|
2051
|
+
!*** ../../node_modules/feathers/lib/service.js ***!
|
|
2052
|
+
\**************************************************/
|
|
2053
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2054
|
+
|
|
2055
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2056
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2057
|
+
/* harmony export */ SERVICE: function() { return /* binding */ SERVICE; },
|
|
2058
|
+
/* harmony export */ defaultEventMap: function() { return /* binding */ defaultEventMap; },
|
|
2059
|
+
/* harmony export */ defaultServiceArguments: function() { return /* binding */ defaultServiceArguments; },
|
|
2060
|
+
/* harmony export */ defaultServiceEvents: function() { return /* binding */ defaultServiceEvents; },
|
|
2061
|
+
/* harmony export */ defaultServiceMethods: function() { return /* binding */ defaultServiceMethods; },
|
|
2062
|
+
/* harmony export */ getHookMethods: function() { return /* binding */ getHookMethods; },
|
|
2063
|
+
/* harmony export */ getServiceOptions: function() { return /* binding */ getServiceOptions; },
|
|
2064
|
+
/* harmony export */ normalizeServiceOptions: function() { return /* binding */ normalizeServiceOptions; },
|
|
2065
|
+
/* harmony export */ protectedMethods: function() { return /* binding */ protectedMethods; },
|
|
2066
|
+
/* harmony export */ protectedProperties: function() { return /* binding */ protectedProperties; },
|
|
2067
|
+
/* harmony export */ wrapService: function() { return /* binding */ wrapService; }
|
|
2068
|
+
/* harmony export */ });
|
|
2069
|
+
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
|
|
2070
|
+
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./commons.js */ "../../node_modules/feathers/lib/commons.js");
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
const SERVICE = (0,_commons_js__WEBPACK_IMPORTED_MODULE_1__.createSymbol)('@feathersjs/service');
|
|
2074
|
+
const defaultServiceArguments = {
|
|
2075
|
+
find: ['params'],
|
|
2076
|
+
get: ['id', 'params'],
|
|
2077
|
+
create: ['data', 'params'],
|
|
2078
|
+
update: ['id', 'data', 'params'],
|
|
2079
|
+
patch: ['id', 'data', 'params'],
|
|
2080
|
+
remove: ['id', 'params']
|
|
2043
2081
|
};
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2082
|
+
const defaultServiceMethods = ['find', 'get', 'create', 'update', 'patch', 'remove'];
|
|
2083
|
+
const defaultEventMap = {
|
|
2084
|
+
create: 'created',
|
|
2085
|
+
update: 'updated',
|
|
2086
|
+
patch: 'patched',
|
|
2087
|
+
remove: 'removed'
|
|
2050
2088
|
};
|
|
2051
|
-
|
|
2052
|
-
|
|
2089
|
+
const defaultServiceEvents = Object.values(defaultEventMap);
|
|
2090
|
+
const protectedMethods = Object.keys(Object.prototype)
|
|
2091
|
+
.concat(Object.keys(events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter.prototype))
|
|
2092
|
+
.concat([
|
|
2093
|
+
'all',
|
|
2094
|
+
'around',
|
|
2095
|
+
'before',
|
|
2096
|
+
'after',
|
|
2097
|
+
'error',
|
|
2098
|
+
'hooks',
|
|
2099
|
+
'setup',
|
|
2100
|
+
'teardown',
|
|
2101
|
+
'publish',
|
|
2102
|
+
'registerPublisher'
|
|
2103
|
+
]);
|
|
2104
|
+
const protectedProperties = protectedMethods.concat(['service', 'events', 'id']);
|
|
2053
2105
|
function getHookMethods(service, options) {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2106
|
+
const { methods } = options;
|
|
2107
|
+
return defaultServiceMethods
|
|
2108
|
+
.filter((m) => typeof service[m] === 'function' && !methods.includes(m))
|
|
2109
|
+
.concat(methods);
|
|
2058
2110
|
}
|
|
2059
2111
|
function getServiceOptions(service) {
|
|
2060
|
-
|
|
2112
|
+
return service[SERVICE];
|
|
2061
2113
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
return _objectSpread(_objectSpread({}, options), {}, {
|
|
2072
|
-
events: events,
|
|
2073
|
-
methods: methods,
|
|
2074
|
-
serviceEvents: serviceEvents
|
|
2075
|
-
});
|
|
2114
|
+
const normalizeServiceOptions = (service, options = {}) => {
|
|
2115
|
+
const { methods = defaultServiceMethods.filter((method) => typeof service[method] === 'function'), events = service.events || [] } = options;
|
|
2116
|
+
const serviceEvents = options.serviceEvents || defaultServiceEvents.concat(events);
|
|
2117
|
+
return {
|
|
2118
|
+
...options,
|
|
2119
|
+
events,
|
|
2120
|
+
methods,
|
|
2121
|
+
serviceEvents
|
|
2122
|
+
};
|
|
2076
2123
|
};
|
|
2077
|
-
exports.normalizeServiceOptions = normalizeServiceOptions;
|
|
2078
2124
|
function wrapService(location, service, options) {
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
return protoService;
|
|
2125
|
+
// Do nothing if this is already an initialized
|
|
2126
|
+
if (service[SERVICE]) {
|
|
2127
|
+
return service;
|
|
2128
|
+
}
|
|
2129
|
+
const protoService = Object.create(service);
|
|
2130
|
+
const serviceOptions = normalizeServiceOptions(service, options);
|
|
2131
|
+
if (Object.keys(serviceOptions.methods).length === 0 &&
|
|
2132
|
+
![...defaultServiceMethods, 'setup', 'teardown'].some((method) => typeof service[method] === 'function')) {
|
|
2133
|
+
throw new Error(`Invalid service object passed for path \`${location}\``);
|
|
2134
|
+
}
|
|
2135
|
+
Object.defineProperty(protoService, SERVICE, {
|
|
2136
|
+
value: serviceOptions
|
|
2137
|
+
});
|
|
2138
|
+
return protoService;
|
|
2094
2139
|
}
|
|
2140
|
+
//# sourceMappingURL=service.js.map
|
|
2095
2141
|
|
|
2096
2142
|
/***/ }),
|
|
2097
2143
|
|
|
2098
|
-
/***/ "
|
|
2099
|
-
|
|
2100
|
-
!***
|
|
2101
|
-
|
|
2102
|
-
/***/ (function(
|
|
2103
|
-
|
|
2144
|
+
/***/ "../../node_modules/feathers/lib/version.js":
|
|
2145
|
+
/*!**************************************************!*\
|
|
2146
|
+
!*** ../../node_modules/feathers/lib/version.js ***!
|
|
2147
|
+
\**************************************************/
|
|
2148
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2104
2149
|
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
}));
|
|
2109
|
-
exports["default"] = '5.0.36';
|
|
2150
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2151
|
+
/* harmony default export */ __webpack_exports__["default"] = ('6.0.0-pre.7');
|
|
2152
|
+
//# sourceMappingURL=version.js.map
|
|
2110
2153
|
|
|
2111
2154
|
/***/ }),
|
|
2112
2155
|
|
|
2113
|
-
/***/ "
|
|
2114
|
-
|
|
2115
|
-
!***
|
|
2116
|
-
|
|
2117
|
-
/***/ (function(
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
|
|
2156
|
+
/***/ "../feathers/lib/index.js":
|
|
2157
|
+
/*!********************************!*\
|
|
2158
|
+
!*** ../feathers/lib/index.js ***!
|
|
2159
|
+
\********************************/
|
|
2160
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2161
|
+
|
|
2162
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2163
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2164
|
+
/* harmony export */ Channel: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.Channel; },
|
|
2165
|
+
/* harmony export */ CombinedChannel: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.CombinedChannel; },
|
|
2166
|
+
/* harmony export */ Feathers: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.Feathers; },
|
|
2167
|
+
/* harmony export */ FeathersHookManager: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.FeathersHookManager; },
|
|
2168
|
+
/* harmony export */ RouteNode: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.RouteNode; },
|
|
2169
|
+
/* harmony export */ Router: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.Router; },
|
|
2170
|
+
/* harmony export */ SERVICE: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.SERVICE; },
|
|
2171
|
+
/* harmony export */ channelUtils: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.channelUtils; },
|
|
2172
|
+
/* harmony export */ collectHooks: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.collectHooks; },
|
|
2173
|
+
/* harmony export */ convertHookData: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.convertHookData; },
|
|
2174
|
+
/* harmony export */ createContext: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.createContext; },
|
|
2175
|
+
/* harmony export */ createDebug: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.createDebug; },
|
|
2176
|
+
/* harmony export */ defaultEventMap: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.defaultEventMap; },
|
|
2177
|
+
/* harmony export */ defaultServiceArguments: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.defaultServiceArguments; },
|
|
2178
|
+
/* harmony export */ defaultServiceEvents: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.defaultServiceEvents; },
|
|
2179
|
+
/* harmony export */ defaultServiceMethods: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.defaultServiceMethods; },
|
|
2180
|
+
/* harmony export */ enableHooks: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.enableHooks; },
|
|
2181
|
+
/* harmony export */ feathers: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.feathers; },
|
|
2182
|
+
/* harmony export */ getHookMethods: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.getHookMethods; },
|
|
2183
|
+
/* harmony export */ getServiceOptions: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.getServiceOptions; },
|
|
2184
|
+
/* harmony export */ hookMixin: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.hookMixin; },
|
|
2185
|
+
/* harmony export */ noopDebug: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.noopDebug; },
|
|
2186
|
+
/* harmony export */ normalizeServiceOptions: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.normalizeServiceOptions; },
|
|
2187
|
+
/* harmony export */ protectedMethods: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.protectedMethods; },
|
|
2188
|
+
/* harmony export */ protectedProperties: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.protectedProperties; },
|
|
2189
|
+
/* harmony export */ setDebug: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.setDebug; },
|
|
2190
|
+
/* harmony export */ version: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.version; },
|
|
2191
|
+
/* harmony export */ wrapService: function() { return /* reexport safe */ feathers__WEBPACK_IMPORTED_MODULE_0__.wrapService; }
|
|
2192
|
+
/* harmony export */ });
|
|
2193
|
+
/* harmony import */ var feathers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! feathers */ "../../node_modules/feathers/lib/index.js");
|
|
2136
2194
|
|
|
2137
2195
|
|
|
2138
2196
|
/***/ })
|
|
2139
2197
|
|
|
2140
|
-
/******/
|
|
2198
|
+
/******/ });
|
|
2141
2199
|
/************************************************************************/
|
|
2142
|
-
/******/
|
|
2143
|
-
/******/
|
|
2144
|
-
/******/
|
|
2145
|
-
/******/
|
|
2146
|
-
/******/
|
|
2147
|
-
/******/
|
|
2148
|
-
/******/
|
|
2149
|
-
/******/
|
|
2150
|
-
/******/
|
|
2151
|
-
/******/
|
|
2152
|
-
/******/
|
|
2153
|
-
/******/
|
|
2154
|
-
/******/
|
|
2155
|
-
/******/
|
|
2156
|
-
/******/
|
|
2157
|
-
/******/ };
|
|
2158
|
-
/******/
|
|
2159
|
-
/******/ // Execute the module function
|
|
2160
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2161
|
-
/******/
|
|
2162
|
-
/******/ // Return the exports of the module
|
|
2163
|
-
/******/ return module.exports;
|
|
2200
|
+
/******/ // The module cache
|
|
2201
|
+
/******/ var __webpack_module_cache__ = {};
|
|
2202
|
+
/******/
|
|
2203
|
+
/******/ // The require function
|
|
2204
|
+
/******/ function __webpack_require__(moduleId) {
|
|
2205
|
+
/******/ // Check if module is in cache
|
|
2206
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2207
|
+
/******/ if (cachedModule !== undefined) {
|
|
2208
|
+
/******/ return cachedModule.exports;
|
|
2209
|
+
/******/ }
|
|
2210
|
+
/******/ // Check if module exists (development only)
|
|
2211
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
2212
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
2213
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
2214
|
+
/******/ throw e;
|
|
2164
2215
|
/******/ }
|
|
2165
|
-
/******/
|
|
2216
|
+
/******/ // Create a new module (and put it into the cache)
|
|
2217
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2218
|
+
/******/ // no module.id needed
|
|
2219
|
+
/******/ // no module.loaded needed
|
|
2220
|
+
/******/ exports: {}
|
|
2221
|
+
/******/ };
|
|
2222
|
+
/******/
|
|
2223
|
+
/******/ // Execute the module function
|
|
2224
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2225
|
+
/******/
|
|
2226
|
+
/******/ // Return the exports of the module
|
|
2227
|
+
/******/ return module.exports;
|
|
2228
|
+
/******/ }
|
|
2229
|
+
/******/
|
|
2166
2230
|
/************************************************************************/
|
|
2167
|
-
/******/
|
|
2168
|
-
/******/
|
|
2169
|
-
/******/ //
|
|
2170
|
-
/******/
|
|
2171
|
-
/******/
|
|
2172
|
-
/******/
|
|
2173
|
-
/******/
|
|
2174
|
-
/******/
|
|
2175
|
-
|
|
2176
|
-
}
|
|
2231
|
+
/******/ /* webpack/runtime/define property getters */
|
|
2232
|
+
/******/ !function() {
|
|
2233
|
+
/******/ // define getter functions for harmony exports
|
|
2234
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
2235
|
+
/******/ for(var key in definition) {
|
|
2236
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2237
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2238
|
+
/******/ }
|
|
2239
|
+
/******/ }
|
|
2240
|
+
/******/ };
|
|
2241
|
+
/******/ }();
|
|
2242
|
+
/******/
|
|
2243
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2244
|
+
/******/ !function() {
|
|
2245
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
2246
|
+
/******/ }();
|
|
2247
|
+
/******/
|
|
2248
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
2249
|
+
/******/ !function() {
|
|
2250
|
+
/******/ // define __esModule on exports
|
|
2251
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
2252
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2253
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2254
|
+
/******/ }
|
|
2255
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2256
|
+
/******/ };
|
|
2257
|
+
/******/ }();
|
|
2258
|
+
/******/
|
|
2259
|
+
/************************************************************************/
|
|
2260
|
+
var __webpack_exports__ = {};
|
|
2261
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
2262
|
+
!function() {
|
|
2263
|
+
/*!*********************!*\
|
|
2264
|
+
!*** ./src/core.ts ***!
|
|
2265
|
+
\*********************/
|
|
2266
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2267
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2268
|
+
/* harmony export */ Channel: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.Channel; },
|
|
2269
|
+
/* harmony export */ CombinedChannel: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.CombinedChannel; },
|
|
2270
|
+
/* harmony export */ Feathers: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.Feathers; },
|
|
2271
|
+
/* harmony export */ FeathersHookManager: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.FeathersHookManager; },
|
|
2272
|
+
/* harmony export */ RouteNode: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.RouteNode; },
|
|
2273
|
+
/* harmony export */ Router: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.Router; },
|
|
2274
|
+
/* harmony export */ SERVICE: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.SERVICE; },
|
|
2275
|
+
/* harmony export */ channelUtils: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.channelUtils; },
|
|
2276
|
+
/* harmony export */ collectHooks: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.collectHooks; },
|
|
2277
|
+
/* harmony export */ convertHookData: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.convertHookData; },
|
|
2278
|
+
/* harmony export */ createContext: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.createContext; },
|
|
2279
|
+
/* harmony export */ createDebug: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.createDebug; },
|
|
2280
|
+
/* harmony export */ defaultEventMap: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.defaultEventMap; },
|
|
2281
|
+
/* harmony export */ defaultServiceArguments: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.defaultServiceArguments; },
|
|
2282
|
+
/* harmony export */ defaultServiceEvents: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.defaultServiceEvents; },
|
|
2283
|
+
/* harmony export */ defaultServiceMethods: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.defaultServiceMethods; },
|
|
2284
|
+
/* harmony export */ enableHooks: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.enableHooks; },
|
|
2285
|
+
/* harmony export */ feathers: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.feathers; },
|
|
2286
|
+
/* harmony export */ getHookMethods: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.getHookMethods; },
|
|
2287
|
+
/* harmony export */ getServiceOptions: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.getServiceOptions; },
|
|
2288
|
+
/* harmony export */ hookMixin: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.hookMixin; },
|
|
2289
|
+
/* harmony export */ noopDebug: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.noopDebug; },
|
|
2290
|
+
/* harmony export */ normalizeServiceOptions: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.normalizeServiceOptions; },
|
|
2291
|
+
/* harmony export */ protectedMethods: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.protectedMethods; },
|
|
2292
|
+
/* harmony export */ protectedProperties: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.protectedProperties; },
|
|
2293
|
+
/* harmony export */ setDebug: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.setDebug; },
|
|
2294
|
+
/* harmony export */ version: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.version; },
|
|
2295
|
+
/* harmony export */ wrapService: function() { return /* reexport safe */ _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__.wrapService; }
|
|
2296
|
+
/* harmony export */ });
|
|
2297
|
+
/* harmony import */ var _feathersjs_feathers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @feathersjs/feathers */ "../feathers/lib/index.js");
|
|
2298
|
+
|
|
2299
|
+
|
|
2300
|
+
}();
|
|
2301
|
+
var __webpack_exports__Channel = __webpack_exports__.Channel;
|
|
2302
|
+
var __webpack_exports__CombinedChannel = __webpack_exports__.CombinedChannel;
|
|
2303
|
+
var __webpack_exports__Feathers = __webpack_exports__.Feathers;
|
|
2304
|
+
var __webpack_exports__FeathersHookManager = __webpack_exports__.FeathersHookManager;
|
|
2305
|
+
var __webpack_exports__RouteNode = __webpack_exports__.RouteNode;
|
|
2306
|
+
var __webpack_exports__Router = __webpack_exports__.Router;
|
|
2307
|
+
var __webpack_exports__SERVICE = __webpack_exports__.SERVICE;
|
|
2308
|
+
var __webpack_exports__channelUtils = __webpack_exports__.channelUtils;
|
|
2309
|
+
var __webpack_exports__collectHooks = __webpack_exports__.collectHooks;
|
|
2310
|
+
var __webpack_exports__convertHookData = __webpack_exports__.convertHookData;
|
|
2311
|
+
var __webpack_exports__createContext = __webpack_exports__.createContext;
|
|
2312
|
+
var __webpack_exports__createDebug = __webpack_exports__.createDebug;
|
|
2313
|
+
var __webpack_exports__defaultEventMap = __webpack_exports__.defaultEventMap;
|
|
2314
|
+
var __webpack_exports__defaultServiceArguments = __webpack_exports__.defaultServiceArguments;
|
|
2315
|
+
var __webpack_exports__defaultServiceEvents = __webpack_exports__.defaultServiceEvents;
|
|
2316
|
+
var __webpack_exports__defaultServiceMethods = __webpack_exports__.defaultServiceMethods;
|
|
2317
|
+
var __webpack_exports__enableHooks = __webpack_exports__.enableHooks;
|
|
2318
|
+
var __webpack_exports__feathers = __webpack_exports__.feathers;
|
|
2319
|
+
var __webpack_exports__getHookMethods = __webpack_exports__.getHookMethods;
|
|
2320
|
+
var __webpack_exports__getServiceOptions = __webpack_exports__.getServiceOptions;
|
|
2321
|
+
var __webpack_exports__hookMixin = __webpack_exports__.hookMixin;
|
|
2322
|
+
var __webpack_exports__noopDebug = __webpack_exports__.noopDebug;
|
|
2323
|
+
var __webpack_exports__normalizeServiceOptions = __webpack_exports__.normalizeServiceOptions;
|
|
2324
|
+
var __webpack_exports__protectedMethods = __webpack_exports__.protectedMethods;
|
|
2325
|
+
var __webpack_exports__protectedProperties = __webpack_exports__.protectedProperties;
|
|
2326
|
+
var __webpack_exports__setDebug = __webpack_exports__.setDebug;
|
|
2327
|
+
var __webpack_exports__version = __webpack_exports__.version;
|
|
2328
|
+
var __webpack_exports__wrapService = __webpack_exports__.wrapService;
|
|
2329
|
+
export { __webpack_exports__Channel as Channel, __webpack_exports__CombinedChannel as CombinedChannel, __webpack_exports__Feathers as Feathers, __webpack_exports__FeathersHookManager as FeathersHookManager, __webpack_exports__RouteNode as RouteNode, __webpack_exports__Router as Router, __webpack_exports__SERVICE as SERVICE, __webpack_exports__channelUtils as channelUtils, __webpack_exports__collectHooks as collectHooks, __webpack_exports__convertHookData as convertHookData, __webpack_exports__createContext as createContext, __webpack_exports__createDebug as createDebug, __webpack_exports__defaultEventMap as defaultEventMap, __webpack_exports__defaultServiceArguments as defaultServiceArguments, __webpack_exports__defaultServiceEvents as defaultServiceEvents, __webpack_exports__defaultServiceMethods as defaultServiceMethods, __webpack_exports__enableHooks as enableHooks, __webpack_exports__feathers as feathers, __webpack_exports__getHookMethods as getHookMethods, __webpack_exports__getServiceOptions as getServiceOptions, __webpack_exports__hookMixin as hookMixin, __webpack_exports__noopDebug as noopDebug, __webpack_exports__normalizeServiceOptions as normalizeServiceOptions, __webpack_exports__protectedMethods as protectedMethods, __webpack_exports__protectedProperties as protectedProperties, __webpack_exports__setDebug as setDebug, __webpack_exports__version as version, __webpack_exports__wrapService as wrapService };
|
|
2330
|
+
|
|
2177
2331
|
//# sourceMappingURL=core.js.map
|