replicas-cli 0.3.500 → 0.3.502

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.cjs +4 -3
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -39732,7 +39732,7 @@ var CLI_VERSION;
39732
39732
  var init_cli_version = __esm({
39733
39733
  "../shared/src/cli-version.ts"() {
39734
39734
  "use strict";
39735
- CLI_VERSION = "0.3.500";
39735
+ CLI_VERSION = "0.3.502";
39736
39736
  }
39737
39737
  });
39738
39738
 
@@ -56307,7 +56307,8 @@ async function mediaRevokeCommand(mediaId) {
56307
56307
  outputSuccess(`Revoked public share for ${mediaId}`);
56308
56308
  }
56309
56309
  async function mediaDeleteCommand(mediaId) {
56310
- await agentFetch(`/v1/engine/media/${mediaId}`, { method: "DELETE" });
56310
+ if (isAgentMode()) await agentFetch(`/v1/engine/media/${mediaId}`, { method: "DELETE" });
56311
+ else await orgAuthenticatedFetch(`/v1/media/${mediaId}`, { method: "DELETE" });
56311
56312
  outputSuccess(`Deleted media ${mediaId}`);
56312
56313
  }
56313
56314
  async function mediaListCommand(options) {
@@ -57967,6 +57968,7 @@ var init_src2 = __esm({
57967
57968
  media = program.command("media").description("Share workspace media and HTML pages");
57968
57969
  media.command("list").description("List media uploaded by a workspace (this workspace by default inside one)").option("-w, --workspace <id>", "Workspace ID").option("-k, --kind <kind>", "Filter by kind: image, video, audio, or html").option("-l, --limit <n>", "Page size (default 50, max 200)").option("-p, --page <n>", "Page number (default 1)").action(run(mediaListCommand));
57969
57970
  media.command("url <mediaId>").description("Print a short-lived download URL for media").action(run(mediaUrlCommand));
57971
+ media.command("delete <mediaId>").description("Permanently delete media and stop all of its links working").action(run(mediaDeleteCommand));
57970
57972
  environment = program.command("environment").alias("env").description("Manage environments (org-scoped templates that back workspaces)");
57971
57973
  environment.command("list").description("List all environments").action(run(environmentListCommand));
57972
57974
  environment.command("get <id-or-name>").description("Get an environment by ID or name").action(run(environmentGetCommand));
@@ -58074,7 +58076,6 @@ Page rules:
58074
58076
  ${VISUAL_PAGE_RULES}`).action(run(visualizeCommand));
58075
58077
  media.command("share <mediaId>").description("Rotate an image's public forge URL, or create one for video or audio media").action(run(mediaShareCommand));
58076
58078
  media.command("revoke <mediaId>").description("Revoke the public forge URL for uploaded media").action(run(mediaRevokeCommand));
58077
- media.command("delete <mediaId>").description("Permanently delete media uploaded by this workspace").action(run(mediaDeleteCommand));
58078
58079
  const addComputeCommands = (kind, addCreateOptions) => {
58079
58080
  const label = COMPUTE_SANDBOX_LABELS[kind];
58080
58081
  const workdir = COMPUTE_SANDBOX_WORKDIRS[kind];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.500",
3
+ "version": "0.3.502",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {