UNPKG

3.08 kBJavaScriptView Raw
1module.exports =
2/******/ (function() { // webpackBootstrap
3/******/ "use strict";
4/******/ var __webpack_modules__ = ({
5
6/***/ 305:
7/***/ (function() {
8
9
10
11let $module
12
13/*
14 let contextProto = this.context;
15 while (contextProto = Object.getPrototypeOf(contextProto)) {
16 completionGroups.push(Object.getOwnPropertyNames(contextProto));
17 }
18*/
19
20
21function handle (data) {
22 let idx = data.idx
23 , child = data.child
24 , method = data.method
25 , args = data.args
26 , callback = function () {
27 let _args = Array.prototype.slice.call(arguments)
28 if (_args[0] instanceof Error) {
29 let e = _args[0]
30 _args[0] = {
31 '$error' : '$error'
32 , 'type' : e.constructor.name
33 , 'message' : e.message
34 , 'stack' : e.stack
35 }
36 Object.keys(e).forEach(function(key) {
37 _args[0][key] = e[key]
38 })
39 }
40 process.send({ owner: 'farm', idx: idx, child: child, args: _args })
41 }
42 , exec
43
44 if (method == null && typeof $module == 'function')
45 exec = $module
46 else if (typeof $module[method] == 'function')
47 exec = $module[method]
48
49 if (!exec)
50 return console.error('NO SUCH METHOD:', method)
51
52 exec.apply(null, args.concat([ callback ]))
53}
54
55
56process.on('message', function (data) {
57 if (data.owner !== 'farm') {
58 return;
59 }
60
61 if (!$module) return $module = require(data.module)
62 if (data.event == 'die') return process.exit(0)
63 handle(data)
64})
65
66
67/***/ })
68
69/******/ });
70/************************************************************************/
71/******/ // The module cache
72/******/ var __webpack_module_cache__ = {};
73/******/
74/******/ // The require function
75/******/ function __nccwpck_require__(moduleId) {
76/******/ // Check if module is in cache
77/******/ if(__webpack_module_cache__[moduleId]) {
78/******/ return __webpack_module_cache__[moduleId].exports;
79/******/ }
80/******/ // Create a new module (and put it into the cache)
81/******/ var module = __webpack_module_cache__[moduleId] = {
82/******/ // no module.id needed
83/******/ // no module.loaded needed
84/******/ exports: {}
85/******/ };
86/******/
87/******/ // Execute the module function
88/******/ var threw = true;
89/******/ try {
90/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
91/******/ threw = false;
92/******/ } finally {
93/******/ if(threw) delete __webpack_module_cache__[moduleId];
94/******/ }
95/******/
96/******/ // Return the exports of the module
97/******/ return module.exports;
98/******/ }
99/******/
100/************************************************************************/
101/******/ /* webpack/runtime/compat */
102/******/
103/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/
104/******/ // module exports must be returned from runtime so entry inlining is disabled
105/******/ // startup
106/******/ // Load entry module and return exports
107/******/ return __nccwpck_require__(305);
108/******/ })()
109;
\No newline at end of file