@mastra/platform-workspace 1.4.0 → 1.4.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/CHANGELOG.md +16 -0
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/sandbox.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1471,10 +1471,18 @@ var PlatformSandbox = class PlatformSandbox extends MastraSandbox {
|
|
|
1471
1471
|
const started = Date.now();
|
|
1472
1472
|
const fullCommand = buildCommand(command, args);
|
|
1473
1473
|
const effectiveTimeout = options?.timeout ?? this._timeout;
|
|
1474
|
+
const sandboxEnv = this.getEnv();
|
|
1475
|
+
const execCallOptions = Object.keys(sandboxEnv).length > 0 ? {
|
|
1476
|
+
...options,
|
|
1477
|
+
env: {
|
|
1478
|
+
...sandboxEnv,
|
|
1479
|
+
...options?.env
|
|
1480
|
+
}
|
|
1481
|
+
} : options;
|
|
1474
1482
|
await this._awaitTransportReady();
|
|
1475
1483
|
const instanceUrl = this._addressRegistry?.get(this._sandboxId);
|
|
1476
1484
|
if (instanceUrl) {
|
|
1477
|
-
const privateNet = await this._tryExecViaPrivateNetwork(instanceUrl, fullCommand, effectiveTimeout,
|
|
1485
|
+
const privateNet = await this._tryExecViaPrivateNetwork(instanceUrl, fullCommand, effectiveTimeout, execCallOptions);
|
|
1478
1486
|
if (privateNet) {
|
|
1479
1487
|
const privateExit = privateNet.exitCode ?? 124;
|
|
1480
1488
|
return {
|
|
@@ -1488,7 +1496,7 @@ var PlatformSandbox = class PlatformSandbox extends MastraSandbox {
|
|
|
1488
1496
|
};
|
|
1489
1497
|
}
|
|
1490
1498
|
}
|
|
1491
|
-
const result = await this._runDirectExec(fullCommand, effectiveTimeout,
|
|
1499
|
+
const result = await this._runDirectExec(fullCommand, effectiveTimeout, execCallOptions);
|
|
1492
1500
|
const exitCode = result.exitCode ?? 124;
|
|
1493
1501
|
return {
|
|
1494
1502
|
success: exitCode === 0,
|