update version
This commit is contained in:
parent
7471e91fe6
commit
370e9481ef
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/envision-cli",
|
"name": "@kevisual/envision-cli",
|
||||||
"version": "0.0.38",
|
"version": "0.0.39",
|
||||||
"description": "envision command tools",
|
"description": "envision command tools",
|
||||||
"main": "dist/app.mjs",
|
"main": "dist/app.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -22,13 +22,14 @@ export const getPackageJson = () => {
|
|||||||
const packageJson = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
const packageJson = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
||||||
const basename = packageJson.basename || '';
|
const basename = packageJson.basename || '';
|
||||||
const version = packageJson.version || '';
|
const version = packageJson.version || '';
|
||||||
|
const app = packageJson.app as { key: string };
|
||||||
const userAppArry = basename.split('/');
|
const userAppArry = basename.split('/');
|
||||||
if (userAppArry.length !== 2) {
|
if (userAppArry.length <= 2) {
|
||||||
console.error(chalk.red('basename is error, 请输入正确的路径, packages.json中basename例如 root/appKey'));
|
console.error(chalk.red('basename is error, 请输入正确的路径, packages.json中basename例如 /root/appKey'));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const [user, appKey] = userAppArry;
|
const [user, appKey] = userAppArry;
|
||||||
return { basename, version, pkg: packageJson, user, appKey };
|
return { basename, version, pkg: packageJson, user, appKey, app };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -123,7 +124,13 @@ const command = new Command('deploy')
|
|||||||
}
|
}
|
||||||
if (id && showBackend) {
|
if (id && showBackend) {
|
||||||
console.log('\n');
|
console.log('\n');
|
||||||
|
// 获取当前应用的key
|
||||||
|
const pkKey = pkgInfo?.app?.key || pkgInfo?.appKey;
|
||||||
console.log(chalk.blue('服务端应用部署: '), 'envision pack-deploy', id, '-k <key>');
|
console.log(chalk.blue('服务端应用部署: '), 'envision pack-deploy', id, '-k <key>');
|
||||||
|
if (pkKey) {
|
||||||
|
console.log('\n');
|
||||||
|
console.log(chalk.blue('命令推荐: '), 'envision pack-deploy', id, `-k ${pkKey} -f`);
|
||||||
|
}
|
||||||
console.log('\n');
|
console.log('\n');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -352,7 +352,7 @@ const deployLoadFn = async (id: string, fileKey: string, force = false, install
|
|||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
console.log('deploy-load success. current version:', res.data?.pkg?.version);
|
console.log('deploy-load success. current version:', res.data?.pkg?.version);
|
||||||
console.log('run: ', 'envision services -r', res.data?.pkg?.name);
|
console.log('run: ', 'envision services -s', res.data?.pkg?.app?.name || res.data?.pkg?.name);
|
||||||
} else {
|
} else {
|
||||||
console.error('deploy-load failed', res.message);
|
console.error('deploy-load failed', res.message);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user