@tinycloud/sdk-core 3.1.0-beta.8 → 3.1.0-beta.9
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/delegations/index.cjs +13 -2
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.d.cts +29 -29
- package/dist/delegations/index.d.ts +29 -29
- package/dist/delegations/index.js +13 -2
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -16
- package/dist/index.d.ts +23 -16
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/policy/index.d.cts +2 -2
- package/dist/policy/index.d.ts +2 -2
- package/dist/{recipient-types.schema-B5vpbtf-.d.cts → recipient-types.schema-_JkBDZB6.d.cts} +177 -177
- package/dist/{recipient-types.schema-B5vpbtf-.d.ts → recipient-types.schema-_JkBDZB6.d.ts} +177 -177
- package/package.json +3 -3
- package/dist/{credential-admission-Cfum4B79.d.cts → credential-admission-BxpkckU0.d.cts} +4 -4
- package/dist/{credential-admission-CFsYiCPH.d.ts → credential-admission-CO9WMtGs.d.ts} +4 -4
|
@@ -1507,8 +1507,17 @@ function canonicalizeRecapCaveats(caveats) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
return `[${branches.join(",")}]`;
|
|
1509
1509
|
}
|
|
1510
|
+
var EXPLICIT_ONLY_ACTIONS = {
|
|
1511
|
+
"tinycloud.kv/sync": true,
|
|
1512
|
+
"tinycloud.kv/retain": true
|
|
1513
|
+
};
|
|
1514
|
+
function isExplicitOnlyAction(action) {
|
|
1515
|
+
return Object.prototype.hasOwnProperty.call(EXPLICIT_ONLY_ACTIONS, action);
|
|
1516
|
+
}
|
|
1510
1517
|
function actionContains(grantedAction, requestedAction) {
|
|
1511
|
-
if (grantedAction ===
|
|
1518
|
+
if (grantedAction === requestedAction) return true;
|
|
1519
|
+
if (isExplicitOnlyAction(requestedAction)) return false;
|
|
1520
|
+
if (grantedAction === "*") return true;
|
|
1512
1521
|
if (!grantedAction.endsWith("/*")) return false;
|
|
1513
1522
|
const service = grantedAction.slice(0, -2);
|
|
1514
1523
|
return requestedAction === service || requestedAction.startsWith(`${service}/`);
|
|
@@ -5740,7 +5749,9 @@ var SharingService = class {
|
|
|
5740
5749
|
if (delegation.allowSubDelegation === false) continue;
|
|
5741
5750
|
if (!this.pathMatches(delegation.path || "", path)) continue;
|
|
5742
5751
|
const delegationActions = delegation.actions || [];
|
|
5743
|
-
if (!actions.every(
|
|
5752
|
+
if (!actions.every(
|
|
5753
|
+
(action) => delegationActions.some((granted) => actionContains(granted, action))
|
|
5754
|
+
)) {
|
|
5744
5755
|
continue;
|
|
5745
5756
|
}
|
|
5746
5757
|
if ((delegation.caveats?.length ?? 0) > 0) {
|