@memberjunction/react-runtime 2.94.0 → 2.95.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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +12 -0
- package/dist/compiler/component-compiler.d.ts +1 -0
- package/dist/compiler/component-compiler.d.ts.map +1 -1
- package/dist/compiler/component-compiler.js +67 -24
- package/dist/compiler/component-compiler.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/registry/component-registry-service.d.ts +2 -0
- package/dist/registry/component-registry-service.d.ts.map +1 -1
- package/dist/registry/component-registry-service.js +11 -0
- package/dist/registry/component-registry-service.js.map +1 -1
- package/dist/registry/component-registry.d.ts +2 -0
- package/dist/registry/component-registry.d.ts.map +1 -1
- package/dist/registry/component-registry.js +17 -0
- package/dist/registry/component-registry.js.map +1 -1
- package/dist/registry/component-resolver.d.ts.map +1 -1
- package/dist/registry/component-resolver.js +60 -5
- package/dist/registry/component-resolver.js.map +1 -1
- package/dist/runtime/component-hierarchy.d.ts.map +1 -1
- package/dist/runtime/component-hierarchy.js +73 -17
- package/dist/runtime/component-hierarchy.js.map +1 -1
- package/dist/runtime.umd.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/library-dependency-resolver.d.ts.map +1 -1
- package/dist/utilities/library-dependency-resolver.js +17 -8
- package/dist/utilities/library-dependency-resolver.js.map +1 -1
- package/dist/utilities/library-loader.d.ts.map +1 -1
- package/dist/utilities/library-loader.js +23 -2
- package/dist/utilities/library-loader.js.map +1 -1
- package/package.json +5 -5
- package/src/compiler/component-compiler.ts +73 -25
- package/src/index.ts +2 -1
- package/src/registry/component-registry-service.ts +21 -0
- package/src/registry/component-registry.ts +28 -0
- package/src/registry/component-resolver.ts +82 -9
- package/src/runtime/component-hierarchy.ts +97 -31
- package/src/types/index.ts +1 -1
- package/src/utilities/library-dependency-resolver.ts +21 -11
- package/src/utilities/library-loader.ts +24 -2
|
@@ -421,16 +421,19 @@ export class LibraryDependencyResolver {
|
|
|
421
421
|
const warnings: string[] = [];
|
|
422
422
|
|
|
423
423
|
if (this.debug || options?.debug) {
|
|
424
|
-
console.log('🔍 Getting load order for:'
|
|
424
|
+
console.log('🔍 Getting load order for requested libraries:');
|
|
425
|
+
console.log(' 📝 Requested:', requestedLibs);
|
|
426
|
+
console.log(' 📚 Total available libraries:', allLibs.length);
|
|
425
427
|
}
|
|
426
428
|
|
|
427
|
-
// Build a map for quick lookup
|
|
429
|
+
// Build a map for quick lookup (case-insensitive)
|
|
428
430
|
const libMap = new Map<string, ComponentLibraryEntity[]>();
|
|
429
431
|
for (const lib of allLibs) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
+
const key = lib.Name.toLowerCase();
|
|
433
|
+
if (!libMap.has(key)) {
|
|
434
|
+
libMap.set(key, []);
|
|
432
435
|
}
|
|
433
|
-
libMap.get(
|
|
436
|
+
libMap.get(key)!.push(lib);
|
|
434
437
|
}
|
|
435
438
|
|
|
436
439
|
// Collect all libraries needed (requested + their dependencies)
|
|
@@ -448,9 +451,12 @@ export class LibraryDependencyResolver {
|
|
|
448
451
|
processed.add(current);
|
|
449
452
|
needed.add(current);
|
|
450
453
|
|
|
451
|
-
// Find the library
|
|
452
|
-
const libVersions = libMap.get(current);
|
|
454
|
+
// Find the library (case-insensitive lookup)
|
|
455
|
+
const libVersions = libMap.get(current.toLowerCase());
|
|
453
456
|
if (!libVersions || libVersions.length === 0) {
|
|
457
|
+
if (this.debug || options?.debug) {
|
|
458
|
+
console.log(` ❌ Library '${current}' not found in available libraries`);
|
|
459
|
+
}
|
|
454
460
|
errors.push(`Library '${current}' not found`);
|
|
455
461
|
continue;
|
|
456
462
|
}
|
|
@@ -458,6 +464,10 @@ export class LibraryDependencyResolver {
|
|
|
458
464
|
// For now, use the first version found (should be resolved properly)
|
|
459
465
|
const lib = libVersions[0];
|
|
460
466
|
const deps = this.parseDependencies(lib.Dependencies);
|
|
467
|
+
|
|
468
|
+
if ((this.debug || options?.debug) && deps.size > 0) {
|
|
469
|
+
console.log(` 📌 ${current} requires:`, Array.from(deps.entries()));
|
|
470
|
+
}
|
|
461
471
|
|
|
462
472
|
// Process dependencies
|
|
463
473
|
for (const [depName, depVersion] of deps) {
|
|
@@ -489,7 +499,7 @@ export class LibraryDependencyResolver {
|
|
|
489
499
|
const resolvedLibraries: ComponentLibraryEntity[] = [];
|
|
490
500
|
for (const libName of needed) {
|
|
491
501
|
const requirements = versionRequirements.get(libName) || [];
|
|
492
|
-
const versions = libMap.get(libName) || [];
|
|
502
|
+
const versions = libMap.get(libName.toLowerCase()) || [];
|
|
493
503
|
|
|
494
504
|
if (versions.length === 0) {
|
|
495
505
|
errors.push(`Library '${libName}' not found`);
|
|
@@ -573,10 +583,10 @@ export class LibraryDependencyResolver {
|
|
|
573
583
|
const processed = new Set<string>();
|
|
574
584
|
let depth = 0;
|
|
575
585
|
|
|
576
|
-
// Build lookup map
|
|
586
|
+
// Build lookup map (case-insensitive)
|
|
577
587
|
const libMap = new Map<string, ComponentLibraryEntity>();
|
|
578
588
|
for (const lib of allLibs) {
|
|
579
|
-
libMap.set(lib.Name, lib);
|
|
589
|
+
libMap.set(lib.Name.toLowerCase(), lib);
|
|
580
590
|
}
|
|
581
591
|
|
|
582
592
|
while (toProcess.length > 0 && depth < maxDepth) {
|
|
@@ -584,7 +594,7 @@ export class LibraryDependencyResolver {
|
|
|
584
594
|
if (processed.has(current)) continue;
|
|
585
595
|
|
|
586
596
|
processed.add(current);
|
|
587
|
-
const lib = libMap.get(current);
|
|
597
|
+
const lib = libMap.get(current.toLowerCase());
|
|
588
598
|
if (!lib) continue;
|
|
589
599
|
|
|
590
600
|
const deps = this.parseDependencies(lib.Dependencies);
|
|
@@ -528,6 +528,8 @@ export class LibraryLoader {
|
|
|
528
528
|
|
|
529
529
|
if (debug) {
|
|
530
530
|
console.log(`📚 Loading libraries with dependencies:`, libraryNames);
|
|
531
|
+
console.log(` 📦 Total available libraries: ${allLibraries.length}`);
|
|
532
|
+
console.log(` 📋 Available library list:`, allLibraries.map(l => `${l.Name}@${l.Version}`));
|
|
531
533
|
}
|
|
532
534
|
|
|
533
535
|
// Get combined load order for all requested libraries
|
|
@@ -542,13 +544,33 @@ export class LibraryLoader {
|
|
|
542
544
|
throw new Error(`Failed to resolve dependencies: ${errors}`);
|
|
543
545
|
}
|
|
544
546
|
|
|
547
|
+
if (debug) {
|
|
548
|
+
console.log(` 📊 Dependency resolution result:`, {
|
|
549
|
+
success: loadOrderResult.success,
|
|
550
|
+
errors: loadOrderResult.errors || [],
|
|
551
|
+
warnings: loadOrderResult.warnings || []
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
if (loadOrderResult.order) {
|
|
555
|
+
console.log(` 🔄 Resolved dependencies for each library:`);
|
|
556
|
+
loadOrderResult.order.forEach(lib => {
|
|
557
|
+
const deps = this.dependencyResolver.parseDependencies(lib.Dependencies);
|
|
558
|
+
if (deps.size > 0) {
|
|
559
|
+
console.log(` • ${lib.Name}@${lib.Version} requires:`, Array.from(deps.entries()));
|
|
560
|
+
} else {
|
|
561
|
+
console.log(` • ${lib.Name}@${lib.Version} (no dependencies)`);
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
545
567
|
if (loadOrderResult.warnings && debug) {
|
|
546
|
-
console.warn(
|
|
568
|
+
console.warn(` ⚠️ Warnings:`, loadOrderResult.warnings);
|
|
547
569
|
}
|
|
548
570
|
|
|
549
571
|
const loadOrder = loadOrderResult.order || [];
|
|
550
572
|
if (debug) {
|
|
551
|
-
console.log(
|
|
573
|
+
console.log(` 📋 Final load order:`, loadOrder.map(lib => `${lib.Name}@${lib.Version}`));
|
|
552
574
|
}
|
|
553
575
|
|
|
554
576
|
// Load all libraries in order
|