@torrent-tv/proxy 2.107.88 → 2.107.89
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/package.json +2 -2
- package/scripts/install-native.sh +26 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@torrent-tv/proxy",
|
|
3
|
-
"version": "2.107.
|
|
3
|
+
"version": "2.107.89",
|
|
4
4
|
"description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"ffmpeg-static": "5.3.0",
|
|
47
47
|
"franc": "6.2.0",
|
|
48
48
|
"get-port": "7.2.0",
|
|
49
|
-
"node-datachannel": "0.
|
|
49
|
+
"node-datachannel": "0.33.6",
|
|
50
50
|
"parse-torrent": "11.0.24",
|
|
51
51
|
"uint8-util": "2.2.6",
|
|
52
52
|
"undici": "7.30.2",
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
2
|
+
# Checks that node-datachannel (WebRTC) loads and builds utp-native (our fork,
|
|
3
|
+
# uTP to peers) in an installed proxy. Every image that installs the proxy runs
|
|
4
|
+
# this one script after its install with `--ignore-scripts`
|
|
5
|
+
# (torrent-tv/meta#302).
|
|
6
6
|
#
|
|
7
7
|
# sh scripts/install-native.sh <package dir>
|
|
8
8
|
#
|
|
9
9
|
# <package dir> holds the installed proxy: its package.json and node_modules/.
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# runs in the package directory, never with --global.
|
|
10
|
+
# npm and node are taken from PATH, and every npm call runs in the package
|
|
11
|
+
# directory, never with --global.
|
|
13
12
|
|
|
14
13
|
set -eu
|
|
15
14
|
|
|
@@ -59,26 +58,26 @@ if [ "$major" -lt "$floor" ]; then
|
|
|
59
58
|
fi
|
|
60
59
|
echo "install-native: node v$version (floor $floor)"
|
|
61
60
|
|
|
62
|
-
# 2. node-datachannel
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
61
|
+
# 2. node-datachannel ships its binary as an optional per-platform npm package
|
|
62
|
+
# that `npm ci` installs by itself, so there is nothing to build or fetch here.
|
|
63
|
+
# The one fact this step needs is that this node loads the binding the install
|
|
64
|
+
# left, and only the package's own loader answers it. Without the binding the
|
|
65
|
+
# proxy has no WebRTC.
|
|
66
|
+
if ndc=$(node -e '
|
|
67
|
+
const fs = require("node:fs");
|
|
68
|
+
try {
|
|
69
|
+
const ndc = require("node-datachannel");
|
|
70
|
+
const version = JSON.parse(fs.readFileSync("node_modules/node-datachannel/package.json", "utf8")).version;
|
|
71
|
+
process.stdout.write(version + " " + ndc.getLibraryVersion());
|
|
72
|
+
} catch (error) {
|
|
73
|
+
process.stdout.write(String((error && error.message) || error).split("\n")[0]);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
'); then
|
|
77
|
+
echo "install-native: node-datachannel ${ndc% *}: binding loads (libdatachannel ${ndc#* })"
|
|
78
|
+
else
|
|
79
|
+
fatal "node-datachannel binding does not load: ${ndc:-no error message}"
|
|
80
|
+
fi
|
|
82
81
|
|
|
83
82
|
# 3. The proxy pins our utp-native fork through overrides.
|
|
84
83
|
spec=$(json_field package.json overrides utp-native)
|