mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Switch back to imported buffer
This commit is contained in:
parent
7fa813fcac
commit
44eef3d075
1 changed files with 3 additions and 3 deletions
|
|
@ -8,12 +8,12 @@ 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 { Buffer } from 'buffer/'
|
||||
|
||||
// For some reason inline 'import()' works better than 'import from'
|
||||
// https://gildas-lormeau.github.io/zip.js/
|
||||
const zip = await import('@zip.js/zip.js')
|
||||
|
||||
const bufferApi = await import('buffer')
|
||||
// const FileApi = await import('file-api')
|
||||
// const { parse: plistParse } = await import('simple-plist/dist/index.js')
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ zip.configure({
|
|||
|
||||
|
||||
function makeNodeFileBuffer ( buffer ) {
|
||||
const fileBuffer = new bufferApi.Buffer.alloc( buffer.byteLength )
|
||||
const fileBuffer = new Buffer.alloc( buffer.byteLength )
|
||||
|
||||
for (var i = 0; i < buffer.length; i++)
|
||||
fileBuffer[i] = buffer[i];
|
||||
|
|
@ -282,7 +282,7 @@ export class AppScan {
|
|||
const machoFileInstance = new FileApi.File({
|
||||
name: this.bundleExecutable.filename,
|
||||
type: 'application/x-mach-binary',
|
||||
buffer: bundleExecutableUint8Array,
|
||||
buffer: Buffer.from( bundleExecutableUint8Array ),
|
||||
})
|
||||
|
||||
this.machoMeta = await extractMachoMeta({ machoFileInstance, FileApi })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue