fix
This commit is contained in:
parent
fa4bb644ce
commit
3d99214656
@ -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",
|
||||
|
@ -345,6 +345,8 @@ const packCommand = new Command('pack')
|
||||
console.log(chalk.blue('example: '), 'envision pack-deploy', id, '-k <key>');
|
||||
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>', 'id')
|
||||
.option('-k, --key <fileKey>', 'fileKey, 服务器的部署文件夹的列表')
|
||||
.option('-k, --key <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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user