@microlink/cli 2.1.0 → 2.1.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 +1 -1
  2. package/src/api.js +3 -3
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@microlink/cli",
3
3
  "description": "Interacting with Microlink API from your terminal.",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/cli",
5
- "version": "2.1.0",
5
+ "version": "2.1.1",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "microlink": "bin/microlink"
package/src/api.js CHANGED
@@ -39,7 +39,7 @@ const sanetizeInput = (input, endpoint) => {
39
39
  if (!input) return input
40
40
  const difference = ALL_ENDPOINTS.filter(elem => ![endpoint].includes(elem))
41
41
  const endpointRegex = createEndpointRegex(difference)
42
- return input.replace(endpointRegex, endpoint)
42
+ return input.replace(/^url=/, '').replace(endpointRegex, endpoint)
43
43
  }
44
44
 
45
45
  const prefixInput = (input, endpoint) => {
@@ -92,8 +92,8 @@ const render = ({ body, response, flags }) => {
92
92
  if (!flags.pretty) return console.log(body.toString())
93
93
 
94
94
  const contentType = headers['content-type'].toLowerCase()
95
- const time = prettyMs(timings.end - timings.start)
96
- const serverTiming = headers['server-timing']
95
+ const time = prettyMs(timings.phases.total)
96
+ const serverTiming = headers['x-server-timing']
97
97
  const id = headers['x-request-id']
98
98
 
99
99
  const printMode = (() => {