()
| 440 | } |
| 441 | |
| 442 | async findTargetFiles () { |
| 443 | for ( const fileEntry of this.bundleFileEntries ) { |
| 444 | const type = this.fileEntryType( fileEntry ) as keyof typeof this.targetFiles | 'directory' | 'unknown' |
| 445 | |
| 446 | if ( type in this.targetFiles ) { |
| 447 | await this.targetFiles[ type as keyof typeof this.targetFiles ].method( fileEntry ) |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | this.appVersion = firstNonEmptyString( [ |
| 452 | this.infoPlist.CFBundleShortVersionString, |
| 453 | this.infoPlist.CFBundleVersion |
| 454 | ] ) |
| 455 | |
| 456 | this.displayName = firstNonEmptyString( [ |
| 457 | this.infoPlist.CFBundleDisplayName, |
| 458 | this.infoPlist.CFBundleName, |
| 459 | this.infoPlist.CFBundleExecutable |
| 460 | ] ) |
| 461 | |
| 462 | ;([ |
| 463 | [ 'Version', this.infoPlist.CFBundleShortVersionString ], |
| 464 | [ 'Bundle Identifier', this.infoPlist.CFBundleIdentifier ], |
| 465 | [ 'File Mime Type', this.file && 'type' in this.file ? this.file.type : '' ], |
| 466 | [ 'Copyright', this.infoPlist.NSHumanReadableCopyright ] |
| 467 | ] as Array<[ string, unknown ]>).forEach( ( [ label, value ] ) => { |
| 468 | if ( !isNonEmptyString( value ) ) return |
| 469 | |
| 470 | this.details.push({ |
| 471 | label, |
| 472 | value: String( value ) |
| 473 | }) |
| 474 | } ) |
| 475 | |
| 476 | this.bundleExecutable = this.findMainExecutable() |
| 477 | |
| 478 | this.displayBinarySize = prettyBytes( this.bundleExecutable.uncompressedSize ) |
| 479 | this.binarySize = this.bundleExecutable.uncompressedSize |
| 480 | |
| 481 | await this.storeMachoMeta( this.bundleExecutable ) |
| 482 | |
| 483 | this.binarySupportsNative = this.classifyBinaryEntryArchitecture( this.machoMeta ) |
| 484 | } |
| 485 | |
| 486 | async runScan () { |
| 487 | this.sendMessage({ |
no test coverage detected