import { CliLeaf, CliStringArrayInput, CliStringInput } from '@alwaysai/alwayscli'; import { yesCliInput } from '../../cli-inputs'; import { appPublishComponent } from '../../components/app'; import { echo } from '../../util'; export const appPublishCliLeaf = CliLeaf({ name: 'publish', description: 'Publish a new version of your application to your project.', namedInputs: { yes: yesCliInput, name: CliStringInput({ description: 'Release Name', required: false, placeholder: '' }), excludes: CliStringArrayInput({ description: 'One or more files to exclude from package. These will be appended to paths in .aai-ignore.', required: false, placeholder: ' [ ...]' }) }, async action(_, opts) { const { yes, name, excludes } = opts; const releaseHash = await appPublishComponent({ yes, name, excludes }); echo(`Published release ${releaseHash}`); } });