@tinycloud/cli 1.0.0-beta.20 → 1.0.0-beta.21

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.
@@ -27479,6 +27479,14 @@ function shareCliError(error) {
27479
27479
  const localKey = "localKey" in failure && failure.localKey === true;
27480
27480
  const profileHint = profileName === void 0 ? "" : `--profile ${profileName} `;
27481
27481
  const loginHint = localKey ? `\`tc ${profileHint}auth login --method local\`` : `\`tc ${profileHint}auth login --device --manifest builtin:share-publishing\` (or \`tc ${profileHint}enable share\`)`;
27482
+ if (failure.kind === "caveated-session") {
27483
+ const holder = profileName === void 0 ? "this session" : `profile ${profileName}'s session`;
27484
+ return new CLIError(
27485
+ "PERMISSION_DENIED",
27486
+ `${holder} carries signed restrictions (caveats) on the authority an anyone-with-link share needs, so it cannot create the share link; nothing was shared. Approve Share publishing without restrictions on a new, dedicated profile (any unused name): \`tc init --name publisher --key-only && tc --profile publisher enable share\``,
27487
+ 5
27488
+ );
27489
+ }
27482
27490
  if (failure.kind === "owner-space-unresolved") {
27483
27491
  return new CLIError("AUTH_REQUIRED", `a valid signed TinyCloud session is required; run ${loginHint}`, 3);
27484
27492
  }