mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-09 15:47:18 +09:00
Update deps
This commit is contained in:
parent
16302660ab
commit
6b49d41a83
5036
package-lock.json
generated
Normal file
5036
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@ -13,26 +13,25 @@
|
||||
"test": "mocha --harmony"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "0.0.30",
|
||||
"@types/express": "4.17.3",
|
||||
"@types/html-entities": "1.2.16",
|
||||
"@types/mocha": "5.2.2",
|
||||
"@types/debug": "4.1.6",
|
||||
"@types/html-entities": "1.3.4",
|
||||
"@types/mocha": "9.0.0",
|
||||
"@types/node": "16.4.1",
|
||||
"@types/request": "2.47.1",
|
||||
"@types/request-promise-native": "1.0.15",
|
||||
"express": "4.16.3",
|
||||
"mocha": "5.2.0",
|
||||
"@types/request": "2.48.6",
|
||||
"@types/request-promise-native": "1.0.18",
|
||||
"express": "4.17.1",
|
||||
"mocha": "9.0.2",
|
||||
"typescript": "4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"cheerio-httpcli": "0.8.2",
|
||||
"debug": "3.1.0",
|
||||
"debug": "4.3.2",
|
||||
"escape-regexp": "0.0.1",
|
||||
"html-entities": "1.2.1",
|
||||
"koa": "2.8.1",
|
||||
"request": "2.88.0",
|
||||
"request-promise-native": "1.0.7",
|
||||
"require-all": "2.2.0",
|
||||
"html-entities": "2.3.2",
|
||||
"koa": "2.13.1",
|
||||
"request": "2.88.2",
|
||||
"request-promise-native": "1.0.9",
|
||||
"require-all": "3.0.0",
|
||||
"trace-redirect": "1.0.6"
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,7 @@ import nullOrEmpty from './utils/null-or-empty';
|
||||
import clip from './utils/clip';
|
||||
import cleanupTitle from './utils/cleanup-title';
|
||||
|
||||
import { AllHtmlEntities } from 'html-entities';
|
||||
const entities = new AllHtmlEntities();
|
||||
import { decode as decodeHtml } from 'html-entities';
|
||||
|
||||
import { createInstance } from './client';
|
||||
import Summary from './summary';
|
||||
@ -43,7 +42,7 @@ export default async (url: URL.Url, lang: string = null): Promise<Summary> => {
|
||||
return null;
|
||||
}
|
||||
|
||||
title = clip(entities.decode(title), 100);
|
||||
title = clip(decodeHtml(title), 100);
|
||||
|
||||
let image =
|
||||
$('meta[property="og:image"]').attr('content') ||
|
||||
@ -72,7 +71,7 @@ export default async (url: URL.Url, lang: string = null): Promise<Summary> => {
|
||||
$('meta[name="description"]').attr('content');
|
||||
|
||||
description = description
|
||||
? clip(entities.decode(description), 300)
|
||||
? clip(decodeHtml(description), 300)
|
||||
: null;
|
||||
|
||||
if (title === description) {
|
||||
@ -84,7 +83,7 @@ export default async (url: URL.Url, lang: string = null): Promise<Summary> => {
|
||||
$('meta[name="application-name"]').attr('content') ||
|
||||
url.hostname;
|
||||
|
||||
siteName = siteName ? entities.decode(siteName) : null;
|
||||
siteName = siteName ? decodeHtml(siteName) : null;
|
||||
|
||||
const favicon =
|
||||
$('link[rel="shortcut icon"]').attr('href') ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user