@tinycloud/operations 0.4.0-beta.12 → 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.
@@ -257,8 +257,17 @@ function canonicalizeRecapCaveats(caveats) {
257
257
  }
258
258
  return `[${branches.join(",")}]`;
259
259
  }
260
+ var EXPLICIT_ONLY_ACTIONS = {
261
+ "tinycloud.kv/sync": true,
262
+ "tinycloud.kv/retain": true
263
+ };
264
+ function isExplicitOnlyAction(action) {
265
+ return Object.prototype.hasOwnProperty.call(EXPLICIT_ONLY_ACTIONS, action);
266
+ }
260
267
  function actionContains(grantedAction, requestedAction) {
261
- if (grantedAction === "*" || grantedAction === requestedAction) return true;
268
+ if (grantedAction === requestedAction) return true;
269
+ if (isExplicitOnlyAction(requestedAction)) return false;
270
+ if (grantedAction === "*") return true;
262
271
  if (!grantedAction.endsWith("/*")) return false;
263
272
  const service = grantedAction.slice(0, -2);
264
273
  return requestedAction === service || requestedAction.startsWith(`${service}/`);