@peer2peer/relay 0.1.1 → 0.1.2
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/dist/config.js +6 -2
- package/package.json +5 -2
package/dist/config.js
CHANGED
|
@@ -165,9 +165,13 @@ const CIRCLE_ID_RE = /^c_[a-z2-7]{26}$/;
|
|
|
165
165
|
* whatever the list, the circle or an invite says).
|
|
166
166
|
*/
|
|
167
167
|
export function parseAllowFile(text) {
|
|
168
|
+
// Every line ending (CRLF, CR, LF, U+2028, U+2029) ends a line, so a comment never swallows the lines after it.
|
|
168
169
|
const ids = text
|
|
169
|
-
.split(
|
|
170
|
-
.map((l) =>
|
|
170
|
+
.split(/\r\n|[\n\r\u2028\u2029]/)
|
|
171
|
+
.map((l) => {
|
|
172
|
+
const hash = l.indexOf("#");
|
|
173
|
+
return (hash >= 0 ? l.slice(0, hash) : l).trim();
|
|
174
|
+
})
|
|
171
175
|
.filter((l) => l !== "")
|
|
172
176
|
.flatMap((l) => l.split(ALLOW_SPLIT));
|
|
173
177
|
return { allow: ids.filter((x) => !x.startsWith("!")), deny: ids.filter((x) => x.startsWith("!")).map((x) => x.slice(1)) };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peer2peer/relay",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Peer2Peer v3 open relay: dumb store-and-forward for end-to-end encrypted envelopes, identity documents and device-link mailboxes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"peer2peer",
|
|
@@ -53,7 +53,10 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@noble/curves": "2.4.0",
|
|
56
|
-
"@peer2peer/core": "0.1.
|
|
56
|
+
"@peer2peer/core": "0.1.2",
|
|
57
57
|
"ws": "8.22.0"
|
|
58
|
+
},
|
|
59
|
+
"overrides": {
|
|
60
|
+
"minimatch": "^11.0.8"
|
|
58
61
|
}
|
|
59
62
|
}
|