wilfredwake 1.0.4 → 1.0.5

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": "wilfredwake",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "CLI Tool for Multi-Developer Development Environment Wake & Status Management",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -85,7 +85,8 @@ export class ServiceRegistry {
85
85
  */
86
86
  getServices(environment = 'dev') {
87
87
  const env = this.registry?.services?.[environment] || {};
88
- return Object.values(env);
88
+ // Return service objects augmented with their name for downstream code
89
+ return Object.entries(env).map(([name, svc]) => ({ name, ...svc }));
89
90
  }
90
91
 
91
92
  /**
@@ -95,7 +96,9 @@ export class ServiceRegistry {
95
96
  * @returns {Object|null} Service definition
96
97
  */
97
98
  getService(serviceName, environment = 'dev') {
98
- return this.registry?.services?.[environment]?.[serviceName] || null;
99
+ const svc = this.registry?.services?.[environment]?.[serviceName] || null;
100
+ if (!svc) return null;
101
+ return { name: serviceName, ...svc };
99
102
  }
100
103
 
101
104
  /**
@@ -125,8 +128,8 @@ export class ServiceRegistry {
125
128
  // RESOLVE TARGET SERVICES
126
129
  // ═══════════════════════════════════════════════════════════════
127
130
  if (target === 'all') {
128
- // Wake all services
129
- targetServices = Object.values(services);
131
+ // Wake all services (services is already an array of named objects)
132
+ targetServices = services;
130
133
  } else if (Array.isArray(target)) {
131
134
  // Wake specified services
132
135
  targetServices = target