@tinycloud/node-sdk 3.1.0-beta.4 → 3.1.0-beta.5
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/{core-Bm76PnOz.d.cts → core-BWvBTn9l.d.cts} +5 -0
- package/dist/{core-Bm76PnOz.d.ts → core-BWvBTn9l.d.ts} +5 -0
- package/dist/core.cjs +3 -0
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -0
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24892,6 +24892,9 @@ async function activateValidatedRuntimeDelegation(node, delegation, options) {
|
|
|
24892
24892
|
if (!resourcesMatch(declaredResources, signed2.resources)) {
|
|
24893
24893
|
throw new Error("Runtime delegation resources do not match signed authority.");
|
|
24894
24894
|
}
|
|
24895
|
+
if (options.authorize !== void 0 && !options.authorize(signed2.permissions)) {
|
|
24896
|
+
throw new Error("Runtime delegation is not authorized for this runtime.");
|
|
24897
|
+
}
|
|
24895
24898
|
const previouslyInstalled = node.getRuntimePermissionDelegations().find((candidate) => candidate.cid === cid);
|
|
24896
24899
|
if (previouslyInstalled !== void 0 && previouslyInstalled.delegationHeader.Authorization !== authorization) {
|
|
24897
24900
|
throw new Error(
|