metascraper-telegram 5.50.1 → 5.50.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/index.d.ts +7 -0
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "metascraper-telegram",
|
|
3
3
|
"description": "Metascraper integration with Telegram",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-telegram",
|
|
5
|
-
"version": "5.50.
|
|
5
|
+
"version": "5.50.5",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"author": {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"telegram"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@keyvhq/memoize": "~2.
|
|
27
|
-
"@metascraper/helpers": "5.50.
|
|
28
|
-
"css-urls": "~2.0.
|
|
26
|
+
"@keyvhq/memoize": "~2.2.4",
|
|
27
|
+
"@metascraper/helpers": "5.50.5",
|
|
28
|
+
"css-urls": "~2.0.49",
|
|
29
29
|
"got": "~11.8.6",
|
|
30
30
|
"p-reflect": "~2.1.0"
|
|
31
31
|
},
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"src"
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
|
-
"test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
|
|
42
|
+
"test": "METASCRAPER_RE2=false NODE_PATH=.. TZ=UTC ava --timeout 15s --serial --no-worker-threads"
|
|
43
43
|
},
|
|
44
44
|
"license": "MIT",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e490f6f5f8a066d6635f9ff368a0889bb0f56f23"
|
|
46
46
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ type Options = {
|
|
|
7
7
|
* https://github.com/microlinkhq/keyv/tree/master/packages/memoize#keyvoptions
|
|
8
8
|
*/
|
|
9
9
|
keyvOpts?: import('@keyvhq/core').Options<any>,
|
|
10
|
+
/**
|
|
11
|
+
* Custom iframe resolver, useful for testing.
|
|
12
|
+
*/
|
|
13
|
+
getIframe?: (
|
|
14
|
+
url: string,
|
|
15
|
+
htmlDom: ReturnType<import('cheerio').load>
|
|
16
|
+
) => Promise<string> | string,
|
|
10
17
|
}
|
|
11
18
|
|
|
12
19
|
declare function rules(options?: Options): import('metascraper').Rules;
|
package/src/index.js
CHANGED
|
@@ -38,8 +38,8 @@ const createGetIframe = gotOpts => async (url, $) => {
|
|
|
38
38
|
return response.body
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
module.exports = ({ gotOpts, keyvOpts } = {}) => {
|
|
42
|
-
const getIframe = memoize(createGetIframe(gotOpts), keyvOpts, {
|
|
41
|
+
module.exports = ({ gotOpts, keyvOpts, getIframe: _getIframe } = {}) => {
|
|
42
|
+
const getIframe = memoize(_getIframe || createGetIframe(gotOpts), keyvOpts, {
|
|
43
43
|
key: url => sanetizeUrl(url, { removeQueryParameters: true })
|
|
44
44
|
})
|
|
45
45
|
|