@mastra/e2b 0.5.0 → 0.5.1
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/CHANGELOG.md +18 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/sandbox/mounts/s3.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -99,7 +99,12 @@ Error details: ${installResult.stderr || installResult.stdout}`
|
|
|
99
99
|
}
|
|
100
100
|
const idResult = await sandbox.commands.run("id -u && id -g");
|
|
101
101
|
const [uid, gid] = idResult.stdout.trim().split("\n");
|
|
102
|
-
const
|
|
102
|
+
const hasAccessKey = !!config.accessKeyId;
|
|
103
|
+
const hasSecretKey = !!config.secretAccessKey;
|
|
104
|
+
if (hasAccessKey !== hasSecretKey) {
|
|
105
|
+
throw new Error("Both accessKeyId and secretAccessKey must be provided together.");
|
|
106
|
+
}
|
|
107
|
+
const hasCredentials = hasAccessKey && hasSecretKey;
|
|
103
108
|
const mountHash = createHash("md5").update(mountPath).digest("hex").slice(0, 8);
|
|
104
109
|
const credentialsPath = `/tmp/.passwd-s3fs-${mountHash}`;
|
|
105
110
|
if (!hasCredentials && config.endpoint) {
|