mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Put scan steps into single method
This commit is contained in:
parent
50e707a4ac
commit
f82e47c4b6
1 changed files with 39 additions and 33 deletions
|
|
@ -7,7 +7,6 @@ import { isString, isNonEmptyString } from '~/helpers/check-types.js'
|
||||||
import { parsePlistBuffer } from '~/helpers/scanner/parsers/plist.js'
|
import { parsePlistBuffer } from '~/helpers/scanner/parsers/plist.js'
|
||||||
import { extractMachoMeta } from '~/helpers/scanner/parsers/macho.js'
|
import { extractMachoMeta } from '~/helpers/scanner/parsers/macho.js'
|
||||||
|
|
||||||
|
|
||||||
// https://gildas-lormeau.github.io/zip.js/core-api.html#configuration
|
// https://gildas-lormeau.github.io/zip.js/core-api.html#configuration
|
||||||
zip.configure({
|
zip.configure({
|
||||||
// Disable Web Workers for SSR since Node doesn't support them yet
|
// Disable Web Workers for SSR since Node doesn't support them yet
|
||||||
|
|
@ -383,8 +382,7 @@ export class AppScan {
|
||||||
this.binarySupportsNative = this.classifyBinaryEntryArchitecture( this.machoMeta )
|
this.binarySupportsNative = this.classifyBinaryEntryArchitecture( this.machoMeta )
|
||||||
}
|
}
|
||||||
|
|
||||||
async start () {
|
async runScan () {
|
||||||
try {
|
|
||||||
// Load in the file
|
// Load in the file
|
||||||
this.sendMessage({
|
this.sendMessage({
|
||||||
message: '🚛 Loading file...',
|
message: '🚛 Loading file...',
|
||||||
|
|
@ -418,6 +416,13 @@ export class AppScan {
|
||||||
message: '🏁 Scan complete! ',
|
message: '🏁 Scan complete! ',
|
||||||
status: 'complete'
|
status: 'complete'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async start () {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
await this.runScan()
|
||||||
|
|
||||||
} catch ( error ) {
|
} catch ( error ) {
|
||||||
this.sendMessage({
|
this.sendMessage({
|
||||||
|
|
@ -426,5 +431,6 @@ export class AppScan {
|
||||||
error
|
error
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue