@tinycloud/operations 0.4.0-beta.11 → 0.4.0-beta.13

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.
@@ -278,8 +278,17 @@ function canonicalizeRecapCaveats(caveats) {
278
278
  }
279
279
  return `[${branches.join(",")}]`;
280
280
  }
281
+ var EXPLICIT_ONLY_ACTIONS = {
282
+ "tinycloud.kv/sync": true,
283
+ "tinycloud.kv/retain": true
284
+ };
285
+ function isExplicitOnlyAction(action) {
286
+ return Object.prototype.hasOwnProperty.call(EXPLICIT_ONLY_ACTIONS, action);
287
+ }
281
288
  function actionContains(grantedAction, requestedAction) {
282
- if (grantedAction === "*" || grantedAction === requestedAction) return true;
289
+ if (grantedAction === requestedAction) return true;
290
+ if (isExplicitOnlyAction(requestedAction)) return false;
291
+ if (grantedAction === "*") return true;
283
292
  if (!grantedAction.endsWith("/*")) return false;
284
293
  const service = grantedAction.slice(0, -2);
285
294
  return requestedAction === service || requestedAction.startsWith(`${service}/`);