@tinycloud/node-sdk 2.1.0-beta.3 → 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/core.cjs CHANGED
@@ -2476,9 +2476,19 @@ var _TinyCloudNode = class _TinyCloudNode {
2476
2476
  expirationSecs
2477
2477
  });
2478
2478
  const primary = result.resources[0];
2479
+ const delegationHeader = { Authorization: `Bearer ${result.delegation}` };
2480
+ const activateResult = await (0, import_sdk_core5.activateSessionWithHost)(
2481
+ this.config.host,
2482
+ delegationHeader
2483
+ );
2484
+ if (!activateResult.success) {
2485
+ throw new Error(
2486
+ `Failed to activate delegation with host: ${activateResult.error}`
2487
+ );
2488
+ }
2479
2489
  return {
2480
2490
  cid: result.cid,
2481
- delegationHeader: { Authorization: `Bearer ${result.delegation}` },
2491
+ delegationHeader,
2482
2492
  spaceId,
2483
2493
  path: primary.path,
2484
2494
  actions: primary.actions,