feat: push discover event to frontend

This commit is contained in:
wancat committed 2023-08-21 20:40:05 +08:00
1 parent c0186c6a30
commit 096b7a7714
5 files changed
+33 -3

No files matched your search

+5
View File
@@ -72,6 +72,11 @@ async function connect(sessionId) {
stdout.write(data)
})
socket.on('graph', (data) => {
console.log('receive graph:')
console.log(data)
})
socket.on('close', function close() {
console.log('Disconnected from the server.')
exit()
-1
View File
@@ -33,7 +33,6 @@ async function collectFilesInfo(inputPath, level = 0, hiddenFiles = false) {
}
async function discoverFiles(argv) {
console.log(argv)
const targetPath = argv._.length < 2 ? ['.'] : argv._.slice(1)
const result = await Promise.all(
targetPath