@hkdigital/lib-core 0.4.20 → 0.4.21

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.
@@ -81,15 +81,22 @@ export default class ConfigPlugin {
81
81
  */
82
82
  // eslint-disable-next-line no-unused-vars
83
83
  async resolveServiceConfig(serviceName, serviceEntry, currentConfig) {
84
+ // console.log(`ConfigPlugin.resolveServiceConfig called for '${serviceName}'`);
85
+ // console.log('ServiceEntry:', serviceEntry);
86
+ // console.log('AllConfigs:', this.allConfigs);
87
+
84
88
  const configLabel = serviceEntry.serviceConfigOrLabel;
89
+ // console.log('Config label:', configLabel, 'Type:', typeof configLabel);
85
90
 
86
91
  if (typeof configLabel !== 'string') {
92
+ // console.log('Config label is not string, returning undefined');
87
93
  // Expected config label
88
94
  return undefined;
89
95
  }
90
96
 
91
97
  // Simple object lookup
92
98
  const config = this.allConfigs[configLabel];
99
+ // console.log(`Looking up config for label '${configLabel}':`, config);
93
100
 
94
101
  if (config !== undefined) {
95
102
  this.manager?.logger?.debug(
@@ -99,6 +106,9 @@ export default class ConfigPlugin {
99
106
  typeof config === 'object' ? Object.keys(config) : 'primitive'
100
107
  }
101
108
  );
109
+ // console.log(`Resolved config for '${serviceName}':`, config);
110
+ } else {
111
+ // console.log(`No config found for label '${configLabel}'`);
102
112
  }
103
113
 
104
114
  return config;
@@ -174,7 +174,7 @@ export class ServiceManager extends EventEmitter {
174
174
  const entry = {
175
175
  ServiceClass,
176
176
  instance: null,
177
- serviceConfigOrLabel,
177
+ serviceConfigOrLabel: serviceConfigOrLabel,
178
178
  dependencies: options.dependencies || [],
179
179
  dependents: new Set(),
180
180
  tags: options.tags || [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-core",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"