forked from Mirrors/doipjs
Compare commits
3 commits
prepare-ne
...
dev
Author | SHA1 | Date | |
---|---|---|---|
0f43a7b9e3 | |||
2153185729 | |||
a523ec4191 |
14 changed files with 7784 additions and 4920 deletions
BIN
.yarn/install-state.gz
Normal file
BIN
.yarn/install-state.gz
Normal file
Binary file not shown.
6
.yarnrc.yml
Normal file
6
.yarnrc.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
nodeLinker: node-modules
|
||||||
|
npmScopes:
|
||||||
|
myriation:
|
||||||
|
npmPublishRegistry: https://git.myriation.xyz/api/packages/myriation/npm/
|
||||||
|
npmAlwaysAuth: true
|
||||||
|
npmAuthToken: REPLACE-ME
|
643
dist/doip.core.js
vendored
643
dist/doip.core.js
vendored
File diff suppressed because it is too large
Load diff
4
dist/doip.core.min.js
vendored
4
dist/doip.core.min.js
vendored
File diff suppressed because one or more lines are too long
660
dist/doip.fetchers.js
vendored
660
dist/doip.fetchers.js
vendored
File diff suppressed because it is too large
Load diff
6
dist/doip.fetchers.min.js
vendored
6
dist/doip.fetchers.min.js
vendored
File diff suppressed because one or more lines are too long
660
dist/doip.fetchers.minimal.js
vendored
660
dist/doip.fetchers.minimal.js
vendored
File diff suppressed because it is too large
Load diff
6
dist/doip.fetchers.minimal.min.js
vendored
6
dist/doip.fetchers.minimal.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "doipjs",
|
"name": "@myriation/doipjs",
|
||||||
"version": "1.2.9",
|
"version": "1.2.9+myriaiton.1",
|
||||||
"description": "Decentralized Online Identity Proofs library in Node.js",
|
"description": "Decentralized Online Identity Proofs library in Node.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"default": "./src/fetcher/index.minimal.js"
|
"default": "./src/fetcher/index.minimal.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.19",
|
"packageManager": "yarn@4.3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@openpgp/hkp-client": "^0.0.3",
|
"@openpgp/hkp-client": "^0.0.3",
|
||||||
"@openpgp/wkd-client": "^0.0.4",
|
"@openpgp/wkd-client": "^0.0.4",
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codeberg.org/keyoxide/doipjs"
|
"url": "https://git.myriation.org/myriation/doipjs"
|
||||||
},
|
},
|
||||||
"homepage": "https://js.doip.rocks",
|
"homepage": "https://js.doip.rocks",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -22,4 +22,4 @@ limitations under the License.
|
||||||
* doip.js library version
|
* doip.js library version
|
||||||
* @constant {string}
|
* @constant {string}
|
||||||
*/
|
*/
|
||||||
export const version = '1.2.9'
|
export const version = '1.2.9+myriaiton.1'
|
||||||
|
|
|
@ -35,7 +35,8 @@ export const opts = {
|
||||||
privateKey: null
|
privateKey: null
|
||||||
},
|
},
|
||||||
irc: {
|
irc: {
|
||||||
nick: null
|
nick: null,
|
||||||
|
sasl: []
|
||||||
},
|
},
|
||||||
matrix: {
|
matrix: {
|
||||||
instance: null,
|
instance: null,
|
||||||
|
|
|
@ -59,12 +59,25 @@ export async function fn (data, opts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Add sasl-related config if the server matches
|
||||||
|
const matchedSaslConfig = opts.claims.irc.sasl.find(saslConfig => data.domain.match(new RegExp(saslConfig.domainRegex)) !== null)
|
||||||
|
const saslOptions = matchedSaslConfig
|
||||||
|
? {
|
||||||
|
sasl: true,
|
||||||
|
userName: matchedSaslConfig.username,
|
||||||
|
password: matchedSaslConfig.password
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
sasl: false
|
||||||
|
}
|
||||||
|
|
||||||
const client = new irc.Client(data.domain, opts.claims.irc.nick, {
|
const client = new irc.Client(data.domain, opts.claims.irc.nick, {
|
||||||
port: 6697,
|
port: 6697,
|
||||||
secure: true,
|
secure: true,
|
||||||
channels: [],
|
channels: [],
|
||||||
showErrors: false,
|
showErrors: false,
|
||||||
debug: false
|
debug: false,
|
||||||
|
...saslOptions
|
||||||
})
|
})
|
||||||
const reKey = /[a-zA-Z0-9\-_]+\s+:\s((?:openpgp4fpr|aspe):.*)/
|
const reKey = /[a-zA-Z0-9\-_]+\s+:\s((?:openpgp4fpr|aspe):.*)/
|
||||||
const reEnd = /End\sof\s.*\staxonomy./
|
const reEnd = /End\sof\s.*\staxonomy./
|
||||||
|
|
|
@ -130,6 +130,7 @@ import { PublicKeyType, PublicKeyEncoding, PublicKeyFetchMethod, ProxyPolicy, Cl
|
||||||
* Config related to the verification of IRC claims
|
* Config related to the verification of IRC claims
|
||||||
* @typedef {object} IrcClaimVerificationConfig
|
* @typedef {object} IrcClaimVerificationConfig
|
||||||
* @property {string} nick - The nick that the library uses to connect to the IRC server
|
* @property {string} nick - The nick that the library uses to connect to the IRC server
|
||||||
|
* @property {{ domainRegex: string; username: string; password: string; }[]} sasl - An array of possible SASL logins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue