@basmilius/apple-airplay 0.9.13 → 0.9.15
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/index.mjs +8 -8
- package/package.json +8 -7
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-DQk6qfdC.mjs";
|
|
2
2
|
import { randomBytes } from "node:crypto";
|
|
3
3
|
import { createSocket } from "node:dgram";
|
|
4
|
-
import { AccessoryPair, AccessoryVerify, Context,
|
|
4
|
+
import { AccessoryPair, AccessoryVerify, Context, EncryptionAwareConnection, HTTP_TIMEOUT, generateActiveRemoteId, generateDacpId, generateSessionId, getMacAddress, randomInt32, randomInt64, uint16ToBE, uuid } from "@basmilius/apple-common";
|
|
5
5
|
import { NTP, Plist, RTSP } from "@basmilius/apple-encoding";
|
|
6
6
|
import { Chacha20, hkdf } from "@basmilius/apple-encryption";
|
|
7
7
|
|
|
@@ -1430,7 +1430,7 @@ var BinaryReader = class {
|
|
|
1430
1430
|
function assertInt32(arg) {
|
|
1431
1431
|
if (typeof arg == "string") arg = Number(arg);
|
|
1432
1432
|
else if (typeof arg != "number") throw new Error("invalid int32: " + typeof arg);
|
|
1433
|
-
if (!Number.isInteger(arg) || arg >
|
|
1433
|
+
if (!Number.isInteger(arg) || arg > 2147483647 || arg < -2147483648) throw new Error("invalid int32: " + arg);
|
|
1434
1434
|
}
|
|
1435
1435
|
/**
|
|
1436
1436
|
* Assert a valid unsigned protobuf 32-bit integer as a number or string.
|
|
@@ -1438,7 +1438,7 @@ function assertInt32(arg) {
|
|
|
1438
1438
|
function assertUInt32(arg) {
|
|
1439
1439
|
if (typeof arg == "string") arg = Number(arg);
|
|
1440
1440
|
else if (typeof arg != "number") throw new Error("invalid uint32: " + typeof arg);
|
|
1441
|
-
if (!Number.isInteger(arg) || arg >
|
|
1441
|
+
if (!Number.isInteger(arg) || arg > 4294967295 || arg < 0) throw new Error("invalid uint32: " + arg);
|
|
1442
1442
|
}
|
|
1443
1443
|
/**
|
|
1444
1444
|
* Assert a valid protobuf float value as a number or string.
|
|
@@ -1449,7 +1449,7 @@ function assertFloat32(arg) {
|
|
|
1449
1449
|
arg = Number(arg);
|
|
1450
1450
|
if (Number.isNaN(arg) && o !== "NaN") throw new Error("invalid float32: " + o);
|
|
1451
1451
|
} else if (typeof arg != "number") throw new Error("invalid float32: " + typeof arg);
|
|
1452
|
-
if (Number.isFinite(arg) && (arg >
|
|
1452
|
+
if (Number.isFinite(arg) && (arg > 34028234663852886e22 || arg < -34028234663852886e22)) throw new Error("invalid float32: " + arg);
|
|
1453
1453
|
}
|
|
1454
1454
|
|
|
1455
1455
|
//#endregion
|
|
@@ -1502,18 +1502,18 @@ function checkScalarValue(value, scalar) {
|
|
|
1502
1502
|
case ScalarType.FLOAT:
|
|
1503
1503
|
if (typeof value != "number") return false;
|
|
1504
1504
|
if (Number.isNaN(value) || !Number.isFinite(value)) return true;
|
|
1505
|
-
if (value >
|
|
1505
|
+
if (value > 34028234663852886e22 || value < -34028234663852886e22) return `${value.toFixed()} out of range`;
|
|
1506
1506
|
return true;
|
|
1507
1507
|
case ScalarType.INT32:
|
|
1508
1508
|
case ScalarType.SFIXED32:
|
|
1509
1509
|
case ScalarType.SINT32:
|
|
1510
1510
|
if (typeof value !== "number" || !Number.isInteger(value)) return false;
|
|
1511
|
-
if (value >
|
|
1511
|
+
if (value > 2147483647 || value < -2147483648) return `${value.toFixed()} out of range`;
|
|
1512
1512
|
return true;
|
|
1513
1513
|
case ScalarType.FIXED32:
|
|
1514
1514
|
case ScalarType.UINT32:
|
|
1515
1515
|
if (typeof value !== "number" || !Number.isInteger(value)) return false;
|
|
1516
|
-
if (value >
|
|
1516
|
+
if (value > 4294967295 || value < 0) return `${value.toFixed()} out of range`;
|
|
1517
1517
|
return true;
|
|
1518
1518
|
case ScalarType.BOOL: return typeof value == "boolean";
|
|
1519
1519
|
case ScalarType.STRING:
|
|
@@ -10684,7 +10684,7 @@ function readVariant(buf, offset = 0) {
|
|
|
10684
10684
|
//#region src/baseStream.ts
|
|
10685
10685
|
var BaseStream = class extends EncryptionAwareConnection {
|
|
10686
10686
|
get #encryptionState() {
|
|
10687
|
-
return this
|
|
10687
|
+
return this._encryption;
|
|
10688
10688
|
}
|
|
10689
10689
|
decrypt(data) {
|
|
10690
10690
|
const result = [];
|
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.9.
|
|
4
|
+
"version": "0.9.15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -48,15 +48,16 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@basmilius/apple-common": "0.9.
|
|
52
|
-
"@basmilius/apple-encoding": "0.9.
|
|
53
|
-
"@basmilius/apple-encryption": "0.9.
|
|
51
|
+
"@basmilius/apple-common": "0.9.15",
|
|
52
|
+
"@basmilius/apple-encoding": "0.9.15",
|
|
53
|
+
"@basmilius/apple-encryption": "0.9.15"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@bufbuild/buf": "^1.66.
|
|
56
|
+
"@bufbuild/buf": "^1.66.1",
|
|
57
57
|
"@bufbuild/protobuf": "^2.11.0",
|
|
58
58
|
"@bufbuild/protoc-gen-es": "^2.11.0",
|
|
59
|
-
"@types/bun": "^1.3.
|
|
60
|
-
"
|
|
59
|
+
"@types/bun": "^1.3.11",
|
|
60
|
+
"@types/node": "^25.5.0",
|
|
61
|
+
"tsdown": "^0.21.4"
|
|
61
62
|
}
|
|
62
63
|
}
|