From 53305f1a1c2437f9476094ca959f340161450744 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Wed, 3 May 2023 00:15:50 +0200 Subject: [PATCH] fix: flag types --- package.json | 2 +- src/cli.js | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index f290e3b..18f9ed2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@microlink/cli", "description": "Interacting with Microlink API from your terminal.", - "homepage": "https://nicedoc.io/microlinkhq/cli", + "homepage": "https://github.com/microlinkhq/cli", "version": "2.1.7", "main": "src/index.js", "bin": { diff --git a/src/cli.js b/src/cli.js index 4898aa3..69d6199 100644 --- a/src/cli.js +++ b/src/cli.js @@ -3,22 +3,12 @@ const mri = require('mri') const { _, ...flags } = mri(process.argv.slice(2), { + boolean: ['color', 'copy', 'pretty'], default: { - apiKey: { - default: process.env.MICROLINK_API_KEY - }, - pretty: { - type: 'boolean', - default: true - }, - color: { - type: 'boolean', - default: true - }, - copy: { - type: 'boolean', - default: false - } + apiKey: process.env.MICROLINK_API_KEY, + pretty: true, + color: true, + copy: false } })