@browserless/screenshot 9.3.14-alpha.2 → 9.3.16

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/README.md ADDED
@@ -0,0 +1,26 @@
1
+ <div align="center">
2
+ <img style="width: 500px; margin:3rem 0 1.5rem;" src="https://browserless.js.org/static/logo-banner.png" alt="browserless">
3
+ <br>
4
+ <br>
5
+ <p align="center"><strong>@browserless/screenshot</strong>: Take a clean screenshot of any website</p>
6
+ <br>
7
+ </div>
8
+
9
+ See our [website](https://browserless.js.org) for more information.
10
+
11
+ ## Install
12
+
13
+ Using npm:
14
+
15
+ ```sh
16
+ npm install @browserless/screenshot --save
17
+ ```
18
+
19
+ ## License
20
+
21
+ **@browserless/screenshot** © [Microlink](https://microlink.io), Released under the [MIT](https://github.com/microlinkhq/browserless/blob/master/LICENSE.md) License.<br>
22
+ Authored and maintained by [Microlink](https://microlink.io) with help from [contributors](https://github.com/microlinkhq/browserless/contributors).
23
+
24
+ The [logo](https://thenounproject.com/term/browser/288309/) has been designed by [xinh studio](https://xinh.studio).
25
+
26
+ > [microlink.io](https://microlink.io) · GitHub [@MicrolinkHQ](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@browserless/screenshot",
3
- "description": "Take clean screenshot of any website",
3
+ "description": "Take a clean screenshot of any website",
4
4
  "homepage": "https://browserless.js.org/#/?id=screenshoturl-options",
5
- "version": "9.3.14-alpha.2",
5
+ "version": "9.3.16",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -28,18 +28,18 @@
28
28
  "screenshot"
29
29
  ],
30
30
  "dependencies": {
31
- "@browserless/goto": "^9.3.14-alpha.1",
31
+ "@browserless/goto": "^9.3.16",
32
32
  "debug-logfmt": "~1.0.4",
33
33
  "got": "~11.8.3",
34
34
  "is-html-content": "~1.0.0",
35
- "is-url-http": "~2.2.12",
35
+ "is-url-http": "~2.3.1",
36
36
  "jimp": "~0.16.1",
37
37
  "map-values-deep": "~1.0.2",
38
38
  "mime-types": "~2.1.35",
39
39
  "p-reflect": "~2.1.0",
40
40
  "pretty-ms": "~7.0.1",
41
41
  "prism-themes": "~1.9.0",
42
- "sharp": "~0.30.3",
42
+ "sharp": "~0.30.4",
43
43
  "svg-gradient": "~1.0.3",
44
44
  "time-span": "~4.0.0"
45
45
  },
@@ -59,5 +59,5 @@
59
59
  "test": "ava"
60
60
  },
61
61
  "license": "MIT",
62
- "gitHead": "f53be1e3109e508656c59a6e6c56b4efbc15fa68"
62
+ "gitHead": "68a40c98e8e93f2cb3f3115b75a7b9bec9fbe433"
63
63
  }
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const { readFile } = require('fs').promises
4
- const isUrl = require('is-url-http')
4
+ const isHttpUrl = require('is-url-http')
5
5
  const path = require('path')
6
6
 
7
7
  const CACHE = Object.create(null)
@@ -11,7 +11,7 @@ const GET_THEME_PATH = () => require('prism-themes').themesDirectory
11
11
  const THEME_PATH = () => CACHE.root || (CACHE.root = GET_THEME_PATH())
12
12
 
13
13
  module.exports = async themeId => {
14
- if (isUrl(themeId)) return `<link rel="stylesheet" type="text/css" href="${themeId}">`
14
+ if (isHttpUrl(themeId)) return `<link rel="stylesheet" type="text/css" href="${themeId}">`
15
15
 
16
16
  const stylesheet =
17
17
  CACHE[themeId] ||