@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
package/dist/artifacts.cjs
CHANGED
|
@@ -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 ===
|
|
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}/`);
|