update: 优化部署
This commit is contained in:
@@ -349,11 +349,26 @@ const deployLoadFn = async (id: string, fileKey: string, force = false, install
|
||||
// devDependencies: [Object],
|
||||
// dependencies: [Object]
|
||||
// },
|
||||
let appKey = '';
|
||||
let version = '';
|
||||
if (id && id.includes('/')) {
|
||||
const [a, b] = id.split('/');
|
||||
if (a) {
|
||||
appKey = b || '1.0.0';
|
||||
version = a;
|
||||
id = '';
|
||||
} else {
|
||||
console.error(chalk.red('id format error, please use "version/appKey" format'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
const res = await query.post({
|
||||
path: 'micro-app',
|
||||
key: 'deploy',
|
||||
data: {
|
||||
id: id,
|
||||
version: version,
|
||||
appKey: appKey,
|
||||
key: fileKey,
|
||||
force: force,
|
||||
install: !!install,
|
||||
|
||||
Reference in New Issue
Block a user