-
Notifications
You must be signed in to change notification settings - Fork 52
Description
cli.js
import { Command } from 'commander';
import { IPATool } from './src/ipa.js';
process.removeAllListeners('warning');
const program = new Command();
program
.option('-o, --output ', '保存文件的路径', './app')
.option('-a, --appid ', '应用程序的ID', '6448362669')
.option('-v, --appVerId ', '版本id', '857775619')
.option('-e, --appleId ', 'Apple ID 邮箱', '123456')
.option('-p, --password ', 'Apple ID 密码', '12345')
.option('-c, --code ', '两步验证代码', '');
program.parse(process.argv);
const options = program.opts();
const ipaTool = new IPATool();
(async () => {
try {
await ipaTool.downipa({
path: options.output,
APPID: options.appid,
appVerId: options.appVerId,
APPLE_ID: options.appleId,
PASSWORD: options.password,
CODE: options.code
});
console.log('下载完成');
} catch (error) {
console.error('下载失败:', error);
}
})();