From ced94153d2437c28f4e171ece7573eaf50f7848c Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 13 Nov 2019 21:03:41 +0100 Subject: [PATCH] fix: Fixing the map.json file location fixes: #491 --- package.json | 2 +- src/bin/index.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 07b0ea58..03faaf3b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "email": "justin.s.dalrymple@gmail.com" }, "bin": { - "gitlab": "./dist/cli.js" + "gitlab": "./dist/index.cli.js" }, "browser": "dist/index.browser.js", "bugs": { diff --git a/src/bin/index.ts b/src/bin/index.ts index d1706018..9ff3ceb9 100644 --- a/src/bin/index.ts +++ b/src/bin/index.ts @@ -19,7 +19,7 @@ program // Add all supported API's /* eslint global-require: 0 import/no-unresolved: 0 */ -const map = require('../../dist/map.json') || {}; +const map = require('./map.json') || {}; Object.entries(map).forEach(([name, methods]: [string, { name: string; args: string[] }[]]) => { const baseArgs: string[] = methods[0].args; @@ -78,7 +78,8 @@ Object.entries(map).forEach(([name, methods]: [string, { name: string; args: str const s = new core[name](initArgs); // Execute function - return s[m.name](...Object.values(coreArgs), optionalArgs); + return s[m.name](...Object.values(coreArgs), optionalArgs) + .then(console.log); }, ); }