import { Command, Option } from 'commander'; import { UploadEasUpdatesSourcemaps, UploadEasUpdatesSourcemapsOptions } from '../upload'; export const uploadEasUpdatesSourcemapsCommand = new Command(); uploadEasUpdatesSourcemapsCommand .name('upload-eas-updates-sourcemaps') .addOption( new Option('-f, --file ', 'The path of eas update folder') .makeOptionMandatory() .default('dist'), ) .addOption( new Option('-t, --token ', 'Your App Token') .env('INSTABUG_APP_TOKEN') .makeOptionMandatory(), ) .addOption( new Option('-n, --name ', 'The app version name') .env('INSTABUG_APP_VERSION_NAME') .makeOptionMandatory(), ) .addOption( new Option('-c, --code ', 'The app version code') .env('INSTABUG_APP_VERSION_CODE') .makeOptionMandatory(), ) .addOption( new Option('--androidUpdateId ', "The CodePush label if it's a CodePush release"), ) .addOption(new Option('--iosUpdateId ', "The CodePush label if it's a CodePush release")) .action(function (this: Command) { const options = this.opts(); UploadEasUpdatesSourcemaps(options); }) .showHelpAfterError();