mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-14 19:41:16 +00:00
15 lines
481 B
JavaScript
15 lines
481 B
JavaScript
#!/usr/bin/env node
|
|
import * as polyfill from "werift";
|
|
import { main } from "./main";
|
|
|
|
const rtcPolyfillCtor = (polyfill as any).RTCPeerConnection;
|
|
if (typeof (globalThis as any).RTCPeerConnection === "undefined" && typeof rtcPolyfillCtor === "function") {
|
|
// Fill only the standard WebRTC global in Node CLI runtime.
|
|
(globalThis as any).RTCPeerConnection = rtcPolyfillCtor;
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(`[Fatal Error]`, error);
|
|
process.exit(1);
|
|
});
|