siesa-agents 2.1.74 → 2.1.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siesa-agents",
3
- "version": "2.1.74",
3
+ "version": "2.1.75",
4
4
  "description": "Paquete para instalar y configurar agentes SIESA en tu proyecto",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -24,6 +24,29 @@ const path = require('path')
24
24
  const os = require('os')
25
25
  const { execSync } = require('child_process')
26
26
 
27
+ function loadDotEnv() {
28
+ const envPath = path.join(process.cwd(), '.env')
29
+ if (!fs.existsSync(envPath)) return
30
+ try {
31
+ const content = fs.readFileSync(envPath, 'utf8')
32
+ for (const rawLine of content.split(/\r?\n/)) {
33
+ const line = rawLine.trim()
34
+ if (!line || line.startsWith('#')) continue
35
+ const idx = line.indexOf('=')
36
+ if (idx === -1) continue
37
+ const key = line.slice(0, idx).trim()
38
+ let val = line.slice(idx + 1).trim()
39
+ if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {
40
+ val = val.slice(1, -1)
41
+ }
42
+ if (key && process.env[key] === undefined) {
43
+ process.env[key] = val
44
+ }
45
+ }
46
+ } catch (_) {}
47
+ }
48
+ loadDotEnv()
49
+
27
50
  const VALID_EVENTS = ['workflow.started', 'workflow.finished', 'status.changed', 'fix.started', 'fix.finished']
28
51
  const VALID_PHASES = ['create-story', 'dev-story', 'code-review']
29
52
  const VALID_FIX_OPTIONS = ['auto_fix', 'action_items', 'show_details']