@oxog/devinspector 1.5.1 → 1.5.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.
- package/CHANGELOG.md +5 -0
- package/dist/{chunk-NP2SAIEA.js → chunk-D4LKJXON.js} +10 -2
- package/dist/chunk-D4LKJXON.js.map +1 -0
- package/dist/{console-monitor-AO67CSAK.js → console-monitor-4ILYG5HB.js} +2 -2
- package/dist/devinspector.umd.cjs +17 -4
- package/dist/devinspector.umd.cjs.map +1 -1
- package/dist/devinspector.umd.js +17 -4
- package/dist/devinspector.umd.js.map +1 -1
- package/dist/devinspector.umd.min.cjs +2 -2
- package/dist/devinspector.umd.min.cjs.map +1 -1
- package/dist/devinspector.umd.min.js +2 -2
- package/dist/devinspector.umd.min.js.map +1 -1
- package/dist/{error-monitor-AVTYBTS7.js → error-monitor-I6H3VVLI.js} +2 -2
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/{network-monitor-QHVMB5F3.js → network-monitor-YJETSJKW.js} +2 -2
- package/dist/{performance-monitor-ULNHXBYX.js → performance-monitor-ESLQ3XM6.js} +6 -3
- package/dist/performance-monitor-ESLQ3XM6.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-NP2SAIEA.js.map +0 -1
- package/dist/performance-monitor-ULNHXBYX.js.map +0 -1
- /package/dist/{console-monitor-AO67CSAK.js.map → console-monitor-4ILYG5HB.js.map} +0 -0
- /package/dist/{error-monitor-AVTYBTS7.js.map → error-monitor-I6H3VVLI.js.map} +0 -0
- /package/dist/{network-monitor-QHVMB5F3.js.map → network-monitor-YJETSJKW.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateId,
|
|
3
3
|
parseStackFrame
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D4LKJXON.js";
|
|
5
5
|
|
|
6
6
|
// src/monitors/error/error-tracker.ts
|
|
7
7
|
function isInstance(value, name) {
|
|
@@ -396,4 +396,4 @@ var ErrorMonitor = class {
|
|
|
396
396
|
export {
|
|
397
397
|
ErrorMonitor
|
|
398
398
|
};
|
|
399
|
-
//# sourceMappingURL=error-monitor-
|
|
399
|
+
//# sourceMappingURL=error-monitor-I6H3VVLI.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -91,7 +91,7 @@ function throttle(func, wait, options = {}) {
|
|
|
91
91
|
result = func.apply(thisArg, args);
|
|
92
92
|
return result;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
const throttled = function(...args) {
|
|
95
95
|
const now = Date.now();
|
|
96
96
|
const remaining = wait - (now - lastCallTime);
|
|
97
97
|
lastThis = this;
|
|
@@ -116,6 +116,14 @@ function throttle(func, wait, options = {}) {
|
|
|
116
116
|
}
|
|
117
117
|
return result;
|
|
118
118
|
};
|
|
119
|
+
throttled.cancel = () => {
|
|
120
|
+
if (timeout) {
|
|
121
|
+
clearTimeout(timeout);
|
|
122
|
+
timeout = null;
|
|
123
|
+
}
|
|
124
|
+
lastArgs = lastThis = null;
|
|
125
|
+
};
|
|
126
|
+
return throttled;
|
|
119
127
|
}
|
|
120
128
|
function generateId() {
|
|
121
129
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
|
|
@@ -2077,7 +2085,9 @@ var init_performance_monitor = __esm({
|
|
|
2077
2085
|
this.memoryMonitor = new MemoryMonitor(this.handleMemoryData.bind(this));
|
|
2078
2086
|
this.metricsCollector = new MetricsCollector(this.handleMetrics.bind(this));
|
|
2079
2087
|
this.longTaskDetector = new LongTaskDetector(this.handleLongTask.bind(this));
|
|
2080
|
-
|
|
2088
|
+
const throttledEmit = throttle(this.emitPerformanceData.bind(this), 100);
|
|
2089
|
+
this.emitPerformanceData = throttledEmit;
|
|
2090
|
+
this.cancelPendingEmit = throttledEmit.cancel;
|
|
2081
2091
|
}
|
|
2082
2092
|
start() {
|
|
2083
2093
|
if (this.isActive) return;
|
|
@@ -2095,6 +2105,7 @@ var init_performance_monitor = __esm({
|
|
|
2095
2105
|
this.memoryMonitor.stop();
|
|
2096
2106
|
this.metricsCollector.stop();
|
|
2097
2107
|
this.longTaskDetector.stop();
|
|
2108
|
+
this.cancelPendingEmit();
|
|
2098
2109
|
this.isActive = false;
|
|
2099
2110
|
}
|
|
2100
2111
|
handleFPSData(data) {
|
|
@@ -4288,7 +4299,7 @@ var BasePlugin = class {
|
|
|
4288
4299
|
};
|
|
4289
4300
|
|
|
4290
4301
|
// src/version.ts
|
|
4291
|
-
var VERSION = "1.5.
|
|
4302
|
+
var VERSION = "1.5.2";
|
|
4292
4303
|
|
|
4293
4304
|
// src/enhanced-simple.ts
|
|
4294
4305
|
var CONSOLE_METHODS = ["log", "info", "warn", "error", "debug"];
|