microlink.io 0.5.1 → 0.6.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.
- package/package.json +5 -5
- package/src/index.d.ts +6 -2
- package/src/index.js +2 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "microlink.io",
|
|
3
3
|
"description": "The Microlink API organized into products, each returning a direct result",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/microlink",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.6.0",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"main": "./src/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"seo"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@microlink/function": "0.3.
|
|
48
|
-
"@microlink/google": "1.2.
|
|
49
|
-
"@microlink/mql": "0.
|
|
47
|
+
"@microlink/function": "0.3.3",
|
|
48
|
+
"@microlink/google": "1.2.2",
|
|
49
|
+
"@microlink/mql": "0.19.0",
|
|
50
50
|
"mri": "~1.2.0",
|
|
51
51
|
"terminal-link": "~5.0.0"
|
|
52
52
|
},
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
},
|
|
79
79
|
"directory": "test"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "c93fff8082b69c8e76bc159be82daf8a26b419bb"
|
|
82
82
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -18,20 +18,24 @@ interface Options {
|
|
|
18
18
|
colorScheme?: 'light' | 'dark' | 'no-preference'
|
|
19
19
|
device?: string
|
|
20
20
|
filename?: string
|
|
21
|
+
filter?: string
|
|
21
22
|
force?: boolean
|
|
22
23
|
javascript?: boolean
|
|
23
|
-
|
|
24
|
+
mediaType?: string
|
|
25
|
+
meta?: boolean | { logo?: boolean | { square: boolean } }
|
|
24
26
|
modules?: string | string[]
|
|
25
27
|
prerender?: boolean | 'auto'
|
|
26
|
-
proxy?: string
|
|
28
|
+
proxy?: string | { url: string } | { location: string }
|
|
27
29
|
retry?: number
|
|
28
30
|
scripts?: string | string[]
|
|
31
|
+
scroll?: string
|
|
29
32
|
staleTtl?: string | number
|
|
30
33
|
styles?: string | string[]
|
|
31
34
|
timeout?: number
|
|
32
35
|
ttl?: string | number
|
|
33
36
|
video?: boolean
|
|
34
37
|
viewport?: Record<string, unknown>
|
|
38
|
+
waitForSelector?: string
|
|
35
39
|
waitForTimeout?: number
|
|
36
40
|
waitUntil?: string | string[]
|
|
37
41
|
[key: string]: unknown
|
package/src/index.js
CHANGED
|
@@ -41,7 +41,8 @@ const LIGHTHOUSE_KEYS = ['onlyCategories', 'onlyAudits', 'skipAudits', 'output']
|
|
|
41
41
|
const isEmpty = obj => Object.keys(obj).length === 0
|
|
42
42
|
|
|
43
43
|
const create = (ctx = {}) => {
|
|
44
|
-
const
|
|
44
|
+
const googleClient = createGoogleClient()
|
|
45
|
+
const last = googleClient.last ?? {}
|
|
45
46
|
const request = (...args) => {
|
|
46
47
|
const [requestUrl, requestOptions] = mql.getApiUrl(...args)
|
|
47
48
|
last.requestUrl = requestUrl
|
|
@@ -105,8 +106,6 @@ const create = (ctx = {}) => {
|
|
|
105
106
|
)
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
const googleClient = createGoogleClient()
|
|
109
|
-
|
|
110
109
|
const run = (url, code, options) => {
|
|
111
110
|
const { top, got } = route(options)
|
|
112
111
|
return fn(code, top, got)(url)
|