kingoftime-cli/src/token-flags.ts

18 lines
440 B
TypeScript

import {Flags} from '@oclif/core'
const tokenVar = 'KINGOFTIME_TOKEN'
const userTokenVar = 'KINGOFTIME_USER_TOKEN'
export const tokenFlags = {
token: Flags.string({
env: tokenVar,
description: `Defaults to the ${tokenVar} environment variable.`,
required: true,
}),
'user-token': Flags.string({
env: userTokenVar,
description: `Defaults to the ${userTokenVar} environment variable.`,
required: true,
}),
}