@tinycloud/node-sdk 2.1.0-beta.2 → 2.1.0-beta.4

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
@@ -19461,9 +19461,19 @@ var _TinyCloudNode = class _TinyCloudNode {
19461
19461
  expirationSecs
19462
19462
  });
19463
19463
  const primary = result.resources[0];
19464
+ const delegationHeader = { Authorization: `Bearer ${result.delegation}` };
19465
+ const activateResult = await (0, import_sdk_core4.activateSessionWithHost)(
19466
+ this.config.host,
19467
+ delegationHeader
19468
+ );
19469
+ if (!activateResult.success) {
19470
+ throw new Error(
19471
+ `Failed to activate delegation with host: ${activateResult.error}`
19472
+ );
19473
+ }
19464
19474
  return {
19465
19475
  cid: result.cid,
19466
- delegationHeader: { Authorization: `Bearer ${result.delegation}` },
19476
+ delegationHeader,
19467
19477
  spaceId,
19468
19478
  path: primary.path,
19469
19479
  actions: primary.actions,