@tinycloud/cli 1.3.3-beta.0 → 1.3.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.
- package/dist/legacy-entry.js +10 -2
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +6 -6
package/dist/legacy-entry.js
CHANGED
|
@@ -32276,6 +32276,7 @@ async function lookupOwnerSpaceOnNode(node, cid, ownerDid) {
|
|
|
32276
32276
|
}
|
|
32277
32277
|
|
|
32278
32278
|
// src/lib/revoke-delegation.ts
|
|
32279
|
+
var REVOKE_AUTHORITY_EXPIRY = "5m";
|
|
32279
32280
|
function normalizeDid2(input) {
|
|
32280
32281
|
const trimmed = input.trim();
|
|
32281
32282
|
const fragment = trimmed.indexOf("#");
|
|
@@ -32400,7 +32401,7 @@ async function revokeDelegationOnNode(params) {
|
|
|
32400
32401
|
profile,
|
|
32401
32402
|
node,
|
|
32402
32403
|
requested: [revokePermission],
|
|
32403
|
-
expiryOption:
|
|
32404
|
+
expiryOption: REVOKE_AUTHORITY_EXPIRY,
|
|
32404
32405
|
reason: `Revoke delegation ${cid}`,
|
|
32405
32406
|
yes: params.yes,
|
|
32406
32407
|
consentAlreadyGiven: true,
|
|
@@ -32446,7 +32447,7 @@ async function revokeDelegationOnNode(params) {
|
|
|
32446
32447
|
path: "",
|
|
32447
32448
|
actions: ["tinycloud.delegation/revoke"]
|
|
32448
32449
|
}],
|
|
32449
|
-
expiryOption:
|
|
32450
|
+
expiryOption: REVOKE_AUTHORITY_EXPIRY,
|
|
32450
32451
|
reason: fallback.source === "node-delegation-record" ? `Revoke delegation ${cid} using the node's record of the owner's grant` : `Revoke delegation ${cid} using its CID-bound owner-signed grant ${fallback.source === "local-stored-grant" ? "record" : "artifact"}`,
|
|
32451
32452
|
yes: params.yes,
|
|
32452
32453
|
consentAlreadyGiven: true,
|
|
@@ -34599,6 +34600,13 @@ async function ensureDelegationAuthority(params) {
|
|
|
34599
34600
|
}
|
|
34600
34601
|
if (params.profile.authMethod === "openkey") {
|
|
34601
34602
|
if (params.persist === false) {
|
|
34603
|
+
if (params.expiryOption === void 0) {
|
|
34604
|
+
throw new CLIError(
|
|
34605
|
+
"AUTHORITY_EXPIRY_REQUIRED",
|
|
34606
|
+
"One-use command authority needs an explicit lifetime; none was given, so no approval was requested.",
|
|
34607
|
+
ExitCode.ERROR
|
|
34608
|
+
);
|
|
34609
|
+
}
|
|
34602
34610
|
const { delegation } = await acquireOpenKeyApproval(params);
|
|
34603
34611
|
await params.node.useRuntimeDelegation(delegation);
|
|
34604
34612
|
return delegation;
|