@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/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
|
|
19482
|
+
delegationHeader,
|
|
19473
19483
|
spaceId,
|
|
19474
19484
|
path: primary.path,
|
|
19475
19485
|
actions: primary.actions,
|