@mastra/e2b 0.5.0 → 0.5.1-alpha.0

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
@@ -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 hasCredentials = config.accessKeyId && config.secretAccessKey;
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) {