Disable v2 scanner

This commit is contained in:
Sam Carlton 2022-07-21 22:57:41 -05:00
parent fc80ef713a
commit 9e16769fa5

View file

@ -4,7 +4,7 @@ import prettyBytes from 'pretty-bytes'
import { isString } from './check-types.js' import { isString } from './check-types.js'
import parseMacho from './macho/index.js' import parseMacho from './macho/index.js'
import { AppScan } from '~/helpers/scanner/client.mjs' // import { AppScan } from '~/helpers/scanner/client.mjs'
const scannerVersion = (() => { const scannerVersion = (() => {
// If there's no window // If there's no window
@ -616,26 +616,28 @@ export default class AppFilesScanner {
console.log( 'scannerVersion', scannerVersion ) console.log( 'scannerVersion', scannerVersion )
if ( scannerVersion === '2' ) { // if ( scannerVersion === '2' ) {
// Create a new AppScan instance // // const { AppScan } = await import('~/helpers/scanner/client.mjs')
const scan = new AppScan({
fileLoader: async () => file.instance,
messageReceiver: ( details ) => {
console.log( 'Scan message:', details )
file.statusMessage = details.message // // Create a new AppScan instance
file.status = details.status // const scan = new AppScan({
} // fileLoader: async () => file.instance,
}) // messageReceiver: ( details ) => {
// console.log( 'Scan message:', details )
// Scan the archive // file.statusMessage = details.message
await scan.start() // file.status = details.status
// }
// })
clearTimeout(timer) // // Scan the archive
// await scan.start()
resolve() // clearTimeout(timer)
return
} // resolve()
// return
// }
this.scanFile( file, scanIndex ).then( this.scanFile( file, scanIndex ).then(
response => resolve(response), response => resolve(response),