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