import { MastraBase } from './chunk-DNW46JHP.js';
import { readFile } from 'fs/promises';
import { parse } from 'dotenv';

var MastraBundler = class extends MastraBase {
  constructor({ name, component = "BUNDLER" }) {
    super({ component, name });
  }
  async loadEnvVars() {
    const envVars = /* @__PURE__ */ new Map();
    for (const file of await this.getEnvFiles()) {
      const content = await readFile(file, "utf-8");
      const config = parse(content);
      Object.entries(config).forEach(([key, value]) => {
        envVars.set(key, value);
      });
    }
    return envVars;
  }
};

export { MastraBundler };
//# sourceMappingURL=chunk-K6W2C7PA.js.map
//# sourceMappingURL=chunk-K6W2C7PA.js.map