@mastra/platform-workspace 1.13.0-alpha.0 → 1.13.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
@@ -3126,6 +3126,7 @@ function createRepoTemplate(options) {
3126
3126
  for (const repo of repos) if (repo.tokenEnv && repo.token) buildEnv[repo.tokenEnv] = repo.token;
3127
3127
  if (Object.keys(buildEnv).length > 0) template = template.setEnvs(buildEnv, { ephemeral: true });
3128
3128
  template = withResources(template, options);
3129
+ if (options.buildEnvRevision) template = template.setEnvs({ MASTRA_BUILD_ENV_REVISION: options.buildEnvRevision });
3129
3130
  if (workingDirectory) template = template.runCmd(`mkdir -p "${workingDirectory}"`).setWorkdir(workingDirectory);
3130
3131
  const ordered = [...repos.filter((repo) => !repo.token), ...repos.filter((repo) => repo.token)];
3131
3132
  for (const repo of ordered) {
@@ -3496,9 +3497,15 @@ var PlatformFactorySandbox = class extends FactorySandbox {
3496
3497
  }
3497
3498
  template(ctx, settings) {
3498
3499
  const { defaults, template } = this.#options;
3500
+ const { buildEnv, buildEnvRevision, ...rest } = ctx;
3501
+ const mergedBuildEnv = {
3502
+ ...template?.buildEnv,
3503
+ ...buildEnv
3504
+ };
3499
3505
  return createRepoTemplate({
3500
- ...ctx,
3501
- ...template?.buildEnv ? { buildEnv: template.buildEnv } : {},
3506
+ ...rest,
3507
+ ...Object.keys(mergedBuildEnv).length > 0 ? { buildEnv: mergedBuildEnv } : {},
3508
+ ...buildEnvRevision ? { buildEnvRevision } : {},
3502
3509
  cpuCount: settings.cpuCount ?? defaults?.cpuCount ?? DEFAULT_SETTINGS.cpuCount,
3503
3510
  memoryMB: settings.memoryMb ?? defaults?.memoryMb ?? DEFAULT_SETTINGS.memoryMb,
3504
3511
  docker: settings.docker ?? defaults?.docker ?? DEFAULT_SETTINGS.docker