UNPKG

@nestbox-ai/cli

Version:

The cli tools that helps developers to build agents

32 lines 1.17 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNestboxConfigPath = getNestboxConfigPath; exports.readNestboxConfig = readNestboxConfig; exports.writeNestboxConfig = writeNestboxConfig; const fs_1 = __importDefault(require("fs")); const path_1 = __importDefault(require("path")); // Utility functions for project configuration function getNestboxConfigPath() { return path_1.default.join(process.cwd(), '.nestboxrc'); } function readNestboxConfig() { const configPath = getNestboxConfigPath(); if (fs_1.default.existsSync(configPath)) { try { const content = fs_1.default.readFileSync(configPath, 'utf8'); return JSON.parse(content); } catch (error) { return { projects: {} }; } } return { projects: {} }; } function writeNestboxConfig(config) { const configPath = getNestboxConfigPath(); fs_1.default.writeFileSync(configPath, JSON.stringify(config, null, 2)); } //# sourceMappingURL=config.js.map