@memberjunction/react-runtime 2.94.0 → 2.96.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 +9 -9
- package/CHANGELOG.md +30 -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 +116 -29
- package/dist/compiler/component-compiler.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -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 +25 -6
- 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 +101 -6
- 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/core-libraries.d.ts +1 -2
- package/dist/utilities/core-libraries.d.ts.map +1 -1
- package/dist/utilities/core-libraries.js +55 -45
- package/dist/utilities/core-libraries.js.map +1 -1
- package/dist/utilities/library-dependency-resolver.d.ts.map +1 -1
- package/dist/utilities/library-dependency-resolver.js +42 -9
- package/dist/utilities/library-dependency-resolver.js.map +1 -1
- package/dist/utilities/library-loader.d.ts +4 -2
- package/dist/utilities/library-loader.d.ts.map +1 -1
- package/dist/utilities/library-loader.js +27 -6
- package/dist/utilities/library-loader.js.map +1 -1
- package/package.json +5 -5
- package/src/compiler/component-compiler.ts +135 -31
- package/src/index.ts +7 -1
- package/src/registry/component-registry-service.ts +36 -6
- package/src/registry/component-registry.ts +28 -0
- package/src/registry/component-resolver.ts +123 -10
- package/src/runtime/component-hierarchy.ts +97 -31
- package/src/types/index.ts +1 -1
- package/src/utilities/core-libraries.ts +60 -46
- package/src/utilities/library-dependency-resolver.ts +51 -12
- package/src/utilities/library-loader.ts +30 -6
|
@@ -65,10 +65,12 @@ export class LibraryLoader {
|
|
|
65
65
|
* This is the main method that should be used by test harness and Angular wrapper
|
|
66
66
|
* @param config Optional full library configuration to replace the default
|
|
67
67
|
* @param additionalLibraries Optional additional libraries to merge with the configuration
|
|
68
|
+
* @param options Optional options including debug mode flag
|
|
68
69
|
*/
|
|
69
70
|
static async loadAllLibraries(
|
|
70
71
|
config?: LibraryConfiguration,
|
|
71
|
-
additionalLibraries?: ExternalLibraryConfig[]
|
|
72
|
+
additionalLibraries?: ExternalLibraryConfig[],
|
|
73
|
+
options?: { debug?: boolean }
|
|
72
74
|
): Promise<LibraryLoadResult> {
|
|
73
75
|
if (config) {
|
|
74
76
|
StandardLibraryManager.setConfiguration(config);
|
|
@@ -87,15 +89,15 @@ export class LibraryLoader {
|
|
|
87
89
|
StandardLibraryManager.setConfiguration(mergedConfig);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
return this.loadLibrariesFromConfig();
|
|
92
|
+
return this.loadLibrariesFromConfig(undefined, options?.debug);
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
/**
|
|
94
96
|
* Load libraries based on the current configuration
|
|
95
97
|
*/
|
|
96
|
-
static async loadLibrariesFromConfig(options?: ConfigLoadOptions): Promise<LibraryLoadResult> {
|
|
98
|
+
static async loadLibrariesFromConfig(options?: ConfigLoadOptions, debug?: boolean): Promise<LibraryLoadResult> {
|
|
97
99
|
// Always load core runtime libraries first
|
|
98
|
-
const coreLibraries = getCoreRuntimeLibraries();
|
|
100
|
+
const coreLibraries = getCoreRuntimeLibraries(debug);
|
|
99
101
|
const corePromises = coreLibraries.map(lib =>
|
|
100
102
|
this.loadScript(lib.cdnUrl, lib.globalVariable)
|
|
101
103
|
);
|
|
@@ -528,6 +530,8 @@ export class LibraryLoader {
|
|
|
528
530
|
|
|
529
531
|
if (debug) {
|
|
530
532
|
console.log(`📚 Loading libraries with dependencies:`, libraryNames);
|
|
533
|
+
console.log(` 📦 Total available libraries: ${allLibraries.length}`);
|
|
534
|
+
console.log(` 📋 Available library list:`, allLibraries.map(l => `${l.Name}@${l.Version}`));
|
|
531
535
|
}
|
|
532
536
|
|
|
533
537
|
// Get combined load order for all requested libraries
|
|
@@ -542,13 +546,33 @@ export class LibraryLoader {
|
|
|
542
546
|
throw new Error(`Failed to resolve dependencies: ${errors}`);
|
|
543
547
|
}
|
|
544
548
|
|
|
549
|
+
if (debug) {
|
|
550
|
+
console.log(` 📊 Dependency resolution result:`, {
|
|
551
|
+
success: loadOrderResult.success,
|
|
552
|
+
errors: loadOrderResult.errors || [],
|
|
553
|
+
warnings: loadOrderResult.warnings || []
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
if (loadOrderResult.order) {
|
|
557
|
+
console.log(` 🔄 Resolved dependencies for each library:`);
|
|
558
|
+
loadOrderResult.order.forEach(lib => {
|
|
559
|
+
const deps = this.dependencyResolver.parseDependencies(lib.Dependencies);
|
|
560
|
+
if (deps.size > 0) {
|
|
561
|
+
console.log(` • ${lib.Name}@${lib.Version} requires:`, Array.from(deps.entries()));
|
|
562
|
+
} else {
|
|
563
|
+
console.log(` • ${lib.Name}@${lib.Version} (no dependencies)`);
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
545
569
|
if (loadOrderResult.warnings && debug) {
|
|
546
|
-
console.warn(
|
|
570
|
+
console.warn(` ⚠️ Warnings:`, loadOrderResult.warnings);
|
|
547
571
|
}
|
|
548
572
|
|
|
549
573
|
const loadOrder = loadOrderResult.order || [];
|
|
550
574
|
if (debug) {
|
|
551
|
-
console.log(
|
|
575
|
+
console.log(` 📋 Final load order:`, loadOrder.map(lib => `${lib.Name}@${lib.Version}`));
|
|
552
576
|
}
|
|
553
577
|
|
|
554
578
|
// Load all libraries in order
|