@erdoai/cli 0.241.2 → 0.242.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +15 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2463,6 +2463,12 @@ var ErdoClient = class {
2463
2463
  { state }
2464
2464
  );
2465
2465
  }
2466
+ deleteHeartbeat(id) {
2467
+ return this.request(
2468
+ "DELETE",
2469
+ `/v1/heartbeats/${encodeURIComponent(id)}`
2470
+ );
2471
+ }
2466
2472
  // --- kv (named key/value stores, a.k.a. collections) ---
2467
2473
  listKVStores() {
2468
2474
  return this.request("GET", "/v1/kv");
@@ -11709,6 +11715,15 @@ autoCmd.command("enable <id>").description("Re-enable a disabled automation").ac
11709
11715
  fail(e);
11710
11716
  }
11711
11717
  });
11718
+ autoCmd.command("delete <id>").description("Delete an automation for good, with its schedule and run history (use disable to pause it instead)").action(async (id) => {
11719
+ try {
11720
+ const result = await new ErdoClient().deleteHeartbeat(id);
11721
+ if (!result.deleted) throw new Error(`Automation ${id} was not deleted`);
11722
+ console.log(`Deleted automation ${result.id}`);
11723
+ } catch (e) {
11724
+ fail(e);
11725
+ }
11726
+ });
11712
11727
  var kvCmd = program.command("kv").description("Named key/value stores");
11713
11728
  kvCmd.command("list").description("List KV stores").action(async () => {
11714
11729
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.241.2",
3
+ "version": "0.242.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {