Compare commits
3 Commits
2e1780e28f
...
21feb9fa17
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 21feb9fa17 | |
Derrick Hammer | c31eedd40d | |
Derrick Hammer | 2c3d15c734 |
2
build.js
2
build.js
|
@ -10,5 +10,5 @@ esbuild.buildSync({
|
|||
define: {
|
||||
global: "self",
|
||||
},
|
||||
inject: ["process.js"],
|
||||
inject: ["process.js", "polyfill.js"],
|
||||
});
|
||||
|
|
|
@ -15,9 +15,10 @@
|
|||
"dependencies": {
|
||||
"@lumeweb/hyperswarm-web": "git+https://git.lumeweb.com/LumeWeb/hyperswarm-web.git",
|
||||
"@noble/ed25519": "^1.7.3",
|
||||
"@peculiar/webcrypto": "^1.4.3",
|
||||
"b4a": "^1.6.3",
|
||||
"eventemitter2": "^6.4.9",
|
||||
"hyperswarm": "^4.3.7",
|
||||
"hyperswarm": "^4.4.0",
|
||||
"libkmodule": "^0.2.53",
|
||||
"libskynet": "^0.0.62",
|
||||
"noise-handshake": "^3.0.2",
|
||||
|
@ -28,7 +29,7 @@
|
|||
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||
"@rollup/plugin-typescript": "^8.5.0",
|
||||
"@screamingvoid/sodium-universal": "^0.1.1",
|
||||
"@scure/bip39": "^1.1.1",
|
||||
"@scure/bip39": "^1.2.0",
|
||||
"@skynetlabs/skynet-nodejs": "^2.9.0",
|
||||
"@types/b4a": "^1.6.0",
|
||||
"@types/jest": "^28.1.8",
|
||||
|
@ -41,7 +42,7 @@
|
|||
"jest": "^28.1.3",
|
||||
"jest-puppeteer": "^6.2.0",
|
||||
"libskynetnode": "^0.1.4",
|
||||
"prettier": "^2.8.4",
|
||||
"prettier": "^2.8.7",
|
||||
"process": "^0.11.10",
|
||||
"puppeteer": "^15.5.0",
|
||||
"random-number-csprng": "^1.0.2",
|
||||
|
@ -51,7 +52,7 @@
|
|||
"stream-browserify": "^3.0.0",
|
||||
"ts-loader": "^9.4.2",
|
||||
"typescript": "^4.9.5",
|
||||
"webpack": "^5.76.2",
|
||||
"webpack": "^5.77.0",
|
||||
"webpack-cli": "^4.10.0"
|
||||
},
|
||||
"browser": {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import { Crypto } from "@peculiar/webcrypto";
|
||||
|
||||
let globalCrypto = self.crypto;
|
||||
if (!globalCrypto.subtle) {
|
||||
let subtleCrypto = new Crypto().subtle;
|
||||
Object.defineProperty(globalCrypto, "subtle", {
|
||||
get() {
|
||||
return subtleCrypto;
|
||||
},
|
||||
});
|
||||
}
|
|
@ -359,7 +359,7 @@ async function handleListenConnections(aq: ActiveQuery) {
|
|||
};
|
||||
|
||||
const hookClose = () => {
|
||||
swarm.onceSelf("close", closeCb);
|
||||
swarmEvent?.once("close", closeCb);
|
||||
};
|
||||
|
||||
if (swarm.activeRelay) {
|
||||
|
|
Loading…
Reference in New Issue