MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / AppScan

Class AppScan

helpers/scanner/scan.ts:138–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138export class AppScan {
139 fileLoader: AppScanOptions['fileLoader']
140 messageReceiver?: ( details: ScanMessage ) => void
141 status: ScanStatus
142 file: ArrayBuffer | Blob | ScanFileLike | null
143 bundleFileEntries: ScanFileEntry[]
144 infoPlist: Record<string, unknown>
145 machoExcutables: ScanFileEntry[]
146 appVersion: string
147 displayName: string
148 details: ScanDetail[]
149 bundleExecutable: ScanFileEntry | null
150 displayBinarySize: string
151 binarySize: number
152 machoMeta: ScanMachoMeta
153 binarySupportsNative: boolean
154 info: ScanInfo
155
156 constructor ( {
157 fileLoader,
158 messageReceiver
159 }: AppScanOptions ) {
160 this.fileLoader = fileLoader
161 this.messageReceiver = messageReceiver
162
163 this.status = 'idle'
164 this.file = null
165 this.bundleFileEntries = []
166 this.infoPlist = {}
167 this.machoExcutables = []
168
169 this.appVersion = ''
170 this.displayName = ''
171 this.details = []
172 this.bundleExecutable = null
173 this.displayBinarySize = ''
174 this.binarySize = 0
175 this.machoMeta = {
176 architectures: []
177 }
178 this.binarySupportsNative = false
179
180 this.info = {
181 appVersion: '',
182 filename: '',
183 infoPlist: {},
184 machoMeta: null,
185 result: '🔶'
186 }
187 }
188
189 sendMessage ( details: ScanMessage ) {
190 if ( details.status ) {
191 this.status = details.status
192 }
193
194 if ( typeof this.messageReceiver === 'function' ) {
195 this.messageReceiver( details )

Callers

nothing calls this directly

Calls 4

sendMessageMethod · 0.95
parsePlistBufferFunction · 0.90
extractMachoMetaFunction · 0.90
makeNodeFileBufferFunction · 0.85

Tested by

no test coverage detected