@tinycloud/node-sdk 3.9.0-beta.8 → 3.9.1-beta.0
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.cjs +2 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +2 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -18974,6 +18974,7 @@ function pkhSpaceIdentity(spaceId) {
|
|
|
18974
18974
|
}
|
|
18975
18975
|
var DECRYPT_ACTION = ENCRYPTION.DECRYPT;
|
|
18976
18976
|
var NETWORK_CREATE_ACTION = ENCRYPTION.NETWORK_CREATE;
|
|
18977
|
+
var KEY_CREATE_ACTION = "tinycloud.encryption/key.create";
|
|
18977
18978
|
function describeHostFailure(result) {
|
|
18978
18979
|
const text = result.error?.trim();
|
|
18979
18980
|
return text ? `${result.status} - ${text}` : `${result.status}`;
|
|
@@ -19615,7 +19616,7 @@ var NodeUserAuthorization = class {
|
|
|
19615
19616
|
return true;
|
|
19616
19617
|
}
|
|
19617
19618
|
const parsed = entry.path.includes("/") ? parseEncryptionResource(entry.path) : { ...parseNetworkId(entry.path), kind: "network" };
|
|
19618
|
-
const sharePrefix = parsed.kind === "prefix" && parsed.network === "default" && parsed.prefix === "share" && entry.actions.length
|
|
19619
|
+
const sharePrefix = parsed.kind === "prefix" && parsed.network === "default" && parsed.prefix === "share" && entry.actions.length > 0 && entry.actions.every((action) => action === DECRYPT_ACTION || action === KEY_CREATE_ACTION) && didPrincipalMatches(parsed.ownerDid, currentDid);
|
|
19619
19620
|
if (parsed.kind !== "network" && !sharePrefix) {
|
|
19620
19621
|
throw new ManifestValidationError("named keys go in manifest.keys");
|
|
19621
19622
|
}
|