migrate to pino for logging
This commit is contained in:
parent
dd26d8c752
commit
535368c386
|
@ -44,12 +44,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
["koa", "npm:2.13.1"],
|
["koa", "npm:2.13.1"],
|
||||||
["koa-body", "npm:4.2.0"],
|
["koa-body", "npm:4.2.0"],
|
||||||
["koa-helmet", "npm:6.0.0"],
|
["koa-helmet", "npm:6.0.0"],
|
||||||
["koa-logger", "npm:3.2.1"],
|
["koa-pino-logger", "npm:3.0.0"],
|
||||||
["koa-router", "npm:10.0.0"],
|
["koa-router", "npm:10.0.0"],
|
||||||
["koa2-ratelimit", "npm:0.9.0"],
|
["koa2-ratelimit", "npm:0.9.0"],
|
||||||
["md5", "npm:2.3.0"],
|
["md5", "npm:2.3.0"],
|
||||||
["microformats-parser", "npm:1.4.0"],
|
["microformats-parser", "npm:1.4.0"],
|
||||||
["mockdate", "npm:3.0.2"]
|
["mockdate", "npm:3.0.2"],
|
||||||
|
["pino", "npm:6.11.2"]
|
||||||
],
|
],
|
||||||
"linkType": "SOFT",
|
"linkType": "SOFT",
|
||||||
}]
|
}]
|
||||||
|
@ -1378,6 +1379,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
|
["atomic-sleep", [
|
||||||
|
["npm:1.0.0", {
|
||||||
|
"packageLocation": "./.yarn/cache/atomic-sleep-npm-1.0.0-17d8a762a3-2c6fa68caf.zip/node_modules/atomic-sleep/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["atomic-sleep", "npm:1.0.0"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
["aws-sign2", [
|
["aws-sign2", [
|
||||||
["npm:0.7.0", {
|
["npm:0.7.0", {
|
||||||
"packageLocation": "./.yarn/cache/aws-sign2-npm-0.7.0-656c6cb84d-7162b9b8fb.zip/node_modules/aws-sign2/",
|
"packageLocation": "./.yarn/cache/aws-sign2-npm-0.7.0-656c6cb84d-7162b9b8fb.zip/node_modules/aws-sign2/",
|
||||||
|
@ -2744,6 +2754,34 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
|
["fast-redact", [
|
||||||
|
["npm:3.0.0", {
|
||||||
|
"packageLocation": "./.yarn/cache/fast-redact-npm-3.0.0-cdc3023768-5a1a724f4b.zip/node_modules/fast-redact/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["fast-redact", "npm:3.0.0"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
|
["fast-safe-stringify", [
|
||||||
|
["npm:2.0.7", {
|
||||||
|
"packageLocation": "./.yarn/cache/fast-safe-stringify-npm-2.0.7-4c71091538-7bd2254326.zip/node_modules/fast-safe-stringify/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["fast-safe-stringify", "npm:2.0.7"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
|
["fast-url-parser", [
|
||||||
|
["npm:1.1.3", {
|
||||||
|
"packageLocation": "./.yarn/cache/fast-url-parser-npm-1.1.3-9be698120a-8dbc306b73.zip/node_modules/fast-url-parser/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["fast-url-parser", "npm:1.1.3"],
|
||||||
|
["punycode", "npm:1.4.1"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
["fast-xml-parser", [
|
["fast-xml-parser", [
|
||||||
["npm:3.19.0", {
|
["npm:3.19.0", {
|
||||||
"packageLocation": "./.yarn/cache/fast-xml-parser-npm-3.19.0-b7dcd3a31a-bac00722d0.zip/node_modules/fast-xml-parser/",
|
"packageLocation": "./.yarn/cache/fast-xml-parser-npm-3.19.0-b7dcd3a31a-bac00722d0.zip/node_modules/fast-xml-parser/",
|
||||||
|
@ -2795,6 +2833,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
|
["flatstr", [
|
||||||
|
["npm:1.0.12", {
|
||||||
|
"packageLocation": "./.yarn/cache/flatstr-npm-1.0.12-4311d37d16-2803767f91.zip/node_modules/flatstr/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["flatstr", "npm:1.0.12"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
["for-in", [
|
["for-in", [
|
||||||
["npm:1.0.2", {
|
["npm:1.0.2", {
|
||||||
"packageLocation": "./.yarn/cache/for-in-npm-1.0.2-37e3d7aae5-e8d7280a65.zip/node_modules/for-in/",
|
"packageLocation": "./.yarn/cache/for-in-npm-1.0.2-37e3d7aae5-e8d7280a65.zip/node_modules/for-in/",
|
||||||
|
@ -3244,15 +3291,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
["humanize-number", [
|
|
||||||
["npm:0.0.2", {
|
|
||||||
"packageLocation": "./.yarn/cache/humanize-number-npm-0.0.2-ac26ad7632-334f89e672.zip/node_modules/humanize-number/",
|
|
||||||
"packageDependencies": [
|
|
||||||
["humanize-number", "npm:0.0.2"]
|
|
||||||
],
|
|
||||||
"linkType": "HARD",
|
|
||||||
}]
|
|
||||||
]],
|
|
||||||
["iconv-lite", [
|
["iconv-lite", [
|
||||||
["npm:0.4.24", {
|
["npm:0.4.24", {
|
||||||
"packageLocation": "./.yarn/cache/iconv-lite-npm-0.4.24-c5c4ac6695-a9b9521066.zip/node_modules/iconv-lite/",
|
"packageLocation": "./.yarn/cache/iconv-lite-npm-0.4.24-c5c4ac6695-a9b9521066.zip/node_modules/iconv-lite/",
|
||||||
|
@ -4475,15 +4513,12 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
["koa-logger", [
|
["koa-pino-logger", [
|
||||||
["npm:3.2.1", {
|
["npm:3.0.0", {
|
||||||
"packageLocation": "./.yarn/cache/koa-logger-npm-3.2.1-c647362edb-0988b6894f.zip/node_modules/koa-logger/",
|
"packageLocation": "./.yarn/cache/koa-pino-logger-npm-3.0.0-5aa51196d2-6c22b4b56e.zip/node_modules/koa-pino-logger/",
|
||||||
"packageDependencies": [
|
"packageDependencies": [
|
||||||
["koa-logger", "npm:3.2.1"],
|
["koa-pino-logger", "npm:3.0.0"],
|
||||||
["bytes", "npm:3.1.0"],
|
["pino-http", "npm:5.5.0"]
|
||||||
["chalk", "npm:2.4.2"],
|
|
||||||
["humanize-number", "npm:0.0.2"],
|
|
||||||
["passthrough-counter", "npm:1.0.0"]
|
|
||||||
],
|
],
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
|
@ -5381,15 +5416,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
["passthrough-counter", [
|
|
||||||
["npm:1.0.0", {
|
|
||||||
"packageLocation": "./.yarn/cache/passthrough-counter-npm-1.0.0-cbb2a89ced-9ceface826.zip/node_modules/passthrough-counter/",
|
|
||||||
"packageDependencies": [
|
|
||||||
["passthrough-counter", "npm:1.0.0"]
|
|
||||||
],
|
|
||||||
"linkType": "HARD",
|
|
||||||
}]
|
|
||||||
]],
|
|
||||||
["path-exists", [
|
["path-exists", [
|
||||||
["npm:4.0.0", {
|
["npm:4.0.0", {
|
||||||
"packageLocation": "./.yarn/cache/path-exists-npm-4.0.0-e9e4f63eb0-6ab15000c5.zip/node_modules/path-exists/",
|
"packageLocation": "./.yarn/cache/path-exists-npm-4.0.0-e9e4f63eb0-6ab15000c5.zip/node_modules/path-exists/",
|
||||||
|
@ -5460,6 +5486,49 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
|
["pino", [
|
||||||
|
["npm:6.11.2", {
|
||||||
|
"packageLocation": "./.yarn/cache/pino-npm-6.11.2-b9cd6ecb15-e854d37d65.zip/node_modules/pino/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["pino", "npm:6.11.2"],
|
||||||
|
["fast-redact", "npm:3.0.0"],
|
||||||
|
["fast-safe-stringify", "npm:2.0.7"],
|
||||||
|
["flatstr", "npm:1.0.12"],
|
||||||
|
["pino-std-serializers", "npm:3.2.0"],
|
||||||
|
["quick-format-unescaped", "npm:4.0.1"],
|
||||||
|
["sonic-boom", "npm:1.4.1"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
|
["pino-http", [
|
||||||
|
["npm:5.5.0", {
|
||||||
|
"packageLocation": "./.yarn/cache/pino-http-npm-5.5.0-b7a5c37af1-6ee96d9e90.zip/node_modules/pino-http/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["pino-http", "npm:5.5.0"],
|
||||||
|
["fast-url-parser", "npm:1.1.3"],
|
||||||
|
["pino", "npm:6.11.2"],
|
||||||
|
["pino-std-serializers", "npm:2.5.0"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
|
["pino-std-serializers", [
|
||||||
|
["npm:2.5.0", {
|
||||||
|
"packageLocation": "./.yarn/cache/pino-std-serializers-npm-2.5.0-1e1542926e-c7605e6b9d.zip/node_modules/pino-std-serializers/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["pino-std-serializers", "npm:2.5.0"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}],
|
||||||
|
["npm:3.2.0", {
|
||||||
|
"packageLocation": "./.yarn/cache/pino-std-serializers-npm-3.2.0-9fd67503a4-fb386422f0.zip/node_modules/pino-std-serializers/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["pino-std-serializers", "npm:3.2.0"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
["pirates", [
|
["pirates", [
|
||||||
["npm:4.0.1", {
|
["npm:4.0.1", {
|
||||||
"packageLocation": "./.yarn/cache/pirates-npm-4.0.1-377058e8fc-21604008c3.zip/node_modules/pirates/",
|
"packageLocation": "./.yarn/cache/pirates-npm-4.0.1-377058e8fc-21604008c3.zip/node_modules/pirates/",
|
||||||
|
@ -5563,6 +5632,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
["punycode", [
|
["punycode", [
|
||||||
|
["npm:1.4.1", {
|
||||||
|
"packageLocation": "./.yarn/cache/punycode-npm-1.4.1-be4c23e6d2-5ce1e044ce.zip/node_modules/punycode/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["punycode", "npm:1.4.1"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}],
|
||||||
["npm:2.1.1", {
|
["npm:2.1.1", {
|
||||||
"packageLocation": "./.yarn/cache/punycode-npm-2.1.1-26eb3e15cf-0202dc191c.zip/node_modules/punycode/",
|
"packageLocation": "./.yarn/cache/punycode-npm-2.1.1-26eb3e15cf-0202dc191c.zip/node_modules/punycode/",
|
||||||
"packageDependencies": [
|
"packageDependencies": [
|
||||||
|
@ -5587,6 +5663,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
|
["quick-format-unescaped", [
|
||||||
|
["npm:4.0.1", {
|
||||||
|
"packageLocation": "./.yarn/cache/quick-format-unescaped-npm-4.0.1-54b775e975-0935e55e0a.zip/node_modules/quick-format-unescaped/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["quick-format-unescaped", "npm:4.0.1"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
["quick-lru", [
|
["quick-lru", [
|
||||||
["npm:5.1.1", {
|
["npm:5.1.1", {
|
||||||
"packageLocation": "./.yarn/cache/quick-lru-npm-5.1.1-e38e0edce3-fafb2b2fa1.zip/node_modules/quick-lru/",
|
"packageLocation": "./.yarn/cache/quick-lru-npm-5.1.1-e38e0edce3-fafb2b2fa1.zip/node_modules/quick-lru/",
|
||||||
|
@ -6098,12 +6183,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
["koa", "npm:2.13.1"],
|
["koa", "npm:2.13.1"],
|
||||||
["koa-body", "npm:4.2.0"],
|
["koa-body", "npm:4.2.0"],
|
||||||
["koa-helmet", "npm:6.0.0"],
|
["koa-helmet", "npm:6.0.0"],
|
||||||
["koa-logger", "npm:3.2.1"],
|
["koa-pino-logger", "npm:3.0.0"],
|
||||||
["koa-router", "npm:10.0.0"],
|
["koa-router", "npm:10.0.0"],
|
||||||
["koa2-ratelimit", "npm:0.9.0"],
|
["koa2-ratelimit", "npm:0.9.0"],
|
||||||
["md5", "npm:2.3.0"],
|
["md5", "npm:2.3.0"],
|
||||||
["microformats-parser", "npm:1.4.0"],
|
["microformats-parser", "npm:1.4.0"],
|
||||||
["mockdate", "npm:3.0.2"]
|
["mockdate", "npm:3.0.2"],
|
||||||
|
["pino", "npm:6.11.2"]
|
||||||
],
|
],
|
||||||
"linkType": "SOFT",
|
"linkType": "SOFT",
|
||||||
}]
|
}]
|
||||||
|
@ -6282,6 +6368,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
"linkType": "HARD",
|
"linkType": "HARD",
|
||||||
}]
|
}]
|
||||||
]],
|
]],
|
||||||
|
["sonic-boom", [
|
||||||
|
["npm:1.4.1", {
|
||||||
|
"packageLocation": "./.yarn/cache/sonic-boom-npm-1.4.1-e42b921f99-d681f4ef69.zip/node_modules/sonic-boom/",
|
||||||
|
"packageDependencies": [
|
||||||
|
["sonic-boom", "npm:1.4.1"],
|
||||||
|
["atomic-sleep", "npm:1.0.0"],
|
||||||
|
["flatstr", "npm:1.0.12"]
|
||||||
|
],
|
||||||
|
"linkType": "HARD",
|
||||||
|
}]
|
||||||
|
]],
|
||||||
["source-map", [
|
["source-map", [
|
||||||
["npm:0.5.7", {
|
["npm:0.5.7", {
|
||||||
"packageLocation": "./.yarn/cache/source-map-npm-0.5.7-7c3f035429-737face965.zip/node_modules/source-map/",
|
"packageLocation": "./.yarn/cache/source-map-npm-0.5.7-7c3f035429-737face965.zip/node_modules/source-map/",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"main": "src/serve.js",
|
"main": "src/serve.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
"dev": "node src/serve.js | pino-pretty",
|
||||||
"jam": "node src/serve.js"
|
"jam": "node src/serve.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -23,10 +24,11 @@
|
||||||
"koa": "^2.13.1",
|
"koa": "^2.13.1",
|
||||||
"koa-body": "^4.2.0",
|
"koa-body": "^4.2.0",
|
||||||
"koa-helmet": "^6.0.0",
|
"koa-helmet": "^6.0.0",
|
||||||
"koa-logger": "^3.2.1",
|
"koa-pino-logger": "^3.0.0",
|
||||||
"koa-router": "^10.0.0",
|
"koa-router": "^10.0.0",
|
||||||
"koa2-ratelimit": "^0.9.0",
|
"koa2-ratelimit": "^0.9.0",
|
||||||
"md5": "^2.3.0",
|
"md5": "^2.3.0",
|
||||||
"microformats-parser": "^1.4.0"
|
"microformats-parser": "^1.4.0",
|
||||||
|
"pino": "^6.11.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
const got = require('got')
|
const got = require('got')
|
||||||
const { mf2 } = require("microformats-parser");
|
const { mf2 } = require("microformats-parser")
|
||||||
|
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
const baseUrlOf = (url) => {
|
const baseUrlOf = (url) => {
|
||||||
if(url.match(/\//g).length <= 2) {
|
if(url.match(/\//g).length <= 2) {
|
||||||
|
@ -45,7 +47,7 @@ async function discover(target) {
|
||||||
type: webmention ? "webmention" : (pingback ? "pingback" : "unknown")
|
type: webmention ? "webmention" : (pingback ? "pingback" : "unknown")
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.warn(` -- whoops, failed to discover ${target}, why: ${err}`)
|
log.warn(err, ' -- whoops, failed to discover ${target}')
|
||||||
return { type: "unknown" }
|
return { type: "unknown" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
const webmentionReceiver = require('./../webmention/receive')
|
const webmentionReceiver = require('./../webmention/receive')
|
||||||
const config = require('./../config')
|
const config = require('./../config')
|
||||||
const parser = require("fast-xml-parser")
|
const parser = require("fast-xml-parser")
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See https://www.hixie.ch/specs/pingback/pingback#refsXMLRPC
|
See https://www.hixie.ch/specs/pingback/pingback#refsXMLRPC
|
||||||
|
@ -26,8 +27,17 @@ const isValidDomain = (url) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function xmlparse(body) {
|
||||||
|
try {
|
||||||
|
return parser.parse(body)
|
||||||
|
} catch(e) {
|
||||||
|
log.error('%s %s', 'fast-xml-parser was unable to parse the following body:', body)
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function validate(body) {
|
function validate(body) {
|
||||||
const xml = parser.parse(body)
|
const xml = xmlparse(body)
|
||||||
if(!xml) return false
|
if(!xml) return false
|
||||||
if(!xml.methodCall || xml.methodCall.methodName !== "pingback.ping") return false
|
if(!xml.methodCall || xml.methodCall.methodName !== "pingback.ping") return false
|
||||||
if(!xml.methodCall.params || !xml.methodCall.params.param || xml.methodCall.params.param.length !== 2) return false
|
if(!xml.methodCall.params || !xml.methodCall.params.param || xml.methodCall.params.param.length !== 2) return false
|
||||||
|
@ -39,13 +49,13 @@ function validate(body) {
|
||||||
// we treat a pingback as a webmention.
|
// we treat a pingback as a webmention.
|
||||||
// Wordpress pingback processing source: https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/pingback_ping/
|
// Wordpress pingback processing source: https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/pingback_ping/
|
||||||
async function receive(body) {
|
async function receive(body) {
|
||||||
const xml = parser.parse(body)
|
const xml = xmlparse(body)
|
||||||
const webmentionBody = {
|
const webmentionBody = {
|
||||||
source: xml.methodCall.params.param[0].value.string,
|
source: xml.methodCall.params.param[0].value.string,
|
||||||
target: xml.methodCall.params.param[1].value.string
|
target: xml.methodCall.params.param[1].value.string
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(` OK: looks like a valid pingback: \n\tsource ${webmentionBody.source}\n\ttarget ${webmentionBody.target}`)
|
log.info('%s %o', 'OK: looks like a valid pingback', webmentionBody)
|
||||||
await webmentionReceiver.receive(webmentionBody)
|
await webmentionReceiver.receive(webmentionBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
const pingbackReceiver = require('./receive')
|
const pingbackReceiver = require('./receive')
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
function success(msg) {
|
function success(msg) {
|
||||||
return `<?xml version="1.0" encoding="UTF-8"?>
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
@ -18,8 +19,7 @@ function success(msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function err(e) {
|
function err(e) {
|
||||||
console.error(` -- pingback receive went wrong: ${e}`)
|
log.error(e, 'pingback receive went wrong')
|
||||||
console.error(e)
|
|
||||||
return `<?xml version="1.0" encoding="UTF-8"?>
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<methodResponse>
|
<methodResponse>
|
||||||
<fault>
|
<fault>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
const got = require('got')
|
const got = require('got')
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
async function sendPingbackToEndpoint(endpoint, source, target) {
|
async function sendPingbackToEndpoint(endpoint, source, target) {
|
||||||
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
@ -22,7 +23,7 @@ async function sendPingbackToEndpoint(endpoint, source, target) {
|
||||||
methods: ["POST"]
|
methods: ["POST"]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(` OK: pingback@${endpoint}, sent: source ${source}, target ${target}`)
|
log.info(` OK: pingback@${endpoint}, sent: source ${source}, target ${target}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const Koa = require("koa");
|
const Koa = require("koa");
|
||||||
const Logger = require("koa-logger");
|
const pino = require('koa-pino-logger')()
|
||||||
|
const log = require('pino')()
|
||||||
const bodyParser = require('koa-body');
|
const bodyParser = require('koa-body');
|
||||||
const koaRouter = require("koa-router");
|
const koaRouter = require("koa-router");
|
||||||
const helmet = require("koa-helmet");
|
const helmet = require("koa-helmet");
|
||||||
|
@ -17,9 +18,7 @@ app.use(RateLimit.middleware({
|
||||||
max: 100
|
max: 100
|
||||||
}));
|
}));
|
||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
app.use(pino);
|
||||||
// TODO not sure what to do on error yet
|
|
||||||
app.use(Logger());
|
|
||||||
|
|
||||||
// enable ctx.request.body parsing for x-www-form-urlencoded webmentions etc
|
// enable ctx.request.body parsing for x-www-form-urlencoded webmentions etc
|
||||||
app.use(bodyParser({
|
app.use(bodyParser({
|
||||||
|
@ -36,6 +35,6 @@ config.setupDataDirs();
|
||||||
app.use(router.routes()).use(router.allowedMethods());
|
app.use(router.routes()).use(router.allowedMethods());
|
||||||
|
|
||||||
app.listen(config.port, config.host, () => {
|
app.listen(config.port, config.host, () => {
|
||||||
console.log(`Started localhost at port ${config.port}`)
|
log.info(`Started localhost at port ${config.port}`)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
dayjs.extend(utc)
|
dayjs.extend(utc)
|
||||||
|
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
function isValidUrl(url) {
|
function isValidUrl(url) {
|
||||||
return url !== undefined &&
|
return url !== undefined &&
|
||||||
(url.startsWith("http://") || url.startsWith("https://"))
|
(url.startsWith("http://") || url.startsWith("https://"))
|
||||||
|
@ -48,7 +50,7 @@ async function isValidTargetUrl(target) {
|
||||||
return true
|
return true
|
||||||
} catch(unknownTarget) {
|
} catch(unknownTarget) {
|
||||||
}
|
}
|
||||||
console.log(` ABORT: invalid target url`)
|
log.warn(` ABORT: invalid target url`)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +61,11 @@ function asPath(source, target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deletePossibleOlderWebmention(source, target) {
|
async function deletePossibleOlderWebmention(source, target) {
|
||||||
|
try {
|
||||||
await fsp.unlink(asPath(source, target))
|
await fsp.unlink(asPath(source, target))
|
||||||
|
} catch(e) {
|
||||||
|
// does not matter, file not there.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveWebmentionToDisk(source, target, mentiondata) {
|
async function saveWebmentionToDisk(source, target, mentiondata) {
|
||||||
|
@ -123,7 +129,7 @@ function parseBodyAsNonIndiewebSite(source, target, body) {
|
||||||
|
|
||||||
async function processSourceBody(body, source, target) {
|
async function processSourceBody(body, source, target) {
|
||||||
if(body.indexOf(target) === -1) {
|
if(body.indexOf(target) === -1) {
|
||||||
console.log(` ABORT: no mention of ${target} found in html src of source`)
|
log.warn(` ABORT: no mention of ${target} found in html src of source`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +142,7 @@ async function processSourceBody(body, source, target) {
|
||||||
|
|
||||||
const data = hEntry ? parseBodyAsIndiewebSite(source, target, hEntry) : parseBodyAsNonIndiewebSite(source, target, body)
|
const data = hEntry ? parseBodyAsIndiewebSite(source, target, hEntry) : parseBodyAsNonIndiewebSite(source, target, body)
|
||||||
await saveWebmentionToDisk(source, target, JSON.stringify(data))
|
await saveWebmentionToDisk(source, target, JSON.stringify(data))
|
||||||
console.log(` OK: webmention processed`)
|
log.info(` OK: webmention processed`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function receive(body) {
|
async function receive(body) {
|
||||||
|
@ -146,7 +152,7 @@ async function receive(body) {
|
||||||
try {
|
try {
|
||||||
src = await got(body.source)
|
src = await got(body.source)
|
||||||
} catch(unknownSource) {
|
} catch(unknownSource) {
|
||||||
console.log(` ABORT: invalid source url: ` + unknownSource)
|
log.warn(` ABORT: invalid source url: ` + unknownSource)
|
||||||
await deletePossibleOlderWebmention(body.source, body.target)
|
await deletePossibleOlderWebmention(body.source, body.target)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,15 @@ const webmentionReceiver = require('./receive')
|
||||||
const webmentionLoader = require('./loader')
|
const webmentionLoader = require('./loader')
|
||||||
const webmentionSender = require('./send')
|
const webmentionSender = require('./send')
|
||||||
|
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
function route(router) {
|
function route(router) {
|
||||||
router.post("webmention receive endpoint", "/webmention", async (ctx) => {
|
router.post("webmention receive endpoint", "/webmention", async (ctx) => {
|
||||||
if(!webmentionReceiver.validate(ctx.request)) {
|
if(!webmentionReceiver.validate(ctx.request)) {
|
||||||
ctx.throw(400, "malformed webmention request")
|
ctx.throw(400, "malformed webmention request")
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(` OK: looks like a valid webmention: \n\tsource ${ctx.request.body.source}\n\ttarget ${ctx.request.body.target}`)
|
log.info('%s %o', 'OK: looks like a valid webmention', ctx.request.body)
|
||||||
// we do NOT await this on purpose.
|
// we do NOT await this on purpose.
|
||||||
webmentionReceiver.receive(ctx.request.body)
|
webmentionReceiver.receive(ctx.request.body)
|
||||||
|
|
||||||
|
@ -23,7 +25,7 @@ function route(router) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const since = ctx.request.query?.since
|
const since = ctx.request.query?.since
|
||||||
console.log(` OK: someone wants to send mentions from domain ${ctx.params.domain} since ${since}`)
|
log.info(` OK: someone wants to send mentions from domain ${ctx.params.domain} since ${since}`)
|
||||||
// we do NOT await this on purpose.
|
// we do NOT await this on purpose.
|
||||||
webmentionSender.send(ctx.params.domain, since)
|
webmentionSender.send(ctx.params.domain, since)
|
||||||
|
|
||||||
|
@ -36,7 +38,7 @@ function route(router) {
|
||||||
ctx.throw(403, "access denied")
|
ctx.throw(403, "access denied")
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(` OK: someone wants a list of mentions at domain ${ctx.params.domain}`)
|
log.info(` OK: someone wants a list of mentions at domain ${ctx.params.domain}`)
|
||||||
const result = await webmentionLoader.load(ctx.params.domain)
|
const result = await webmentionLoader.load(ctx.params.domain)
|
||||||
|
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
|
|
|
@ -4,6 +4,8 @@ const { collect } = require('./rsslinkcollector')
|
||||||
const { discover } = require('./../linkdiscoverer')
|
const { discover } = require('./../linkdiscoverer')
|
||||||
const { sendPingbackToEndpoint } = require('./../pingback/send')
|
const { sendPingbackToEndpoint } = require('./../pingback/send')
|
||||||
|
|
||||||
|
const log = require('pino')()
|
||||||
|
|
||||||
async function sendWebmentionToEndpoint(endpoint, source, target) {
|
async function sendWebmentionToEndpoint(endpoint, source, target) {
|
||||||
await got.post(endpoint, {
|
await got.post(endpoint, {
|
||||||
contentType: "x-www-form-urlencoded",
|
contentType: "x-www-form-urlencoded",
|
||||||
|
@ -16,7 +18,7 @@ async function sendWebmentionToEndpoint(endpoint, source, target) {
|
||||||
methods: ["POST"]
|
methods: ["POST"]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(` OK: webmention@${endpoint}, sent: source ${source}, target ${target}`)
|
log.info(` OK: webmention@${endpoint}, sent: source ${source}, target ${target}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function mention(opts) {
|
async function mention(opts) {
|
||||||
|
|
136
yarn.lock
136
yarn.lock
|
@ -1069,6 +1069,13 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"atomic-sleep@npm:^1.0.0":
|
||||||
|
version: 1.0.0
|
||||||
|
resolution: "atomic-sleep@npm:1.0.0"
|
||||||
|
checksum: 2c6fa68cafef5ec1501245da00cde40b8f7ac71428bd727a923ea883b81ad643667a85677056cd663ad3ca584a49dbeb3a1bd4e6c70c1e9e36afd71b6e36ef96
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"aws-sign2@npm:~0.7.0":
|
"aws-sign2@npm:~0.7.0":
|
||||||
version: 0.7.0
|
version: 0.7.0
|
||||||
resolution: "aws-sign2@npm:0.7.0"
|
resolution: "aws-sign2@npm:0.7.0"
|
||||||
|
@ -1297,7 +1304,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"bytes@npm:3.1.0, bytes@npm:^3.1.0":
|
"bytes@npm:3.1.0":
|
||||||
version: 3.1.0
|
version: 3.1.0
|
||||||
resolution: "bytes@npm:3.1.0"
|
resolution: "bytes@npm:3.1.0"
|
||||||
checksum: c3f64645ef37922c8194fef88a052de2a28101882dfdf8a225493888c4941a26ea15164957e7492e5c5e3a8e98ee6276f4834efacb68e2d8ad4d91f903250b6c
|
checksum: c3f64645ef37922c8194fef88a052de2a28101882dfdf8a225493888c4941a26ea15164957e7492e5c5e3a8e98ee6276f4834efacb68e2d8ad4d91f903250b6c
|
||||||
|
@ -1397,7 +1404,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"chalk@npm:^2.0.0, chalk@npm:^2.4.2":
|
"chalk@npm:^2.0.0":
|
||||||
version: 2.4.2
|
version: 2.4.2
|
||||||
resolution: "chalk@npm:2.4.2"
|
resolution: "chalk@npm:2.4.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -2218,6 +2225,29 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"fast-redact@npm:^3.0.0":
|
||||||
|
version: 3.0.0
|
||||||
|
resolution: "fast-redact@npm:3.0.0"
|
||||||
|
checksum: 5a1a724f4b786c194117f322262440426a03996b1b8851b0e390392770ac2b6ab9037b2ef4b23d8eb7043cbdc7092b37926774a82f794f6179e9087fab44ee49
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"fast-safe-stringify@npm:^2.0.7":
|
||||||
|
version: 2.0.7
|
||||||
|
resolution: "fast-safe-stringify@npm:2.0.7"
|
||||||
|
checksum: 7bd22543263b707870d70c6f2336b6e8563e34d6807dc388cc0566895e31e0a8273af017a7eb1c9538d0ef54288284e1c0585b557bd856491295a847159fd929
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"fast-url-parser@npm:^1.1.3":
|
||||||
|
version: 1.1.3
|
||||||
|
resolution: "fast-url-parser@npm:1.1.3"
|
||||||
|
dependencies:
|
||||||
|
punycode: ^1.3.2
|
||||||
|
checksum: 8dbc306b736e32963fe4391a581401c422d826497ce5cacf6e7c60525febfbcea477fbc5b012fe3316f6634a20fa00882168c5ed792ff3ef904c5bc6a11a598d
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"fast-xml-parser@npm:^3.19.0":
|
"fast-xml-parser@npm:^3.19.0":
|
||||||
version: 3.19.0
|
version: 3.19.0
|
||||||
resolution: "fast-xml-parser@npm:3.19.0"
|
resolution: "fast-xml-parser@npm:3.19.0"
|
||||||
|
@ -2267,6 +2297,13 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"flatstr@npm:^1.0.12":
|
||||||
|
version: 1.0.12
|
||||||
|
resolution: "flatstr@npm:1.0.12"
|
||||||
|
checksum: 2803767f91887ffd60ac2aac0d6ccf2dd9e2d8f216628a73e3f525d5b5bfa4ac9a5b57334a4c1e6d5622f92f440c52562f7ca9719ace9d025d6c5b7a1a1579db
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"for-in@npm:^1.0.2":
|
"for-in@npm:^1.0.2":
|
||||||
version: 1.0.2
|
version: 1.0.2
|
||||||
resolution: "for-in@npm:1.0.2"
|
resolution: "for-in@npm:1.0.2"
|
||||||
|
@ -2668,13 +2705,6 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"humanize-number@npm:0.0.2":
|
|
||||||
version: 0.0.2
|
|
||||||
resolution: "humanize-number@npm:0.0.2"
|
|
||||||
checksum: 334f89e67241a2c163ee8c98382e958289052ba87c4dd8ebf553e03803964d89dd9609a0027f46c819ce1e31be7b2a49e2c526f6f9cf4df1b8dfb26908176f60
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"iconv-lite@npm:0.4.24":
|
"iconv-lite@npm:0.4.24":
|
||||||
version: 0.4.24
|
version: 0.4.24
|
||||||
resolution: "iconv-lite@npm:0.4.24"
|
resolution: "iconv-lite@npm:0.4.24"
|
||||||
|
@ -3748,15 +3778,12 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"koa-logger@npm:^3.2.1":
|
"koa-pino-logger@npm:^3.0.0":
|
||||||
version: 3.2.1
|
version: 3.0.0
|
||||||
resolution: "koa-logger@npm:3.2.1"
|
resolution: "koa-pino-logger@npm:3.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
bytes: ^3.1.0
|
pino-http: ^5.0.1
|
||||||
chalk: ^2.4.2
|
checksum: 6c22b4b56eb4a6f36401b09bbb2d4a7c4906a42ef616e1d45bfe6e4a78f476e9e163436aef6f682251c8fdef1d15f4eb2c4801e8e3847100e8bc31c6c0f8ba70
|
||||||
humanize-number: 0.0.2
|
|
||||||
passthrough-counter: ^1.0.0
|
|
||||||
checksum: 0988b6894f48852115d30d57ac5fc4e71f699ae0bcff401f23435792c407f7bb4a33d2316a40a649a345a83f0ff7af70bf52ca69bf5c705c718c9c6d993b1f1a
|
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -4560,13 +4587,6 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"passthrough-counter@npm:^1.0.0":
|
|
||||||
version: 1.0.0
|
|
||||||
resolution: "passthrough-counter@npm:1.0.0"
|
|
||||||
checksum: 9ceface826d03f7bad287fbdfcaaa332f778cb127bc50f8d3cf2f11b74f17f78a0d60638c59e1aaf7bc0e6835417aaba74eb4606ca83504b721028687b957420
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"path-exists@npm:^4.0.0":
|
"path-exists@npm:^4.0.0":
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
resolution: "path-exists@npm:4.0.0"
|
resolution: "path-exists@npm:4.0.0"
|
||||||
|
@ -4623,6 +4643,47 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"pino-http@npm:^5.0.1":
|
||||||
|
version: 5.5.0
|
||||||
|
resolution: "pino-http@npm:5.5.0"
|
||||||
|
dependencies:
|
||||||
|
fast-url-parser: ^1.1.3
|
||||||
|
pino: ^6.0.0
|
||||||
|
pino-std-serializers: ^2.4.0
|
||||||
|
checksum: 6ee96d9e9036bf11a1a03646b28f58fc30ece6524d4035a498e3c8ff4988192fdc6f297ab739753cc889f70aca7fd578343fc18d514ef823f54dd25a89a6cb45
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"pino-std-serializers@npm:^2.4.0":
|
||||||
|
version: 2.5.0
|
||||||
|
resolution: "pino-std-serializers@npm:2.5.0"
|
||||||
|
checksum: c7605e6b9dd3b2e6898059da0bca93277ed9139f0b884d9f7c922f22f011ba4a930389a71728e7c682ee5c3bf786aa67a90f10b1eb8eadc0467c5b78883a43bc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"pino-std-serializers@npm:^3.1.0":
|
||||||
|
version: 3.2.0
|
||||||
|
resolution: "pino-std-serializers@npm:3.2.0"
|
||||||
|
checksum: fb386422f018951ecdaf241b76554d6149928e9dd5c89d1bc12100d61d7f14b140fcbbfcf9203921b21cda05cc3eab2499289fe272358d50836627ccda15f5ec
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"pino@npm:^6.0.0, pino@npm:^6.11.2":
|
||||||
|
version: 6.11.2
|
||||||
|
resolution: "pino@npm:6.11.2"
|
||||||
|
dependencies:
|
||||||
|
fast-redact: ^3.0.0
|
||||||
|
fast-safe-stringify: ^2.0.7
|
||||||
|
flatstr: ^1.0.12
|
||||||
|
pino-std-serializers: ^3.1.0
|
||||||
|
quick-format-unescaped: 4.0.1
|
||||||
|
sonic-boom: ^1.0.2
|
||||||
|
bin:
|
||||||
|
pino: ./bin.js
|
||||||
|
checksum: e854d37d659080c6f96c4030a279b44a25cc1550b8ca6aee0c9a62420773c2771090cfec96587aa917d4c82a2d1744d52e63d9d9135d4c410f9d30438069a013
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"pirates@npm:^4.0.1":
|
"pirates@npm:^4.0.1":
|
||||||
version: 4.0.1
|
version: 4.0.1
|
||||||
resolution: "pirates@npm:4.0.1"
|
resolution: "pirates@npm:4.0.1"
|
||||||
|
@ -4711,6 +4772,13 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"punycode@npm:^1.3.2":
|
||||||
|
version: 1.4.1
|
||||||
|
resolution: "punycode@npm:1.4.1"
|
||||||
|
checksum: 5ce1e044cee2b12f1c65ccd523d7e71d6578f2c77f5c21c2e7a9d588535559c9508571d42638c131dab93cbe9a7b37bce1a7475d43fc8236c99dfe1efc36cfa5
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"punycode@npm:^2.1.0, punycode@npm:^2.1.1":
|
"punycode@npm:^2.1.0, punycode@npm:^2.1.1":
|
||||||
version: 2.1.1
|
version: 2.1.1
|
||||||
resolution: "punycode@npm:2.1.1"
|
resolution: "punycode@npm:2.1.1"
|
||||||
|
@ -4732,6 +4800,13 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"quick-format-unescaped@npm:4.0.1":
|
||||||
|
version: 4.0.1
|
||||||
|
resolution: "quick-format-unescaped@npm:4.0.1"
|
||||||
|
checksum: 0935e55e0aaaf789baa080768e822694bc0a497a3170fd35bf2b1aee2a953cf3b5a24e9d29a70dbe7bdc72534c6e1be917ab5c599d587ce0425c98293d8cc1c7
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"quick-lru@npm:^5.1.1":
|
"quick-lru@npm:^5.1.1":
|
||||||
version: 5.1.1
|
version: 5.1.1
|
||||||
resolution: "quick-lru@npm:5.1.1"
|
resolution: "quick-lru@npm:5.1.1"
|
||||||
|
@ -5182,12 +5257,13 @@ fsevents@^2.1.2:
|
||||||
koa: ^2.13.1
|
koa: ^2.13.1
|
||||||
koa-body: ^4.2.0
|
koa-body: ^4.2.0
|
||||||
koa-helmet: ^6.0.0
|
koa-helmet: ^6.0.0
|
||||||
koa-logger: ^3.2.1
|
koa-pino-logger: ^3.0.0
|
||||||
koa-router: ^10.0.0
|
koa-router: ^10.0.0
|
||||||
koa2-ratelimit: ^0.9.0
|
koa2-ratelimit: ^0.9.0
|
||||||
md5: ^2.3.0
|
md5: ^2.3.0
|
||||||
microformats-parser: ^1.4.0
|
microformats-parser: ^1.4.0
|
||||||
mockdate: ^3.0.2
|
mockdate: ^3.0.2
|
||||||
|
pino: ^6.11.2
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
|
@ -5341,6 +5417,16 @@ fsevents@^2.1.2:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"sonic-boom@npm:^1.0.2":
|
||||||
|
version: 1.4.1
|
||||||
|
resolution: "sonic-boom@npm:1.4.1"
|
||||||
|
dependencies:
|
||||||
|
atomic-sleep: ^1.0.0
|
||||||
|
flatstr: ^1.0.12
|
||||||
|
checksum: d681f4ef6910e4ae698f17c9b1f3120ea9fc26ae25c870c5c6e73e29b5b4ba88005df507041f57a5e06ee85c739285f35c91604af9d61eabaeed96e79ef34824
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"source-map-resolve@npm:^0.5.0":
|
"source-map-resolve@npm:^0.5.0":
|
||||||
version: 0.5.3
|
version: 0.5.3
|
||||||
resolution: "source-map-resolve@npm:0.5.3"
|
resolution: "source-map-resolve@npm:0.5.3"
|
||||||
|
|
Loading…
Reference in New Issue