UNPKG

@grasplabs/grasp

Version:

TypeScript SDK for browser automation and secure command execution in highly available and scalable cloud browser environments

35 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_CONFIG = void 0; exports.getConfig = getConfig; const dotenv_1 = require("dotenv"); // Load environment variables (0, dotenv_1.config)({ path: '.env.grasp', }); /** * Gets application configuration from environment variables * @returns {IAppConfig} Application configuration object */ function getConfig() { return { sandbox: { key: process.env.GRASP_KEY || '', timeout: parseInt(process.env.GRASP_SERVICE_TIMEOUT || '3600000', 10), debug: process.env.GRASP_DEBUG === 'true', keepAliveMs: parseInt(process.env.GRASP_SERVICE_KEEP_ALIVE_MS || '10000', 10), }, logger: { level: process.env.GRASP_LOG_LEVEL || undefined, console: true, file: process.env.GRASP_LOG_FILE, }, }; } /** * Default configuration constants */ exports.DEFAULT_CONFIG = { WORKING_DIRECTORY: '/home/user', }; //# sourceMappingURL=config.js.map