-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add types for packages Closes #676 * refactor(types): use declare
- Loading branch information
Showing
76 changed files
with
306 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Metascraper integration with Amazon", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-amazon", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function rules(): import('metascraper').Rules; | ||
export = rules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get audio property from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-audio", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type IframeAttributes = { | ||
src: string | ||
} | ||
|
||
type Options = { | ||
getIframe?: (url: string, htmlDom: import('cheerio').CheerioAPI, iframeAttributes: IframeAttributes) => string; | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get author property from HTML markup", | ||
"homepage": "https://metascraper.js.org", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function rules(): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Metascraper integration with Clearbit Logo API", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-clearbit", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
type Options = { | ||
/** | ||
* https://github.com/sindresorhus/got#options | ||
*/ | ||
gotOpts?: import('got').Options, | ||
/** | ||
* https://github.com/microlinkhq/keyv/tree/master/packages/memoize#keyvoptions | ||
*/ | ||
keyvOpts?: import('@keyvhq/core').Options, | ||
/** | ||
* https://dashboard.clearbit.com/docs#logo-api | ||
*/ | ||
logoOpts?: { | ||
size: number, | ||
format: "png" | "jpg" | ||
greyscale: false | ||
} | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get date property from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-date", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "scripts/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type Options = { | ||
/** | ||
* Whether to add the date published and date modified to the result. | ||
* @default true | ||
*/ | ||
datePublished?: boolean, | ||
/** | ||
* Whether to add the date published and date modified to the result. | ||
* @default true | ||
*/ | ||
dateModified?: boolean | ||
} | ||
|
||
declare function rules(options?: Options = defaultOptions): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get description property from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-description", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
type Options = { | ||
/** | ||
* The maximum length of the description. | ||
* @default Number.MAX_SAFE_INTEGER | ||
*/ | ||
truncateLength?: number, | ||
/** | ||
* The string to append if the description is truncated. | ||
* @default '…' | ||
*/ | ||
ellipsis?: string, | ||
/** | ||
* Whether to remove the byline from the description. | ||
* @default false | ||
*/ | ||
removeBy?: boolean, | ||
/** | ||
* Whether to remove the separator from the description. | ||
* @default false | ||
*/ | ||
removeSeparator?: boolean, | ||
/** | ||
* Whether to capitalize the description. | ||
* @default false | ||
*/ | ||
capitalize?: boolean | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get RSS/Atom feed URL from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-description", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function rules(): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-iframe", | ||
"version": "5.40.0", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type Options = { | ||
/** | ||
* https://github.com/sindresorhus/got#options | ||
*/ | ||
gotOpts?: import('got').Options, | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get image property from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-image", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function rules(): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Metascraper integration for Instagram", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-instagram", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function rules(): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get lang property from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-lang", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function rules(): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "metascraper logo favicon fallback", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo-favicon", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "types/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
type DOMNOdeAtributes = Record<string, any> | ||
|
||
type Options = { | ||
/** | ||
* Enable favicon.ico detection | ||
* @default true | ||
*/ | ||
favicon?: boolean, | ||
/** | ||
* Enable favicon.ico using the root domain for subdomains | ||
* @default true | ||
*/ | ||
rootFavicon?: boolean | RegExp, | ||
/** | ||
* Enable retrieve logo from Google API. | ||
* @default true | ||
*/ | ||
google?: boolean, | ||
/** | ||
* https://github.com/sindresorhus/got#options | ||
*/ | ||
gotOpts?: import('got').Options, | ||
/** | ||
* https://github.com/microlinkhq/keyv/tree/master/packages/memoize#keyvoptions | ||
*/ | ||
keyvOpts?: import('@keyvhq/core').Options, | ||
/** | ||
* The function to pick the favicon from the list of favicons. | ||
*/ | ||
pickFn?: (sizes: DOMNOdeAtributes[]) => DOMNOdeAtributes, | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Get logo property from HTML markup", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type Options = { | ||
filter?: (url: string) => boolean | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"description": "Metascraper integration for detecting PWA Web app manifest", | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-manifest", | ||
"version": "5.40.0", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type Options = { | ||
/** | ||
* https://github.com/sindresorhus/got#options | ||
*/ | ||
gotOpts?: import('got').Options, | ||
/** | ||
* https://github.com/microlinkhq/keyv/tree/master/packages/memoize#keyvoptions | ||
*/ | ||
keyvOpts?: import('@keyvhq/core').Options, | ||
} | ||
|
||
declare function rules(options?: Options): import('metascraper').Rules; | ||
export = rules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-media-provider", | ||
"version": "5.40.0", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "microlink.io", | ||
|
@@ -32,7 +33,7 @@ | |
"p-reflect": "~2.1.0", | ||
"p-retry": "~4.6.1", | ||
"p-timeout": "~4.1.0", | ||
"youtube-dl-exec": "~2.4.12" | ||
"youtube-dl-exec": "~2.5.2" | ||
}, | ||
"devDependencies": { | ||
"@kikobeats/time-span": "latest", | ||
|
Oops, something went wrong.