diff --git a/package.json b/package.json index 029f621..b7b5ed9 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "type": "git", "url": "https://github.com/tgbv/cognigy-vg.git" }, - "version": "1.1.0", + "version": "1.1.1", "description": "CLI to interact with Cognigy Voice Gateway.", "keywords": [ "cli", "cognigy", "cognigy-vg", "voice-gateway" diff --git a/src/index.ts b/src/index.ts index 1dba4f3..e64f2ce 100755 --- a/src/index.ts +++ b/src/index.ts @@ -8,13 +8,14 @@ import pushCommand from "./commands/push"; import cloneCommand from "./commands/clone"; import snapshotCommand from "./commands/snapshot"; import setToken from "./commands/set-token"; +import { loadJsonFile } from "./lib"; const resourceTypesArg = new Argument('', 'Resource type to pull from API.') .choices(['app', 'carrier', 'speech', 'phone', 'obroutes']); const program = new Command(); -const packageJson = JSON.parse(readFileSync('./package.json').toString()); +const packageJson = loadJsonFile(`${__dirname}/../package.json`); program .name(packageJson.name)