@hasna/sandboxes 0.1.13 → 0.1.15

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/cli/index.js +17 -0
  2. package/package.json +2 -1
package/dist/cli/index.js CHANGED
@@ -3932,6 +3932,23 @@ program2.command("delete <id>").description("Delete a sandbox").action(async (id
3932
3932
  handleError(err);
3933
3933
  }
3934
3934
  });
3935
+ for (const alias of ["remove", "uninstall", "rm"]) {
3936
+ program2.command(`${alias} <id>`).description(`Delete a sandbox (alias for delete)`).action(async (id) => {
3937
+ try {
3938
+ const sandbox = getSandbox(id);
3939
+ if (sandbox.provider_sandbox_id) {
3940
+ try {
3941
+ const p = await getProvider(sandbox.provider);
3942
+ await p.delete(sandbox.provider_sandbox_id);
3943
+ } catch {}
3944
+ }
3945
+ deleteSandbox(sandbox.id);
3946
+ console.log(chalk.green(`Sandbox ${shortId(sandbox.id)} deleted.`));
3947
+ } catch (err) {
3948
+ handleError(err);
3949
+ }
3950
+ });
3951
+ }
3935
3952
  program2.command("logs <id>").description("Show event logs for a sandbox").option("-f, --follow", "Follow log output").option("-s, --session <session_id>", "Filter by session ID").option("-l, --limit <n>", "Max number of events", "50").action(async (id, opts) => {
3936
3953
  try {
3937
3954
  const sandbox = getSandbox(id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/sandboxes",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "author": "Andrei Hasna <andrei@hasna.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,6 +62,7 @@
62
62
  ],
63
63
  "license": "Apache-2.0",
64
64
  "publishConfig": {
65
+ "registry": "https://registry.npmjs.org",
65
66
  "access": "public"
66
67
  },
67
68
  "scripts": {