@lynx-js/devtool-connector 0.19.0 → 0.19.1
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 +14 -0
- package/dist/{u.js → 0.js} +67 -55
- package/dist/2.js +1 -1
- package/dist/a.js +1 -1
- package/dist/h.js +43 -40
- package/dist/t.js +3 -2
- package/dist/transport/index.js +1 -1
- package/dist/transport/peertalk.d.ts +0 -3
- package/dist/ws-stream.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @lynx-js/devtool-connector
|
|
2
2
|
|
|
3
|
+
## 0.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependency `plist` to `^5.1.1`.
|
|
8
|
+
- Updated dependency `ws` to `^8.22.2`.
|
|
9
|
+
- Close subscribed daemon WebSocket sessions when forwarding a message to `DeviceConnection` fails, and preserve the target `transportId` in `Connector` clean-EOF diagnostics.
|
|
10
|
+
- Skip corrupt or stale per-device entries in `~/bdc_config` when loading `iOSBDCTransport` routes so valid BDC endpoints remain discoverable.
|
|
11
|
+
- Keep Peertalk frame buffering amortized when messages arrive in small fragments.
|
|
12
|
+
- Avoid disposing underlying Peertalk connections when `writable.abort()` runs while no write is in flight.
|
|
13
|
+
- Enable TCP keepalive on direct and proxied `createProxySocket` connections so intermediate NAT/proxy idle timeouts do not drop long-lived BDC tunnels.
|
|
14
|
+
- Simplify `PeertalkToMessageTransformStream` frame buffering and remove the unused `MessageToPeertalkTransformStream` class.
|
|
15
|
+
- Simplify `connectWithPeertalk` writer lifecycle and promise chaining in `transport/base.ts`.
|
|
16
|
+
|
|
3
17
|
## 0.19.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/{u.js → 0.js}
RENAMED
|
@@ -3,9 +3,9 @@ import "./f1.js";
|
|
|
3
3
|
import { createRequire as __rspack_createRequire } from "node:module";
|
|
4
4
|
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
5
5
|
__webpack_require__.add({
|
|
6
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
6
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/buffer-util.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
7
7
|
const { websocketMask, websocketUnmask } = __rspack_createRequire_require("http");
|
|
8
|
-
const { EMPTY_BUFFER } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
8
|
+
const { EMPTY_BUFFER } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
9
9
|
const FastBuffer = Buffer[Symbol.species];
|
|
10
10
|
function concat(list, totalLength) {
|
|
11
11
|
if (0 === list.length) return EMPTY_BUFFER;
|
|
@@ -70,7 +70,7 @@ __webpack_require__.add({
|
|
|
70
70
|
};
|
|
71
71
|
} catch (e) {}
|
|
72
72
|
},
|
|
73
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
73
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js" (module) {
|
|
74
74
|
const BINARY_TYPES = [
|
|
75
75
|
'nodebuffer',
|
|
76
76
|
'arraybuffer',
|
|
@@ -91,8 +91,8 @@ __webpack_require__.add({
|
|
|
91
91
|
NOOP: ()=>{}
|
|
92
92
|
};
|
|
93
93
|
},
|
|
94
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
95
|
-
const { kForOnEventAttribute, kListener } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
94
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/event-target.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
95
|
+
const { kForOnEventAttribute, kListener } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
96
96
|
const kCode = Symbol('kCode');
|
|
97
97
|
const kData = Symbol('kData');
|
|
98
98
|
const kError = Symbol('kError');
|
|
@@ -236,8 +236,8 @@ __webpack_require__.add({
|
|
|
236
236
|
else listener.call(thisArg, event);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
240
|
-
const { tokenChars } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
239
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/extension.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
240
|
+
const { tokenChars } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js");
|
|
241
241
|
function push(dest, name, elem) {
|
|
242
242
|
if (void 0 === dest[name]) dest[name] = [
|
|
243
243
|
elem
|
|
@@ -358,7 +358,7 @@ __webpack_require__.add({
|
|
|
358
358
|
parse
|
|
359
359
|
};
|
|
360
360
|
},
|
|
361
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
361
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/limiter.js" (module) {
|
|
362
362
|
const kDone = Symbol('kDone');
|
|
363
363
|
const kRun = Symbol('kRun');
|
|
364
364
|
class Limiter {
|
|
@@ -386,11 +386,11 @@ __webpack_require__.add({
|
|
|
386
386
|
}
|
|
387
387
|
module.exports = Limiter;
|
|
388
388
|
},
|
|
389
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
389
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
390
390
|
const zlib = __rspack_createRequire_require("zlib");
|
|
391
|
-
const bufferUtil = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
392
|
-
const Limiter = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
393
|
-
const { kStatusCode } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
391
|
+
const bufferUtil = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/buffer-util.js");
|
|
392
|
+
const Limiter = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/limiter.js");
|
|
393
|
+
const { kStatusCode } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
394
394
|
const FastBuffer = Buffer[Symbol.species];
|
|
395
395
|
const TRAILER = Buffer.from([
|
|
396
396
|
0x00,
|
|
@@ -595,12 +595,12 @@ __webpack_require__.add({
|
|
|
595
595
|
this[kCallback](err);
|
|
596
596
|
}
|
|
597
597
|
},
|
|
598
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
598
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/receiver.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
599
599
|
const { Writable } = __rspack_createRequire_require("stream");
|
|
600
|
-
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
601
|
-
const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
602
|
-
const { concat, toArrayBuffer, unmask } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
603
|
-
const { isValidStatusCode, isValidUTF8 } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
600
|
+
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js");
|
|
601
|
+
const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
602
|
+
const { concat, toArrayBuffer, unmask } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/buffer-util.js");
|
|
603
|
+
const { isValidStatusCode, isValidUTF8 } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js");
|
|
604
604
|
const FastBuffer = Buffer[Symbol.species];
|
|
605
605
|
const GET_INFO = 0;
|
|
606
606
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
@@ -822,6 +822,7 @@ __webpack_require__.add({
|
|
|
822
822
|
data = this.consume(this._payloadLength);
|
|
823
823
|
if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);
|
|
824
824
|
}
|
|
825
|
+
this._mask = void 0;
|
|
825
826
|
if (this._opcode > 0x07) return void this.controlMessage(data, cb);
|
|
826
827
|
if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
|
|
827
828
|
const error = this.createError(RangeError, 'Too many message fragments', false, 1008, 'WS_ERR_TOO_MANY_BUFFERED_PARTS');
|
|
@@ -952,14 +953,14 @@ __webpack_require__.add({
|
|
|
952
953
|
}
|
|
953
954
|
module.exports = Receiver;
|
|
954
955
|
},
|
|
955
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
956
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/sender.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
956
957
|
const { Duplex } = __rspack_createRequire_require("stream");
|
|
957
958
|
const { randomFillSync } = __rspack_createRequire_require("crypto");
|
|
958
959
|
const { types: { isUint8Array } } = __rspack_createRequire_require("util");
|
|
959
|
-
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
960
|
-
const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
961
|
-
const { isBlob, isValidStatusCode } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
962
|
-
const { mask: applyMask, toBuffer } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
960
|
+
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js");
|
|
961
|
+
const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
962
|
+
const { isBlob, isValidStatusCode } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js");
|
|
963
|
+
const { mask: applyMask, toBuffer } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/buffer-util.js");
|
|
963
964
|
const kByteLength = Symbol('kByteLength');
|
|
964
965
|
const maskBuffer = Buffer.alloc(4);
|
|
965
966
|
const RANDOM_POOL_SIZE = 8192;
|
|
@@ -1308,8 +1309,8 @@ __webpack_require__.add({
|
|
|
1308
1309
|
sender.onerror(err);
|
|
1309
1310
|
}
|
|
1310
1311
|
},
|
|
1311
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
1312
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1312
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/stream.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1313
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket.js");
|
|
1313
1314
|
const { Duplex } = __rspack_createRequire_require("stream");
|
|
1314
1315
|
function emitClose(stream) {
|
|
1315
1316
|
stream.emit('close');
|
|
@@ -1391,8 +1392,8 @@ __webpack_require__.add({
|
|
|
1391
1392
|
}
|
|
1392
1393
|
module.exports = createWebSocketStream;
|
|
1393
1394
|
},
|
|
1394
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
1395
|
-
const { tokenChars } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1395
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/subprotocol.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1396
|
+
const { tokenChars } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js");
|
|
1396
1397
|
function parse(header) {
|
|
1397
1398
|
const protocols = new Set();
|
|
1398
1399
|
let start = -1;
|
|
@@ -1423,9 +1424,9 @@ __webpack_require__.add({
|
|
|
1423
1424
|
parse
|
|
1424
1425
|
};
|
|
1425
1426
|
},
|
|
1426
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
1427
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1427
1428
|
const { isUtf8 } = __rspack_createRequire_require("buffer");
|
|
1428
|
-
const { hasBlob } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1429
|
+
const { hasBlob } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
1429
1430
|
const tokenChars = [
|
|
1430
1431
|
0,
|
|
1431
1432
|
0,
|
|
@@ -1595,16 +1596,16 @@ __webpack_require__.add({
|
|
|
1595
1596
|
};
|
|
1596
1597
|
} catch (e) {}
|
|
1597
1598
|
},
|
|
1598
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
1599
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket-server.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1599
1600
|
const EventEmitter = __rspack_createRequire_require("events");
|
|
1600
1601
|
const http = __rspack_createRequire_require("http");
|
|
1601
1602
|
const { Duplex } = __rspack_createRequire_require("stream");
|
|
1602
1603
|
const { createHash } = __rspack_createRequire_require("crypto");
|
|
1603
|
-
const extension = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1604
|
-
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1605
|
-
const subprotocol = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1606
|
-
const WebSocket = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1607
|
-
const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1604
|
+
const extension = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/extension.js");
|
|
1605
|
+
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js");
|
|
1606
|
+
const subprotocol = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/subprotocol.js");
|
|
1607
|
+
const WebSocket = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket.js");
|
|
1608
|
+
const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
1608
1609
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
1609
1610
|
const RUNNING = 0;
|
|
1610
1611
|
const CLOSING = 1;
|
|
@@ -1857,23 +1858,24 @@ __webpack_require__.add({
|
|
|
1857
1858
|
} else abortHandshake(socket, code, message, headers);
|
|
1858
1859
|
}
|
|
1859
1860
|
},
|
|
1860
|
-
"../../../node_modules/.pnpm/ws@8.22.
|
|
1861
|
+
"../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1861
1862
|
const EventEmitter = __rspack_createRequire_require("events");
|
|
1862
1863
|
const https = __rspack_createRequire_require("https");
|
|
1863
1864
|
const http = __rspack_createRequire_require("http");
|
|
1864
1865
|
const net = __rspack_createRequire_require("net");
|
|
1866
|
+
const querystring = __rspack_createRequire_require("querystring");
|
|
1865
1867
|
const tls = __rspack_createRequire_require("tls");
|
|
1866
1868
|
const { randomBytes, createHash } = __rspack_createRequire_require("crypto");
|
|
1867
1869
|
const { Duplex, Readable } = __rspack_createRequire_require("stream");
|
|
1868
1870
|
const { URL } = __rspack_createRequire_require("url");
|
|
1869
|
-
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1870
|
-
const Receiver = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1871
|
-
const Sender = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1872
|
-
const { isBlob } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1873
|
-
const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1874
|
-
const { EventTarget: { addEventListener, removeEventListener } } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1875
|
-
const { format, parse } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1876
|
-
const { toBuffer } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
1871
|
+
const PerMessageDeflate = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js");
|
|
1872
|
+
const Receiver = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/receiver.js");
|
|
1873
|
+
const Sender = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/sender.js");
|
|
1874
|
+
const { isBlob } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js");
|
|
1875
|
+
const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js");
|
|
1876
|
+
const { EventTarget: { addEventListener, removeEventListener } } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/event-target.js");
|
|
1877
|
+
const { format, parse } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/extension.js");
|
|
1878
|
+
const { toBuffer } = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/buffer-util.js");
|
|
1877
1879
|
const kAborted = Symbol('kAborted');
|
|
1878
1880
|
const protocolVersions = [
|
|
1879
1881
|
8,
|
|
@@ -2204,8 +2206,10 @@ __webpack_require__.add({
|
|
|
2204
2206
|
} catch {
|
|
2205
2207
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
2206
2208
|
}
|
|
2207
|
-
if ('http:' === parsedUrl.protocol
|
|
2208
|
-
|
|
2209
|
+
if ('http:' === parsedUrl.protocol || 'https:' === parsedUrl.protocol) {
|
|
2210
|
+
parsedUrl = new URL(parsedUrl);
|
|
2211
|
+
parsedUrl.protocol = 'http:' === parsedUrl.protocol ? 'ws:' : 'wss:';
|
|
2212
|
+
}
|
|
2209
2213
|
websocket._url = parsedUrl.href;
|
|
2210
2214
|
const isSecure = 'wss:' === parsedUrl.protocol;
|
|
2211
2215
|
const isIpcUrl = 'ws+unix:' === parsedUrl.protocol;
|
|
@@ -2256,7 +2260,11 @@ __webpack_require__.add({
|
|
|
2256
2260
|
}
|
|
2257
2261
|
if (opts.origin) if (opts.protocolVersion < 13) opts.headers['Sec-WebSocket-Origin'] = opts.origin;
|
|
2258
2262
|
else opts.headers.Origin = opts.origin;
|
|
2259
|
-
if (parsedUrl.username || parsedUrl.password)
|
|
2263
|
+
if (parsedUrl.username || parsedUrl.password) {
|
|
2264
|
+
const username = querystring.unescape(parsedUrl.username);
|
|
2265
|
+
const password = querystring.unescape(parsedUrl.password);
|
|
2266
|
+
opts.auth = `${username}:${password}`;
|
|
2267
|
+
}
|
|
2260
2268
|
if (isIpcUrl) {
|
|
2261
2269
|
const i = opts.path.indexOf(':');
|
|
2262
2270
|
if (-1 === i) {
|
|
@@ -2419,8 +2427,12 @@ __webpack_require__.add({
|
|
|
2419
2427
|
function receiverOnConclude(code, reason) {
|
|
2420
2428
|
const websocket = this[kWebSocket];
|
|
2421
2429
|
websocket._closeFrameReceived = true;
|
|
2422
|
-
websocket._closeMessage = reason;
|
|
2423
2430
|
websocket._closeCode = code;
|
|
2431
|
+
if (0 === reason.length) websocket._closeMessage = EMPTY_BUFFER;
|
|
2432
|
+
else {
|
|
2433
|
+
websocket._closeMessage = Buffer.allocUnsafeSlow(reason.length);
|
|
2434
|
+
websocket._closeMessage.set(reason);
|
|
2435
|
+
}
|
|
2424
2436
|
if (void 0 === websocket._socket[kWebSocket]) return;
|
|
2425
2437
|
websocket._socket.removeListener('data', socketOnData);
|
|
2426
2438
|
process.nextTick(resume, websocket._socket);
|
|
@@ -2515,11 +2527,11 @@ __webpack_require__.add({
|
|
|
2515
2527
|
}
|
|
2516
2528
|
}
|
|
2517
2529
|
});
|
|
2518
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2519
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2520
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2521
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2522
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2523
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2524
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2525
|
-
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
2530
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/stream.js");
|
|
2531
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/extension.js");
|
|
2532
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js");
|
|
2533
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/receiver.js");
|
|
2534
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/sender.js");
|
|
2535
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/subprotocol.js");
|
|
2536
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket.js");
|
|
2537
|
+
__webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket-server.js");
|
package/dist/2.js
CHANGED
|
@@ -1826,7 +1826,7 @@ const DAEMON_SHUTDOWN_PATH = `${DAEMON_WS_PATH}/shutdown`;
|
|
|
1826
1826
|
const DAEMON_INSPECTOR_PATH = `${DAEMON_WS_PATH}/inspector`;
|
|
1827
1827
|
const DAEMON_COMMAND_PATH_PREFIX = "/command/";
|
|
1828
1828
|
var package_namespaceObject = {
|
|
1829
|
-
rE: "0.19.
|
|
1829
|
+
rE: "0.19.1"
|
|
1830
1830
|
};
|
|
1831
1831
|
const CONNECTOR_VERSION = package_namespaceObject.rE;
|
|
1832
1832
|
const node_modules_semver = __webpack_require__("../../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/index.js");
|
package/dist/a.js
CHANGED
|
@@ -464,7 +464,7 @@ class Connector {
|
|
|
464
464
|
await outputStream.inputClosed;
|
|
465
465
|
if (response.done) {
|
|
466
466
|
options.signal?.throwIfAborted();
|
|
467
|
-
const clientId = ClientId.serialize(
|
|
467
|
+
const clientId = ClientId.serialize(options.transportId, options.deviceId, options.port);
|
|
468
468
|
throw new Error(`Transport ${transport.constructor.name} ended cleanly (EOF) while waiting for a response to ${request} on clientId: ${clientId}.`);
|
|
469
469
|
} else result = response.value;
|
|
470
470
|
} catch (err) {
|
package/dist/h.js
CHANGED
|
@@ -8425,7 +8425,7 @@ class PeertalkToMessageTransformStream extends web_TransformStream {
|
|
|
8425
8425
|
let end = 0;
|
|
8426
8426
|
const decoder = new TextDecoder();
|
|
8427
8427
|
super({
|
|
8428
|
-
transform
|
|
8428
|
+
transform (chunk, controller) {
|
|
8429
8429
|
const buffered = end - start;
|
|
8430
8430
|
if (buffer.length - end < chunk.length) if (buffered + chunk.length <= buffer.length) {
|
|
8431
8431
|
buffer.copyWithin(0, start, end);
|
|
@@ -8441,29 +8441,22 @@ class PeertalkToMessageTransformStream extends web_TransformStream {
|
|
|
8441
8441
|
buffer.set(chunk, end);
|
|
8442
8442
|
end += chunk.length;
|
|
8443
8443
|
while(end - start >= 20){
|
|
8444
|
-
const
|
|
8445
|
-
const len =
|
|
8444
|
+
const view = new DataView(buffer.buffer, buffer.byteOffset + start, 20);
|
|
8445
|
+
const len = view.getUint32(16);
|
|
8446
8446
|
if (end - start < 20 + len) break;
|
|
8447
8447
|
try {
|
|
8448
|
-
|
|
8449
|
-
} catch (
|
|
8450
|
-
|
|
8448
|
+
controller.enqueue(JSON.parse(decoder.decode(buffer.subarray(start + 20, start + 20 + len))));
|
|
8449
|
+
} catch (error) {
|
|
8450
|
+
controller.error(error);
|
|
8451
|
+
return;
|
|
8451
8452
|
}
|
|
8452
8453
|
start += 20 + len;
|
|
8453
|
-
if (start === end) {
|
|
8454
|
-
start = 0;
|
|
8455
|
-
end = 0;
|
|
8456
|
-
}
|
|
8457
8454
|
}
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
constructor(){
|
|
8464
|
-
super({
|
|
8465
|
-
transform (chunk, controller) {
|
|
8466
|
-
controller.enqueue(encodePeertalkMessage(chunk));
|
|
8455
|
+
if (start === end) {
|
|
8456
|
+
start = 0;
|
|
8457
|
+
end = 0;
|
|
8458
|
+
buffer = new Uint8Array(0);
|
|
8459
|
+
}
|
|
8467
8460
|
}
|
|
8468
8461
|
});
|
|
8469
8462
|
}
|
|
@@ -8485,22 +8478,19 @@ function encodePeertalkMessage(message) {
|
|
|
8485
8478
|
async function connectWithPeertalk(connectRaw, options, takeoverHDT = true) {
|
|
8486
8479
|
if (takeoverHDT) await takeoverDebugRouterLock();
|
|
8487
8480
|
const conn = await connectRaw(options);
|
|
8488
|
-
|
|
8489
|
-
|
|
8481
|
+
let rawWriter = conn.writable.getWriter();
|
|
8482
|
+
let writing = false;
|
|
8490
8483
|
let terminationPromise;
|
|
8491
|
-
let writerReleased = false;
|
|
8492
|
-
let pendingWrites = 0;
|
|
8493
8484
|
const releaseWriter = ()=>{
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
rawWriter.releaseLock();
|
|
8497
|
-
}
|
|
8485
|
+
rawWriter?.releaseLock();
|
|
8486
|
+
rawWriter = void 0;
|
|
8498
8487
|
};
|
|
8499
8488
|
const terminateConnection = (reason, abortIdleWriter = true)=>{
|
|
8500
8489
|
if (!terminationPromise) {
|
|
8501
|
-
const
|
|
8502
|
-
|
|
8503
|
-
|
|
8490
|
+
const writer = rawWriter;
|
|
8491
|
+
const shouldAbort = void 0 !== writer && (abortIdleWriter || writing);
|
|
8492
|
+
if (!shouldAbort) releaseWriter();
|
|
8493
|
+
const rawAbort = shouldAbort ? writer.abort(reason) : Promise.resolve();
|
|
8504
8494
|
const dispose = Promise.resolve().then(()=>conn[Symbol.asyncDispose]());
|
|
8505
8495
|
terminationPromise = rawAbort.then(()=>dispose, async (error)=>{
|
|
8506
8496
|
await dispose.catch(()=>{});
|
|
@@ -8511,24 +8501,31 @@ async function connectWithPeertalk(connectRaw, options, takeoverHDT = true) {
|
|
|
8511
8501
|
return terminationPromise;
|
|
8512
8502
|
};
|
|
8513
8503
|
const writable = new web_WritableStream({
|
|
8514
|
-
write (message, controller) {
|
|
8504
|
+
async write (message, controller) {
|
|
8515
8505
|
const signal = controller.signal;
|
|
8516
|
-
const abort = ()=>
|
|
8506
|
+
const abort = ()=>{
|
|
8507
|
+
if (writing) terminateConnection(signal.reason).catch(()=>{});
|
|
8508
|
+
};
|
|
8517
8509
|
signal.addEventListener("abort", abort, {
|
|
8518
8510
|
once: true
|
|
8519
8511
|
});
|
|
8520
|
-
|
|
8521
|
-
|
|
8512
|
+
writing = true;
|
|
8513
|
+
try {
|
|
8514
|
+
await rawWriter.write(encodePeertalkMessage(message));
|
|
8515
|
+
} catch (error) {
|
|
8522
8516
|
terminateConnection(error).catch(()=>{});
|
|
8523
8517
|
throw error;
|
|
8524
|
-
}
|
|
8525
|
-
|
|
8526
|
-
pendingWrites -= 1;
|
|
8518
|
+
} finally{
|
|
8519
|
+
writing = false;
|
|
8527
8520
|
signal.removeEventListener("abort", abort);
|
|
8528
|
-
}
|
|
8521
|
+
}
|
|
8529
8522
|
},
|
|
8530
8523
|
close: releaseWriter,
|
|
8531
8524
|
abort (reason) {
|
|
8525
|
+
if (!writing) {
|
|
8526
|
+
releaseWriter();
|
|
8527
|
+
return Promise.resolve();
|
|
8528
|
+
}
|
|
8532
8529
|
return terminateConnection(reason, true);
|
|
8533
8530
|
}
|
|
8534
8531
|
});
|
|
@@ -8537,7 +8534,7 @@ async function connectWithPeertalk(connectRaw, options, takeoverHDT = true) {
|
|
|
8537
8534
|
readable,
|
|
8538
8535
|
writable,
|
|
8539
8536
|
[Symbol.asyncDispose] () {
|
|
8540
|
-
return terminateConnection(
|
|
8537
|
+
return terminateConnection(new Error("Peertalk connection disposed"), false);
|
|
8541
8538
|
}
|
|
8542
8539
|
};
|
|
8543
8540
|
}
|
|
@@ -8845,6 +8842,10 @@ class DesktopTransport {
|
|
|
8845
8842
|
}
|
|
8846
8843
|
}
|
|
8847
8844
|
}
|
|
8845
|
+
function assertSafeKey(key) {
|
|
8846
|
+
if ('string' != typeof key) throw new Error(`Invalid plist dictionary key of type ${typeof key}`);
|
|
8847
|
+
if ('__proto__' === key) throw new Error('__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912');
|
|
8848
|
+
}
|
|
8848
8849
|
const EPOCH_2001 = 978307200000;
|
|
8849
8850
|
function readSizedInt(view, offset, size) {
|
|
8850
8851
|
switch(size){
|
|
@@ -8990,6 +8991,7 @@ function parseBinary(data) {
|
|
|
8990
8991
|
const keyRef = readRef(offset + i * objectRefSize);
|
|
8991
8992
|
const valRef = readRef(offset + (size + i) * objectRefSize);
|
|
8992
8993
|
const key = parseObject(keyRef);
|
|
8994
|
+
assertSafeKey(key);
|
|
8993
8995
|
dict[key] = parseObject(valRef);
|
|
8994
8996
|
}
|
|
8995
8997
|
return dict;
|
|
@@ -9051,6 +9053,7 @@ class OpenStepParser {
|
|
|
9051
9053
|
return obj;
|
|
9052
9054
|
}
|
|
9053
9055
|
const key = this.parseValue();
|
|
9056
|
+
assertSafeKey(key);
|
|
9054
9057
|
this.skipWhitespaceAndComments();
|
|
9055
9058
|
if (this.pos >= this.input.length || '=' !== this.input[this.pos]) throw new Error(`Expected '=' after key "${key}" at position ${this.pos}`);
|
|
9056
9059
|
this.pos++;
|
|
@@ -9483,4 +9486,4 @@ class iOSTransport {
|
|
|
9483
9486
|
throw new Error("Not implemented");
|
|
9484
9487
|
}
|
|
9485
9488
|
}
|
|
9486
|
-
export { AndroidTransport, DesktopTransport,
|
|
9489
|
+
export { AndroidTransport, DesktopTransport, PeertalkToMessageTransformStream, Usbmux, connectWithPeertalk, encodePeertalkMessage, iOSTransport };
|
package/dist/t.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
|
|
|
7
7
|
import node_zlib from "node:zlib";
|
|
8
8
|
import { Readable } from "node:stream";
|
|
9
9
|
import { pipeline } from "node:stream/promises";
|
|
10
|
-
import "./
|
|
10
|
+
import "./0.js";
|
|
11
11
|
import { ansi_createDebug, isCustomizedMessage, isRegisterEvent, DAEMON_VERSION_PATH, isListClientsRequest, DAEMON_SHUTDOWN_PATH, DAEMON_INSPECTOR_PATH, DAEMON_PRODUCT, isPingEvent, DAEMON_WS_PATH, DAEMON_COMMAND_PATH_PREFIX, isControlRequest, CONNECTOR_VERSION } from "./2.js";
|
|
12
12
|
import { isInitializeResponse } from "./hb.js";
|
|
13
13
|
import { decodeCommandQuery, ActionCore } from "./f.js";
|
|
@@ -419,7 +419,7 @@ class StaticServer {
|
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
const websocket_server = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
422
|
+
const websocket_server = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket-server.js");
|
|
423
423
|
const server_debug = ansi_createDebug("devtool-mcp-server:daemon:server");
|
|
424
424
|
const IDLE_TIMEOUT_MS = 300000;
|
|
425
425
|
const DEVICE_CONN_GRACE_MS = 30000;
|
|
@@ -982,6 +982,7 @@ class DevtoolDaemon {
|
|
|
982
982
|
});
|
|
983
983
|
} catch (err) {
|
|
984
984
|
server_debug("failed to forward message to %s: %O", deviceConn.key, err);
|
|
985
|
+
session.close(err);
|
|
985
986
|
}
|
|
986
987
|
return;
|
|
987
988
|
}
|
package/dist/transport/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AndroidTransport, DesktopTransport,
|
|
1
|
+
export { AndroidTransport, DesktopTransport, PeertalkToMessageTransformStream, Usbmux, connectWithPeertalk, encodePeertalkMessage, iOSTransport } from "../h.js";
|
|
2
2
|
export { DaemonTransport, HDTTransport, requireNumericPort, withTransports } from "../f1.js";
|
|
@@ -3,7 +3,4 @@ import type { CustomizedResponse, Response } from "../types.js";
|
|
|
3
3
|
export declare class PeertalkToMessageTransformStream<Output extends Response | CustomizedResponse = Response> extends TransformStream<Uint8Array, Output> {
|
|
4
4
|
constructor();
|
|
5
5
|
}
|
|
6
|
-
export declare class MessageToPeertalkTransformStream<TMessage = unknown> extends TransformStream<TMessage, Uint8Array> {
|
|
7
|
-
constructor();
|
|
8
|
-
}
|
|
9
6
|
export declare function encodePeertalkMessage(message: unknown): Uint8Array;
|
package/dist/ws-stream.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
2
|
import { ReadableStream, WritableStream } from "node:stream/web";
|
|
3
|
-
import "./
|
|
4
|
-
const websocket = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.
|
|
3
|
+
import "./0.js";
|
|
4
|
+
const websocket = __webpack_require__("../../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket.js");
|
|
5
5
|
function stringifyWebSocketData(data) {
|
|
6
6
|
return "string" == typeof data ? data : data.toString();
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/devtool-connector",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/lynx-community/skills.git",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"dprint": "^0.64.3",
|
|
61
61
|
"jpeg-js": "^0.4.4",
|
|
62
62
|
"obug": "^2.2.1",
|
|
63
|
-
"plist": "^5.1.
|
|
63
|
+
"plist": "^5.1.1",
|
|
64
64
|
"rsbuild-plugin-publint": "^1.0.0",
|
|
65
65
|
"semver": "^7.8.6",
|
|
66
66
|
"typescript": "^7.0.2",
|
|
67
|
-
"ws": "^8.22.
|
|
67
|
+
"ws": "^8.22.2"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
|
70
70
|
"node": ">=18.19"
|