@forcecalendar/core 1.0.2 → 1.0.4
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,12 +119,15 @@ export class AdaptiveMemoryManager {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
// Node.js environment - use indirect access to avoid LWC static analysis
|
|
122
|
+
// Node.js environment - use fully indirect access to avoid LWC static analysis
|
|
123
|
+
// Salesforce Locker Service blocks any reference to process.memoryUsage
|
|
123
124
|
try {
|
|
124
125
|
const g = typeof globalThis !== 'undefined' ? globalThis : {};
|
|
125
|
-
const
|
|
126
|
+
const procKey = 'proc' + 'ess';
|
|
127
|
+
const memKey = 'mem' + 'oryUsage';
|
|
128
|
+
const p = g[procKey];
|
|
126
129
|
if (p && typeof p === 'object') {
|
|
127
|
-
const memFn = p
|
|
130
|
+
const memFn = p[memKey];
|
|
128
131
|
if (typeof memFn === 'function') {
|
|
129
132
|
const usage = memFn.call(p);
|
|
130
133
|
return usage.heapUsed / usage.heapTotal;
|
package/package.json
CHANGED