@mastra/daytona 0.5.1 → 0.5.2
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 +40 -0
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/sandbox/mounts/gcs.d.ts +5 -0
- package/dist/sandbox/mounts/gcs.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -242,7 +242,13 @@ Sandbox network response: ${checkOutput}` : "")
|
|
|
242
242
|
await run(
|
|
243
243
|
`sudo chmod a+rw /dev/fuse 2>/dev/null || true; sudo bash -c 'grep -q "^user_allow_other" /etc/fuse.conf 2>/dev/null || echo "user_allow_other" >> /etc/fuse.conf' 2>/dev/null || true`
|
|
244
244
|
);
|
|
245
|
+
let onlyDirFlag = "";
|
|
246
|
+
if (config.prefix) {
|
|
247
|
+
const normalizedPrefix = validatePrefix(config.prefix);
|
|
248
|
+
onlyDirFlag = `--only-dir=${shellQuote(normalizedPrefix)} `;
|
|
249
|
+
}
|
|
245
250
|
const hasCredentials = !!config.serviceAccountKey;
|
|
251
|
+
const implicitDirsFlag = "--implicit-dirs";
|
|
246
252
|
let mountCmd;
|
|
247
253
|
if (hasCredentials) {
|
|
248
254
|
const mountHash = createHash("md5").update(mountPath).digest("hex").slice(0, 8);
|
|
@@ -250,10 +256,10 @@ Sandbox network response: ${checkOutput}` : "")
|
|
|
250
256
|
await run(`sudo rm -f ${shellQuote(keyPath)}`, 3e4);
|
|
251
257
|
await writeFile(keyPath, config.serviceAccountKey);
|
|
252
258
|
await run(`chmod 600 ${shellQuote(keyPath)}`, 3e4);
|
|
253
|
-
mountCmd = `gcsfuse --key-file=${shellQuote(keyPath)} -o allow_other ${uidGidFlags} ${shellQuote(config.bucket)} ${quotedMountPath}`;
|
|
259
|
+
mountCmd = `gcsfuse --key-file=${shellQuote(keyPath)} ${implicitDirsFlag} ${onlyDirFlag}-o allow_other ${uidGidFlags} ${shellQuote(config.bucket)} ${quotedMountPath}`;
|
|
254
260
|
} else {
|
|
255
261
|
logger.debug(`${LOG_PREFIX} No credentials provided, mounting GCS as public bucket (read-only)`);
|
|
256
|
-
mountCmd = `gcsfuse --anonymous-access -o allow_other ${uidGidFlags} ${shellQuote(config.bucket)} ${quotedMountPath}`;
|
|
262
|
+
mountCmd = `gcsfuse --anonymous-access ${implicitDirsFlag} ${onlyDirFlag}-o allow_other ${uidGidFlags} ${shellQuote(config.bucket)} ${quotedMountPath}`;
|
|
257
263
|
}
|
|
258
264
|
logger.debug(`${LOG_PREFIX} Mounting GCS:`, mountCmd);
|
|
259
265
|
const result = await run(mountCmd, 6e4);
|