@microlink/cli 2.1.6 → 2.1.7

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/bin/microlink CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const cli = require('../src/cli')
4
-
5
4
  if (cli.input.length === 0) cli.showHelp()
6
- require('../src/api')(cli)
5
+ else require('../src/api')(cli)
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.6",
5
+ "version": "2.1.7",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "microlink": "bin/microlink"
@@ -35,7 +35,7 @@
35
35
  "clipboardy": "~2.3.0",
36
36
  "jsome": "~2.5.0",
37
37
  "localhost-url-regex": "~1.0.7",
38
- "meow": "~9.0.0",
38
+ "mri": "~1.2.0",
39
39
  "nanospinner": "~1.1.0",
40
40
  "picocolors": "~1.0.0",
41
41
  "pretty-bytes": "~5.6.0",
package/src/cli.js CHANGED
@@ -1,11 +1,9 @@
1
1
  'use strict'
2
2
 
3
- const meow = require('meow')
3
+ const mri = require('mri')
4
4
 
5
- const cli = meow({
6
- description: false,
7
- help: require('./help'),
8
- flags: {
5
+ const { _, ...flags } = mri(process.argv.slice(2), {
6
+ default: {
9
7
  apiKey: {
10
8
  default: process.env.MICROLINK_API_KEY
11
9
  },
@@ -24,4 +22,8 @@ const cli = meow({
24
22
  }
25
23
  })
26
24
 
27
- module.exports = cli
25
+ module.exports = {
26
+ flags,
27
+ input: _,
28
+ showHelp: () => console.log(require('./help'))
29
+ }