diff --git a/package.json b/package.json index ebb09f3..9dec7c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/cli", - "version": "0.0.55-beta-1", + "version": "0.0.55-beta-2", "description": "envision command tools", "main": "dist/app.mjs", "type": "module", diff --git a/src/command/deploy.ts b/src/command/deploy.ts index d9867c2..a75a992 100644 --- a/src/command/deploy.ts +++ b/src/command/deploy.ts @@ -12,6 +12,7 @@ import { installDeps } from '@/uitls/npm.ts'; import { upload } from '@/module/download/upload.ts'; import { getHash } from '@/uitls/hash.ts'; import { queryAppVersion } from '@/query/app-manager/query-app.ts'; +import { logger } from '@/module/logger.ts'; /** * 获取package.json 中的 basename, version, user, appKey * @returns @@ -126,7 +127,8 @@ const command = new Command('deploy') console.error(chalk.red('查询应用版本失败'), res2.message); return; } - const { id, data, ...rest } = res2.data?.app || {}; + // const { id, data, ...rest } = res.data?.app || {}; + const { id, data, ...rest } = res2.data || {}; if (id && !update) { console.log(chalk.green('id: '), id); if (!org) { @@ -139,6 +141,7 @@ const command = new Command('deploy') } else { // console.log('rest', JSON.stringify(res.data, null, 2)); } + logger.debug('deploy success', res2.data); if (id && showBackend) { console.log('\n'); // 获取当前应用的key diff --git a/src/command/publish.ts b/src/command/publish.ts index 369b4cc..5dcbb6f 100644 --- a/src/command/publish.ts +++ b/src/command/publish.ts @@ -430,7 +430,7 @@ const packCommand = new Command('pack') } if (opts.publish) { // 运行 deploy 命令 - const runDeployCommand = 'envision pack-deploy ' + value.outputFilePath + ' -k ' + appKey; + // const runDeployCommand = 'envision pack-deploy ' + value.outputFilePath + ' -k ' + appKey; const [_app, _command] = process.argv; let deployDist = opts.isTar ? value.outputFilePath : packDist; const deployCommand = [_app, _command, 'deploy', deployDist, '-k', appKey, '-v', version, '-u']; @@ -443,8 +443,8 @@ const packCommand = new Command('pack') if (opts.yes) { deployCommand.push('-y', 'yes'); } - console.log(chalk.blue('deploy doing: '), deployCommand.slice(2).join(' '), '\n\n'); - console.log('pack deploy services', chalk.blue('example: '), runDeployCommand); + console.log(chalk.blue('deploy doing: '), deployCommand.slice(2).join(' '), '\n'); + // console.log('pack deploy services', chalk.blue('example: '), runDeployCommand); program.parse(deployCommand); } diff --git a/src/module/query.ts b/src/module/query.ts index 55eebb6..7f86600 100644 --- a/src/module/query.ts +++ b/src/module/query.ts @@ -42,7 +42,7 @@ query.afterResponse = async (response, ctx) => { export const queryLogin = new QueryLoginNode({ query: query as any, onLoad: async () => { - console.log('onLoad'); + // console.log('onLoad'); }, });