UNPKG

@aikidosec/ci-api-client

Version:

CLI api client to easily integrate the Aikido public CI API into custom deploy scripts

14 lines (13 loc) 426 B
import Configstore from 'configstore'; import { program } from './index.js'; export const getConfigStore = () => { return new Configstore(program.name()); }; export const getApiKey = () => { return program.getOptionValue('apikey') ? program.getOptionValue('apikey') : getConfigStore().get('apikey'); }; export const setApiKey = (newApiKey) => { return getConfigStore().set('apikey', newApiKey); };