UNPKG

hana-cli

Version:
31 lines (27 loc) 1.2 kB
// @ts-check import * as baseLite from '../utils/base-lite.js' import * as btp from '../utils/btp.js' import { buildDocEpilogue } from '../utils/doc-linker.js' export const command = 'openbas' export const aliases = ['openBuild', 'build', 'openbuild', 'openBAS', 'openBas', 'openBusinessApplicationStudio', 'bas', 'BAS'] export const describe = baseLite.bundle.getText("openbas") export const builder = (yargs) => yargs.options(baseLite.getBuilder({}, false)).wrap(160).example('hana-cli openBAS', baseLite.bundle.getText('openBASExample')).wrap(160).epilog(buildDocEpilogue('openBAS', 'developer-tools', ['cds', 'activateHDI'])) export async function handler (argv) { const base = await import('../utils/base.js') base.promptHandler(argv, getBAS, {}) } export async function getBAS() { const base = await import('../utils/base.js') base.startSpinnerInt() base.debug('openBAS') const { default:open } = await import('open') try { let basURL = await btp.getBASSubURL() await open(basURL, {wait: true}) base.stopSpinnerInt() console.log(basURL) return base.end() } catch (error) { base.error(error) } }