freertc 0.1.21 → 0.1.23
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/README.md +1 -1
- package/bin/freertc.mjs +4 -6
- package/package.json +1 -1
- package/scripts/non-cloudflare-server.mjs +1 -1
- package/scripts/postinstall-message.mjs +6 -0
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -216,7 +216,7 @@ Quick checks:
|
|
|
216
216
|
Expected `/health` response includes JSON like:
|
|
217
217
|
|
|
218
218
|
```json
|
|
219
|
-
{"ok":true,"version":"0.1.
|
|
219
|
+
{"ok":true,"version":"0.1.23","protocol_version":"1.0","peers":0}
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
## Auto WebRTC two-tab test
|
package/bin/freertc.mjs
CHANGED
|
@@ -432,14 +432,12 @@ async function assertLatestCliForDeploy() {
|
|
|
432
432
|
try {
|
|
433
433
|
const latestVersion = await fetchLatestCliVersion();
|
|
434
434
|
if (compareVersions(CLI_VERSION, latestVersion) < 0) {
|
|
435
|
-
console.
|
|
436
|
-
console.
|
|
437
|
-
process.exit(1);
|
|
435
|
+
console.warn(`freertc ${CLI_VERSION} is older than npm latest ${latestVersion}.`);
|
|
436
|
+
console.warn('Continuing deploy with current CLI and enforcing live /health verification.');
|
|
438
437
|
}
|
|
439
438
|
} catch (error) {
|
|
440
|
-
console.
|
|
441
|
-
console.
|
|
442
|
-
process.exit(1);
|
|
439
|
+
console.warn(`Unable to verify freertc version before deploy: ${error?.message || String(error)}`);
|
|
440
|
+
console.warn('Continuing deploy anyway and relying on live /health verification.');
|
|
443
441
|
}
|
|
444
442
|
}
|
|
445
443
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
import { WebSocketServer } from 'ws';
|
|
8
8
|
|
|
9
9
|
const PSP_VERSION = '1.0';
|
|
10
|
-
const WORKER_VERSION = '0.1.
|
|
10
|
+
const WORKER_VERSION = '0.1.23';
|
|
11
11
|
const DEFAULT_TTL_MS = 30_000;
|
|
12
12
|
const MAX_TTL_MS = 120_000;
|
|
13
13
|
const MAX_MESSAGE_SIZE = 64 * 1024;
|
|
@@ -69,6 +69,12 @@ async function maybeSelfHealInstall() {
|
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
const localAheadOfRegistry = compareVersions(CLI_VERSION, latestVersion) > 0;
|
|
73
|
+
if (localAheadOfRegistry) {
|
|
74
|
+
console.log(`freertc postinstall detected local ${CLI_VERSION} ahead of npm latest ${latestVersion}; skipping self-heal to avoid downgrade.`);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
72
78
|
let dependencyRewritten = false;
|
|
73
79
|
for (const section of ['dependencies', 'devDependencies', 'optionalDependencies']) {
|
|
74
80
|
const table = hostPackage?.[section];
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const PSP_VERSION = "1.0";
|
|
2
|
-
const WORKER_VERSION = "0.1.
|
|
2
|
+
const WORKER_VERSION = "0.1.23";
|
|
3
3
|
|
|
4
4
|
const DISCOVERY_TYPES = new Set(["announce", "withdraw", "discover", "peer_list", "redirect"]);
|
|
5
5
|
const NEGOTIATION_TYPES = new Set(["connect_request", "connect_accept", "connect_reject", "offer", "answer", "ice_candidate", "ice_end", "renegotiate"]);
|