metascraper-media-provider 5.40.0 → 5.42.0

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.
Files changed (2) hide show
  1. package/package.json +4 -3
  2. package/src/index.d.ts +35 -0
package/package.json CHANGED
@@ -2,8 +2,9 @@
2
2
  "name": "metascraper-media-provider",
3
3
  "description": "Get video property from HTML markup",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-media-provider",
5
- "version": "5.40.0",
5
+ "version": "5.42.0",
6
6
  "main": "src/index.js",
7
+ "types": "src/index.d.ts",
7
8
  "author": {
8
9
  "email": "hello@microlink.io",
9
10
  "name": "microlink.io",
@@ -32,7 +33,7 @@
32
33
  "p-reflect": "~2.1.0",
33
34
  "p-retry": "~4.6.1",
34
35
  "p-timeout": "~4.1.0",
35
- "youtube-dl-exec": "~2.4.12"
36
+ "youtube-dl-exec": "~2.5.2"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@kikobeats/time-span": "latest",
@@ -58,5 +59,5 @@
58
59
  "!test/fixtures/generate.js"
59
60
  ]
60
61
  },
61
- "gitHead": "b4ec42d7dd7f1bae77c60d60dd8aed4bc5a44fa9"
62
+ "gitHead": "c0b0686683249610f570c8f58ef4f6b77c824d0d"
62
63
  }
package/src/index.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ type Options = {
2
+ /**
3
+ * The directory where the youtube-dl binary will be downloaded.
4
+ * @default undefined
5
+ */
6
+ cacheDir?: string;
7
+ /**
8
+ * Whether to get the proxy from the environment variable.
9
+ * @default false
10
+ */
11
+ getProxy?: boolean;
12
+ /**
13
+ * Get the agent from the proxy.
14
+ * @default () => undefined
15
+ */
16
+ getAgent?: (proxy: string) => object | undefined;
17
+ /**
18
+ * The timeout in milliseconds.
19
+ * @default 30000
20
+ */
21
+ timeout?: number;
22
+ /**
23
+ * The number of retries.
24
+ * @default 2
25
+ */
26
+ retry?: number;
27
+ /**
28
+ * The options to pass to https://github.com/sindresorhus/got#options
29
+ * @default {}
30
+ */
31
+ gotOpts: import('got').Options;
32
+ } & import('youtube-dl-exec').Flags;
33
+
34
+ declare function rules(options?: Options): import('metascraper').Rules
35
+ export = rules;