@tinycloud/cli 1.3.0-beta.32 → 1.3.0-beta.33

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.
package/dist/index.js CHANGED
@@ -26691,7 +26691,7 @@ function byteLimit(value) {
26691
26691
  }
26692
26692
  function mediaTypeFor(filename) {
26693
26693
  const extension = filename.toLowerCase().split(".").at(-1);
26694
- return extension === "md" || extension === "markdown" ? "text/markdown" : extension === "txt" ? "text/plain" : extension === "html" || extension === "htm" ? "text/html" : extension === "json" ? "application/json" : extension === "css" ? "text/css" : extension === "js" ? "text/javascript" : "application/octet-stream";
26694
+ return extension === "md" || extension === "markdown" ? "text/markdown" : extension === "txt" ? "text/plain" : extension === "html" || extension === "htm" ? "text/html" : extension === "json" ? "application/json" : extension === "css" ? "text/css" : extension === "js" ? "text/javascript" : extension === "jsx" ? "text/jsx" : extension === "tsx" ? "text/tsx" : "application/octet-stream";
26695
26695
  }
26696
26696
  function requestedActions(values) {
26697
26697
  const actions = values === void 0 || values.length === 0 ? ["read"] : values;
@@ -26721,6 +26721,7 @@ function registerShareCommand(program2) {
26721
26721
  const target = parseShareTarget(options.to);
26722
26722
  const actions = requestedActions(options.action);
26723
26723
  if (options.prefix && target.kind === "bearer") throw new CLIError("INVALID_ARGUMENT", "--prefix requires an addressed target", 2);
26724
+ if (target.kind === "bearer" && actions.includes("edit")) throw new CLIError("INVALID_ARGUMENT", `--action edit is not available with --to ${options.to}: a link can only be read; address a recipient to allow edits`, 2);
26724
26725
  if (inputs.length > 1 && target.kind === "bearer") throw new CLIError("UNSUPPORTED_LINK", "multiple files require an addressed target", 2);
26725
26726
  const artifact = artifactRequest(options, actions, inputs.length);
26726
26727
  if (inputs.length > 1 && !options.prefix) throw new CLIError("INVALID_ARGUMENT", "multiple files require --prefix", 2);