forked from Mirrors/doipjs
Compare commits
No commits in common. "fc5cd752dcaa49e1163cadc62e565cb834adf67f" and "fa57e7b538a394450e3f188723f61d4abc56d27d" have entirely different histories.
fc5cd752dc
...
fa57e7b538
13 changed files with 4914 additions and 7773 deletions
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
nodeLinker: node-modules
|
|
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
658
dist/doip.fetchers.js
vendored
658
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
658
dist/doip.fetchers.minimal.js
vendored
658
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
|
@ -15,7 +15,7 @@
|
||||||
"default": "./src/fetcher/index.minimal.js"
|
"default": "./src/fetcher/index.minimal.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.3.0",
|
"packageManager": "yarn@1.22.19",
|
||||||
"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",
|
||||||
|
|
|
@ -35,8 +35,7 @@ export const opts = {
|
||||||
privateKey: null
|
privateKey: null
|
||||||
},
|
},
|
||||||
irc: {
|
irc: {
|
||||||
nick: null,
|
nick: null
|
||||||
sasl: []
|
|
||||||
},
|
},
|
||||||
matrix: {
|
matrix: {
|
||||||
instance: null,
|
instance: null,
|
||||||
|
|
|
@ -59,25 +59,12 @@ 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,7 +130,6 @@ 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