@andersbakken/fisk 4.0.61 → 4.0.63
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/builder/VM_runtime.js +42 -45
- package/builder/fisk-builder.js +15414 -20314
- package/daemon/fisk-daemon.js +36 -231
- package/monitor/fisk-monitor.js +123 -635
- package/package.json +2 -2
- package/scheduler/fisk-scheduler.js +4278 -8162
package/monitor/fisk-monitor.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var blessed = require('@andersbakken/blessed');
|
|
5
|
+
var require$$0$4 = require('events');
|
|
5
6
|
var require$$1 = require('https');
|
|
6
7
|
var require$$2$1 = require('http');
|
|
7
8
|
var require$$3 = require('net');
|
|
8
9
|
var require$$4 = require('tls');
|
|
9
|
-
var require$$
|
|
10
|
-
var require$$
|
|
11
|
-
var require$$7 = require('url');
|
|
10
|
+
var require$$0$3 = require('crypto');
|
|
11
|
+
var require$$6 = require('url');
|
|
12
12
|
var require$$0$1 = require('zlib');
|
|
13
13
|
var require$$0 = require('fs');
|
|
14
14
|
var path = require('path');
|
|
15
15
|
var require$$2 = require('os');
|
|
16
|
+
var require$$0$2 = require('stream');
|
|
16
17
|
var assert = require('assert');
|
|
17
|
-
var blessed = require('@andersbakken/blessed');
|
|
18
18
|
var require$$1$1 = require('module');
|
|
19
19
|
|
|
20
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var blessed__default = /*#__PURE__*/_interopDefaultLegacy(blessed);
|
|
23
|
+
var require$$0__default$4 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
|
|
23
24
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
24
25
|
var require$$2__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$2$1);
|
|
25
26
|
var require$$3__default = /*#__PURE__*/_interopDefaultLegacy(require$$3);
|
|
26
27
|
var require$$4__default = /*#__PURE__*/_interopDefaultLegacy(require$$4);
|
|
27
|
-
var require$$
|
|
28
|
-
var require$$
|
|
29
|
-
var require$$7__default = /*#__PURE__*/_interopDefaultLegacy(require$$7);
|
|
28
|
+
var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
|
|
29
|
+
var require$$6__default = /*#__PURE__*/_interopDefaultLegacy(require$$6);
|
|
30
30
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
|
31
31
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
32
32
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
33
33
|
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
34
|
+
var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
|
|
34
35
|
var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert);
|
|
35
|
-
var blessed__default = /*#__PURE__*/_interopDefaultLegacy(blessed);
|
|
36
36
|
var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
37
37
|
|
|
38
38
|
var bufferUtilExports = {};
|
|
@@ -1028,7 +1028,6 @@ function inflateOnData(chunk) {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
|
|
1030
1030
|
this[kError] = new RangeError('Max payload size exceeded');
|
|
1031
|
-
this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
|
|
1032
1031
|
this[kError][kStatusCode$2] = 1009;
|
|
1033
1032
|
this.removeListener('data', inflateOnData);
|
|
1034
1033
|
this.reset();
|
|
@@ -1273,7 +1272,7 @@ const INFLATING = 5;
|
|
|
1273
1272
|
/**
|
|
1274
1273
|
* HyBi Receiver implementation.
|
|
1275
1274
|
*
|
|
1276
|
-
* @extends Writable
|
|
1275
|
+
* @extends stream.Writable
|
|
1277
1276
|
*/
|
|
1278
1277
|
class Receiver$1 extends Writable {
|
|
1279
1278
|
/**
|
|
@@ -1419,26 +1418,14 @@ class Receiver$1 extends Writable {
|
|
|
1419
1418
|
|
|
1420
1419
|
if ((buf[0] & 0x30) !== 0x00) {
|
|
1421
1420
|
this._loop = false;
|
|
1422
|
-
return error(
|
|
1423
|
-
RangeError,
|
|
1424
|
-
'RSV2 and RSV3 must be clear',
|
|
1425
|
-
true,
|
|
1426
|
-
1002,
|
|
1427
|
-
'WS_ERR_UNEXPECTED_RSV_2_3'
|
|
1428
|
-
);
|
|
1421
|
+
return error(RangeError, 'RSV2 and RSV3 must be clear', true, 1002);
|
|
1429
1422
|
}
|
|
1430
1423
|
|
|
1431
1424
|
const compressed = (buf[0] & 0x40) === 0x40;
|
|
1432
1425
|
|
|
1433
1426
|
if (compressed && !this._extensions[PerMessageDeflate$3.extensionName]) {
|
|
1434
1427
|
this._loop = false;
|
|
1435
|
-
return error(
|
|
1436
|
-
RangeError,
|
|
1437
|
-
'RSV1 must be clear',
|
|
1438
|
-
true,
|
|
1439
|
-
1002,
|
|
1440
|
-
'WS_ERR_UNEXPECTED_RSV_1'
|
|
1441
|
-
);
|
|
1428
|
+
return error(RangeError, 'RSV1 must be clear', true, 1002);
|
|
1442
1429
|
}
|
|
1443
1430
|
|
|
1444
1431
|
this._fin = (buf[0] & 0x80) === 0x80;
|
|
@@ -1448,61 +1435,31 @@ class Receiver$1 extends Writable {
|
|
|
1448
1435
|
if (this._opcode === 0x00) {
|
|
1449
1436
|
if (compressed) {
|
|
1450
1437
|
this._loop = false;
|
|
1451
|
-
return error(
|
|
1452
|
-
RangeError,
|
|
1453
|
-
'RSV1 must be clear',
|
|
1454
|
-
true,
|
|
1455
|
-
1002,
|
|
1456
|
-
'WS_ERR_UNEXPECTED_RSV_1'
|
|
1457
|
-
);
|
|
1438
|
+
return error(RangeError, 'RSV1 must be clear', true, 1002);
|
|
1458
1439
|
}
|
|
1459
1440
|
|
|
1460
1441
|
if (!this._fragmented) {
|
|
1461
1442
|
this._loop = false;
|
|
1462
|
-
return error(
|
|
1463
|
-
RangeError,
|
|
1464
|
-
'invalid opcode 0',
|
|
1465
|
-
true,
|
|
1466
|
-
1002,
|
|
1467
|
-
'WS_ERR_INVALID_OPCODE'
|
|
1468
|
-
);
|
|
1443
|
+
return error(RangeError, 'invalid opcode 0', true, 1002);
|
|
1469
1444
|
}
|
|
1470
1445
|
|
|
1471
1446
|
this._opcode = this._fragmented;
|
|
1472
1447
|
} else if (this._opcode === 0x01 || this._opcode === 0x02) {
|
|
1473
1448
|
if (this._fragmented) {
|
|
1474
1449
|
this._loop = false;
|
|
1475
|
-
return error(
|
|
1476
|
-
RangeError,
|
|
1477
|
-
`invalid opcode ${this._opcode}`,
|
|
1478
|
-
true,
|
|
1479
|
-
1002,
|
|
1480
|
-
'WS_ERR_INVALID_OPCODE'
|
|
1481
|
-
);
|
|
1450
|
+
return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002);
|
|
1482
1451
|
}
|
|
1483
1452
|
|
|
1484
1453
|
this._compressed = compressed;
|
|
1485
1454
|
} else if (this._opcode > 0x07 && this._opcode < 0x0b) {
|
|
1486
1455
|
if (!this._fin) {
|
|
1487
1456
|
this._loop = false;
|
|
1488
|
-
return error(
|
|
1489
|
-
RangeError,
|
|
1490
|
-
'FIN must be set',
|
|
1491
|
-
true,
|
|
1492
|
-
1002,
|
|
1493
|
-
'WS_ERR_EXPECTED_FIN'
|
|
1494
|
-
);
|
|
1457
|
+
return error(RangeError, 'FIN must be set', true, 1002);
|
|
1495
1458
|
}
|
|
1496
1459
|
|
|
1497
1460
|
if (compressed) {
|
|
1498
1461
|
this._loop = false;
|
|
1499
|
-
return error(
|
|
1500
|
-
RangeError,
|
|
1501
|
-
'RSV1 must be clear',
|
|
1502
|
-
true,
|
|
1503
|
-
1002,
|
|
1504
|
-
'WS_ERR_UNEXPECTED_RSV_1'
|
|
1505
|
-
);
|
|
1462
|
+
return error(RangeError, 'RSV1 must be clear', true, 1002);
|
|
1506
1463
|
}
|
|
1507
1464
|
|
|
1508
1465
|
if (this._payloadLength > 0x7d) {
|
|
@@ -1511,19 +1468,12 @@ class Receiver$1 extends Writable {
|
|
|
1511
1468
|
RangeError,
|
|
1512
1469
|
`invalid payload length ${this._payloadLength}`,
|
|
1513
1470
|
true,
|
|
1514
|
-
1002
|
|
1515
|
-
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
|
|
1471
|
+
1002
|
|
1516
1472
|
);
|
|
1517
1473
|
}
|
|
1518
1474
|
} else {
|
|
1519
1475
|
this._loop = false;
|
|
1520
|
-
return error(
|
|
1521
|
-
RangeError,
|
|
1522
|
-
`invalid opcode ${this._opcode}`,
|
|
1523
|
-
true,
|
|
1524
|
-
1002,
|
|
1525
|
-
'WS_ERR_INVALID_OPCODE'
|
|
1526
|
-
);
|
|
1476
|
+
return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002);
|
|
1527
1477
|
}
|
|
1528
1478
|
|
|
1529
1479
|
if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
|
|
@@ -1532,23 +1482,11 @@ class Receiver$1 extends Writable {
|
|
|
1532
1482
|
if (this._isServer) {
|
|
1533
1483
|
if (!this._masked) {
|
|
1534
1484
|
this._loop = false;
|
|
1535
|
-
return error(
|
|
1536
|
-
RangeError,
|
|
1537
|
-
'MASK must be set',
|
|
1538
|
-
true,
|
|
1539
|
-
1002,
|
|
1540
|
-
'WS_ERR_EXPECTED_MASK'
|
|
1541
|
-
);
|
|
1485
|
+
return error(RangeError, 'MASK must be set', true, 1002);
|
|
1542
1486
|
}
|
|
1543
1487
|
} else if (this._masked) {
|
|
1544
1488
|
this._loop = false;
|
|
1545
|
-
return error(
|
|
1546
|
-
RangeError,
|
|
1547
|
-
'MASK must be clear',
|
|
1548
|
-
true,
|
|
1549
|
-
1002,
|
|
1550
|
-
'WS_ERR_UNEXPECTED_MASK'
|
|
1551
|
-
);
|
|
1489
|
+
return error(RangeError, 'MASK must be clear', true, 1002);
|
|
1552
1490
|
}
|
|
1553
1491
|
|
|
1554
1492
|
if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
|
|
@@ -1597,8 +1535,7 @@ class Receiver$1 extends Writable {
|
|
|
1597
1535
|
RangeError,
|
|
1598
1536
|
'Unsupported WebSocket frame: payload length > 2^53 - 1',
|
|
1599
1537
|
false,
|
|
1600
|
-
1009
|
|
1601
|
-
'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
|
|
1538
|
+
1009
|
|
1602
1539
|
);
|
|
1603
1540
|
}
|
|
1604
1541
|
|
|
@@ -1617,13 +1554,7 @@ class Receiver$1 extends Writable {
|
|
|
1617
1554
|
this._totalPayloadLength += this._payloadLength;
|
|
1618
1555
|
if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
|
|
1619
1556
|
this._loop = false;
|
|
1620
|
-
return error(
|
|
1621
|
-
RangeError,
|
|
1622
|
-
'Max payload size exceeded',
|
|
1623
|
-
false,
|
|
1624
|
-
1009,
|
|
1625
|
-
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
|
|
1626
|
-
);
|
|
1557
|
+
return error(RangeError, 'Max payload size exceeded', false, 1009);
|
|
1627
1558
|
}
|
|
1628
1559
|
}
|
|
1629
1560
|
|
|
@@ -1703,13 +1634,7 @@ class Receiver$1 extends Writable {
|
|
|
1703
1634
|
this._messageLength += buf.length;
|
|
1704
1635
|
if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
|
|
1705
1636
|
return cb(
|
|
1706
|
-
error(
|
|
1707
|
-
RangeError,
|
|
1708
|
-
'Max payload size exceeded',
|
|
1709
|
-
false,
|
|
1710
|
-
1009,
|
|
1711
|
-
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
|
|
1712
|
-
)
|
|
1637
|
+
error(RangeError, 'Max payload size exceeded', false, 1009)
|
|
1713
1638
|
);
|
|
1714
1639
|
}
|
|
1715
1640
|
|
|
@@ -1756,13 +1681,7 @@ class Receiver$1 extends Writable {
|
|
|
1756
1681
|
|
|
1757
1682
|
if (!isValidUTF8(buf)) {
|
|
1758
1683
|
this._loop = false;
|
|
1759
|
-
return error(
|
|
1760
|
-
Error,
|
|
1761
|
-
'invalid UTF-8 sequence',
|
|
1762
|
-
true,
|
|
1763
|
-
1007,
|
|
1764
|
-
'WS_ERR_INVALID_UTF8'
|
|
1765
|
-
);
|
|
1684
|
+
return error(Error, 'invalid UTF-8 sequence', true, 1007);
|
|
1766
1685
|
}
|
|
1767
1686
|
|
|
1768
1687
|
this.emit('message', buf.toString());
|
|
@@ -1787,36 +1706,18 @@ class Receiver$1 extends Writable {
|
|
|
1787
1706
|
this.emit('conclude', 1005, '');
|
|
1788
1707
|
this.end();
|
|
1789
1708
|
} else if (data.length === 1) {
|
|
1790
|
-
return error(
|
|
1791
|
-
RangeError,
|
|
1792
|
-
'invalid payload length 1',
|
|
1793
|
-
true,
|
|
1794
|
-
1002,
|
|
1795
|
-
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
|
|
1796
|
-
);
|
|
1709
|
+
return error(RangeError, 'invalid payload length 1', true, 1002);
|
|
1797
1710
|
} else {
|
|
1798
1711
|
const code = data.readUInt16BE(0);
|
|
1799
1712
|
|
|
1800
1713
|
if (!isValidStatusCode$1(code)) {
|
|
1801
|
-
return error(
|
|
1802
|
-
RangeError,
|
|
1803
|
-
`invalid status code ${code}`,
|
|
1804
|
-
true,
|
|
1805
|
-
1002,
|
|
1806
|
-
'WS_ERR_INVALID_CLOSE_CODE'
|
|
1807
|
-
);
|
|
1714
|
+
return error(RangeError, `invalid status code ${code}`, true, 1002);
|
|
1808
1715
|
}
|
|
1809
1716
|
|
|
1810
1717
|
const buf = data.slice(2);
|
|
1811
1718
|
|
|
1812
1719
|
if (!isValidUTF8(buf)) {
|
|
1813
|
-
return error(
|
|
1814
|
-
Error,
|
|
1815
|
-
'invalid UTF-8 sequence',
|
|
1816
|
-
true,
|
|
1817
|
-
1007,
|
|
1818
|
-
'WS_ERR_INVALID_UTF8'
|
|
1819
|
-
);
|
|
1720
|
+
return error(Error, 'invalid UTF-8 sequence', true, 1007);
|
|
1820
1721
|
}
|
|
1821
1722
|
|
|
1822
1723
|
this.emit('conclude', code, buf.toString());
|
|
@@ -1837,28 +1738,25 @@ var receiver = Receiver$1;
|
|
|
1837
1738
|
/**
|
|
1838
1739
|
* Builds an error object.
|
|
1839
1740
|
*
|
|
1840
|
-
* @param {
|
|
1741
|
+
* @param {(Error|RangeError)} ErrorCtor The error constructor
|
|
1841
1742
|
* @param {String} message The error message
|
|
1842
1743
|
* @param {Boolean} prefix Specifies whether or not to add a default prefix to
|
|
1843
1744
|
* `message`
|
|
1844
1745
|
* @param {Number} statusCode The status code
|
|
1845
|
-
* @param {String} errorCode The exposed error code
|
|
1846
1746
|
* @return {(Error|RangeError)} The error
|
|
1847
1747
|
* @private
|
|
1848
1748
|
*/
|
|
1849
|
-
function error(ErrorCtor, message, prefix, statusCode
|
|
1749
|
+
function error(ErrorCtor, message, prefix, statusCode) {
|
|
1850
1750
|
const err = new ErrorCtor(
|
|
1851
1751
|
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
1852
1752
|
);
|
|
1853
1753
|
|
|
1854
1754
|
Error.captureStackTrace(err, error);
|
|
1855
|
-
err.code = errorCode;
|
|
1856
1755
|
err[kStatusCode$1] = statusCode;
|
|
1857
1756
|
return err;
|
|
1858
1757
|
}
|
|
1859
1758
|
|
|
1860
|
-
|
|
1861
|
-
const { randomFillSync } = require$$5__default["default"];
|
|
1759
|
+
const { randomFillSync } = require$$0__default$3["default"];
|
|
1862
1760
|
|
|
1863
1761
|
const PerMessageDeflate$2 = permessageDeflate;
|
|
1864
1762
|
const { EMPTY_BUFFER: EMPTY_BUFFER$1 } = constants;
|
|
@@ -1874,7 +1772,7 @@ class Sender$1 {
|
|
|
1874
1772
|
/**
|
|
1875
1773
|
* Creates a Sender instance.
|
|
1876
1774
|
*
|
|
1877
|
-
* @param {
|
|
1775
|
+
* @param {net.Socket} socket The connection socket
|
|
1878
1776
|
* @param {Object} [extensions] An object containing the negotiated extensions
|
|
1879
1777
|
*/
|
|
1880
1778
|
constructor(socket, extensions) {
|
|
@@ -2667,15 +2565,13 @@ function format$2(extensions) {
|
|
|
2667
2565
|
|
|
2668
2566
|
var extension = { format: format$2, parse: parse$2 };
|
|
2669
2567
|
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
const EventEmitter$1 = require$$0__default$3["default"];
|
|
2568
|
+
const EventEmitter$1 = require$$0__default$4["default"];
|
|
2673
2569
|
const https = require$$1__default["default"];
|
|
2674
|
-
const http
|
|
2570
|
+
const http = require$$2__default$1["default"];
|
|
2675
2571
|
const net = require$$3__default["default"];
|
|
2676
2572
|
const tls = require$$4__default["default"];
|
|
2677
|
-
const { randomBytes, createHash: createHash$1 } = require$$
|
|
2678
|
-
const { URL } = require$$
|
|
2573
|
+
const { randomBytes, createHash: createHash$1 } = require$$0__default$3["default"];
|
|
2574
|
+
const { URL } = require$$6__default["default"];
|
|
2679
2575
|
|
|
2680
2576
|
const PerMessageDeflate$1 = permessageDeflate;
|
|
2681
2577
|
const Receiver = receiver;
|
|
@@ -2705,7 +2601,7 @@ class WebSocket$2 extends EventEmitter$1 {
|
|
|
2705
2601
|
/**
|
|
2706
2602
|
* Create a new `WebSocket`.
|
|
2707
2603
|
*
|
|
2708
|
-
* @param {(String|URL)} address The URL to which to connect
|
|
2604
|
+
* @param {(String|url.URL)} address The URL to which to connect
|
|
2709
2605
|
* @param {(String|String[])} [protocols] The subprotocols
|
|
2710
2606
|
* @param {Object} [options] Connection options
|
|
2711
2607
|
*/
|
|
@@ -2781,50 +2677,6 @@ class WebSocket$2 extends EventEmitter$1 {
|
|
|
2781
2677
|
return Object.keys(this._extensions).join();
|
|
2782
2678
|
}
|
|
2783
2679
|
|
|
2784
|
-
/**
|
|
2785
|
-
* @type {Function}
|
|
2786
|
-
*/
|
|
2787
|
-
/* istanbul ignore next */
|
|
2788
|
-
get onclose() {
|
|
2789
|
-
return undefined;
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
|
-
/* istanbul ignore next */
|
|
2793
|
-
set onclose(listener) {}
|
|
2794
|
-
|
|
2795
|
-
/**
|
|
2796
|
-
* @type {Function}
|
|
2797
|
-
*/
|
|
2798
|
-
/* istanbul ignore next */
|
|
2799
|
-
get onerror() {
|
|
2800
|
-
return undefined;
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
/* istanbul ignore next */
|
|
2804
|
-
set onerror(listener) {}
|
|
2805
|
-
|
|
2806
|
-
/**
|
|
2807
|
-
* @type {Function}
|
|
2808
|
-
*/
|
|
2809
|
-
/* istanbul ignore next */
|
|
2810
|
-
get onopen() {
|
|
2811
|
-
return undefined;
|
|
2812
|
-
}
|
|
2813
|
-
|
|
2814
|
-
/* istanbul ignore next */
|
|
2815
|
-
set onopen(listener) {}
|
|
2816
|
-
|
|
2817
|
-
/**
|
|
2818
|
-
* @type {Function}
|
|
2819
|
-
*/
|
|
2820
|
-
/* istanbul ignore next */
|
|
2821
|
-
get onmessage() {
|
|
2822
|
-
return undefined;
|
|
2823
|
-
}
|
|
2824
|
-
|
|
2825
|
-
/* istanbul ignore next */
|
|
2826
|
-
set onmessage(listener) {}
|
|
2827
|
-
|
|
2828
2680
|
/**
|
|
2829
2681
|
* @type {String}
|
|
2830
2682
|
*/
|
|
@@ -2849,8 +2701,7 @@ class WebSocket$2 extends EventEmitter$1 {
|
|
|
2849
2701
|
/**
|
|
2850
2702
|
* Set up the socket and the internal resources.
|
|
2851
2703
|
*
|
|
2852
|
-
* @param {
|
|
2853
|
-
* server and client
|
|
2704
|
+
* @param {net.Socket} socket The network socket between the server and client
|
|
2854
2705
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
2855
2706
|
* @param {Number} [maxPayload=0] The maximum allowed message size
|
|
2856
2707
|
* @private
|
|
@@ -2939,13 +2790,7 @@ class WebSocket$2 extends EventEmitter$1 {
|
|
|
2939
2790
|
}
|
|
2940
2791
|
|
|
2941
2792
|
if (this.readyState === WebSocket$2.CLOSING) {
|
|
2942
|
-
if (
|
|
2943
|
-
this._closeFrameSent &&
|
|
2944
|
-
(this._closeFrameReceived || this._receiver._writableState.errorEmitted)
|
|
2945
|
-
) {
|
|
2946
|
-
this._socket.end();
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2793
|
+
if (this._closeFrameSent && this._closeFrameReceived) this._socket.end();
|
|
2949
2794
|
return;
|
|
2950
2795
|
}
|
|
2951
2796
|
|
|
@@ -2958,13 +2803,7 @@ class WebSocket$2 extends EventEmitter$1 {
|
|
|
2958
2803
|
if (err) return;
|
|
2959
2804
|
|
|
2960
2805
|
this._closeFrameSent = true;
|
|
2961
|
-
|
|
2962
|
-
if (
|
|
2963
|
-
this._closeFrameReceived ||
|
|
2964
|
-
this._receiver._writableState.errorEmitted
|
|
2965
|
-
) {
|
|
2966
|
-
this._socket.end();
|
|
2967
|
-
}
|
|
2806
|
+
if (this._closeFrameReceived) this._socket.end();
|
|
2968
2807
|
});
|
|
2969
2808
|
|
|
2970
2809
|
//
|
|
@@ -3106,76 +2945,11 @@ class WebSocket$2 extends EventEmitter$1 {
|
|
|
3106
2945
|
}
|
|
3107
2946
|
}
|
|
3108
2947
|
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
* @memberof WebSocket
|
|
3112
|
-
*/
|
|
3113
|
-
Object.defineProperty(WebSocket$2, 'CONNECTING', {
|
|
3114
|
-
enumerable: true,
|
|
3115
|
-
value: readyStates.indexOf('CONNECTING')
|
|
3116
|
-
});
|
|
2948
|
+
readyStates.forEach((readyState, i) => {
|
|
2949
|
+
const descriptor = { enumerable: true, value: i };
|
|
3117
2950
|
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
* @memberof WebSocket.prototype
|
|
3121
|
-
*/
|
|
3122
|
-
Object.defineProperty(WebSocket$2.prototype, 'CONNECTING', {
|
|
3123
|
-
enumerable: true,
|
|
3124
|
-
value: readyStates.indexOf('CONNECTING')
|
|
3125
|
-
});
|
|
3126
|
-
|
|
3127
|
-
/**
|
|
3128
|
-
* @constant {Number} OPEN
|
|
3129
|
-
* @memberof WebSocket
|
|
3130
|
-
*/
|
|
3131
|
-
Object.defineProperty(WebSocket$2, 'OPEN', {
|
|
3132
|
-
enumerable: true,
|
|
3133
|
-
value: readyStates.indexOf('OPEN')
|
|
3134
|
-
});
|
|
3135
|
-
|
|
3136
|
-
/**
|
|
3137
|
-
* @constant {Number} OPEN
|
|
3138
|
-
* @memberof WebSocket.prototype
|
|
3139
|
-
*/
|
|
3140
|
-
Object.defineProperty(WebSocket$2.prototype, 'OPEN', {
|
|
3141
|
-
enumerable: true,
|
|
3142
|
-
value: readyStates.indexOf('OPEN')
|
|
3143
|
-
});
|
|
3144
|
-
|
|
3145
|
-
/**
|
|
3146
|
-
* @constant {Number} CLOSING
|
|
3147
|
-
* @memberof WebSocket
|
|
3148
|
-
*/
|
|
3149
|
-
Object.defineProperty(WebSocket$2, 'CLOSING', {
|
|
3150
|
-
enumerable: true,
|
|
3151
|
-
value: readyStates.indexOf('CLOSING')
|
|
3152
|
-
});
|
|
3153
|
-
|
|
3154
|
-
/**
|
|
3155
|
-
* @constant {Number} CLOSING
|
|
3156
|
-
* @memberof WebSocket.prototype
|
|
3157
|
-
*/
|
|
3158
|
-
Object.defineProperty(WebSocket$2.prototype, 'CLOSING', {
|
|
3159
|
-
enumerable: true,
|
|
3160
|
-
value: readyStates.indexOf('CLOSING')
|
|
3161
|
-
});
|
|
3162
|
-
|
|
3163
|
-
/**
|
|
3164
|
-
* @constant {Number} CLOSED
|
|
3165
|
-
* @memberof WebSocket
|
|
3166
|
-
*/
|
|
3167
|
-
Object.defineProperty(WebSocket$2, 'CLOSED', {
|
|
3168
|
-
enumerable: true,
|
|
3169
|
-
value: readyStates.indexOf('CLOSED')
|
|
3170
|
-
});
|
|
3171
|
-
|
|
3172
|
-
/**
|
|
3173
|
-
* @constant {Number} CLOSED
|
|
3174
|
-
* @memberof WebSocket.prototype
|
|
3175
|
-
*/
|
|
3176
|
-
Object.defineProperty(WebSocket$2.prototype, 'CLOSED', {
|
|
3177
|
-
enumerable: true,
|
|
3178
|
-
value: readyStates.indexOf('CLOSED')
|
|
2951
|
+
Object.defineProperty(WebSocket$2.prototype, readyState, descriptor);
|
|
2952
|
+
Object.defineProperty(WebSocket$2, readyState, descriptor);
|
|
3179
2953
|
});
|
|
3180
2954
|
|
|
3181
2955
|
[
|
|
@@ -3195,7 +2969,14 @@ Object.defineProperty(WebSocket$2.prototype, 'CLOSED', {
|
|
|
3195
2969
|
//
|
|
3196
2970
|
['open', 'error', 'close', 'message'].forEach((method) => {
|
|
3197
2971
|
Object.defineProperty(WebSocket$2.prototype, `on${method}`, {
|
|
2972
|
+
configurable: true,
|
|
3198
2973
|
enumerable: true,
|
|
2974
|
+
/**
|
|
2975
|
+
* Return the listener of the event.
|
|
2976
|
+
*
|
|
2977
|
+
* @return {(Function|undefined)} The event listener or `undefined`
|
|
2978
|
+
* @public
|
|
2979
|
+
*/
|
|
3199
2980
|
get() {
|
|
3200
2981
|
const listeners = this.listeners(method);
|
|
3201
2982
|
for (let i = 0; i < listeners.length; i++) {
|
|
@@ -3204,6 +2985,12 @@ Object.defineProperty(WebSocket$2.prototype, 'CLOSED', {
|
|
|
3204
2985
|
|
|
3205
2986
|
return undefined;
|
|
3206
2987
|
},
|
|
2988
|
+
/**
|
|
2989
|
+
* Add a listener for the event.
|
|
2990
|
+
*
|
|
2991
|
+
* @param {Function} listener The listener to add
|
|
2992
|
+
* @public
|
|
2993
|
+
*/
|
|
3207
2994
|
set(listener) {
|
|
3208
2995
|
const listeners = this.listeners(method);
|
|
3209
2996
|
for (let i = 0; i < listeners.length; i++) {
|
|
@@ -3226,7 +3013,7 @@ var websocket = WebSocket$2;
|
|
|
3226
3013
|
* Initialize a WebSocket client.
|
|
3227
3014
|
*
|
|
3228
3015
|
* @param {WebSocket} websocket The client to initialize
|
|
3229
|
-
* @param {(String|URL)} address The URL to which to connect
|
|
3016
|
+
* @param {(String|url.URL)} address The URL to which to connect
|
|
3230
3017
|
* @param {String} [protocols] The subprotocols
|
|
3231
3018
|
* @param {Object} [options] Connection options
|
|
3232
3019
|
* @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable
|
|
@@ -3284,21 +3071,14 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3284
3071
|
const isUnixSocket = parsedUrl.protocol === 'ws+unix:';
|
|
3285
3072
|
|
|
3286
3073
|
if (!parsedUrl.host && (!isUnixSocket || !parsedUrl.pathname)) {
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
if (websocket._redirects === 0) {
|
|
3290
|
-
throw err;
|
|
3291
|
-
} else {
|
|
3292
|
-
emitErrorAndClose(websocket, err);
|
|
3293
|
-
return;
|
|
3294
|
-
}
|
|
3074
|
+
throw new Error(`Invalid URL: ${websocket.url}`);
|
|
3295
3075
|
}
|
|
3296
3076
|
|
|
3297
3077
|
const isSecure =
|
|
3298
3078
|
parsedUrl.protocol === 'wss:' || parsedUrl.protocol === 'https:';
|
|
3299
3079
|
const defaultPort = isSecure ? 443 : 80;
|
|
3300
3080
|
const key = randomBytes(16).toString('base64');
|
|
3301
|
-
const get = isSecure ? https.get : http
|
|
3081
|
+
const get = isSecure ? https.get : http.get;
|
|
3302
3082
|
let perMessageDeflate;
|
|
3303
3083
|
|
|
3304
3084
|
opts.createConnection = isSecure ? tlsConnect : netConnect;
|
|
@@ -3348,61 +3128,6 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3348
3128
|
opts.path = parts[1];
|
|
3349
3129
|
}
|
|
3350
3130
|
|
|
3351
|
-
if (opts.followRedirects) {
|
|
3352
|
-
if (websocket._redirects === 0) {
|
|
3353
|
-
websocket._originalUnixSocket = isUnixSocket;
|
|
3354
|
-
websocket._originalSecure = isSecure;
|
|
3355
|
-
websocket._originalHostOrSocketPath = isUnixSocket
|
|
3356
|
-
? opts.socketPath
|
|
3357
|
-
: parsedUrl.host;
|
|
3358
|
-
|
|
3359
|
-
const headers = options && options.headers;
|
|
3360
|
-
|
|
3361
|
-
//
|
|
3362
|
-
// Shallow copy the user provided options so that headers can be changed
|
|
3363
|
-
// without mutating the original object.
|
|
3364
|
-
//
|
|
3365
|
-
options = { ...options, headers: {} };
|
|
3366
|
-
|
|
3367
|
-
if (headers) {
|
|
3368
|
-
for (const [key, value] of Object.entries(headers)) {
|
|
3369
|
-
options.headers[key.toLowerCase()] = value;
|
|
3370
|
-
}
|
|
3371
|
-
}
|
|
3372
|
-
} else {
|
|
3373
|
-
const isSameHost = isUnixSocket
|
|
3374
|
-
? websocket._originalUnixSocket
|
|
3375
|
-
? opts.socketPath === websocket._originalHostOrSocketPath
|
|
3376
|
-
: false
|
|
3377
|
-
: websocket._originalUnixSocket
|
|
3378
|
-
? false
|
|
3379
|
-
: parsedUrl.host === websocket._originalHostOrSocketPath;
|
|
3380
|
-
|
|
3381
|
-
if (!isSameHost || (websocket._originalSecure && !isSecure)) {
|
|
3382
|
-
//
|
|
3383
|
-
// Match curl 7.77.0 behavior and drop the following headers. These
|
|
3384
|
-
// headers are also dropped when following a redirect to a subdomain.
|
|
3385
|
-
//
|
|
3386
|
-
delete opts.headers.authorization;
|
|
3387
|
-
delete opts.headers.cookie;
|
|
3388
|
-
|
|
3389
|
-
if (!isSameHost) delete opts.headers.host;
|
|
3390
|
-
|
|
3391
|
-
opts.auth = undefined;
|
|
3392
|
-
}
|
|
3393
|
-
}
|
|
3394
|
-
|
|
3395
|
-
//
|
|
3396
|
-
// Match curl 7.77.0 behavior and make the first `Authorization` header win.
|
|
3397
|
-
// If the `Authorization` header is set, then there is nothing to do as it
|
|
3398
|
-
// will take precedence.
|
|
3399
|
-
//
|
|
3400
|
-
if (opts.auth && !options.headers.authorization) {
|
|
3401
|
-
options.headers.authorization =
|
|
3402
|
-
'Basic ' + Buffer.from(opts.auth).toString('base64');
|
|
3403
|
-
}
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
3131
|
let req = (websocket._req = get(opts));
|
|
3407
3132
|
|
|
3408
3133
|
if (opts.timeout) {
|
|
@@ -3415,7 +3140,9 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3415
3140
|
if (req === null || req.aborted) return;
|
|
3416
3141
|
|
|
3417
3142
|
req = websocket._req = null;
|
|
3418
|
-
|
|
3143
|
+
websocket._readyState = WebSocket$2.CLOSING;
|
|
3144
|
+
websocket.emit('error', err);
|
|
3145
|
+
websocket.emitClose();
|
|
3419
3146
|
});
|
|
3420
3147
|
|
|
3421
3148
|
req.on('response', (res) => {
|
|
@@ -3435,14 +3162,7 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3435
3162
|
|
|
3436
3163
|
req.abort();
|
|
3437
3164
|
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
try {
|
|
3441
|
-
addr = new URL(location, address);
|
|
3442
|
-
} catch (err) {
|
|
3443
|
-
emitErrorAndClose(websocket, err);
|
|
3444
|
-
return;
|
|
3445
|
-
}
|
|
3165
|
+
const addr = new URL(location, address);
|
|
3446
3166
|
|
|
3447
3167
|
initAsClient(websocket, addr, protocols, options);
|
|
3448
3168
|
} else if (!websocket.emit('unexpected-response', req, res)) {
|
|
@@ -3465,13 +3185,6 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3465
3185
|
|
|
3466
3186
|
req = websocket._req = null;
|
|
3467
3187
|
|
|
3468
|
-
const upgrade = res.headers.upgrade;
|
|
3469
|
-
|
|
3470
|
-
if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
|
|
3471
|
-
abortHandshake$1(websocket, socket, 'Invalid Upgrade header');
|
|
3472
|
-
return;
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
3188
|
const digest = createHash$1('sha1')
|
|
3476
3189
|
.update(key + GUID$1)
|
|
3477
3190
|
.digest('base64');
|
|
@@ -3500,50 +3213,22 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3500
3213
|
|
|
3501
3214
|
if (serverProt) websocket._protocol = serverProt;
|
|
3502
3215
|
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
if (secWebSocketExtensions !== undefined) {
|
|
3506
|
-
if (!perMessageDeflate) {
|
|
3507
|
-
const message =
|
|
3508
|
-
'Server sent a Sec-WebSocket-Extensions header but no extension ' +
|
|
3509
|
-
'was requested';
|
|
3510
|
-
abortHandshake$1(websocket, socket, message);
|
|
3511
|
-
return;
|
|
3512
|
-
}
|
|
3513
|
-
|
|
3514
|
-
let extensions;
|
|
3515
|
-
|
|
3216
|
+
if (perMessageDeflate) {
|
|
3516
3217
|
try {
|
|
3517
|
-
extensions = parse$1(
|
|
3518
|
-
} catch (err) {
|
|
3519
|
-
const message = 'Invalid Sec-WebSocket-Extensions header';
|
|
3520
|
-
abortHandshake$1(websocket, socket, message);
|
|
3521
|
-
return;
|
|
3522
|
-
}
|
|
3523
|
-
|
|
3524
|
-
const extensionNames = Object.keys(extensions);
|
|
3525
|
-
|
|
3526
|
-
if (extensionNames.length) {
|
|
3527
|
-
if (
|
|
3528
|
-
extensionNames.length !== 1 ||
|
|
3529
|
-
extensionNames[0] !== PerMessageDeflate$1.extensionName
|
|
3530
|
-
) {
|
|
3531
|
-
const message =
|
|
3532
|
-
'Server indicated an extension that was not requested';
|
|
3533
|
-
abortHandshake$1(websocket, socket, message);
|
|
3534
|
-
return;
|
|
3535
|
-
}
|
|
3218
|
+
const extensions = parse$1(res.headers['sec-websocket-extensions']);
|
|
3536
3219
|
|
|
3537
|
-
|
|
3220
|
+
if (extensions[PerMessageDeflate$1.extensionName]) {
|
|
3538
3221
|
perMessageDeflate.accept(extensions[PerMessageDeflate$1.extensionName]);
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
abortHandshake$1(websocket, socket, message);
|
|
3542
|
-
return;
|
|
3222
|
+
websocket._extensions[PerMessageDeflate$1.extensionName] =
|
|
3223
|
+
perMessageDeflate;
|
|
3543
3224
|
}
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3225
|
+
} catch (err) {
|
|
3226
|
+
abortHandshake$1(
|
|
3227
|
+
websocket,
|
|
3228
|
+
socket,
|
|
3229
|
+
'Invalid Sec-WebSocket-Extensions header'
|
|
3230
|
+
);
|
|
3231
|
+
return;
|
|
3547
3232
|
}
|
|
3548
3233
|
}
|
|
3549
3234
|
|
|
@@ -3551,19 +3236,6 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
3551
3236
|
});
|
|
3552
3237
|
}
|
|
3553
3238
|
|
|
3554
|
-
/**
|
|
3555
|
-
* Emit the `'error'` and `'close'` event.
|
|
3556
|
-
*
|
|
3557
|
-
* @param {WebSocket} websocket The WebSocket instance
|
|
3558
|
-
* @param {Error} The error to emit
|
|
3559
|
-
* @private
|
|
3560
|
-
*/
|
|
3561
|
-
function emitErrorAndClose(websocket, err) {
|
|
3562
|
-
websocket._readyState = WebSocket$2.CLOSING;
|
|
3563
|
-
websocket.emit('error', err);
|
|
3564
|
-
websocket.emitClose();
|
|
3565
|
-
}
|
|
3566
|
-
|
|
3567
3239
|
/**
|
|
3568
3240
|
* Create a `net.Socket` and initiate a connection.
|
|
3569
3241
|
*
|
|
@@ -3597,8 +3269,8 @@ function tlsConnect(options) {
|
|
|
3597
3269
|
* Abort the handshake and emit an error.
|
|
3598
3270
|
*
|
|
3599
3271
|
* @param {WebSocket} websocket The WebSocket instance
|
|
3600
|
-
* @param {(http.ClientRequest|net.Socket
|
|
3601
|
-
*
|
|
3272
|
+
* @param {(http.ClientRequest|net.Socket)} stream The request to abort or the
|
|
3273
|
+
* socket to destroy
|
|
3602
3274
|
* @param {String} message The error message
|
|
3603
3275
|
* @private
|
|
3604
3276
|
*/
|
|
@@ -3671,15 +3343,13 @@ function sendAfterClose(websocket, data, cb) {
|
|
|
3671
3343
|
function receiverOnConclude(code, reason) {
|
|
3672
3344
|
const websocket = this[kWebSocket$1];
|
|
3673
3345
|
|
|
3346
|
+
websocket._socket.removeListener('data', socketOnData);
|
|
3347
|
+
websocket._socket.resume();
|
|
3348
|
+
|
|
3674
3349
|
websocket._closeFrameReceived = true;
|
|
3675
3350
|
websocket._closeMessage = reason;
|
|
3676
3351
|
websocket._closeCode = code;
|
|
3677
3352
|
|
|
3678
|
-
if (websocket._socket[kWebSocket$1] === undefined) return;
|
|
3679
|
-
|
|
3680
|
-
websocket._socket.removeListener('data', socketOnData);
|
|
3681
|
-
process.nextTick(resume, websocket._socket);
|
|
3682
|
-
|
|
3683
3353
|
if (code === 1005) websocket.close();
|
|
3684
3354
|
else websocket.close(code, reason);
|
|
3685
3355
|
}
|
|
@@ -3702,19 +3372,12 @@ function receiverOnDrain() {
|
|
|
3702
3372
|
function receiverOnError(err) {
|
|
3703
3373
|
const websocket = this[kWebSocket$1];
|
|
3704
3374
|
|
|
3705
|
-
|
|
3706
|
-
websocket._socket.removeListener('data', socketOnData);
|
|
3707
|
-
|
|
3708
|
-
//
|
|
3709
|
-
// On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
|
|
3710
|
-
// https://github.com/websockets/ws/issues/1940.
|
|
3711
|
-
//
|
|
3712
|
-
process.nextTick(resume, websocket._socket);
|
|
3713
|
-
|
|
3714
|
-
websocket.close(err[kStatusCode]);
|
|
3715
|
-
}
|
|
3375
|
+
websocket._socket.removeListener('data', socketOnData);
|
|
3716
3376
|
|
|
3377
|
+
websocket._readyState = WebSocket$2.CLOSING;
|
|
3378
|
+
websocket._closeCode = err[kStatusCode];
|
|
3717
3379
|
websocket.emit('error', err);
|
|
3380
|
+
websocket._socket.destroy();
|
|
3718
3381
|
}
|
|
3719
3382
|
|
|
3720
3383
|
/**
|
|
@@ -3759,16 +3422,6 @@ function receiverOnPong(data) {
|
|
|
3759
3422
|
this[kWebSocket$1].emit('pong', data);
|
|
3760
3423
|
}
|
|
3761
3424
|
|
|
3762
|
-
/**
|
|
3763
|
-
* Resume a readable stream
|
|
3764
|
-
*
|
|
3765
|
-
* @param {Readable} stream The readable stream
|
|
3766
|
-
* @private
|
|
3767
|
-
*/
|
|
3768
|
-
function resume(stream) {
|
|
3769
|
-
stream.resume();
|
|
3770
|
-
}
|
|
3771
|
-
|
|
3772
3425
|
/**
|
|
3773
3426
|
* The listener of the `net.Socket` `'close'` event.
|
|
3774
3427
|
*
|
|
@@ -3778,13 +3431,10 @@ function socketOnClose() {
|
|
|
3778
3431
|
const websocket = this[kWebSocket$1];
|
|
3779
3432
|
|
|
3780
3433
|
this.removeListener('close', socketOnClose);
|
|
3781
|
-
this.removeListener('data', socketOnData);
|
|
3782
3434
|
this.removeListener('end', socketOnEnd);
|
|
3783
3435
|
|
|
3784
3436
|
websocket._readyState = WebSocket$2.CLOSING;
|
|
3785
3437
|
|
|
3786
|
-
let chunk;
|
|
3787
|
-
|
|
3788
3438
|
//
|
|
3789
3439
|
// The close frame might not have been received or the `'end'` event emitted,
|
|
3790
3440
|
// for example, if the socket was destroyed due to an error. Ensure that the
|
|
@@ -3792,19 +3442,13 @@ function socketOnClose() {
|
|
|
3792
3442
|
// it. If the readable side of the socket is in flowing mode then there is no
|
|
3793
3443
|
// buffered data as everything has been already written and `readable.read()`
|
|
3794
3444
|
// will return `null`. If instead, the socket is paused, any possible buffered
|
|
3795
|
-
// data will be read as a single chunk
|
|
3445
|
+
// data will be read as a single chunk and emitted synchronously in a single
|
|
3446
|
+
// `'data'` event.
|
|
3796
3447
|
//
|
|
3797
|
-
|
|
3798
|
-
!this._readableState.endEmitted &&
|
|
3799
|
-
!websocket._closeFrameReceived &&
|
|
3800
|
-
!websocket._receiver._writableState.errorEmitted &&
|
|
3801
|
-
(chunk = websocket._socket.read()) !== null
|
|
3802
|
-
) {
|
|
3803
|
-
websocket._receiver.write(chunk);
|
|
3804
|
-
}
|
|
3805
|
-
|
|
3448
|
+
websocket._socket.read();
|
|
3806
3449
|
websocket._receiver.end();
|
|
3807
3450
|
|
|
3451
|
+
this.removeListener('data', socketOnData);
|
|
3808
3452
|
this[kWebSocket$1] = undefined;
|
|
3809
3453
|
|
|
3810
3454
|
clearTimeout(websocket._closeTimer);
|
|
@@ -3867,7 +3511,7 @@ const { Duplex } = require$$0__default$2["default"];
|
|
|
3867
3511
|
/**
|
|
3868
3512
|
* Emits the `'close'` event on a stream.
|
|
3869
3513
|
*
|
|
3870
|
-
* @param {Duplex}
|
|
3514
|
+
* @param {stream.Duplex} The stream.
|
|
3871
3515
|
* @private
|
|
3872
3516
|
*/
|
|
3873
3517
|
function emitClose$1(stream) {
|
|
@@ -3905,12 +3549,11 @@ function duplexOnError(err) {
|
|
|
3905
3549
|
*
|
|
3906
3550
|
* @param {WebSocket} ws The `WebSocket` to wrap
|
|
3907
3551
|
* @param {Object} [options] The options for the `Duplex` constructor
|
|
3908
|
-
* @return {Duplex} The duplex stream
|
|
3552
|
+
* @return {stream.Duplex} The duplex stream
|
|
3909
3553
|
* @public
|
|
3910
3554
|
*/
|
|
3911
3555
|
function createWebSocketStream(ws, options) {
|
|
3912
3556
|
let resumeOnReceiverDrain = true;
|
|
3913
|
-
let terminateOnDestroy = true;
|
|
3914
3557
|
|
|
3915
3558
|
function receiverOnDrain() {
|
|
3916
3559
|
if (resumeOnReceiverDrain) ws._socket.resume();
|
|
@@ -3944,16 +3587,6 @@ function createWebSocketStream(ws, options) {
|
|
|
3944
3587
|
ws.once('error', function error(err) {
|
|
3945
3588
|
if (duplex.destroyed) return;
|
|
3946
3589
|
|
|
3947
|
-
// Prevent `ws.terminate()` from being called by `duplex._destroy()`.
|
|
3948
|
-
//
|
|
3949
|
-
// - If the `'error'` event is emitted before the `'open'` event, then
|
|
3950
|
-
// `ws.terminate()` is a noop as no socket is assigned.
|
|
3951
|
-
// - Otherwise, the error is re-emitted by the listener of the `'error'`
|
|
3952
|
-
// event of the `Receiver` object. The listener already closes the
|
|
3953
|
-
// connection by calling `ws.close()`. This allows a close frame to be
|
|
3954
|
-
// sent to the other peer. If `ws.terminate()` is called right after this,
|
|
3955
|
-
// then the close frame might not be sent.
|
|
3956
|
-
terminateOnDestroy = false;
|
|
3957
3590
|
duplex.destroy(err);
|
|
3958
3591
|
});
|
|
3959
3592
|
|
|
@@ -3981,8 +3614,7 @@ function createWebSocketStream(ws, options) {
|
|
|
3981
3614
|
if (!called) callback(err);
|
|
3982
3615
|
process.nextTick(emitClose$1, duplex);
|
|
3983
3616
|
});
|
|
3984
|
-
|
|
3985
|
-
if (terminateOnDestroy) ws.terminate();
|
|
3617
|
+
ws.terminate();
|
|
3986
3618
|
};
|
|
3987
3619
|
|
|
3988
3620
|
duplex._final = function (callback) {
|
|
@@ -4014,10 +3646,7 @@ function createWebSocketStream(ws, options) {
|
|
|
4014
3646
|
};
|
|
4015
3647
|
|
|
4016
3648
|
duplex._read = function () {
|
|
4017
|
-
if (
|
|
4018
|
-
(ws.readyState === ws.OPEN || ws.readyState === ws.CLOSING) &&
|
|
4019
|
-
!resumeOnReceiverDrain
|
|
4020
|
-
) {
|
|
3649
|
+
if (ws.readyState === ws.OPEN && !resumeOnReceiverDrain) {
|
|
4021
3650
|
resumeOnReceiverDrain = true;
|
|
4022
3651
|
if (!ws._receiver._writableState.needDrain) ws._socket.resume();
|
|
4023
3652
|
}
|
|
@@ -4041,11 +3670,9 @@ function createWebSocketStream(ws, options) {
|
|
|
4041
3670
|
|
|
4042
3671
|
var stream = createWebSocketStream;
|
|
4043
3672
|
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
const
|
|
4047
|
-
const http = require$$2__default$1["default"];
|
|
4048
|
-
const { createHash } = require$$5__default["default"];
|
|
3673
|
+
const EventEmitter = require$$0__default$4["default"];
|
|
3674
|
+
const { createHash } = require$$0__default$3["default"];
|
|
3675
|
+
const { createServer, STATUS_CODES } = require$$2__default$1["default"];
|
|
4049
3676
|
|
|
4050
3677
|
const PerMessageDeflate = permessageDeflate;
|
|
4051
3678
|
const WebSocket$1 = websocket;
|
|
@@ -4054,10 +3681,6 @@ const { GUID, kWebSocket } = constants;
|
|
|
4054
3681
|
|
|
4055
3682
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
4056
3683
|
|
|
4057
|
-
const RUNNING = 0;
|
|
4058
|
-
const CLOSING = 1;
|
|
4059
|
-
const CLOSED = 2;
|
|
4060
|
-
|
|
4061
3684
|
/**
|
|
4062
3685
|
* Class representing a WebSocket server.
|
|
4063
3686
|
*
|
|
@@ -4081,8 +3704,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
4081
3704
|
* @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
|
|
4082
3705
|
* permessage-deflate
|
|
4083
3706
|
* @param {Number} [options.port] The port where to bind the server
|
|
4084
|
-
* @param {
|
|
4085
|
-
* server to use
|
|
3707
|
+
* @param {http.Server} [options.server] A pre-created HTTP/S server to use
|
|
4086
3708
|
* @param {Function} [options.verifyClient] A hook to reject connections
|
|
4087
3709
|
* @param {Function} [callback] A listener for the `listening` event
|
|
4088
3710
|
*/
|
|
@@ -4104,20 +3726,15 @@ class WebSocketServer extends EventEmitter {
|
|
|
4104
3726
|
...options
|
|
4105
3727
|
};
|
|
4106
3728
|
|
|
4107
|
-
if (
|
|
4108
|
-
(options.port == null && !options.server && !options.noServer) ||
|
|
4109
|
-
(options.port != null && (options.server || options.noServer)) ||
|
|
4110
|
-
(options.server && options.noServer)
|
|
4111
|
-
) {
|
|
3729
|
+
if (options.port == null && !options.server && !options.noServer) {
|
|
4112
3730
|
throw new TypeError(
|
|
4113
|
-
'One
|
|
4114
|
-
'must be specified'
|
|
3731
|
+
'One of the "port", "server", or "noServer" options must be specified'
|
|
4115
3732
|
);
|
|
4116
3733
|
}
|
|
4117
3734
|
|
|
4118
3735
|
if (options.port != null) {
|
|
4119
|
-
this._server =
|
|
4120
|
-
const body =
|
|
3736
|
+
this._server = createServer((req, res) => {
|
|
3737
|
+
const body = STATUS_CODES[426];
|
|
4121
3738
|
|
|
4122
3739
|
res.writeHead(426, {
|
|
4123
3740
|
'Content-Length': body.length,
|
|
@@ -4150,7 +3767,6 @@ class WebSocketServer extends EventEmitter {
|
|
|
4150
3767
|
if (options.perMessageDeflate === true) options.perMessageDeflate = {};
|
|
4151
3768
|
if (options.clientTracking) this.clients = new Set();
|
|
4152
3769
|
this.options = options;
|
|
4153
|
-
this._state = RUNNING;
|
|
4154
3770
|
}
|
|
4155
3771
|
|
|
4156
3772
|
/**
|
|
@@ -4180,14 +3796,6 @@ class WebSocketServer extends EventEmitter {
|
|
|
4180
3796
|
close(cb) {
|
|
4181
3797
|
if (cb) this.once('close', cb);
|
|
4182
3798
|
|
|
4183
|
-
if (this._state === CLOSED) {
|
|
4184
|
-
process.nextTick(emitClose, this);
|
|
4185
|
-
return;
|
|
4186
|
-
}
|
|
4187
|
-
|
|
4188
|
-
if (this._state === CLOSING) return;
|
|
4189
|
-
this._state = CLOSING;
|
|
4190
|
-
|
|
4191
3799
|
//
|
|
4192
3800
|
// Terminate all associated clients.
|
|
4193
3801
|
//
|
|
@@ -4205,7 +3813,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
4205
3813
|
// Close the http server if it was internally created.
|
|
4206
3814
|
//
|
|
4207
3815
|
if (this.options.port != null) {
|
|
4208
|
-
server.close(
|
|
3816
|
+
server.close(() => this.emit('close'));
|
|
4209
3817
|
return;
|
|
4210
3818
|
}
|
|
4211
3819
|
}
|
|
@@ -4235,8 +3843,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
4235
3843
|
* Handle a HTTP Upgrade request.
|
|
4236
3844
|
*
|
|
4237
3845
|
* @param {http.IncomingMessage} req The request object
|
|
4238
|
-
* @param {
|
|
4239
|
-
* server and client
|
|
3846
|
+
* @param {net.Socket} socket The network socket between the server and client
|
|
4240
3847
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
4241
3848
|
* @param {Function} cb Callback
|
|
4242
3849
|
* @public
|
|
@@ -4248,14 +3855,12 @@ class WebSocketServer extends EventEmitter {
|
|
|
4248
3855
|
req.headers['sec-websocket-key'] !== undefined
|
|
4249
3856
|
? req.headers['sec-websocket-key'].trim()
|
|
4250
3857
|
: false;
|
|
4251
|
-
const upgrade = req.headers.upgrade;
|
|
4252
3858
|
const version = +req.headers['sec-websocket-version'];
|
|
4253
3859
|
const extensions = {};
|
|
4254
3860
|
|
|
4255
3861
|
if (
|
|
4256
3862
|
req.method !== 'GET' ||
|
|
4257
|
-
upgrade
|
|
4258
|
-
upgrade.toLowerCase() !== 'websocket' ||
|
|
3863
|
+
req.headers.upgrade.toLowerCase() !== 'websocket' ||
|
|
4259
3864
|
!key ||
|
|
4260
3865
|
!keyRegex.test(key) ||
|
|
4261
3866
|
(version !== 8 && version !== 13) ||
|
|
@@ -4317,8 +3922,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
4317
3922
|
* @param {String} key The value of the `Sec-WebSocket-Key` header
|
|
4318
3923
|
* @param {Object} extensions The accepted extensions
|
|
4319
3924
|
* @param {http.IncomingMessage} req The request object
|
|
4320
|
-
* @param {
|
|
4321
|
-
* server and client
|
|
3925
|
+
* @param {net.Socket} socket The network socket between the server and client
|
|
4322
3926
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
4323
3927
|
* @param {Function} cb Callback
|
|
4324
3928
|
* @throws {Error} If called more than once with the same socket
|
|
@@ -4337,8 +3941,6 @@ class WebSocketServer extends EventEmitter {
|
|
|
4337
3941
|
);
|
|
4338
3942
|
}
|
|
4339
3943
|
|
|
4340
|
-
if (this._state > RUNNING) return abortHandshake(socket, 503);
|
|
4341
|
-
|
|
4342
3944
|
const digest = createHash('sha1')
|
|
4343
3945
|
.update(key + GUID)
|
|
4344
3946
|
.digest('base64');
|
|
@@ -4428,7 +4030,6 @@ function addListeners(server, map) {
|
|
|
4428
4030
|
* @private
|
|
4429
4031
|
*/
|
|
4430
4032
|
function emitClose(server) {
|
|
4431
|
-
server._state = CLOSED;
|
|
4432
4033
|
server.emit('close');
|
|
4433
4034
|
}
|
|
4434
4035
|
|
|
@@ -4444,7 +4045,7 @@ function socketOnError() {
|
|
|
4444
4045
|
/**
|
|
4445
4046
|
* Close the connection when preconditions are not fulfilled.
|
|
4446
4047
|
*
|
|
4447
|
-
* @param {
|
|
4048
|
+
* @param {net.Socket} socket The socket of the upgrade request
|
|
4448
4049
|
* @param {Number} code The HTTP response status code
|
|
4449
4050
|
* @param {String} [message] The HTTP response body
|
|
4450
4051
|
* @param {Object} [headers] Additional HTTP response headers
|
|
@@ -4452,7 +4053,7 @@ function socketOnError() {
|
|
|
4452
4053
|
*/
|
|
4453
4054
|
function abortHandshake(socket, code, message, headers) {
|
|
4454
4055
|
if (socket.writable) {
|
|
4455
|
-
message = message ||
|
|
4056
|
+
message = message || STATUS_CODES[code];
|
|
4456
4057
|
headers = {
|
|
4457
4058
|
Connection: 'close',
|
|
4458
4059
|
'Content-Type': 'text/html',
|
|
@@ -4461,7 +4062,7 @@ function abortHandshake(socket, code, message, headers) {
|
|
|
4461
4062
|
};
|
|
4462
4063
|
|
|
4463
4064
|
socket.write(
|
|
4464
|
-
`HTTP/1.1 ${code} ${
|
|
4065
|
+
`HTTP/1.1 ${code} ${STATUS_CODES[code]}\r\n` +
|
|
4465
4066
|
Object.keys(headers)
|
|
4466
4067
|
.map((h) => `${h}: ${headers[h]}`)
|
|
4467
4068
|
.join('\r\n') +
|
|
@@ -5890,17 +5491,6 @@ function options (optionsOptions, argv) {
|
|
|
5890
5491
|
});
|
|
5891
5492
|
}
|
|
5892
5493
|
|
|
5893
|
-
if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
5894
|
-
console.log(`Usage: fisk-monitor [options]
|
|
5895
|
-
|
|
5896
|
-
Options:
|
|
5897
|
-
--scheduler=URL Scheduler URL (default: ws://localhost:8097)
|
|
5898
|
-
--daemon-socket=PATH Daemon Unix socket path (default: ~/.cache/fisk/daemon/socket)
|
|
5899
|
-
|
|
5900
|
-
Config files: ~/.config/fisk/monitor.conf, /etc/xdg/fisk/monitor.conf
|
|
5901
|
-
Environment variables: FISK_MONITOR_SCHEDULER, etc.`);
|
|
5902
|
-
process.exit(0);
|
|
5903
|
-
}
|
|
5904
5494
|
const option = options({
|
|
5905
5495
|
prefix: "fisk/monitor",
|
|
5906
5496
|
noApplicationPath: true,
|
|
@@ -6143,29 +5733,23 @@ clientBox.on("select", (ev) => {
|
|
|
6143
5733
|
if (jobs) {
|
|
6144
5734
|
// clientBox.current = clientKey;
|
|
6145
5735
|
let str = "";
|
|
6146
|
-
const
|
|
6147
|
-
const
|
|
6148
|
-
const widest = [header[0].length + 1, header[1].length + 1];
|
|
5736
|
+
const data = [["Source file", "Builder", "Start time"]];
|
|
5737
|
+
const widest = [data[0][0].length + 1, data[0][1].length + 1];
|
|
6149
5738
|
const now = Date.now();
|
|
6150
5739
|
for (const [jobKey, jobValue] of jobs) {
|
|
6151
5740
|
if (jobKey === "total") {
|
|
6152
5741
|
continue;
|
|
6153
5742
|
}
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
ageMs
|
|
6162
|
-
};
|
|
6163
|
-
rows.push(row);
|
|
6164
|
-
widest[1] = Math.max(widest[1], row.builder.length + 1);
|
|
5743
|
+
widest[0] = Math.max(jobValue.sourceFile.length + 1, widest[0]);
|
|
5744
|
+
data.push([
|
|
5745
|
+
jobValue.sourceFile,
|
|
5746
|
+
jobValue.builder.ip + ":" + jobValue.builder.port,
|
|
5747
|
+
humanizeDuration(now - jobValue.time)
|
|
5748
|
+
]);
|
|
5749
|
+
widest[1] = Math.max(widest[1], data[data.length - 1][1].length + 1);
|
|
6165
5750
|
}
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
lines.forEach((line, idx) => {
|
|
5751
|
+
data.sort((a, b) => parseInt(a[2]) - parseInt(b[2]));
|
|
5752
|
+
data.forEach((line, idx) => {
|
|
6169
5753
|
if (!idx) {
|
|
6170
5754
|
str += "{bold}";
|
|
6171
5755
|
}
|
|
@@ -6304,13 +5888,7 @@ function notify(msg) {
|
|
|
6304
5888
|
return;
|
|
6305
5889
|
}
|
|
6306
5890
|
const notifyNow = (message) => {
|
|
6307
|
-
|
|
6308
|
-
notificationBox.setContent(message);
|
|
6309
|
-
}
|
|
6310
|
-
else {
|
|
6311
|
-
updateNotificationBar();
|
|
6312
|
-
return;
|
|
6313
|
-
}
|
|
5891
|
+
notificationBox.setContent(message || "");
|
|
6314
5892
|
screen.render();
|
|
6315
5893
|
};
|
|
6316
5894
|
notificationInterval = setInterval(() => {
|
|
@@ -6351,7 +5929,6 @@ function formatCell(str, num, prefix, suffix) {
|
|
|
6351
5929
|
return (prefix || "") + (" " + str).padEnd(num, " ").substr(0, num) + (suffix || "");
|
|
6352
5930
|
}
|
|
6353
5931
|
let updateTimer;
|
|
6354
|
-
let refreshTimer;
|
|
6355
5932
|
let timeout = 0;
|
|
6356
5933
|
function updateBuilderBox() {
|
|
6357
5934
|
const builderWidth = builderContainer.width - 3;
|
|
@@ -6432,14 +6009,11 @@ function updateBuilderBox() {
|
|
|
6432
6009
|
if (currentFocus !== builderBox) {
|
|
6433
6010
|
builderBox.scrollTo(0);
|
|
6434
6011
|
}
|
|
6435
|
-
if (refreshTimer) {
|
|
6436
|
-
clearTimeout(refreshTimer);
|
|
6437
|
-
}
|
|
6438
6012
|
if (newest < 60000) {
|
|
6439
|
-
|
|
6013
|
+
setTimeout(update, 1000);
|
|
6440
6014
|
}
|
|
6441
6015
|
else {
|
|
6442
|
-
|
|
6016
|
+
setTimeout(update, 60000);
|
|
6443
6017
|
}
|
|
6444
6018
|
}
|
|
6445
6019
|
function updateClientBox() {
|
|
@@ -6636,91 +6210,5 @@ function connect() {
|
|
|
6636
6210
|
setTimeout(connect, 1000);
|
|
6637
6211
|
});
|
|
6638
6212
|
}
|
|
6639
|
-
// --- Daemon connection for local slot info ---
|
|
6640
|
-
const DaemonJSON = 5;
|
|
6641
|
-
const DaemonJSONResponse = 12;
|
|
6642
|
-
const daemonSocketPath = String(option("daemon-socket", path__default["default"].join(require$$2__default["default"].homedir(), ".cache", "fisk", "daemon", "socket")));
|
|
6643
|
-
let daemonSlotsInfo;
|
|
6644
|
-
let daemonSocket;
|
|
6645
|
-
let daemonRecvBuffer = Buffer.alloc(0);
|
|
6646
|
-
function updateNotificationBar() {
|
|
6647
|
-
if (daemonSlotsInfo && daemonSlotsInfo.local.capacity > 0) {
|
|
6648
|
-
const local = daemonSlotsInfo.local;
|
|
6649
|
-
notificationBox.setContent(`{bold}Local:{/bold} ${local.active}/${local.capacity} active, ${local.total} total`);
|
|
6650
|
-
}
|
|
6651
|
-
else {
|
|
6652
|
-
notificationBox.setContent("");
|
|
6653
|
-
}
|
|
6654
|
-
screen.render();
|
|
6655
|
-
}
|
|
6656
|
-
function processDaemonMessage(json) {
|
|
6657
|
-
try {
|
|
6658
|
-
const msg = JSON.parse(json);
|
|
6659
|
-
if (msg.type === "slotsInfo") {
|
|
6660
|
-
daemonSlotsInfo = msg;
|
|
6661
|
-
updateNotificationBar();
|
|
6662
|
-
}
|
|
6663
|
-
}
|
|
6664
|
-
catch (e) {
|
|
6665
|
-
// ignore parse errors
|
|
6666
|
-
}
|
|
6667
|
-
}
|
|
6668
|
-
function processDaemonData() {
|
|
6669
|
-
while (daemonRecvBuffer.length > 0) {
|
|
6670
|
-
const type = daemonRecvBuffer[0];
|
|
6671
|
-
if (type === DaemonJSONResponse) {
|
|
6672
|
-
if (daemonRecvBuffer.length < 5) {
|
|
6673
|
-
break; // need more data for length header
|
|
6674
|
-
}
|
|
6675
|
-
const msgLen = daemonRecvBuffer.readUInt32BE(1);
|
|
6676
|
-
if (daemonRecvBuffer.length < 5 + msgLen) {
|
|
6677
|
-
break; // need more data for body
|
|
6678
|
-
}
|
|
6679
|
-
const json = daemonRecvBuffer.subarray(5, 5 + msgLen).toString("utf8");
|
|
6680
|
-
daemonRecvBuffer = daemonRecvBuffer.subarray(5 + msgLen);
|
|
6681
|
-
processDaemonMessage(json);
|
|
6682
|
-
}
|
|
6683
|
-
else {
|
|
6684
|
-
// Unknown single-byte message, skip it
|
|
6685
|
-
daemonRecvBuffer = daemonRecvBuffer.subarray(1);
|
|
6686
|
-
}
|
|
6687
|
-
}
|
|
6688
|
-
}
|
|
6689
|
-
function sendDaemonJSON(sock, obj) {
|
|
6690
|
-
const jsonBuf = Buffer.from(JSON.stringify(obj), "utf8");
|
|
6691
|
-
const header = Buffer.allocUnsafe(5);
|
|
6692
|
-
header.writeUInt8(DaemonJSON, 0);
|
|
6693
|
-
header.writeUInt32BE(jsonBuf.length, 1);
|
|
6694
|
-
sock.write(header);
|
|
6695
|
-
sock.write(jsonBuf);
|
|
6696
|
-
}
|
|
6697
|
-
function connectDaemon() {
|
|
6698
|
-
daemonSlotsInfo = undefined;
|
|
6699
|
-
daemonRecvBuffer = Buffer.alloc(0);
|
|
6700
|
-
daemonSocket = require$$3__default["default"].createConnection(daemonSocketPath);
|
|
6701
|
-
daemonSocket.on("connect", () => {
|
|
6702
|
-
assert__default["default"](daemonSocket);
|
|
6703
|
-
// Send PID (4 bytes, big-endian) as the daemon protocol requires
|
|
6704
|
-
const pidBuf = Buffer.allocUnsafe(4);
|
|
6705
|
-
pidBuf.writeUInt32BE(process.pid, 0);
|
|
6706
|
-
daemonSocket.write(pidBuf);
|
|
6707
|
-
// Subscribe to slot updates
|
|
6708
|
-
sendDaemonJSON(daemonSocket, { type: "subscribeSlots" });
|
|
6709
|
-
});
|
|
6710
|
-
daemonSocket.on("data", (data) => {
|
|
6711
|
-
daemonRecvBuffer = Buffer.concat([daemonRecvBuffer, data]);
|
|
6712
|
-
processDaemonData();
|
|
6713
|
-
});
|
|
6714
|
-
daemonSocket.on("error", () => {
|
|
6715
|
-
// Daemon may not be running, silently retry
|
|
6716
|
-
});
|
|
6717
|
-
daemonSocket.on("close", () => {
|
|
6718
|
-
daemonSocket = undefined;
|
|
6719
|
-
daemonSlotsInfo = undefined;
|
|
6720
|
-
updateNotificationBar();
|
|
6721
|
-
setTimeout(connectDaemon, 5000);
|
|
6722
|
-
});
|
|
6723
|
-
}
|
|
6724
6213
|
connect();
|
|
6725
|
-
connectDaemon();
|
|
6726
6214
|
//# sourceMappingURL=fisk-monitor.js.map
|