@memberjunction/react-runtime 5.32.0 → 5.34.0

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.
@@ -95,7 +95,7 @@ export class ComponentResolver {
95
95
  }
96
96
  await this.componentEngine.Config(false, contextUser);
97
97
  if (this.debug) {
98
- console.log(`✅ [ComponentResolver] Component engine initialized with ${this.componentEngine.Components?.length || 0} components`);
98
+ console.log(`✅ [ComponentResolver] Component engine initialized`);
99
99
  }
100
100
  }
101
101
 
@@ -243,36 +243,18 @@ export class ComponentResolver {
243
243
  console.error(`❌ [ComponentResolver] Failed to fetch from external registry: ${spec.name} from ${spec.registry}`);
244
244
  }
245
245
  } else {
246
- // LOCAL REGISTRY: Get from local database
246
+ // LOCAL REGISTRY: Get from local database via targeted RunView
247
247
  if (this.debug) {
248
- console.log(`💾 [ComponentResolver] Looking for locally registered component`);
248
+ console.log(`💾 [ComponentResolver] Looking for locally registered component: ${spec.name}`);
249
249
  }
250
-
251
- // First, try to find the component in the metadata engine
252
- const allComponents = this.componentEngine.Components || [];
253
- if (this.debug) {
254
- console.log(`📊 [ComponentResolver] Total components in engine: ${allComponents.length}`);
255
- }
256
-
257
- // Log all matching names to see duplicates
258
- const matchingNames = allComponents.filter((c: any) => c.Name === spec.name);
259
- if (matchingNames.length > 0 && this.debug) {
260
- console.log(`🔎 [ComponentResolver] Found ${matchingNames.length} components with name "${spec.name}":`,
261
- matchingNames.map((c: any) => ({
262
- ID: c.ID,
263
- Name: c.Name,
264
- Namespace: c.Namespace,
265
- Version: c.Version,
266
- Status: c.Status
267
- }))
268
- );
269
- }
270
-
271
- const component = this.componentEngine.Components?.find(
272
- (c: any) => c.Name === spec.name &&
273
- c.Namespace === (spec.namespace || namespace)
250
+
251
+ const component = await this.componentEngine.FindComponent(
252
+ spec.name,
253
+ spec.namespace || namespace,
254
+ undefined,
255
+ contextUser
274
256
  );
275
-
257
+
276
258
  if (component) {
277
259
  if (this.debug) {
278
260
  console.log(`✅ [ComponentResolver] Found component in local DB:`, {
@@ -282,7 +264,7 @@ export class ComponentResolver {
282
264
  Version: component.Version
283
265
  });
284
266
  }
285
-
267
+
286
268
  // Get compiled component from registry service (local compilation)
287
269
  const compiledComponent = await this.registryService.getCompiledComponent(
288
270
  component.ID,
@@ -295,9 +277,6 @@ export class ComponentResolver {
295
277
  }
296
278
  } else {
297
279
  console.error(`❌ [ComponentResolver] Local registry component NOT found in database: ${spec.name} with namespace: ${spec.namespace || namespace}`);
298
- if (this.debug) {
299
- console.warn(`Local registry component not found in database: ${spec.name}`);
300
- }
301
280
  }
302
281
  }
303
282
  } catch (error) {