fix: fix delete services

This commit is contained in:
熊潇 2025-03-23 13:18:07 +08:00
parent 6e410eb3b0
commit c16c1b3ce4
4 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@kevisual/envision-cli",
"version": "0.0.34",
"version": "0.0.35-alpha.1",
"description": "envision command tools",
"main": "dist/app.mjs",
"type": "module",

View File

@ -572,7 +572,8 @@ const servicesCommand = new Command('services')
}
}
if (opts.delete) {
const res = await backServices.queryServiceOperate(opts.delete, 'delete');
// const res = await backServices.queryServiceOperate(opts.delete, 'delete');
const res = await backServices.queryServiceDelect(opts.delete);
if (res.code === 200) {
console.log('delete success');
} else {

View File

@ -1,8 +1,8 @@
import { query } from '@/module/query.ts';
type OperateAction = 'start' | 'stop' | 'restart' | 'reload' | 'delete' | 'update' | 'install' | 'uninstall';
type OperateAction = 'start' | 'stop' | 'restart' | 'reload' | 'removeApp' | 'update' | 'install';
export const queryServiceOperate = async (appKey: string, action: OperateAction) => {
if (['start', 'stop', 'restart'].indexOf(action) === -1) {
if (['start', 'stop', 'restart', 'removeApp'].indexOf(action) === -1) {
throw new Error('Invalid action');
}
return await query.post({

@ -1 +1 @@
Subproject commit 54672a5574d359220e26ec17c69f567f130d9498
Subproject commit fdf6d3ac0a2c12cbac15a50d5089c6497c51a271