@modern-js/server 2.48.0 → 2.48.2

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.
Files changed (31) hide show
  1. package/dist/cjs/constants.js +1 -1
  2. package/dist/cjs/dev-tools/dev-middleware/index.js +0 -4
  3. package/dist/cjs/dev-tools/dev-middleware/socketServer.js +2 -7
  4. package/dist/cjs/dev-tools/watcher/dependencyTree.js +0 -3
  5. package/dist/cjs/dev-tools/watcher/index.js +1 -3
  6. package/dist/cjs/dev-tools/watcher/statsCache.js +2 -3
  7. package/dist/cjs/server/devServer.js +6 -40
  8. package/dist/cjs/server/devServerOld.js +3 -9
  9. package/dist/cjs/server/workerSSRRender.js +1 -1
  10. package/dist/esm/constants.js +1 -1
  11. package/dist/esm/dev-tools/dev-middleware/index.js +42 -58
  12. package/dist/esm/dev-tools/dev-middleware/socketServer.js +130 -179
  13. package/dist/esm/dev-tools/watcher/dependencyTree.js +59 -80
  14. package/dist/esm/dev-tools/watcher/index.js +63 -82
  15. package/dist/esm/dev-tools/watcher/statsCache.js +55 -76
  16. package/dist/esm/server/devServer.js +432 -522
  17. package/dist/esm/server/devServerOld.js +455 -515
  18. package/dist/esm/server/workerSSRRender.js +1 -1
  19. package/dist/esm-node/constants.js +1 -1
  20. package/dist/esm-node/dev-tools/dev-middleware/index.js +0 -4
  21. package/dist/esm-node/dev-tools/dev-middleware/socketServer.js +2 -7
  22. package/dist/esm-node/dev-tools/watcher/dependencyTree.js +0 -3
  23. package/dist/esm-node/dev-tools/watcher/index.js +1 -3
  24. package/dist/esm-node/dev-tools/watcher/statsCache.js +2 -3
  25. package/dist/esm-node/server/devServer.js +6 -40
  26. package/dist/esm-node/server/devServerOld.js +3 -9
  27. package/dist/esm-node/server/workerSSRRender.js +1 -1
  28. package/dist/types/server/devServer.d.ts +1 -1
  29. package/dist/types/server/devServerOld.d.ts +1 -1
  30. package/dist/types/types.d.ts +3 -3
  31. package/package.json +10 -10
@@ -1,196 +1,147 @@
1
1
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
2
- import { _ as _create_class } from "@swc/helpers/_/_create_class";
3
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
4
2
  import ws from "ws";
5
3
  import { logger } from "@modern-js/utils";
6
4
  var SocketServer = /* @__PURE__ */ function() {
7
5
  "use strict";
8
6
  function SocketServer2(options) {
9
7
  _class_call_check(this, SocketServer2);
10
- _define_property(this, "wsServer", void 0);
11
- _define_property(this, "sockets", []);
12
- _define_property(this, "options", void 0);
13
- _define_property(this, "app", void 0);
14
- _define_property(this, "stats", void 0);
15
- _define_property(this, "timer", null);
8
+ this.sockets = [];
9
+ this.timer = null;
16
10
  this.options = options;
17
11
  }
18
- _create_class(SocketServer2, [
19
- {
20
- key: "prepare",
21
- value: (
22
- // create socket, install socket handler, bind socket event
23
- function prepare(app) {
24
- var _this = this;
25
- var _this_options_client;
26
- this.app = app;
27
- this.wsServer = new ws.Server({
28
- noServer: true,
29
- path: (_this_options_client = this.options.client) === null || _this_options_client === void 0 ? void 0 : _this_options_client.path
30
- });
31
- this.app.on("upgrade", function(req, sock, head) {
32
- if (!_this.wsServer.shouldHandle(req)) {
33
- return;
34
- }
35
- _this.wsServer.handleUpgrade(req, sock, head, function(connection) {
36
- _this.wsServer.emit("connection", connection, req);
37
- });
38
- });
39
- this.wsServer.on("error", function(err) {
40
- logger.error(err);
41
- });
42
- this.timer = setInterval(function() {
43
- _this.wsServer.clients.forEach(function(socket) {
44
- var extWs = socket;
45
- if (!extWs.isAlive) {
46
- extWs.terminate();
47
- } else {
48
- extWs.isAlive = false;
49
- extWs.ping(function() {
50
- });
51
- }
52
- });
53
- }, 3e4);
54
- this.wsServer.on("connection", function(socket) {
55
- _this.onConnect(socket);
56
- });
57
- }
58
- )
59
- },
60
- {
61
- key: "updateStats",
62
- value: function updateStats(stats) {
63
- this.stats = stats;
64
- this.sendStats();
12
+ var _proto = SocketServer2.prototype;
13
+ _proto.prepare = function prepare(app) {
14
+ var _this = this;
15
+ var _this_options_client;
16
+ this.app = app;
17
+ this.wsServer = new ws.Server({
18
+ noServer: true,
19
+ path: (_this_options_client = this.options.client) === null || _this_options_client === void 0 ? void 0 : _this_options_client.path
20
+ });
21
+ this.app.on("upgrade", function(req, sock, head) {
22
+ if (!_this.wsServer.shouldHandle(req)) {
23
+ return;
65
24
  }
66
- },
67
- {
68
- key: "sockWrite",
69
- value: (
70
- // write message to each socket
71
- function sockWrite(type, data) {
72
- var _this = this;
73
- this.sockets.forEach(function(socket) {
74
- _this.send(socket, JSON.stringify({
75
- type,
76
- data
77
- }));
25
+ _this.wsServer.handleUpgrade(req, sock, head, function(connection) {
26
+ _this.wsServer.emit("connection", connection, req);
27
+ });
28
+ });
29
+ this.wsServer.on("error", function(err) {
30
+ logger.error(err);
31
+ });
32
+ this.timer = setInterval(function() {
33
+ _this.wsServer.clients.forEach(function(socket) {
34
+ var extWs = socket;
35
+ if (!extWs.isAlive) {
36
+ extWs.terminate();
37
+ } else {
38
+ extWs.isAlive = false;
39
+ extWs.ping(function() {
78
40
  });
79
41
  }
80
- )
81
- },
82
- {
83
- key: "singleWrite",
84
- value: function singleWrite(socket, type, data) {
85
- this.send(socket, JSON.stringify({
86
- type,
87
- data
88
- }));
89
- }
90
- },
91
- {
92
- key: "close",
93
- value: function close() {
94
- this.sockets.forEach(function(socket) {
95
- socket.close();
96
- });
97
- if (this.timer) {
98
- clearInterval(this.timer);
99
- this.timer = null;
100
- }
101
- }
102
- },
103
- {
104
- key: "onConnect",
105
- value: function onConnect(socket) {
106
- var _this = this;
107
- var connection = socket;
108
- connection.isAlive = true;
109
- connection.on("pong", function() {
110
- connection.isAlive = true;
111
- });
112
- if (!connection) {
113
- return;
114
- }
115
- this.sockets.push(connection);
116
- connection.on("close", function() {
117
- var idx = _this.sockets.indexOf(connection);
118
- if (idx >= 0) {
119
- _this.sockets.splice(idx, 1);
120
- }
121
- });
122
- if (this.options.hot) {
123
- this.singleWrite(connection, "hot");
124
- }
125
- if (this.options.liveReload) {
126
- this.singleWrite(connection, "liveReload");
127
- }
128
- if (this.stats) {
129
- this.sendStats(true);
130
- }
42
+ });
43
+ }, 3e4);
44
+ this.wsServer.on("connection", function(socket) {
45
+ _this.onConnect(socket);
46
+ });
47
+ };
48
+ _proto.updateStats = function updateStats(stats) {
49
+ this.stats = stats;
50
+ this.sendStats();
51
+ };
52
+ _proto.sockWrite = function sockWrite(type, data) {
53
+ var _this = this;
54
+ this.sockets.forEach(function(socket) {
55
+ _this.send(socket, JSON.stringify({
56
+ type,
57
+ data
58
+ }));
59
+ });
60
+ };
61
+ _proto.singleWrite = function singleWrite(socket, type, data) {
62
+ this.send(socket, JSON.stringify({
63
+ type,
64
+ data
65
+ }));
66
+ };
67
+ _proto.close = function close() {
68
+ this.sockets.forEach(function(socket) {
69
+ socket.close();
70
+ });
71
+ if (this.timer) {
72
+ clearInterval(this.timer);
73
+ this.timer = null;
74
+ }
75
+ };
76
+ _proto.onConnect = function onConnect(socket) {
77
+ var _this = this;
78
+ var connection = socket;
79
+ connection.isAlive = true;
80
+ connection.on("pong", function() {
81
+ connection.isAlive = true;
82
+ });
83
+ if (!connection) {
84
+ return;
85
+ }
86
+ this.sockets.push(connection);
87
+ connection.on("close", function() {
88
+ var idx = _this.sockets.indexOf(connection);
89
+ if (idx >= 0) {
90
+ _this.sockets.splice(idx, 1);
131
91
  }
132
- },
133
- {
134
- key: "getStats",
135
- value: (
136
- // get standard stats
137
- function getStats() {
138
- var curStats = this.stats;
139
- if (!curStats) {
140
- return null;
141
- }
142
- var defaultStats = {
143
- all: false,
144
- hash: true,
145
- assets: true,
146
- warnings: true,
147
- errors: true,
148
- errorDetails: false
149
- };
150
- return curStats.toJson(defaultStats);
151
- }
152
- )
153
- },
154
- {
155
- key: "sendStats",
156
- value: (
157
- // determine what message should send by stats
158
- function sendStats() {
159
- var force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
160
- var stats = this.getStats();
161
- if (!stats) {
162
- return null;
163
- }
164
- var shouldEmit = !force && stats && (!stats.errors || stats.errors.length === 0) && stats.assets && stats.assets.every(function(asset) {
165
- return !asset.emitted;
166
- });
167
- if (shouldEmit) {
168
- return this.sockWrite("still-ok");
169
- }
170
- this.sockWrite("hash", stats.hash);
171
- if (stats.errors && stats.errors.length > 0) {
172
- return this.sockWrite("errors", stats.errors);
173
- } else if (stats.warnings && stats.warnings.length > 0) {
174
- return this.sockWrite("warnings", stats.warnings);
175
- } else {
176
- return this.sockWrite("ok");
177
- }
178
- }
179
- )
180
- },
181
- {
182
- key: "send",
183
- value: (
184
- // send message to connecting socket
185
- function send(connection, message) {
186
- if (connection.readyState !== 1) {
187
- return;
188
- }
189
- connection.send(message);
190
- }
191
- )
92
+ });
93
+ if (this.options.hot) {
94
+ this.singleWrite(connection, "hot");
95
+ }
96
+ if (this.options.liveReload) {
97
+ this.singleWrite(connection, "liveReload");
98
+ }
99
+ if (this.stats) {
100
+ this.sendStats(true);
101
+ }
102
+ };
103
+ _proto.getStats = function getStats() {
104
+ var curStats = this.stats;
105
+ if (!curStats) {
106
+ return null;
107
+ }
108
+ var defaultStats = {
109
+ all: false,
110
+ hash: true,
111
+ assets: true,
112
+ warnings: true,
113
+ errors: true,
114
+ errorDetails: false
115
+ };
116
+ return curStats.toJson(defaultStats);
117
+ };
118
+ _proto.sendStats = function sendStats() {
119
+ var force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
120
+ var stats = this.getStats();
121
+ if (!stats) {
122
+ return null;
123
+ }
124
+ var shouldEmit = !force && stats && (!stats.errors || stats.errors.length === 0) && stats.assets && stats.assets.every(function(asset) {
125
+ return !asset.emitted;
126
+ });
127
+ if (shouldEmit) {
128
+ return this.sockWrite("still-ok");
129
+ }
130
+ this.sockWrite("hash", stats.hash);
131
+ if (stats.errors && stats.errors.length > 0) {
132
+ return this.sockWrite("errors", stats.errors);
133
+ } else if (stats.warnings && stats.warnings.length > 0) {
134
+ return this.sockWrite("warnings", stats.warnings);
135
+ } else {
136
+ return this.sockWrite("ok");
137
+ }
138
+ };
139
+ _proto.send = function send(connection, message) {
140
+ if (connection.readyState !== 1) {
141
+ return;
192
142
  }
193
- ]);
143
+ connection.send(message);
144
+ };
194
145
  return SocketServer2;
195
146
  }();
196
147
  export {
@@ -1,6 +1,4 @@
1
1
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
2
- import { _ as _create_class } from "@swc/helpers/_/_create_class";
3
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
4
2
  import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
5
3
  import minimatch from "minimatch";
6
4
  var defaultIgnores = [
@@ -14,93 +12,74 @@ var DependencyTree = /* @__PURE__ */ function() {
14
12
  "use strict";
15
13
  function DependencyTree2() {
16
14
  _class_call_check(this, DependencyTree2);
17
- _define_property(this, "tree", void 0);
18
- _define_property(this, "ignore", void 0);
19
15
  this.tree = /* @__PURE__ */ new Map();
20
16
  this.ignore = _to_consumable_array(defaultIgnores);
21
17
  }
22
- _create_class(DependencyTree2, [
23
- {
24
- key: "getNode",
25
- value: function getNode(path) {
26
- return this.tree.get(path);
18
+ var _proto = DependencyTree2.prototype;
19
+ _proto.getNode = function getNode(path) {
20
+ return this.tree.get(path);
21
+ };
22
+ _proto.update = function update(cache) {
23
+ var _this = this;
24
+ this.tree.clear();
25
+ Object.keys(cache).forEach(function(path) {
26
+ if (!_this.shouldIgnore(path)) {
27
+ var module = cache[path];
28
+ _this.tree.set(module.filename, {
29
+ module,
30
+ parent: /* @__PURE__ */ new Set(),
31
+ children: /* @__PURE__ */ new Set()
32
+ });
27
33
  }
28
- },
29
- {
30
- key: "update",
31
- value: (
32
- /**
33
- * update dependency tree
34
- *
35
- * @param cache
36
- */
37
- function update(cache) {
38
- var _this = this;
39
- this.tree.clear();
40
- Object.keys(cache).forEach(function(path) {
41
- if (!_this.shouldIgnore(path)) {
42
- var module = cache[path];
43
- _this.tree.set(module.filename, {
44
- module,
45
- parent: /* @__PURE__ */ new Set(),
46
- children: /* @__PURE__ */ new Set()
47
- });
48
- }
49
- });
50
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
51
- try {
52
- var _this1 = this, _loop = function() {
53
- var treeNode = _step.value;
54
- var parent = treeNode.module.parent;
55
- var children = treeNode.module.children;
56
- if (parent && !_this1.shouldIgnore(parent.filename)) {
57
- var parentTreeNode = _this1.tree.get(parent.filename);
58
- if (parentTreeNode) {
59
- treeNode.parent.add(parentTreeNode);
60
- }
61
- }
62
- children.forEach(function(child) {
63
- if (!_this.shouldIgnore(child.filename)) {
64
- var childTreeNode = _this.tree.get(child.filename);
65
- if (childTreeNode) {
66
- treeNode.children.add(childTreeNode);
67
- childTreeNode.parent.add(treeNode);
68
- }
69
- }
70
- });
71
- };
72
- for (var _iterator = this.tree.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)
73
- _loop();
74
- } catch (err) {
75
- _didIteratorError = true;
76
- _iteratorError = err;
77
- } finally {
78
- try {
79
- if (!_iteratorNormalCompletion && _iterator.return != null) {
80
- _iterator.return();
81
- }
82
- } finally {
83
- if (_didIteratorError) {
84
- throw _iteratorError;
85
- }
34
+ });
35
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
36
+ try {
37
+ var _this1 = this, _loop = function() {
38
+ var treeNode = _step.value;
39
+ var parent = treeNode.module.parent;
40
+ var children = treeNode.module.children;
41
+ if (parent && !_this1.shouldIgnore(parent.filename)) {
42
+ var parentTreeNode = _this1.tree.get(parent.filename);
43
+ if (parentTreeNode) {
44
+ treeNode.parent.add(parentTreeNode);
45
+ }
46
+ }
47
+ children.forEach(function(child) {
48
+ if (!_this.shouldIgnore(child.filename)) {
49
+ var childTreeNode = _this.tree.get(child.filename);
50
+ if (childTreeNode) {
51
+ treeNode.children.add(childTreeNode);
52
+ childTreeNode.parent.add(treeNode);
86
53
  }
87
54
  }
55
+ });
56
+ };
57
+ for (var _iterator = this.tree.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)
58
+ _loop();
59
+ } catch (err) {
60
+ _didIteratorError = true;
61
+ _iteratorError = err;
62
+ } finally {
63
+ try {
64
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
65
+ _iterator.return();
66
+ }
67
+ } finally {
68
+ if (_didIteratorError) {
69
+ throw _iteratorError;
88
70
  }
89
- )
90
- },
91
- {
92
- key: "shouldIgnore",
93
- value: function shouldIgnore(path) {
94
- return !path || Boolean(this.ignore.find(function(rule) {
95
- return minimatch.match([
96
- path
97
- ], rule, {
98
- dot: true
99
- }).length > 0;
100
- }));
101
71
  }
102
72
  }
103
- ]);
73
+ };
74
+ _proto.shouldIgnore = function shouldIgnore(path) {
75
+ return !path || Boolean(this.ignore.find(function(rule) {
76
+ return minimatch.match([
77
+ path
78
+ ], rule, {
79
+ dot: true
80
+ }).length > 0;
81
+ }));
82
+ };
104
83
  return DependencyTree2;
105
84
  }();
106
85
  export {
@@ -1,6 +1,4 @@
1
1
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
2
- import { _ as _create_class } from "@swc/helpers/_/_create_class";
3
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
4
2
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
5
3
  import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
6
4
  import path from "path";
@@ -42,93 +40,76 @@ var Watcher = /* @__PURE__ */ function() {
42
40
  "use strict";
43
41
  function Watcher2() {
44
42
  _class_call_check(this, Watcher2);
45
- _define_property(this, "dependencyTree", null);
46
- _define_property(this, "watcher", void 0);
43
+ this.dependencyTree = null;
47
44
  }
48
- _create_class(Watcher2, [
49
- {
50
- key: "listen",
51
- value: function listen(files, options, callback) {
52
- var watched = files.filter(Boolean);
53
- var filenames = watched.map(function(filename) {
54
- return filename.replace(/\\/g, "/");
55
- });
56
- var cache = new StatsCache();
57
- var watcher = chokidar.watch(filenames, options);
58
- watcher.on("ready", function() {
59
- cache.add(getWatchedFiles(watcher));
60
- });
61
- watcher.on("change", function(changed) {
62
- if (!fs.existsSync(changed) || cache.isDiff(changed)) {
63
- cache.refresh(changed);
64
- callback(changed, "change");
65
- }
66
- });
67
- watcher.on("add", function(changed) {
68
- if (!cache.has(changed)) {
69
- cache.add([
70
- changed
71
- ]);
72
- callback(changed, "add");
73
- }
74
- });
75
- watcher.on("unlink", function(changed) {
76
- cache.del(changed);
77
- callback(changed, "unlink");
78
- });
79
- this.watcher = watcher;
80
- }
81
- },
82
- {
83
- key: "createDepTree",
84
- value: function createDepTree() {
85
- this.dependencyTree = new DependencyTree();
45
+ var _proto = Watcher2.prototype;
46
+ _proto.listen = function listen(files, options, callback) {
47
+ var watched = files.filter(Boolean);
48
+ var filenames = watched.map(function(filename) {
49
+ return filename.replace(/\\/g, "/");
50
+ });
51
+ var cache = new StatsCache();
52
+ var watcher = chokidar.watch(filenames, options);
53
+ watcher.on("ready", function() {
54
+ cache.add(getWatchedFiles(watcher));
55
+ });
56
+ watcher.on("change", function(changed) {
57
+ if (!fs.existsSync(changed) || cache.isDiff(changed)) {
58
+ cache.refresh(changed);
59
+ callback(changed, "change");
86
60
  }
87
- },
88
- {
89
- key: "updateDepTree",
90
- value: function updateDepTree() {
91
- var _this_dependencyTree;
92
- (_this_dependencyTree = this.dependencyTree) === null || _this_dependencyTree === void 0 ? void 0 : _this_dependencyTree.update(require.cache);
61
+ });
62
+ watcher.on("add", function(changed) {
63
+ if (!cache.has(changed)) {
64
+ cache.add([
65
+ changed
66
+ ]);
67
+ callback(changed, "add");
93
68
  }
94
- },
95
- {
96
- key: "cleanDepCache",
97
- value: function cleanDepCache(filepath) {
98
- var _this_dependencyTree;
99
- var node = (_this_dependencyTree = this.dependencyTree) === null || _this_dependencyTree === void 0 ? void 0 : _this_dependencyTree.getNode(filepath);
100
- if (node && require.cache[filepath]) {
101
- delete require.cache[filepath];
102
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
103
- try {
104
- for (var _iterator = node.parent.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
105
- var parentNode = _step.value;
106
- this.cleanDepCache(parentNode.module.filename);
107
- }
108
- } catch (err) {
109
- _didIteratorError = true;
110
- _iteratorError = err;
111
- } finally {
112
- try {
113
- if (!_iteratorNormalCompletion && _iterator.return != null) {
114
- _iterator.return();
115
- }
116
- } finally {
117
- if (_didIteratorError) {
118
- throw _iteratorError;
119
- }
120
- }
69
+ });
70
+ watcher.on("unlink", function(changed) {
71
+ cache.del(changed);
72
+ callback(changed, "unlink");
73
+ });
74
+ this.watcher = watcher;
75
+ };
76
+ _proto.createDepTree = function createDepTree() {
77
+ this.dependencyTree = new DependencyTree();
78
+ };
79
+ _proto.updateDepTree = function updateDepTree() {
80
+ var _this_dependencyTree;
81
+ (_this_dependencyTree = this.dependencyTree) === null || _this_dependencyTree === void 0 ? void 0 : _this_dependencyTree.update(require.cache);
82
+ };
83
+ _proto.cleanDepCache = function cleanDepCache(filepath) {
84
+ var _this_dependencyTree;
85
+ var node = (_this_dependencyTree = this.dependencyTree) === null || _this_dependencyTree === void 0 ? void 0 : _this_dependencyTree.getNode(filepath);
86
+ if (node && require.cache[filepath]) {
87
+ delete require.cache[filepath];
88
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
89
+ try {
90
+ for (var _iterator = node.parent.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
91
+ var parentNode = _step.value;
92
+ this.cleanDepCache(parentNode.module.filename);
93
+ }
94
+ } catch (err) {
95
+ _didIteratorError = true;
96
+ _iteratorError = err;
97
+ } finally {
98
+ try {
99
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
100
+ _iterator.return();
101
+ }
102
+ } finally {
103
+ if (_didIteratorError) {
104
+ throw _iteratorError;
121
105
  }
122
106
  }
123
107
  }
124
- },
125
- {
126
- key: "close",
127
- value: function close() {
128
- return this.watcher.close();
129
- }
130
108
  }
131
- ]);
109
+ };
110
+ _proto.close = function close() {
111
+ return this.watcher.close();
112
+ };
132
113
  return Watcher2;
133
114
  }();
134
115
  export {