metascraper-media-provider 5.45.28 → 5.46.0-beta.1

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 -4
  2. package/src/index.js +5 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-media-provider",
3
3
  "description": "Get video property from HTML markup",
4
4
  "homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-media-provider",
5
- "version": "5.45.28",
5
+ "version": "5.46.0-beta.1",
6
6
  "types": "src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "author": {
@@ -24,7 +24,7 @@
24
24
  "youtube-dl"
25
25
  ],
26
26
  "dependencies": {
27
- "@metascraper/helpers": "5.45.28",
27
+ "@metascraper/helpers": "5.46.0-beta.1",
28
28
  "async-memoize-one": "~1.1.8",
29
29
  "debug-logfmt": "~1.2.3",
30
30
  "got": "~11.8.6",
@@ -49,7 +49,7 @@
49
49
  "src"
50
50
  ],
51
51
  "scripts": {
52
- "test": "NODE_PATH=.. TZ=UTC DEBUG=metascraper*,-metascraper-media-provider:provider* NODE_ENV=test ava --timeout 30s"
52
+ "test": "NODE_PATH=.. TZ=UTC DEBUG='metascraper-media-provider*,-metascraper-media-provider:provider*' NODE_ENV=test ava --timeout 30s"
53
53
  },
54
54
  "license": "MIT",
55
55
  "ava": {
@@ -59,5 +59,5 @@
59
59
  "!test/fixtures/generate.js"
60
60
  ]
61
61
  },
62
- "gitHead": "a3ca157491003cd78000a3c5c6d1bf038937b1c7"
62
+ "gitHead": "e2310394e475e90e59061967414f1a84b8978068"
63
63
  }
package/src/index.js CHANGED
@@ -136,7 +136,7 @@ const getDescription = ({ description }) => descriptionFn(description)
136
136
  module.exports = (opts = {}) => {
137
137
  const getMedia = createGetMedia(opts)
138
138
 
139
- return {
139
+ const rules = {
140
140
  audio: async ({ url }) => getAudio(await getMedia(url)),
141
141
  author: async ({ url }) => getAuthor(await getMedia(url)),
142
142
  date: async ({ url }) => getDate(await getMedia(url)),
@@ -147,6 +147,10 @@ module.exports = (opts = {}) => {
147
147
  title: async ({ url }) => getTitle(await getMedia(url)),
148
148
  video: async ({ url }) => getVideo(await getMedia(url))
149
149
  }
150
+
151
+ rules.pkgName = 'metascraper-media-provider'
152
+
153
+ return rules
150
154
  }
151
155
 
152
156
  module.exports.getAudio = getAudio