@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 +11 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +11 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/core.js
CHANGED
|
@@ -2443,9 +2443,19 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
2443
2443
|
expirationSecs
|
|
2444
2444
|
});
|
|
2445
2445
|
const primary = result.resources[0];
|
|
2446
|
+
const delegationHeader = { Authorization: `Bearer ${result.delegation}` };
|
|
2447
|
+
const activateResult = await activateSessionWithHost2(
|
|
2448
|
+
this.config.host,
|
|
2449
|
+
delegationHeader
|
|
2450
|
+
);
|
|
2451
|
+
if (!activateResult.success) {
|
|
2452
|
+
throw new Error(
|
|
2453
|
+
`Failed to activate delegation with host: ${activateResult.error}`
|
|
2454
|
+
);
|
|
2455
|
+
}
|
|
2446
2456
|
return {
|
|
2447
2457
|
cid: result.cid,
|
|
2448
|
-
delegationHeader
|
|
2458
|
+
delegationHeader,
|
|
2449
2459
|
spaceId,
|
|
2450
2460
|
path: primary.path,
|
|
2451
2461
|
actions: primary.actions,
|