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