fix(cli): delete workspace instead of archiving them

This commit is contained in:
Ruben Fiszel
2023-02-22 15:50:34 +01:00
parent ca3572a2a1
commit 70dfc8b8d0
2 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
// windmill
export { setClient } from "https://deno.land/x/windmill@v1.65.0/mod.ts";
export * from "https://deno.land/x/windmill@v1.65.0/windmill-api/index.ts";
export { setClient } from "https://deno.land/x/windmill@v1.66.0/mod.ts";
export * from "https://deno.land/x/windmill@v1.66.0/windmill-api/index.ts";
// cliffy
export { Command } from "https://deno.land/x/cliffy@v0.25.7/command/command.ts";
+6 -3
View File
@@ -313,7 +313,7 @@ async function pull(
}
}
}
console.log(colors.green.underline(`Done! All ${changes.length} changes pushed to the remote.`));
console.log(colors.green.underline(`Done! All ${changes.length} changes applied locally.`));
}
@@ -484,7 +484,7 @@ async function push(opts: GlobalOptions & { raw: boolean, yes: boolean, skipPull
await ResourceService.deleteResourceType({ workspace: workspaceId, path: removeSuffix(change.path, ".resource-type.json") })
break
case "flow":
await FlowService.archiveFlowByPath({ workspace: workspaceId, path: removeSuffix(change.path, ".flow.json") })
await FlowService.deleteFlowByPath({ workspace: workspaceId, path: removeSuffix(change.path, ".flow.json") })
break
case "app":
await AppService.deleteApp({ workspace: workspaceId, path: removeSuffix(change.path, ".app.json") })
@@ -495,9 +495,12 @@ async function push(opts: GlobalOptions & { raw: boolean, yes: boolean, skipPull
default:
break;
}
try {
Deno.remove(stateTarget)
} catch { }
}
}
console.log(colors.green.underline(`Done! All ${changes.length} changes applied locally.`));
console.log(colors.green.underline(`Done! All ${changes.length} changes pushed to the remote workspace.`));
}