mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 06:18:06 +09:00
wip: ua
This commit is contained in:
parent
1c6ec9ad08
commit
a905357ef5
48
.pnp.cjs
generated
48
.pnp.cjs
generated
@ -1869,6 +1869,26 @@ const RAW_RUNTIME_STATE =
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@iceshrimp/summaly", [\
|
||||
["npm:2.7.1::__archiveUrl=https%3A%2F%2Ficeshrimp.dev%2Fapi%2Fpackages%2Ficeshrimp%2Fnpm%2F%2540iceshrimp%252Fsummaly%2F-%2F2.7.1%2Fsummaly-2.7.1.tgz", {\
|
||||
"packageLocation": "./.yarn/cache/@iceshrimp-summaly-npm-2.7.1-b4a810dbd8-de3ffcd39e.zip/node_modules/@iceshrimp/summaly/",\
|
||||
"packageDependencies": [\
|
||||
["@iceshrimp/summaly", "npm:2.7.1::__archiveUrl=https%3A%2F%2Ficeshrimp.dev%2Fapi%2Fpackages%2Ficeshrimp%2Fnpm%2F%2540iceshrimp%252Fsummaly%2F-%2F2.7.1%2Fsummaly-2.7.1.tgz"],\
|
||||
["cheerio", "npm:0.22.0"],\
|
||||
["debug", "virtual:b4a810dbd81321c859eb398d1970a66ed827fdee2aac632fe99a420d44666c5db36df3d173758d7c6c233bfcbedac74d2a1133f891b2288588300e5603f3ac1c#npm:4.3.3"],\
|
||||
["escape-regexp", "npm:0.0.1"],\
|
||||
["got", "npm:11.8.5"],\
|
||||
["html-entities", "npm:2.3.2"],\
|
||||
["iconv-lite", "npm:0.6.3"],\
|
||||
["jschardet", "npm:3.0.0"],\
|
||||
["koa", "npm:2.13.4"],\
|
||||
["private-ip", "npm:2.3.3"],\
|
||||
["require-all", "npm:3.0.0"],\
|
||||
["trace-redirect", "npm:1.0.6"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@ioredis/commands", [\
|
||||
["npm:1.2.0", {\
|
||||
"packageLocation": "./.yarn/cache/@ioredis-commands-npm-1.2.0-47541de88b-a8253c9539.zip/node_modules/@ioredis/commands/",\
|
||||
@ -6933,6 +6953,7 @@ const RAW_RUNTIME_STATE =
|
||||
["@bull-board/koa", "npm:5.6.0"],\
|
||||
["@bull-board/ui", "npm:5.6.0"],\
|
||||
["@discordapp/twemoji", "npm:14.1.2"],\
|
||||
["@iceshrimp/summaly", "npm:2.7.1::__archiveUrl=https%3A%2F%2Ficeshrimp.dev%2Fapi%2Fpackages%2Ficeshrimp%2Fnpm%2F%2540iceshrimp%252Fsummaly%2F-%2F2.7.1%2Fsummaly-2.7.1.tgz"],\
|
||||
["@koa/cors", "npm:3.4.3"],\
|
||||
["@koa/multer", "virtual:aa59773ac87791c4813d53447077fcf8a847d6de5a301d34dc31286584b1dbb26d30d3adb5b4c41c1e8aea04371e926fda05c09c6253647c432e11d872a304ba#npm:3.0.2"],\
|
||||
["@koa/router", "npm:9.0.1"],\
|
||||
@ -7084,7 +7105,6 @@ const RAW_RUNTIME_STATE =
|
||||
["sharp", "npm:0.32.1"],\
|
||||
["strict-event-emitter-types", "npm:2.0.0"],\
|
||||
["stringz", "npm:2.1.0"],\
|
||||
["summaly", "npm:2.7.0"],\
|
||||
["swc-loader", "virtual:aa59773ac87791c4813d53447077fcf8a847d6de5a301d34dc31286584b1dbb26d30d3adb5b4c41c1e8aea04371e926fda05c09c6253647c432e11d872a304ba#npm:0.2.3"],\
|
||||
["syslog-pro", "npm:1.0.0"],\
|
||||
["systeminformation", "npm:5.21.12"],\
|
||||
@ -9692,10 +9712,10 @@ const RAW_RUNTIME_STATE =
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}],\
|
||||
["virtual:e25bfbf6a21b48b0676f9feb450311244401d305a353e3f897116a12e8c3ea4290af8f75d82293d983ade94477e438f22bd5aef50106ca078894f6d12cb168a2#npm:4.3.3", {\
|
||||
"packageLocation": "./.yarn/__virtual__/debug-virtual-bcbb4855d3/0/cache/debug-npm-4.3.3-710fd4cc7f-723a9570dc.zip/node_modules/debug/",\
|
||||
["virtual:b4a810dbd81321c859eb398d1970a66ed827fdee2aac632fe99a420d44666c5db36df3d173758d7c6c233bfcbedac74d2a1133f891b2288588300e5603f3ac1c#npm:4.3.3", {\
|
||||
"packageLocation": "./.yarn/__virtual__/debug-virtual-ba5b054d45/0/cache/debug-npm-4.3.3-710fd4cc7f-723a9570dc.zip/node_modules/debug/",\
|
||||
"packageDependencies": [\
|
||||
["debug", "virtual:e25bfbf6a21b48b0676f9feb450311244401d305a353e3f897116a12e8c3ea4290af8f75d82293d983ade94477e438f22bd5aef50106ca078894f6d12cb168a2#npm:4.3.3"],\
|
||||
["debug", "virtual:b4a810dbd81321c859eb398d1970a66ed827fdee2aac632fe99a420d44666c5db36df3d173758d7c6c233bfcbedac74d2a1133f891b2288588300e5603f3ac1c#npm:4.3.3"],\
|
||||
["@types/supports-color", null],\
|
||||
["ms", "npm:2.1.2"],\
|
||||
["supports-color", "npm:8.1.1"]\
|
||||
@ -22782,26 +22802,6 @@ const RAW_RUNTIME_STATE =
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["summaly", [\
|
||||
["npm:2.7.0", {\
|
||||
"packageLocation": "./.yarn/cache/summaly-npm-2.7.0-e25bfbf6a2-ce49173396.zip/node_modules/summaly/",\
|
||||
"packageDependencies": [\
|
||||
["summaly", "npm:2.7.0"],\
|
||||
["cheerio", "npm:0.22.0"],\
|
||||
["debug", "virtual:e25bfbf6a21b48b0676f9feb450311244401d305a353e3f897116a12e8c3ea4290af8f75d82293d983ade94477e438f22bd5aef50106ca078894f6d12cb168a2#npm:4.3.3"],\
|
||||
["escape-regexp", "npm:0.0.1"],\
|
||||
["got", "npm:11.8.5"],\
|
||||
["html-entities", "npm:2.3.2"],\
|
||||
["iconv-lite", "npm:0.6.3"],\
|
||||
["jschardet", "npm:3.0.0"],\
|
||||
["koa", "npm:2.13.4"],\
|
||||
["private-ip", "npm:2.3.3"],\
|
||||
["require-all", "npm:3.0.0"],\
|
||||
["trace-redirect", "npm:1.0.6"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["supports-color", [\
|
||||
["npm:2.0.0", {\
|
||||
"packageLocation": "./.yarn/cache/supports-color-npm-2.0.0-22c0f0adbc-d2957d19e7.zip/node_modules/supports-color/",\
|
||||
|
BIN
.yarn/cache/@iceshrimp-summaly-npm-2.7.1-b4a810dbd8-de3ffcd39e.zip
(Stored with Git LFS)
vendored
Normal file
BIN
.yarn/cache/@iceshrimp-summaly-npm-2.7.1-b4a810dbd8-de3ffcd39e.zip
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/summaly-npm-2.7.0-e25bfbf6a2-ce49173396.zip
(Stored with Git LFS)
vendored
BIN
.yarn/cache/summaly-npm-2.7.0-e25bfbf6a2-ce49173396.zip
(Stored with Git LFS)
vendored
Binary file not shown.
@ -27,6 +27,7 @@
|
||||
"@bull-board/koa": "5.6.0",
|
||||
"@bull-board/ui": "5.6.0",
|
||||
"@discordapp/twemoji": "14.1.2",
|
||||
"@iceshrimp/summaly": "2.7.1",
|
||||
"@koa/cors": "3.4.3",
|
||||
"@koa/multer": "3.0.2",
|
||||
"@koa/router": "9.0.1",
|
||||
@ -122,7 +123,6 @@
|
||||
"semver": "7.5.4",
|
||||
"sharp": "0.32.1",
|
||||
"stringz": "2.1.0",
|
||||
"summaly": "2.7.0",
|
||||
"syslog-pro": "1.0.0",
|
||||
"systeminformation": "^5.21.12",
|
||||
"tar-stream": "^3.1.6",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type Koa from "koa";
|
||||
import summaly from "summaly";
|
||||
import summaly from "@iceshrimp/summaly";
|
||||
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||
import Logger from "@/services/logger.js";
|
||||
import config from "@/config/index.js";
|
||||
@ -40,6 +40,7 @@ export const urlPreviewHandler = async (ctx: Koa.Context) => {
|
||||
: await summaly.default(url, {
|
||||
followRedirects: false,
|
||||
lang: lang ?? "en-US",
|
||||
userAgent: config.userAgent
|
||||
});
|
||||
|
||||
logger.succ(`Got preview of ${url}: ${summary.title}`);
|
||||
|
40
yarn.lock
40
yarn.lock
@ -1181,6 +1181,25 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@iceshrimp/summaly@npm:2.7.1":
|
||||
version: 2.7.1
|
||||
resolution: "@iceshrimp/summaly@npm:2.7.1::__archiveUrl=https%3A%2F%2Ficeshrimp.dev%2Fapi%2Fpackages%2Ficeshrimp%2Fnpm%2F%2540iceshrimp%252Fsummaly%2F-%2F2.7.1%2Fsummaly-2.7.1.tgz"
|
||||
dependencies:
|
||||
cheerio: "npm:0.22.0"
|
||||
debug: "npm:4.3.3"
|
||||
escape-regexp: "npm:0.0.1"
|
||||
got: "npm:11.8.5"
|
||||
html-entities: "npm:2.3.2"
|
||||
iconv-lite: "npm:0.6.3"
|
||||
jschardet: "npm:3.0.0"
|
||||
koa: "npm:2.13.4"
|
||||
private-ip: "npm:2.3.3"
|
||||
require-all: "npm:3.0.0"
|
||||
trace-redirect: "npm:1.0.6"
|
||||
checksum: 10/de3ffcd39e29f6ee745ead391a4688faf54bc81e476c4f712aba985e32d6e4a35f66e4fba9c8e0648a67dac360eb2dc1fc387bf70fadac19c025f39bfb502034
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ioredis/commands@npm:^1.1.1":
|
||||
version: 1.2.0
|
||||
resolution: "@ioredis/commands@npm:1.2.0"
|
||||
@ -5249,6 +5268,7 @@ __metadata:
|
||||
"@bull-board/koa": "npm:5.6.0"
|
||||
"@bull-board/ui": "npm:5.6.0"
|
||||
"@discordapp/twemoji": "npm:14.1.2"
|
||||
"@iceshrimp/summaly": "npm:2.7.1"
|
||||
"@koa/cors": "npm:3.4.3"
|
||||
"@koa/multer": "npm:3.0.2"
|
||||
"@koa/router": "npm:9.0.1"
|
||||
@ -5400,7 +5420,6 @@ __metadata:
|
||||
sharp: "npm:0.32.1"
|
||||
strict-event-emitter-types: "npm:2.0.0"
|
||||
stringz: "npm:2.1.0"
|
||||
summaly: "npm:2.7.0"
|
||||
swc-loader: "npm:^0.2.3"
|
||||
syslog-pro: "npm:1.0.0"
|
||||
systeminformation: "npm:^5.21.12"
|
||||
@ -19233,25 +19252,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"summaly@npm:2.7.0":
|
||||
version: 2.7.0
|
||||
resolution: "summaly@npm:2.7.0"
|
||||
dependencies:
|
||||
cheerio: "npm:0.22.0"
|
||||
debug: "npm:4.3.3"
|
||||
escape-regexp: "npm:0.0.1"
|
||||
got: "npm:11.8.5"
|
||||
html-entities: "npm:2.3.2"
|
||||
iconv-lite: "npm:0.6.3"
|
||||
jschardet: "npm:3.0.0"
|
||||
koa: "npm:2.13.4"
|
||||
private-ip: "npm:2.3.3"
|
||||
require-all: "npm:3.0.0"
|
||||
trace-redirect: "npm:1.0.6"
|
||||
checksum: 10/ce491733962e5f3f22c8b80abf78d71e5ae243e9b774b54f2b7832a3246c7e769fb96a1d46c846af9f7c400dbe386f759e8eb8803e8d605d54e16155fa8c7166
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.1":
|
||||
version: 8.1.1
|
||||
resolution: "supports-color@npm:8.1.1"
|
||||
|
Loading…
Reference in New Issue
Block a user