diff --git a/package.json b/package.json index 12cd976..681694d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/envision-cli", - "version": "0.0.25", + "version": "0.0.26", "description": "envision command tools", "main": "dist/index.js", "type": "module", diff --git a/src/command/publish.ts b/src/command/publish.ts index 1650706..e269bea 100644 --- a/src/command/publish.ts +++ b/src/command/publish.ts @@ -345,6 +345,8 @@ const packCommand = new Command('pack') console.log(chalk.blue('example: '), 'envision pack-deploy', id, '-k '); console.log('envision pack-deploy', id); } + } else { + console.error('Error uploading file:', res.message); } } catch (error) { console.error('Error uploading file:', error); @@ -354,22 +356,22 @@ const packCommand = new Command('pack') }); const packDeployCommand = new Command('pack-deploy') .argument('', 'id') - .option('-k, --key ', 'fileKey, 服务器的部署文件夹的列表') + .option('-k, --key ', 'fileKey, 服务器的部署文件夹的列表') .option('-f --force', 'force') .action(async (id, opts) => { - let { force, fileKey } = opts || {}; - if (!fileKey) { + let { force, key } = opts || {}; + if (!key) { const answers = await inquirer.prompt([ { type: 'input', - name: 'fileKey', + name: 'key', message: 'Enter your deploy to services fileKey:', - when: () => !fileKey, // 当 username 为空时,提示用户输入 + when: () => !key, // 当 username 为空时,提示用户输入 }, ]); - fileKey = answers.fileKey || fileKey; + key = answers.key || key; } - const res = await deployLoadFn(id, fileKey, force); + const res = await deployLoadFn(id, key, force); }); program.addCommand(packDeployCommand);