@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/index.cjs CHANGED
@@ -18975,6 +18975,7 @@ function pkhSpaceIdentity(spaceId) {
18975
18975
  }
18976
18976
  var DECRYPT_ACTION = import_sdk_core5.ENCRYPTION.DECRYPT;
18977
18977
  var NETWORK_CREATE_ACTION = import_sdk_core5.ENCRYPTION.NETWORK_CREATE;
18978
+ var KEY_CREATE_ACTION = "tinycloud.encryption/key.create";
18978
18979
  function describeHostFailure(result) {
18979
18980
  const text = result.error?.trim();
18980
18981
  return text ? `${result.status} - ${text}` : `${result.status}`;
@@ -19616,7 +19617,7 @@ var NodeUserAuthorization = class {
19616
19617
  return true;
19617
19618
  }
19618
19619
  const parsed = entry.path.includes("/") ? (0, import_resource.parseEncryptionResource)(entry.path) : { ...(0, import_sdk_services3.parseNetworkId)(entry.path), kind: "network" };
19619
- const sharePrefix = parsed.kind === "prefix" && parsed.network === "default" && parsed.prefix === "share" && entry.actions.length === 1 && entry.actions[0] === DECRYPT_ACTION && didPrincipalMatches(parsed.ownerDid, currentDid);
19620
+ 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);
19620
19621
  if (parsed.kind !== "network" && !sharePrefix) {
19621
19622
  throw new import_sdk_core5.ManifestValidationError("named keys go in manifest.keys");
19622
19623
  }