@tinycloud/node-sdk 3.2.5 → 3.2.6-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
@@ -18478,6 +18478,9 @@ function addRawAbility(rawAbilities, resource, action) {
18478
18478
  actions.push(action);
18479
18479
  }
18480
18480
  }
18481
+ function primaryManifestSpace(resources) {
18482
+ return resources.find((entry) => entry.space !== "account")?.space ?? resources[0]?.space ?? import_sdk_core4.DEFAULT_MANIFEST_SPACE;
18483
+ }
18481
18484
  function cloneAbilitiesMap(actions) {
18482
18485
  return Object.fromEntries(
18483
18486
  Object.entries(actions).map(([service, paths]) => [
@@ -18848,7 +18851,7 @@ var NodeUserAuthorization = class {
18848
18851
  const spaceResources = request.resources.filter(
18849
18852
  (entry) => entry.service !== import_sdk_core4.ENCRYPTION_PERMISSION_SERVICE
18850
18853
  );
18851
- const primarySpaceName = spaceResources.find((entry) => entry.space !== "account")?.space ?? import_sdk_core4.DEFAULT_MANIFEST_SPACE;
18854
+ const primarySpaceName = primaryManifestSpace(spaceResources);
18852
18855
  const primarySpaceId = this.resolveSpaceName(
18853
18856
  primarySpaceName,
18854
18857
  address,
@@ -18963,7 +18966,7 @@ var NodeUserAuthorization = class {
18963
18966
  }
18964
18967
  return false;
18965
18968
  });
18966
- const primarySpaceName = spaceResources.find((entry) => entry.space !== "account")?.space ?? import_sdk_core4.DEFAULT_MANIFEST_SPACE;
18969
+ const primarySpaceName = primaryManifestSpace(spaceResources);
18967
18970
  const primarySpaceId = this.resolveSpaceName(
18968
18971
  primarySpaceName,
18969
18972
  address,