@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/index.js CHANGED
@@ -355,8 +355,13 @@ function canonicalizeRecapCaveats(caveats) {
355
355
  }
356
356
  return `[${branches.join(",")}]`;
357
357
  }
358
+ function isExplicitOnlyAction(action) {
359
+ return Object.prototype.hasOwnProperty.call(EXPLICIT_ONLY_ACTIONS, action);
360
+ }
358
361
  function actionContains(grantedAction, requestedAction) {
359
- if (grantedAction === "*" || grantedAction === requestedAction) return true;
362
+ if (grantedAction === requestedAction) return true;
363
+ if (isExplicitOnlyAction(requestedAction)) return false;
364
+ if (grantedAction === "*") return true;
360
365
  if (!grantedAction.endsWith("/*")) return false;
361
366
  const service = grantedAction.slice(0, -2);
362
367
  return requestedAction === service || requestedAction.startsWith(`${service}/`);
@@ -381,10 +386,15 @@ function cloneEntry(entry) {
381
386
  ...entry.expiry !== void 0 ? { expiry: entry.expiry } : {}
382
387
  };
383
388
  }
389
+ var EXPLICIT_ONLY_ACTIONS;
384
390
  var init_capabilities = __esm({
385
391
  "../sdk-core/src/capabilities.ts"() {
386
392
  "use strict";
387
393
  init_manifest();
394
+ EXPLICIT_ONLY_ACTIONS = {
395
+ "tinycloud.kv/sync": true,
396
+ "tinycloud.kv/retain": true
397
+ };
388
398
  }
389
399
  });
390
400