From 3820116c8395da7eba2ce14f1bed577368d1f9b4 Mon Sep 17 00:00:00 2001 From: rUv Date: Sat, 16 Aug 2025 16:39:27 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/test-app/config/config.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/checkpoints/1755362362.json | 1 + .claude/checkpoints/1755362364.json | 1 + test-app/config/config.js | 34 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .claude/checkpoints/1755362362.json create mode 100644 .claude/checkpoints/1755362364.json create mode 100644 test-app/config/config.js diff --git a/.claude/checkpoints/1755362362.json b/.claude/checkpoints/1755362362.json new file mode 100644 index 0000000000..53ce0d65ae --- /dev/null +++ b/.claude/checkpoints/1755362362.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250816-163922", "file": "/workspaces/claude-code-flow/test-app/.env.example", "timestamp": "2025-08-16T16:39:22Z", "type": "pre-edit", "original_branch": "alpha90"} diff --git a/.claude/checkpoints/1755362364.json b/.claude/checkpoints/1755362364.json new file mode 100644 index 0000000000..82adc49132 --- /dev/null +++ b/.claude/checkpoints/1755362364.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250816-163924", "file": "/workspaces/claude-code-flow/test-app/.env.example", "timestamp": "2025-08-16T16:39:24Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/1755362360.json | 1 + .claude/checkpoints/task-1755362360.json | 1 + claude-flow-wiki | 0 test-app/.env.example | 7 +++++++ 6 files changed, 13 insertions(+), 4 deletions(-) "} diff --git a/test-app/config/config.js b/test-app/config/config.js new file mode 100644 index 0000000000..23696499ed --- /dev/null +++ b/test-app/config/config.js @@ -0,0 +1,34 @@ +// Configuration loader with environment variable support +require('dotenv').config(); + +const config = { + // Application settings + NODE_ENV: process.env.NODE_ENV || 'development', + VERBOSE_LOGGING: process.env.VERBOSE_LOGGING || 'false', + + // Additional configuration can be added here + APP_NAME: process.env.APP_NAME || 'test-app', + LOG_LEVEL: process.env.LOG_LEVEL || 'info', + + // Validation to ensure required configs are present + validate() { + const required = ['NODE_ENV']; + const missing = required.filter(key => !this[key]); + + if (missing.length > 0) { + throw new Error(`Missing required configuration: ${missing.join(', ')}`); + } + + return true; + } +}; + +// Validate configuration on load +try { + config.validate(); +} catch (error) { + console.error('Configuration error:', error.message); + process.exit(1); +} + +module.exports = config; \ No newline at end of file