Skip to content

Commit 2e9f9f5

Browse files
chore: fixup vulnerabilities
1 parent 3bf5ff3 commit 2e9f9f5

File tree

3 files changed

+66
-65
lines changed

3 files changed

+66
-65
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
"author": "snoot69",
1515
"dependencies": {
1616
"@nebula-services/bare-server-node": "^2.0.4",
17-
"express": "^4.19.2",
17+
"express": "^4.21.0",
1818
"path": "^0.12.7",
19-
"serve-static": "^1.15.0",
2019
"simplebar": "^6.2.7",
2120
"wisp-server-node": "^1.1.7",
2221
"ws": "^8.18.0"

pnpm-lock.yaml

Lines changed: 49 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/index.html

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,21 @@
2020
if ('serviceWorker' in navigator) {
2121
await navigator.serviceWorker.register('/sw.js', {
2222
scope: '/sw/',
23-
}).then(updateTransport);
23+
}).then(() => {
24+
BareMux.registerRemoteListener(navigator.serviceWorker.controller);
25+
let transport = localStorage.getItem('transport') || "EpxMod.EpoxyClient"
26+
// Feel free to remove this, its just for skids to stop making issues on it
27+
if (window.location.origin.includes('.pages.dev')) {
28+
console.log('your static hosting, using TOMP Wisp Server.')
29+
let wispserver = "wss://tomp.app/wisp"
30+
BareMux.SetTransport(transport, { wisp: wispserver });
31+
} else {
32+
console.log('Using Backend Wisp Server, if your static hosting just delete these lines bellow and uncomment out the text bellow')
33+
//let wispserver = "wss://tomp.app/wisp" Uncomment if static hosting
34+
let wispserver = `${window.location.origin.replace(/^https?:\/\//, 'ws://')}/wisp/`
35+
BareMux.SetTransport(transport, { wisp: wispserver });
36+
}
37+
});
2438

2539
await navigator.serviceWorker.register('/dynsw.js', {
2640
scope: '/dyn/',
@@ -33,22 +47,6 @@
3347
window.location.reload()
3448
}
3549
})();
36-
37-
async function updateTransports() {
38-
BareMux.registerRemoteListener(navigator.serviceWorker.controller);
39-
let transport = localStorage.getItem('transport') || "EpxMod.EpoxyClient"
40-
// Feel free to remove this, its just for skids to stop making issues on it
41-
if (window.location.origin.includes('.pages.dev')) {
42-
console.log('your static hosting, using TOMP Wisp Server.')
43-
let wispserver = "wss://tomp.app/wisp"
44-
BareMux.SetTransport(transport, { wisp: wispserver });
45-
} else {
46-
console.log('Using Backend Wisp Server, if your static hosting just delete these lines bellow and uncomment out the text bellow')
47-
//let wispserver = "wss://tomp.app/wisp" Uncomment if static hosting
48-
let wispserver = `${window.location.origin.replace(/^https?:\/\//, 'ws://')}/wisp/`
49-
BareMux.SetTransport(transport, { wisp: wispserver });
50-
}
51-
}
5250
</script>
5351
</head>
5452
<body tabindex="-1" oncontextmenu="return false;" class="noSelect" id="no" data-notification="false">
@@ -307,4 +305,4 @@ <h5 class="timeT" id="time"></h5>
307305
<script src="https://unpkg.com/draggabilly@2.2.0/dist/draggabilly.pkgd.min.js"></script>
308306
<noscript style="position: absolute;">ENABLE JAVASCRIPT!! Thanks!</noscript>
309307
</body>
310-
</html>
308+
</html>

0 commit comments

Comments
 (0)