function getCliArgs()

in modules/example-node/hkr-demo/multi_tenant.demo.ts [28:52]


function getCliArgs() {
  const operation = args.operation
  if (!operation) {
    throw new Error('Must specify operation to perform')
  }

  let inFile: string = args.inputFile
  if (!inFile) {
    throw new Error("Must specify input's file path")
  }
  inFile = inFile.replace('~', '/Users/nvobilis')

  let outFile = args.outputFile
  if (!outFile) {
    throw new Error("Must specify output's file path")
  }
  outFile = outFile.replace('~', '/Users/nvobilis')

  const tenant: string = args.tenant
  if (!tenant) {
    throw new Error("Must specify tenant's branch key ID for this operation")
  }

  return { operation, inFile, outFile, tenant }
}