UNPKG

@mastra/core

Version:

The core foundation of the Mastra framework, providing essential components and interfaces for building AI-powered applications.

25 lines (21 loc) 695 B
'use strict'; var chunkD63P5O4Q_cjs = require('./chunk-D63P5O4Q.cjs'); var promises = require('fs/promises'); var dotenv = require('dotenv'); var MastraBundler = class extends chunkD63P5O4Q_cjs.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 promises.readFile(file, "utf-8"); const config = dotenv.parse(content); Object.entries(config).forEach(([key, value]) => { envVars.set(key, value); }); } return envVars; } }; exports.MastraBundler = MastraBundler;