Compare commits
3 Commits
7e3440af17
...
d2e154efd2
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | d2e154efd2 | |
Derrick Hammer | d1101d1bbe | |
Derrick Hammer | e94bcf4cb5 |
|
@ -11,7 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ctrl/irc": "2.1.0",
|
"@ctrl/irc": "2.1.0",
|
||||||
"@lumeweb/peer-discovery-irc": "git+https://git.lumeweb.com/LumeWeb/peer-discovery-irc.git",
|
"@lumeweb/peer-discovery-irc": "git+https://git.lumeweb.com/LumeWeb/peer-discovery-irc.git",
|
||||||
"libkmodule": "^0.2.46",
|
"libkmodule": "^0.2.53",
|
||||||
"streamx": "^2.13.2"
|
"streamx": "^2.13.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"cli-progress": "^3.11.2",
|
"cli-progress": "^3.11.2",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"esbuild": "^0.17.0",
|
"esbuild": "^0.17.2",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"read": "^2.0.0",
|
"read": "^2.0.0",
|
||||||
"string_decoder": "^1.3.0",
|
"string_decoder": "^1.3.0",
|
||||||
|
@ -36,7 +36,8 @@
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@ctrl/irc@2.1.0": "patches/@ctrl__irc@2.1.0.patch"
|
"@ctrl/irc@2.1.0": "patches/@ctrl__irc@2.1.0.patch",
|
||||||
|
"b4a@1.6.1": "patches/b4a@1.6.1.patch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
diff --git a/browser.js b/browser.js
|
||||||
|
index e07f78d17b7b4a2963e4f0062047cc96e6025f9e..a9f266a2644f3f8ebd0f6684b3e11a7519059851 100644
|
||||||
|
--- a/browser.js
|
||||||
|
+++ b/browser.js
|
||||||
|
@@ -3,6 +3,7 @@ const base64 = require('./lib/base64')
|
||||||
|
const hex = require('./lib/hex')
|
||||||
|
const utf8 = require('./lib/utf8')
|
||||||
|
const utf16le = require('./lib/utf16le')
|
||||||
|
+const Buffer = require('buffer').Buffer
|
||||||
|
|
||||||
|
const LE = new Uint8Array(Uint16Array.of(0xff).buffer)[0] === 0xff
|
||||||
|
|
||||||
|
diff --git a/index.js b/index.js
|
||||||
|
index a751d6b4d27c7dd903efbfdc87a98f61044a62b8..8bd32640afdcfbc475168d458c51f8b9162d1656 100644
|
||||||
|
--- a/index.js
|
||||||
|
+++ b/index.js
|
||||||
|
@@ -1,3 +1,5 @@
|
||||||
|
+const Buffer = require('buffer').Buffer
|
||||||
|
+
|
||||||
|
function isBuffer (value) {
|
||||||
|
return Buffer.isBuffer(value) || value instanceof Uint8Array
|
||||||
|
}
|
||||||
|
diff --git a/package.json b/package.json
|
||||||
|
index eb0f792709b27e66f26658054781b4099507b5ed..69c4ff39c48b0bdd5f0bc7ebbade517e7c5d76e4 100644
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -8,9 +8,6 @@
|
||||||
|
"index.js",
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
- "browser": {
|
||||||
|
- "./index.js": "./browser.js"
|
||||||
|
- },
|
||||||
|
"scripts": {
|
||||||
|
"test": "standard && brittle test/*.mjs"
|
||||||
|
},
|
|
@ -4,6 +4,9 @@ patchedDependencies:
|
||||||
'@ctrl/irc@2.1.0':
|
'@ctrl/irc@2.1.0':
|
||||||
hash: jf4eywzpsmufg67tj3fpgxwdgi
|
hash: jf4eywzpsmufg67tj3fpgxwdgi
|
||||||
path: patches/@ctrl__irc@2.1.0.patch
|
path: patches/@ctrl__irc@2.1.0.patch
|
||||||
|
b4a@1.6.1:
|
||||||
|
hash: fr4ta77ibyz2skijgsggfq2lxa
|
||||||
|
path: patches/b4a@1.6.1.patch
|
||||||
|
|
||||||
specifiers:
|
specifiers:
|
||||||
'@ctrl/irc': 2.1.0
|
'@ctrl/irc': 2.1.0
|
||||||
|
@ -16,9 +19,9 @@ specifiers:
|
||||||
buffer: ^6.0.3
|
buffer: ^6.0.3
|
||||||
cli-progress: ^3.11.2
|
cli-progress: ^3.11.2
|
||||||
crypto-browserify: ^3.12.0
|
crypto-browserify: ^3.12.0
|
||||||
esbuild: ^0.17.0
|
esbuild: ^0.17.2
|
||||||
events: ^3.3.0
|
events: ^3.3.0
|
||||||
libkmodule: ^0.2.46
|
libkmodule: ^0.2.53
|
||||||
read: ^2.0.0
|
read: ^2.0.0
|
||||||
streamx: ^2.13.2
|
streamx: ^2.13.2
|
||||||
string_decoder: ^1.3.0
|
string_decoder: ^1.3.0
|
||||||
|
@ -26,7 +29,7 @@ specifiers:
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ctrl/irc': 2.1.0_jf4eywzpsmufg67tj3fpgxwdgi
|
'@ctrl/irc': 2.1.0_jf4eywzpsmufg67tj3fpgxwdgi
|
||||||
'@lumeweb/peer-discovery-irc': git.lumeweb.com/LumeWeb/peer-discovery-irc/29c4d5f4f84f4331722b315f6ac5f9fdeea8968c
|
'@lumeweb/peer-discovery-irc': git.lumeweb.com/LumeWeb/peer-discovery-irc/175b9d318989f5d6eb90102a5e6848be798f73ac
|
||||||
libkmodule: 0.2.53
|
libkmodule: 0.2.53
|
||||||
streamx: 2.13.2
|
streamx: 2.13.2
|
||||||
|
|
||||||
|
@ -361,9 +364,10 @@ packages:
|
||||||
- debug
|
- debug
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/b4a/1.6.1:
|
/b4a/1.6.1_fr4ta77ibyz2skijgsggfq2lxa:
|
||||||
resolution: {integrity: sha512-AsKjNhz72yxteo/0EtQEiwkMUgk/tGmycXlbG4g3Ard2/ULtNLUykGOkeK0egmN27h0xMAhb76jYccW+XTBExA==}
|
resolution: {integrity: sha512-AsKjNhz72yxteo/0EtQEiwkMUgk/tGmycXlbG4g3Ard2/ULtNLUykGOkeK0egmN27h0xMAhb76jYccW+XTBExA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
patched: true
|
||||||
|
|
||||||
/base32-decode/1.0.0:
|
/base32-decode/1.0.0:
|
||||||
resolution: {integrity: sha512-KNWUX/R7wKenwE/G/qFMzGScOgVntOmbE27vvc6GrniDGYb6a5+qWcuoXl8WIOQL7q0TpK7nZDm1Y04Yi3Yn5g==}
|
resolution: {integrity: sha512-KNWUX/R7wKenwE/G/qFMzGScOgVntOmbE27vvc6GrniDGYb6a5+qWcuoXl8WIOQL7q0TpK7nZDm1Y04Yi3Yn5g==}
|
||||||
|
@ -1057,8 +1061,8 @@ packages:
|
||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
git.lumeweb.com/LumeWeb/peer-discovery-irc/29c4d5f4f84f4331722b315f6ac5f9fdeea8968c:
|
git.lumeweb.com/LumeWeb/peer-discovery-irc/175b9d318989f5d6eb90102a5e6848be798f73ac:
|
||||||
resolution: {commit: 29c4d5f4f84f4331722b315f6ac5f9fdeea8968c, repo: https://git.lumeweb.com/LumeWeb/peer-discovery-irc.git, type: git}
|
resolution: {commit: 175b9d318989f5d6eb90102a5e6848be798f73ac, repo: https://git.lumeweb.com/LumeWeb/peer-discovery-irc.git, type: git}
|
||||||
name: '@lumeweb/peer-discovery-irc'
|
name: '@lumeweb/peer-discovery-irc'
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -1066,7 +1070,7 @@ packages:
|
||||||
'@lumeweb/peer-discovery': git.lumeweb.com/LumeWeb/peer-discovery/d2bd926275103d60fdd3c7c432eae5c278f49261
|
'@lumeweb/peer-discovery': git.lumeweb.com/LumeWeb/peer-discovery/d2bd926275103d60fdd3c7c432eae5c278f49261
|
||||||
'@noble/ed25519': 1.7.1
|
'@noble/ed25519': 1.7.1
|
||||||
'@noble/hashes': 1.1.5
|
'@noble/hashes': 1.1.5
|
||||||
b4a: 1.6.1
|
b4a: 1.6.1_fr4ta77ibyz2skijgsggfq2lxa
|
||||||
json-stringify-deterministic: 1.0.8
|
json-stringify-deterministic: 1.0.8
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
@ -1077,5 +1081,5 @@ packages:
|
||||||
name: '@lumeweb/peer-discovery'
|
name: '@lumeweb/peer-discovery'
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
dependencies:
|
dependencies:
|
||||||
b4a: 1.6.1
|
b4a: 1.6.1_fr4ta77ibyz2skijgsggfq2lxa
|
||||||
dev: false
|
dev: false
|
||||||
|
|
|
@ -47,10 +47,10 @@ async function handleDiscover(aq: ActiveQuery): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ret = await DiscoveryIRC(
|
const ret = await DiscoveryIRC(aq.callerInput.pubkey, {
|
||||||
aq.callerInput.pubkey,
|
host: "liberta.casa",
|
||||||
aq.callerInput?.options
|
...aq.callerInput?.options,
|
||||||
);
|
});
|
||||||
|
|
||||||
aq.respond(ret);
|
aq.respond(ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue