Compare commits

..

2 Commits

Author SHA1 Message Date
ba3b2190ab update version 2025-12-01 02:25:00 +08:00
b1f54cf813 update 2025-12-01 02:24:16 +08:00
4 changed files with 11 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@kevisual/cli",
"version": "0.0.66",
"version": "0.0.67",
"description": "envision 命令行工具",
"type": "module",
"basename": "/root/cli",
@@ -67,7 +67,7 @@
"inquirer": "^13.0.1",
"jsonwebtoken": "^9.0.2",
"tar": "^7.5.2",
"zustand": "^5.0.8"
"zustand": "^5.0.9"
},
"engines": {
"node": ">=22.0.0"

10
pnpm-lock.yaml generated
View File

@@ -85,8 +85,8 @@ importers:
specifier: ^7.5.2
version: 7.5.2
zustand:
specifier: ^5.0.8
version: 5.0.8(@types/react@19.1.9)
specifier: ^5.0.9
version: 5.0.9(@types/react@19.1.9)
assistant:
dependencies:
@@ -1673,8 +1673,8 @@ packages:
resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==}
engines: {node: '>=18'}
zustand@5.0.8:
resolution: {integrity: sha512-gyPKpIaxY9XcO2vSMrLbiER7QMAMGOQZVRdJ6Zi782jkbzZygq5GI9nG8g+sMgitRtndwaBSl7uiqC49o1SSiw==}
zustand@5.0.9:
resolution: {integrity: sha512-ALBtUj0AfjJt3uNRQoL1tL2tMvj6Gp/6e39dnfT6uzpelGru8v1tPOGBzayOWbPJvujM8JojDk3E1LxeFisBNg==}
engines: {node: '>=12.20.0'}
peerDependencies:
'@types/react': '>=18.0.0'
@@ -3108,6 +3108,6 @@ snapshots:
yallist@5.0.0: {}
zustand@5.0.8(@types/react@19.1.9):
zustand@5.0.9(@types/react@19.1.9):
optionalDependencies:
'@types/react': 19.1.9

View File

@@ -23,7 +23,7 @@ export const getPackageJson = (opts?: { version?: string; appKey?: string }) =>
const packageJson = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
const basename = packageJson.basename || '';
const version = packageJson.version || '';
const app = packageJson.app as { key: string };
const app = packageJson.app;
const userAppArry = basename.split('/');
if (userAppArry.length <= 2 && !opts?.appKey) {
console.error(chalk.red('basename is error, 请输入正确的路径, packages.json中basename例如 /root/appKey'));
@@ -154,13 +154,7 @@ const command = new Command('deploy')
logger.debug('deploy success', res2.data);
if (id && showBackend) {
console.log('\n');
// 获取当前应用的key
const pkKey = pkgInfo?.app?.key || pkgInfo?.appKey;
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(chalk.blue('服务端应用部署: '), 'envision pack-deploy', id);
console.log('\n');
}
} else {
@@ -186,7 +180,7 @@ const uploadFiles = async (files: string[], directory: string, opts: UploadFileO
for (const file of files) {
const filePath = path.join(directory, file);
const hash = getHash(filePath);
if(!hash){
if (!hash) {
console.error('文件', filePath, '不存在');
console.error('请检查文件是否存在');
}
@@ -274,7 +268,7 @@ const deployLoadFn = async (id: string, org?: string) => {
const baseURL = getBaseURL();
const deployURL = new URL(`/${user}/${key}/`, baseURL);
console.log(chalk.blue('deployURL', deployURL.href));
} catch (error) {}
} catch (error) { }
} else {
console.error('deploy-load failed', res.message);
}

View File

@@ -316,17 +316,6 @@ const packDeployCommand = new Command('pack-deploy')
.option('-i, --install ', 'install dependencies')
.action(async (id, opts) => {
let { force, key, install } = opts || {};
if (!key) {
const answers = await inquirer.prompt([
{
type: 'input',
name: 'key',
message: 'Enter your deploy to services fileKey:',
when: () => !key, // 当 username 为空时,提示用户输入
},
]);
key = answers.key || key;
}
const res = await deployLoadFn(id, key, force, install);
});