fix(cli): resolve devtools build issues and update third-party notices

This commit is contained in:
Alisa Novikova
2026-02-19 16:23:16 -08:00
parent f1c0a695f8
commit 4a599db2bf
45 changed files with 5353 additions and 2960 deletions
+10 -8
View File
@@ -5,7 +5,7 @@
*/
import React, { useState, useEffect, useRef, useMemo } from 'react';
import { useDevToolsData, type ConsoleLog, type NetworkLog } from './hooks';
import { useDevToolsData, type ConsoleLog, type NetworkLog } from './hooks.js';
type ThemeMode = 'light' | 'dark' | null; // null means follow system
@@ -115,7 +115,6 @@ export default function App() {
if (!networkMap.has(id)) {
networkMap.set(id, {
...payload,
type,
timestamp,
id,
} as NetworkLog);
@@ -125,8 +124,7 @@ export default function App() {
networkMap.set(id, {
...existing,
...payload,
// Ensure we don't overwrite the original timestamp or type
type: existing.type,
// Ensure we don't overwrite the original timestamp
timestamp: existing.timestamp,
} as NetworkLog);
}
@@ -158,7 +156,7 @@ export default function App() {
const entries: Array<{ timestamp: number; data: object }> = [];
// Export console logs
filteredConsoleLogs.forEach((log) => {
filteredConsoleLogs.forEach((log: ConsoleLog) => {
entries.push({
timestamp: log.timestamp,
data: {
@@ -171,7 +169,7 @@ export default function App() {
});
// Export network logs
filteredNetworkLogs.forEach((log) => {
filteredNetworkLogs.forEach((log: NetworkLog) => {
entries.push({
timestamp: log.timestamp,
data: {
@@ -230,7 +228,9 @@ export default function App() {
if (selectedSessionId === importedSessionId && importedLogs) {
return importedLogs.console;
}
return consoleLogs.filter((l) => l.sessionId === selectedSessionId);
return consoleLogs.filter(
(l: ConsoleLog) => l.sessionId === selectedSessionId,
);
}, [consoleLogs, selectedSessionId, importedSessionId, importedLogs]);
const filteredNetworkLogs = useMemo(() => {
@@ -238,7 +238,9 @@ export default function App() {
if (selectedSessionId === importedSessionId && importedLogs) {
return importedLogs.network;
}
return networkLogs.filter((l) => l.sessionId === selectedSessionId);
return networkLogs.filter(
(l: NetworkLog) => l.sessionId === selectedSessionId,
);
}, [networkLogs, selectedSessionId, importedSessionId, importedLogs]);
return (
+1 -1
View File
@@ -6,7 +6,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import App from './App.js';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
+1 -1
View File
@@ -12,7 +12,7 @@
}
},
"scripts": {
"build": "npm run build:client && tsc -p tsconfig.build.json",
"build": "npm run build:client && tsc -p tsconfig.json",
"build:client": "node esbuild.client.js"
},
"files": [
+4 -2
View File
@@ -3,8 +3,10 @@
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2023"],
"jsx": "react-jsx",
"allowImportingTsExtensions": true,
"noEmit": true
"skipLibCheck": true,
"composite": true,
"noEmit": false,
"outDir": "dist"
},
"include": ["src", "client/src"]
}