@basmilius/apple-airplay 0.6.11 → 0.7.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/dist/dataStream.d.ts +2 -2
- package/dist/index.js +9 -9
- package/package.json +6 -6
package/dist/dataStream.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export default class DataStream extends BaseStream<EventMap> {
|
|
|
28
28
|
constructor(context: Context, address: string, port: number);
|
|
29
29
|
disconnect(): Promise<void>;
|
|
30
30
|
exchange(message: Proto.ProtocolMessage | [Proto.ProtocolMessage, DescExtension]): Promise<Proto.ProtocolMessage>;
|
|
31
|
-
reply(seqno: bigint):
|
|
32
|
-
send(message: Proto.ProtocolMessage | [Proto.ProtocolMessage, DescExtension]):
|
|
31
|
+
reply(seqno: bigint): void;
|
|
32
|
+
send(message: Proto.ProtocolMessage | [Proto.ProtocolMessage, DescExtension]): void;
|
|
33
33
|
setup(sharedSecret: Buffer, seed: bigint): void;
|
|
34
34
|
}
|
package/dist/index.js
CHANGED
|
@@ -5158,7 +5158,7 @@ class ControlStream extends BaseStream {
|
|
|
5158
5158
|
this.#reject = reject;
|
|
5159
5159
|
this.#resolve = resolve;
|
|
5160
5160
|
this.#requestTimer = setTimeout(() => this.#handle(undefined, new Error("Request timed out")), timeout);
|
|
5161
|
-
|
|
5161
|
+
this.write(data);
|
|
5162
5162
|
});
|
|
5163
5163
|
}
|
|
5164
5164
|
#onClose() {
|
|
@@ -5241,15 +5241,15 @@ class DataStream extends BaseStream {
|
|
|
5241
5241
|
async exchange(message) {
|
|
5242
5242
|
return new Promise(async (resolve, reject) => {
|
|
5243
5243
|
this.#handler = [resolve, reject];
|
|
5244
|
-
|
|
5244
|
+
this.send(message);
|
|
5245
5245
|
});
|
|
5246
5246
|
}
|
|
5247
|
-
|
|
5247
|
+
reply(seqno) {
|
|
5248
5248
|
const rply = buildReply(seqno);
|
|
5249
5249
|
this.context.logger.raw("[data]", `Sending reply packet seqno=${seqno}`);
|
|
5250
|
-
|
|
5250
|
+
this.write(this.encrypt(rply));
|
|
5251
5251
|
}
|
|
5252
|
-
|
|
5252
|
+
send(message) {
|
|
5253
5253
|
let extension;
|
|
5254
5254
|
if (Array.isArray(message)) {
|
|
5255
5255
|
extension = message[1];
|
|
@@ -5269,7 +5269,7 @@ class DataStream extends BaseStream {
|
|
|
5269
5269
|
frame = this.encrypt(frame);
|
|
5270
5270
|
}
|
|
5271
5271
|
this.context.logger.raw("[data]", "Sending message.", message.type, extension ? getExtension(message, extension) : message);
|
|
5272
|
-
|
|
5272
|
+
this.write(frame);
|
|
5273
5273
|
}
|
|
5274
5274
|
setup(sharedSecret, seed) {
|
|
5275
5275
|
const readKey = hkdf({
|
|
@@ -5320,7 +5320,7 @@ class DataStream extends BaseStream {
|
|
|
5320
5320
|
if (command === "rply") {
|
|
5321
5321
|
this.context.logger.raw("[data]", "Received reply packet.");
|
|
5322
5322
|
} else if (command === "sync") {
|
|
5323
|
-
|
|
5323
|
+
this.reply(parseHeaderSeqno(header));
|
|
5324
5324
|
}
|
|
5325
5325
|
if (this.#handler) {
|
|
5326
5326
|
const [resolve] = this.#handler;
|
|
@@ -5335,7 +5335,7 @@ class DataStream extends BaseStream {
|
|
|
5335
5335
|
this.#handleMessage(message);
|
|
5336
5336
|
}
|
|
5337
5337
|
if (command === "sync") {
|
|
5338
|
-
|
|
5338
|
+
this.reply(parseHeaderSeqno(header));
|
|
5339
5339
|
}
|
|
5340
5340
|
}
|
|
5341
5341
|
} catch (err) {
|
|
@@ -5475,7 +5475,7 @@ class EventStream extends BaseStream {
|
|
|
5475
5475
|
if (this.isEncrypted) {
|
|
5476
5476
|
data = this.encrypt(data);
|
|
5477
5477
|
}
|
|
5478
|
-
|
|
5478
|
+
this.write(data);
|
|
5479
5479
|
}
|
|
5480
5480
|
setup(sharedSecret) {
|
|
5481
5481
|
const readKey = hkdf2({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basmilius/apple-airplay",
|
|
3
3
|
"description": "Implementation of Apple's AirPlay2 in Node.js.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@basmilius/apple-common": "0.
|
|
46
|
-
"@basmilius/apple-encoding": "0.
|
|
47
|
-
"@basmilius/apple-encryption": "0.
|
|
45
|
+
"@basmilius/apple-common": "0.7.1",
|
|
46
|
+
"@basmilius/apple-encoding": "0.7.1",
|
|
47
|
+
"@basmilius/apple-encryption": "0.7.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@basmilius/tools": "^2.
|
|
50
|
+
"@basmilius/tools": "^2.25.0",
|
|
51
51
|
"@bufbuild/buf": "^1.65.0",
|
|
52
52
|
"@bufbuild/protobuf": "^2.11.0",
|
|
53
53
|
"@bufbuild/protoc-gen-es": "^2.11.0",
|
|
54
|
-
"@types/bun": "^1.3.
|
|
54
|
+
"@types/bun": "^1.3.9"
|
|
55
55
|
}
|
|
56
56
|
}
|