Make scan imports relative for Worker compat

This commit is contained in:
Sam Carlton 2022-08-07 15:13:56 -05:00
parent d37603fcd5
commit 6de839a6d6
5 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,4 @@
import AppScanWorker from '~/helpers/scanner/worker.js?worker'
import AppScanWorker from './worker.mjs?worker'
export async function runScanWorker ( file ) {
// console.log( 'file', file )

View file

@ -2,7 +2,7 @@ import { Reader } from './endian-reader'
import { constants } from './constants'
import { MAGIC } from '~/helpers/macho/macho.magic.js'
import { MAGIC } from '../../../macho/macho.magic.js'
function determineMagicBits ( magic ) {
for ( const [ key, value ] of Object.entries( MAGIC ) ) {

View file

@ -1,6 +1,6 @@
import { Buffer } from 'buffer/index.js'
import parseMacho from '~/helpers/macho/index.js'
import parseMacho from '../../macho/index.js'
import { Parser as MachoNodeParser } from './macho-node/parser.js'

View file

@ -2,10 +2,10 @@ import { Buffer } from 'buffer/index.js'
import prettyBytes from 'pretty-bytes'
import * as zip from '@zip.js/zip.js'
import * as FileApi from '~/helpers/scanner/file-api.js'
import { isString, isNonEmptyString } from '~/helpers/check-types.js'
import { parsePlistBuffer } from '~/helpers/scanner/parsers/plist.js'
import { extractMachoMeta } from '~/helpers/scanner/parsers/macho.js'
import * as FileApi from './file-api.js'
import { isString, isNonEmptyString } from '../check-types.js'
import { parsePlistBuffer } from './parsers/plist.js'
import { extractMachoMeta } from './parsers/macho.js'
// https://gildas-lormeau.github.io/zip.js/core-api.html#configuration
zip.configure({

View file

@ -1,4 +1,4 @@
import { AppScan } from '~/helpers/scanner/scan.mjs'
import { AppScan } from './scan.mjs'
self.onmessage = async ( event ) => {