@forcecalendar/core 1.0.1 → 1.0.2
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.
|
@@ -119,11 +119,19 @@ export class AdaptiveMemoryManager {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
// Node.js environment - use
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
// Node.js environment - use indirect access to avoid LWC static analysis
|
|
123
|
+
try {
|
|
124
|
+
const g = typeof globalThis !== 'undefined' ? globalThis : {};
|
|
125
|
+
const p = g.process;
|
|
126
|
+
if (p && typeof p === 'object') {
|
|
127
|
+
const memFn = p.memoryUsage;
|
|
128
|
+
if (typeof memFn === 'function') {
|
|
129
|
+
const usage = memFn.call(p);
|
|
130
|
+
return usage.heapUsed / usage.heapTotal;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
} catch (e) {
|
|
134
|
+
// Ignore - not in Node.js environment
|
|
127
135
|
}
|
|
128
136
|
|
|
129
137
|
// Fallback - estimate based on cache sizes
|