'use strict';

var chunkRJXYP6DA_cjs = require('./chunk-RJXYP6DA.cjs');
var chunkKBVOYAAL_cjs = require('./chunk-KBVOYAAL.cjs');
var chunkQJGW77MV_cjs = require('./chunk-QJGW77MV.cjs');

// src/deploy/base.ts
var Deployer = class extends chunkRJXYP6DA_cjs.Bundler {
  deps = new chunkQJGW77MV_cjs.DepsService();
  constructor(args) {
    super(args.name, "DEPLOYER");
    this.deps.__setLogger(this.logger);
  }
  getEnvFiles() {
    const possibleFiles = [".env.production", ".env.local", ".env"];
    try {
      const fileService = new chunkQJGW77MV_cjs.FileService();
      const envFile = fileService.getFirstExistingFile(possibleFiles);
      return Promise.resolve([envFile]);
    } catch {
    }
    return Promise.resolve([]);
  }
};

// src/build/deployer.ts
async function getDeployer(entryFile, outputDir, logger) {
  const result = await chunkKBVOYAAL_cjs.extractMastraOption("deployer", entryFile, outputDir, logger);
  if (!result) {
    return null;
  }
  return result.getConfig();
}

Object.defineProperty(exports, "Deps", {
  enumerable: true,
  get: function () { return chunkQJGW77MV_cjs.Deps; }
});
Object.defineProperty(exports, "FileService", {
  enumerable: true,
  get: function () { return chunkQJGW77MV_cjs.FileService; }
});
Object.defineProperty(exports, "createChildProcessLogger", {
  enumerable: true,
  get: function () { return chunkQJGW77MV_cjs.createChildProcessLogger; }
});
Object.defineProperty(exports, "createPinoStream", {
  enumerable: true,
  get: function () { return chunkQJGW77MV_cjs.createPinoStream; }
});
exports.Deployer = Deployer;
exports.getDeployer = getDeployer;
//# sourceMappingURL=index.cjs.map
//# sourceMappingURL=index.cjs.map