@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.cjs +10 -1
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +10 -1
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +11 -1
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.js +11 -1
- package/dist/cli-runtime.js.map +1 -1
- package/dist/delegation-binding.cjs +10 -1
- package/dist/delegation-binding.cjs.map +1 -1
- package/dist/delegation-binding.js +10 -1
- package/dist/delegation-binding.js.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -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 ===
|
|
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}/`);
|