MCPcopy Index your code
hub / github.com/ThatGuySam/doesitarm / findTargetFiles

Method findTargetFiles

helpers/scanner/scan.ts:442–484  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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({

Callers 1

runScanMethod · 0.95

Calls 6

fileEntryTypeMethod · 0.95
findMainExecutableMethod · 0.95
isNonEmptyStringFunction · 0.90
firstNonEmptyStringFunction · 0.85
methodMethod · 0.80

Tested by

no test coverage detected