@tinycloud/cli 1.2.3-beta.1 → 1.2.3-beta.2

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.
@@ -34231,7 +34231,7 @@ async function revokeShare(input) {
34231
34231
  if (delegationCid === void 0) return { state: "unsupported", target, reason: "share has no node-enforced delegation receipt", code: "unsupported-target" };
34232
34232
  if (target === "bearer") {
34233
34233
  if (input.adapter.revokeDelegation === void 0) return { state: "unsupported", target, reason: "native delegation revocation authority is required", code: "unsupported-target" };
34234
- await input.adapter.revokeDelegation({ delegationCid, scope });
34234
+ await input.adapter.revokeDelegation({ delegationCid, scope, record: input.record });
34235
34235
  } else {
34236
34236
  if (input.record.ownerDid === void 0) return { state: "unsupported", target, reason: "share has no Policy/v3 owner receipt", code: "unsupported-target" };
34237
34237
  if (input.adapter.revokePolicyRoot === void 0) return { state: "unsupported", target, reason: "Policy/v3 root revocation authority is required", code: "unsupported-target" };
@@ -34243,11 +34243,14 @@ async function revokeShare(input) {
34243
34243
  nodeAudience: policyNodeAudience(input.record)
34244
34244
  });
34245
34245
  }
34246
- const revokedAt = (input.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
34246
+ let revokedAt = input.record.revokedAt ?? (input.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
34247
34247
  if (input.records?.update !== void 0) {
34248
- await input.records.update(input.record.shareId, (record2) => ({ ...record2, revokedAt }));
34248
+ const updated = await input.records.update(input.record.shareId, (record2) => ({ ...record2, revokedAt: record2.revokedAt ?? revokedAt }));
34249
+ revokedAt = updated?.revokedAt ?? revokedAt;
34249
34250
  } else if (input.records !== void 0) {
34250
- await input.records.put({ ...input.record, revokedAt });
34251
+ const latest = await input.records.get(input.record.shareId);
34252
+ revokedAt = latest?.revokedAt ?? revokedAt;
34253
+ await input.records.put({ ...latest ?? input.record, revokedAt });
34251
34254
  }
34252
34255
  return { state: "revoked", target, delegationCid, revokedAt };
34253
34256
  }
@@ -36161,7 +36164,7 @@ function registerShareCommand(program) {
36161
36164
  return handleError(shareCliError(error, "notify"));
36162
36165
  }
36163
36166
  });
36164
- share.command("revoke <id>").description("Revoke addressed shares; report bearer retention honestly").option("--ancestor", "Revoke the owner delegation ancestry").option("--json", "Print versioned JSON").action(async (id, options, command) => {
36167
+ share.command("revoke <id>").description("Revoke a bearer or addressed share this profile created").option("--ancestor", "Revoke the owner delegation ancestry").option("--json", "Print versioned JSON").action(async (id, options, command) => {
36165
36168
  try {
36166
36169
  const json = jsonOutput(options, command);
36167
36170
  if (shareServices.records === void 0) throw new CLIError("AUTH_REQUIRED", "sender history storage is not configured", 3);